Addme.lua headaches (Solved)

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
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Addme.lua headaches (Solved)

Post by elfie »

Ok, so I know there was just a topic on this and I followed the instructions on the topic and have seriously tried everything I know how to and have waited as long as I could to come to ask for help but sadly I must. If anyone is familiar with my WIP: KOTOR Telos the mandalorian Wars, then you know I have been trying to add a new game mode recently. I have gotten that game mode localized so the new name shows up in the loadscreen, which is a plus, but it didn't show up in the Insant action menu like I set it to, it just shows up as XL, which was the default name. The description for the game mode didn't change either like it was supposed to. I also changed the addme.lua so the era name would change from Clone Wars to Mandalorian Wars, but sadly that didn't change either. And before anyone asks, yes I have the unofficial V3.0 patch. I thank everyone very much for helping me on my last topic, and I hope this will just be an easy error to fix. Here is my addme.lua:
Hidden/Spoiler:
[code]--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end




--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "TEL%s_%s",
era_g = 1,
era_c = 1,
mode_xl_g = 1,
mode_con_c = 1,
change = {
era_c = { name="Mandalorian Wars" },
mode_xl = { name="Headquarters", about="Headquarters Defend your headquarters while attempting to destroy your enemy's" },
},
}

mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("TEL","TELg_xl",4)
AddDownloadableContent("TEL","TELc_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\TEL\\data\\_LVL_PC\\core.lvl")
[/code]
Thanks again in advanced! :D
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Addme.lua headaches

Post by Deviss »

i don't understand, do you want add a new mode or era??
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: Addme.lua headaches

Post by [RDH]Zerted »

Do you have the v1.3 patch from Filefront (r117) or the one from the swbf1 pack (r83?)?
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Addme.lua headaches

Post by elfie »

@REX- No I want to localize it.
[RDH]Zerted wrote:Do you have the v1.3 patch from Filefront (r117) or the one from the swbf1 pack (r83?)?
The one from the SWBF1 pack. Why, is there a difference?
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: Addme.lua headaches

Post by [RDH]Zerted »

Yes, r83 doesn't support changing the era/mode names and descriptions, but r117 does. You can think of the revision numbers as version numbers. The final v1.3 patch version is 117, but the pack only has version 83.

Enough other mods/maps required the v1.3 changes, so I made a bunch of releases of the patch throughout the Summer instead of a single, finished release during the Fall.

Download and install the v1.3 patch r117 lite from filefront.
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Addme.lua headaches

Post by elfie »

thanks, zerted, now it works. And its ausome too, look:
Hidden/Spoiler:
Image
: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: Addme.lua headaches

Post by [RDH]Zerted »

good
Post Reply