Aller au contenu

Photo

World map in addin module


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

#1
Lord Mephisto

Lord Mephisto
  • Members
  • 43 messages
Has anyone of you made a working world map and tested it as a player in a module?

Using any tga-image within the toolset seems to work fine. Adding map pins and scripting the events seem easy according to the wiki pages.

However, inside the game as a player, I am unable to view the map itself. I can see the map pins I have made in the toolset, but the tga-image seen inside the toolset is not viewed within the "book area" usually displaying the Fereldan map.

I suspect the world map must be in a certain format, fitting inside the "book-area", but there is no information about this to be seen on the wiki, or this forum. And I am unable to find the maps used in the official campaign for comparison.

This might also be a problem with incorrectly converting xls-files to gda-files, but using the resourcebuid.exe utility produced the seemingly correct gda-files without any error messages. And why would then the correct information (tga-image) be displayed in the toolset?

#2
ITSSEXYTIME

ITSSEXYTIME
  • Members
  • 1 201 messages
Probably has to be .dds format. I believe the world map image itself is stored in the gui.erf located in your Dragon Age/packages/core/Data folder.



Also make sure your area has the Variable flag "world_map_enabled" set to 1.

#3
tkyu

tkyu
  • Members
  • 6 messages
excuse me, i want to know how to show my map in my own module... could you show me a simple example?

#4
Lord Mephisto

Lord Mephisto
  • Members
  • 43 messages

ITSSEXYTIME wrote...

Probably has to be .dds format. I believe the world map image itself is stored in the gui.erf located in your Dragon Age/packages/core/Data folder.

Also make sure your area has the Variable flag "world_map_enabled" set to 1.


Thanks, that is indeed worth checking out.

If I figure out how this is working, the wiki needs some additions...

#5
EJ42

EJ42
  • Members
  • 723 messages
I'm not sure what you mean. Did (http://social.biowar...hp/Map_tutorial) not cover your questions? Granted, I only briefly parsed over this, so I wouldn't know of any gotchas that one might run into.

#6
cstanish

cstanish
  • Members
  • 90 messages

EJ42 wrote...

I'm not sure what you mean. Did (http://social.biowar...hp/Map_tutorial) not cover your questions? Granted, I only briefly parsed over this, so I wouldn't know of any gotchas that one might run into.


I can't answer for the original poster, but I've followed the tutorial and when I click on the area transition that's supposed to bring me to my custom world map, nothing happens.  Also, when I open the map for the area I start in I have no option for clicking on the world map.  

I have only two pins on my world map, with areas and entry waypoints specified for each via the gda file.  I'm clearly missing some detail, probably in the scripting.  It would be great if the tutorial showed a copy of the entire script, rather than showing it one or two lines at a time.

#7
Nemorem

Nemorem
  • Members
  • 20 messages
Anyone solved this one? I'm having the exact same problem as the OP. I've tried assigning one of the official campaign images to the map in the toolset. That works fine in game. I've also tried extracting one of the maps from the official campaign, renaming it to the name of my custom map, and dropping it into my override. That does NOT work. Based on that, my guess is that it's an issue with the 2DAs. I've tried putting them into different override directories, but nothing seems to work.

#8
Bibdy

Bibdy
  • Members
  • 1 455 messages
I assume we're talking about a custom minimap in a stand-alone campaign? I've only got experience with adding markers to the existing campaign (and even that can be a huge pain in the ass, sometimes).

#9
Nemorem

Nemorem
  • Members
  • 20 messages

Bibdy wrote...

I assume we're talking about a custom minimap in a stand-alone campaign? I've only got experience with adding markers to the existing campaign (and even that can be a huge pain in the ass, sometimes).


Yeah, brand new world map for a standalone campaign, following the world map tutorial on the wiki. I can get my new map to appear in the toolset, but not in game. All I see are my map pins and a gray box in the upper-left corner. Initially I thought it could be something the game didn't like about the image format, but the fact that even the Bioware maps don't work for me when renamed suggests something different.

#10
Nemorem

Nemorem
  • Members
  • 20 messages
Ah, I forgot mention that I've tried both .tga and .dds formats, and the map doesn't show up in the toolset OR the game in .dds format. I can at least see the map in the toolset when it's in .tga format.

#11
ITSSEXYTIME

ITSSEXYTIME
  • Members
  • 1 201 messages
Are you guys packing it in your own module's gui.erf file?



What I did was copy an existing gui.erf and empty it out then put my .dds file in and placed it in my addin/module folder. (Or addin/core, I forget)



I didn't make a map but I had to do this for my DLC menu icon to work. I'm assuming the world map loads from the same spot.

#12
Nemorem

Nemorem
  • Members
  • 20 messages

ITSSEXYTIME wrote...

Are you guys packing it in your own module's gui.erf file?

What I did was copy an existing gui.erf and empty it out then put my .dds file in and placed it in my addin/module folder. (Or addin/core, I forget)

I didn't make a map but I had to do this for my DLC menu icon to work. I'm assuming the world map loads from the same spot.


I wasn't packing it in an .erf, but I gave it a shot. Same result unfortunately.

I also tried getting rid of the 2da overrides and instead just overriding the Ferelden world map. Again, this works fine for the toolset (as long as it's in .tga format). However, the game client simply displays the Ferelden world map, whether I put it in module/override or core/override. So, it looks like it's not a 2da issue after all. It seems like the client is simply ignoring the override.

Does anybody out there actually have a custom world map running? I'd just like to know if it's possible.

#13
Eshme

Eshme
  • Members
  • 756 messages
The Demo seems to have a custom world map, but it uses a original picture. But to set a new picture i assume you need to add to worldmaps 2da



http://social.biowar...Module_tutorial



Go to the section Placing area transitions and setting up the world map.

#14
Nemorem

Nemorem
  • Members
  • 20 messages
Yeah, I've done the scripting and the 2da edits. I can see the image in the toolset - which seems to indicate the 2da edits are correct. When I click an area transition, the game launches the map background with my map pins on top - which seems to indicate my scripting and map setup are correct. The game is just not reading my new map image from the override folder.



I suspect a bug here. That's why I'd like to hear if anyone else has it working before I spend more time banging my head against a brick wall.

#15
couchofsilistra

couchofsilistra
  • Members
  • 3 messages
I am having the same issue with the map. I built a world map for my own module and saved it as a .tga file so the tool set can see it but when the module is played, it does not show up. Its a small white square in the top left of the opened book. My pins are displayed correctly on the open book just no map under them. I tried the tools maps like wide open world and denerim, they work fine but I want my map displayed. While in game I can not get the world map icon to work. The area map comes up but the scroll icon for world map does not work, is there a scrip command for that to activate? I currently have to use a area transition placeable with a variable in slot PLC_AT_DEST_AREA_TAG as world_map. I looked for these maps on my hard drive and found no .dds or .tgs files from the game. I found the file gui.erf in the main game directories but could not find any files in my documents \\Dragon Age\\packages\\core\\data. How do you edit a .erf file to see if the maps are in there?

#16
couchofsilistra

couchofsilistra
  • Members
  • 3 messages
I tried to change the size of my map to larger ones and small ones, none work. Found on a web site that the map sizes were 833X593 for world map and others were 831X592, 800x570, 790x793 and even 940x734. None of these sizes worked for me. Its got to be a conversion issue some how that the toolset is not doing to our maps for the game to access them. Something is different form the toolset version 1.0.1008.0 than the ones that made the tutorial. plz some one help here. I hate having to set my modual in Fereldon because its the only map that will display, haha

#17
couchofsilistra

couchofsilistra
  • Members
  • 3 messages
How is this variable being used?

ITSSEXYTIME said: Also make sure your area has the Variable flag "world_map_enabled" set to 1.

Is this different than:

////////////////////////////////////////////////////////////////////////

// Sent by: The Engine

// When: placeable trigger needs to show a map.

////////////////////////////////////////////////////////////////////////

case EVENT_TYPE_TRANSITION_TO_WORLD_MAP:

{

// This displays the map to the player

SetWorldMapGuiStatus(WM_GUI_STATUS_USE);

OpenPrimaryWorldMap();

break;

I cant find variable"world_map_enabled" in the tool sets Functions, Variables or Constants directories on the far right side of the script editor. How does the main scripts use it?

#18
Nemorem

Nemorem
  • Members
  • 20 messages
To edit an .erf, just open it in the toolset with File->Open. You can add or extract files by right-clicking.



Can't help with anything else, unfortunately. I haven't made any progress on this, and since I haven't heard of anyone else getting it to work, I'm assuming for now that it's bugged.

#19
Eshme

Eshme
  • Members
  • 756 messages
I am uncertain, but does the game ignore TGA files? I mean doesnt it only read DDS files?

#20
Lory

Lory
  • Members
  • 3 messages
Hi

I'm trying to create a script to begin the worldmap transition by touching a placeable (door).......but obviously it doesn't work:





#include "placeable_h"

#include "log_h"

#include "wrappers_h"

#include "2da_constants_h"

#include "utility_h"

#include "events_h"



void main()

{

event ev = GetCurrentEvent();

int nEvent = GetEventType(ev);

int bEventHandled = FALSE;

switch (nEvent)

{

case EVENT_TYPE_USE:

{

object oUser = GetEventCreator(ev);

int bVariation = GetEventInteger(ev, 0);

object oMapId = GetObjectByTag("worldmap_tag");

WR_SetWorldMapPrimary(oMapId);

WR_SetWorldMapGuiStatus(WM_GUI_STATUS_USE);

OpenPrimaryWorldMap();

break;

}

case EVENT_TYPE_BEGIN_TRAVEL:

{

object oVillage = GetObjectByTag("area_tag");

WR_SetWorldMapLocationStatus(oVillage, WM_LOCATION_ACTIVE);

string sDusk = GetEventString(ev, 1);

string sStart_dusk = GetEventString(ev, 2);

SetLocalString(GetModule(), "area_tag", sDusk);

SetLocalString(GetModule(), "waypoint_tag", sStart_dusk);

WorldMapStartTravelling();

}

case EVENT_TYPE_WORLDMAP_PRETRANSITION:

{

string sArea = GetLocalString(GetModule(), "area_tag");

string sWP = GetLocalString(GetModule(), "waypoint_tag");

UT_DoAreaTransition(sArea, sWP);

break;

}



}

if (!bEventHandled)

{

HandleEvent(ev, RESOURCE_SCRIPT_PLACEABLE_CORE);

}

}



What's wrong in it?

Sorry but I'm a noob in scripting...help me! :-)

#21
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
On the topic of getting a custom world map image to show - I am still a victim of the grey box in the uppoer LH corner (unless I choose a single player map, like ferelden or denerim and then all is well - except it's the wrong picture of course). I have just found software from Nvida which is free - WTV - allows you to view DDS files - so I have learned the following:



I extracted "worldmap.dds" from "gui.erf" in "dragon age\\packages\\core\\data" and the format of the worldmap.dds (ferelden) is as follows:



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 campaign worldmap...digging into it...








#22
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
Lory - I have a script triggered by a placeable object as follows (it does bring up the world-map book, and show my waypoints, etc - but I still cannot get a custom map image to show - so take this with a grain of salt):



#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();



}



Without getting into all the Map Tutorial scripting I did, I also have the following in my module core script (ignore the chargen stuff - but that is a handy piece of code if you didn't know it):



void main()

{

event ev = GetCurrentEvent();

switch(GetEventType(ev))

{

case EVENT_TYPE_MODULE_START:

{

object oHero = GetHero();

PreloadCharGen();

StartCharGen(oHero,0,TRUE); // Imports Character from savefile - Notice the default parameter int nImportEnabled = FALSE



break;



}

}



switch(GetEventType(ev))

{

case EVENT_TYPE_MODULE_START:

{

object oWorldMap = GetObjectByTag("worldmap_dmo001");

WR_SetWorldMapPrimary(oWorldMap);



break;

}

}



switch(GetEventType(ev))

{

case EVENT_TYPE_TRANSITION_TO_WORLD_MAP:

{

SetWorldMapGuiStatus(WM_GUI_STATUS_USE);

OpenPrimaryWorldMap();



break;

}

}


#23
777lewis777

777lewis777
  • Members
  • 16 messages
well usind the demo module script I got my area transition to maps working. I used it as my main module script here is the script:

#include "events_h"
#include "global_objects_h"
#include "wrappers_h"
#include "log_h"
#include "utility_h"
void main()
{
    event ev = GetCurrentEvent();
    int nEventType = GetEventType(ev); //extract event type from current event
    int nEventHandled = FALSE; //keep track of whether the event has been handled
    switch(nEventType)
    {
         case EVENT_TYPE_MODULE_START:
        {
            //This sets a particular world map as being the current "primary" map.
            //We only have one map in this module so we can set it once here and not
            //need to worry about keeping track of it later.
            object oMapId = GetObjectByTag("aod_map");// aod_map is your map name
            WR_SetWorldMapPrimary(oMapId);
            //start character generation.
            PreloadCharGen();
            StartCharGen(GetHero(),0);
            break;
        }
        ////////////////////////////////////////////////////////////////////////
        // Sent by: The engine
        // When: The module loads from a save game. This event can fire more than
        //       once for a single module or game instance.
        ////////////////////////////////////////////////////////////////////////
        case EVENT_TYPE_MODULE_LOAD:
        {
            break;
        }
        ////////////////////////////////////////////////////////////////////////
        // Sent by: The engine
        // When: A player enters the module
        ////////////////////////////////////////////////////////////////////////
        case EVENT_TYPE_ENTER:
        {
            object oCreature = GetEventCreator(ev);
            break;
        }
        ////////////////////////////////////////////////////////////////////////
        // Sent by: The engine
        // When: the player clicks on a destination in the world map
        ////////////////////////////////////////////////////////////////////////
        case EVENT_TYPE_WORLD_MAP_USED:
        {
            int nFrom = GetEventInteger(ev, 0); // travel start location
            int nTo = GetEventInteger(ev, 1); // travel target location
            break;
        }
        ////////////////////////////////////////////////////////////////////////
        // Sent by: The engine
        // When: the player clicks on a destination in the world map
        ////////////////////////////////////////////////////////////////////////
        case EVENT_TYPE_BEGIN_TRAVEL:
        {
            string sSource = GetEventString(ev, 0); //area tag source location
            string sTarget = GetEventString(ev, 1); // area tag target location
            string sWPOverride = GetEventString(ev, 2); // waypoint tag override
            //if you want to do any special-case code or random encounter handling, insert it here
            if (sSource != sTarget)
            {
                //store target area's tag to a local module variable
                SetLocalString(GetModule(), "WM_STORED_AREA", sTarget);
                //store target waypoint tag
                SetLocalString(GetModule(), "WM_STORED_WP", sWPOverride);
                //initiate the map's travelling animation. The engine will
                //send EVENT_TYPE_WORLDMAP_PRETRANSITION once it's started.
                WorldMapStartTravelling();
            }
        }
        ////////////////////////////////////////////////////////////////////////
        // Sent by: The engine
        // When: the world map has begun its "travelling" animation
        ////////////////////////////////////////////////////////////////////////
        case EVENT_TYPE_WORLDMAP_PRETRANSITION:
        {
            //retrieve the target area tag we stored in EVENT_TYPE_BEGIN_TRAVEL
            string sArea = GetLocalString(GetModule(), "WM_STORED_AREA");
            //retrieve the target waypoint tag
            string sWP = GetLocalString(GetModule(), "WM_STORED_WP");
            //execute the area transition to that target.
            UT_DoAreaTransition(sArea, sWP);
            break;
        }
        ////////////////////////////////////////////////////////////////////////
        // Sent by: The engine
        // When: the world map has been called for, either via an area transition
        //       or via the player's GUI button
        ////////////////////////////////////////////////////////////////////////
        case EVENT_TYPE_TRANSITION_TO_WORLD_MAP:
        {
            //The world map's GUI status determines whether the player can use
            //it for travel by clicking on destination map pins, or whether it
            //only displays as an informational image.
            SetWorldMapGuiStatus(WM_GUI_STATUS_USE);
            //Opens the map currently set as the primary map. See EVENT_TYPE_MODULE_START
            //for the code where we set which map this is.
            OpenPrimaryWorldMap();
            break;
        }
    }
    if (!nEventHandled) //If this event wasn't handled by this script, let the core script try
    {
        HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
    }
}


Now I just need to get the map to come up when you push "n" I'm guessing that it has to do with my 2da files but hopefully this will help a few people.

#24
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages
I just got some advice on getting the map image to show - testing it out and will post later on - the person responding to my other post actually has it working (first direct confirmation I have had that it can be done) ;-)


#25
Qutayba

Qutayba
  • Members
  • 1 295 messages
Recklezz, that's good news, and I look forward to hearing your results. I happen to be working with the same issue. I get everything to work except the actual image. Script wise, all you need are those event intercepts in the module script (For begin_travel and pretransition). You can use an ordinary area transition placeable and designate the destination area as "world_map." You don't need to create an entirely new script per placeable. I'm curious to see how your experiment comes out, though I fear it will mean I'll have to shrink my map.