FC addon?
Moderator: Moderators
- 1FGR1NightGhost
- Don't feed the troll (that's me)
- Posts: 85
- Joined: Wed Jun 08, 2011 12:01 pm
- Projects :: Bornesia Kastarian Docks
- xbox live or psn: No gamertag set
FC addon?
Is there a way to make an addon to Fake Console?
(like make some LUA run ingame using an option selected in FC)
(like make some LUA run ingame using an option selected in FC)
- yuke5
- Field Commander

- Posts: 945
- Joined: Wed Jun 29, 2011 10:42 pm
- xbox live or psn: My steam is yuke5.
- Location: Vermont
Re: FC addon?
Many FC commands are actual scripts, (sorta). They can be found here:
http://www.secretsociety.com/forum/down ... erence.txt
Good Luck!
http://www.secretsociety.com/forum/down ... erence.txt
Good Luck!
- 1FGR1NightGhost
- Don't feed the troll (that's me)
- Posts: 85
- Joined: Wed Jun 08, 2011 12:01 pm
- Projects :: Bornesia Kastarian Docks
- xbox live or psn: No gamertag set
Re: FC addon?
Thx alot, this will help w/ Code console, but does anyone know how to make a selectable command appear when you click on the "Fake Console" Menu?
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: FC addon?
from the 1.3 patches documentation:
AAA-v1.3patch\docs\howtos\"Make Custom User Scripts.txt"
AAA-v1.3patch\docs\howtos\"Make Custom User Scripts.txt"
Hidden/Spoiler:
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: FC addon?
Not to hijack the OP's thread, but I've got a somewhat similar question: to what extent is it possible to modify the Fake Console commands already built into it? Can I, for instance, remove a few things from the list that I don't want people cheating with, or rename a few others and give them new functions?
EDIT - As I've received a few misguided PMs on this, I'll clarify further: I know you can add custom commands to Fake Console. Duck posted the tutorial right above me; I can hardly miss it. I want to see if it's possible to alter the ones already on it. Are those hardwired into the exe?
EDIT - As I've received a few misguided PMs on this, I'll clarify further: I know you can add custom commands to Fake Console. Duck posted the tutorial right above me; I can hardly miss it. I want to see if it's possible to alter the ones already on it. Are those hardwired into the exe?
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: FC addon?
Sure it's possible to alter the ones already added. If you remember (and you may well not), I removed the ability to use the "Add Jetpacks" command in "The Big 'L'" (since the map was so dependent on moving across gaps) - it was still selectable, but I simply gave the command a null value in the script. All I did to let this happen was to search through the .lvl file that the Fake Console scripts are contained in, find the name of the function Zerted used to add jetpacks, and simply give it a value of "zero."
Theoretically you could rewrite them so that an addon map uses a different script when a button is pressed, but it would be no different than using a user script or entering code in the code console.
Theoretically you could rewrite them so that an addon map uses a different script when a button is pressed, but it would be no different than using a user script or entering code in the code console.
-
Noobasaurus
- Droid Pilot Assassin

- Posts: 2006
- Joined: Tue Aug 17, 2010 5:56 pm
Re: FC addon?
I knew it!Maveritchell wrote: I removed the ability to use the "Add Jetpacks" command in "The Big 'L'"
-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
Re: FC addon?
Yeah, I noticed. Although at the time I had no grasp of how. I didn't mind not having it, except with that first fan.Maveritchell wrote: I removed the ability to use the "Add Jetpacks" command in "The Big 'L'"
-
Noobasaurus
- Droid Pilot Assassin

- Posts: 2006
- Joined: Tue Aug 17, 2010 5:56 pm
Re: FC addon?
I can't do it without cheats...I needed high jump and whatnot to get it done. I also gave myself a huge shield.THEWULFMAN wrote:Yeah, I noticed. Although at the time I had no grasp of how. I didn't mind not having it, except with that first fan.Maveritchell wrote: I removed the ability to use the "Add Jetpacks" command in "The Big 'L'"Still its satisfying to do it without cheats.
Hidden/Spoiler:
-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
Re: FC addon?
I refuse to cheat when playing campaigns, I still haven't beat Death Watch Bunker so don't feel bad.Noobasaurus wrote:Hidden/Spoiler:
Ontopic:
I definitely will look into adding a couple commands to the FC, it would be handy to be able to be able to turn unit shields on and off for certain mods.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: FC addon?
Heh, I didn't notice at the time. So if rewriting a default function Zerted included is no different than making a custom user script, would we have to follow the same process for making a custom user script, with a unique .lvl file, etc.? Or could we just put the code in our map's lua? I'd imagine it'd be the latter, since I don't remember The Big "L" having any sort of special script .lvl included - though, I admit, I didn't really poke around in that map folder too much.Maveritchell wrote:I removed the ability to use the "Add Jetpacks" command in "The Big 'L'" (since the map was so dependent on moving across gaps) - it was still selectable, but I simply gave the command a null value in the script. All I did to let this happen was to search through the .lvl file that the Fake Console scripts are contained in, find the name of the function Zerted used to add jetpacks, and simply give it a value of "zero."
Theoretically you could rewrite them so that an addon map uses a different script when a button is pressed, but it would be no different than using a user script...
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: FC addon?
I shouldn't have said "no different;" all I really meant was that it's just one more way of injecting code into the game. A custom user script (I believe) is an always-run script that's read through the 1.3 patch. Using the code console is at-will, although you have to type it in. In the case of modifying one of Zerted's functions, you'd be able to run it at-will as well, although it could only be run through a .lua in which the function has been rewritten. Whether that means you munge a .lvl file with the script embedded and then load it through other scripts or whether you simply add it directly into a mission script (the latter is what I did) is functionally irrelevant.Fiodis wrote:So if rewriting a default function Zerted included is no different than making a custom user script, would we have to follow the same process for making a custom user script, with a unique .lvl file, etc.? Or could we just put the code in our map's lua? I'd imagine it'd be the latter, since I don't remember The Big "L" having any sort of special script .lvl included - though, I admit, I didn't really poke around in that map folder too much.
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: FC addon?
Thanks, that suits my intentions perfectly.Maveritchell wrote:In the case of modifying one of Zerted's functions, you'd be able to run it at-will as well, although it could only be run through a .lua in which the function has been rewritten. Whether that means you munge a .lvl file with the script embedded and then load it through other scripts or whether you simply add it directly into a mission script (the latter is what I did) is functionally irrelevant.
- Bonecrusher16O
- Private Second Class
- Posts: 66
- Joined: Mon Apr 25, 2011 5:57 pm
- Projects :: Snipers Galore and SAM
- xbox live or psn: PS3 :)
Re: FC addon?
To add to my Night's question, At the end of the "Make Custom User Scripts" txt Its says to "Run your game and check its debug output". How does one do this???
- Fiodis
- Master of the Force

- Posts: 4145
- Joined: Wed Nov 12, 2008 9:27 pm
- Projects :: Rannoch + Tientia + Tools Programming
Re: FC addon?
Run the BF2_Modtools.exe as you would to get an error log. Then look into the error log.
Info on how to get an error log is in the FAQ thread.
Info on how to get an error log is in the FAQ thread.
- [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: FC addon?
The ones hardwired into the exe are everything that shows up when using the debug version of the game. Everything else I created and added through Lua code. Anything done in Lua can be modified somehow, it's just a real pain to get at a few things.Fiodis wrote:I want to see if it's possible to alter the ones already on it. Are those hardwired into the exe?
You got lucky on that one. Most of the commands don't have named functions.Maveritchell wrote:All I did to let this happen was to search through the .lvl file that the Fake Console scripts are contained in, find the name of the function Zerted used to add jetpacks, and simply give it a value of "zero."
I thought I had described this somewhere already... v1.3 was designed to allow modders to add their own FC commands. This is different from using user scripts. I think it would be easier to provide an example than write up a long tutorial trying to explain exactly how everything works. Read through the code and comments before asking me questions on it. I suggest putting the code in PostScriptLoad(). If the player doesn't have v1.3, the code won't hurt anything. Check the debug output if the custom commands aren't working. Note: the steps might change for v1.4, but I will do my best to support the format shown below.
The following code is untested; it might have a typo or two.
Hidden/Spoiler:
-
CalvaryCptMike
- Captain

- Posts: 476
- Joined: Sat Feb 19, 2011 3:10 pm
- Projects :: Nothing--absolutely nothing
- Location: Freed by alien robots, now living on Mars
- Contact:
Re: FC addon?
Thankyou Zerted! This will be very useful. 
- RedFaceofAwesomeness
- Private
- Posts: 33
- Joined: Tue Aug 30, 2011 5:42 pm
- Location: New York, USA
- Contact:
Re: FC addon?
Thanks for the lua codes I'll see what I can do with it!
