Page 1 of 1

Multiple custom eras Problem

Posted: Tue Oct 13, 2009 4:01 pm
by Sky_216
K, I have a problem. I have two custom eras per map (Last Days and Dark Times), but only one shows up at a time (the other just shows up as "+123 Clone Wars or +123 Galactic Civil War). Even adding DT in with a seperate addme.lua didn't help. Anyone know if there's a way around this?

Here's an example of part of the addme.lua.
Hidden/Spoiler:
sp_n = table.getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[sp_n+1] = { red = 132, blue = 25, green = 255, isModLevel = 1, mapluafile = "AYT%s_%s",era_2 = 1, era_1 = 1, mode_con_2 = 1, mode_con_1 = 1,
change = {
era_2 = { name="Last Days", icon2="ldicon" },{
era_1 = { name="Dark Times", icon2="darktimes_icon" },},},}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

Re: Multiple custom eras Problem

Posted: Tue Oct 13, 2009 4:41 pm
by Maveritchell
Did you add what Zerted mentioned in this post?:
http://www.gametoast.com/forums/viewtop ... 15#p350615

Re: Multiple custom eras Problem

Posted: Tue Oct 13, 2009 5:25 pm
by [RDH]Zerted
He's not using AddNewGameModes() so adding that code won't change anything.

I believe the problem is the extra bracket:
era_2 = { name="Last Days", icon2="ldicon" },{
and don't forget to remove its closing bracket too.

Re: Multiple custom eras Problem

Posted: Tue Oct 13, 2009 7:31 pm
by Sky_216
I don't mind if I use AddNewGameModes or not, but I'll try yours first Zerted (simpler) and get back to you. :D

Re: Multiple custom eras Problem

Posted: Tue Oct 13, 2009 9:07 pm
by [RDH]Zerted
Wait, if the map already exists and you're just adding more missions to it, then you must use AddNewGameModes with my modifications. If not, you risk wiping out other people's missions they added.

Re: Multiple custom eras Problem

Posted: Wed Oct 14, 2009 3:27 am
by Sky_216
Hardly, they're all my maps anyway (therefore no-one else will be adding stuff to them). I just thought I might need 2 addme's for the two icons to work. Anyway you were right about the brackets, worked fine.
Wrong way round but meh, easily fixable:

Image


Thanks!