AI vs Campaign

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Stealthy71088
Posts: 1
Joined: Fri Aug 19, 2011 6:22 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

AI vs Campaign

Postby Stealthy71088 » Fri Aug 19, 2011 6:49 pm

Hey! So I found this forum just a couple days ago, and I've just started writing my own AI. I'm attempting to write ai that can play through the campaign on its own. I've already finished the first 4 missions of the original Terran campaign. So far it hasn't been too bad, and I'm allowing myself to use triggers for micro. Would you guys be interested in seeing it for yourselves? If so what's the best format to use?


I have a few questions though. First- is there any scripted command to make infantry enter bunkers on their own? I can use triggers, but I risk catching scvs instead.

Second-The tutorial says to use the build command to make gatherers. I am finding that train is the only command that will produce scvs. Is this unusual?

I'm also finding that I have to use the player_need command to get gas as the ai for whatever reason will not build a refinery on its own. Is this common problem or just my code?

Finally, I am using the defensebuild, defenseuse and defenseclear commands, as well as guard_all for defense. I find that my ai will send small groups of units at a time to defend, and not necessarily as much as I would like. Is there a way to modify this?

I have a ton more questions but I think that's enough for now. I find all of this very exciting work, and I look forward to working with you in the future. -Stealthy
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Heinermann » Sun Aug 21, 2011 1:42 pm

User avatar
Taranok
Posts: 256
Joined: Tue Sep 07, 2010 9:41 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Taranok » Sat Aug 27, 2011 3:54 pm

I can imagine having trouble on missions with limited units.

I've also been thinking about making AI to play on custom maps.
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Archon_Wing » Sat Sep 10, 2011 11:21 pm

Defense commands are very specific. I recommend you input all possibilities for each unit you want to use to defend.

defenseuse_gg(1, marine)
defenseuse_ga(1, marine)
defenseuse_aa(1, marine)
defenseuse_ag(1, marine)

not just

defenseuse_gg(1, marine)-- it would only use marines to defend against ground units. :S

The first letter (g or a) refers to the unit's attack (anti-ground or anti-air) so siege tanks, for example, which can only attack ground can only use these two commands

defenseuse_gg(2, siege_tank)
defenseuse_ga(2, siege_tank)

AA or ag with siege_tank will crash the game...

These commands are best used only once unless you have a defenseclear command, where then you must refresh every defense command.


Defensebuild tends to be a very sporadic command, and works best when used sparingly (probably once per unit per possibility in script. Unfortunately it tends to build too many units of one kind which throws the script off so I don't like using it til it builds the desired stuff first.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 1 guest