New era localize and icon problem [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
Delta-1035
Sith Master
Sith Master
Posts: 2651
Joined: Mon Aug 04, 2008 10:32 am
Projects :: TOR GCWII GCW1035 BF1035
xbox live or psn: Johnny_Sciroppo
Location: Pizza Land

New era localize and icon problem [Solved]

Post by Delta-1035 »

Hello GT, I have added my era to endor but I don't know how to change the name and the icon. I read the docs of the 1.3 patch but I dont know where to add the lines on the addme.lua

This is my addme.lua, where I have to write and what to change the name and icon?
Hidden/Spoiler:
--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)

--add my modes to the singleplayer map selection screen

AddNewGameModes( sp_missionselect_listbox_contents, "end1%s_%s", {era_t = 1, mode_con_t = 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("end1","end1t_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\TOR\\data\\_LVL_PC\\core.lvl")
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: New era localize and icon problem

Post by THEWULFMAN »

Example.
Hidden/Spoiler:
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

ReadDataFile("..\\..\\addon\\TCW\\data\\_LVL_PC\\shell.lvl")


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


AddNewGameModes( sp_missionselect_listbox_contents, "ABC%s_%s", {era_w = 1, mode_con_w = 1, mode_eli_w = 1,change = {
era_w= { name="Star Wars: The Clone Wars", icon2="icon_tcw" },
},})

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("ABC","ABCw_con",4)


-- all done
newEntry = nil
n = nil

ReadDataFile("..\\..\\addon\\TCW\\data\\_LVL_PC\\core.lvl")
User avatar
Delta-1035
Sith Master
Sith Master
Posts: 2651
Joined: Mon Aug 04, 2008 10:32 am
Projects :: TOR GCWII GCW1035 BF1035
xbox live or psn: Johnny_Sciroppo
Location: Pizza Land

Re: New era localize and icon problem

Post by Delta-1035 »

Thanks a lot man, that worked fine. :D
Post Reply