How to give units extra weapons
Moderator: Moderators
- baneore
- Private Second Class
- Posts: 64
- Joined: Fri Aug 01, 2008 12:58 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
How to give units extra weapons
Hi, I have made a map, how would I get my clone trooper (or any other rep unit) to have a sniper rifle and fusion cutters etc?
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: How Too: Extra weapons for units
You will have to edit the unit(s)' .odf. Check the FAQ topic, there should be a tutorial for doing these things (hint: custom sides).
- CodaRez
- Field Commander

- Posts: 940
- Joined: Mon May 25, 2009 6:49 am
- Projects :: I would like one.....
- Location: Ride around the world! And I won't give you anything :P
Re: How Too: Extra weapons for units
To be precise, I hope you ahve visited this topic first: http://www.gametoast.com/forums/viewtop ... 27&t=12729
if so:
Add the corresponding .odf names into the unit .odf you want. Say "rep_inf_sniper" is the unit u use, jsut add inside something along the lines of:
ODFs with a "com" in them like the fusioncutter are normally provided alrdy(provided you followed the make ur own sides tut: http://www.gametoast.com/forums/viewtop ... 27&t=12729 ) so no worries for em.(THIS ONLY APPLIES TO SHIPPED MSHs! NAMING A CUSTOM MODEL com_**_** WONT AHVE THE SAME EFFECT)
If you want a rifle for example, jsut find its .odf also in the assets folder, like so:
Lol man somehow I love a job answering questions XD
EDIT: lol beaten, but anyway, heres a more direct explanation
But still, READ the custom sides tut
if so:
Add the corresponding .odf names into the unit .odf you want. Say "rep_inf_sniper" is the unit u use, jsut add inside something along the lines of:
Don't forget to add in ALL the .msh and .tga(and perhaps .option files) that the weapons AND your player model need. The sniper rifle would need its rep_weap_inf_sniper_rifle.msh and so on.WEAPONSECTION = 1
WeaponName = "rep_weap_inf_sniper_rifle"
WeaponAmmo = 7
WEAPONSECTION = 2
WeaponName = "com_weap_inf_fusioncutter"
WeaponAmmo = 0
ODFs with a "com" in them like the fusioncutter are normally provided alrdy(provided you followed the make ur own sides tut: http://www.gametoast.com/forums/viewtop ... 27&t=12729 ) so no worries for em.(THIS ONLY APPLIES TO SHIPPED MSHs! NAMING A CUSTOM MODEL com_**_** WONT AHVE THE SAME EFFECT)
If you want a rifle for example, jsut find its .odf also in the assets folder, like so:
GLWEAPONSECTION = 1
WeaponName = "rep_weap_inf_rifle"
WeaponAmmo = 7
Lol man somehow I love a job answering questions XD
EDIT: lol beaten, but anyway, heres a more direct explanation
But still, READ the custom sides tut
- baneore
- Private Second Class
- Posts: 64
- Joined: Fri Aug 01, 2008 12:58 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: How to give units extra weapons
Where do i add these files?
-
AQT
- Gametoast Staff

- Posts: 4910
- Joined: Sat Nov 03, 2007 4:55 pm
- Location: SoCal, USA
Re: How to give units extra weapons
What you are asking is covered in the custom sides tutorial. I suggest you read it and then ask questions about what you do not understand.
- baneore
- Private Second Class
- Posts: 64
- Joined: Fri Aug 01, 2008 12:58 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: How to give units extra weapons
I read it like you said (that was the fourth time) and i tried to make a new side but i get missing brackets, is all this side creating stuff neccisary just to add a fusion cutter to a rep trooper unit?
-
Xavious
- Sith Master

- Posts: 2783
- Joined: Mon Jun 12, 2006 3:46 pm
Re: How to give units extra weapons
You could always add this line to your lua.
Though learning how to custom sides is still something you should do.
Code: Select all
SetClassProperty("rep_inf_yourunitname", "WeaponName2", "rep_weap_inf_fusioncutter")
- baneore
- Private Second Class
- Posts: 64
- Joined: Fri Aug 01, 2008 12:58 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: How to give units extra weapons
Where do i put that in the lua? and do i put anyhting in place of weaponame2?
- CodaRez
- Field Commander

- Posts: 940
- Joined: Mon May 25, 2009 6:49 am
- Projects :: I would like one.....
- Location: Ride around the world! And I won't give you anything :P
Re: How to give units extra weapons
Weapon making doesn't require LUA magic...
Just go to the desired units .odf and add the weapons, like I stated in CLEAR detail above.
This may be a risky procedure, but if the prob still persists and you are SURE you got everything right, go to data_(mod name)/_BUILD/Sides/(side name**). There u should find a MUNGED folder.
** - you SHOULD ahve this, if you followed the tut
Delete it, BUT MAKE SURE YOU DON'T EMPTY UR RECYCLE BIN, incase something goes wrong, then u can restore it. Re-munge again after that.
I had sides probs before where my units didn't show up, when I deleted the MUNGED folder and re-munged they came back. Hopefully this works
(REMEMBER THIS IS A LAST RESORT TACTIC, SO DON'T ABUSE IT UNLESS U KNOW WHAT UR DOING)
Just go to the desired units .odf and add the weapons, like I stated in CLEAR detail above.
This may be a risky procedure, but if the prob still persists and you are SURE you got everything right, go to data_(mod name)/_BUILD/Sides/(side name**). There u should find a MUNGED folder.
** - you SHOULD ahve this, if you followed the tut
Delete it, BUT MAKE SURE YOU DON'T EMPTY UR RECYCLE BIN, incase something goes wrong, then u can restore it. Re-munge again after that.
I had sides probs before where my units didn't show up, when I deleted the MUNGED folder and re-munged they came back. Hopefully this works
(REMEMBER THIS IS A LAST RESORT TACTIC, SO DON'T ABUSE IT UNLESS U KNOW WHAT UR DOING)
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: How to give units extra weapons
At the end of the ScriptPostLoad section.baneore wrote:Where do i put that in the Lua? and do i put anything in place of weaponame2?
You don't need to change any ODFs.
It really would be best, however, to just make a new side. It's really not that hard and only adds a little to the file size.
@CodaRez
Deleting the MUNGED folder is not that big of a deal, as that is exactly what the Clean button does in Visual Munge.
- baneore
- Private Second Class
- Posts: 64
- Joined: Fri Aug 01, 2008 12:58 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: How to give units extra weapons
Frisbeetarian wrote:
It really would be best, however, to just make a new side. It's really not that hard and only adds a little to the file side .
I would love to get my own side but thsi is my problem every time-
ERROR[levelpack mission\TCMg_con.req]:Expecting bracket, but none was found.
File : munged\pc\tcmg_con.script.req(1)...
ucft <--
ERROR[levelpack mission\TCMg_con.req]:Expecting bracket, but none was found.
File : munged\pc\tcmg_con.script.req(1)...
ucft <--
2 Errors 0 Warnings
- destos
- Chief Warrant Officer

- Posts: 349
- Joined: Sat Sep 22, 2007 10:37 pm
Re: How to give units extra weapons
post your lua. perhaps you added a extra , or ) or forgot to close it.
- baneore
- Private Second Class
- Posts: 64
- Joined: Fri Aug 01, 2008 12:58 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: How to give units extra weapons
Hidden/Spoiler:
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: How to give units extra weapons
How did you set up the .req files? The problem is probably there.
If that were the case, the munge log would have said so while pointing out where it the script it happened.destos wrote:post your lua. perhaps you added a extra , or ) or forgot to close it.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: How to give units extra weapons
Yes, post the .req files you've edited. Especially TCMg_con.req.
- baneore
- Private Second Class
- Posts: 64
- Joined: Fri Aug 01, 2008 12:58 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Re: How to give units extra weapons
That file -TCMg_con.req- does not exist after runin a search on my CP.
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: How to give units extra weapons
That's probably because you didn't search properly. It's in ...\BF2_ModTools\data_TCM\Common\mission.
Regardless, that doesn't keep you from posting the .req files you edited for your side.
Regardless, that doesn't keep you from posting the .req files you edited for your side.
- Par3210
- Jedi

- Posts: 1033
- Joined: Sun Jun 14, 2009 10:31 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Owning people in SWBF2
- Contact:
Re: How to give units extra weapons
[This Post was edited and taken off by request from the author of the post]
Last edited by Par3210 on Sun Jul 12, 2009 8:00 am, edited 1 time in total.
- Frisbeetarian
- Jedi

- Posts: 1233
- Joined: Wed Sep 12, 2007 3:13 pm
Re: How to give units extra weapons
You need to learn how to do things for yourself, not rely on others to feed you everything you need or want to know. If you read BF2 Jedi Creation.doc, it will tell you how weapons are added, down in the third section. If you read the odf_guide.doc, it will tell you how the hierarchy of ODFs work. This would help you to understand the reason I make the following suggestion. Since you are creating a new side, I would suggest that you combine any ODF you're duplicating with it's class parent, since that's going to be were the weapon sections are.
I'm going to wait until the mods break this off into a different topic to post more, since it's hijacking the original topic.
I'm going to wait until the mods break this off into a different topic to post more, since it's hijacking the original topic.
