Multirun and Train

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
Dreadkillz
Posts: 13
Joined: Wed May 30, 2007 9:13 pm

Multirun and Train

Postby Dreadkillz » Sun Jun 10, 2007 3:34 am

I've been doing some test with my scripts, and I tried to structure it with multirun train commands so that I can have a steady amount of units without delaying my build order, but it seems that this doesn't work at all. It was only til my "main" script reached the stop command before it can even begin to train any units. I have only been doing this with Zerg, so I am not sure if this is true for other races.
Ahzz
Posts: 131
Joined: Wed Apr 25, 2007 6:03 am

Postby Ahzz » Sun Jun 10, 2007 8:17 am

this is just what I've noticed and I don't even get it WHY bajadulce said it.

Don't keep train commands on multiruns. I've noticed that when its like this it only builds 1 unit at a time, and the other 6 or whatever gateways sit idle.
In other words, for best training results always keep your train commands on the main part of the script. buildings or whatsoever can be multirunned without problems, of course.
IskatuMesk
Posts: 329
Joined: Wed May 16, 2007 5:57 pm

Postby IskatuMesk » Mon Jun 18, 2007 6:13 am

The script already has defensebuild commands strewn about it so I have no idea why there's any difference at all with the introduction of it into the attack sequence.

I tried that attack structure a while back and it resulted in no units being built at all.

Nothing short of infuriating that I've been at this for 5 years, am at the brink of finally defeating the long-living bugs of softlocking, but still am having issues. The warlord is still too slow and has softlock issues during teching, and sometimes the Hydra God will softlock during the hive period. Both of their final attack sequences now seem to function correctly.

So, here is both my current Hydra God and Warlord scripts for your review. They are using the campaign header.


CODE


:money
give_money
wait 500
goto money

:exp
start_town
build 2 hatchery 2
wait_build 1 hatchery
build 1 extractor 2
build 4 drone 2

:defensegradea4
build 4 creep_colony 30
wait_build 4 creep_colony
build 4 sunken_colony 30
wait_build 4 sunken_colony
build 8 creep_colony 30
wait_build 8 creep_colony
build 4 spore_colony 30
wait_build 4 spore_colony
stop

:block2
build 1 drone 40
wait_build 1 drone
build 2 drone 40
wait_build 2 drone
build 3 drone 40
wait_build 3 drone
build 4 drone 40
wait_build 4 drone
build 5 drone 40
wait_build 5 drone
build 6 drone 40
wait_build 6 drone
build 7 drone 40
wait_build 7 drone
build 8 drone 40
wait_build 8 drone
build 9 drone 40
wait_build 9 drone
build 10 drone 40
wait_build 10 drone
build 11 drone 1
wait_build 11 drone
build 12 drone 1
wait_build 12 drone
build 13 drone 1
wait_build 13 drone
build 14 drone 1
wait_build 14 drone
build 15 drone 1
wait_build 15 drone
build 16 drone 1
wait_build 16 drone
build 17 drone 1
wait_build 17 drone
build 18 drone 1
wait_build 18 drone
build 19 drone 1
wait_build 19 drone
build 20 drone 1
wait_build 20 drone
build 21 drone 1
wait_build 21 drone
build 22 drone 1
wait_build 22 drone
build 23 drone 1
wait_build 23 drone
build 24 drone 1
wait_build 24 drone
build 25 drone 1
stop

:block3
start_town
build 1 hatchery 2
wait_build 1 hatchery
build 1 drone 1
wait_build 1 drone
build 2 drone 1
wait_build 2 drone
build 3 drone 1
build 2 hatchery 2
wait 1000
goto defensegradea4

:warlord
multirun money
define_max 100 drone
define_max 30 zergling
define_max 20 hydralisk
define_max 6 lurker
define_max 30 mutalisk
define_max 8 guardian
define_max 8 devourer
define_max 10 scourge
define_max 6 ultralisk
define_max 6 defiler
define_max 6 queen
defensebuild_gg 1 zergling
defenseuse_gg 1 zergling
defensebuild_ga 1 zergling
defenseuse_ga 1 zergling
build 5 drone 1
wait_buildstart 5 drone
build 6 drone 1
wait_buildstart 6 drone
build 7 drone 1
wait_buildstart 7 drone
build 8 drone 1
build 1 spawning_pool 1
wait_buildstart 1 spawning_pool
build 9 drone 1
defensebuild_gg 1 zergling
build 3 hatchery 1
build 1 lair 10
wait_buildstart 9 drone
build 2 overlord 1
wait_buildstart 2 overlord
build 10 drone 1
upgrade 1 zergling_speed 1
wait_buildstart 10 drone
build 11 drone 1
wait_buildstart 11 drone
build 1 extractor 1
multirun block2
build 1 creep_colony 1
wait_buildstart 1 creep_colony
build 1 spawning_pool 1
wait_build 1 spawning_pool
build 1 sunken_colony 1
wait_buildstart 1 sunken_colony
build 2 lair 1
wait_buildstart 2 lair
expand 1 block3
farms_timing
tech burrowing 1
build 1 queen_nest 1
wait_buildstart 1 queen_nest
build 1 hive 1
wait_buildstart 1 hive
build 2 ultralisk_cavern 30
wait_buildstart 1 ultralisk_cavern
defensebuild_gg 1 ultralisk
defenseuse_gg 1 ultralisk
defensebuild_ga 1 ultralisk
defenseuse_ga 1 ultralisk
train 3 ultralisk
wait_train 3 ultralisk
attack_add 3 ultralisk
attack_prepare
attack_do
upgrade 1 zergling_attack 1
multirun olupgs
build 3 evolution_chamber 1
wait_buildstart 3 evolution_chamber
multirun zupgfull
build 2 spire 30
wait_buildstart 2 spire
defensebuild_gg 1 mutalisk
defenseuse_gg 1 mutalisk
defensebuild_ga 1 mutalisk
defenseuse_ag 1 mutalisk
defensebuild_ag 1 mutalisk
defenseuse_ga 1 mutalisk
defensebuild_aa 1 mutalisk
defenseuse_aa 1 mutalisk
defensebuild_aa 1 scourge
defenseuse_aa 1 scourge
build 2 hydralisk_den 30
wait_buildstart 2 hydralisk_den
defensebuild_gg 1 hydralisk
defenseuse_gg 1 hydralisk
defensebuild_ag 1 hydralisk
defenseuse_ag 1 hydralisk
defensebuild_ga 1 hydralisk
defenseuse_ga 1 hydralisk
defensebuild_aa 1 hydralisk
defenseuse_aa 1 hydralisk
multirun hydraupgs
wait 200
tech lurker_aspect 10
multirun defensegradea4
wait 500
multirun ultraupgs
multirun massexpand
wait 100
defensebuild_gg 1 lurker
defenseuse_gg 1 lurker
defensebuild_ga 1 lurker
defenseuse_ga 1 lurker


:warlordattack
attack_clear
clear_combatdata
send_suicide 0
wait 200
defensebuild_gg 1 lurker
defensebuild_gg 1 zergling
defensebuild_gg 1 hydralisk
defensebuild_gg 1 mutalisk
defensebuild_gg 1 ultralisk
defensebuild_gg 1 lurker
train 10 zergling
train 20 hydralisk
train 20 mutalisk
train 4 lurker
train 6 ultralisk
attack_add 10 zergling
attack_add 20 hydralisk
attack_add 20 mutalisk
attack_add 4 lurker
attack_add 6 ultralisk
attack_prepare
attack_do
wait 200

goto warlordattack





:hydragodnew
multirun money
define_max 100 drone
define_max 25 zergling
define_max 80 hydralisk
define_max 12 lurker
define_max 1 mutalisk
define_max 1 guardian
define_max 1 devourer
define_max 5 scourge
define_max 8 ultralisk
define_max 6 defiler
define_max 6 queen
defensebuild_gg 1 hydralisk
defenseuse_gg 1 hydralisk
defensebuild_ag 1 hydralisk
defenseuse_ag 1 hydralisk
defensebuild_ga 1 hydralisk
defenseuse_ga 1 hydralisk
defensebuild_aa 1 hydralisk
defenseuse_aa 1 hydralisk
defensebuild_gg 1 zergling
defenseuse_gg 1 zergling
defensebuild_ga 1 zergling
defenseuse_ga 1 zergling
build 5 drone 1
wait_buildstart 5 drone
build 6 drone 1
tech burrowing 1
build 1 spawning_pool 1
wait_buildstart 1 spawning_pool
build 7 drone 1
upgrade 1 zergling_speed 1
wait_buildstart 7 drone
build 8 drone 1
wait_buildstart 8 drone
build 5 hatchery 1
build 9 drone 1
wait_buildstart 9 drone
build 2 overlord 1
wait_buildstart 2 overlord
build 10 drone 1
wait_buildstart 10 drone
build 11 drone 1
build 1 lair 1
wait_buildstart 1 lair
multirun block2
build 1 extractor 1
build 2 hydralisk_den 1
wait_buildstart 2 hydralisk_den
expand 1 block3
upgrade 1 hydralisk_speed 1
upgrade 1 hydralisk_range 1
build 3 overlord 1
build 2 lair 1
train 20 hydralisk
wait_train 20 hydralisk
attack_add 20 hydralisk
attack_prepare
attack_do
attack_clear
clear_combatdata
send_suicide 0
multirun olupgs
build 3 evolution_chamber 1
wait_buildstart 3 evolution_chamber
multirun defensegradea4
train 6 hydralisk
upgrade 1 z_missile_attack 1
upgrade 1 z_melee_attack 1
upgrade 1 z_carapace 1
farms_timing
expand 2 block3
train 10 zergling
wait_train 10 zergling
attack_add 10 zergling
train 36 hydralisk
tech lurker_aspect 2
wait_train 36 hydralisk
attack_add 36 hydralisk
attack_prepare
attack_do
train 8 hydralisk
multirun upg23finishevo
build 1 queen_nest 1
wait_buildstart 1 queen_nest
build 1 hive 1
upgrade 1 zergling_attack 1
build 2 ultralisk_cavern 1
wait_buildstart 2 ultralisk_cavern
defensebuild_gg 1 lurker
defenseuse_gg 1 lurker
defensebuild_ga 1 lurker
defenseuse_ga 1 lurker
defensebuild_gg 1 ultralisk
defenseuse_gg 1 ultralisk
defensebuild_ga 1 ultralisk
defenseuse_ga 1 ultralisk
multirun ultraupgs
build 10 hatchery 20
multirun massexpand

:hydragawdat
attack_clear
clear_combatdata
send_suicide 0
wait 300
defensebuild_gg 1 lurker
defensebuild_gg 1 zergling
defensebuild_gg 1 hydralisk
defensebuild_gg 1 ultralisk
train 15 zergling
train 60 hydralisk
train 8 lurker
train 8 ultralisk
attack_add 5 zergling
attack_add 6 ultralisk
attack_add 44 hydralisk
attack_add 6 lurker
attack_prepare
attack_do
wait 200

goto hydragawdat

:upg23finish
upgrade 2 z_flyer_attack 10
upgrade 2 z_flyer_carapace 10
upgrade 2 z_carapace 1
upgrade 2 z_melee_attack 1
upgrade 2 z_missile_attack 1
wait 4000
upgrade 3 z_flyer_attack 10
upgrade 3 z_flyer_carapace 10
upgrade 3 z_carapace 1
upgrade 3 z_melee_attack 1
upgrade 3 z_missile_attack 1
stop

:zupgfull
upgrade 1 z_carapace 1
upgrade 1 z_melee_attack 1
upgrade 1 z_missile_attack 1
wait 4000
upgrade 1 z_flyer_attack 10
upgrade 1 z_flyer_carapace 10
wait 2000
upgrade 2 z_flyer_attack 10
upgrade 2 z_flyer_carapace 10
upgrade 2 z_carapace 1
upgrade 2 z_melee_attack 1
upgrade 2 z_missile_attack 1
wait 4000
upgrade 3 z_flyer_attack 10
upgrade 3 z_flyer_carapace 10
upgrade 3 z_carapace 1
upgrade 3 z_melee_attack 1
upgrade 3 z_missile_attack 1
stop

:upg23finishevo
upgrade 2 z_carapace 1
upgrade 2 z_melee_attack 1
upgrade 2 z_missile_attack 1
wait 4000
upgrade 3 z_carapace 1
upgrade 3 z_melee_attack 1
upgrade 3 z_missile_attack 1
stop

:massexpand
wait 9000
expand 99 exp
goto massexpand

:olupgs
upgrade 1 overlord_speed 1
upgrade 1 overlord_capacity 1
stop

:hydraupgs
upgrade 1 hydralisk_speed 1
upgrade 1 hydralisk_range 1
stop

:ultraupgs
upgrade 1 ultralisk_speed 1
upgrade 1 ultralisk_armor 1
stop

As you can guess, these scripts are built on very simple goals.

- Extremely fast, extremely aggressive teching/attacking
- Overwhelming economy/numbers that function on large and medium sized maps with more than 2 players, or are capable of defeating a player 1v1 with virtually no contest. When they work correctly, they can perform the latter goal very well.

I don't have them get queens because they always build more queens then what define_max allows them to. i.e, if define_max says 6, they'll usually build 20 or 30, which hogs supply.

I don't usually let them get defilers because their dark swarm placement usually hinders them more then benifets them. If I could have them soley spam plague, that would be a little better.

You'll also find my code structure to be a little more less spastic and "all over the place" then most of the stuff posted on this forum. I also don't care about adapting strategies, since not only do they take the fun out of the game since the AI knows what you have before you've even fought it, it also opens exploits in the build orders and unit compositions.

After looking at Zbath it's probable that my Z standard (that uses most of the units) will function in a similar fashion.
IskatuMesk
Posts: 329
Joined: Wed May 16, 2007 5:57 pm

Postby IskatuMesk » Mon Jun 18, 2007 6:34 am

The issue with my modding so long, especially with AI was, that while I was really good at it, I was completely on my own when I ran into issues. I've always had problems with the AI when it came to keeping stable during final loops, and often during major tech sequences.

Oddly enough some of the older scripts still work really well, like the carrier/battlecruiser rush scripts and the mass wraiths script which I intend to refurbish with my newer findings.
EasyChat
Posts: 60
Joined: Mon Apr 23, 2007 9:49 pm

Postby EasyChat » Mon Jun 18, 2007 1:44 pm

To make the A.I build just a few queens instead of not obeying the define_max you need to use the place_guard 0,1,2 etc.

Using this my QOB only builds 2 queens and 2 defilers, without it the Ai goes nuts on building them.

define_max 2 queen
place_guard queen 0
place_guard queen 1
...
IskatuMesk
Posts: 329
Joined: Wed May 16, 2007 5:57 pm

Postby IskatuMesk » Mon Jun 18, 2007 7:13 pm

Ah yes. I could use that. Thanks!

I just tested this.

multirun hydraupgs
wait 200
tech lurker_aspect 10
multirun defensegradea4
wait 500
multirun ultraupgs
multirun massexpand
wait 100
defenseuse_gg 1 lurker
defensebuild_ga 1 lurker
defenseuse_ga 1 lurker
defensebuild_gg 1 lurker
defensebuild_gg 1 zergling
defensebuild_gg 1 hydralisk
defensebuild_gg 1 mutalisk
defensebuild_gg 1 ultralisk
defensebuild_gg 1 lurker
:warlordattack
attack_clear
attack_add 10 zergling
attack_add 20 hydralisk
attack_add 20 mutalisk
attack_add 4 lurker
attack_add 6 ultralisk
wait_train 4 ultralisk
attack_prepare
attack_do
wait 200

goto warlordattack


They expanded and upgraded, but refused to make any units or attack.

I also tried that in the Hydra God script, and out of 5 zerg who got to 3/3, not a single one built units or attacked.

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 1 guest