CamDawg Posted October 30, 2014 Share Posted October 30, 2014 It took some new code to get all of the IWD spells to work in IWDEE; some of these debuted in BGIIEE (321). Here are the new opcodes, with a few notes from me following each in italics. Some of these also require lookup tables, which will be noted in another post. Protection: Immunity to Spell [318]Parameter 1: IDS Entry if Parameter 2 > 101. Otherwise it should be 0.Parameter 2: TypeDescription:The creature type specified by the 'Type' field becomes immune to the spell specified by the resource key. Can be used to grant protection from items as well as spells.Known values for 'Type' are:0 Default1 Undead2 Not Undead3 Fire Using/Dwelling4 Not Fire Using/Dwelling5 Humanoid6 Not Humanoid7 Animal8 Not Animal9 Elemental10 Not Elemental11 Fungus12 Not Fungus13 Huge Creature14 Not Huge Creature15 Elf16 Not Elf17 Umber Hulk18 Not Umber Hulk19 Half-Elf20 Not Half-Elf21 Humanoid or Animal22 Not Humanoid or Animal23 Blind24 Not Blind25 Cold Using/Dwelling26 Not Cold Using/Dwelling27 Golem28 Not Golem29 Minotaur30 Not Minotaur31 Undead or Fungus32 Not Undead or Fungus33 Good34 Not Good35 Neutral36 Not Neutral37 Evil38 Not Evil39 Paladin40 Not Paladin41 Same Moral Alignment as Source42 Not Same Moral Alignment as Source43 Source44 Not Source45 Water Using/Dwelling46 Not Water Using/Dwelling47 Breathing48 Not Breathing49 Allies50 Not Allies51 Enemies52 Not Enemies53 Fire or Cold Using/Dwelling54 Not Fire or Cold Using/Dwelling55 Unnatural56 Not Unnatural57 Male58 Not Male59 Lawful60 Not Lawful61 Chaotic62 Not Chaotic63 Evasion Check (Thief)64 Orc65 Not Orc66 Deaf67 Not Deaf...102 EA103 GENERAL104 RACE105 CLASS106 SPECIFIC107 GENDER108 ALIGNMENT109 KIT Notes: The parameters here are basically IWD's original 206, with the addition of standard EFF targeting for values > 100. Removal: Effects specified by Resource [321]Parameter 1: IrrelevantParameter 2: TypeDescription:Removes effects from the resource specified by the resource key, in the style specified by the 'Type' field.Known values for 'Type' are:0 Default1 Equipped effects list only2 Timed effects list only You can use 321 to avoid stacking issues; for example Armor of Faith in EE uses a self-targeted 321 to remove prior castings before applying fresh effects. This lets you refresh buffs without having illegal stacking. In vBG2, you had to prevent stacking with 206, which would prevent you from re-upping your buffs before expiry and (worse) wasting your spell if you tried.Stat:Turn Undead Level [323]Parameter 1: Statistic ModifierParameter 2: TypeDescription:Applies the modifier value specified by the 'Statistic Modifier' field in the style specified by the 'Type' field.Known values for 'Type' are:0 Cumulative Modifier -> TurnLevel = TurnLevel + 'Statistic Modifier' value1 Flat Value Modifier -> TurnLevel = 'Statistic Modifier' value2 Percentage Modifier -> TurnLevel = (TurnLevel * 'Statistic Modifier' value) / 100Protection: Immunity to Spell and Message [324]Parameter 1: IDS Entry if Parameter 2 > 101. Otherwise it should be 0.Parameter 2: TypeDescription:The creature type specified by the 'Type' field becomes immune to the spell specified by the resource key. Can be used to grant protection from items as well as spells. This opcode also displays a message then the target is immune to the specified spell i.e. "Unaffected by effects from ".Known values for 'Type' are:0 Default1 Undead2 Not Undead3 Fire Using/Dwelling4 Not Fire Using/Dwelling5 Humanoid6 Not Humanoid7 Animal8 Not Animal9 Elemental10 Not Elemental11 Fungus12 Not Fungus13 Huge Creature14 Not Huge Creature15 Elf16 Not Elf17 Umber Hulk18 Not Umber Hulk19 Half-Elf20 Not Half-Elf21 Humanoid or Animal22 Not Humanoid or Animal23 Blind24 Not Blind25 Cold Using/Dwelling26 Not Cold Using/Dwelling27 Golem28 Not Golem29 Minotaur30 Not Minotaur31 Undead or Fungus32 Not Undead or Fungus33 Good34 Not Good35 Neutral36 Not Neutral37 Evil38 Not Evil39 Paladin40 Not Paladin41 Same Moral Alignment as Source42 Not Same Moral Alignment as Source43 Source44 Not Source45 Water Using/Dwelling46 Not Water Using/Dwelling47 Breathing48 Not Breathing49 Allies50 Not Allies51 Enemies52 Not Enemies53 Fire or Cold Using/Dwelling54 Not Fire or Cold Using/Dwelling55 Unnatural56 Not Unnatural57 Male58 Not Male59 Lawful60 Not Lawful61 Chaotic62 Not Chaotic63 Evasion Check (Thief)64 Orc65 Not Orc66 Deaf67 Not Deaf...102 EA103 GENERAL104 RACE105 CLASS106 SPECIFIC107 GENDER108 ALIGNMENT109 KIT Like 318, except this one doesn't print a message in the feedback window. Stat: Save vs. all [325]Parameter 1: Statistic ModifierParameter 2: TypeDescription:Alters all saving throws by the modifier value specified by the 'Statistic Modifier' field in the style specified by the 'Type' field.Known values for 'Type' are:0 Cumulative Modifier -> Save = Save + 'Statistic Modifier' value1 Flat Value Modifier -> Save = 'Statistic Modifier' value2 Percentage Modifier -> Save = (Save * 'Statistic Modifier' value) / 100'Statistic Modifier' can be positive or negative. Same as the individual save vs. X opcodes.Add Effects List [326]Parameter 1: IDS Entry if Parameter 2 > 101. Otherwise it should be 0.Parameter 2: TypeDescription:The creature type specified by the 'Type' field will be affected by the spell in the 'Resource' field.Known values for 'Type' are:0 Default1 Undead2 Not Undead3 Fire Using/Dwelling4 Not Fire Using/Dwelling5 Humanoid6 Not Humanoid7 Animal8 Not Animal9 Elemental10 Not Elemental11 Fungus12 Not Fungus13 Huge Creature14 Not Huge Creature15 Elf16 Not Elf17 Umber Hulk18 Not Umber Hulk19 Half-Elf20 Not Half-Elf21 Humanoid or Animal22 Not Humanoid or Animal23 Blind24 Not Blind25 Cold Using/Dwelling26 Not Cold Using/Dwelling27 Golem28 Not Golem29 Minotaur30 Not Minotaur31 Undead or Fungus32 Not Undead or Fungus33 Good34 Not Good35 Neutral36 Not Neutral37 Evil38 Not Evil39 Paladin40 Not Paladin41 Same Moral Alignment as Source42 Not Same Moral Alignment as Source43 Source44 Not Source45 Water Using/Dwelling46 Not Water Using/Dwelling47 Breathing48 Not Breathing49 Allies50 Not Allies51 Enemies52 Not Enemies53 Fire or Cold Using/Dwelling54 Not Fire or Cold Using/Dwelling55 Unnatural56 Not Unnatural57 Male58 Not Male59 Lawful60 Not Lawful61 Chaotic62 Not Chaotic63 Evasion Check (Thief)64 Orc65 Not Orc66 Deaf67 Not Deaf...102 EA103 GENERAL104 RACE105 CLASS106 SPECIFIC107 GENDER108 ALIGNMENT109 KITGraphics: Icewind Visual Spell Hit (plays sound) [327]Parameter 1: IrrelevantParameter 2: TypeDescription:Shows the lighting effect specified by the 'Type' value. These effects are usually used for spell hits based on the spell school.If Target is non-zero then the effect will be played in the original target point (ignores spell target).Known values of type are listed in projectl.ids starting at offset 0x1000.State: Set State [328]Parameter 1: IrrelevantParameter 2: TypeDescription:Sets the state of the targeted creature(s) to the value specified by the 'Type' field.These effects could be detected by the gamescript trigger ExtendedStateCheck. (see extstate.ids).Known values for 'Type' are:0 Chaotic Command1 Miscast Magic2 Pain3 Greater Malison4 Blood Rage5 Cats Grace6 Mold Touch7 Shroud of FlameIf the 'special' field was set to 1, then this effect behaves like IWD2 Set State effect. (see splstate.ids)Spell Effect: Slow Poison [329]Parameter 1: Slow FactorParameter 2: IrrelevantDescription:Applies the slow poison effect to the targeted creature(s), using the 'Slow Factor' field.Text: Float Text [330]Parameter 1: StrrefParameter 2: TypeDescription:Displays the text specified by the 'Strref' field, in the style specified by the 'Type' field.Known values for 'Type' are:0 Default (show strref)1 Cynicism (show Cynicism strrefs)Summon: Random Monster Summoning [331]Parameter 1: CountParameter 2: TypeDescription:Summons a number of monsters, equal to the Dice rolls+'Count'. The 'Type' field set which 2da file to pick the creatures to summon from. The 2da files are listed in smtables.2da.If the resource field is filled, it will use a .2da to determine which monsters to summon.If used from an external effect (.eff), the vvc field controls the bam/vvc file played over the creatures when summoning.If used from an external effect (.eff), the second vvc field controls the bam file played over the target area when summoning.Setting the special field to 2 will use the caster's level instead of Dice rolls.Stat: Specific Damage Modifier [332]Parameter 1: Damage ModifierParameter 2: TypeDescription:Increases the damage caused by the character. The 'Type' parameter defines which damage type is increased. The modifier is either a flat value modifier for type 0, or a percentile modifier for all other cases.Known values for 'Type' are:0 all damage increased1 Fire damage2 Cold damage3 Electricity damage4 Acid damage5 Magic damage6 Poison damage7 Slashing damage8 Piercing damage9 Crushing damage10 Missile damageSpell Effect: Static Charge [333]Parameter 1: NumberParameter 2: LevelDescription:Casts a secondary spell (default: original resource+B) on the target, for a number of strikes specified by the 'Number' field. The spell will be cast through its projectile. If a spell 'Level' is not specified, then the spell will be cast at level 1 and the damage opcodes will inherit the dice values of this effect, otherwise the spell will be cast at the given level. The spell is applied once per round (every 6 seconds) by default. Setting the special field to 60 will make the spell apply once per turn (every 60 seconds) instead.Spell Effect: Turn Undead [334]Parameter 1: IrrelevantParameter 2: IrrelevantDescription:Turns undead just like the modal action. The caster must have some turn undead levels to be effective. See opcode 323Spell Effect: Seven Eyes [335]Parameter 1: StateParameter 2: TypeDescription:This effect sets the spellstate defined under 'State', increases the seven eyes stat and grants the special ability named in the resource field.'Type' selects the blocked spell or effect, the blocking criteria are listed in 7eyes.2da thus works like a very selective spell trap.The special field may be used to define separate eye groups (it will remove 336 opcodes of the same type).Graphics: Display Eyes Overlay [336]Parameter 1: SequenceParameter 2: TypeDescription:Displays a twin VVC linked to the target. The last letter of the VVC is stored in 'Sequence'Remove: Opcode [337]Parameter 1: Parameter ValueParameter 2: OpcodeDescription:Removes all 'Opcode' from target, that has the same parameter 2 as 'Parameter Value'. Use -1 to ignore the Parameter Value.Disable Rest [338]Parameter 1: StrrefParameter 2: ModeDescription:Disables save and/or rest, prints the relevant string when they are attempted.Known values for 'Mode' are:0 - cannot rest1 - cannot save2 - cannot save or restAlter Animation [339]Parameter 1: Value and ModifierParameter 2: Projectile TypeDescription:Modifies an area animation's Cycle and plays an area hit animation over it indexed by 'Projectile Type'.'Value' is the high word of the first parameter, 'Modifier' is a bitfield manipulation operation. The special field is containing the range of effect.Known values for 'Modifier' are:0 - Set 'Value' - ignores original1 - And 'Value' - keeps bits2 - Or 'Value' - sets bits3 - Xor 'Value' - toggles bits4 - And not 'Value' - turns off bitsSpell Effect: Change Backstab Effect [340]Parameter 1: IrrelevantParameter 2: IrrelevantDescription:Applies the spell specified by the resource key when the target successfully performs a backstab.Both parameters should be 0 (zero).Spell Effect: Change Critical Hit Effect [341]Parameter 1: IrrelevantParameter 2: UseDescription:Applies the spell specified by the resource key when the target successfully performs a critical hit.Known values for 'Use' are:0 - Use spell for critical hits of both hands1 - Use spell for critical hit only by this weaponAnimation: Override Data [342]Parameter 1: ValueParameter 2: FieldDescription:Overrides the character animation's blood color or body heat flag.Known values for 'Field' are:1 - Override body heat2 - Override blood colorSpell Effect: HP Swap [343]Parameter 1: IrrelevantParameter 2: ModeDescription:Swaps the current hit points of the source and target.Known values for 'Mode' are:0 - Swap only if the caster has more current hit points than the target (default)1 - Always swap Quote Link to comment
argent77 Posted October 31, 2014 Share Posted October 31, 2014 From what I've seen of effect opcode 327 (Icewind Visual Spell Hit), param2 (type) uses a hardcoded id for the lighting effect. I'm only judging from the single instance found in the game (SPPR326B.SPL) however, which uses type=88 (Mold touch). Any confirmation?Effect opcode 336 (Seven eyes overlay) uses param1=7 (sequence) in SPWI725.SPL. How does it relate to "The last letter of the VVC"? Does it specify the letter position in the resource name? How is param2 (type) used?I've also seen descriptions of an effect opcode 360 (Reputation breaking point) somewhere. Is it actually implemented? If yes, what are the parameters? Quote Link to comment
Avenger Posted October 31, 2014 Share Posted October 31, 2014 opcode 360 is not used in iwdee (probably not even present in it), i cannot tell if it is working or not (didn't write/use/test it). Lets say, it will work someday. opcode 327 just shoots a projectile at the target (with no fx in it). The same (or similar) could also be achieved by the CG opcode (140). opcode 336 uses 7 initially, but it is decreased by every eye spent (it is decreased by the engine). When it creates a vvc resref to display, it takes the resource field and adds this number to it (as string). Like "#7EYES1A" (where A = 1, B = 2, etc). Quote Link to comment
CamDawg Posted October 31, 2014 Author Share Posted October 31, 2014 Opcode 360 is used to prevent a creature from leaving the party due to reputation; I'll see if I can scare up the details somewhere. Quote Link to comment
argent77 Posted October 31, 2014 Share Posted October 31, 2014 Opcode 360 is used to prevent a creature from leaving the party due to reputation; I'll see if I can scare up the details somewhere. While you're at it, can you also try to dig up information about opcode 322 (Evade AoE)? Quote Link to comment
Jarno Mikkola Posted October 31, 2014 Share Posted October 31, 2014 (edited) The original post doesn't mention it, but am I correct if I will still assume that the IWDEE uses the BG2 opcode base ? So if I use a opcode 261 in IWDEE, it's the same as in BG2, and not the one in IWD1 ? Edited October 31, 2014 by Jarno Mikkola Quote Link to comment
Avenger Posted October 31, 2014 Share Posted October 31, 2014 (edited) It is all that BG[2]EE has, plus some more. Opcodes from vanilla IWD were ported to either simulating them by old opcodes, or tweaked opcodes or reimplemented them in a new slot. DLTCEP uses the BG2 effect description file for IWDEE. Specifically: opcode 261 of iwd was relocated to 318. [edit] Hmm, i think 261 is probably simulated by 101 (protection from opcode). Edited October 31, 2014 by Avenger Quote Link to comment
Avenger Posted October 31, 2014 Share Posted October 31, 2014 Here is the opcode conversion table: IWD Converter IWDEE232 -> 400 -> 61 - "colour: Fade from Colour RGB" (Color Glow Dissipate)206 -> ->318 - "Protection: Immunity Spell" (IWD like spell immunities, see external table splprot.2da)290 -> ->324 - "Protection: from Spell (Message)" (Same as above with text feedback)238 -> ->325 - "Stat: Save vs. all" (modifier for all 5 Saving throws)402 -> ->326 - "Add Effects List" (based on spell immunities, applies a spell on target)233 -> ->327 - "Graphics: Icewind Visual Spell Hit (plays sound)" (Plays spell hit projectiles of IWD starting at 0x1000), most of these can be simulated by vvc, but not all288 -> ->328 - "State: Set State" (Sets extended state behavior can be HoW or IWD2 style)239 -> 405 ->329 - "Spell Effect: Slow Poison" (Decreases poison effects by param1 factor)283 -> ->330 - "Text: Float Text [283]" (Used in Cynicism)240 -> 401 ->331 - Monster summoning243 -> 402 ->331 - Animate dead (Add 13 to param2)246 -> 403 ->331 - Mixed summons (Add 15 to param2)248 -> 404 ->331 - Shadow summons (Add 26 to param2)73 -> 73 -> 332 - Specific damage bonus, if param2!=0264 -> 407->333 - Static charge282 -> 406 ->328 - Set State with param2 = 35 and special field = 1280 -> 409 ->334 - Turn Undead269-275 -> ? -> 335 - Seven Eyes effects, param1 = spell state (48+index), param2 = index, resource = SPIN107+index? -> ? -> 336 - Seven Eyes Overlay (this one has no proper equivalent)276 -> 500 -> 337 - Remove Effect by Opcode (used by seven eyes and cloudburst)- - 338 - Cannot save or rest (from Seth)- - 339 - Change Area Animation (IWD hardcoded projectile effect)- - 340 - Set Backstab Spell (spell that is applied on victim of a backstab)- - 341 - Set Critical Hit Spell (spell that is applied on victim of a critical hit) Quote Link to comment
CamDawg Posted October 31, 2014 Author Share Posted October 31, 2014 The original post doesn't mention it, but am I correct if I will still assume that the IWDEE uses the BG2 opcode base ? So if I use a opcode 261 in IWDEE, it's the same as in BG2, and not the one in IWD1 ?That's correct. We used all of the IWD-in-BG2 tricks to map as many opcodes as we could to existing BGIIEE ops, then turned Avenger loose on the ones that we either couldn't convert or were poorly simulated. Quote Link to comment
Grammarsalad Posted October 31, 2014 Share Posted October 31, 2014 So...any chance these will be backported to bgee... =) Quote Link to comment
Mad Mate Posted November 1, 2014 Share Posted November 1, 2014 So...any chance these will be backported to bgee... =) I second this! Is there any possibility for unified Infinity engine THE ENGINETM? So we have some new stable grounds to build from... Quote Link to comment
Jarno Mikkola Posted November 1, 2014 Share Posted November 1, 2014 (edited) So...any chance these will be backported to bgee... =) I second this! Is there any possibility for unified Infinity engine THE ENGINETM? So we have some new stable grounds to build from... How would they know this ? As a fact. And by the by, your support here is as likely to be heard in as a fart from Venus.. I feel it's time to poke someone ! And the last reason to not port things is kinda bad, download size limit.. Edited November 1, 2014 by Jarno Mikkola Quote Link to comment
CamDawg Posted November 1, 2014 Author Share Posted November 1, 2014 Yes, features are being backported between the games but it's not as high a priority as, say, bug fixing. Each bit of code added triggers a new round of regression testing so priority goes to code that's needed to address something. E.g. the expanded 232 options from IWDEE are coming in the BGIIEE 1.3 patch so that we can have the scriptless troll death/revive sequence. In short, yes, we'd like to get everything onto the same level, but I have no idea about a time frame. Remember a lot of us are modders, too. Quote Link to comment
Grammarsalad Posted November 1, 2014 Share Posted November 1, 2014 Yes, features are being backported between the games but it's not as high a priority as, say, bug fixing. Each bit of code added triggers a new round of regression testing so priority goes to code that's needed to address something. E.g. the expanded 232 options from IWDEE are coming in the BGIIEE 1.3 patch so that we can have the scriptless troll death/revive sequence.In short, yes, we'd like to get everything onto the same level, but I have no idea about a time frame. Remember a lot of us are modders, too. Thanks for making my day! Quote Link to comment
K4thos Posted April 10, 2015 Share Posted April 10, 2015 regarding 324. Any way to change string 26818 to different one? I'd like to use this effect in BG2:EE but it shows up wrong desription. Quote Link to comment
Recommended Posts
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.