How to rename an added era? [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

thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

How to rename an added era? [Solved]

Post by thelegend »

Hello Gametoast,
i searched for it but I didnt find anything. So I ask it here. Someone know how to rename the added era? I tried it with the editlocalize..I added to common/ eras the letter "s". You see common.era.s. I changed it to my Mod name. Munged with Localize checked but nothing happens.

I want to change the name common.era.s to my mod name. Thanks for any tips.
Last edited by thelegend on Sat Apr 19, 2014 5:10 pm, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How to rename an added era?

Post by Marth8880 »

You change era names in your addme script using the change parameter thing:

Code: Select all

	sp_n = table.getn(sp_missionselect_listbox_contents)
	sp_missionselect_listbox_contents[sp_n+1] = {
			red = 15, 
			green = 115, 
			blue = 255, 
			isModLevel = 1, 
			mapluafile = "ILD%s_%s", 
			era_n = 1, 
			mode_con_n = 1, 
			change = { 
				era_n = { 
					name="Mass Effect", 
					icon2="era_icon_n7" 
						}, 
					 }, 
				} 
	mp_n = table.getn(mp_missionselect_listbox_contents) 
	mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1] 
Specifically:

Code: Select all

			change = { 
				era_n = { 
					name="Mass Effect", 
					icon2="era_icon_n7" 
						}, 
					 }, 
You'd want to change era_n to your era's code thing. The syntax is era_<eraID> for eras and mode_<modeID> for modes (both without the <> brackets of course). If, for whatever reason, you do not also wish to change the era's icon (which is obviously what icon2 does), just remove that bit.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: How to rename an added era?

Post by thelegend »

Hm..it doesn´t work. I dont know why.

Here is my addme.lua: http://textuploader.com/tqco

Some other names (e.g. republic commando) will be changed. The lines are by him.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How to rename an added era?

Post by Marth8880 »

Code: Select all

change = { 
            era_s = { 
               name="Rising Sith"
                  }, 
                },
Why is that just sort of hanging out there? It shouldn't be there.

Also, you should replace this:

Code: Select all

--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
With this:

Code: Select all

--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)
-- recursively merges the second given table into the first given table
function MergeTables( mission, newFlags )
	--for each table entry,
	local array = type({})
	for key,value in pairs(newFlags) do      
		--check for nested tables
		if type(value) == array then
			--mission must have this key as a table too
			if type(mission[key]) ~= array then
				mission[key] = {}
			end
			--merge these two tables recursively
			MergeTables(mission[key], value)
		else
			--the key is a simple variable, so simply store it
			mission[key] = value
		end
	end
end

--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
			MergeTables(mission, newFlags)
		end
	end
end
As per this: http://www.gametoast.com/viewtopic.php?p=350615#p350615
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: How to rename an added era?

Post by thelegend »

Hmm...It doesn`t work. Nothing has been changed.
Here is my new addme:
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)
-- recursively merges the second given table into the first given table
function MergeTables( mission, newFlags )
--for each table entry,
local array = type({})
for key,value in pairs(newFlags) do
--check for nested tables
if type(value) == array then
--mission must have this key as a table too
if type(mission[key]) ~= array then
mission[key] = {}
end
--merge these two tables recursively
MergeTables(mission[key], value)
else
--the key is a simple variable, so simply store it
mission[key] = value
end
end
end

--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
MergeTables(mission, newFlags)
end
end
end




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

change = {
era_s = {
name="Rising Sith",
icon2="rs"
},
},

AddNewGameModes( sp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "dag1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "dag1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "dag1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "dag1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "dea1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "dea1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "dea1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "dea1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "end1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "end1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "end1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "end1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "fel1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "fel1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "fel1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "fel1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "geo1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "geo1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "geo1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "geo1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "hot1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "hot1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "hot1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "hot1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "kam1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "kam1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "kam1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "kam1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "kas2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "kas2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "kas2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "kas2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "mus1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "mus1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "mus1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "mus1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "myg1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "myg1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "myg1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "myg1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "nab2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "nab2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "nab2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "nab2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "pol1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "pol1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "pol1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "pol1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "tan1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tan1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "tan1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tan1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_eli_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_eli_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "tat3%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tat3%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "tat3%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tat3%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "uta1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "uta1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "uta1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "uta1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "yav1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "yav1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "yav1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "yav1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )



-- 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("cor1","cor1s_con",4)
AddDownloadableContent("cor1","cor1s_ctf",4)

AddDownloadableContent("dag1","dag1s_con",4)
AddDownloadableContent("dag1","dag1s_ctf",4)

AddDownloadableContent("dea1","dea1s_con",4)
AddDownloadableContent("dea1","dea1s_1flag",4)

AddDownloadableContent("end1","end1s_con",4)
AddDownloadableContent("end1","end1s_1flag",4)

AddDownloadableContent("fel1","fel1s_con",4)
AddDownloadableContent("fel1","fel1s_1flag",4)

AddDownloadableContent("dag1","geo1s_con",4)
AddDownloadableContent("dag1","geo1s_ctf",4)

AddDownloadableContent("hot1","hot1s_con",4)
AddDownloadableContent("hot1","hot1s_1flag",4)

AddDownloadableContent("kam1","kam1s_con",4)
AddDownloadableContent("kam1","kam1s_1flag",4)

AddDownloadableContent("kas2","kas2s_con",4)
AddDownloadableContent("kas2","kas2s_ctf",4)

AddDownloadableContent("mus1","mus1s_con",4)
AddDownloadableContent("mus1","mus1s_ctf",4)

AddDownloadableContent("myg1","myg1s_con",4)
AddDownloadableContent("myg1","myg1s_ctf",4)

AddDownloadableContent("nab2","nab2s_con",4)
AddDownloadableContent("nab2","nab2s_ctf",4)

AddDownloadableContent("pol1","pol1s_con",4)
AddDownloadableContent("pol1","pol1s_ctf",4)

AddDownloadableContent("tan1","tan1s_con",4)
AddDownloadableContent("tan1","tan1s_1flag",4)

AddDownloadableContent("tat2","tat2s_con",4)
AddDownloadableContent("tat2","tat2s_ctf",4)
AddDownloadableContent("tat2","tat2s_eli",4)

AddDownloadableContent("tat3","tat3s_con",4)
AddDownloadableContent("tat3","tat3s_1flag",4)

AddDownloadableContent("uta1","uta1s_con",4)
AddDownloadableContent("uta1","uta1s_1flag",4)

AddDownloadableContent("yav1","yav1s_con",4)
AddDownloadableContent("yav1","yav1s_1flag",4)


-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\RSM\\data\\_LVL_PC\\core.lvl")
Sry If I ask stupid questions but is something written wrong..or Have I forgotten something?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How to rename an added era?

Post by Marth8880 »

You didn't remove that change bit that was floating around, the one being this one:

Code: Select all

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

change = { 
era_s = { 
name="Rising Sith", 
icon2="rs" 
}, 
}, 
You need to remove this from that:

Code: Select all

change = { 
era_s = { 
name="Rising Sith", 
icon2="rs" 
}, 
}, 
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: How to rename an added era?

Post by thelegend »

Nothing...Now the change lines are removed but the era name hasn't been changed.
Addme:
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)
-- recursively merges the second given table into the first given table
function MergeTables( mission, newFlags )
--for each table entry,
local array = type({})
for key,value in pairs(newFlags) do
--check for nested tables
if type(value) == array then
--mission must have this key as a table too
if type(mission[key]) ~= array then
mission[key] = {}
end
--merge these two tables recursively
MergeTables(mission[key], value)
else
--the key is a simple variable, so simply store it
mission[key] = value
end
end
end

--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
MergeTables(mission, newFlags)
end
end
end




--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, "cor1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "dag1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "dag1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "dag1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "dag1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "dea1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "dea1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "dea1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "dea1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "end1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "end1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "end1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "end1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "fel1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "fel1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "fel1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "fel1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "geo1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "geo1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "geo1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "geo1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "hot1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "hot1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "hot1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "hot1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "kam1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "kam1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "kam1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "kam1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "kas2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "kas2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "kas2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "kas2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "mus1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "mus1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "mus1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "mus1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "myg1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "myg1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "myg1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "myg1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "nab2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "nab2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "nab2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "nab2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "pol1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "pol1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "pol1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "pol1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "tan1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tan1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "tan1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tan1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_eli_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tat2%s_%s", {era_s = 1, mode_eli_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "tat3%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tat3%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "tat3%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "tat3%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "uta1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "uta1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "uta1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "uta1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )

AddNewGameModes( sp_missionselect_listbox_contents, "yav1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "yav1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "yav1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "yav1%s_%s", {era_s = 1, mode_1flag_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )



-- 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("cor1","cor1s_con",4)
AddDownloadableContent("cor1","cor1s_ctf",4)

AddDownloadableContent("dag1","dag1s_con",4)
AddDownloadableContent("dag1","dag1s_ctf",4)

AddDownloadableContent("dea1","dea1s_con",4)
AddDownloadableContent("dea1","dea1s_1flag",4)

AddDownloadableContent("end1","end1s_con",4)
AddDownloadableContent("end1","end1s_1flag",4)

AddDownloadableContent("fel1","fel1s_con",4)
AddDownloadableContent("fel1","fel1s_1flag",4)

AddDownloadableContent("dag1","geo1s_con",4)
AddDownloadableContent("dag1","geo1s_ctf",4)

AddDownloadableContent("hot1","hot1s_con",4)
AddDownloadableContent("hot1","hot1s_1flag",4)

AddDownloadableContent("kam1","kam1s_con",4)
AddDownloadableContent("kam1","kam1s_1flag",4)

AddDownloadableContent("kas2","kas2s_con",4)
AddDownloadableContent("kas2","kas2s_ctf",4)

AddDownloadableContent("mus1","mus1s_con",4)
AddDownloadableContent("mus1","mus1s_ctf",4)

AddDownloadableContent("myg1","myg1s_con",4)
AddDownloadableContent("myg1","myg1s_ctf",4)

AddDownloadableContent("nab2","nab2s_con",4)
AddDownloadableContent("nab2","nab2s_ctf",4)

AddDownloadableContent("pol1","pol1s_con",4)
AddDownloadableContent("pol1","pol1s_ctf",4)

AddDownloadableContent("tan1","tan1s_con",4)
AddDownloadableContent("tan1","tan1s_1flag",4)

AddDownloadableContent("tat2","tat2s_con",4)
AddDownloadableContent("tat2","tat2s_ctf",4)
AddDownloadableContent("tat2","tat2s_eli",4)

AddDownloadableContent("tat3","tat3s_con",4)
AddDownloadableContent("tat3","tat3s_1flag",4)

AddDownloadableContent("uta1","uta1s_con",4)
AddDownloadableContent("uta1","uta1s_1flag",4)

AddDownloadableContent("yav1","yav1s_con",4)
AddDownloadableContent("yav1","yav1s_1flag",4)


-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\RSM\\data\\_LVL_PC\\core.lvl")
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How to rename an added era?

Post by Marth8880 »

You have the 1.3 patch installed, correct?
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: How to rename an added era?

Post by thelegend »

Yes. Without it nothing would work.

Edit: The era works. Free cam and Fake Console too. But the name is not changed.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How to rename an added era?

Post by Marth8880 »

Try merging your AddNewGameModes functions for each map like so: (but keep the sp and mp versions separate of course)

Code: Select all

	------ Stock maps begin ------
	------ SINGLEPLAYER ------

	AddNewGameModes( 
		sp_missionselect_listbox_contents, 
		"cor1%s_%s", 
		{
			era_n = 1, 
			mode_con_n = 1, 
			mode_ctf_n = 1, 
			change = { 
			era_n = { name="Mass Effect", icon2="era_icon_n7" },
			
			},
		}	
	)

	------ MULTIPLAYER ------

	AddNewGameModes( 
		mp_missionselect_listbox_contents, 
		"cor1%s_%s", 
		{
			era_n = 1, 
			mode_con_n = 1, 
			mode_ctf_n = 1, 
			change = { 
			era_n = { name="Mass Effect", icon2="era_icon_n7" },
			
			},
		}	
	)
Also, remove or comment out this:

Code: Select all

sp_n = table.getn(sp_missionselect_listbox_contents)
From this:

Code: Select all

--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
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: How to rename an added era?

Post by [RDH]Zerted »

You don't need to do what Marth8880 asked above. Reformatting the code shouldn't change anything. You never use sp_n or mp_n, so it's save to leave them there or remove them.

The addme looks ok to me. It's possible that you have an early v1.3 release or another map is clobbering your changes. Try the following steps:

1) Remove all the other mod maps (move them into another folder somewhere outside of SWBF2)
2) Reinstall the latest v1.3 (r129) but download it from here. You can install it on top of your existing installation. Link: http://www.mediafire.com/?pzznah47785jabb
3) Try the below addme. In your debug log, it should print "Map already exists. Merging in new keys and values" four times. If it doesn't work, double click on the map name and post your debug log.

Addme
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)
-- recursively merges the second given table into the first given table
function MergeTables( mission, newFlags )
--for each table entry,
local array = type({})
for key,value in pairs(newFlags) do
--check for nested tables
if type(value) == array then
--mission must have this key as a table too
if type(mission[key]) ~= array then
mission[key] = {}
end
--merge these two tables recursively
MergeTables(mission[key], value)
else
--the key is a simple variable, so simply store it
mission[key] = value
end
end
end

--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
print('Map already exists. Merging in new keys and values')
MergeTables(mission, newFlags)
end
end
end


--insert totally new maps here:
AddNewGameModes( sp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_con_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( sp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
AddNewGameModes( mp_missionselect_listbox_contents, "cor1%s_%s", {era_s = 1, mode_ctf_s = 1, change = { era_s ={ name="Rising Sith", icon2="rs" }}} )
print("Should have merged in the name changes by now. If not, then cor1's addme hasn't been processed yet")

-- 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("cor1","cor1s_con",4)
AddDownloadableContent("cor1","cor1s_ctf",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\RSM\\data\\_LVL_PC\\core.lvl")[/code]
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: How to rename an added era?

Post by thelegend »

Thanks a lot it works fine. Thanks marth and zerted for help.
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: How to rename an added era? [Solved]

Post by [RDH]Zerted »

For future reference, what fixed it?
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: How to rename an added era? [Solved]

Post by thelegend »

Now the era name works. On 1.0 and on 1.1 too.
But one question I have: How to change the era icon? Or edit it?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How to rename an added era? [Solved]

Post by Marth8880 »

Code: Select all

			change = { 
				era_n = { 
					name="Mass Effect", 
					icon2="era_icon_n7" 
						}, 
					 }, 
You specify the icon's TGA file with icon2 in the change section and you'd load the TGA in a lvl file somewhere else in the addme script.
JimmyAngler
High General
High General
Posts: 837
Joined: Mon Nov 04, 2013 10:37 am
Projects :: Battlefront Halation
Games I'm Playing :: SWBF 1-2-2015
xbox live or psn: none
Location: Area 51

Re: How to rename an added era? [Solved]

Post by JimmyAngler »

Make sure you load it in the ingame.req. And don't forget to list the .req at the bottom of the addme.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: How to rename an added era? [Solved]

Post by thelegend »

Sry If I ask but how I load the icon in the ingame.req? And how I add the line in my addme.lua?
JimmyAngler
High General
High General
Posts: 837
Joined: Mon Nov 04, 2013 10:37 am
Projects :: Battlefront Halation
Games I'm Playing :: SWBF 1-2-2015
xbox live or psn: none
Location: Area 51

Re: How to rename an added era? [Solved]

Post by JimmyAngler »

Put you .tga file in C:\BF2_ModTools\data_***\Common\interface.
Open the ingame.req here : C:\BF2_ModTools\data_***\Common
Add the name of the tga like so:

Code: Select all

ucft
{

   REQN
   {
      "texture"
              ".tga name"


   }
}
save and munge common.
Copy the ingame.lvl file from C:\BF2_ModTools\data_***\_LVL_PC and paste it into GameData\addon\***\data\_LVL_PC.

In the addme add this to the very bottom :

Code: Select all

ReadDataFile("..\\..\\addon\\***\\data\\_LVL_PC\\ingame.lvl")
In this part of the addme

Code: Select all

AddNewGameModes( 
	sp_missionselect_listbox_contents, 
	"pol1%s_%s", 
	{
	era_h = 1, 
	mode_ctf_h = 1, 
	change = { 
		era_h = { name="", icon2="halo_wars" },
		mode_ctf = {name="", about = "!"} 
			
},
}	
)
Change the icon2 = "halo wars" to icon2 = "yourtganame"
munge with nothing selected.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How to rename an added era? [Solved]

Post by Marth8880 »

thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: How to rename an added era? [Solved]

Post by thelegend »

THX. It works great and looks very nice. Ok. Now everything in this topic is solved.

Edit: Yes. In my maplist it looks nice. But If I start the map the game crashes while it loads. If I put my ingame.lvl out the map loads but the icon is not changed...I did exactly the same what Angler wrote me.
Post Reply