Added new era, now dark times is messed up [Keep]
Moderator: Moderators
12 posts
• Page 1 of 1
Added new era, now dark times is messed up [Keep]
So I added a new era (Empire Era) to the stock Coruscant map. The map starts fine, but instead of Darktimes being the third mode it is +123 Clone Wars?! What is going on, it worked until I renamed my Era. It is still dark times on the other maps
my addme
my addme
Hidden/Spoiler:
- kinetosimpetus
-
- Posts: 2493
- Joined: Wed Mar 25, 2009 4:15 pm
- Projects :: A secret project
- Games I'm Playing :: Warframe STO
Re: added new era, now dark times is messed up
Mav used the "change" parameters in the Dark Times, "change" will only be used from one addme, so to make it work, you have to add the "change" parameters from The Dark Times to your addme as well.
Re: added new era, now dark times is messed up
oh ok like this:
deit no that didn't work, now an error occurs when i munge addme
- Code: Select all
AddNewGameModes(sp_missionselect_listbox_contents,
"cor1%s_%s",
{era_l = 1, era1=1, mode_con_l = 1, change = {
era_l = { name="Empire Era", icon2="exGCW_icon" },
},} change = {
era_1 = { name="Dark Times", icon2="darktimes_icon" },
},)
-- MULTIPLAYER
AddNewGameModes(mp_missionselect_listbox_contents,
"cor1%s_%s",
{era_l = 1, era1=1, mode_con_l = 1, change = {
era_l = { name="Empire Era", icon2="exGCW_icon" },
},} change = {
era_1 = { name="Dark Times", icon2="darktimes_icon" },
}, )
deit no that didn't work, now an error occurs when i munge addme
Re: added new era, now dark times is messed up
You're using the change parameter twice. You can only use it once.
Re: added new era, now dark times is messed up
so i can either have Empire era or Dark Times but not both 

Re: added new era, now dark times is messed up
No, you just combine the two change parameters into one. You're using it twice for the same map right now.
- Frisbeetarian
-
- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: added new era, now dark times is messed up
Though you can only use the change parameter once, I think you can have as many arguments in it as you want. For example:
- Code: Select all
change = {
era_l = { name="Empire Era", icon2="exGCW_icon" },
era_1 = { name="Dark Times", icon2="darktimes_icon" }
}
Re: added new era, now dark times is messed up
Frisbeetarian wrote:Though you can only use the change parameter once, I think you can have as many arguments in it as you want. For example:
- Code: Select all
change = {
era_l = { name="Empire Era", icon2="exGCW_icon" },
era_1 = { name="Dark Times", icon2="darktimes_icon" }
}
thank you! I'll try it:thumbs:
- [RDH]Zerted
-
- Posts: 2977
- Joined: Sun Feb 26, 2006 7:36 am
- Location: USA
- Projects :: Bos Wars AI - a RTS game
- Games I'm Playing :: SWBF2 and Bos Wars
- xbox live or psn: No gamertag set
Re: added new era, now dark times is messed up
You can't give one map two different names for the same era. There is no way to know which name is supposed to go with which game modes. It would be easiest to use a different era character.
v1.3 Tip: If you need to see what eras and game modes a map uses, double click on its name then check the debug log. The double clicking will print out the map's 'addme table' entries. You will see something like:
If you want to add a new custom era to a map that already has an era or game mode change, then you must merge the two change tables. Don't manually combine them. You don't know which other maps the person has installed and if they change the same map too. Instead, loop through each key/value pair in the tables recursively and combine them. I'm not going to write the code to do this right now. If someone needs it, let me know and I'll do it later. In fact, anyone changing something on an official map should do it this way. Not merging the change table will overwrite any changes from any earlier loaded map and any later loaded map not merging may overwrite your map's changes.
Edit: Oh, one era is the number one and the other is the letter L. Still you shouldn't manually add in the Dark Times changes. Instead, merge the change table.
v1.3 Tip: If you need to see what eras and game modes a map uses, double click on its name then check the debug log. The double clicking will print out the map's 'addme table' entries. You will see something like:
- Code: Select all
custom_AddMapNew()
custom_printTable(): table: 03CE122C
The key, value is: era_g 1
The key, value is: mode_wav_g 1
The key, value is: isModLevel 1
The key, value is: bSelected 1
The key is mapluafile, the formated value is: WAV<A>_<B>
custom_printTable(): Returning
custom_printTable(): table: 03CE6E4C
The key, value is: key mode_wav
The key, value is: subst wav
The key, value is: showstr modename.name.wav
The key, value is: descstr modename.description.wav
The key, value is: icon mode_icon_wav
custom_printTable(): Returning
If you want to add a new custom era to a map that already has an era or game mode change, then you must merge the two change tables. Don't manually combine them. You don't know which other maps the person has installed and if they change the same map too. Instead, loop through each key/value pair in the tables recursively and combine them. I'm not going to write the code to do this right now. If someone needs it, let me know and I'll do it later. In fact, anyone changing something on an official map should do it this way. Not merging the change table will overwrite any changes from any earlier loaded map and any later loaded map not merging may overwrite your map's changes.
Edit: Oh, one era is the number one and the other is the letter L. Still you shouldn't manually add in the Dark Times changes. Instead, merge the change table.
- Frisbeetarian
-
- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: added new era, now dark times is messed up
@Zerted
Well, if merging is the best way to do it, then by all means we need to know how to do it. Yes, we can use the way you described to see visually the keys, but how should we go about accessing those with Lua code?
Well, if merging is the best way to do it, then by all means we need to know how to do it. Yes, we can use the way you described to see visually the keys, but how should we go about accessing those with Lua code?
- [RDH]Zerted
-
- Posts: 2977
- Joined: Sun Feb 26, 2006 7:36 am
- Location: USA
- Projects :: Bos Wars AI - a RTS game
- Games I'm Playing :: SWBF2 and Bos Wars
- xbox live or psn: No gamertag set
Re: added new era, now dark times is messed up
The info that gets displayed is just one entry from the sp_missionselect_listbox_contents or the mp_missionselect_listbox_contents table. Those tables are a list of tables that contain the displayed key,value pairs.Frisbeetarian wrote:...how should we go about accessing those with Lua code?
For everyone adding new game modes to existing maps, you should replace the top section of your addme.lua with:
Hidden/Spoiler:
12 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests