Micro Grid2

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Micro Grid2

Postby Heinermann » Wed Apr 25, 2007 4:38 pm

Current grid is now obsolete.

A more efficient and smarter(terrain accomodation, unit surroundings) grid will take its place, later cause it's nap time. :)


Notes:

CODEMicro Grid work

------

Previous grid is inconsistent with number of units on the field.

MORE SPEED REQUIRED!!!


Current system manages like 12 units, 20 would run much slower! Get #of units in a death counter! Use death counter to determine speed triggers fire at. Copy ENTIRE LIST OF TRIGGERS 2-4 more times for speed! <-- These would use extra death conditions to work dependantly with the first set.

New movement system?

Get rid of surrounding detection completely. Remake movement scripts.


+-+-+-+
|7|8|9|
+-+-+-+
|4|5|6|
+-+-+-+
|1|2|3|
+-+-+-+


Scan all around current unit, order to move in direction that does not contain enemy, RANDOMIZE DIRECTION.
This will be the RETREAT script which can be EASILY called upon by new triggers.


The more copies of the entire map's triggers there are, the faster the grid will execute! Make trigger timers globally compatible for easy copy & paste in CHK?
HMMMMMMMMMMMMMMm






MMMMMM
mmmmmmmmmmmmmmmmmmmmmmmm
mmmmmmmmmmmmmmm
mmmmmmmmmmmmmmmmmmmm
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

In another deaths counter, include "length" of retreat, for different ranged units.

mmmmmmmsoboring!11111111


-----------------
Requires rewrite of all triggers. Again.



================================================================================
======================

19/12/2006 4:07:27 PM Ahzz: some ideas to chew on from your doc you just sent me:
Scan all around current unit, order to move in direction that does not contain enemy, RANDOMIZE DIRECTION. ------ Good idea, but remember though, that in most cases if you go around them with all of your army they'll just attack your base if you have little defense there

19/12/2006 4:08:14 PM Ahzz: This will be the RETREAT script which can be EASILY called upon by new triggers. --------------- If it's just used for retreat, it might be good, as long as the course isn't much longer (though it doesn't matter if it goes around or not if their army is superior to yours

19/12/2006 4:09:43 PM Ahzz: The more copies of the entire map's triggers there are, the faster the grid will execute! Make trigger timers globally compatible for easy copy & paste in CHK? ---------- CHK = saved triggers 'filetype'? cool if we can make it faster like that
19/12/2006 4:11:21 PM Ahzz: Requires rewrite of all triggers. Again. ------------ :/ I know that is very annoying thing to do, especially the same stuff, so to prevent too many of these again written triggers, lets try to plan our best on what exactly to do to make project 1) work faster 2) less work for you
19/12/2006 4:14:57 PM Ahzz: heh - lets make, as a finishing touch, the comp taunt the player all the time
19/12/2006 4:15:03 PM Ahzz: later on
19/12/2006 4:15:05 PM Ahzz: not in a hurry
19/12/2006 4:15:10 PM Ahzz: like talk shit all around
19/12/2006 4:15:29 PM Ahzz: "My hands are cold!"
19/12/2006 4:15:35 PM Ahzz: "Lol my mouse got stuck!"
19/12/2006 4:15:44 PM Ahzz: "gg I played bad T_t"
19/12/2006 4:16:04 PM Ahzz: "can't you really play better ?"

19/12/2006 4:16:05 PM Ahzz: haha
19/12/2006 4:16:06 PM Ahzz: :D
19/12/2006 4:20:13 PM Ahzz: also, one thing to think about later on - unless we are able to make terran scvs etc continue building a barracks if the builder is killed, we'll have to make them cancel the building somehow
19/12/2006 4:21:29 PM Ahzz: you might already know that it freezes kinda if a building is half done and cannot be continued, so we could maybe make something either kill, or drop its hp so its canceled. though if its killed, we'll have to give 75% resources back or whatever it is

[quote name='bajadulce']:) Look forward to the new grid system. I will try and find some time soon to look more carefully at your triggers/map so I can have a better understanding of what's going on. ..Maybe even someday be able to contribute/say something useful.

In the meantime, I will be sure to mention this to all those I encounter who might be interested in this study. The more informed = better Micro maps!Other Micro Enthusiasts @ TeamLiquid

Ahzz can we try your hydra/zealot?[/quote]

[quote name='Ahzz']http://www.blizzforums.com/attachment.php?...mp;d=1166563308
here's a link for hydra vs zealot. So far it's only been won with a fluke or by exploiting it.[/quote]
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Wed Apr 25, 2007 4:43 pm

Dec 23 2006:
Ahzz and I will be working on AI Fusion scripts, where triggers and the AI script interact with each other.

ATM I have some notes;
Variables sketch


CODEUMS Grid
gridunit
cast_common_spell_ground
cast_common_spell_air
cast_scanner

AI Fusion
unit_created
grid_takeover
entrance_blocked

AI Fusion unit-sepcific
common_air_harass
worker_harass
geyser_confirm

CODEVariables Sketch [ Civ sprite = 1x1, Infest Kerrigan sprite = 64x64, Sarah Kerrigan sprite = 12x12 ]

UMS Grid
gridunit (Gui Montag Firebat) --> Infest Kerrigan
cast_common_spell_ground (Jim Raynor Marine) --> Civ
cast_common_spell_air (Kerrigan Ghost) --> Civ
cast_scanner (Jim Raynor Vulture) --> Civ [Also for sending obs or overlord to location]
center_location (Torrasque Ultralisk) --> Civ

AI Fusion
unit_created (Civilian) --> Civ
grid_takeover (Tom Kazansky Wraith) --> Civ
grid_giveback (Hunter Killer Hydralisk) --> Civ
entrance_blocked (Magellan Sci Vessel) --> Civ
entrance_test (Devouring One Zergling) --> Sarah Kerrigan
do_defend (Matriarch Queen) -- > Civ
do_attack (Unclean One Defiler) --> Civ

AI Fusion unit-sepcific
common_air_harass (Arcturus Mengsk Battlecruiser) --> Civ
worker_harass (Hyperion Battlecruiser) --> Civ
geyser_confirm (Norad II Battlecruiser) --> Civ
common_expansion (Infested Kerrigan) --> Civ

Modified files for the AI Fusion will include
CODEarr
units.dat
weapons.dat
flingy.dat
images.dat
images.tbl
sprites.dat
scripts
iscript.bin
aiscript.bin
unitsgrid
grid.grp
blank.grp
rez
stat_txt.tbl

Modified unitdef.ini for SCAIEdit III.
CODE; UNITDEF.INI file (Unit Definition)
; Made by Gold Dragon
;
; Used by ScAIEdit III
;
; DON'T EDIT THAT FILE UNLESS YOU KNOW WHAT YOU'RE DOING
;
; Add, modify or delete entries so it can fit your needs. Never modify the original file, but
; make copies, then modify them and put them on your AI scripts directory.
;
; Remember all users of your modified AI scripts will need your modified unit definition file too.

[military]
; Terran units
000=marine
001=ghost
002=vulture
003=goliath
005=siege_tank
008=wraith
009=science_vessel
011=dropship
012=battlecruiser
014=nuclear_missile
032=firebat
034=medic
058=valkyrie

; Zerg units
037=zergling
038=hydralisk
039=ultralisk
043=mutalisk
044=guardian
045=queen
046=defiler
047=scourge
050=infested_terran
062=devourer
103=lurker

; Protoss units
060=corsair
061=dark_templar
063=dark_archon
065=zealot
066=dragoon
067=high_templar
068=archon
069=shuttle
070=scout
071=arbiter
072=carrier
083=reaver
084=observer

; UMS Grid
010=gridunit
016=cast_common_spell_air
019=cast_scanner
020=cast_common_spell_ground
048=center_location
054=entrance_test

; AI Fusion
015=unit_created
021=grid_takeover
022=entrance_blocked
027=common_air_harass
028=worker_harass
029=geyser_confirm
049=do_defend
051=common_expansion
052=do_attack
053=grid_giveback

; Etc units
013=spider_mine
033=scanner_sweep
035=larva
036=egg
040=broodling
059=cocoon
073=interceptor
085=scarab
089=rhynadon
090=bengalaas
093=scantid
094=kakaru
095=ragnasaur
096=ursadon
097=lurker_egg
101=map_revealer
105=disruption_web
202=dark_swarm


[building]
; Terran buildings
007=scv
106=command_center
107=comsat_station
108=nuclear_silo
109=supply_depot
110=refinery
111=barracks
112=academy
113=factory
114=starport
115=control_tower
116=science_facility
117=covert_ops
118=physics_lab
120=machine_shop
122=engineering_bay
123=armory
124=missile_turret
125=bunker

; Zerg buildings
041=drone
042=overlord
130=infested_command_center
131=hatchery
132=lair
133=hive
134=nydus_canal
135=hydralisk_den
136=defiler_mound
137=greater_spire
138=queen_nest
139=evolution_chamber
140=ultralisk_cavern
141=spire
142=spawning_pool
143=creep_colony
144=spore_colony
146=sunken_colony
149=extractor

; Protoss buildings
064=probe
154=nexus
155=robotics_facility
156=pylon
157=assimilator
159=observatory
160=gateway
162=photon_cannon
163=citadel_of_adun
164=cybernetics_core
165=templar_archives
166=forge
167=stargate
169=fleet_beacon
170=arbiter_tribunal
171=robotics_support_bay
172=shield_battery

; Etc buildings
013=spider_mine
033=scanner_sweep
035=larva
036=egg
040=broodling
059=cocoon
073=interceptor
085=scarab
089=rhynadon
090=bengalaas
093=scantid
094=kakaru
095=ragnasaur
096=ursadon
097=lurker_egg
101=map_revealer
105=disruption_web
176=mineral_field_1
177=mineral_field_2
178=mineral_field_3
188=vespene_geyser
202=dark_swarm


[upgrade]
; Terran upgrades
000=t_infantry_armor
001=t_vehicle_plating
002=t_ship_plating
007=t_infantry_weapon
008=t_vehicle_weapon
009=t_ship_weapon
016=marine_range
017=vulture_speed
019=science_vessel_mana
020=ghost_sight
021=ghost_mana
022=wraith_mana
023=battlecruiser_mana
051=medic_mana
054=goliath_range

; Zerg upgrades
003=z_carapace
004=z_flyer_carapace
010=z_melee_attack
011=z_missile_attack
012=z_flyer_attack
024=overlord_capacity
025=overlord_sight
026=overlord_speed
027=zergling_speed
028=zergling_attack
029=hydralisk_speed
030=hydralisk_range
031=queen_mana
032=defiler_mana
052=ultralisk_armor
053=ultralisk_speed

; Protoss upgrades
005=p_armor
006=p_plating
013=p_ground_weapon
014=p_air_weapon
015=p_plasma_shield
033=dragoon_range
034=zealot_speed
035=scarab_damage
036=reaver_capacity
037=shuttle_speed
038=observer_sight
039=observer_speed
040=templar_mana
041=scout_sight
042=scout_speed
043=carrier_capacity
044=arbiter_mana
047=corsair_mana
049=dark_archon_mana

; Etc
060=unused_60


[tech]
; Terran tech
000=stim_packs
001=lockdown
002=emp_shockwave
003=spider_mines
005=siege_mode
006=defensive_matrix
007=irradiate
008=yamato_gun
009=cloaking_field
010=personnel_cloaking
024=restoration
030=optical_flare

; Zerg tech
011=burrowing
012=infestation
013=spawn_broodling
014=dark_swarm
015=plague
016=consume
017=ensnare
018=parasite
032=lurker_aspect

; Protoss tech
019=psionic_storm
020=hallucination
021=recall
022=statis_field
025=disruption_web
027=mind_control
029=feedback
031=maelstrom

If anyone wants to attempt work on something or has additional ideas, post!

CODEVariables Sketch [ Civ sprite = 1x1, Infest Kerrigan sprite = 64x64, Sarah Kerrigan sprite = 12x12 ]

UMS Grid
gridunit (Gui Montag Firebat) --> Infest Kerrigan
cast_common_spell_ground (Jim Raynor Marine) --> Civ
cast_common_spell_air (Kerrigan Ghost) --> Civ
cast_scanner (Jim Raynor Vulture) --> Civ [Also for sending obs or overlord to location]
center_location (Torrasque Ultralisk) --> Civ
supply_holder_z (Kukulza Guardian) --> Civ
supply_giver_z (Yggdrasil Overlord) --> Civ

AI Fusion
unit_created (Civilian) --> Civ
grid_takeover (Tom Kazansky Wraith) --> Civ
grid_giveback (Hunter Killer Hydralisk) --> Civ
entrance_blocked (Magellan Sci Vessel) --> Civ
entrance_test (Devouring One Zergling) --> Sarah Kerrigan
do_defend (Matriarch Queen) -- > Civ
do_attack (Unclean One Defiler) --> Civ
do_defend_rush (Dark Templar Hero) --> Civ
common_expansion (Infested Kerrigan) --> Civ
enemy_expansions_1 (Zeratul Dark Templar) --> Civ
enemy_expansions_2 (Tassadar/Zeratul Archon) --> Civ
enemy_expansions_3 (Fenix Zealot) --> Civ
enemy_expansions_4 (Fenix Dragoon) --> Civ
enemy_expansions_5 (Tassadar Templar) --> Civ
expansions_1 (Mojo Scout) --> Civ
expansions_2 (Warbringer Reaver) --> Civ
expansions_3 (Gantrithor Carrier) --> Civ
expansions_4 (Aldaris Templar) --> Civ
expansions_5 (Artanis Scout) --> Civ

AI Fusion unit-sepcific
common_air_harass (Arcturus Mengsk Battlecruiser) --> Civ
worker_harass (Hyperion Battlecruiser) --> Civ
geyser_confirm (Norad II Battlecruiser) --> Civ
detector_micro (Kukulza Mutalisk) --> Civ


~57 units left


arr
units.dat
weapons.dat
flingy.dat
images.dat
images.tbl
sprites.dat

scripts
iscript.bin
aiscript.bin

unitsgrid
grid.grp
blank.grp

rez
stat_txt.tbl



Values are returned by the script as confirmation, or a debugging tool.
These values are exchanged using create unit and detecting what foes and player commands.

--------------------

unit_created

Used in AIScript to tell the triggers the number of units the script is creating, for easy calculation to determine the speed the grid scans the map at.

--------------------

grid_takeover

Used by triggers to tell the script to stop organising its military units, so that it doesn't interfere with the grid's micro work. AIScript responds the same way to ensure nothing bugs.

--------------------

grid_giveback

Used by triggers to tell the script that it can start organising its military units again. AIScript responds with the same unit.

--------------------

entrance_blocked

A trigger command that tells the AIScript that the enemy entrance is blocked. AIScript responds.

--------------------

entrance_test

Invisible unit used to test the entrance of an enemy base if it is blocked or not without interrupting gameplay.

--------------------

gridunit

Grid unit used to scan the map with triggers.

--------------------

cast_common_spell_ground

Causes all AI ground units in the area to use their common spells.

--------------------

cast_common_spell_air

Causes all AI air units in the area to use their common spells.

--------------------

cast_scanner

Causes the AI to cast scanner sweep at a specific location.

--------------------

center_location

Used to commonly center location on.

--------------------

do_defend

Detects if the AI is under siege in which it must defend itself. Both triggers and the AIScript respond to the attack. Script returns variable.

--------------------

do_attack

When time is right, either triggers or the AIScript will call this, in which the other responds accordingly.

--------------------

do_defend_rush

Will take necessary measures if the AI is being rushed, in which the script cooperates with the triggers that pull out worker units if required. All military will be trigger controlled and highly sensitive at this time. AI script responds.

--------------------

common_expansion

Will tell the script when it's OK to expand based on enemy locations. The script responds in which the triggers aid in the expansion by sending military to guard the incomplete building, and another worker unit to build an extra pylon and cannons or bunker before the expansion is complete.

--------------------

enemy_expansions_#

Detects how many enemy expansions there are, before they are finished being built, and sends this number to the script, in which it can act accordingly. Returned by script.

--------------------

expansions_#

Detects how many successful expansions the AI has and allows the script to run based on income rather than mineral amount. Returned by script.

--------------------

common_air_harass

Used by triggers or the AIScript to initiate a trigger-based attack, such that several mutas/wraiths/scouts will harass the enemy and snipe units off. Required for the script to not bug.

--------------------

worker_harass

Used by the script or triggers to allow a worker unit to harass the player. This variable is to allow the script to not bug.

--------------------

geyser_confirm

Used be the script to allow the triggers to tell the SCV to build over the geyser in the enemy base. Returned by triggers on successful build.

--------------------

detector_micro

Used by either triggers or the script to allow the triggers to obtain complete control over some detector units, whether it be observers, science vessels, or overlords, in a general area. Once controlled, they will be made hard to target for the human player(s).

--------------------

supply_holder_<race>

Used to take up supply space of the AI so that it cannot exceed its supply max when the specific-micro AI takes over some of its units.

--------------------

supply_giver_<race>

In the case of overlords being given to the specific-micro AI, this with a combination of supply_holders will prevent the AI from having a technical disadvantage.

--------------------





Micro Tactics
-------------------------------

In the case of owning a detector unit against dark templars or lurkers, the detector must avoid being targetted by the human.

In the case of terran human owning science vessels or high templars, muta harass is cancelled. Spreading script is initiated.

Ground spread if lurker/reaver is close.

Ramp blocking.

Range run(micro) from melee if overpowered.

Spell units keep safe(run/guard).

Unburrow on scanner/detect if enemy is in range of units.

If worker is obviously overpowered, prevent it from being killed.


Data for SCAIEdit III and DatEdit.
Ahzz
Posts: 131
Joined: Wed Apr 25, 2007 6:03 am

Postby Ahzz » Thu Apr 26, 2007 5:50 am

very nice!

Good thing you took all those notes, I didn't remember too much of all that ;)

good thing that we're just about ready with planning too... Unless its hard to make modifications to the new grid, I'd say it's ready. If it is hard, or even impossible, lets think things through once more. Good thing you posted it here too, because people can give tips what to add and all
Ahzz
Posts: 131
Joined: Wed Apr 25, 2007 6:03 am

Postby Ahzz » Sun May 06, 2007 7:20 pm

yes it's nice... I think I'll multiply all the triggers as a test and see how it works. Though I don't know if it'll give much of a results, but it could bring more fun time testing and trying other matchups.
oh and I'm not 100% sure but how should I use those heroes... gotta try if its only create_unit tom_kazansky 1 1 or is it something more complicated. Maybe I have to use the unit values you mentioned... "068" etc
Ahzz
Posts: 131
Joined: Wed Apr 25, 2007 6:03 am

Postby Ahzz » Tue May 08, 2007 7:00 pm

here are the definitions for certain commands and also some micro tactics... Sorry but I'm going to make a big quote for a reason, using those small code boxes annoy me.


In the case of terran human owning science vessels or high templars, muta harass is cancelled. Spreading script is initiated.

In this case, as we already discussed with heinermann... Well, vs science vessels its like that, but if its high templars the muta micros will just turn to a flying around so that whereever P storms the mutas will only stay under it for a second or so.



Code: Select all

--------------------

unit_created

Used in AIScript to tell the triggers the number of units the script is creating, for easy calculation to determine the speed the grid scans the map at.

--------------------

grid_takeover

Used by triggers to tell the script to stop organising its military units, so that it doesn't interfere with the grid's micro work. AIScript responds the same way to ensure nothing bugs.

--------------------

grid_giveback

Used by triggers to tell the script that it can start organising its military units again. AIScript responds with the same unit.

--------------------

entrance_blocked

A trigger command that tells the AIScript that the enemy entrance is blocked. AIScript responds.

--------------------

entrance_test

Invisible unit used to test the entrance of an enemy base if it is blocked or not without interrupting gameplay.

--------------------

gridunit

Grid unit used to scan the map with triggers.

--------------------

cast_common_spell_ground

Causes all AI ground units in the area to use their common spells.

--------------------

cast_common_spell_air

Causes all AI air units in the area to use their common spells.

--------------------

cast_scanner

Causes the AI to cast scanner sweep at a specific location.

--------------------

center_location

Used to commonly center location on.

--------------------

do_defend

Detects if the AI is under siege in which it must defend itself. Both triggers and the AIScript respond to the attack. Script returns variable.

--------------------

do_attack

When time is right, either triggers or the AIScript will call this, in which the other responds accordingly.

--------------------

do_defend_rush

Will take necessary measures if the AI is being rushed, in which the script cooperates with the triggers that pull out worker units if required. All military will be trigger controlled and highly sensitive at this time. AI script responds.

--------------------

common_expansion

Will tell the script when it's OK to expand based on enemy locations. The script responds in which the triggers aid in the expansion by sending military to guard the incomplete building, and another worker unit to build an extra pylon and cannons or bunker before the expansion is complete.

--------------------

enemy_expansions_#

Detects how many enemy expansions there are, before they are finished being built, and sends this number to the script, in which it can act accordingly. Returned by script.

--------------------

expansions_#

Detects how many successful expansions the AI has and allows the script to run based on income rather than mineral amount. Returned by script.

--------------------

common_air_harass

Used by triggers or the AIScript to initiate a trigger-based attack, such that several mutas/wraiths/scouts will harass the enemy and snipe units off. Required for the script to not bug.

--------------------

worker_harass

Used by the script or triggers to allow a worker unit to harass the player. This variable is to allow the script to not bug.

--------------------

geyser_confirm

Used be the script to allow the triggers to tell the SCV to build over the geyser in the enemy base. Returned by triggers on successful build.

--------------------

detector_micro

Used by either triggers or the script to allow the triggers to obtain complete control over some detector units, whether it be observers, science vessels, or overlords, in a general area. Once controlled, they will be made hard to target for the human player(s).

--------------------

supply_holder_<race>

Used to take up supply space of the AI so that it cannot exceed its supply max when the specific-micro AI takes over some of its units.

--------------------

supply_giver_<race>

In the case of overlords being given to the specific-micro AI, this with a combination of supply_holders will prevent the AI from having a technical disadvantage.

--------------------





Micro Tactics
-------------------------------

In the case of owning a detector unit against dark templars or lurkers, the detector must avoid being targetted by the human.

In the case of terran human owning science vessels or high templars, muta harass is cancelled. Spreading script is initiated.

Ground spread if lurker/reaver is close.

Ramp blocking.

Range run(micro) from melee if overpowered.

Spell units keep safe(run/guard).

Unburrow on scanner/detect if enemy is in range of units.

If worker is obviously overpowered, prevent it from being killed.

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 1 guest