Author Topic: Commands and their properties  (Read 4085 times)

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Commands and their properties
« on: 2012-01-26 15:26:36 »
I stumbled upon this after being curious about the Commands themselves. Specifically why Conformer is exempt from the reduction in damage that Morph suffers. Commands actually have specific damage calculations assigned to them as default values. They've also got what looks like two different values of properties.

Code: [Select]
Command   animation      default damage calc   prop2 (flags)
Left      0              0                     0
Attack    14h            11h                   0
Magic     1Dh            0                     0
Summon    1Fh            0                     0
Item      21h            37h                   0
Steal     22h            0                     6h
Sense     26h            0                     412h
Coin      21h            Ah                    0
Throw     21h            9h                    0
Morph     28h            B1h                   2000h
D.blow    2Ah            11h                   0
Manip.    2Ch            90h                   0
Mime      0              0                     0
E.Skill   1Eh            0                     0
All:      0              0                     0
4x:       0              0                     0
          0              0                     0
Mug       24h            11h                   4
Change    0              11h                   2
Defend    0              0                     0
Limit     0              0                     0
W-Magic   1Dh            0                     0
W-Sum.    1Fh            0                     0
W-Item    21h            0                     0
Slash-All 15h            11h                   0
2x-Cut    16h            11h                   1000h
Flash     1Ch            11h                   2h
4x-Cut    18h            11h                   1000h
...
0x23      2Eh            0                     0

I don't know what command 23 is, but I think I've seen it in a few AI scripts.

Prop1 would seem to be Cursor Action. That's defined in the KERNEL.BIN so I don't know why that's repeated here. Maybe it's more of the hard-coded function to take. I can't find what happens to it. It gets mapped to ActorData[0x20] and gets checked a few times and shuffled around. The first byte is animation index. It defines what animation the actor should perform. 1F is the summon effect, 1D is magic, etc.

Damage Calc is what it says. If there's no data regarding damage calculation I would assume it would use this. Coin's and Throw's Damage Calculation are here as well as Manip's accuracy checking function. Morph's is apparently B1 so it doesn't allow critical hits.

Prop2 are shared by a few other values too. The actual size is a DWord, but commands only affect the lower word.
1 - Hit connected
2 - Perform animation, but don't display damage (if any)?
4 - Attempt to steal
1000h - multiple hits?
2000h - Morph Attack
4000h - Activate Barrier
8000h - Activate MBarrier
1000000h - Used by Carry Armor's Arms when returning a target from escaped.
Lots of others that I don't know
« Last Edit: 2012-02-09 15:29:00 by NFITC1 »

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Commands and their properties
« Reply #1 on: 2012-01-26 21:17:58 »
Where exactly is this data in the binaries, NFITC1?

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Commands and their properties
« Reply #2 on: 2012-02-01 22:50:53 »
Starts at 0x7B7510. That first byte might be animation index, but they're off by a bit. The game engine manipulates those values a little after reading them so that might explain why coin, throw, and item share a value.