Multiple custom eras Problem

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Multiple custom eras Problem

Post 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]
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Multiple custom eras Problem

Post by Maveritchell »

Did you add what Zerted mentioned in this post?:
http://www.gametoast.com/forums/viewtop ... 15#p350615
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Multiple custom eras Problem

Post 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.
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Multiple custom eras Problem

Post 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
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Multiple custom eras Problem

Post 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.
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Multiple custom eras Problem

Post 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!
Post Reply