Jump to content

Opcode 271 changes between BG2:ToB and EE versions


Caedwyr

Recommended Posts

 In BG2:ToB Opcode 271 has the following effect

Quote

#271 (0x10F) Graphics: Avatar Removal Variants: BGEE IWD1
Parameter #1: Irrelevant
Parameter #2: Irrelevant

Description:
Removes the animation of the targeted creature(s).

However, it behaves differently in the Enhanced Edition.

Quote

#271 (0x10F) Graphics: Avatar Removal Variants: IWD1 BG2
Parameter #1: Irrelevant
Parameter #2: Irrelevant

Description:
Hides the creature's animation and selection circle, including illusionary images (Blur / Mirror Image).
Disables the creature's AI scripts.
The creature cannot take any action not listed in INSTANT.IDS (usually through ActionOverride().
The creature is still subject to area effect and may still be targeted directly by mouseover.

I've previously used this to create a spell effect that wanders around somewhat randomly within a small area.  If I remember correctly, the avatar removal meant that the creature was not targetable or selectable.  The nice thing about this is you could give the creature weapon that had a secondary animation effect that would play, though the creature could still wander around somewhat randomly.  I like using the Groundhog holding a sword that played the custom Tornado .vvc since it didn't move quickly, but would wander around randomly in a small area.

The problem is, in the enhanced editions the creature can now be targetted via mouseover and selected via drag-box and told to move (with the movement destination circles appearing).  Is there any way I can reproduce the original effect that I remember, or am I remembering incorrectly and there were no substantial changes to opcode 271?

Link to comment

Change the EA? MakeUnselectable()?

The two descriptions don't look too different, but I don't know if this selection stuff is different. We have it implemented more like the bg2 description (or imprisonment for that matter).

Link to comment

If I understand you correctly, your suggestion is to change the summoning EFF below to a different EA value.

Quote
#67 (0x43) Summon: Creature Summoning Variants: IWD2 PST
Parameter #1: Unknown
Parameter #2: Control
Description:
Summons a creature, with EA set to the 'Control' field. The Resource key should be set to the filename of the creature to summon.
Known values for 'Control' are:
0 Match target (hostile if no target)
1 Match target (hostile if no target)
2 As creature file
3 Match target (hostile if no target)
4 As creature file
5 Hostile to target
6 As creature file
8 As creature file
255 As creature file

If effect's target is set as 'Original Caster' then the 'Control' parameter covers 'Location' as well as control. In this case, nown values for 'Control' are:
2 = Summoned at location of target creature
4 = Summoned at location of caster
6 = Summoned at location of caster

However, I can't find MakeUnselectable in EA.ids

https://gibberlings3.github.io/iesdp/files/ids/bgee/ea.htm

Quote

Relates to offset 0x270 in the CRE file format.
For use with the ChangeEnemyAlly() action.
For use with the Allegiance() and AreaCheckAllegiance() triggers.
10
 

Includes all allegiances.

 

E.g. Sun Statue in Temple of Amaunator (rngsta01.cre)

 

Regular party members.

 

Familiars of mages.


4 ALLY

 

 

Creatures fully under control of the player.

 

Uncontrolled ally (green selection circle) of the player.

 

Creatures fully under control of the player.

 

Creatures of same allegiance as party, but uses red (hostile) selection circles. Can not be controlled by the player.

 

Creatures of same allegiance as party, but uses blue (neutral) selection circles. Can not be controlled by the player.

 

Used by script actions and triggers. Includes all party-friendly allegiances.

 

Used by script actions and triggers. Includes everything except party-friendly allegiances.


126 ANYTHING

 

 

Doors, Containers, Regions and Animations. It is included in EA groups [31|NOTGOOD], [126|ANYTHING], and [199|NOTEVIL].


128 NEUTRAL

 

 

Used by script actions and triggers. Includes everything except hostile allegiances.

 

Used by script actions and triggers. Includes all hostile allegiances.

 

Hostile creatures, but uses green (friendly) selection circles.

 

Hostile creatures, but uses blue (neutral) selection circles.

 

This is just a separate EA from ENEMY for detection purposes. They're still valid objects for [EVILCUTOFF] and NearestEnemyOf(), but not by [ENEMY]. It's not specific to PCs.

 

Creatures that are hostile to the party and allied creatures.

Should I be looking elsewhere for this flag?

Link to comment
Guest Gob Oafenplug

I expect lynx means rather than an EA value, an opcode: CGameEffect_MakeUnselectable = 365, which is EE only.

If you don't mind reimplementing the spell for the EEs, however, you have the nicer option which was used for Whirlwind in Icewind Dale: setting the random path flag in the projectile and not using a creature at all. I.e.

WRITE_LONG 0x2c THIS | BIT 21

or just steal the projectile :)

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