PyAI

Help - Resources - Discussion
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Wed May 07, 2008 5:20 am

From the ASM.
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Wed May 07, 2008 5:37 am

I just went and double checked my findings and was correct. The debug() command is exactly the same as the goto() command, with the exception that it prints text after jumping. I believe it was implemented for manual debugging, there was no point in making a full fledged debugger since once they made the AI's noone was supposed to edit them again.

[spoiler]goto() command:

Code: Select all

0045BA5C  |> 8BD6         |MOV EDX,ESI                     ;  Case 0 of switch 0045B873
0045BA5E  |. E8 9DF5FFFF   |CALL StarCraf.0045B000
0045BA63  |. 0FB7C8       |MOVZX ECX,AX
0045BA66  |. 894E 08      |MOV DWORD PTR DS:[ESI+8],ECX
0045BA69  |.^E9 E2FDFFFF   |JMP StarCraf.0045B850


debug() command:

Code: Select all

0045C3A7  |> 8BD6         |MOV EDX,ESI                     ;  Case 27 of switch 0045B873
0045C3A9  |. E8 52ECFFFF   |CALL StarCraf.0045B000
0045C3AE  |. 8B56 08      |MOV EDX,DWORD PTR DS:[ESI+8]
0045C3B1  |. 0315 ECC06800  |ADD EDX,DWORD PTR DS:[68C0EC]
0045C3B7  |. 52          |PUSH EDX                        ; /Arg1
0045C3B8  |. 8BF8         |MOV EDI,EAX                     ; |
0045C3BA  |. 8B46 10      |MOV EAX,DWORD PTR DS:[ESI+10]        ; |
0045C3BD  |. E8 9E0A0300   |CALL StarCraf.0048CE60             ; StarCraf.0048CE60
0045C3C2  |. 0FB7C7       |MOVZX EAX,DI
0045C3C5  |. 8946 08      |MOV DWORD PTR DS:[ESI+8],EAX
0045C3C8  |.^E9 83F4FFFF   |JMP StarCraf.0045B850
[/spoiler]
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Wed May 07, 2008 5:52 am

I don't know what you are talking about anymore :S I never said a debug() doesn't need a stop, the debug() command works exactly like a goto() except with text output, thats it.
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Wed May 07, 2008 6:05 am

Ah i see what you mean, its just a misunderstanding. I meant instead of this:

Code: Select all

# stat_txt.tbl entry 1343: Protoss Expansion Custom Level<0>
PMCx(1343, 101, aiscript):
start_town()
transports_off()
farms_notiming()
build(1, Nexus, 130)
wait_build(1, Nexus)
build(4, probe, 100)
wait_build(4, probe)
build(7, probe, 80)
wait_build(6, probe)
wait(100)

multirun(speak)

resources_jump(120, 0, fatet)
groundmap_jump(Main)
goto(Air)
--Main--
build(1, pylon, 80)
goto(loop)
--fatet--
build(8, probe, 80)
goto(loop)
--Air--
--loop--
wait(1500)
goto(loop)

--speak--
debug(null, times up)
--null--
stop()


It would just be this:

Code: Select all

# stat_txt.tbl entry 1343: Protoss Expansion Custom Level<0>
PMCx(1343, 101, aiscript):
start_town()
transports_off()
farms_notiming()
build(1, Nexus, 130)
wait_build(1, Nexus)
build(4, probe, 100)
wait_build(4, probe)
build(7, probe, 80)
wait_build(6, probe)
wait(100)

debug(null, times up)
--null--

resources_jump(120, 0, fatet)
groundmap_jump(Main)
goto(Air)
--Main--
build(1, pylon, 80)
goto(loop)
--fatet--
build(8, probe, 80)
goto(loop)
--Air--
--loop--
wait(1500)
goto(loop)
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Wed May 07, 2008 6:29 am

Yeah, there are a couple misleading examples of the debug command i think. Glad I could clear it up :)

Return to “PyMS (poiuy_qwert's complete modding suite)”

Who is online

Users browsing this forum: No registered users and 2 guests