How do I add custom gamemodes to my map? [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
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

How do I add custom gamemodes to my map? [Solved]

Post by SkinnyODST »

I`ve got a bunch of LUA`s that I`ve made and customised so they`re like new gamemodes. However the way I`ve been accessing them is by adding them to my map as eras. I`m wondering how I can make a whole bunch of custom gamemodes appear in the instant action menu to replace the era system for my map. I don`t want to add in already existing ones like CTF, but more like altered Conquest and hunt modes (Like with different units, layers etc.) I basically just want to make new modes for my map that use these customised LUA`s and have different names and pictures. Like how in AQT`s maps such as Death Watch Bunker and Talay: Tak Base where they have one era but multiple different modes that each use different LUA`s, map layers and have different pictures and names.
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: How do I add custom gamemodes to my map?

Post by CT108 »

Here you go !

http://www.gametoast.com/viewtopic.php?f=27&t=12104

I know that's for the hunt gamemode but at the end of the tutorial it's wrote
This method holds true for all gamemodes so just replace "hunt" with another gamemode name and you're all set.
so I think it can help you :thumbs:
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: How do I add custom gamemodes to my map?

Post by SkinnyODST »

I did all that except for the layer part (Because by custom GameMode is using the conquest layer), but no new gamemodes show up
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: How do I add custom gamemodes to my map?

Post by CT108 »

SkinnyODST wrote:I did all that except for the layer part (Because by custom GameMode is using the conquest layer), but no new gamemodes show up
Maybe that something is missing in a req folder
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 do I add custom gamemodes to my map?

Post by Marth8880 »

SkinnyODST wrote:but no new gamemodes show up
We can't help you if you don't provide adequate context behind the issue. Where aren't your game modes showing up?
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: How do I add custom gamemodes to my map?

Post by SkinnyODST »

Marth8880 wrote:
SkinnyODST wrote:but no new gamemodes show up
We can't help you if you don't provide adequate context behind the issue. Where aren't your game modes showing up?
I meant in the Instant Action menu, there aren`t any new modes there

These are the things I added it into the addme,

mode_sls_w = 1,

AddDownloadableContent("CCC","CCCc_sls",4)

I have all necessary files for a new mode I made up (added it into mission.req, and made a CCCw_sls.req with the correct info in it)
There`s also a LUA called CCCw_sls in the scripts folder
ForceMaster
Lieutenant General
Lieutenant General
Posts: 737
Joined: Fri Aug 08, 2008 11:27 pm
Projects :: Tron The Grid
Games I'm Playing :: The best..SWBFII
xbox live or psn: No gamertag set
Location: C:\Program Files\ForceMaster\Bin\ForceMaster.exe

Re: How do I add custom gamemodes to my map?

Post by ForceMaster »

If I'm not wrong, you need the 1.3 patch to show new eras and game modes properly.

From the 1.3 patch docs:
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]
Hidden/Spoiler:
[code]
This tutorial will take you through the process of adding the 'y' era with a Conquest game mode to the 'LVL' map.

Basic Era Support
1) In addme/addme.lua, add "era_y = 1, " to the sp_missionselect_listbox_contents table. This tells the game to display the Y era checkbox when the map is selected in the selection screen.
2) In addme/addme.lua, add "mode_con_y = 1, " to the sp_missionselect_listbox_contents table. This tells the game to display the Conquest mode checkbox when the map is selected in the selection screen. The "_y" allows the game to know that this game mode corresponds to the Y era.
3)) As an example, this is the orginal listbox table line: sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "LVL%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c = 1, }
3)) this is the updated listbox table line: sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "LVL%s_%s", era_g = 1, era_c = 1, era_y = 1, mode_con_g = 1, mode_con_c = 1, mode_con_y = 1, }
4) In addme/addme.lua, add the line "AddDownloadableContent("LVL","LVLy_con",4)" before the "-- all done" comment
5) In Common/mission/, create the file "LVLy_con.req". This file name sort-of corresponds to the 'LVLy_con' in AddDownloadableContent() and the values entered into the listbox table.
6) In Common/mission/LVLy_con.req, put the following code. The code tells VisualMunge what is needed when building the map's lvls. The "script" section tells what additional scripts to include and the "config" section deals with the video configurations. The following code to put is:

ucft
{
REQN
{
"config"
"cor_movies"
}
REQN
{
"script"
"LVLy_con"
}
}

7) In Common/mission.req, add "LVLy_con" to the "lvl" section. This tells VistualMunge to include everything in our newly created Common/mission/LVLy_con file when munging the map's mission.lvl. Mission.lvl is where all of the map's game mode script files should end up.
8) In Common/scripts/LVL/, create the file "LVLy_con.lua" It is easiest do this by copying an exist Conquest script, such as LVLg_con.lua. If you don't copy the file, you will need to manually add in all the Conquest scripting details. This tutorial does not cover the finer parts of game mode scripting, but only what changes are needed for a custom era. Our new LVLy_con.lua is the script we referrenced a few steps ago in the "script"ing section of Common/mission/LVLy_con.req. Following through the reqs, this is the actual lua script file which will be munged into the map's mission.lvl.
9) Munge Common
10) Thats it. If you only want basic era support for the map you are done. If you open up SWBF2, your map will now display a Y era Conquest mode. If thats all you wanted, you can stop reading this tutorial right here -> |. However, if you want full era integeration there is still much to do...

Full Era Integeration
1) The parts that are missing from basic era support are custom side icons, custom CP icons, and custom side names. This advanced part of the tutorial will help you enable or add these features to your map. Step wise, it continues were the basic era support section left off.
2) In Common/scripts/LVL/LVLy_con.lua, add the line "SupportsCustomEraTeams = true" at the top of the file. This will tell the team selection screen to around the game's orginal design and use your custom team/side names instead.
3) In Common/scripts/LVL/LVLy_con.lua, add the line "CustomEraTeam2 = "Era Team 2"" right below the SupportsCustomEraTeams line. Replace 'Era Team 2' with the name of your second team's name.
4) In Common/scripts/LVL/LVLy_con.lua, add the line "CustomEraTeam1 = "Era Team 1"" right below the SupportsCustomEraTeams line. Replace 'Era Team 1' with the name of your first team's name.
5) In Common/scripts/LVL/LVLy_con.lua, take a close look at the 'SetupTeams' section. You will see something like:

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_rifleman",9, 25},

The little "all" is the real team name. According to the 'Battlefront2_scripting_system.doc' doc, SWBF2 has nine predefined team names (neutral, neu, alliance, all, empire, imp, republic, rep, cis). Everything else maps to locals. This is not truly the case as "Villains" is also predeinfed, but those that are predefined and those that aren't has never been fully researched (would you like to be the first?). The team name manages the game's references for the team's name, team's icon, team's CP icons, and the team's unit names.
6) Make note of your two team names. 'all' maps to 'alliance', 'imp' maps to 'imperial', 'rep' maps to 'republic', and 'cis' maps to 'CIS'. The team names are case-insenstive.
7) Create your CP holo icon meshes. You can start from scratch or build off of an existing one like Common/mshs/com_icon_cis.msh. If needed, don't forget to create the msh's .option file too.
8) The custom CP holo icons go in Common/mshs/. Depending on your team name mappings, each icon should have one of the following names: com_icon_alliance, com_icon_imperial, com_icon_republic, or com_icon_CIS. If your map is CTF based, you might also want to look into com_icon_swap.
9) Open Common/ingame.req and wipe everything out. We since are going to be creating a custom ingame.lvl for this map, we only want to override the elements which have been changed. If you try to include everything the game might crash, but you would also override any other ingame.lvl mods the user might have installed.
10) Put the following code in Common/ingame.req. Make sure to adjuest it for your team names. The example uses a SetupTeams section with 'all' and 'imp' team names:

ucft
{
REQN
{
"model"
"com_icon_alliance"
"com_icon_imperial"
}
}

11) Munge Common
12) In data_LVL/_LVL_PC, rename the new ingame.lvl to "y_con-ingame.lvl". The 'y_con' part stands for the Y era and game mode Conquest. The renaming is not required, but should be done if you want to override the icons with different icons in other era/game modes of your map.
13) In Common/scripts/LVL/LVLy_con.lua, add "ReadDataFile("dc:y_con-ingame.lvl")" right before the non-'dc:' version of the line. This tells the game to read your map's ingame.lvl before reading the default ingame.lvl. Since your ingame.lvl is read first, its CP icons will be the ones used.
14) You will need to remember to manually copy the munged data_LVL/_LVL_PC/y_con-ingame.lvl to your munged map's GameData/addon/LVL/data/_LVL_PC/ folder any time you need to create a new y_con-ingame.lvl. A 'normal' mod map does not have a custom ingame.lvl, so VisualMunge will not move it for you. Do that copy now, so you don't forget to later.
15) Rename Common/ingame.req to "y_con-ingame.req". This is so you always have a copy of the req that created the y_con-ingame.lvl. If you want to make a new y_con-ingame.lvl, rename that file back to "ingame.lvl". VisualMunge does not build custom named lvls by you just creating a differently named req file.
16) Test your map
[/code]
You can check the suported game modes here:
Hidden/Spoiler:
[code]
Added support for modder changable era names and icons
Added support for modder changable game mode names, icons, and descriptions
Truncates the MP and SP map lists if the 'mission checker' addon map detects over 499 missions (Note: should remove most FATAL missions, but won't get all if missions were added to any existing maps)
Attempts to load custom_gc_0.lvl through custom_gc_10.lvl (does file custom_gc_# for each found lvl)
Added support for 11 custom Galactic Conquests
Increased Galactic Conquest's debug output
Enabled the 'Versus' Galactic Conquest (might be unstable...)
Unlocked the 'Campaign List' button
Set the preview video for all the shipped maps to movies\pre-movie.mvs:preview-loop
Added ability to disable custom map colors by using the toggle file: AAA-v1.3patch\settings\noColors.txt
Changed the eli game mode showstr and string to 'modename.name.hero-assualt'
Changed the Diet Dr. Pepper game mode showstr to 'modename.name.spa-assualt'
Increased MP list's game mode filter display to show 15 elements
Increased MP list's era filter display to show 15 elements
Loads the Popup_Prompt script
Reads in custom strings from 'v1.3patch_strings.lvl'
Removed doing of non-PC scripts
Added crashing code to some possibly unused functions
Added support for custom map colors
Added cheatbox to MP map selection screen
Added cheatbox code: name:
Added cheatbox code: print:
Added support for map preview videos
Added Campaign maps to SP map selection screen
Game Mode checkboxes now uncheck by default
Era checkboxes now unchecked by default
Changed displayed era checkboxes to 5
Changed displayed game mode checkboxes to 14
Expanded game mode gui section to fix 12 checkboxes
Made slight layout changes to the map selection screens
Added game mode generation tables
Added era generation tables
Added support for game mode: tdm
Added support for game mode: xl
Added support for game mode: obj
Added support for game mode: uber
Added support for game mode: bf1
Added support for game mode: holo
Added support for game mode: ord66
Added support for game mode: dm
Added support for game mode: space
Added support for game mode: c1
Added support for game mode: c2
Added support for game mode: c3
Added support for game mode: c4
Added support for game mode: hctf
Added support for game mode: vhcon
Added support for game mode: vhtdm
Added support for game mode: vhctf
Added support for game mode: avh
Added support for game mode: lms
Added support for game mode: vh
Added support for game mode: race
Added support for game mode: koh
Added support for game mode: tdf
Added support for game mode: surv
Added support for game mode: rpg
Added support for game mode: wav
Added support for game mode: ctrl
Added support for game mode: seige
Added support for game mode: siege
Added support for game mode: jhu
Added support for game mode: wea
Added support for game mode: ins
Added support for era: a
Added support for era: b
Added support for era: d
Added support for era: e
Added support for era: f
Added support for era: h
Added support for era: i
Added support for era: j
Added support for era: k
Added support for era: l
Added support for era: m
Added support for era: n
Added support for era: o
Added support for era: p
Added support for era: q
Added support for era: r
Added support for era: s
Added support for era: t
Added support for era: u
Added support for era: v
Added support for era: w
Added support for era: x
Added support for era: y
Added support for era: z
Added support for era: 1
Added support for era: 2
Added mode icon: mode_icon_ins.tga
Added mode icon: mode_icon_c4.tga
Added mode icon: mode_icon_c3.tga
Added mode icon: mode_icon_c2.tga
Added mode icon: mode_icon_c1.tga
Added mode icon: mode_icon_avh.tga
Added mode icon: mode_icon_wav.tga
Added mode icon: mode_icon_survival.tga
Added mode icon: mode_icon_rpg.tga
Added mode icon: mode_icon_siege.tga
Added mode icon: mode_icon_vehicle.tga
Added mode icon: mode_icon_space.tga
Added mode icon: mode_icon_wea.tga
Added mode icon: mode_icon_jhu.tga
Added mode icon: mode_icon_tdf.tga
Added mode icon: mode_icon_hctf.tga
Added mode icon: mode_icon_race.tga
Added mode icon: mode_icon_koh.tga
Added mode icon: mode_icon_control.tga
Added mode icon: mode_icon_bf1.tga
Added mode icon: mode_icon_tdm.tga
Added mode icon: mode_icon_uber.tga
Added mode icon: mode_icon_vh.tga
Added mode icon: mode_icon_xtra.tga
Added mode icon: mode_icon_obj.tga
Added mode icon: mode_icon_dm.tga
Added mode icon: mode_icon_holo.tga
Added mode icon: mode_icon_ord66.tga
Added mode icon: mode_icon_lms.tga
Added mode icon: mode_icon_c.tga
Changed mode icon: mode_icon_XL.tga
Changed mode icon: mode_icon_eli.tga
Changed background image: iface_bgmeta_space.tga[/code]
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: How do I add custom gamemodes to my map?

Post by SkinnyODST »

ForceMaster wrote:If I'm not wrong, you need the 1.3 patch to show new eras and game modes properly.

From the 1.3 patch docs:
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]
Hidden/Spoiler:
[code]
This tutorial will take you through the process of adding the 'y' era with a Conquest game mode to the 'LVL' map.

Basic Era Support
1) In addme/addme.lua, add "era_y = 1, " to the sp_missionselect_listbox_contents table. This tells the game to display the Y era checkbox when the map is selected in the selection screen.
2) In addme/addme.lua, add "mode_con_y = 1, " to the sp_missionselect_listbox_contents table. This tells the game to display the Conquest mode checkbox when the map is selected in the selection screen. The "_y" allows the game to know that this game mode corresponds to the Y era.
3)) As an example, this is the orginal listbox table line: sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "LVL%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c = 1, }
3)) this is the updated listbox table line: sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "LVL%s_%s", era_g = 1, era_c = 1, era_y = 1, mode_con_g = 1, mode_con_c = 1, mode_con_y = 1, }
4) In addme/addme.lua, add the line "AddDownloadableContent("LVL","LVLy_con",4)" before the "-- all done" comment
5) In Common/mission/, create the file "LVLy_con.req". This file name sort-of corresponds to the 'LVLy_con' in AddDownloadableContent() and the values entered into the listbox table.
6) In Common/mission/LVLy_con.req, put the following code. The code tells VisualMunge what is needed when building the map's lvls. The "script" section tells what additional scripts to include and the "config" section deals with the video configurations. The following code to put is:

ucft
{
REQN
{
"config"
"cor_movies"
}
REQN
{
"script"
"LVLy_con"
}
}

7) In Common/mission.req, add "LVLy_con" to the "lvl" section. This tells VistualMunge to include everything in our newly created Common/mission/LVLy_con file when munging the map's mission.lvl. Mission.lvl is where all of the map's game mode script files should end up.
8) In Common/scripts/LVL/, create the file "LVLy_con.lua" It is easiest do this by copying an exist Conquest script, such as LVLg_con.lua. If you don't copy the file, you will need to manually add in all the Conquest scripting details. This tutorial does not cover the finer parts of game mode scripting, but only what changes are needed for a custom era. Our new LVLy_con.lua is the script we referrenced a few steps ago in the "script"ing section of Common/mission/LVLy_con.req. Following through the reqs, this is the actual lua script file which will be munged into the map's mission.lvl.
9) Munge Common
10) Thats it. If you only want basic era support for the map you are done. If you open up SWBF2, your map will now display a Y era Conquest mode. If thats all you wanted, you can stop reading this tutorial right here -> |. However, if you want full era integeration there is still much to do...

Full Era Integeration
1) The parts that are missing from basic era support are custom side icons, custom CP icons, and custom side names. This advanced part of the tutorial will help you enable or add these features to your map. Step wise, it continues were the basic era support section left off.
2) In Common/scripts/LVL/LVLy_con.lua, add the line "SupportsCustomEraTeams = true" at the top of the file. This will tell the team selection screen to around the game's orginal design and use your custom team/side names instead.
3) In Common/scripts/LVL/LVLy_con.lua, add the line "CustomEraTeam2 = "Era Team 2"" right below the SupportsCustomEraTeams line. Replace 'Era Team 2' with the name of your second team's name.
4) In Common/scripts/LVL/LVLy_con.lua, add the line "CustomEraTeam1 = "Era Team 1"" right below the SupportsCustomEraTeams line. Replace 'Era Team 1' with the name of your first team's name.
5) In Common/scripts/LVL/LVLy_con.lua, take a close look at the 'SetupTeams' section. You will see something like:

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_rifleman",9, 25},

The little "all" is the real team name. According to the 'Battlefront2_scripting_system.doc' doc, SWBF2 has nine predefined team names (neutral, neu, alliance, all, empire, imp, republic, rep, cis). Everything else maps to locals. This is not truly the case as "Villains" is also predeinfed, but those that are predefined and those that aren't has never been fully researched (would you like to be the first?). The team name manages the game's references for the team's name, team's icon, team's CP icons, and the team's unit names.
6) Make note of your two team names. 'all' maps to 'alliance', 'imp' maps to 'imperial', 'rep' maps to 'republic', and 'cis' maps to 'CIS'. The team names are case-insenstive.
7) Create your CP holo icon meshes. You can start from scratch or build off of an existing one like Common/mshs/com_icon_cis.msh. If needed, don't forget to create the msh's .option file too.
8) The custom CP holo icons go in Common/mshs/. Depending on your team name mappings, each icon should have one of the following names: com_icon_alliance, com_icon_imperial, com_icon_republic, or com_icon_CIS. If your map is CTF based, you might also want to look into com_icon_swap.
9) Open Common/ingame.req and wipe everything out. We since are going to be creating a custom ingame.lvl for this map, we only want to override the elements which have been changed. If you try to include everything the game might crash, but you would also override any other ingame.lvl mods the user might have installed.
10) Put the following code in Common/ingame.req. Make sure to adjuest it for your team names. The example uses a SetupTeams section with 'all' and 'imp' team names:

ucft
{
REQN
{
"model"
"com_icon_alliance"
"com_icon_imperial"
}
}

11) Munge Common
12) In data_LVL/_LVL_PC, rename the new ingame.lvl to "y_con-ingame.lvl". The 'y_con' part stands for the Y era and game mode Conquest. The renaming is not required, but should be done if you want to override the icons with different icons in other era/game modes of your map.
13) In Common/scripts/LVL/LVLy_con.lua, add "ReadDataFile("dc:y_con-ingame.lvl")" right before the non-'dc:' version of the line. This tells the game to read your map's ingame.lvl before reading the default ingame.lvl. Since your ingame.lvl is read first, its CP icons will be the ones used.
14) You will need to remember to manually copy the munged data_LVL/_LVL_PC/y_con-ingame.lvl to your munged map's GameData/addon/LVL/data/_LVL_PC/ folder any time you need to create a new y_con-ingame.lvl. A 'normal' mod map does not have a custom ingame.lvl, so VisualMunge will not move it for you. Do that copy now, so you don't forget to later.
15) Rename Common/ingame.req to "y_con-ingame.req". This is so you always have a copy of the req that created the y_con-ingame.lvl. If you want to make a new y_con-ingame.lvl, rename that file back to "ingame.lvl". VisualMunge does not build custom named lvls by you just creating a differently named req file.
16) Test your map
[/code]
You can check the suported game modes here:
Hidden/Spoiler:
[code]
Added support for modder changable era names and icons
Added support for modder changable game mode names, icons, and descriptions
Truncates the MP and SP map lists if the 'mission checker' addon map detects over 499 missions (Note: should remove most FATAL missions, but won't get all if missions were added to any existing maps)
Attempts to load custom_gc_0.lvl through custom_gc_10.lvl (does file custom_gc_# for each found lvl)
Added support for 11 custom Galactic Conquests
Increased Galactic Conquest's debug output
Enabled the 'Versus' Galactic Conquest (might be unstable...)
Unlocked the 'Campaign List' button
Set the preview video for all the shipped maps to movies\pre-movie.mvs:preview-loop
Added ability to disable custom map colors by using the toggle file: AAA-v1.3patch\settings\noColors.txt
Changed the eli game mode showstr and string to 'modename.name.hero-assualt'
Changed the Diet Dr. Pepper game mode showstr to 'modename.name.spa-assualt'
Increased MP list's game mode filter display to show 15 elements
Increased MP list's era filter display to show 15 elements
Loads the Popup_Prompt script
Reads in custom strings from 'v1.3patch_strings.lvl'
Removed doing of non-PC scripts
Added crashing code to some possibly unused functions
Added support for custom map colors
Added cheatbox to MP map selection screen
Added cheatbox code: name:
Added cheatbox code: print:
Added support for map preview videos
Added Campaign maps to SP map selection screen
Game Mode checkboxes now uncheck by default
Era checkboxes now unchecked by default
Changed displayed era checkboxes to 5
Changed displayed game mode checkboxes to 14
Expanded game mode gui section to fix 12 checkboxes
Made slight layout changes to the map selection screens
Added game mode generation tables
Added era generation tables
Added support for game mode: tdm
Added support for game mode: xl
Added support for game mode: obj
Added support for game mode: uber
Added support for game mode: bf1
Added support for game mode: holo
Added support for game mode: ord66
Added support for game mode: dm
Added support for game mode: space
Added support for game mode: c1
Added support for game mode: c2
Added support for game mode: c3
Added support for game mode: c4
Added support for game mode: hctf
Added support for game mode: vhcon
Added support for game mode: vhtdm
Added support for game mode: vhctf
Added support for game mode: avh
Added support for game mode: lms
Added support for game mode: vh
Added support for game mode: race
Added support for game mode: koh
Added support for game mode: tdf
Added support for game mode: surv
Added support for game mode: rpg
Added support for game mode: wav
Added support for game mode: ctrl
Added support for game mode: seige
Added support for game mode: siege
Added support for game mode: jhu
Added support for game mode: wea
Added support for game mode: ins
Added support for era: a
Added support for era: b
Added support for era: d
Added support for era: e
Added support for era: f
Added support for era: h
Added support for era: i
Added support for era: j
Added support for era: k
Added support for era: l
Added support for era: m
Added support for era: n
Added support for era: o
Added support for era: p
Added support for era: q
Added support for era: r
Added support for era: s
Added support for era: t
Added support for era: u
Added support for era: v
Added support for era: w
Added support for era: x
Added support for era: y
Added support for era: z
Added support for era: 1
Added support for era: 2
Added mode icon: mode_icon_ins.tga
Added mode icon: mode_icon_c4.tga
Added mode icon: mode_icon_c3.tga
Added mode icon: mode_icon_c2.tga
Added mode icon: mode_icon_c1.tga
Added mode icon: mode_icon_avh.tga
Added mode icon: mode_icon_wav.tga
Added mode icon: mode_icon_survival.tga
Added mode icon: mode_icon_rpg.tga
Added mode icon: mode_icon_siege.tga
Added mode icon: mode_icon_vehicle.tga
Added mode icon: mode_icon_space.tga
Added mode icon: mode_icon_wea.tga
Added mode icon: mode_icon_jhu.tga
Added mode icon: mode_icon_tdf.tga
Added mode icon: mode_icon_hctf.tga
Added mode icon: mode_icon_race.tga
Added mode icon: mode_icon_koh.tga
Added mode icon: mode_icon_control.tga
Added mode icon: mode_icon_bf1.tga
Added mode icon: mode_icon_tdm.tga
Added mode icon: mode_icon_uber.tga
Added mode icon: mode_icon_vh.tga
Added mode icon: mode_icon_xtra.tga
Added mode icon: mode_icon_obj.tga
Added mode icon: mode_icon_dm.tga
Added mode icon: mode_icon_holo.tga
Added mode icon: mode_icon_ord66.tga
Added mode icon: mode_icon_lms.tga
Added mode icon: mode_icon_c.tga
Changed mode icon: mode_icon_XL.tga
Changed mode icon: mode_icon_eli.tga
Changed background image: iface_bgmeta_space.tga[/code]
OMG IT WORKS!! Thank you so much! YES! I`ve needed to do this for so long! Thank you once again!
(And sorry for the late reply)
Post Reply