Jump to content

Effects


Recommended Posts

So while going through the store values, I stumbled across the effect list. Since I'm there I was crawling through the opcodes, figured I'd see if everything was correct (except parameters, I didn't check those)

 

Anyway opcode 110 is listed as empty, but it's not. In the BGII:EE .exe it's populated with ShowCreatures. Here's the relevant code:

 

 

4 push 144h ; jumptable 0059DF61 case 110
.text:0059F679 call operator new(uint)
.text:0059F67E add esp, 4
.text:0059F681 test eax, eax
.text:0059F683 jz loc_5A239F
.text:0059F689 mov ecx, [ebp+target]
.text:0059F68C push dword ptr [ecx+4]
.text:0059F68F push dword ptr [ecx] ; target
.text:0059F691 mov ecx, eax ; this
.text:0059F693 push [ebp+sourceID] ; sourceID
.text:0059F696 push [ebp+source] ; source
.text:0059F699 push edi ; effect
.text:0059F69A call CGameEffectShowCreatures::CGameEffectShowCreatures(Item_effect_st *,CPoint const &,long,CPoint)
.text:0059F69F mov esi, eax
.text:0059F6A1 jmp loc_5A23A1 ; jumptable 0059DF61 default case

 

No info on what game it is in, since this exe appears to check for all the current EE games except *maybe* PST (I passed the game check code and can't remember if that was included). I'll post any other anomalies or errors I find while I'm at that section

 

Note: I would have to retrace my steps to check the parameters 1 & 2, but if there are any that need checked, let me know and I'll backtrack and check them

Edited by Displacer
Link to comment

Opcode 112 is restricted to weapons, not any item. Relevant code:

 

; DATA XREF: CGameEffect::DecodeEffect(Item_effect_st *,CPoint const &,long,CPoint const &,long):off_5A23C4↓o
.text:0059F6D8 push 144h ; jumptable 0059DF61 case 112
.text:0059F6DD call operator new(uint)
.text:0059F6E2 add esp, 4
.text:0059F6E5 test eax, eax
.text:0059F6E7 jz loc_5A239F
.text:0059F6ED mov ecx, [ebp+target]
.text:0059F6F0 push dword ptr [ecx+4]
.text:0059F6F3 push dword ptr [ecx] ; target
.text:0059F6F5 mov ecx, eax ; this
.text:0059F6F7 push [ebp+sourceID] ; sourceID
.text:0059F6FA push [ebp+source] ; source
.text:0059F6FD push edi ; effect
.text:0059F6FE call CGameEffectDestroyWeapon::CGameEffectDestroyWeapon(Item_effect_st *,CPoint const &,long,CPoint)
.text:0059F703 mov esi, eax
.text:0059F705 jmp loc_5A23A1 ; jumptable 0059DF61 default case

Link to comment

Opcode 125 is coded as detect traps, not Knock. Relevant code:

 

push 144h ; jumptable 0059DF61 case 125
.text:0059F967 call operator new(uint)
.text:0059F96C add esp, 4
.text:0059F96F test eax, eax
.text:0059F971 jz loc_5A239F
.text:0059F977 mov ecx, [ebp+target]
.text:0059F97A push dword ptr [ecx+4]
.text:0059F97D push dword ptr [ecx] ; target
.text:0059F97F mov ecx, eax ; this
.text:0059F981 push [ebp+sourceID] ; sourceID
.text:0059F984 push [ebp+source] ; source
.text:0059F987 push edi ; effect
.text:0059F988 call CGameEffectDetectTraps::CGameEffectDetectTraps(Item_effect_st *,CPoint const &,long,CPoint)
.text:0059F98D mov esi, eax
.text:0059F98F jmp loc_5A23A1 ; jumptable 0059DF61 default case

Link to comment

Opcodes 126 and 176 use the exact same code. 176 is listed as slightly different (As #126, but unaffected by Free Action) so it must be a parameter if Free Action is ignored. Relevant code:

 

push 144h ; jumptable 0059DF61 cases 126,176
.text:0059F999 call operator new(uint)
.text:0059F99E add esp, 4
.text:0059F9A1 test eax, eax
.text:0059F9A3 jz loc_5A239F
.text:0059F9A9 mov ecx, [ebp+target]
.text:0059F9AC push dword ptr [ecx+4]
.text:0059F9AF push dword ptr [ecx] ; target
.text:0059F9B1 mov ecx, eax ; this
.text:0059F9B3 push [ebp+sourceID] ; sourceID
.text:0059F9B6 push [ebp+source] ; source
.text:0059F9B9 push edi ; effect
.text:0059F9BA call CGameEffectMovementRate::CGameEffectMovementRate(Item_effect_st *,CPoint const &,long,CPoint)
.text:0059F9BF mov esi, eax
.text:0059F9C1 jmp loc_5A23A1 ; jumptable 0059DF61 default case

Link to comment

Opcode 274 is Random Phase. Not sure about the paramiters, but it most likely has to do with randomness (dice, etc.) I can check it out if needed. Relevant code:

 

push 144h ; jumptable 0059DF61 case 274
.text:005A15A9 call operator new(uint)
.text:005A15AE add esp, 4
.text:005A15B1 test eax, eax
.text:005A15B3 jz loc_5A239F
.text:005A15B9 mov ecx, [ebp+target]
.text:005A15BC push dword ptr [ecx+4]
.text:005A15BF push dword ptr [ecx] ; target
.text:005A15C1 mov ecx, eax ; this
.text:005A15C3 push [ebp+sourceID] ; sourceID
.text:005A15C6 push [ebp+source] ; source
.text:005A15C9 push edi ; effect
.text:005A15CA call CGameEffectRandomPhase::CGameEffectRandomPhase(Item_effect_st *,CPoint const &,long,CPoint)
.text:005A15CF mov esi, eax
.text:005A15D1 jmp loc_5A23A1 ; jumptable 0059DF61 default case

Link to comment

Opcode 312 is Immunity To Sequester. Code seems intact, maybe it's been fixed? Worth checking out. Relevant code:

 

push 144h ; jumptable 0059DF61 case 312
.text:005A1DAB call operator new(uint)
.text:005A1DB0 add esp, 4
.text:005A1DB3 test eax, eax
.text:005A1DB5 jz loc_5A239F
.text:005A1DBB mov ecx, [ebp+target]
.text:005A1DBE push dword ptr [ecx+4]
.text:005A1DC1 push dword ptr [ecx] ; target
.text:005A1DC3 mov ecx, eax ; this
.text:005A1DC5 push [ebp+sourceID] ; sourceID
.text:005A1DC8 push [ebp+source] ; source
.text:005A1DCB push edi ; effect
.text:005A1DCC call CGameEffectImmunityToSequester::CGameEffectImmunityToSequester(Item_effect_st *,CPoint const &,long,CPoint)
.text:005A1DD1 mov esi, eax
.text:005A1DD3 jmp loc_5A23A1 ; jumptable 0059DF61 default case

Link to comment

Opcode 319 seems to have been changed to Detect Traps. Relevant code:

 

push 144h ; jumptable 0059DF61 case 319
.text:005A1DDD call operator new(uint)
.text:005A1DE2 add esp, 4
.text:005A1DE5 test eax, eax
.text:005A1DE7 jz loc_5A239F
.text:005A1DED mov ecx, [ebp+target]
.text:005A1DF0 push dword ptr [ecx+4]
.text:005A1DF3 push dword ptr [ecx] ; target
.text:005A1DF5 mov ecx, eax ; this
.text:005A1DF7 push [ebp+sourceID] ; sourceID
.text:005A1DFA push [ebp+source] ; source
.text:005A1DFD push edi ; effect
.text:005A1DFE call CGameEffectDetectTraps::CGameEffectDetectTraps(Item_effect_st *,CPoint const &,long,CPoint)
.text:005A1E03 mov esi, eax
.text:005A1E05 jmp loc_5A23A1 ; jumptable 0059DF61 default case

Link to comment

Opcode 322 is listed as unused. Code is there for Evade Area Of Effect so it's being used now, or was just not used in game. Relevant code:

 

push 144h ; jumptable 0059DF61 case 322
.text:005A1E73 call operator new(uint)
.text:005A1E78 add esp, 4
.text:005A1E7B test eax, eax
.text:005A1E7D jz loc_5A239F
.text:005A1E83 mov ecx, [ebp+target]
.text:005A1E86 push dword ptr [ecx+4]
.text:005A1E89 push dword ptr [ecx] ; target
.text:005A1E8B mov ecx, eax ; this
.text:005A1E8D push [ebp+sourceID] ; sourceID
.text:005A1E90 push [ebp+source] ; source
.text:005A1E93 push edi ; effect
.text:005A1E94 call CGameEffectEvadeAreaOfEffect::CGameEffectEvadeAreaOfEffect(Item_effect_st *,CPoint const &,long,CPoint)
.text:005A1E99 mov esi, eax
.text:005A1E9B jmp loc_5A23A1 ; jumptable 0059DF61 default case

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...