Changing SBDroid to Battle Droid?

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:

Changing SBDroid to Battle Droid?

Post by SkinnyODST »

I wish to know how I can change the super battle droid to a regular battle droid, and also how to move the battle droid to another spot other then the first unit on the spawn screen
Samee3
First Lance Corporal
First Lance Corporal
Posts: 123
Joined: Sun Jul 05, 2015 5:07 pm
Projects :: BF2 Refresh Mod
Games I'm Playing :: Empire at War
xbox live or psn: VaporousFern310
Location: California, USA

Re: Changing SBDroid to Battle Droid?

Post by Samee3 »

To simply change the B2 to a B1(like it should be), you will need to change the model, the anims and the equipment. Fortunately, Pandemic has provided us with several templates to work with. The simple method is to copy the necessary code from one of the B1 units (like the engineer) to cis_inf_rifleman.

Code: Select all

// B2 code
GeometryName = "cis_inf_sbdroid"
GeometryLowRes = "cis_inf_sbdroid_low1"
SkeletonName = "sbdroid"
SkeletonLowRes = "sbdroidlz"

//B1 code
GeometryName = "cis_inf_bdroid"
GeometryLowRes = "cis_inf_bdroid_low1"
SkeletonName = "bdroid"
SkeletonLowRes = "bdroidlz"
Then you will need to make sure the B1 is using the correct weapons. So make sure you change the necessary lines in cis_inf_default_rifleman.
However, if you are making simple sides mod(where you replace the stock CIS.lvl with your own in GameData\lvl_pc\sides), the B1 will still show up as 'Super Battle Droid' in-game.
To fix this, make sure you read up on using custom sides alongside stock sides, and learn how to use the Multi Language Tool. In data_***, you will notice a file: editlocalize.bat. Run this to access the Language Tool.

To set the B2 as something other than the default soldier, you will need to learn some LUA coding. In data_***\Common\scripts\***, you will find several files; we will use Conquest as the example. Open ***c_con.lua, and find these lines (among others):

Code: Select all

SetupTeams{
--rep stuff will be here
cis = {
     team = CIS,
     units = 20,
     reinforcements = 150,
     soldier = { "cis_inf_rifleman", 9, 25},
--more CIS stuff will be here
The code is pretty self explanatory(right?), so edit as you wish.


Hopefully this makes some kind of sense :); I was doing this off the top of my head, without any reference.
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Changing SBDroid to Battle Droid?

Post by SkinnyODST »

Where do I find the code for the first step?
Samee3
First Lance Corporal
First Lance Corporal
Posts: 123
Joined: Sun Jul 05, 2015 5:07 pm
Projects :: BF2 Refresh Mod
Games I'm Playing :: Empire at War
xbox live or psn: VaporousFern310
Location: California, USA

Re: Changing SBDroid to Battle Droid?

Post by Samee3 »

BF2_ModTools\data_***\Sides\cis\odf
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Changing SBDroid to Battle Droid?

Post by AnthonyBF2 »

Another method;

1) In you map Lua file, go where ReadDataFile is loading CIS things. Add a line for cis_inf_marine

2) Then add the following code to tweak the marine's weapon layout so it's more like a soldier than a rocket unit

SetClassProperty("cis_inf_marine", "WeaponName1", "cis_weap_inf_rifle")
SetClassProperty("cis_inf_marine", "WeaponName2", "cis_weap_inf_pistol")
SetClassProperty("cis_inf_marine", "WeaponName3", "cis_weap_inf_thermaldetonator")

Then inside the code block Setup_teams{} you'll change cis_inf_rifleman to cis_inf_marine
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Changing SBDroid to Battle Droid?

Post by SkinnyODST »

Where do I go to find the code for step 2?...I`m such a noob I know
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: Changing SBDroid to Battle Droid?

Post by commanderawesome »

You don't find it, you paste that code into the .lua.
Samee3
First Lance Corporal
First Lance Corporal
Posts: 123
Joined: Sun Jul 05, 2015 5:07 pm
Projects :: BF2 Refresh Mod
Games I'm Playing :: Empire at War
xbox live or psn: VaporousFern310
Location: California, USA

Re: Changing SBDroid to Battle Droid?

Post by Samee3 »

AnthonyBF2 wrote: 1) In you map Lua file, go where ReadDataFile is loading CIS things. Add a line for cis_inf_marine
Good idea Anthony, I never thought of using the Marine.
SkinnyODST wrote:Where do I go to find the code for step 2?...I`m such a noob I know
commanderawesome wrote:You don't find it, you paste that code into the .lua.
Let me give you a visual aid:
Hidden/Spoiler:
In data_***\Common\scripts\***, open ***c_con.lua
Find (Ctrl + F) and change this:[code]
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")

[/code]
To this:
[code]
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_marine",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")
[/code]
Or, if you are using custom sides, use this:
[code]
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_marine",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")
[/code]

Then find and change this:
[code]
SetupTeams{
cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}
[/code]
To this:
[code]
SetupTeams{
cis = {
team = CIS,
units = 32,
reinforcements = 150,
soldier = { "cis_inf_marine",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}
SetClassProperty("cis_inf_marine", "WeaponName1", "cis_weap_inf_rifle")
SetClassProperty("cis_inf_marine", "WeaponName2", "cis_weap_inf_pistol")
SetClassProperty("cis_inf_marine", "WeaponName3", "cis_weap_inf_thermaldetonator")
[/code]
Post Reply