이 도움말은 자신의 AI스크립트를 만들고자 하는 사람들을 위해 쓰였다.
물론 어느정도 실력이 있는 사람이어야 한다.
나는 이 도움말을 쓰는데 꽤 많은 시간을 들였으므로,
내가 이미 도움말에 적어놓은 것에 대해 다시 질문해오지 말길 바란다.
----------------------
AI 스크립트 시작하기..
----------------------
ScAIEdit III를 설치했으면, 너는 "이제 뭐 해야되지?" 물어올것이다.
이 부분은 너가 ScAIEdit III를 시작할 수 있게 도움을 줄것이다.
AI 스크립트의 기본 명령어나 기타 모든 것들에 대해...
+++++++++++++++
기본 AI스크립트
+++++++++++++++
이 문서의 목표는 너가 AI스크립트가 무엇을 하는지,
일반적인 구조가 어떻게 되는지를 가르쳐주는 것이다.
너가 이미 AI스크립트에 관해 충분히 알고 있다면 다음 파트로 넘어가라.
- AI스크립트란 무엇인가?
AI스크립트는 컴퓨터플레이어에 필요한 빌드오더나,
전략과 같은 내용을 포함한다.
컴퓨터와 밀리 또는 프리포올 게임을 할 때,
컴퓨터는 그들이 생각한? 빌드를 그대로 따르지 않고,
AI스크립트에서 지정해준것대로 따라간다.
휴먼플레이어가 무슨행동을 하느냐에 대해 달라진다.
- AI스크립트는 어떻게 사용해야 하는가?
너가 트리거가 무엇인지 모르거나, 스타에디트가 무엇인지 모른다면
나는 너가 스타에디트 설명서를 먼저 보길 권한다.
AI스크립트를 사용하려면,
맵위에 컴퓨터의 유닛,건물이 있어야 하고
그위를 덮는 로케이션이 필요하다.
트리거로 가서 아래와 같이 써 준다.
CONDITIONS: Always
ACTIONS: Execute AI Script 'Terran Expansion Custom Level' at 'Location 0'
스타크래프트에서 이 맵을 열어 플레이 해보면,
컴퓨터는 너가 지정해준 AI스크립트를 따라 행동함을 알 수 있다.
- AI스크립트는 어디에 있는가?
AI스크립트파일은 StarDat.mpq, BrooDat.mpq, Patch_Rt.mpq파일에 있다.
mpq파일은 스타크래프트에 관한 많은 정보를 담고있는 파일이다.
파일 추출은 mpqview라는 프로그램으로 할 수 있지만,
ScAIEdit iii의 HDD Navigator에서 더블클릭하여 추출할 수도 있다.
mpq파일 내에는 aiscript.bin, bwscript.bin이라는 중요한 파일이 있다.
AI스크립트파일은 65535바이트를 넘지 못한다.
넘었을 경우 세이브하려하면 ScAIEdit는 경고창을 띄워준다.
최근의 aiscript.bin파일은 62050바이트다.
말인즉, 너의 AI스크립트가 자리잡을 공간이 적다는 뜻이긴 하지만,
쓰지 않는 코드를 ScAIEdit에서 편집해주면 공간을 늘릴 수도 있다.
허나, 이건 브루드워를 갖고 있다면 해결되는 문제이다.
bwscript.bin파일은 26458바이트일 뿐이니..
stop 명령어
goto 명령어 - :명령어로 이동시킨다.
ex):loop
wait 1500
goto loop
------
명령어
------
byte 0~255
word 0~65535
block
unit
building
military
upgrade
tech
유닛,건물,능력이름
- 한단어는 그대로, 두개이상은 _ 를 사이에 넣어준다(소문자)
업그레이드 이름
- help의 표 참고
++++++
header
++++++
start_town 기지를 갖고 시작한다.
start_areatown 기지지키기
start_campaign 캠페인모드
farms_timing 적절한 때에 건물을 짓는다
farms_notiming 인구수가 최대수용인구수에 이르면 건물을 짓는다
+++++++++++++
build/att/def
+++++++++++++
attack_add (byte)(military) byte만큼의 military를 러쉬팀에 추가
attack_clear 러쉬데이터 삭제
attack_do 러쉬 간다
attack_prepare 러쉬 준비
build (byte)(building)(byte) 만큼의 건물을 짓는데 byte속성
defensebuild_aa (byte)(military) 만큼의 공대공유닛을 만든다
defensebuild_ag (byte)(military) 만큼의 공대지유닛을 만든다
defensebuild_ga (byte)(military) 만큼의 지대공유닛을 만든다
defensebuild_gg (byte)(military) 만큼의 지대지유닛을 만든다
defenseclear_aa 데이터 삭제
defenseclear_ag 데이터 삭제
defenseclear_ga 데이터 삭제
defenseclear_gg 데이터 삭제
defenseuse_aa (byte)(military) 공대공유닛 사용
defenseuse_ag (byte)(military) 공대지유닛 사용
defenseuse_ga (byte)(military) 지대공유닛 사용
defenseuse_gg (byte)(military) 지대지유닛 사용
guard_resources (military) ??
tech (tech)(byte) 기술개발, 속성
train (byte)(military) 유닛뽑기
upgrade (byte)(upgrade)(byte) 업그레이드, 속성
wait (word) 몇초만큼의 기다림
wait_finishattack 러쉬끝
wait_build (byte)(military) 만큼의 유닛이 만들어질때까지 기다림
wait_buildstart (byte)(military) 만큼의 건물생산시작
wait_train (byte)(military) 만큼의 유닛생산시작
++++++++++
제어명령어
++++++++++
call (block)
Call %1(block) as a sub-routine.
enemyowns_jump (unit) (block)
If enemy has a %1(unit), jump to %2(block).
enemyresources_jump (word) (word) (block)
If enemy has at least %1(word) minerals and %2(word) gas then jump in %3(block).
goto (block)
Jump to %1(block).
groundmap_jump (block)
If it is a ground map(in other words, if the enemy is reachable), jump to %1(block).
killable
Allows the current thread to be killed by another one.
kill_thread
Kill the current thread.
notowns_jump (unit) (block)
If computer doesn't have a %1(unit), jump to %2(block).
race_jump (block) (block) (block)
According to the enemy race, jump in %1(block) if enemy is Terran, %2(block) if Zerg or %3(block) if Protoss.
random_jump (byte) (block)
There is %1(byte) chances out of 256 to jump to %2(block).
resources_jump (word) (word) (block)
If computer has at least %1(word) minerals and %2(word) gas then jump in %3(block).
return
Return to the flow point of the call command.
stop
Stop script code execution. Often used to close script blocks called simultaneously.
time_jump (byte) (block)
Jumps to %2(block) if %1(byte) normal game minutes have passed in the game.
Multiple threads commands
expand (byte) (block)
Run code at %2(block) for expansion number %1(byte)
multirun (block)
Run simultaneously code at %1(block).
Miscellaneous commands
create_nuke
Create a nuke. Should only be used in campaign scripts.
create_unit (unit) (word) (word)
Create %1(unit) at map position (x,y) where x = %2(word) and y = %3(word). Should only be used in campaign scripts.
debug (string) (block)
Show debug string %2(string) and continue in %1(block). (UNSUPPORTED)
define_max (byte) (unit)
Define maximum number of %2(unit) to %1(byte).
give_money
Give 2000 ore and gas if owned resources are low. Should only be used in campaign scripts.
nuke_pos (word) (word)
Launch a nuke at map position (x,y) where x = %1(word) and y = %2(word). Should only be used in campaign scripts.
send_suicide (byte)
Send all units to suicide mission. %1(byte) determines which type: 0 = Strategic suicide; 1 = Random suicide.
set_randomseed (word) (word)
Set random seed to %1(word) %2(word) (The two words are transformed in a 32-bit integer).
StarEdit commands
disruption_web
Disruption Web at selected location. (STAREDIT)
enter_bunker
Enter Bunker in selected location. (STAREDIT)
enter_transport
Enter in nearest Transport in selected location. (STAREDIT)
exit_transport
Exit Transport in selected location. (STAREDIT)
harass_location
AI Harass at selected location. (STAREDIT)
junkyard_dog
Junkyard Dog at selected location. (STAREDIT)
make_patrol
Make units patrol in selected location. (STAREDIT)
move_dt
Move Dark Templars to selected location. (STAREDIT)
nuke_location
Nuke at selected location. (STAREDIT)
player_ally
Make selected player ally. (STAREDIT)
player_enemy
Make selected player enemy. (STAREDIT)
recall_location
Recall at selected location. (STAREDIT)
sharedvision_off
Disable Shared Vision for selected player. (STAREDIT)
sharedvision_on
Enable Shared vision for selected player. (STAREDIT)
value_area
Value this area higher. (STAREDIT)
++++++++++++++++++++++++
Unknown purpose commands
++++++++++++++++++++++++
Note: These are the most interesting commands to make research on. With the accurate opcode name list, they're now easier to decipher, but many still don't act as expected, or are still too obscure. I've paused my research on them to release ScAIEdit 3.1 faster, meaning some might be quite easy to discover.
++++++++++++++++++
Undefined commands
++++++++++++++++++
Note: Be VERY cautious when researching these. Their definition is unknown, and thus can very easily make StarCraft crash when using them. They should only be tested and researched by experts.
첫댓글 aiscript.bin 이렇게 소문자로 되어야 HDD Navigator에서 인식..
이 글 썼을 때가 아마도 복귀 전날인가 뭐 그래서 설명이 이상하게 나와 있지만, 조만간 제대로 써 놓겠습니다.^^; 이거 네이버 드래프트 카페에서 퍼갔던데 출처 그런 거보다는 되게 후지게 쓴 걸 가져갔네