• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Cleaned] AI Questions

Status
Not open for further replies.
Level 6
Joined
Apr 23, 2011
Messages
182
Trying to make the Insane Ai create more units and set the supply of the worker to -0.5 instead of -1.
However, it doesn't change anything for the AI
If I set Zergling production to 3 instead of two, same thing happens.

How do I set the AI to consider supply?
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
They are programmed to meet certain unit goals. Changing units will obviously break the AI as they will not be able to reach the unit goals.

How do I set the AI to consider supply?
You need to write your own AI. Fortunately SC2 AI is nothing more than trigger script, so you can do it all in the trigger editor.

I am not saying AI is completely bug free, you can get it into states where it produces units infinitely to restock dead standing placements but that is hardly a problem.
 
Last edited by a moderator:
Level 6
Joined
Apr 23, 2011
Messages
182
I am pretty good with the WC3 AI editor but I can't work it out with SC2. It only contains Attack Waves but not even Conditions.

Heard from many people in the offcial forum that the only way to do it is with C++ but I don't know about this.

Is it possible to look into the settings of the Insane AI?

Thanks again Dr Super Good.
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
I am pretty good with the WC3 AI editor but I can't work it out with SC2. It only contains Attack Waves but not even Conditions.
SC2 has no AI editor as I said...

In Warcraft III AI used a different JASS interpreter from normal triggers (trying to run most natives from one in the other caused a fatal error). StarCraft II runs AI using the same galaxy script as the trigger editor so in reality AI is nothing more than triggers. GUI seems to lack some constants for some of the AI natives but if you ignore that and resort to the odd line of Galaxy you can make fully competent AI using GUI triggers. If you look at standard insane AI it is nothing more than a collection of functions calling AI natives with some globals (usually in the form of player constants, a special native to bind them to players) to handle state.

Heard from many people in the offcial forum that the only way to do it is with C++ but I don't know about this.
SC2 does not support C++ so clearly those people are talking shit. You can write AI using standard GUI triggers although it may not be as optimized as if you wrote directly in galaxy script and you will still be forced to use galaxy script for some calls as you cannot define the necessary constants in GUI due to missing constant values. An example of what is missing are various AI activity constants that are used when turning an AI activity on or off (which define behaviour done by the AI game engine instead of trigger logic). An example of what is missing is the ability to toggle if the AI is extra aggressive to building near their base (to stop tower rushes) but like mentioned earlier you can use a simple line of custom script to toggle that behaviour.

Is it possible to look into the settings of the Insane AI?
Sure but I have not dumped it yet. I would post the Terran5 one from WoL before HotS was released but that is 130,000 characters long, too big for a post.

AI uses some form of army composition system to generate balanced attack waves. If you want a really powerful AI with new units (like campaign units) it might be best to specify your own compositions. If it has cheated resources consider only building the most expensive stuff and also to order a lot more production buildings so it does not become production blocked.
 
Last edited by a moderator:
Status
Not open for further replies.
Top