Give a unit different weapons via LUA? [Solved]
Moderator: Moderators
- General_Nate
- Lieutenant General

- Posts: 689
- Joined: Sun Jun 28, 2009 4:01 pm
- Projects :: None because BFII is not working
- xbox live or psn: No gamertag set
- Location: 127.0.0.1
Re: LUA Question
Ok guys! Thanks so much for all the help! (this can be locked)
- [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: Give a unit different weapons via LUA? [Solved]
If you change the weapons through the Lua, you still have to make sure the weapons are loaded ingame. Also, if you mess with the weapons in the wrong spots within the game's loading sequence, everyone else's game will crash in multiplayer (the host doesn't crash, but everyone else does). You'll notice the FakeConsole's weapon related commands are in the crashing section of the list.
If you know which properties to change in the Lua, then you know how to do it through an ODF file. The difference between the two ways is that:
1) you need to know what will cause crashes in the Lua
2) you need to know how to setup a custom side for the ODF changes
Considering there is mod tool documentation (jedi creation doc goes over custom sides) and many other tutorials on setting up custom sides, I would expect that way would be easier for you guys to learn. The correct info on messing with weapons from within the Lua scripts is only posted in a few scattered topics on Gametoast.
If you know which properties to change in the Lua, then you know how to do it through an ODF file. The difference between the two ways is that:
1) you need to know what will cause crashes in the Lua
2) you need to know how to setup a custom side for the ODF changes
Considering there is mod tool documentation (jedi creation doc goes over custom sides) and many other tutorials on setting up custom sides, I would expect that way would be easier for you guys to learn. The correct info on messing with weapons from within the Lua scripts is only posted in a few scattered topics on Gametoast.
- 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: Give a unit different weapons via LUA? [Solved]
thanks, now I have my own weps up and loading! 
