help with toss AI

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
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

help with toss AI

Postby Taranok » Fri Dec 30, 2011 12:37 am

Hi!

I'm working on my Protoss Ai but for some reason in the middle of the code, it will start producing Dragoons, even though I dont have any commands to do so. It'll stop once it produces the units in the code start producing, and then it after that it resumes to mass producing Dragoons. /dry.gif' class='bbc_emoticon' alt='<_<' />

Also, I put in attack_add(4, Protoss Archon), they morph, but they never join in the attack group, and are left in base.
[s]Please help![/s] Resolved
thanks
User avatar
Myk
Posts: 257
Joined: Sat Jun 13, 2009 12:56 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 Myk » Fri Dec 30, 2011 1:46 am

[quote name='Taranok' date='29 December 2011 - 04:37 PM' timestamp='1325205422' post='10544']
Hi!

I'm working on my Protoss Ai but for some reason in the middle of the code, it will start producing Dragoons, even though I dont have any commands to do so. It'll stop once it produces the units in the code start producing, and then it after that it resumes to mass producing Dragoons. /dry.gif' class='bbc_emoticon' alt='<_<' />

Also, I put in attack_add(4, Protoss Archon), they morph, but they never join in the attack group, and are left in base.

Please help!
thanks
[/quote]
It helps if you post the AI script.
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 » Fri Dec 30, 2011 3:28 am

User avatar
Myk
Posts: 257
Joined: Sat Jun 13, 2009 12:56 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 Myk » Fri Dec 30, 2011 4:08 am

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 Dec 31, 2011 6:40 pm

Thanks Myk! :D

intense = too complicated?

anyways, i wrote it myself without looking at other scripts just to see where I could get. That's probably why it is not very good...

I'll try the changes as soon as I can.

So then i can leave train(8, high templar) out and just have train(4, Protoss Archon)?
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 Dec 31, 2011 6:55 pm

OK!

I'm back after running a few tests....

Good:
The dragoon spam stopped to some degree....
It beat blizzard zerg AI!

Bad:
It was one of the more lousier scripts of Blizzard.
It only sends one observer, even though I ordered it to send 3 to the attack group.

Ugly:
It's really weird now because it does like an attack first without archons first, but then backs out, and then does another attack with archons, this time all the way to the finish.

That's if it doesn't die first.
User avatar
Myk
Posts: 257
Joined: Sat Jun 13, 2009 12:56 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 Myk » Sun Jan 01, 2012 4:07 am

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 » Sun Jan 01, 2012 5:37 am

defensebuild: I read on the forums that it can screw up your script or something... that's why I don't use it.

Actually even with the defaultbuild_off it still builds more dragoons than I tell it to (about 5 or 6), but it doesn't build as many as before.

defense_use: If you don't use it wouldn't units not defend expansions?

Observers: Wouldn't you have hard time attacking any zerg base with lurkers and spores? I test my AI against Blizzard Zerg and the observer always dies, and then the lurkers usually kill the rest of the units. eventually.

I'm pretty sure wait finishattack works.

player_need: not sure why I still have that, maybe that's why my script doesn't do anything for like a minute.
User avatar
Myk
Posts: 257
Joined: Sat Jun 13, 2009 12:56 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 Myk » Sun Jan 01, 2012 8:00 am

[quote name='Taranok' date='31 December 2011 - 09:37 PM' timestamp='1325396253' post='10552']
defensebuild: I read on the forums that it can screw up your script or something... that's why I don't use it.

Actually even with the defaultbuild_off it still builds more dragoons than I tell it to (about 5 or 6), but it doesn't build as many as before.

defense_use: If you don't use it wouldn't units not defend expansions?

Observers: Wouldn't you have hard time attacking any zerg base with lurkers and spores? I test my AI against Blizzard Zerg and the observer always dies, and then the lurkers usually kill the rest of the units. eventually.

I'm pretty sure wait finishattack works.

player_need: not sure why I still have that, maybe that's why my script doesn't do anything for like a minute.
[/quote]

defensebuild needs to be used with care, but it won't outright break anything. Some scripts it works great in, others it can slow it down. It depends a lot on script structure.

defenseuse is fine, but I don't tend to notice any effect of calling it multiple times. If you do, ignore me. :)

Obs: I tried a few times with a test script and couldn't ever get more than 1 in an attack.


Happy new years!
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 » Mon Jan 02, 2012 5:34 am

defensebuild: my structure seems pretty badly written...

So then how do you deal with lurkers if your observer dies?

Happy New Year! :D

By the way do you know if there will be a BWAIWarV? I definitely want to participate if there is.

[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 2 guests