Fake Console's Lua Code

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

Post Reply
User avatar
darthvatrayen
Private Recruit
Posts: 24
Joined: Tue Jun 23, 2009 9:58 pm

Fake Console's Lua Code

Post by darthvatrayen »

Hello.
I love Fake Console. Some of the commands I found in it I want to put in my map's LUA. Can someone please tell me what is added to the LUA when I do the Fake Console commands:

1) Deny CP Capture
2) Immune to Mines
3) Add JetPacks
4) Kill All
5) Disallow Victory (disables the victory/defeat timer when you have all the CPs or the hunt timer.)
6) Enemy/Friendly Team Track
7) Mark Player/Player to Marked

Thanks in advanced! :bowdown: :bowdown: :bowdown: :plokoon:
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: Fake Console's LUA Codes

Post by [RDH]Zerted »

It matters: Is your map going to require the v1.3 patch or not? If it is, then you can just directly call those commands from your lua. If not, you'll have to add a bunch of helper functions (but they are already written...).

A quick overview:
1) An ODF property change
2) An ODF property change
3) Multiple ODF property changes
4) Looping through all players and doing KillObject() on their unit
5) Basically MissionVictory = function(...) end and MissionDefeat = function(...) end
6) Putting an objective marker on the player's unit
7) Marking a player stores that player's Id. 'Player to Marked' just teleports the selected player to the stored player. The marking part is a hack that gives you a way to select two things.

Luckily for you, the code to the FakeConsole was requested by others before I lost all the source code. Thus that small bit of the v1.3 wasn't lost.
User avatar
darthvatrayen
Private Recruit
Posts: 24
Joined: Tue Jun 23, 2009 9:58 pm

Re: Fake Console's Lua Code

Post by darthvatrayen »

Umm... Thanks for that info. but I wanted to know what the exact codes are... Like what is a human player's code in LUA?
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: Fake Console's LUA Codes

Post by [RDH]Zerted »

[RDH]Zerted wrote:Is your map going to require the v1.3 patch or not?
The code changes depending on if the answer is yes or no.
User avatar
darthvatrayen
Private Recruit
Posts: 24
Joined: Tue Jun 23, 2009 9:58 pm

Re: Fake Console's Lua Code

Post by darthvatrayen »

You do not need v1.3 to play my map.

EDIT: Wow... I am so stupid... :oops: here I am asking Z when I already have a tutorial made by him in my addon folder on the subject. :oops: Sorry for your time, Z. :oops:
Post Reply