How to rename an added era? [Solved]
Moderator: Moderators
-
- Sith
- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
How to rename an added era? [Solved]
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.
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.
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: How to rename an added era?
You change era names in your addme script using the change parameter thing:
Specifically:
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.
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]
Code: Select all
change = {
era_n = {
name="Mass Effect",
icon2="era_icon_n7"
},
},
-
- Sith
- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: How to rename an added era?
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.
Here is my addme.lua: http://textuploader.com/tqco
Some other names (e.g. republic commando) will be changed. The lines are by him.
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: How to rename an added era?
Code: Select all
change = {
era_s = {
name="Rising Sith"
},
},
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
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
-
- Sith
- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: How to rename an added era?
Hmm...It doesn`t work. Nothing has been changed.
Here is my new addme:
Sry If I ask stupid questions but is something written wrong..or Have I forgotten something?
Here is my new addme:
Hidden/Spoiler:
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: How to rename an added era?
You didn't remove that change bit that was floating around, the one being this one:
You need to remove this from that:
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"
},
},
Code: Select all
change = {
era_s = {
name="Rising Sith",
icon2="rs"
},
},
-
- Sith
- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: How to rename an added era?
Nothing...Now the change lines are removed but the era name hasn't been changed.
Addme:
Addme:
Hidden/Spoiler:
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: How to rename an added era?
You have the 1.3 patch installed, correct?
-
- Sith
- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: How to rename an added era?
Yes. Without it nothing would work.
Edit: The era works. Free cam and Fake Console too. But the name is not changed.
Edit: The era works. Free cam and Fake Console too. But the name is not changed.
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: How to rename an added era?
Try merging your AddNewGameModes functions for each map like so: (but keep the sp and mp versions separate of course)
Also, remove or comment out this:
From this:
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" },
},
}
)
Code: Select all
sp_n = table.getn(sp_missionselect_listbox_contents)
Code: Select all
--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: How to rename an added era?
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
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:
-
- Sith
- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: How to rename an added era?
Thanks a lot it works fine. Thanks marth and zerted for help.
- [RDH]Zerted
- Gametoast Staff
- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: How to rename an added era? [Solved]
For future reference, what fixed it?
-
- Sith
- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: How to rename an added era? [Solved]
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?
But one question I have: How to change the era icon? Or edit it?
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: How to rename an added era? [Solved]
Code: Select all
change = {
era_n = {
name="Mass Effect",
icon2="era_icon_n7"
},
},
-
- High General
- Posts: 837
- Joined: Mon Nov 04, 2013 10:37 am
- Projects :: Battlefront Halation
- xbox live or psn: none
- Location: Area 51
Re: How to rename an added era? [Solved]
Make sure you load it in the ingame.req. And don't forget to list the .req at the bottom of the addme.
-
- Sith
- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: How to rename an added era? [Solved]
Sry If I ask but how I load the icon in the ingame.req? And how I add the line in my addme.lua?
-
- High General
- Posts: 837
- Joined: Mon Nov 04, 2013 10:37 am
- Projects :: Battlefront Halation
- xbox live or psn: none
- Location: Area 51
Re: How to rename an added era? [Solved]
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:
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 :
In this part of the addme
Change the icon2 = "halo wars" to icon2 = "yourtganame"
munge with nothing selected.
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"
}
}
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")
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 = "!"}
},
}
)
munge with nothing selected.
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
-
- Sith
- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: How to rename an added era? [Solved]
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.
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.