SCAIEdit III list of commands

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
User avatar
ashara
Posts: 170
Joined: Wed Feb 06, 2008 11:12 pm

Postby ashara » Fri Feb 29, 2008 6:12 pm

I have done a bit of testing over the random commands.
Basically, the command set_randomseed seems to have no effects at all. The two parameters for this command are integers from 0 to 65535.

1 player tests
[spoiler]Second player script do nothind, it was

Code: Select all

...
wait 12000
goto end_loop

:end_loop
wait 12000
goto end_loop


In all my tests I assume that same AI scripts + same replay + same BW version -> same results (I have found no exceptions so far, but Mesk had different results sometimes)

Code: Select all

...
wait 1000
set_randomseed 100 100
wait 100
random_jump 247 test_rand1
build 5 scv 80
wait_buildstart 5 scv
goto end_loop

:test_rand1
build 1 barracks 80
wait_buildstart 1 barracks
goto end_loop

The replay I used switched between random_jump 247 and random_jump 248. I tried different parameters for set_randomseed, I always got the switch for 247/248. Even without the command set_randomseed it switched at 247/248. After the random_jump, the critters moved differently, depending on the result of the random_jump.
I tried multiple set_randomseed, but it still has no effects.

Then I changed the wait 100 into a wait 1000. The results were different - switch was no more on the same values.

I tried several random_jump too without finding anything relevant.[/spoiler]

2 players tests
[spoiler]As random_jump influenced critters' moves there was probably an interaction between player randoms.
I modified the second player script by building a probe.

Code: Select all

wait 300
build 5 probe 80
wait_buildstart 5 probe
wait 12000
goto end_loop

:end_loop
wait 12000
goto end_loop

This changed the results of random_jump in first script and critters' moves (even before the random_jump was called).[/spoiler]

Even basic commands like wait or building affect random results. I don't think it's possible to control random things (except in the very beginning of a script like the thing I used for mirror matches), and the set_randomseed command seems useless.
User avatar
ashara
Posts: 170
Joined: Wed Feb 06, 2008 11:12 pm

Postby ashara » Sun Apr 13, 2008 8:44 am

I have found a command used in BW campaign Terran script 08 B called help_iftrouble. I can't find it in ScAIEdit help, anyone tried this one ?
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Mon May 19, 2008 4:31 pm

Does anyone know what these commands do (they take no parameters):

switch_rescue - Switch computer to rescuable passive mode.
help_iftrouble - Ask allies for help if ever in trouble.
clear_combatdata - Clear previous combat data.
set_gencmd - Set generic command target. (STAREDIT)

Edit: Ok they wern't in the help file but I open SCAIEdit and used the code editor F2 tooltips to get the descriptions.
a_of_s_t
Posts: 51
Joined: Sun Mar 23, 2008 5:39 am

Postby a_of_s_t » Fri Jul 25, 2008 2:09 am

scout_with()

Scout_with() is used in ZMCu (sorry, the actual name of the script slips my mind) and is used as: scout_with(zerg scourge). The thing is, scourges aren't created the usual way using the train() command, but rather, use the defensebuild_aa() and defenseuse_aa(). This is the ONLY way I have gotten my scourges to actually go into attacks and such. So, now new questions arise:

#1. Why are scourges only created with the defensebuild_xx() command?

#2. Does scout_with() actually do anything with these scourges, and if so, why?
IskatuMesk
Posts: 329
Joined: Wed May 16, 2007 5:57 pm

Postby IskatuMesk » Wed Jul 30, 2008 8:49 pm

clear_combatdata - Clear previous combat data.


resets attack target (ie, the next attack group will chose a different, random target)
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Thu Jan 08, 2009 11:06 am

try_townpoint (needs definition)
allies_watch (needs definition)
fake_nuke (needs definition)
wait_finishattack (needs verification)
if_dif (needs definition)
guard_all (needs definition)
implode (needs definition)
prep_down (needs definition)
wait_upgrades (needs definition)
eval_harass (needs definition)
harass_factor (needs definition)
default_build / defaultbuild_off (needs definition)
wait_turrets / build_turrets (needs definition)
default_min (needs definition)
wait_bunkers / build_bunkers (needs definition)
capt_expand (needs definition)
wait_secure (needs definition)

What is the difference between start_town and start_areatown?
What does "start_campaign" do specifically?

"defaultbuild_off" and "default_min 0" are used commonly at the beginning of Blizzard scripts.
User avatar
Archon_Wing
Posts: 901
Joined: Wed Jul 25, 2007 11:22 pm

Postby Archon_Wing » Thu Jan 08, 2009 12:04 pm

In the campaign editor, the area town AIs only mine resources.
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Thu Jan 08, 2009 3:42 pm

Yes, but what does the opcode do specifically?
silvermax
Posts: 9
Joined: Fri Mar 27, 2009 4:49 am

Postby silvermax » Fri Mar 27, 2009 4:53 am

wait_finishattack means when the attacking party ends its attack. but not sure if this mean that when the attacking stops their attack, for example when the attackers were killed; or just when the attacking procces is being ejecuted....
Well i first try to test my theories :P

Another nteresting thing about rush (number) (blockX) is that i found various rush command in terran custom level script, and always before the following scripts:

rush X block Y
attack_add
attack_prepare

:block Y
instructions
instructions
attack_do

Where X should be a type of identifier of progress of enemy they are preparing to attack, like you can see in Terran Custom level Script, this number starts in 5, they are attacking with marines, in 6 attacks with marines and firebats and start build tanks, in 7 adds that tanks to attack party with marines and builds starports and wraiths. and so on...
But in next rush they only adds marines again (10 - 11)But yes, they prepare a lot of defenses and upgrades (ghost, battecruissers...) in this part of script only see placeguard_ghost and bc.
[spoiler]rush 5 block4
attack_add 12 marine
attack_prepare
build 3 barracks 80
wait_buildstart 3 barracks

:block4
build 20 scv 80
wait_buildstart 20 scv
build 1 factory 80
wait_buildstart 1 factory
define_max 16 marine
train 16 marine
train 1 firebat
upgrade 1 marine_range 70
defensebuild_gg 1 marine
defensebuild_ag 1 marine
farms_timing
train 3 firebat
build 3 barracks 80
wait_buildstart 3 barracks
build 1 machine_shop 80
wait_buildstart 1 machine_shop
train 6 firebat
tech siege_mode 80
wait_force 6 marine
wait_force 8 firebat
attack_do
attack_clear
rush 6 block5
attack_add 6 marine
attack_add 8 firebat
attack_prepare
define_max 6 firebat

:block5
race_jump block6 block7 block7

:block7
defensebuild_gg 1 firebat

:block6
build 1 machine_shop 80
wait_buildstart 1 machine_shop
define_max 8 siege_tank
define_max 4 vulture
build 1 engineering_bay 80
wait_buildstart 1 engineering_bay
define_max 18 marine
train 18 marine
tech siege_mode 80
train 1 siege_tank
upgrade 1 t_infantry_weapon 70
define_max 20 marine
train 20 marine
train 2 siege_tank
define_max 22 marine
train 22 marine
train 3 siege_tank
panic block8
wait_force 3 siege_tank
attack_do
attack_clear
rush 7 block9
attack_add 12 marine
attack_add 3 siege_tank
attack_prepare

:block9
build 1 starport 80
wait_buildstart 1 starport
multirun block10
train 4 siege_tank
build 1 control_tower 80
wait_buildstart 1 control_tower
train 5 siege_tank
define_max 24 marine
train 24 marine
train 1 dropship
check_transports
build 1 armory 80
wait_buildstart 1 armory
defensebuild_gg 1 siege_tank
wait_force 1 dropship
expand 1 block8
guard_resources marine
define_max 1 wraith
train 1 wraith
build 1 comsat_station 80
wait_buildstart 1 comsat_station
tech cloaking_field 80
train 5 siege_tank
upgrade 1 t_vehicle_weapon 70
define_max 4 wraith
train 4 wraith
build 1 science_facility 80
wait_buildstart 1 science_facility
upgrade 1 t_ship_weapon 70
build 2 starport 80
wait_buildstart 2 starport
build 1 covert_ops 80
wait_buildstart 1 covert_ops
build 2 control_tower 80
wait_buildstart 2 control_tower
place_guard ghost 0
place_guard ghost 2
multirun block11
define_max 6 wraith
train 6 wraith[/spoiler]My conclusion is that rush command acts like a multirun, the condition is the progress technology-military of the enemy. Here in Terran Custom level Script this looks to be used like a little "hurry-up" in executing the block below.
silvermax
Posts: 9
Joined: Fri Mar 27, 2009 4:49 am

Postby silvermax » Sat Mar 28, 2009 2:47 am

umm another detail just got: the farms_timing command builds pylons at higher priority (more than 150)

i destroyed all protoss base , only let alive the probes (around 18), they have more than 400 mineral, but they wasted them in build pylons lol.
This is true? i will try to check again, but if so there is not good idea to let the farms timing active.

Here is my script showing my use of farms_timing(i think the header does not cares here)[spoiler];-----max per unit-----
define_max 100 probe
define_max 100 zealot
define_max 100 dragoon
define_max 100 reaver
define_max 100 scout
define_max 100 shuttle
define_max 100 carrier
define_max 100 observer
define_max 100 corsair
define_max 100 high_templar
define_max 100 dark_archon
define_max 100 archon
define_max 100 arbiter
define_max 100 dark_templar

; ----BASE-------
build 1 nexus 150
wait_build 1 nexus
build 4 probe 130
wait_build 4 probe

build 5 probe 80
wait_buildstart 5 probe
build 6 probe 80
wait_buildstart 6 probe
build 1 pylon 80
wait_buildstart 1 pylon
build 7 probe 80
wait_buildstart 7 probe
build 8 probe 80
wait_buildstart 8 probe

wait_build 1 pylon
build 1 gateway 80
wait_buildstart 1 gateway
build 2 pylon 80
wait_buildstart 2 pylon
wait_build 1 gateway
train 1 zealot
build 3 gateway 80
wait_build 3 gateway

farms_timing

build 9 probe 80
wait_buildstart 9 probe
build 10 probe 80
wait_buildstart 10 probe
build 1 assimilator 80
wait_buildstart 1 assimilator

wait_build 1 pylon
build 2 forge 80
wait_buildstart 2 forge

build 11 probe 80
wait_buildstart 11 probe

:attack1

wait_build 1 gateway
train 6 zealot
attack_add 6 zealot
attack_prepare
attack_do
attack_clear

goto attack1[/spoiler]

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 2 guests