Page 1 of 1
How to add a new weapon
Posted: Mon Feb 01, 2016 8:08 pm
by Delta327
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")
Re: How to add a new weapon
Posted: Mon Feb 01, 2016 10:56 pm
by jedimoose32
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.
Re: How to add a new weapon
Posted: Tue Feb 02, 2016 7:28 pm
by Delta327
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.
Can I add them to the rep sides?
Re: How to add a new weapon
Posted: Tue Feb 02, 2016 7:39 pm
by jedimoose32
You can add them to any side you want.
Re: How to add a new weapon
Posted: Wed Feb 03, 2016 9:17 am
by Delta327
Didn't work.
Re: How to add a new weapon
Posted: Wed Feb 03, 2016 10:06 am
by jedimoose32
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?
Re: How to add a new weapon
Posted: Wed Feb 03, 2016 10:50 am
by Delta327
I ment I crashes
Re: How to add a new weapon
Posted: Wed Feb 03, 2016 11:21 am
by jedimoose32
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).