Changing equipments through the ODF files [Solved]
Moderator: Moderators
-
KolSkywalker
- Recruit Womprat Killer
- Posts: 10
- Joined: Tue Jan 17, 2017 5:12 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Changing equipments through the ODF files [Solved]
So say I have made a custom map with the default sides. I want to change the weapons/equipment of a Republic Jet Trooper, for example, the EMP launcher to a Shotgun.
Is it possible to achieve this without the SetClassProperty LUA and instead through the ODF?
Is it possible to achieve this without the SetClassProperty LUA and instead through the ODF?
Last edited by KolSkywalker on Thu Jan 26, 2017 3:07 am, edited 1 time in total.
- Oceans14
- Command Sergeant Major

- Posts: 296
- Joined: Mon Apr 27, 2015 7:09 pm
- Projects :: Athenova Campaign
- Location: Planet 4546b
Re: Changing equipments through the ODF files
Yes, it's possible. In order to do what you're saying, that is, change the jet trooper's weapons, you'll need to add the stock common and rep sides into your project's side folder. Then navigate to the odf directory and find "rep_inf_default_jettrooper.odf". Open that and replace the weapon names with the ones you want. Check out the FAQ for help on getting the custom side working; it's explained very well in another thread 
- AnthonyBF2
- Sith

- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: Changing equipments through the ODF files
Actually there are no custom sides required for just switching weapons.
The specific code you need is SetClassProperty("rep_inf_ep3_jettrooper", "WeaponName1", "rep_weap_inf_shotgun") and you put that code right after ScriptPostLoad()
The specific code you need is SetClassProperty("rep_inf_ep3_jettrooper", "WeaponName1", "rep_weap_inf_shotgun") and you put that code right after ScriptPostLoad()
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Re: Changing equipments through the ODF files
Yes, go into Data_***/sides/rep/odf. Now look for the shotgun odf file called "rep_weap_inf_shotgun". Copy that name, go into "rep_inf_default_jettropper" and where it says this -
WEAPONSECTION = 1
WeaponName = "rep_weap_inf_emp_launcher"
WeaponAmmo = 4
- simply change "rep_weap_inf_emp_launcher" to "rep_weap_inf_shotgun". This works for all weapon changing as well
WEAPONSECTION = 1
WeaponName = "rep_weap_inf_emp_launcher"
WeaponAmmo = 4
- simply change "rep_weap_inf_emp_launcher" to "rep_weap_inf_shotgun". This works for all weapon changing as well
-
KolSkywalker
- Recruit Womprat Killer
- Posts: 10
- Joined: Tue Jan 17, 2017 5:12 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Changing equipments through the ODF files
I am already aware and capable of the method of changing weapons through the lua scripts using the SetClassProperty line. Just wanted to know if its possible through the ODFs since I noticed the Weapon Sections and all. 
So before posting this topic, I already tried to change a unit's weapon through the ODF, after copying the default COMMON & rep sides into my mod folder of course. However the change did not take effect and the unit still had his default weapon in his loadout.
So before posting this topic, I already tried to change a unit's weapon through the ODF, after copying the default COMMON & rep sides into my mod folder of course. However the change did not take effect and the unit still had his default weapon in his loadout.
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Re: Changing equipments through the ODF files
So you changed the weapons in the odf but no changes were visible? If so, try going into the LUA of the era your changing the units in, and look for this area,KolSkywalker wrote:I am already aware and capable of the method of changing weapons through the lua scripts using the SetClassProperty line. Just wanted to know if its possible through the ODFs since I noticed the Weapon Sections and all.
So before posting this topic, I already tried to change a unit's weapon through the ODF, after copying the default COMMON & rep sides into my mod folder of course. However the change did not take effect and the unit still had his default weapon in his loadout.
Hidden/Spoiler:
Change it so it looks like this -
ReadDataFile("dc:SIDE\\rep.lvl",
(add a "dc:" right before "SIDE")
-
KolSkywalker
- Recruit Womprat Killer
- Posts: 10
- Joined: Tue Jan 17, 2017 5:12 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Changing equipments through the ODF files
Alright, I will try that. Thanks for the help you're giving, mate.SkinnyODST wrote:So you changed the weapons in the odf but no changes were visible? If so, try going into the LUA of the era your changing the units in, and look for this area,Where it says ReadDataFile("SIDE\\rep.lvl",Hidden/Spoiler:
Change it so it looks like this -
ReadDataFile("dc:SIDE\\rep.lvl",
(add a "dc:" right before "SIDE")
One more question, though. When copying the stock rep side into my mod folder, do I have to copy all the folders (effects, msh, munged, odf, req), or will copying just the odf into my custom rep side work?
-
ARCTroopaNate
- Jedi

- Posts: 1161
- Joined: Mon Mar 21, 2011 8:12 pm
- Projects :: Star Wars Battlefront - Tides of War
- xbox live or psn: I have ps4
- Location: STALKER!
- Contact:
Re: Changing equipments through the ODF files
You need both the req. folder (which contains individual .req files) and the .req file in the main rep folder. msh folder contains the textures and models so those will be needed, munged has animations which you need for jedi and some vehicles, and effects has stuff like the jettrooper jet effect and the mace groundslam attack effect. I'd copy everything for now as a beginner but when you get a little more experience it really saves a massive amount of space to build up your side files from scratch, only using what you need.
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Re: Changing equipments through the ODF files
No problem, always happy to help where I can!Alright, I will try that. Thanks for the help you're giving, mate.
In short, EVERYTHING in the rep folder is needed for the sides to work, ARCTroopaNate gave you details into what each folder contains and what its used for, so yeah, copy over all of it until you become a skilled enough force user-I mean mod creatorOne more question, though. When copying the stock rep side into my mod folder, do I have to copy all the folders (effects, msh, munged, odf, req), or will copying just the odf into my custom rep side work?
-
KolSkywalker
- Recruit Womprat Killer
- Posts: 10
- Joined: Tue Jan 17, 2017 5:12 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: Changing equipments through the ODF files
My thanks for all the help! 
