Renaming an era

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
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Renaming an era

Post by SkinnyODST »

Does anyone know how I would rename an era?
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: Renaming an era

Post by thelegend »

From the 1.3 patch documentation(Change an Era's and Game Mode's Name or Icon or Description):
Hidden/Spoiler:
[code]

This tutorial will take you through the process changing the displayed label, icon, and description of a Conquest, G era map.

Backgound:
* The v1.3 patch supports over 38 game modes and 27 eras. If you want to add a new game mode or era, look at these predefined ones first. Checkout the change log for shell.lvl and common.lvl to see exactly what was added and is directly supported.
* This tutorial will assume you have created a basic LVLg_con map.

Basic Era Support
1) In addme/addme.lua, expand your sp_missionselect_listbox_contents table. Meaning, put each element on a line by itself so the table is easier to read, like this:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
}

2) Edit the table to add the 'change' table:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
change = {

},
}

3) We want to change the Conquest game mode, so add another table inside the new 'change' table. The name/index of the new table has to match the game mode key. For Conquest, the key is 'mode_con'. So:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
change = {
mode_con = { },
},
}

4) Add indexes for Conquest's new name ('name'), new icon ('icon'), and new description ('about'). You only need to add the indexes you want to change, but this tutorial changes all of them so:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
change = {
mode_con = { name="Candy Conquest", icon="mode_icon_holo", about="Drop off ten cubes of sugar at your ant hill (CP) to win. Watch out for human overlords, kids with magnifying glasses, other ant colonies, and sticky traps..." },
},
}

5) Munge your map. Since we only changed addme.lua, you don't need to check or select anything in VisualMunge. This will greatly decrease its munge time.
6) Start the game. In the map selection screens, your map's Conquest game mode checkbox will now be labeled 'Candy Conquest' and its icon and description will have changed too.
7) In addition to Conquest, we also wanted to chagne the era's name and icon (eras display no descriptions). The procedure is the same except we use the era's key instead of the game mode's key and an index of 'icon2' instead of 'icon'. Here is the completed example table:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
change = {
era_g = { name="Ant Wars", icon2="rvb_icon" },
mode_con = { name="Candy Conquest", icon="mode_icon_holo", about="Drop off ten cubes of sugar at your ant hill (CP) to win. Watch out for humans overlords, kids with magnifying glasses, other ant colonies, and sticky traps..." },
},
}

8) In your map's readme, make sure to list that the 'v1.3 patch r112+' is required to correctly view the game mode/era. If the player doesn't have the v1.3 patch, then the map's mission will still be displayed, but it will show the original values (i.e. 'Conquest' instead of 'Candy Conquest').
9) Thats it!

[/code]
User avatar
CT108
Rebel Sergeant
Rebel Sergeant
Posts: 186
Joined: Mon Aug 22, 2016 6:20 am
Projects :: None
Games I'm Playing :: CS2
xbox live or psn: Captain CT108
Location: Xanadu

Re: Renaming an era

Post by CT108 »

[only for the era's name]

Open editlocalize.bat
Go to : Common -> era -> cw (for the Clone Wars) / gcw for the galactic civil war
Rename your era !
Stealchief
Private Recruit
Posts: 17
Joined: Fri Nov 11, 2016 8:41 pm
Projects :: Order 151 The Fall Of Vader
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set
Location: Death Star Trash Compactor

Re: Renaming an era

Post by Stealchief »

How Can I Remove The GCW Era??
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: Renaming an era

Post by Marth8880 »

@Stealchief: Off-topic: Would you mind not capitalizing the first letter of every word in your sentences? It'll make your posts much more legible. :)

Anyway, in this part of your map's addme.lua file (found in data_ABC\addme):

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "ABC%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c  = 1,}
Remove era_g = 1, mode_con_g = 1, and any other references to mode_<modeID>_g (replacing <modeID> with the game mode's ID) so it looks something like this:

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "ABC%s_%s", era_c = 1, mode_con_c  = 1,}
Finally, in this part of the addme:

Code: Select all

AddDownloadableContent("ABC","ABCg_con",4)
AddDownloadableContent("ABC","ABCc_con",4)
Remove or comment out the lines that reference a mission script pertaining to the GCW era. In that example, the line to remove/comment out would be:

Code: Select all

AddDownloadableContent("ABC","ABCg_con",4)
Because of ABCg_con, which you know references the GCW era because of g after the map's code, ABC.
Last edited by Marth8880 on Tue Nov 22, 2016 1:34 am, edited 2 times in total.
Stealchief
Private Recruit
Posts: 17
Joined: Fri Nov 11, 2016 8:41 pm
Projects :: Order 151 The Fall Of Vader
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set
Location: Death Star Trash Compactor

Re: Renaming an era

Post by Stealchief »

Ok thanks!
Post Reply