Give a unit different weapons via LUA? [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

User avatar
General_Nate
Lieutenant General
Lieutenant General
Posts: 689
Joined: Sun Jun 28, 2009 4:01 pm
Projects :: None because BFII is not working
Games I'm Playing :: Minecraft
xbox live or psn: No gamertag set
Location: 127.0.0.1

Re: LUA Question

Post by General_Nate »

Ok guys! Thanks so much for all the help! (this can be locked)
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Give a unit different weapons via LUA? [Solved]

Post by [RDH]Zerted »

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.
User avatar
Par3210
Jedi
Jedi
Posts: 1033
Joined: Sun Jun 14, 2009 10:31 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Owning people in SWBF2
Contact:

Re: Give a unit different weapons via LUA? [Solved]

Post by Par3210 »

thanks, now I have my own weps up and loading! :D
Post Reply