Tricky but hopefully simple edits [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
TJam11
Private Recruit
Posts: 15
Joined: Mon Nov 30, 2015 12:41 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Tricky but hopefully simple edits [Solved]

Post by TJam11 »

Hello,

I've managed to work out how to mod just about everything I ever wanted to and more with this game, largely in thanks to this community.

However, there is a couple of final touches I'm finding tricky, but hopefully have a simple answer...

1. How do I change a units name?
I'm just using the stock sides but wondered if there was a way to change the name of a unit as it appears in-game? (how it appears on the unit selection before spawn). I thought this might have been in the ODF, but I can unfortunately see no reference to it there and tutorials about creating your own faction don't seem to touch on this either...

2. How do I prevent an 'era' displaying as selectable on the instant action menu?
I'm playing Marvel4's conversion but making some slight tweeks to which hero spawns etc. I've figured out how to do this by simply replicating the world in Mod Tools (e.g, creating 'GNS') editing Marvel's script from within that and munging it. However, the Geonosis map is Clone Wars only, But after I've munged the script "GCW" then becomes a selectable era for the map - and subsequently brings up a plain map if launched. For aesthetics, is there a way for it to just display 'Clone Wars' in the instant action menu, so I don't forget that GCW isn't a thing and launch that by mistake? I've tried deleting the g_con script and removing it from the mission.req, but that doesn't work and breaks the game if selected!

Hope I've explained my questions well enough.

As always, would really appreciate any help/advice given.

P.s - This game is still better than EA Battlefront 2!!
Last edited by TJam11 on Wed Nov 29, 2017 5:34 pm, edited 1 time in total.
Calrissian97
Second Lance Corporal
Second Lance Corporal
Posts: 102
Joined: Sun May 07, 2017 11:31 pm
Projects :: ANF - ISM Skin Changer - BF1 Ports
Games I'm Playing :: All teh BFs
Location: Kentucky, USA

Re: Tricky but hopefully simple edits - Need some assistance

Post by Calrissian97 »

1. Rends has a tutorial on this here: http://www.gametoast.com/viewtopic.php? ... 1&start=40
It's not too complex once you understand how it works. Give it a read and you should know enough to change unit names.

2. As for eras, if you edit the addme.lua you can dictate which eras are
playable on your map by commenting out an era.
For example, if you have this:

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { 
	isModLevel = 1, 
	mapluafile = "MOD_ID%s_%s",
	era_g = 1,
	era_c = 1,
	mode_con_g = 1,
	mode_con_c  = 1,
And you want to completely remove the GCW era, you'd comment out the "era_g = 1," line, like so:

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { 
	isModLevel = 1, 
	mapluafile = "MOD_ID%s_%s",
	--era_g = 1,                                                 --THIS LINE HERE
	era_c = 1,
	mode_con_g = 1,
	mode_con_c  = 1,
If you simply wanted to remove the era from a specific mode and not from all modes on your map,
you'd comment out this line "mode_Whatever_EraIDontWant = 1," like this:

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { 
	isModLevel = 1, 
	mapluafile = "MOD_ID%s_%s",
	era_g = 1,
	era_c = 1,
	--mode_con_g = 1,                                    --THIS LINE HERE
	mode_con_c  = 1,
This will result in the era still showing up in the menu, but nothing will happen if you try to load it
on that particular gamemode and you can still use that era for other gamemodes.
This is actually my first time helping someone out on here. :mrgreen:
Did that help?
TJam11
Private Recruit
Posts: 15
Joined: Mon Nov 30, 2015 12:41 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: Tricky but hopefully simple edits - Need some assistance

Post by TJam11 »

Calrissian97 wrote:
Hidden/Spoiler:
1. Rends has a tutorial on this here: http://www.gametoast.com/viewtopic.php? ... 1&start=40
It's not too complex once you understand how it works. Give it a read and you should know enough to change unit names.

2. As for eras, if you edit the addme.lua you can dictate which eras are
playable on your map by commenting out an era.
For example, if you have this:
[code]
sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "MOD_ID%s_%s",
era_g = 1,
era_c = 1,
mode_con_g = 1,
mode_con_c = 1,
[/code]
And you want to completely remove the GCW era, you'd comment out the "era_g = 1," line, like so:
[code]
sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "MOD_ID%s_%s",
--era_g = 1, --THIS LINE HERE
era_c = 1,
mode_con_g = 1,
mode_con_c = 1,
[/code]
If you simply wanted to remove the era from a specific mode and not from all modes on your map,
you'd comment out this line "mode_Whatever_EraIDontWant = 1," like this:
[code]
sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "MOD_ID%s_%s",
era_g = 1,
era_c = 1,
--mode_con_g = 1, --THIS LINE HERE
mode_con_c = 1,
[/code]
This will result in the era still showing up in the menu, but nothing will happen if you try to load it
on that particular gamemode and you can still use that era for other gamemodes.
This is actually my first time helping someone out on here. :mrgreen:
Did that help?
YES!!! This helps massively! Thank you so much.

And I am honoured at being your first "helped" modder! :D
Post Reply