FC LUA coder how-to's needed

Talk and share anything related to Star Wars Battlefront 2. No maps or mod announcements here. Use Work in Progress forum.

Moderator: Moderators

Post Reply
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

FC LUA coder how-to's needed

Post by Dakota »

i picked this forum because it said software tutorails are here too.

i want to know how to use the LUA code consel in FC (yes i am a modder don't worry [just not a great modder when it comes to lua]) what are some commands and is it like changing an lua in modtools. how do i use it to get stuff to happen. i wonder if i can add units or change hero or change healths or stuff. i kinda just want to know all there is about it. if some one has ideas or tutorials it would help. my other question is: does it work on dedicated, nondedicated, or both? (i am using nondedicated) :?
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: FC LUA coder how-to's needed

Post by 501st_commander »

forums/viewtopic.php?f=27&t=13806

and i'm buildng a program to work with luas.
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: FC LUA coder how-to's needed

Post by Dakota »

I looked over the LUA section but i didn't find anything about FC's LUA coder only a lot of LUA codes still it is useful but i need to learn about the coder in FC.

off-topic: good luck with your LUA project
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: FC LUA coder how-to's needed

Post by [RDH]Zerted »

You just type Lua code; there are no special commands. Whatever you type gets run when you hit enter. Think of it as adding code to ScriptPostLoad().

Since it's easy to make a typing mistake, it's more for modders to test some changes without remunging their map. If you want commands you'll be doing multiple times, possibly on different maps, use a custom user script to add custom Fake Console commands.
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: FC LUA coder how-to's needed

Post by Dakota »

Sounds easy enough i'll test it out next time i can. I'll also post back with the resualts.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: FC LUA coder how-to's needed

Post by Fiodis »

[RDH]Zerted wrote:Since it's easy to make a typing mistake,
Isn't there some sort of failsafe?
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: FC LUA coder how-to's needed

Post by kinetosimpetus »

/yes. He said it could be used for testing pieces of code in the FC and correcting a typo quickly instead of munging and realizing you had a typing mistake that wasted 5 minutes.
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: FC LUA coder how-to's needed

Post by [RDH]Zerted »

I meant you don't want to have to retype the same commands over and over ingame, so it would be better to make a custom user script if a command was going to be used a lot.

A typo will simply cause that command to fail. However a wrong command could cause the game to crash.
User avatar
Dakota
Field Commander
Field Commander
Posts: 991
Joined: Mon Dec 06, 2010 8:21 pm
Projects :: making random weapon assets
Games I'm Playing :: SWBF2 and more
xbox live or psn: PS3 beats xbox
Location: at a computer desk floating around in space

Re: FC LUA coder how-to's needed

Post by Dakota »

Back finally with test results: i can now change the weapons of units while in game i am right now using an empire engineer with a rebel blaster rifle. now all i need to do is master this and find more codes like these ones. thank u gametoast :D

also is there i way i can use it online like a pure client code thing i have seen it before on dedicated servers but i don't know the code

also what is the health code i saw a topic like this on the all you need to know thread but it didn't work maybe i did something wrong. also what are the ammo and other codes like run and jump speeds.
Post Reply