Need Advice on Potential Spell Mod
Kalindor
Member Posts: 51
I am considering adapting some of the spells and abilities that I have previously scripted for NwN into BG2:EE. However, I am not sure of what is possible in this engine with the currently available opcodes, etc. I would like advice from experienced modders about whether the following types of abilities are doable in BG2:EE:
1) Effect that changes the next spell you cast. Examples: "Your next spell lasts twice as long," "Your next spell also deals +2d6 fire damage."
2) As 1 above, but over a duration. Example: "For one turn, any spells you cast heal you for 2d6 hit points."
3) An effect that modifies a specific spell. Examples: "Ice Storm spells cast by you deal an additional 1d6 cold damage," "When you strike an enemy with Chill Touch, they must save vs. death or die."
4) Effects conditional on the target's status. Examples: "Deal 1d10 poison damage + 2d10 additional damage if the target is diseased," "Target suffers 2d6 magic damage for each Enchantment spell affecting them."
5) Copy effects from one creature to another. Example: "Any enchantments affecting you are mirrored on touched ally."
6) Effect that reduces (but does not eliminate) miscast magic chance. This could be used to simulate Still Spell feats on the vanilla armor system, for example.
7) Effect that changes the type of damage dealt. Example: "Damage inflicted by your spells is converted to fire damage."
Thanks in advance for any advice.
-K
1) Effect that changes the next spell you cast. Examples: "Your next spell lasts twice as long," "Your next spell also deals +2d6 fire damage."
2) As 1 above, but over a duration. Example: "For one turn, any spells you cast heal you for 2d6 hit points."
3) An effect that modifies a specific spell. Examples: "Ice Storm spells cast by you deal an additional 1d6 cold damage," "When you strike an enemy with Chill Touch, they must save vs. death or die."
4) Effects conditional on the target's status. Examples: "Deal 1d10 poison damage + 2d10 additional damage if the target is diseased," "Target suffers 2d6 magic damage for each Enchantment spell affecting them."
5) Copy effects from one creature to another. Example: "Any enchantments affecting you are mirrored on touched ally."
6) Effect that reduces (but does not eliminate) miscast magic chance. This could be used to simulate Still Spell feats on the vanilla armor system, for example.
7) Effect that changes the type of damage dealt. Example: "Damage inflicted by your spells is converted to fire damage."
Thanks in advance for any advice.
-K
0
Comments
SpellA: (adds the on-cast effect to you):
- Opcode 177, duration = 60, resource = EffA
// Use EFF file
EffA:
- Opcode = 256, resource = SpellB, parent_resource = SpellA
// store a false sequencer on yourself
SpellB: (contains the on-cast effect):
- Range = 32767, Damage/Heal/whatever
SpellC: (triggers the on-cast effect):
- Opcode 256, target = 9 (Original Caster), resource = SpellA
// releases the sequencer each time you cast this spell
Add to any desired spell (all headers):
- Ocpode 146, target = 2, parameter2 = 1, resource = SpellC
// Cast SpellC
If you want it to scale with caster level, you would need separate version of each priest/wizard, with the spells flagged as such, otherwise leave all as innate.
This could also be done by checking a custom Spellstate instead of storing a Sequencer, but there are a limited number of spellstates (~120) available for all mods.
"The target gains a +1 bonus to armor class for every two points in the Charisma attribute."
Much appreciated.
SpellA: (adds the repeat effect to you):
- Opcode 177, duration = 60, resource = EffA
// Use EFF file
EffA:
- Opcode = 232, resource = SpellB, parameter2 = 20, special = 102
// cast spell on condition (hp < 102%)
// hp < 102% will always be true and is checked once per round
// 102 is used because value must be even or the combat log will be flooded with feedback messages
SpellB: (contains filters for Charisma):
- Opcode 326, target = 1, parameter1 = 24 parameter2 = 132 resource = SpellBC
- // apply effects list (SpellBC) (if Charisma >= 24)
- Opcode 318, target = 1, parameter1 = 24 parameter2 = 132 duration = 1, resource = SpellB
- // block remaining effects (of this spell) (if Charisma >= 24)
- Opcode 326, target = 1, parameter1 = 22 parameter2 = 132 resource = SpellBB
- Opcode 318, target = 1, parameter1 = 22 parameter2 = 132 duration = 1, resource = SpellB
- Opcode 326, target = 1, parameter1 = 20 parameter2 = 132 resource = SpellBA
- Opcode 318, target = 1, parameter1 = 20 parameter2 = 132 duration = 1, resource = SpellB
- Opcode 326, target = 1, parameter1 = 18 parameter2 = 132 resource = SpellB9
- Opcode 318, target = 1, parameter1 = 18 parameter2 = 132 duration = 1, resource = SpellB
- Opcode 326, target = 1, parameter1 = 16 parameter2 = 132 resource = SpellB8
- Opcode 318, target = 1, parameter1 = 16 parameter2 = 132 duration = 1, resource = SpellB
- etc...
- Opcode 326, target = 1, parameter1 = 4 parameter2 = 132 resource = SpellB2
- Opcode 318, target = 1, parameter1 = 4 parameter2 = 132 duration = 1, resource = SpellB
- Opcode 326, target = 1, parameter1 = 2 parameter2 = 132 resource = SpellB1
- Opcode 318, target = 1, parameter1 = 2 parameter2 = 132 duration = 1, resource = SpellB
- Opcode 326, target = 1, parameter1 = 0 parameter2 = 132 resource = SpellB0
- Opcode 318, target = 1, parameter1 = 0 parameter2 = 132 duration = 1, resource = SpellB
SpellBC: (contains effects for 24/25 Charisma):
- Opcode 321, target = 1, resource = SpellB0
- // remove effects of all spells applying the various AC bonuses for Charisma
- Opcode 321, target = 1, resource = SpellB1
- Opcode 321, target = 1, resource = SpellB2
- etc..
- Opcode 321, target = 1, resource = SpellB9
- Opcode 321, target = 1, resource = SpellBA
- Opcode 321, target = 1, resource = SpellBB
- Opcode 321, target = 1, resource = SpellBC
- Opcode 0, target = 1, parameter1 = 12, duration = 14
- + any other effects you want for 24/25 Charisma
SpellB9: (contains effects for 18/19 Charisma):
- Opcode 321, target = 1, resource = SpellB0
- Opcode 321, target = 1, resource = SpellB1
- Opcode 321, target = 1, resource = SpellB2
- etc..
- Opcode 321, target = 1, resource = SpellB9
- Opcode 321, target = 1, resource = SpellBA
- Opcode 321, target = 1, resource = SpellBB
- Opcode 321, target = 1, resource = SpellBC
- Opcode 0, target = 1, parameter1 = 9, duration = 14
- + any other effects you want for 18/19 Charisma
SpellB2: (contains effects for 4/5 Charisma):
- Opcode 321, target = 1, resource = SpellB0
- Opcode 321, target = 1, resource = SpellB1
- Opcode 321, target = 1, resource = SpellB2
- etc..
- Opcode 321, target = 1, resource = SpellB9
- Opcode 321, target = 1, resource = SpellBA
- Opcode 321, target = 1, resource = SpellBB
- Opcode 321, target = 1, resource = SpellBC
- Opcode 0, target = 1, parameter1 = 4, duration = 14
- + any other effects you want for 4/5 Charisma
etc...