Modding help for AI fusion needed!

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
Ahzz
Posts: 131
Joined: Wed Apr 25, 2007 6:03 am

Postby Ahzz » Sun May 13, 2007 8:10 am

I'll list them from up to down, up will be most important imo.

1.Cast Psionic Storm
2.Cast Dark Swarm
3.Place Spidermine (would be good if they didn't lay mines anywhere when idle ... only to choke or if enemy has arbiters or dark templars/reavers + maybe high templars etc...)
4.Siege Mode
5.Tank Mode (otherwise no, but if we cant properly control it tank moding, then it might be bad. However, if we can make switch from siege mode to tank mode almost any way we want, then ignore this)
6.Lift Off
7.Land (these two are ONLY if we can also build a, say, command center anywhere, and then succesfully still running the expansion script. Otherwise they don't have much use... though if we can control them perfectly we can maybe even fix all the crappy building placement terran does?!
8. Cast Maelstorm (would be higher, but the comp can manage somehow without this too. However, if we can completely control this it would look so sexy and give some sweet bonuses. like... "maelstorm biggest chunk, and psionic storm them right after" )
9. Cast Stasis Field (we could use some control in that statis field. At the moment it isn't bad but there are a few cases where it could be useful)
10. Cast Plague (we should be able to control this somehow. I believe it'd be enough.
11. Cast Ensnare (almost useless)

Well, seeing as how blizzard provided a nice existing order to cast recall, my first idea would be to change that to be a cast spell command instead, making it take a parameter telling it what spell to cast.

im not quite sure what you mean with that but the recall would really have many uses... Such as recall to enemy base, really useful in late game. Also, to recall on top of the biggest army, say a huge pile of siege tanks.

Also, I know that at least one of the unknown effect commands(I think it's do_morph...but I'm not sure) in the aiscript deals with siege mode, because it's limited to the tank id's. Some testing on this might give some help.

yes thanks for the tip.
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Sun May 13, 2007 1:56 pm

Where is the AIScript opcode function pointer table?
DiscipleOfAdun
Posts: 37
Joined: Sat May 05, 2007 9:39 pm

Postby DiscipleOfAdun » Mon May 14, 2007 10:10 pm

pulled from the old forum - 4567088 is the decimal address of the function that does all the interpretation of the AI Script commands.

That's in 1.14, btw. There's a asm style switch statement that does the branching. when i get more constant internet access, I'll have more info.
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Tue May 15, 2007 3:19 am

Thanks.

Now going through some of it, I've found the exact order locations for disruption web, recall, and junk yard dog. We could replace junk yard dog with tank mode or lift or something. Hmm..
Ahzz
Posts: 131
Joined: Wed Apr 25, 2007 6:03 am

Postby Ahzz » Tue May 15, 2007 5:44 am

We could replace junk yard dog with tank mode or lift or something.

more like place spider mine unless we got another cool way for it. lift would be quite useless if we cant exactly determine where it'd land... if we can mines properly, I'd say the next one siege mode or maelstorm... however, I believe we already can manage decent siege mode results, even without it, so we should manage with that. Liftoff would be useful too if we can actually make it land too
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Tue May 15, 2007 11:50 pm

I had yet another idea. We could get a portion of map data to actually be the code that gives the computer the command.


We can use say, death counts of the mineral/vespene chunks (p8) to contain the values of energy cost, unit, and command.
Additionally, we could have failsafe code that will write over the commands again to make sure nothing can be malicious.


Code: Select all

0045BD86  |> 0FB715 FA3D650>|MOVZX EDX,WORD PTR DS:[653DFA]   ;  disruption_web [Energy Cost (techdata.dat)]; Case 67 of switch 0045B063
0045BD8D  |. 8B45 08        |MOV EAX,DWORD PTR SS:[EBP+8]
0045BD90  |. 8B40 10         |MOV EAX,DWORD PTR DS:[EAX+10]
0045BD93  |. BE 3C000000   |MOV ESI,3C                  ;  Protoss Corsair (units.dat)
0045BD98  |. E8 53ECFFFF    |CALL StarCraf.0045A9F0
0045BD9D  |. 8BF0            |MOV ESI,EAX
0045BD9F  |. 85F6            |TEST ESI,ESI
0045BDA1  |.^0F84 99F2FFFF  |JE StarCraf.0045B040
0045BDA7  |. 8B5D 08       |MOV EBX,DWORD PTR SS:[EBP+8]
0045BDAA  |. 8B4B 18       |MOV ECX,DWORD PTR DS:[EBX+18]
0045BDAD  |. 8B43 20       |MOV EAX,DWORD PTR DS:[EBX+20]
0045BDB0  |. 8B7B 14       |MOV EDI,DWORD PTR DS:[EBX+14]
0045BDB3  |. 2BC1          |SUB EAX,ECX
0045BDB5  |. 99             |CDQ
0045BDB6  |. 2BC2           |SUB EAX,EDX
0045BDB8  |. D1F8           |SAR EAX,1
0045BDBA  |. 03C1           |ADD EAX,ECX
0045BDBC  |. 50              |PUSH EAX                      ; /Arg3
0045BDBD  |. 8B43 1C       |MOV EAX,DWORD PTR DS:[EBX+1C]      ; |
0045BDC0  |. 2BC7           |SUB EAX,EDI               ; |
0045BDC2  |. 99              |CDQ                     ; |
0045BDC3  |. 2BC2           |SUB EAX,EDX               ; |
0045BDC5  |. D1F8            |SAR EAX,1                     ; |
0045BDC7  |. 03C7            |ADD EAX,EDI               ; |
0045BDC9  |. 50               |PUSH EAX                      ; |Arg2
0045BDCA  |. 68 B5000000   |PUSH 0B5                      ; |Cast Disruption Web (orders.dat)
0045BDCF  |. E8 7C900100   |CALL StarCraf.00474E50         ; StarCraf.00474E50
0045BDD4  |.^E9 67F2FFFF   |JMP StarCraf.0045B040


I notice a new patch; this is 1.14. Although anything can be adopted to 1.15, so it doesn't matter.

1.15

Code: Select all

0045C5A6  |> 0FB715 3A5A650>|MOVZX EDX,WORD PTR DS:[655A3A]       ;  disruption_web(AIScript) [energy cost]; Case 67 of switch 0045B883
0045C5AD  |. 8B45 08        |MOV EAX,DWORD PTR SS:[EBP+8]
0045C5B0  |. 8B40 10         |MOV EAX,DWORD PTR DS:[EAX+10]
0045C5B3  |. BE 3C000000   |MOV ESI,3C                      ;  Protoss Corsair (units.dat)
0045C5B8  |. E8 53ECFFFF    |CALL StarCraf.0045B210             ;  Current order must be...
0045C5BD  |. 8BF0            |MOV ESI,EAX
0045C5BF  |. 85F6              |TEST ESI,ESI
0045C5C1  |.^0F84 99F2FFFF  |JE StarCraf.0045B860               ;  ...otherwise end case
0045C5C7  |. 8B5D 08        |MOV EBX,DWORD PTR SS:[EBP+8]
0045C5CA  |. 8B4B 18        |MOV ECX,DWORD PTR DS:[EBX+18]
0045C5CD  |. 8B43 20        |MOV EAX,DWORD PTR DS:[EBX+20]
0045C5D0  |. 8B7B 14        |MOV EDI,DWORD PTR DS:[EBX+14]
0045C5D3  |. 2BC1            |SUB EAX,ECX
0045C5D5  |. 99               |CDQ
0045C5D6  |. 2BC2            |SUB EAX,EDX
0045C5D8  |. D1F8            |SAR EAX,1
0045C5DA  |. 03C1            |ADD EAX,ECX
0045C5DC  |. 50               |PUSH EAX                        ; /Arg3
0045C5DD  |. 8B43 1C        |MOV EAX,DWORD PTR DS:[EBX+1C]        ; |
0045C5E0  |. 2BC7            |SUB EAX,EDI                     ; |
0045C5E2  |. 99               |CDQ                           ; |
0045C5E3  |. 2BC2            |SUB EAX,EDX                     ; |
0045C5E5  |. D1F8            |SAR EAX,1                       ; |
0045C5E7  |. 03C7            |ADD EAX,EDI                     ; |
0045C5E9  |. 50               |PUSH EAX                        ; |Arg2
0045C5EA  |. 68 B5000000    |PUSH 0B5                        ; |Cast Disruption Web (orders.dat)
0045C5EF  |. E8 7C900100    |CALL StarCraf.00475670             ; StarCraf.00475670
0045C5F4  |.^E9 67F2FFFF     |JMP StarCraf.0045B860
Ahzz
Posts: 131
Joined: Wed Apr 25, 2007 6:03 am

Postby Ahzz » Wed May 16, 2007 6:04 am

my friend said that modding mineral chunks wouldn't be within his skill, if I remember right. and he's not a bad modder I guess.

But if this is another way to improve results it's always welcome for sure
Heinermann
Posts: 362
Joined: Thu Apr 26, 2007 12:42 am

Postby Heinermann » Wed May 16, 2007 7:21 pm

I know specifically how to mod in all the units, and I'll mod them in myself if nobody wants to. I did start, but will redo it again because it is a little messy.

Also note that everything in this topic is within possibility of current tools.

Oh, also, we won't need the spell-casting units/weapons if we can use the modified assembly code.

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 1 guest