AIScript Commands

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
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

AIScript Commands

Postby Heinermann » Sun Dec 30, 2012 8:12 am

Last edited by Google Adsense [Bot] on Sun Dec 30, 2012 6:40 pm, edited 1 time in total.
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

Re: AIScript Commands

Postby Heinermann » Sun Dec 30, 2012 8:12 am

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

Re: AIScript Commands

Postby Heinermann » Sun Dec 30, 2012 8:13 am

List of commands Implemented in BWScriptEmulator
*Fully implemented (includes acceptable behavior for a script)
*Partially implemented
*Unimplemented


goto
notowns_jump
wait

start_town
start_areatown
expand
build
upgrade
tech
wait_build
wait_buildstart

attack_clear
attack_add

attack_prepare
attack_do

wait_secure
capt_expand
build_bunkers
wait_bunkers

defensebuild_gg
defensebuild_ag
defensebuild_ga
defensebuild_aa
defenseuse_gg
defenseuse_ag
defenseuse_ga
defenseuse_aa
defenseclear_gg
defenseclear_ag
defenseclear_ga
defenseclear_aa

send_suicide
player_enemy
player_ally

default_min
defaultbuild_off

stop
switch_rescue
(Allies all players)
move_dt
debug
fatal_error
(does not crash)
enter_bunker
value_area
transports_off
check_transports
nuke_rate
max_force

clear_combatdata
random_jump
time_jump

farms_notiming
farms_timing

build_turrets
wait_turrets

default_build
harass_factor
start_campaign
race_jump

region_size
get_oldpeons

groundmap_jump
place_guard
wait_force
guard_resources
call (unlimited calls)
return (unlimited calls)
eval_harass
creep
panic

player_need
do_morph
wait_upgrades

multirun
rush
scout_with (original behaviour only)
define_max
train
target_expansion

wait_train
set_attacks
set_gencmd
make_patrol
give_money
(Uses cheat codes)
prep_down
resources_jump
enter_transport
exit_transport
sharedvision_on
(reverse vision)
sharedvision_off (reverse vision)
nuke_location
harass_location (original behaviour only)
implode
guard_all

enemyowns_jump
enemyresources_jump
if_dif

easy_attack
kill_thread
killable

wait_finishattack
quick_attack

junkyard_dog
fake_nuke
disruption_web
recall_location
set_randomseed
if_owned
create_nuke
(does nothing)
create_unit (does nothing)
nuke_pos
help_iftrouble
allies_watch
try_townpoint
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

Re: AIScript Commands

Postby Heinermann » Sat Jan 05, 2013 9:37 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

Re: AIScript Commands

Postby Taranok » Mon Jan 28, 2013 8:28 am

hmmm am i supposed to post here with questions?

anyway clearly capt_expand does other strange things, like increase spider mine placements area, and widen patrol area of observers and overlords. and it doesn't expand at all? Also I noticed that it didn't really do anything unless I put it in an expansion script.
super1
Posts: 6
Joined: Sun Jan 27, 2013 11:55 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

Re: AIScript Commands

Postby super1 » Mon Jan 28, 2013 2:47 pm

The capt_expand command is explained in more detail in the old thread - see page 5. Have in mind that the command is stackable with itself and overuse may lead to some suicidal overlords/observers.
capt_expand is also used to enable the "defenseuse_ga" and "defensebuild_ga" commands (see below).

defensebuild_aa and defenseuse_aa are specifically for enemy air units attacking the AI's base from normally unreachable (by ground units) terrain - over water, space, ridges, cliffs, base walls, etc.

The defensebuild_ga and defenseuse_ga are a bit...weird. I got them to work only when capt_expand is used. They trigger off:
1. Enemy ground units outside the AI's base attacking an air unit that is passing over unreachable terrain (see above) on it's way into the base.
2. Enemy ground units inside the AI's base attacking an air unit that is passing over unreachable terrain (see above) on it's way out of the base.

If Bunkers and Missile Turrets are build using only build_bunkers and build_turrets, they will not be rebuilt (if destroyed).

Each time a Bunker or a Missile Turret is build (or rebuild), a low priority place_guard command is run at the location of the structure, as follows:
- Missile turrets have a Ghost guard spot.
- Bunkers have a Ghost and a Siege Tank guard spot.
Since these are both very low priority there is a chance of them being ignored/delayed if the AI is busy training other units.

nuke_rate (byte) determines the time in minutes between ordering a single ghost to use Nuclear Strike, provided there are a Ghost and a Nuke available.
The AI may have more than 10 Nukes, but will still order Nuclear Strikes one at a time. Since the timer resets when the Ghost is ordered, and not when the Nuke actually launches, it is possible, with low timer to have multiple Nuclear Strikes.
Default value is "0", and fake_nuke resets the timer whenever it is entered in the script.
The Nuke is aborted if the ghost is disabled in any way during his way (not yet painting the target) - if killed,
under stasis field/maelstrom... or if the ghost must board a transport to reach the destination (Note that if a target is available when landing it may still proceed with the Nuke).

create_nuke requires a Nuclear Silo owned by the AI, or it is ignored.

There is a slight mistake in try_townpoint 's description - it will jump to %2(block) if the AI does not yet own %1 number of expansions.

It is also nice to know that wait_force orders units to be trained, and then waits for them to finish training (saw that somewhere in the forum).

And lastly (if anyone at all cares), move_dt orders all Dark Templar(Hero) to attack-move to the specified region.
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

Re: AIScript Commands

Postby Taranok » Sat Feb 02, 2013 1:37 am

"It is also nice to know that wait_force orders units to be trained, and then waits for them to finish training (saw that somewhere in the forum)."
so wait_force means you don't have to use the train command?

Is it possible to find out some of the commands that might be related to unit strengths? like max_force, eval_harass, harass_factor
super1
Posts: 6
Joined: Sun Jan 27, 2013 11:55 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

Re: AIScript Commands

Postby super1 » Thu Feb 07, 2013 8:57 pm

guard_all forces the AI to defend all defensive structures and units around the map. In Campaign scripts, where pre-placed units and building are common, if said units (or buildings) are outside the perimeter of a base
and are attacked, they will be ignored (the AI will not send units to defend them) . By using guard_all all these units will be defended if attacked. The command identifies the locations which must be defended at the moment it is run in the script. Units or structures build after that do not count. Each location (unit or structure) that must be defended is considered as potential overlord/observer patrol point and/or spider mine placement spot.

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