Is it clear what type of variable is being used to store this value? We should be able to determine a solid max/min value if we know how much information can be stored in it. Yes?
World map in addin module
Débuté par
Lord Mephisto
, déc. 06 2009 03:03
#51
Posté 25 mai 2010 - 01:39
#52
Posté 16 juin 2010 - 06:02
so. you can use the original map as any custom one. as long as you don't change the name.
Which leads me to believe one of two things
-There might be a model or a mesh somewhere that the engine references in order to place the texture, based on the name provided in the 2da file.
- The names are hardcoded into the gui, which is coded into the engine which we will have great difficulty modifying without the source.
sorry I couldn't be of more help.
Which leads me to believe one of two things
-There might be a model or a mesh somewhere that the engine references in order to place the texture, based on the name provided in the 2da file.
- The names are hardcoded into the gui, which is coded into the engine which we will have great difficulty modifying without the source.
sorry I couldn't be of more help.
#53
Posté 02 juillet 2010 - 01:40
Wow, I've been playing with custom maps for a standalone module the past few days and I can confirm this is far more challenging than it would seem (despite the tutorial). It's a snap to get a map to appear in the Toolset, however getting something to appear in the game can be an exercise in frustration to say the least! At this point, I can confirm that I've gotten *some* custom maps to appear in the game, however I've dismally failed at other attempts for no known reason (I follow the same steps).
At this point in my standalone module I have two custom maps fully working complete with pin and trails and appearing correctly both in the Toolset and in-game. Using the same steps I've attempted to add a third new map and now I'm running into the same brick wall as everyone else who's experiencing the little grey box when attempting to show the map in game.
Here's what I know *works*:
Following the suggestions in this thread to make a texture most certainly *works*. Even the new map I'm attempting to add has a valid texture because I can swap it with one of my existing custom maps and the texture will show properly in-game. I've been using the Photoshop plug-in to make my map textures thus far.
Defining a new map texture in worldmaps.xls by overwriting an existing single-player entry seems to work as well.
I've even added a new row to worldmaps.xls and had it appear in game.
The brick wall I'm running into now is getting a second new row added to worldmaps.xls, defining the map in the toolset and having it appear correctly in the game. To all appearances I have everything define exactly the same way as the first new row that I've added but I'm greeted with the little grey box everytime I attempt to set this map as primary in game and view it (as I mentioned I've confirmed the texture works properly).
In frustration I fired up ProcessExplorer on my machine and attempted to track what the engine tries to do when I display both a working and my non-working map. For the working map, I see the game engine load my <texture>_en-us.dds file when I display the map. However for my non working map what I discovered is that the game engine does not even *attempt* to load my map texture.
Sorry that's my long winded description of where I've gotten so far, if anyone has suggestions please fire them my way I'm eager to attempt anything
If I find out anything else I'll update the thread.
At this point in my standalone module I have two custom maps fully working complete with pin and trails and appearing correctly both in the Toolset and in-game. Using the same steps I've attempted to add a third new map and now I'm running into the same brick wall as everyone else who's experiencing the little grey box when attempting to show the map in game.
Here's what I know *works*:
Following the suggestions in this thread to make a texture most certainly *works*. Even the new map I'm attempting to add has a valid texture because I can swap it with one of my existing custom maps and the texture will show properly in-game. I've been using the Photoshop plug-in to make my map textures thus far.
Defining a new map texture in worldmaps.xls by overwriting an existing single-player entry seems to work as well.
I've even added a new row to worldmaps.xls and had it appear in game.
The brick wall I'm running into now is getting a second new row added to worldmaps.xls, defining the map in the toolset and having it appear correctly in the game. To all appearances I have everything define exactly the same way as the first new row that I've added but I'm greeted with the little grey box everytime I attempt to set this map as primary in game and view it (as I mentioned I've confirmed the texture works properly).
In frustration I fired up ProcessExplorer on my machine and attempted to track what the engine tries to do when I display both a working and my non-working map. For the working map, I see the game engine load my <texture>_en-us.dds file when I display the map. However for my non working map what I discovered is that the game engine does not even *attempt* to load my map texture.
Sorry that's my long winded description of where I've gotten so far, if anyone has suggestions please fire them my way I'm eager to attempt anything
#54
Posté 02 juillet 2010 - 05:00
As is usual with me, I figured out what I was doing wrong about thirty seconds after posting this! In my case, I had tagged my custom map with a tag name that I was using for another resource (an area). When I set the primary world map, I was loading the object by tag name, which was actually loading my area causing the map not to load properly. Now that I suffixed all my maps with "_map" my custom map content displays as expected!
Posting this in the hopes that someone else can learn from my dumb mistake
Posting this in the hopes that someone else can learn from my dumb mistake
Modifié par FramnkRulez, 02 juillet 2010 - 05:00 .
#55
Posté 05 juillet 2010 - 09:52
I have a solution for the gray box issue (at least, it fixed it for me).
Append _en-us to your filename. E.g. 'mymap_en-us.tga' with 'mymap' in worldmaps.xls. Presumably this only works in the english version. If you want to display it for other languages too, include copies suffixed as follows:
_cs-cz
_de-de
_en-us
_es-es
_fr-fr
_hu-hu
_it-it
_pl-pl
_ru-ru
EDIT: To clarify, you will need a version with no suffix if you want to view the map in the toolset. This file will not be used in the game itself, however.
Append _en-us to your filename. E.g. 'mymap_en-us.tga' with 'mymap' in worldmaps.xls. Presumably this only works in the english version. If you want to display it for other languages too, include copies suffixed as follows:
_cs-cz
_de-de
_en-us
_es-es
_fr-fr
_hu-hu
_it-it
_pl-pl
_ru-ru
EDIT: To clarify, you will need a version with no suffix if you want to view the map in the toolset. This file will not be used in the game itself, however.
Modifié par FergusM, 05 juillet 2010 - 11:48 .
#56
Posté 10 juillet 2010 - 04:09
@FergusM That makes perfect sense that the map would require localization. I look forward to having enough spare time to try it out for myself.
Good find!
Good find!
#57
Posté 23 juillet 2010 - 02:37
First off, hi all, I'm new to the forums.
Second, here are my experiences with this:
Following the tutorial at http://social.biowar...hp/Map_tutorial, I was able to get a custom map with properly functioning pins/trails/area transitions to appear ingame in a standalone mod by replacing the Ferelden map in the worldmaps 2DA. Unfortunately this caused two issues:
1) The map was appearing slightly off-center...slightly up and to the left on the open book UI, with its upper left corner right where people are reporting seeing the "grey box."
2) The custom map was replacing my Ferelden map in my single player campaign saves.
To fix problem 2, I created a new entry in the worldmaps 2DA for the custom map. With this method, I got working pins/trails/area transitions on an otherwise empty open book UI with the "grey box" in the upper left, which is where it seems like others are stuck. My single player campaign map is back to normal, at least.
I did read through this thread pretty carefully as this has been annoying me all day, but sorry if someone already mentioned this and I somehow missed it...there could be an issue with the area of transparency around the Ferelden map and/or the formatting of the Ferelden map vs. a custom map...if you look at the Ferelden map and a custom map in the toolset, you'll notice that the Ferelden map has about 25 pixels of grey on every side that appear transparent ingame, while a custom map will be flush against the top and left sides of the viewport. Ingame, the transparent area around the Ferelden map has its upper left corner right around where we're noticing the "grey box."
I tried to compensate for this by adding a similarly sized transparent border around my map, but the transparent section showed up as white in the toolset and remained flush against the viewport's edges. However it's getting late and I've been actively trying to troubleshoot this for several hours straight now so that could have been a photoshop fail on my part =/
It may be worth noting that I've been working only with .tgas and have not used a .dds at all on this.
I'm interested in any updates on this.
Following the tutorial at http://social.biowar...hp/Map_tutorial, I was able to get a custom map with properly functioning pins/trails/area transitions to appear ingame in a standalone mod by replacing the Ferelden map in the worldmaps 2DA. Unfortunately this caused two issues:
1) The map was appearing slightly off-center...slightly up and to the left on the open book UI, with its upper left corner right where people are reporting seeing the "grey box."
2) The custom map was replacing my Ferelden map in my single player campaign saves.
To fix problem 2, I created a new entry in the worldmaps 2DA for the custom map. With this method, I got working pins/trails/area transitions on an otherwise empty open book UI with the "grey box" in the upper left, which is where it seems like others are stuck. My single player campaign map is back to normal, at least.
I did read through this thread pretty carefully as this has been annoying me all day, but sorry if someone already mentioned this and I somehow missed it...there could be an issue with the area of transparency around the Ferelden map and/or the formatting of the Ferelden map vs. a custom map...if you look at the Ferelden map and a custom map in the toolset, you'll notice that the Ferelden map has about 25 pixels of grey on every side that appear transparent ingame, while a custom map will be flush against the top and left sides of the viewport. Ingame, the transparent area around the Ferelden map has its upper left corner right around where we're noticing the "grey box."
I tried to compensate for this by adding a similarly sized transparent border around my map, but the transparent section showed up as white in the toolset and remained flush against the viewport's edges. However it's getting late and I've been actively trying to troubleshoot this for several hours straight now so that could have been a photoshop fail on my part =/
It may be worth noting that I've been working only with .tgas and have not used a .dds at all on this.
I'm interested in any updates on this.
Modifié par Lord of Fangs, 23 juillet 2010 - 02:44 .
#58
Posté 23 octobre 2010 - 11:29
Any word on LGB...? This is one of the last bits of functionality I need, so very keen to hear if anyone has a solution
#59
Posté 23 octobre 2010 - 07:07
Modifié par Gisle Aune, 24 octobre 2010 - 09:16 .
#60
Posté 23 octobre 2010 - 07:12
Hey guys, are you creating an add-in to the single player or a standalone module?
Did you also check and make sure that your world map 2da ids were less than 255?
Did you also check and make sure that your world map 2da ids were less than 255?
#61
Posté 23 octobre 2010 - 09:13
Hi TmelordDC,
Thanks for the reply. I am creating a standalone. My world map 2da ids are less than 255 (now).
I still got lgb. I am going to follow the tutorial again as it has been a while, just in case I have made a stupid mistake.
Thanks for the reply. I am creating a standalone. My world map 2da ids are less than 255 (now).
I still got lgb. I am going to follow the tutorial again as it has been a while, just in case I have made a stupid mistake.
#62
Posté 23 octobre 2010 - 10:55
I'll try to put together a very basic module that has a transition to world map available so you can look at it. Possibly later today and if not, by tomorrow afternoon.
#63
Posté 23 octobre 2010 - 11:20
Having just implemented this yesterday, I followed the steps and still ran into the little grey box error. But I managed to fix it.
My issue was that I had not given my world map a tag, thus when I was trying set it as the default world map using WR_SetWorldMapPrimary(), I wasn't actually giving that function a valid object. It's actually a fairly common sense thing once you think about it, but sometimes I can end up slightly switching my brain off when I'm following a step by step tutorial.
Also, unlike most other objects in the toolset, the toolset does not automatically assign maps a tag which is the same as their resource name. It doesn't give them a tag at all.
My issue was that I had not given my world map a tag, thus when I was trying set it as the default world map using WR_SetWorldMapPrimary(), I wasn't actually giving that function a valid object. It's actually a fairly common sense thing once you think about it, but sometimes I can end up slightly switching my brain off when I'm following a step by step tutorial.
Also, unlike most other objects in the toolset, the toolset does not automatically assign maps a tag which is the same as their resource name. It doesn't give them a tag at all.
#64
Posté 24 octobre 2010 - 12:11
Thanks Timelord that would be really helpful. I have gone back through the tute and cannot see any place where I have gone wrong.
Thanks Amstrad, I checked and my maps all have tags "world_map" which is being called set in the module script, but yeah a bit annoying how it assigns for most other resources hey.
My module script would not compile without the correct header files included would it? I only have...
#include "events_h"
#include "sys_rewards_h"
#include "global_objects_h"
I don't need to include wrappers do I as I am using wr function to set the map? Didn't think so, but I am out of options as to what is going on lol.
Incidentally, my pins appear so I think it is setting the correct resource, but I can't use them to travel?
Thanks again guys
Thanks Amstrad, I checked and my maps all have tags "world_map" which is being called set in the module script, but yeah a bit annoying how it assigns for most other resources hey.
My module script would not compile without the correct header files included would it? I only have...
#include "events_h"
#include "sys_rewards_h"
#include "global_objects_h"
I don't need to include wrappers do I as I am using wr function to set the map? Didn't think so, but I am out of options as to what is going on lol.
Incidentally, my pins appear so I think it is setting the correct resource, but I can't use them to travel?
Thanks again guys
#65
Posté 24 octobre 2010 - 02:48
If you've got multiple maps, then you'll need to assign them different tags otherwise you'll get unreliable results.
You will most definitely need to include wrappers_h - that's where the WR_SetWorldMapPrimary is defined, so the script won't compile if you don't include it. If you're modifying the module script, you'll likely need "events_h" and "ui_h" as well, otherwise there will almost certainly be other functions that won't be defined.
You will most definitely need to include wrappers_h - that's where the WR_SetWorldMapPrimary is defined, so the script won't compile if you don't include it. If you're modifying the module script, you'll likely need "events_h" and "ui_h" as well, otherwise there will almost certainly be other functions that won't be defined.
#66
Posté 24 octobre 2010 - 03:29
Thanks Amstrad, both my maps both have separate tags.
It was always compling without wrappers before, just thought it was odd not to have it there. Thanks for that. I complied again with wrappers and ui_h but no difference. Pins are there but cant be used to travel. It does recognise the one where the player is currently though.
Here is my module override if you want to take a look.
I am not sure if the WR_SetWorldMapPrimary(GetObjectByTag("world_map")); Goes in the module start event?
void main()
{
// keep track of whether the event has been handled
int nEventHandled = FALSE;
event ev = GetCurrentEvent();
switch(GetEventType(ev))
{
case EVENT_TYPE_MODULE_START:
{
//sets worldmap. Belongs here?
WR_SetWorldMapPrimary(GetObjectByTag("world_map"));
// preloads resources needed for character generation
PreloadCharGen();
// initiates character generation
StartCharGen(GetHero(),0,1);
//object oPC = GetHero();
// int nXP = RW_GetXPNeededForLevel(34) - GetExperience(oPC);
//RewardXPParty(nXP, XP_TYPE_PLOT, oPC);
//object oHero = GetHero();
//object oCreature = GetHero();
//SetCreatureProperty(oCreature, PROPERTY_SIMPLE_LEVEL, 34.0);
//SetCreatureProperty(oCreature, PROPERTY_SIMPLE_EXPERIENCE, 1.0);
// auto-level the player to level 10
//RewardXP(oHero, RW_GetXPNeededForLevel(34), FALSE, FALSE);
//SetAutoLevelUp(oHero, FORCE_AUTOLEVEL);
break;
}
case EVENT_TYPE_MODULE_GETCHARSTAGE:
{
// Overlay the existing stage with my stage
// "my_char_stage" is the resource name of the overlay area
// "partypicker" is the name of the default GDA
SetPartyPickerStage("rott_char_stage", "partypickerss");
break;
}
case EVENT_TYPE_PARTYMEMBER_ADDED:
{
object oFollower = GetEventObject(ev, 0);
SetLocalInt(oFollower, CREATURE_REWARD_FLAGS, 0); //Allows the follower to gain XP
AddCommand(oFollower, CommandJumpToLocation(GetLocation(GetHero()))); //Ensures follower appears at PC's location.
SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE); //Adds follower to the active party
break;
}
case EVENT_TYPE_CHARGEN_END:
{
object oPC = GetHero();
int nXP = RW_GetXPNeededForLevel(34) - GetExperience(oPC);
RewardXPParty(nXP, XP_TYPE_PLOT, oPC);
}
case EVENT_TYPE_TRANSITION_TO_WORLD_MAP:
{
//sets worldmap. Belongs here?
WR_SetWorldMapPrimary(GetObjectByTag("world_map"));
SetWorldMapGuiStatus(WM_GUI_STATUS_USE);
OpenPrimaryWorldMap();
break;
}
}
// if this event wasn't handled by this script fall through to the core script
if(!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
}
}
It was always compling without wrappers before, just thought it was odd not to have it there. Thanks for that. I complied again with wrappers and ui_h but no difference. Pins are there but cant be used to travel. It does recognise the one where the player is currently though.
Here is my module override if you want to take a look.
I am not sure if the WR_SetWorldMapPrimary(GetObjectByTag("world_map")); Goes in the module start event?
void main()
{
// keep track of whether the event has been handled
int nEventHandled = FALSE;
event ev = GetCurrentEvent();
switch(GetEventType(ev))
{
case EVENT_TYPE_MODULE_START:
{
//sets worldmap. Belongs here?
WR_SetWorldMapPrimary(GetObjectByTag("world_map"));
// preloads resources needed for character generation
PreloadCharGen();
// initiates character generation
StartCharGen(GetHero(),0,1);
//object oPC = GetHero();
// int nXP = RW_GetXPNeededForLevel(34) - GetExperience(oPC);
//RewardXPParty(nXP, XP_TYPE_PLOT, oPC);
//object oHero = GetHero();
//object oCreature = GetHero();
//SetCreatureProperty(oCreature, PROPERTY_SIMPLE_LEVEL, 34.0);
//SetCreatureProperty(oCreature, PROPERTY_SIMPLE_EXPERIENCE, 1.0);
// auto-level the player to level 10
//RewardXP(oHero, RW_GetXPNeededForLevel(34), FALSE, FALSE);
//SetAutoLevelUp(oHero, FORCE_AUTOLEVEL);
break;
}
case EVENT_TYPE_MODULE_GETCHARSTAGE:
{
// Overlay the existing stage with my stage
// "my_char_stage" is the resource name of the overlay area
// "partypicker" is the name of the default GDA
SetPartyPickerStage("rott_char_stage", "partypickerss");
break;
}
case EVENT_TYPE_PARTYMEMBER_ADDED:
{
object oFollower = GetEventObject(ev, 0);
SetLocalInt(oFollower, CREATURE_REWARD_FLAGS, 0); //Allows the follower to gain XP
AddCommand(oFollower, CommandJumpToLocation(GetLocation(GetHero()))); //Ensures follower appears at PC's location.
SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE); //Adds follower to the active party
break;
}
case EVENT_TYPE_CHARGEN_END:
{
object oPC = GetHero();
int nXP = RW_GetXPNeededForLevel(34) - GetExperience(oPC);
RewardXPParty(nXP, XP_TYPE_PLOT, oPC);
}
case EVENT_TYPE_TRANSITION_TO_WORLD_MAP:
{
//sets worldmap. Belongs here?
WR_SetWorldMapPrimary(GetObjectByTag("world_map"));
SetWorldMapGuiStatus(WM_GUI_STATUS_USE);
OpenPrimaryWorldMap();
break;
}
}
// if this event wasn't handled by this script fall through to the core script
if(!nEventHandled)
{
HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
}
}
#67
Posté 24 octobre 2010 - 03:44
As long as it compiles, should be fine. Actually, those three includes you had initially are enough since sys_rewards_h references wrappers at some level 
Your module scripts also looks ok to me. Setting the primary world map can be done any time but I recommended doing that in MODULE_START so that if an unhandled or unforeseen event triggers that, it is still handled properly.
Your module scripts also looks ok to me. Setting the primary world map can be done any time but I recommended doing that in MODULE_START so that if an unhandled or unforeseen event triggers that, it is still handled properly.
#68
Posté 24 octobre 2010 - 03:47
Great thanks, I am sure there will be some way to get it going eventually.
#69
Posté 12 avril 2011 - 04:58
Anyone figure this out? I am having the same problem with the LGB.
- I'm using TGAs.
- I've tried adding a localized file "_en-us"
- Added an alpha channel so it has a 30 pix border
- Set the map Id to below 255.
So far I can only get custom maps to show up if I use the in-game images.
[EDIT]SOLVED: Looks like the the game only displays DDS file for world maps, but the toolset can display TGAs as well, so that confused me.
- I'm using TGAs.
- I've tried adding a localized file "_en-us"
- Added an alpha channel so it has a 30 pix border
- Set the map Id to below 255.
So far I can only get custom maps to show up if I use the in-game images.
[EDIT]SOLVED: Looks like the the game only displays DDS file for world maps, but the toolset can display TGAs as well, so that confused me.
Modifié par Obadiah, 13 avril 2011 - 01:48 .





Retour en haut






