Fake Console Breakthrough!

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

Moderator: Moderators

User avatar
Tourny
Command Sergeant Major
Command Sergeant Major
Posts: 289
Joined: Sat Sep 27, 2008 5:58 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Crifton
Contact:

Fake Console Breakthrough!

Post by Tourny »

Through research, me and my friends have found that using the Code Console in the fake console you can use setclassproperty to change things.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Fake Console Breakthrough!

Post by Maveritchell »

...and? What is the breakthrough?
User avatar
Tourny
Command Sergeant Major
Command Sergeant Major
Posts: 289
Joined: Sat Sep 27, 2008 5:58 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Crifton
Contact:

Re: Fake Console Breakthrough!

Post by Tourny »

It means you can change your game while your in it. We used it to give a Super Battle Droid 1 Hp. Now everything kills it. I guess it's better for RPGing, but I thought gametoast should know if it didn't already.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Fake Console Breakthrough!

Post by Maveritchell »

Tourny wrote:It means you can change your game while your in it. We used it to give a Super Battle Droid 1 Hp. Now everything kills it. I guess it's better for RPGing, but I thought gametoast should know if it didn't already.
I am willing to bet everyone who read the readme that came with the download already knew, since that's exactly what the Code Console was designed for.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Fake Console Breakthrough!

Post by Teancum »

Yep, if folks read the documentation/release threads thoroughly they'd see this isn't something new.

Glad you found it though.
User avatar
Tourny
Command Sergeant Major
Command Sergeant Major
Posts: 289
Joined: Sat Sep 27, 2008 5:58 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Crifton
Contact:

Re: Fake Console Breakthrough!

Post by Tourny »

lol. People are lazy, what do you expect?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Fake Console Breakthrough!

Post by Maveritchell »

Tourny wrote:lol. People are lazy, what do you expect?
I have grown to expect less and less, but I would imagine that when someone makes a readme, they expect people to read it.
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: Fake Console Breakthrough!

Post by Par3210 »

it would be good if you could post all the commands for code console that you can change or at least some of them
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 Breakthrough!

Post by [RDH]Zerted »

The Code Console runs Lua code. You can type any Lua code into it and it will attempt to run it. As for what you can change with SetClassProperty, its any ODF parameter.

Glad you're trying new things, but thats what that command is for.
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: Fake Console Breakthrough!

Post by Par3210 »

RDH Zerted would it be possible to add/get rid of unit classes ingame via code console? If so it would be absoultley awesome.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Fake Console Breakthrough!

Post by Fierfek »

Par3210 wrote:RDH Zerted would it be possible to add/get rid of unit classes ingame via code console? If so it would be absoultley awesome.
You could add units, but I don't know about removing them.....
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: Fake Console Breakthrough!

Post by Par3210 »

how would you add them
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Fake Console Breakthrough!

Post by Fierfek »

Par3210 wrote:how would you add them
Use the addunit class function. So, you would type in:

Code: Select all

AddUnitClass(ALL, "rep_hero_kiyadimundi",1,2)
AddUnitClass tells it to add this to the game. ALL specifies the team (in this case, the alliance). Then, it specifies which unit to add (in this case, rep_hero_kiyadimundi). Then, you put in the minimum number of that class, followed by the maximum (units on the field). If you're wondering what Ki-Adi is doing with the rebels, this script is from Hero Assault.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Fake Console Breakthrough!

Post by Teancum »

Yeah, but I dunno - can you add units on the fly? I've never tried it outside of initial startup of the level.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Fake Console Breakthrough!

Post by Frisbeetarian »

Sure, check Mav's FFX Lua script.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Fake Console Breakthrough!

Post by Fierfek »

But would the new unit have to be read in the read side part of the lua? Or does it automatically read it when you type the command?
And is it possible to add weapons to units with this command? Like adding a jawa and giving him a chaingun? That would be sweet!
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Fake Console Breakthrough!

Post by Teancum »

Well, it'd be multiple lines, but it might be possible to do. Just make your Jawa side, and place it in /Star Wars Battlefront II/DATA/_LVL_PC/SIDE.

Then in the Fake Console

1-ReadDataFile("MyUberJawa.lvl", "tat_inf_uberjawa")
2-Press enter
3-AddUnitclass(ALL, "tat_inf_uberjawa", 1, 2)
4-Press enter
5-Respawn

If it worked, that would be the only way it could. Otherwise you're looking at a lot of lines of code. It's just easier to make a "Uber Unit" side, then load that side on the fly. Then you've got your units set up, and you only have to type two lines of code on any level.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Fake Console Breakthrough!

Post by Frisbeetarian »

You wouldn't have to go through all that. You can do it all in one executable code console line and you don't have to make a new side.

Code: Select all

ReadDataFile("des.lvl", "tat_inf_jawa");AddUnitclass(ALL, "tat_inf_jawa", 1, 2);SetClassProperty(however you want the weapon set up)
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Fake Console Breakthrough!

Post by Teancum »

Yeah, but odds are they don't just want to set one property of the unit. If they want to add some uber-weapon then they'll want to add super-speed, infinite health, and a toaster oven to that unit, meaning multiple SetProperty() lines.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Fake Console Breakthrough!

Post by Fierfek »

It would be interesting to mess around with it, but in the end, it would just be less trouble to add the class in the lua.
Post Reply