Aller au contenu

Photo

What are the rules for a TGA or DDS Custom Worldmap?


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
- Standalone module.
- Custom World Map & World Map Image.
- Map Tutorial and other insights applied to module

Results as follows

World Map accessible in game, however, I only see my waypoints - and a little grey box floating just above the map book left hand corner.

I have swapped out my 'MAP' (object inspector setting when editing mymap.map) with Denerim or Ferelden and those maps appear aok, with my waypoints on them.

I have added a DDS of my worldmap to gui.erf (first as an override, then directly in the single player gui.erf out of pure frustration - no impact).

I have extracted "worldmap.dds" from the single player gui.erf and examined it with Nvidia's WTV software (DDS viewer) to find the following:

Format: 32bit-A8R8G9B9
Image Size: 912x687
File Size: 2447.4KB

note - everytime I have tried to convert a TGA to DDS, I must have both height & width dimensions be a power of 2 which does not align obviously with the dimensions of the single player worldmap...digging into it...

So - of all the threads I found on this topic, not a one has a stated solution to the 'grey box' in lieu of the desired map image. Has ANYONE out there got this working? Seems as though the posts on this subject died off a couple months ago - forgive me for starting a new thread, but I've got over 20 hours into this (trying to get the correct image to appear in the world map view).

ps - yes, of course I can see the proper image in the toolset ;-)

pps - the link to the free WTV (windows texture viewer) is:

http://developer.nvi...ure_viewer.html

Modifié par RecklezzRogue, 09 mars 2010 - 01:05 .


#2
nezroy

nezroy
  • Members
  • 99 messages
As for generating the DDS, it is an uncompressed 4-channel 8-bit DDS with no mipmaps. If you are using the standard "nvdxt.exe" command line tool to convert a source TGA (which I recommend; the photoshop/gimp DDS plugins are inferior by comparison), the arguments would be "-nomipmap -u8888".

Also, it appears that the engine is using a localized worldmap, named worldmap_en-us.dds (or whatever language you're in). I don't know under what circumstances it uses just the worldmap.dds, but throwing a custom worldmap_en-us.dds in packages/core/override worked fine for me to replace the existing worldmap.

So if it's not just a DDS format issue, you could try appending the _en-us suffix onto your file name for your custom worldmap, since possibly the game is doing this automatically to the base map name defined in your worldmap_custom m2da (as it seems to be doing to the original "worldmap" name).

Modifié par nezroy, 09 mars 2010 - 09:14 .


#3
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
thank you - after getting to know this stuff a little, your suffix advice makes perfect sense.



once I get this working I am going post a to do list for custom world maps from scratch....(not vs. the tutorial, but complimentary).

#4
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
Nezroy - followed your advice - same results - please see below a detailed transcript of what I have done to get my world map working - I posted this also in another thread the Craig.G appeared to be watching...we'll see if he replies (I hope so)...well - if you have the time, would appreciate your thoughts since you are the only person I have heard from that has this working:



Copy form other thread follows:



=====

Attn: Craig or other expert - if you could please scan the following - I have recorded exactly every single step to create a custom world map....I still have the lgb in the upper left-hand corner (little grey box). I hope that 'we' can make this work, and have a detailed step by step example as a companion to the map tutorial --- here it is:



|----------------------------------------------------------------------------------------------|

|Custom World Map Steps for Standalone Addin Module (Dark Alliances) |

|Based on direction from Map Tutorial (Wiki) and other sources... |

|----------------------------------------------------------------------------------------------|



====

Step #1 - Create TGA image of desired map

.

Filename: worldmap_dm001.map

FileSize: 279KB

Image Type: TGA

Image Size: 512x512

note - used "FastStone" to edit & save .PNG image as .TGA (resizing to 512x512, applying sepia)



====

Step #2 - Convert TGA to DSS using ".\\\\Dragon Age\\\\Tools\\\\ResourceBuild\\\\Processors\\\\NVDXT.EXE"

.



Command Line: nvdxt -file "worldmap_dmo001.tga" -nomipmap -u8888



Output: worldmap_dmo001.dds

FileSize: 1025KB

Image Type: DDS

Image Size: 512x512



====

Step #3 - Move to Module Override folder



Move "worldmap_dmo001.dds" to .\\\\Addins\\\\dmo001\\\\module\\\\override\\\\toolsetepxort\\\\"



====

Step #4 - Create worldmaps.xls (xls --> gda)



a) Copy "C:Program Files\\\\Dragon Age\\\\tools\\\\source\\\\2da\\\\worldmaps.xls" to ".\\\\workspace\\\\worldmaps.xls"



B) Add row #9 as follows --->

______________________________________________________________________________________________

1 | ID | Label | NameStrRef | MAP | TargetWptTable | TargetWptTableID | INVALID |

|------|--------------|-----------------|---------------------------|-------------------------------------------|-------------------------|------------|

4 | 700 | Lorinthia | 106001 | worldmap_dmo001 | target_wps_worldmap_dmo001 | 1000021 | INVALID|

|------|--------------|-----------------|---------------------------|-------------------------------------------|-------------------------|------------|

note - using 'unique' numbering examples from "Map Tutorial"



c) insert worksheet tab "target_wps_worldmap_dmo001" following tab "map_pin_images" (or anywhere)



d) switch to tab "Target_wps_wow" and copy all (click on upper leftmost border cell, ctrl-c)



e) switch to tab "target_wps_worldmap_dmo001" and paste all (click on upper leftmost border cell, ctrl-v)



f) overwrite contents of tab "target_wps_worldmap_dmo001" as follows --->



_____________________________________________

1 | ID | SourLocation | dafl001d | daoa001d |

|----|---------------------|----------------------|----------------------|

3 | 0 | dafl001d | | daoa001d_start |

|----|---------------------|----------------------|----------------------|

4 | 1 | daoa001d | dafl001d_return | |

|----|--------------------|-----------------------|----------------------|





g) copy ".Dragon Age\\\\tools\\\\excelprocessor.exe" to ".\\\\workspace\\\\"



h) save spreadsheet and convert to .gda (right click, open with excelprocessor)



i) move output of excelprocessor:



"worldmaps.gda" to ".\\\\addins\\\\module\\\\override\\\\toolsetexport\\\\"

"target_wps_worldmap_dmo001.gda" to ".\\\\addins\\\\module\\\\override\\\\toolsetexport\\\\"



====

Step #5 create "M2DA_Base_dmo001.xls



a) Copy "C:Program Files\\\\Dragon Age\\\\tools\\\\source\\\\2da\\\\M2DA_Base.xls" to ".\\\\workspace\\\\M2DA_Base_dmo001.xls"



B) delete all non-header rows (unless adding to a previously customized M2DA_Base_* for this module - if so skip b )



c) add row as follows:



| 106001 | World Maps | worldmaps | **** |



d) save spreadsheet and convert to .gda (right click, open with excelprocessor)



e) move output of excelprocessor "worldmaps.gda" to ".\\\\addins\\\\module\\\\override\\\\toolsetexport\\\\"



f) move output of excelprocessor "target_wps_worldmap_dmo001.gda" to ".\\\\addins\\\\module\\\\override\\\\toolsetexport\\\\"



====

Step #6 Create Map & Set Pins in DAToolset



a) create map resource "world_map.map"



Resource name: "world_map"

Folder: \\\\dmo001\\\\

Module: Dark Alliances

Owner Module: Dark Alliances

State: NONE



B) in object inpsector select "Lorinthia" from "Map" drop down (map image from step 2 should be visible now)



Parent Map: (None)

Resource Name: world_map

Tag: worldmap_dmo001

Image Used: worldmap_dmo001

Map: Lorinthia



c) Add two Map Pins (keeping it small during diagnostics)



First Pin

---------

AreaTag: daoa001d

Initial State: Active

Locationx: 78

LocationY: 240

Name: Old Arena Ruins

NameRequiresTRanslation: False

Tag: dmo001_wmpin_daoa001d

Terrain Type: Highway

Tooltip: (blank)

TooltipRequiresTranslation: False

Unlocalized Name: Old Arena Ruins

Waypoint Override: (blank)

Image used: wm_ico_ruins

Pin Type: ruins

Second Pin

----------

AreaTag: dafl001d

Initial State: Active

Locationx: 108

LocationY: 198

Name: Foul Lake

NameRequiresTRanslation: False

Tag: dmo001_wmpin_dafl001d

Terrain Type: Forest

Tooltip: (blank)

TooltipRequiresTranslation: False

Unlocalized Name: Old Arena Ruins

Waypoint Override: (blank)

Image used: wm_ico_forest

Pin Type: forest



d) save map & "export without dependant resources"



====

Step #7 Create World map trigger in areas "daoa001d" and "dafl001d"



a) Create script "dmo001_fire_world_map"

Resource name: "dmo001_fire_world_map"

Folder: \\\\dmo001\\\\

Module: Dark Alliances

Owner Module: Dark Alliances

State: NONE



Body of script:

|

| #include "plt_dmo001_party_plot"

| #include "world_maps_h"

|

| void main()

| {

| SetLocalInt(GetArea(GetHero()), AREA_WORLD_MAP_ENABLED, TRUE);

| SetLocalInt(GetModule(), MODULE_WORLD_MAP_ENABLED, TRUE);

|

| WM_SetWorldMapGuiStatus();

| OpenPrimaryWorldMap();

|

| }

|



- save & export without dependant resources



B) Create conversation for "dmo001_worldmap_signpost"

Resource name: "dmo001_worldmap_signpost" (this will have a .dlg extension)



Folder: \\\\dmo001\\\\

Module: Dark Alliances

Owner Module: Dark Alliances

State: NONE



- Insert the following Lines:



[[OWNER]] Go to World Map?

Yes [END Dialogue]

No [END Dialogue]



- Highlight "Yes [END DIALOGUE]" and select the "Plots & Scripting Tab"

- Select Dropdown for Action Pane, Script (lower right)

- Navigate to "dmo001_fire_world_map" in \\\\dmo001\\\\ and select it

- save & export without dependant resources



c) duplicate "genip_signpost_2", save as "dmo001_worldmap_signpost"



Resource Name: dmo001_worldmap_signpost

Folder: \\\\dmo001\\\\

MOdule: Dark Alliances

Owner: Dark Alliances

State: None



d) edit "dmo001_worldmap_signpost" with object inspector as follows:



Appearance: Road Sign 2(Examinable)

Character: (none)

Comments: world map trigger

Conversation: dmo001_worldmap_signpost

Group: _PC

Name: Worldmap Signpost

NameRequiresTranslation: False

Plot: False

Popup Text: (blank)

PopupTextRequiresTranslation: False

Rank: INVALID

Resource Name: dmo001_worldmap_signpost

Script:

Tag: dmo001_worldmap_signpost

Team: -1

Treasure Category: INVALID

Variable 2da: var_placeable

Variables: ...

Auto Remove Key: false

Key Required: false

Key Tag: (blank)

Sound section --- all entries (No Sound)

Health: 1

Initial State: Active

Interactive: True

Inventory List: ...

Max Health: 0

Pick Lock Level: Auto Success

Trap Detection Difficulty: Auto Success

Trap Disarm Difficulty: Auto Success

- save & export without dependant resources



e) Open both areas (dafl001d & daoa001d):



- place "dmo001_signpost_worldmap" in reachable location in each area

- then save and export both areas



====

Step #8 Set the World Map in the module_core script



a) open "dmo001_module_core" in DAToolset



B) Add the following switch following "event ev = GetCurrentEvent();", and inside of "void main () {}"



|

| switch(GetEventType(ev))

| {

| case EVENT_TYPE_MODULE_START:

| {

|

| object oWorldMap = GetObjectByTag("worldmap_dmo001");

| WR_SetWorldMapPrimary(oWorldMap);

|

| break;

|

| }

| }

|



c) save & export



====

Step #9



a) Run Module to test for proper map image (handle travelling later, should not impact map image)



Results ---



- Little grey box in upper left hand corner of world_map book.

- Maps Pins are present & active



===== From here I continue to diagnose and will update this list as I learn my mistakes

===== Please Help...I figure this example, when working, could help folks use the map tutorial


#5
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
just realized I did not try the en_us part - checking that now...you do mean to rename the the image resource I created "worldmap_dmo001.dds" to "worldmap_dmo001_en-us.dds", right?

I'll report back after I try this...

Tried it - no luck...trying one more thing - adding .dds (with and without _en-us) to gui.erf (module override).

Modifié par RecklezzRogue, 13 mars 2010 - 12:20 .


#6
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
moved this over here:



http://social.biowar.../8/index/386541