How would I use fake console to lower AI on my side?
Moderator: Moderators
- hypshadowthehedgehog
- Private First Class
- Posts: 88
- Joined: Wed Mar 11, 2009 5:38 pm
How would I use fake console to lower AI on my side?
How would I use fake console to lower AI on my side? I don't see any option for that (other than reinforcements). Currently, both sides have 32 AI. Let's say I want to give my side, say, 8 AI. Is there any way I could do this with fake console, or would I have to make a full out mod? (I also wouldn't mind making a way for this to happen automatically so I don't have to do this at the beginning of every map)
-
Darth_Squoobus
- General

- Posts: 760
- Joined: Mon Aug 03, 2009 3:21 am
- Projects :: No Mod project currently.
- Location: over the hills and far away
Re: How would I use fake console to lower AI on my side?
Didn't you ever notice the "add reinforcements team 1/2" button?
-
CressAlbane
- Master Bounty Hunter

- Posts: 1519
- Joined: Fri Dec 18, 2009 8:02 am
- Projects :: CTF Arenas
- Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı
Re: How would I use fake console to lower AI on my side?
Dath_Squoobus, that seems a little rude, and he was even asking that. He wants to change the number of units on the field not the reinforcements.
-
Darth_Squoobus
- General

- Posts: 760
- Joined: Mon Aug 03, 2009 3:21 am
- Projects :: No Mod project currently.
- Location: over the hills and far away
Re: How would I use fake console to lower AI on my side?
Well there's no way to do that ingame, not even with fake console. You need a full-out mod for that.CressAlbane wrote:Dath_Squoobus, that seems a little rude, and he was even asking that. He wants to change the number of units on the field not the reinforcements.
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: How would I use fake console to lower AI on my side?
It is one thing to dodge a mistake when you have a legitimate and correct answer. It is another to dodge a mistake and then be incorrect as well. It's okay to say "my mistake" and then "I think... etc."Darth_Squoobus wrote:Well there's no way to do that ingame, not even with fake console. You need a full-out mod for that.
In this case you are mistaken in saying that you can't "do that ingame...even with fake console." I don't know if there is a specific console command for doing that directly, but since "SetUnitCount" is a valid LUA callback, you can use Zerted's code console to directly set the unit count of a particular team. Use "code console," type:
Code: Select all
SetUnitCount(team#, unitcount)-
fasty
- 1st Lieutenant

- Posts: 438
- Joined: Thu Apr 15, 2010 4:17 am
- Projects :: Server modding
- Contact:
Re: How would I use fake console to lower AI on my side?
What I do is I click "kill all ai on team 1 & 2" then I click "number of bots" and type in whatever number I want. The number of bots will spawn in. Of course it only works for both teams. Hope it helps.
-
myers73
- Lieutenant General

- Posts: 690
- Joined: Fri Apr 03, 2009 11:04 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Atlanta, GA xfire=myers73 IngameName=mYers
Re: How would I use fake console to lower AI on my side?
If you want it to happen every map write a custom user_script (direction in the 1.3 documentation, so please dont ask how) and use the code Maveritchell posted
- hypshadowthehedgehog
- Private First Class
- Posts: 88
- Joined: Wed Mar 11, 2009 5:38 pm
Re: How would I use fake console to lower AI on my side?
I'm having trouble getting the fake console command to work
I've tried several different variations (as in spacing) of:
SetUnitCount(1, 8)
I've tried several different variations (as in spacing) of:
SetUnitCount(1, 8)
-
myers73
- Lieutenant General

- Posts: 690
- Joined: Fri Apr 03, 2009 11:04 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Atlanta, GA xfire=myers73 IngameName=mYers
Re: How would I use fake console to lower AI on my side?
Code: Select all
SetUnitCount(1, 8)
SetUnitCount(2, 8)
- Maveritchell
- Jedi Admin

- Posts: 7366
- Joined: Mon Aug 21, 2006 11:03 pm
Re: How would I use fake console to lower AI on my side?
I honestly don't know if that'll work anywhere besides the ScriptInit section - so I may have been wrong in suggesting that. In any case, it looks like Zerted built that in to the fake console anyway (Add Units to Team X). If you're trying to set up an unbalanced game, you can always disallow AI spawn on your side - that I know will work.hypshadowthehedgehog wrote:I'm having trouble getting the fake console command to work
I've tried several different variations (as in spacing) of:
SetUnitCount(1,
- hypshadowthehedgehog
- Private First Class
- Posts: 88
- Joined: Wed Mar 11, 2009 5:38 pm
Re: How would I use fake console to lower AI on my side?
well, i guess i'll just have to disallow ai spawn. Great. My two brothers, my sister, and I vs. computers. sweet
- [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: How would I use fake console to lower AI on my side?
Yes, use the Add Units to Team 1 and/or the Add Units to Team 2 fake console commands. They accept negative numbers, so if you want to reduce the AI by 5 bots, type in -5 when it prompts you for the amount of units to add. Afterwards, you will need to kill all the bots for it to take effect. In testing, I think it mostly worked... It should work in SP, it may work in MP if you're the host, and it won't work in MP if you're not the game's host. I don't know what happens if you set the amount of units on a team below zero.
-
myers73
- Lieutenant General

- Posts: 690
- Joined: Fri Apr 03, 2009 11:04 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Atlanta, GA xfire=myers73 IngameName=mYers
Re: How would I use fake console to lower AI on my side?
no bots will spawn, or it will revert to default
