Page 1 of 1

How would I use fake console to lower AI on my side?

Posted: Sun Jun 27, 2010 8:50 pm
by hypshadowthehedgehog
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)

Re: How would I use fake console to lower AI on my side?

Posted: Sun Jun 27, 2010 8:53 pm
by Darth_Squoobus
Didn't you ever notice the "add reinforcements team 1/2" button?

Re: How would I use fake console to lower AI on my side?

Posted: Sun Jun 27, 2010 9:05 pm
by CressAlbane
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.

Re: How would I use fake console to lower AI on my side?

Posted: Sun Jun 27, 2010 10:07 pm
by Darth_Squoobus
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.
Well there's no way to do that ingame, not even with fake console. You need a full-out mod for that.

Re: How would I use fake console to lower AI on my side?

Posted: Sun Jun 27, 2010 10:21 pm
by Maveritchell
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.
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."

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)

Re: How would I use fake console to lower AI on my side?

Posted: Mon Jun 28, 2010 2:29 am
by fasty
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.

Re: How would I use fake console to lower AI on my side?

Posted: Mon Jun 28, 2010 8:55 am
by myers73
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

Re: How would I use fake console to lower AI on my side?

Posted: Mon Jun 28, 2010 12:51 pm
by hypshadowthehedgehog
I'm having trouble getting the fake console command to work
I've tried several different variations (as in spacing) of:
SetUnitCount(1, 8)

Re: How would I use fake console to lower AI on my side?

Posted: Mon Jun 28, 2010 1:06 pm
by myers73

Code: Select all

SetUnitCount(1, 8)
SetUnitCount(2, 8)

Re: How would I use fake console to lower AI on my side?

Posted: Mon Jun 28, 2010 1:38 pm
by Maveritchell
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, 8)
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.

Re: How would I use fake console to lower AI on my side?

Posted: Tue Jun 29, 2010 1:07 pm
by hypshadowthehedgehog
well, i guess i'll just have to disallow ai spawn. Great. My two brothers, my sister, and I vs. computers. sweet

Re: How would I use fake console to lower AI on my side?

Posted: Fri Jul 02, 2010 2:13 am
by [RDH]Zerted
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.

Re: How would I use fake console to lower AI on my side?

Posted: Fri Jul 02, 2010 7:20 pm
by myers73
no bots will spawn, or it will revert to default