Jump to content
Sign in to follow this  
Ascension64

Mixture of findings

Recommended Posts

ITM V1 Extended Header

0x3 (byte) Dice Sides (used when target has bit13 set [Quest critical])

0x10 (byte) Projectile Type - should be unsigned byte

0x11 (byte) Dice thrown (used when target has bit13 set [Quest critical])

0x12 (byte) Speed - should be byte

0x13 (byte) Damage bonus (used when target has bit13 set [Quest critical])

...

0x16 (byte) Dice sides - should be byte

0x17 (byte) Primary type (school) - the feature blocks get set to this type

0x18 (byte) Dice thrown - should be byte

0x19 (byte) Secondary type - the feature blocks get set to this type

 

0x26 Flags - bit10 is labelled 'Hostile'. Where is this used? The equivalent of item bit10 is Stolen and the spell bit10 is Hostile, which are treated the same. This is bit is unused in BG2. So unless it is used in another game, perhaps this is a typo?

 

 

Yet another primer on feature block timing modes:

0: Apply now, expires after duration [sec] (goes via 1000)

1: Apply now, expire on death

2: Apply now, expire when unequipped

3: Apply after duration [sec], expires after duration [sec] (goes via 6)

4: Apply after duration [sec], expire on death (goes via 7)

5: Apply after duration [sec], expire when unequipped (goes via 8)

6: (should only be used internally) Apply after 'duration' [specific game time], expires after 'duration' (goes via 1000) - N.B. if you start with an effect on this timing mode, the effect is applied at the time specified by 'duration', and also expires at the time specified by 'duration', so its useless

7: (should only be used internally) Apply after 'duration' [specific game time], expire on death (goes via 1)

8: (should only be used internally) Apply after 'duration' [specific game time], expire when unequipped (goes via 2)

9: Apply now, expires only when specifically removed - note the have timing-independent code and must not purge (i.e. needs to be added to a CEffectList)

10: Apply now, expires after duration [ticks]

1000: (should only be used internally) Apply now, expire after 'duration' [specific game time]

 

 

 

#98 (0x062) HP: Regeneration [98]

#25 (0x019) State: Poison [25]

#78 (0x04E) State: Disease [78]

Param2 == 0 (Do once per sec)

If timing is instant (0, 1, 2), param1 must be positive to work

If timing is delayed (3, 4, 5), when the delay is finished, the effect lasts for duration field or param1 seconds, whichever is smallest

 

Param2 == 1 (Do once per sec)

If timing is instant (0, 1, 2), currentHP * param1 / 100 must be positive to work

If timing is delayed (3, 4, 5), when the delay is finished, the effect lasts for duration field or (current HP * param1 / 100) seconds, whichever is smallest

 

 

 

#232 (0x0E8) Spell Effect: Cast Spell on Condition [232]

Parameter 3 (in an EFF file). If non-zero, reports the contingencies, activates the portrait icon, and the HitBy() contingency triggers immediately (independent of the 100-tick contingency trigger check delay)

 

 

 

EFF V2.0

0x0068 8 (resref) Resource 2 (was unknown)

0x0070 8 (resref) Resource 3 (was Parameter 5 (VVC))

For example, Cast Spell On Condition can specify up to three spells, these two being spell resref 2 and 3

 

 

#235 (0x0EB) Spell Effect: Wing Buffet [235]

Known values for 'Direction' are:

0 Same as 1

1 Away from the destination point (specified in EFF file)

2 Away from the source

3 Towards the destination point (specified in EFF file)

4 Towards the source

Share this post


Link to post

Wand09 in bg2 uses (tested!) the hostile bit.

 

Actually, it is used at least two places (same for items and spells):

 

1. in resistance checks

2. in hostile checks

Edited by Avenger

Share this post


Link to post
Wand09 in bg2 uses (tested!) the hostile bit.

 

Actually, it is used at least two places (same for items and spells):

 

1. in resistance checks

2. in hostile checks

Ah yes, I'm getting confused with the Parent Resource Flags again - they do refer to the extended header flags not the actual resource flags.

Share this post


Link to post

EFFV2.0

The only use of the unknown dword @ 0x48 (equivalent to the feature block @ 0x2c) is in

#187 (0x0BB) Script: Store Local Variable [187]

 

If non-zero, effect will only set the local variable if it does not already exist

The effect is also not purged immediately

Edited by Ascension64

Share this post


Link to post
EFFV2.0

The only use of the unknown dword @ 0x48 (equivalent to the feature block @ 0x2c) is in

#187 (0x0BB) Script: Store Local Variable [187]

 

If non-zero, effect will only set the local variable if it does not already exist

The effect is also not purged immediately

Could this be used in other opcodes as sort of an extra parameter?

 

0x13 (byte) Damage bonus (used when target has bit13 set [Quest critical])

I take those flags are offset 0x10 of the .cre. I wonder what the developers had in mind.

 

-Galactygon

Share this post


Link to post

[qyote]Could this be used in other opcodes as sort of an extra parameter?

It could be. Additionally, since there are only five types of saves, the remaining bits can be used for flags.

 

I take those flags are offset 0x10 of the .cre. I wonder what the developers had in mind.

Well, pretty much all the items I've seen have 0d0+0 damage in this field, meaning 'Quest critical' creatures are not damageable by these weapons.

Modding-wise, you could perhaps exploit this by making only certain weapons kill a certain boss, for example, but it is otherwise quite limited.

There may be other uses of quest critical though, which I don't know about.

Share this post


Link to post

I think 'quest critical' is an ID2 flag (they took a lot of these for their "CreAreFl"ags), but I don't want to count the bits.

 

I theorized that maybe it was damage vs. giants, but it's pretty clear BioWare never really got around to using the extra bytes (except some the primary and secondary types), and no CREs actually have the requisite flag set. Near Infinity should have it all labeled correctly when the game type is BG2 (they collapse back to the original WORDs with all the other engines).

Edited by devSin

Share this post


Link to post
Wand09 in bg2 uses (tested!) the hostile bit.

 

Actually, it is used at least two places (same for items and spells):

 

1. in resistance checks

2. in hostile checks

Ah yes, I'm getting confused with the Parent Resource Flags again - they do refer to the extended header flags not the actual resource flags.

 

Yeah, it isn't helping that for spells the hostile flag is in the main header, but for items it is in the extended header.

Share this post


Link to post
EFFV2.0

The only use of the unknown dword @ 0x48 (equivalent to the feature block @ 0x2c) is in

#187 (0x0BB) Script: Store Local Variable [187]

 

If non-zero, effect will only set the local variable if it does not already exist

The effect is also not purged immediately

Could this be used in other opcodes as sort of an extra parameter?

 

-Galactygon

I saw that field being used internally in some effect, but only in iwd2 :beer: Guess, that doesn't count.

ToBeX could definitely use it, the field is copied from effV1 fields.

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...