Page 1 of 1

Changing SBDroid to Battle Droid?

Posted: Mon Jul 11, 2016 5:15 am
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

Re: Changing SBDroid to Battle Droid?

Posted: Mon Jul 11, 2016 8:55 pm
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.

Re: Changing SBDroid to Battle Droid?

Posted: Wed Jul 13, 2016 9:32 pm
by SkinnyODST
Where do I find the code for the first step?

Re: Changing SBDroid to Battle Droid?

Posted: Wed Jul 13, 2016 10:00 pm
by Samee3
BF2_ModTools\data_***\Sides\cis\odf

Re: Changing SBDroid to Battle Droid?

Posted: Wed Jul 13, 2016 10:54 pm
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

Re: Changing SBDroid to Battle Droid?

Posted: Thu Jul 14, 2016 2:36 am
by SkinnyODST
Where do I go to find the code for step 2?...I`m such a noob I know

Re: Changing SBDroid to Battle Droid?

Posted: Thu Jul 14, 2016 1:05 pm
by commanderawesome
You don't find it, you paste that code into the .lua.

Re: Changing SBDroid to Battle Droid?

Posted: Thu Jul 14, 2016 3:33 pm
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]