World map in addin module
#1
Posté 06 décembre 2009 - 03:03
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
Posté 06 décembre 2009 - 03:50
Also make sure your area has the Variable flag "world_map_enabled" set to 1.
#3
Posté 06 décembre 2009 - 04:02
#4
Posté 06 décembre 2009 - 05:07
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
Posté 09 décembre 2009 - 05:17
#6
Posté 14 décembre 2009 - 04:56
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
Posté 06 février 2010 - 12:02
#8
Posté 06 février 2010 - 02:36
#9
Posté 06 février 2010 - 03:05
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
Posté 06 février 2010 - 03:12
#11
Posté 06 février 2010 - 09:27
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
Posté 08 février 2010 - 03:53
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
Posté 08 février 2010 - 05:43
http://social.biowar...Module_tutorial
Go to the section Placing area transitions and setting up the world map.
#14
Posté 08 février 2010 - 04:35
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
Posté 13 février 2010 - 05:52
#16
Posté 13 février 2010 - 06:03
#17
Posté 13 février 2010 - 06:32
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
Posté 14 février 2010 - 01:26
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
Posté 14 février 2010 - 01:37
#20
Posté 04 mars 2010 - 10:59
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
Posté 09 mars 2010 - 12:16
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
Posté 09 mars 2010 - 12:22
#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
Posté 09 mars 2010 - 06:13
#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
Posté 09 mars 2010 - 06:54
#25
Posté 09 mars 2010 - 11:28





Retour en haut






