Aller au contenu

Photo

World map in addin module


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

#26
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
i am still at the office - so if you care to try this out here it is (from Nezroy responding to my other thread on this topic):



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).


#27
Qutayba

Qutayba
  • Members
  • 1 295 messages
OK, I've shrunk my map to within the dimensions you mention on the previous page. I've tried it in TGA and DDS formats with my filename, filename_en-us, and renaming it worldmap_en-us. It's still not showing up in game. I'll be interested to see if you have better luck.

#28
Craig Graff

Craig Graff
  • Members
  • 608 messages
I haven't had a chance to read through this or follow the links, but has anyone tried making additions to the worldmaps worksheet of worldmaps.xls?

#29
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
I did try that - still had the grey box...unfortunately, I did something silly last night and can no longer connect to my DB (wine and programming....bad combo....). Once I get past that, I am going transcribe the steps I took from the start (painstaking notes) - hopefully with a solution, but if not, in the form of a question ;-)



I have carefully followed every form of guidance out there...with the exception of this last advice I posted before Qutayba (just before yours). While Qutayba did not have any luck with same - I think I am close and will report results as soon as I am able....dang 'can't connect to db' issue...


#30
Qutayba

Qutayba
  • Members
  • 1 295 messages
In my case, yes, the 2das were the first thing I did in the process. The map image shows up fine in the toolset (both as tga and dds), so the 2da's are being read correctly. The map pins show up in game, and they also function correctly as area transitions, so the scripts seem to be in order. The only thing that doesn't work in game is the background image of the map (it gives us Denerim instead). Are we barking up the right tree thinking it has to do with the formatting of the image itself?

#31
Qutayba

Qutayba
  • Members
  • 1 295 messages
Hmm. Interesting. On a hunch I started playing around with the ID numbers in the GDA's. I know in a lot of cases, numbers that are too high are sometimes not read by the engine. So I went into worldmaps.xls and changed my ID number from 770 to 77. Now in game, I don't get the Denerim background, but get a generic open book background, and this grey square in the corner Recklezz has been talking about (I didn't get a grey square on the Denerim map, I don't think: It's the same color grey as the blank space around the default maps. Significant?). The map pins are still there.



When I changed the ID number to 7, I still got the same results (the book image). So, I decided to make the ID 1 and change the GDA to a plain override 2DA (worldmaps without a suffix). [NOTE: If you try to duplicate this be sure to disassociate your map in the toolset from any map image first or the toolset will crash when you open the map]. This experiment ALSO resulted in the book background. I don't know if this is technically progress, but it seems significant that it went from a Denerim background to a book background when I changed the ID number to something beneath 100.

#32
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
ok - i have finally got my toolset working again...but...no module...ack - starting from scratch (well - importing scripts) and I will try setting up my world map first with all the steps I have compiled from various sources....then report the results (and the steps)



btw - the only time I saw Denerim, or Ferelden maps was when I changed the 'MAP' setting in the object viewer if my world map - so I did that on purpose for a test and it worked, with my waypoints. When I selected 'mymap' it is always the grey box in the upper left-hand corner....more to come...

#33
Lory

Lory
  • Members
  • 3 messages
Great! Thanks guys! I'll try them, see ya!"

I also see the gray square (beyond the other problems I had..) instead of the worldmap. I hope you will find a solution :-)

#34
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
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.tga
    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

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


#35
Qutayba

Qutayba
  • Members
  • 1 295 messages
I'm using Paint.net which can save files as TGA or DDS. I'm saving it as a DDS with A8R8G8B8 with no mipmap (I'm assuming it does the same thing as nvdxt - should I try nvdxt instead? And if so, how the heck does a clueless wonder like myself use it? At least with the Excel Processor you can drag and drop files on it.)



I think we've narrowed it down to two possibilities: the way the game is processing the GDA (in which case, the game is reading the GDA differently from the toolset, which is reading it correctly) or the way the game is processing the format of the image. At least the basic scripts and mechanics work.

#36
nezroy

nezroy
  • Members
  • 99 messages
Recklezz, why are you making an image that is 512x512? You should try with an image that is the same size as the original worldmap (don't have it on hand right now, but it's like 690x400 or something).

#37
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
UPDATE --- IT'S NOT THE IMAGE: 

- I just extracted worldmap_en-us.dds from the single player gui.erf 
- renamed it to worldmap_dmo001.dds & worldmap_dmo001_en-us.dds
- placed in my toolset export folder (and in the packages-core-overide to double check)
- I can see the ferelden image in the toolset (as I expected from swapping in the actual ferelden image)
- in the game I still have the LGB (little grey box).................

so - something else is wrong......next I am going to try to add my image to gui.erf (an override version)....

UPDATE --- GUI.ERF

- Added image file (dds) to gui.erf (in my toolsetexport folder)
- Still have LGB

Note - I know the map image is being loaded without being in gui.erf due to error message regarding duplicate filenames for my map image (dds) - this is because I had the resource in both the erf and by itself in the toolsexport folder...so we can rule that out too.


next I am going to tweak the ID numbers....(presently using map tutorial examples)


======================================================================================

Nezroy - i can't get NVDXT or other DDS Converters i tried (before your advice)  to convert a TGA that is not "a power 2 for height and width" - so like 512x512 or 1024x512, but I don't get 912x687 (definately 687 is not a power of 2). So, I went with 512x512 to keep it smallish and keep it square...How is this done (same dimensions as worldmap - see below??

ps - you just gave me and idea though - I am going to rename the DDS I pulled from the ERF to my mapname and see it if loads that image (which definately is compatible since it is in fact the Fereldan World Map) - if that works, then it's my image, if it doesn't work, then I've done something else wrong....process of elimination...will report back shortly.....

From my other post:

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-A8R8G8B8
Image Size: 912x687
File Size: 2447.4KB
Posted ImagePosted Image

Modifié par RecklezzRogue, 13 mars 2010 - 09:02 .


#38
Lory

Lory
  • Members
  • 3 messages
RecklezzRogue I saw your other topics about .TGA, DDS and Grey Little Box.

I can finally get the area-transition and the area-travelling working (thanks to your and 777lewis777's post), but I still see the little square instead of the world map :-(...

I also tried all possible convention from TGA to DDS with both the photoshop DDS plug-in and the nvdxt.exe without results. What you suggest to do?



I fear that the problem could be something linked to the NameStrRef (ID map) that I totally randomized because I'm not able to obtain them with the proper program as auggested by the wiki.



Hope in Craig Graff's intervention



Thank you for your attention, to all of you.

#39
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
I am guessing that the Bioware folks are pretty busy supporting awakening... :-\\



I have some more results, will post later...no luck though, just ruling things out.




#40
Miexelplix2009

Miexelplix2009
  • Members
  • 14 messages
RecklezzRogue,

I am having similar problmes, but I did not follow the exact method you did: mainly converting the tga file to a dds, and I used M2DA to combine my worldmap file with the games should they ever decide to modify the original worldmaps.xls file.
 
One thing I wanted to check to see if you had done is opening the yourmapname.map located in your addin's module//override//toolsetexport// directory and set the MAP_MAP_PARENT_RESREF to wide_open_world?  Also I assume that you used the string editor to add your map name? Only reason I ask is it looks like you used the wiki's #'s and I doubt that the number the string editor would generate would be the same as the demo one in the wiki.

I am not 100% sure if it should be set to that or something else for a custom map. I know it is a bug within the toolset that it removes this value whenever you edit your map. Although this didn't seem to make a difference for me on my custom map, it did when using the default world map. Figured it was worth a shot to ask...specially since my steps were slightly different than your.

If you ever do get it working, please post your findings!

Modifié par Miexelplix2009, 24 mars 2010 - 11:38 .


#41
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
Miex - I had been working on other aspects of the campaign, but I will try the two items you suggest and report back. Thanks for the additional tips - one of these days we will have an end to end procedure ;-)

#42
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
I will be getting back this in a couple of days - have been working on a specific area & scripting & ambient behaviour...has anyone had any successes or advice/steps I should add to the ' worldmap procedure' before picking this ball up again? The last thing - I have not yet tried: getting into the string editor, and, set MAP_MAP_PARENT_RESEF as per Miexelplix2009's advice a couple of posts up....


#43
Otomo Tetsuo

Otomo Tetsuo
  • Members
  • 11 messages
I have only been looking into this for the last two days, so forgive the suggestion if it has already been ruled out.
This sounds like a similar behavior to the bug reported here.
http://social.biowar...but_not_in_game

EDIT: I see that Qutayba has mentioned this topic already. Though perhaps if it were used in conjunction with your configuration above,  RecklezzRogue.

Modifié par Otomo Tetsuo, 18 avril 2010 - 09:11 .


#44
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
you know Otomo - I think that was on list of diagnostic steps now that you mention it, and somehow it slipped...thanks...I'll report results and update the procedure above....I am working on some other scripting stuff right now :-\\

#45
Qutayba

Qutayba
  • Members
  • 1 295 messages
Lowering the number actually caused the grey box problem for me. When it was over 100, I got the Denerim map - which isn't the map I wanted - but it's not the grey box.

#46
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages

Qutayba wrote...

Lowering the number actually caused the grey box problem for me. When it was over 100, I got the Denerim map - which isn't the map I wanted - but it's not the grey box.


rofl

#47
Qutayba

Qutayba
  • Members
  • 1 295 messages
Any luck, recklezz? I've started browsing projects and looking to see if they had custom maps in their screen shots. A few did, and I bugged the authors, but not one has succeeded in actually getting them to work right.

#48
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
I am almost back to it - I went full steam developing one area...with a fair amount going on...I thought I'd be back to the world map sooner, but let's just say I've been down the path event intercepts to get combat working right :-\\




#49
ethics213

ethics213
  • Members
  • 7 messages
Any found a solution to the little grey box?

#50
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
I

Otomo Tetsuo wrote...

I have only been looking into this
for the last two days, so forgive the suggestion if it has already been
ruled out.
This sounds like a similar behavior to the bug reported
here.
http://social.biowar...but_not_in_game

EDIT:
I see that Qutayba has mentioned this topic already. Though perhaps if
it were used in conjunction with your configuration above,
 RecklezzRogue.


Read through this - definitely seems to be related to the LGB issue...this is going to be messy to fix - has bioware acknowledged this as a bug? Any news on a fix? Tweaking my id's now to see what happens...

EDIT - well - I am now getting the toolset to crash everytime I try to open my map with id's below 65k...even though in the string editor the id's appear unused...

Modifié par RecklezzRogue, 22 mai 2010 - 08:41 .