Can someone show me how to add a new weapon to the stock sides because i have little experience of it.
I tried to add in my LUA
An Example:
dc:SIDE//rep.lvl
"rep_inf_default_rifleman")
How to add a new weapon
Moderator: Moderators
-
Delta327
- Master Sergeant

- Posts: 160
- Joined: Thu Jan 21, 2016 8:55 pm
- Projects :: Shattered Galaxy
- xbox live or psn: No gamertag set
- Location: In the Mid Rim of the galaxy
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: How to add a new weapon
You add a new weapon by copying the weapon assets into your own side folder and then changing the .odf file of the unit you want to use that weapon. So let's say you want to give your clone troopers a throwing rock (like the Ewoks use). You need to copy the rock weapon odf files from the assets into your sides/rep/odf/. If there are any custom .msh or texture files for the weapon, copy those into sides/rep/msh/. (I don't think there are any for the rock example but I may be wrong).
Then you need to open up the .odf of the default unit for the class you want to have the weapon (e.g. rep_inf_default_engineer.odf) and either add a new weapon section or replace one of the existing ones. Remember that if it's a weapon that isn't "held" while the unit is walking around (e.g. a rifle or pistol as opposed to a grenade or mine) then you need to specify WeaponChannel = 1.
If none of that made sense then I recommend looking at some of the stock assets - this is one of those things that is fairly basic to understand but hard to describe well with a paragraph of text.
Then you need to open up the .odf of the default unit for the class you want to have the weapon (e.g. rep_inf_default_engineer.odf) and either add a new weapon section or replace one of the existing ones. Remember that if it's a weapon that isn't "held" while the unit is walking around (e.g. a rifle or pistol as opposed to a grenade or mine) then you need to specify WeaponChannel = 1.
If none of that made sense then I recommend looking at some of the stock assets - this is one of those things that is fairly basic to understand but hard to describe well with a paragraph of text.
-
Delta327
- Master Sergeant

- Posts: 160
- Joined: Thu Jan 21, 2016 8:55 pm
- Projects :: Shattered Galaxy
- xbox live or psn: No gamertag set
- Location: In the Mid Rim of the galaxy
Re: How to add a new weapon
Can I add them to the rep sides?jedimoose32 wrote:You add a new weapon by copying the weapon assets into your own side folder and then changing the .odf file of the unit you want to use that weapon. So let's say you want to give your clone troopers a throwing rock (like the Ewoks use). You need to copy the rock weapon odf files from the assets into your sides/rep/odf/. If there are any custom .msh or texture files for the weapon, copy those into sides/rep/msh/. (I don't think there are any for the rock example but I may be wrong).
Then you need to open up the .odf of the default unit for the class you want to have the weapon (e.g. rep_inf_default_engineer.odf) and either add a new weapon section or replace one of the existing ones. Remember that if it's a weapon that isn't "held" while the unit is walking around (e.g. a rifle or pistol as opposed to a grenade or mine) then you need to specify WeaponChannel = 1.
If none of that made sense then I recommend looking at some of the stock assets - this is one of those things that is fairly basic to understand but hard to describe well with a paragraph of text.
Last edited by Delta327 on Wed Feb 03, 2016 9:16 am, edited 3 times in total.
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: How to add a new weapon
You can add them to any side you want.
-
Delta327
- Master Sergeant

- Posts: 160
- Joined: Thu Jan 21, 2016 8:55 pm
- Projects :: Shattered Galaxy
- xbox live or psn: No gamertag set
- Location: In the Mid Rim of the galaxy
Re: How to add a new weapon
Didn't work.
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: How to add a new weapon
Okay... You're going to have to work with me here. Just saying it didn't work doesn't help me to help you.
Did it crash the game? Did nothing change?
Can you post your error log? Maybe show me the odf files you're working with?
Did it crash the game? Did nothing change?
Can you post your error log? Maybe show me the odf files you're working with?
-
Delta327
- Master Sergeant

- Posts: 160
- Joined: Thu Jan 21, 2016 8:55 pm
- Projects :: Shattered Galaxy
- xbox live or psn: No gamertag set
- Location: In the Mid Rim of the galaxy
Re: How to add a new weapon
I ment I crashes
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: How to add a new weapon
Okay. Then please post your error log. (Try to run the game in BF2_Modtools, after it crashes copy the contents of BFront2.txt and paste it here).
