Jump to content

Displacer

Members
  • Posts

    138
  • Joined

  • Last visited

Everything posted by Displacer

  1. I'm in the Execute Action switch statement. The switch is loaded with 413 cases, which lines up with the number in the database, yet Help is not one of them. I cannot find 17 anywhere in the switch statement. I have no idea what's up with that. This is the EE version of BGII, maybe it got changed to another number? I know Help was kind of flaky in PS:T. I may have to traceback to AI Decode, see if it got changed. If not, I have no idea where it's processed. I can say it's not in with the others
  2. Ugh, I have to find the actions section again, forgot to mark it
  3. Found the Apply Effect section. This appears to be after all the setup has been done and the actual effect is applied. They range from a few lines of code to several hundred lines for different effects. Some of them have switch statements, I'm assuming this has to do with the parameters. For example CGameEffectAC::ApplyEffect contains a switch statement with 17 different switch statements, meaning (I assume) 17 different outcomes can be had with this effect.
  4. So I really don't know how to proceed with this. I'm getting the usual "you're wrong and a tool to boot" and other random nonsense, even though I'm posting the actual code that differs from what you're arguing I'm wrong about. I stated clearly that some things may be modified by parameters, and should be tested because obviously the code has been changed in the EE version, which is what I'm documenting. I could traceback through all the code after the setup code, but I suspect I would get the same arguments, so I don't know if I really want to do that and have to argue through it. It's also a pain knowing things have been discovered and just not updated in the database. That doesn't bother me as much, I just see it as double checking. At any rate my opinion is they should be rechecked to see if they match up to what I've found, not just blown off as incorrect. I'll give you the offset to the switch statement to all the opcodes and you can see them for yourself. I've also found the "Actions" switch statement and I don't know if it would be worth the trouble of going through them, considering what I'm getting here I mean do you want to know how these work or not?
  5. That's not how software works...
  6. Not disputing that some opcodes are correct, as I said what I posted was just setup code and the call, I didn't check the parameters or how they are used, or the actual calls so they may very well work as described, the call altered via the parameters so I'm not disputing that, just posting the differences I found while I was in that section. I can always trace back to see how the parameters are used, or trace forward from the setup code if needed. I may do that anyway because now I'm curious how they're used So I saw a lot of unknowns in the parameters of the opcodes, are they still unknown and just not updated in the database? Or do they still need to be explored?
  7. Yea, I'm almost positive the Show creatures are just there to prevent crashes. 110 was just the first one I found, most likely fixups from EE. As for 319, I didn't go further into the code, what I posted was from the switch statement, they're just setup code but the call after setup is to detect traps, that doesn't mean it works however. I did no checking into parameters, or the calls themselves from the setup code so its entirely possible they're broken in another area of code, that's why I added to some that it should be tested. If you need, I can trace through any of them to their completion
  8. Well that's about it. For some reason, some of the switch statement code was out of order so I skipped over most of them, there weren't many but there are a few I didn't check. So there you have it. Let me know if you need the parameters hunted down, or any other info.
  9. Opcode 360 has been replaced with the Show Creature code, unused
  10. Opcode 338 has been replaced with the Show Creature code so it's unused
  11. 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
  12. 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
  13. Opcode 313 seems to have been removed. I'm almost positive the Effect Show Creatures are placed in unused opcodes to prevent crashes and this one contains that code. (code is first one in this thread)
  14. 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
  15. 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
  16. Opcode 183 is Apply Effect Equip Item Type, not Apply Effect Itemtype. It appears 182 and 183 equips items? 182 is just item, and 183 is a specific type, most likely used in scripting. Again worth testing out and I'll list relative code for this one if needed.
  17. Opcode 182 is Apply Effect Equip Item, not Apply Effect Item. Marked as "Warning: This effect has never been seen to work" but maybe it works on equipped items only? Worth testing out. I'll post relative code if needed.
  18. Opcode 149 (listed as unknown) is exactly the same code as 150. I'll post the code if needed, but they are exactly the same. Most likely it's unused and a copy/paste to keep code length, but it is usable.
  19. 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
  20. 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
  21. Huh, the empty opcode 113 is also ShowCreatures. I wonder if these are just placeholders, or copy/paste code to keep the sizes correct...
  22. 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
  23. 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
  24. Huh, apparently there's another signature for the stores, don't know if it's a leftover, but it is checked for. Its 'STOO'. Here's the relevant code (note: the strings are stored backwards): .text:004FAB02 cmp this, 'ROTS' .text:004FAB08 jz short loc_4FAB12 .text:004FAB0A cmp this, 'OOTS' .text:004FAB10 jnz short loc_4FAAFA After looking over the code again, it appears they can be used interchangeably. Edit: These are for V1.0
  25. I answered your question: "So are those used in any infinity game?" And my point was, somewhen at the early development of bg1, someone wrote those field names, but didn't follow up with any implementation. The rest of the games in the following 20 years just inherited the names. As of the EE, you can expect unused fields to be re-purposed when needed. The post of mine you're quoting has nothing to do with the answer you gave me, and to clear things up, the struct names are meaningless, I only included them for interest so I really have no idea what you're talking about. I accepted your answer, and replied as to why I was doing this, which has nothing at all to do with this answer. Sorry, I wasn't trying to be rude, I think posts just got crossed or misunderstood and you have my apologies if so
×
×
  • Create New...