Jump to content

Possible oddities !


Guest

Recommended Posts

Hello, I transfer some post from this thread.

There are some oddities in IEDSP found by Rivvers and Selphira...

Quote

- Opcode 1, Type 3 :
IESDP : Only functions when using Timing Modes 2/5/8 (even in SPLs).
... True but...
Its effect is the one of type 1 if from an EFF file (opcode 177, 283) or if timing is 1
Type 3 is not cumulative, if an effect of this type is already in progress, the next one will have no effect...

- Opcode 18, Type 6
IESDP : 6 ⟶ Non-cumulative Modifier: HP = HP + 'Statistic Modifier' value (affects current and max HP) (EE only)
...Observed...
Cumulative, incompatibilities are eventually made with opcode 12, but used directly, its effect is strictly identical to that of type 0, thus cumulative

- For Opcode 42 and 62, Spell Level 512 is missing
It allows to double the number of spell slots exclusively for the spell level specified in Slot Amount Modify

Quote

Opcode 100: Protection: from Creature Type
9 ⟶ KIT.IDS (EE only)
Not configured, no effect


Opcode 105: Stat: Gold
0 ⟶ Cumulative Modifier: Gold = Gold + 'Statistic Modifier' value (not for the members of the group)
0 ⟶ Cumulative Modifier: Gold = Gold - 'Statistic Modifier' value (for the members of the group)
Note: Type= 1 0 can only remove gold. Gold amount has a lower bound of 0. (for the members of the group)
The effect modifies GOLD.  =>Only for not the members of the group (otherwise directly modifies the total amount of gold of the group)


Opcode 108: Stat: Reputation
4 ⟶ Reset Party Reputation to 100 (only in EEs) Party Reputation = 'Statistic Modifier' value, cannot lower reputation below 100, will raise reputation to 100 if already less (only in EEs)
5 ⟶ ????? (Party Reputation * 'Statistic Modifier' value) / 100, cannot lower reputation below 100, will raise reputation to 100 if already less (only in EEs)


Opcode 112: Item: Remove Item
Parameter #1: Irrelevant
If the item is removed from the inventory :
0 ⟶ Play EFF_M02.WAV
1 ⟶ Play AMB_D02B.WAV
2 ⟶ Play Resource2 .WAV
3+ ⟶ No sound


Opcodes 153-154-156-157-158
Parameter #2: Mode
Known values for Mode are:
    0 ⟶ Default overlay, "XX.BAM"
    1 ⟶ Custom overlay, Resource field: Animation file (VVC or BAM)
Important: Both parameters should be 0 (zero).


Opcode 79: Cure: Disease
Cure feeblemind too, like opcode 77


Opcode 178 Spell Effect: THAC0 vs. Creature Type Modifier
Opcode 179 Spell Effect: Damage vs. Creature Type Modifier
9 ⟶ KIT.IDS (EE only)
Not configured, the bonus will affect all creatures regardless of their kit


Opcode 213 Spell Effect: Maze
Parameter #1:    Type Irrelevant
Parameter #2:    Irrelevant Type


Opcode 217 Spell Effect: Unconsciousness 20HP
Parameter #2:    Irrelevant     Wake on Damage?
Special: ? ? ? Icon
When calling opcode 39, parameters 2 and special are copied. These two parameters have the same function as opcode 39.

If you have any questions or comments, I will pass them on to Selphira and Rivvers, the modders who spotted these issues...

Link to comment

Thanks! Added finality note to #1, since it's the other way around the usual expectations.

#16 sounds like a bug or improper testing — why would they go add an identical mode?

#42 and #62 it's not missing, but it is true only since iwdee, and it's mentioned in the iwd version as well (was only HoW technically). Will make it clear it's not available in other games.

#100 / 178 / 179 - how was this tested? AFAIK it's used by some internal AI targetting logic, so just trying regular combat is not a good test.

#105 - yep, bg2 introduced the change. The opcode was already split, but this wasn't mentioned.

#108, #112 added.

overlay opcodes: already there.

#79 suspicious, but asked Bubb to check. Fixed.

#213 fixed.

#217 added.

 

 

Edited by lynx
Link to comment

Hello !

I'll pass the message on but Rivvers who focused on this part is less available at the moment, so I'm not sure when he'll be able to answer...

What I can tell you myself :

- some test are on V2.5 of EE.

- all was tested through code from what I know.

 

I'm not sure if this will enlighten the method, but the findings have been made working on this project !

 

Ps : I saw on discord  that CamDawg and Bubbs confirm for #79 !

 

Link to comment

Hey, I'm coming over personally. My apologies for the delay.
Thank you JohnBob for posting my remarks and lynx for checking and taking them.
Before I start, this information is from decompiling and testing on version 2.5.
I am far from being an expert, but unless I make a personal error or change in version 2.6, the information is quite reliable.
I should point out that my English is so-so.

 

 

Quote

#100 / 178 / 179 - how was this tested? AFAIK it's used by some internal AI targetting logic, so just trying regular combat is not a good test.


I did some « not good » testing at the time but what I know is that these choices are not implemented in the game engine.
For some opcodes it works fine : 55, 109, 175, 177, 185, 238, 283, 319...
But not for the following ones: 100, 178, 179 & 219

 

Quote

#16 sounds like a bug or improper testing — why would they go add an identical mode?


Maybe it is a bug but it is easy to test. Effects with Type 6 are cumulative, like 0.
This mode is used internally by opcode 12, for flags 7 & 8. And, yes, these effects are not cumulative.
BUT this restriction is configured in opcode 12, not in opcode 18.
So, this mode does not stack if used by opcode 12 because opcode 12 checks if a mode 6 effect is active but if used directly from opcode 18, there is no restriction.

Fake or patched.

 

Thanks to you

Edited by rivvers
Link to comment

hey, I would like to make some minor additions

 

Opcode 2

Quote

Removes opcode #39 effects and the STATE_SLEEPING flag
Note: Does not remove the STATE_HELPLESS flag.

First one.


Opcode 3
Type == 1 : Sets BERSERKSTAGE2 to 1

 

Opcode 24
This opcode set the STATE_PANIC flag

 

Opcode 25

This opcode set the STATE_POISONED flag

Quote

if the Amount_1 field is less than 256, damage is dealt while HP > 100 / 'Amount_1'

it is rather : HP >= 100 / 'Amount_1'

If Amount_1 == 1, damage is dealt until HP == 99
If Amount_1 == 2, damage is dealt until HP == 49
If Amount_1 == 99, damage is dealt until HP == 1
If Amount_1 == 100, damage is dealt until death

 

Opcode 38

On EE, bard's song has no effect

 

Opcode 45

Sets HOLD to 1

 

Opcode 46

also remove opcode #109 and opcode #210

 

Opcode 47

Removes opcode #20

Does not affect creatures with STATE_NONDETECTION

 

Opcode 48
Removes opcode #38

 

Opcode 50
First byte = Location
Not implemented on version 2.5, maybe only on 2.6 ?

 

if you have any questions, please do not hesitate

Edited by rivvers
Link to comment
4 hours ago, rivvers said:

Opcode 2

Removes opcode #39 effects and the STATE_SLEEPING flag
Note: Does not remove the STATE_HELPLESS flag.

First one.

Both lines are true.  The second is listed because op39 is capable of setting STATE_HELPLESS on the CRE structure with certain timing modes, in which case this opcode will fall short of removing all of it's effects.  It's not mentioned in similar cure opcodes because their counterparts are only capable of maintaining STATE_HELPLESS, not setting it in the CRE structure.

On 4/26/2023 at 1:20 PM, rivvers said:

Maybe it is a bug but it is easy to test. Effects with Type 6 are cumulative, like 0.
This mode is used internally by opcode 12, for flags 7 & 8. And, yes, these effects are not cumulative.
BUT this restriction is configured in opcode 12, not in opcode 18.
So, this mode does not stack if used by opcode 12 because opcode 12 checks if a mode 6 effect is active but if used directly from opcode 18, there is no restriction.

Type 6 is not cumulative, the source is irrelevant.  Neither op12 or op18 check for existing type 6 effects.  The engine uses the "best" type 6 effect among all those currently present on the creature, similar to Base AC/op0.

4 hours ago, rivvers said:

Opcode 46

also remove opcode #109 and opcode #210

Cannot remove op210.  Op210 applies op45, which op46 can then remove.  If op210 is presently delayed when op46 is applied, or applied in the same effect stack as op46, nothing will be removed.

Link to comment
6 hours ago, kjeron said:

Both lines are true.  The second is listed because op39 is capable of setting STATE_HELPLESS on the CRE structure with certain timing modes, in which case this opcode will fall short of removing all of it's effects.  It's not mentioned in similar cure opcodes because their counterparts are only capable of maintaining STATE_HELPLESS, not setting it in the CRE structure.

True, i have misread the description, I read STATE_SLEEPING twice. My bad.

 

6 hours ago, kjeron said:

Type 6 is not cumulative, the source is irrelevant.  Neither op12 or op18 check for existing type 6 effects.  The engine uses the "best" type 6 effect among all those currently present on the creature, similar to Base AC/op0.

ok I assume this has been patched to 2.6

 

6 hours ago, kjeron said:

Cannot remove op210.  Op210 applies op45, which op46 can then remove.  If op210 is presently delayed when op46 is applied, or applied in the same effect stack as op46, nothing will be removed.

True again. It can remove the stun of opcode 210 but not the opcode 210 directly.

 

Thanks to you, I'll correct my post

Edited by rivvers
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...