Jump to content
Sign in to follow this  
Avenger

GemRB fields in projectile

Recommended Posts

I've improved the original .pro fileformat with several fields to be able to unhardcode pst and iwd projectiles.

Just publishing it here, in hope IESDP will go beyond the original engine documentation.

 

0x28 - dword - spark color (last used field before unknowns)

0x2c - dword - gemrb flags (will describe later)

0x30 - strref - print this string when projectile hits (example, iwd, 282 Bombardier Beetle Cloud)

0x34 - rgb color - color on hit, if the projectile has an additional color glow effect on target

0x38 - word - color glow speed

0x3a - word - screenshake on hit

0x3c - word - ids target value1 \

0x3e - word - ids target type1 \

0x40 - word - ids target value2 used in IDS targeting

0x42 - word - ids target type2 /

0x44 - resref - failure spell, applied on target in case of failure (ids targeting)

0x48 - resref - success spell, applied on targets in case of failure (ids targeting)

 

note: the color glow and screenshake could also be added into the hit spell, but they are much simpler to add.

 

In the area extension

 

0x224 - word - cone width - last used field

0x226 - word - unused

0x228 - resref - spread animation

0x230 - resref - secondary animation

0x238 - resref - explosion sound

0x240 - dword - explosion flags

0x244 - word - dice count, used in target count

0x246 - word - dice sides, used in target count

0x248 - word - tileX - spread animation evenly

0x24a - word - tileY - spread animation evenly

Share this post


Link to post

Base GemRB extensions flag at 0x2c

 

0 - bounce from walls (would be used for lightning bolt)

1 - continue after a hit (lance type projectiles)

2 - freeze on hit (various projectiles)

3 - no travel path, appear right over the target, all pillars do this

4 - oriented trail, trail bams and center hit animation got orientation

5 - curved path, like magic missiles

6 - random frame, iirc color spray uses this to have different animation phases for the globes

7 - pillar, there are multiple frames drawn on top of each other (the orientation count is used differently, all the cycles are drawn simultaneously)

8 - translucent, the travel projectile is half-transparent

9 - tinted by gradient, the gradient is used to tint the projectile

10 - create iteration, various magic missile types and call lightning

11 - apply default spell, the default spell is exactly the same as the projectile's name

12 - falling path, the projectile falls straight on the target

13 - incoming path, the projectile comes in a diagonal path (comet)

14 - line area of effect, scorcher types

15 - wall area of effect

16 - draw behind target

17 - pop in and out, dimension door

18 - pop out phase, used internally with dimdoor

19 - fade after explode, projectile gradually fades out before vanishing

20 - display string, enable the strref at 0x30

21 - random movement, used in iwd, 305 Whirlwind

22 - random cycle, used in color spray (for different colors)

23 - rgb on hit, enable the rgb color/speed at 0x34

24 - touch attack, needs a successful hit, like in pst, Grace's Kiss

25 - Negate first IDS (first ids targeting result negated)

26 - Negate second IDS (second ids targeting result negated)

27 - Both IDS tests must pass (otherwise one is enough)

28 - delay payload, play out the animation before applying the effects

Share this post


Link to post

0x240 gemrb specific area extension flags

 

0 - use explosion color for tinting the spread animation

1 - fill entire area, the target for the spread animation is scattered in the whole AOE

2 - start scattered, the animations start in their target point, otherwise they travel outwards from the center

3 - paletted center (use palette for the center vvc)

4 - repeated scatter, each iteration will replay the spread animation (in case of multiple iterations)

5 - paletted spread animation

6 - use secondary animation for spread

7 - double the number of spread animations

8 - apply spell on caster if failed

9 - multiple directions

10 - use target level instead of count (so it can affect 4d10 levels of creature), fill the hit dice fields

11 - reverse EA targeting (it is possible to hit all but enemies, all but party, etc)

12 - enable the tile fields at 0x248

Edited by Avenger

Share this post


Link to post

I have been looking at this for some months now, and would like to ask some questions about the GemRB .pro format for the sake of ToBEx. Much of what you listed is self-evident, but I was unable to figure out what these do:

 

new fields in the header

0x3c - word - ids target value1 \

0x3e - word - ids target type1 \

0x40 - word - ids target value2 used in IDS targeting

0x42 - word - ids target type2 /

new fields in the area extension

0x228 - resref - spread animation

0x230 - resref - secondary animation

0x238 - resref - explosion sound

0x244 - word - dice count, used in target count

0x246 - word - dice sides, used in target count

0x248 - word - tileX - spread animation evenly

0x24a - word - tileY - spread animation evenly

extensions flag at 0x2c

2 - freeze on hit (various projectiles)

6 - random frame, iirc color spray uses this to have different animation phases for the globes

11 - apply default spell, the default spell is exactly the same as the projectile's name

22 - random cycle, used in color spray (for different colors)

23 - rgb on hit, enable the rgb color/speed at 0x34

24 - touch attack, needs a successful hit, like in pst, Grace's Kiss

25 - Negate first IDS (first ids targeting result negated)

26 - Negate second IDS (second ids targeting result negated)

27 - Both IDS tests must pass (otherwise one is enough)

28 - delay payload, play out the animation before applying the effects

0x240 gemrb specific area extension flags

2 - start scattered, the animations start in their target point, otherwise they travel outwards from the center

7 - double the number of spread animations

8 - apply spell on caster if failed

9 - multiple directions

10 - use target level instead of count (so it can affect 4d10 levels of creature), fill the hit dice fields

11 - reverse EA targeting (it is possible to hit all but enemies, all but party, etc)

12 - enable the tile fields at 0x248

Some examples would help.

 

I've also noticed the latest GemRB build introduces cutscenized projectiles through .2da tables - how is this done? My opinion on this is that it can most efficiently be done via .vef files, which aren't even listed in the IESDP right now, and isn't used by any of the games.

 

-Galactygon

Share this post


Link to post

this extensions are all used, so we don't have to hardcode all those projectiles the original did. The cutscene stuff is for the pst ones with movies.

Share this post


Link to post

Most of these are needed only for pst, a some are needed for iwd/how and very few are needed for bg/tob.

 

To find out about them, I recommend opening a few GemRB supplied PST projectiles and look for the flags.

To be honest... Some of the flags don't always work as supposed, trial and error recommended.

 

An example, see the random frame bit? Try color spray without it (you will get all the same phased balls).

random cycle bit? Try color spray again (you will get all the same colored balls).

Edited by Avenger

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...