Skip to content

[v2.5.0] OlvynSpells: 150 New Spells for BG:EE, BG2:EE, IWD:EE and EET

1246720

Comments

  • GrammarsaladGrammarsalad Member Posts: 2,582
    @OlvynChuru

    Okay, so this awesome mod has inspired me to work on my own spell mod. It looks like we (will) have a few more spells that are similar (but never quite identical--read on). I'm happy to report that we seem to have different implementations in every instance, so even when we implement the same spell--e.g. Delayed Blast Fireball--we implement them differently, giving the end user a nice variety to choose from.

    Anyway, I'll send you a full list of same/similar spells when I have finished looking through everything. I'm still in the design phase, so I don't have a full list yet. If I do find spells that are 'too similar' to one of yours, I'll drop it if I can't find an interesting alternative implementation.

    9th level spells: This is something I noticed a few updates ago, so you may have addressed the issue (I see that it doesn't seem to be an issue in IWDEE and I only have that game available atm). Maybe I'm misremembering, or I hallucinated--I just saw it, made a mental note to let you know, and moved on. So, ignore if this isn't a problem.

    Okay, I noticed an issue with 9th Level spells when I install your game on (I think it was) BG2EE. I seem to recall Phantasmal Dragon being installed as SPWI951 or higher. I think the reason is that 9th level spells, HLAs, and other spells hog up all/most of the slots below 951 (and, frankly, many slots above 950). Anyway, this may be an issue.
  • zzzZZzzzzzzZZzzz Member Posts: 10
    @OlvynChuru Is there a way to get all of the spells added to the spellbook? or a vendor that has access to all of the spells? I would like to test them in action but all I got are the spells up to lvl 6 and can't seem to find any higher level spells in Athkatla stores / vendors. If there is no vendor that has all of the spells, can you add an option in the installer to add them? I would like to see them (spells) in action but I'd rather do it in Athkatla then play through the whole game to get to the Underdark or somewhere to find the necessary scrolls.
  • OlvynChuruOlvynChuru Member Posts: 3,075
    @zzzZZzzz Sure, I could add a component like that.
  • zzzZZzzzzzzZZzzz Member Posts: 10
    @OlvynChuru Have you added it to the installer ? I am unsure if I should download it again and reinstall or wait.
  • OlvynChuruOlvynChuru Member Posts: 3,075
    @zzzZZzzz No, I haven't yet.
  • ArjukKagrimArjukKagrim Member Posts: 44
    Not sure whether to post here or in the UI-Thread:
    I noticed an incompatibility with DragonspearUI++: Casting Backstab Sequencer causes an immediate crash to desktop. With the standard-UI and leUI it works like a charm :)
  • OlvynChuruOlvynChuru Member Posts: 3,075
    edited April 2020
    @ArjukKagrim First question: did you install this mod before DragonspearUI++? This mod also makes some minor UI changes, so it should be installed after DragonspearUI++.

    Second question: Did the crash happen when you clicked on a spell in the sequencer menu or when the sequencer menu was about to open?
  • ArjukKagrimArjukKagrim Member Posts: 44
    I installed DragonspearUI++ afterwards, will try to reverse the order and see if that helps.
    After clicking on the spell the casting animation starts and just as it is about to finish (I guess at this point the sequencer menuu should open) the game crashes.
  • OlvynChuruOlvynChuru Member Posts: 3,075
    I've released Version 1.6.5!

    Three new spells:

    Heightening (3rd-level wizard spell)
    x4a5dh678jv3.png
    91q8cv4aehzc.png

    Sacrificial Explosion (5th-level wizard spell)
    as27wyaulktk.png
    kq3vmiiqbf3q.gif

    Protection from Non-Silver Weapons (6th-level spell for Shapeshifters only)
    10i8ycxoih1n.png

    There are also several new components that revise spells. One of them turns the spell Infravision into True Strike.
    ykwgx8es1l2s.png

    Another component makes it so the spell Oracle, rather than revealing illusions, reveals the spells enemies are about to cast (like Spellcraft in 3rd-edition).
    1631gysd3wo7.gif

    You can download the latest version of the mod here!
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited June 2020
    Very cool!

    Sacrificial Explosion is somewhat like blastbones, a spell in b_spells, but they are different enough that they can coexist.
    Edit

    Blastbones
    (Necromancy)

    Level: 2
    Range: Visual range of the caster
    Casting Time: 2
    Duration: Special
    Area of Effect: Special
    Saving Throw: Special

    This spell allows the caster to shatter exposed bones in a violent explosion. Blastbones has a different affect depending on whether the target is an enemy. Enemy skeletons (and a few other undead, see below) must save vs. death -2 or explode, destroying itself and damaging all nearby creatures with shards of bone for 2d4 points of piercing (all affected creatures can save vs. breath for 1/2 damage). Skeleton Warriors targeted by this spell inflict double damage (4d4 points of damage), and they deal magic damage instead of slashing damage. More fleshy creatures, such as zombies, do an additional 1d12 points of crushing damage (again, save vs. breath for 1/2 damage). If the creature makes its save, or if this spell is cast an enemy undead creature that cannot be otherwise affected, the spell only creates a small explosive puff doing 1d4+1 points of magic damage to the target creature with no explosion.

    Allied (and non-enemy) undead do not immediately explode, nor are they allowed a save. Instead, they explode once they are reduced to 10% their hit point total (though, not if they are destroyed by turning). The explosion has the same affect as above. Note that the affected undead will explode immediately if they are already at 10% their hit point total.

    At 3rd level, this spell can only affect normal skeletons. At 5th level, it can affect zombies. Finally, at 9th level, this spell can affect skeleton warriors.
  • OlvynChuruOlvynChuru Member Posts: 3,075
    Oh, I forgot to mention, if you have EEex installed, the 8th-level spell Polar Ray now deals damage in an enormous beam:

    dzlodfvtmfz9.png
  • nonlinearcoastnonlinearcoast Member Posts: 11
    Impressive stuff. Any ideas how to add a hook with EEEx so that when a spell is cast some lua is run which can then affect the outcome of the spell?

    Id like to be able to add an attack roll to a spell projectile without having to create an item that the caster then attacks with...
  • OlvynChuruOlvynChuru Member Posts: 3,075
    edited June 2020
    @nonlinearcoast

    Hi! Welcome to the forum!

    I don't know how to add new hooks to the game ( @Bubb is the one who knows how to do that). But what I could do is make a function that manually calculates an attack roll; you'd add an opcode 402 effect calling that function to the spell, and if the function says you hit, then it applies another spell.

    What kind of spell do you want? Describe it in detail and I might implement that spell and add it to the mod if possible.
    Post edited by OlvynChuru on
  • OlvynChuruOlvynChuru Member Posts: 3,075
    @nonlinearcoast

    I implemented spell attack rolls. Here's a variant of Magic Missile that makes a spell attack roll to hit:

    4vx5btzvs1x4.png
    64k3cdv9mrgm.png
  • nonlinearcoastnonlinearcoast Member Posts: 11
    Incredible, thank you, I thought it might be some approach using op 402 - can you share the lua code you used?

    In terms of actual spells I just like tweaking bits here and there. there are a lot of spells that require range attacks in 3.5e for example that this would be useful for.

    Cant wait to see what you come up with next.

    Not sure if this is already out there, but something like detect magic/arcane sight/analyse dweomer, that would cause creatures within an area effect around the caster to glow if affected by spells, with different glow colour based on spell power or school for example. Or even return the highest spell level memorised by that actor. The game is low on divination spells.

  • OlvynChuruOlvynChuru Member Posts: 3,075
    Version 1.6.6 is out. There's one new spell, which was requested by @nonlinearcoast : Detect Magic (level 2 divination spell which can be cast by all spellcasters).

    6gv7uzbkdh9e.png

    0nqs2kfh899a.png

    You must download the latest version of EEex for Detect Magic to work.

    Also, @nonlinearcoast , the latest version of EEex contains the spell attack roll function I made. Here's the code:
    --[[
    The EXSPLATK function performs a spell attack roll against the target. If the attack hits, it casts a spell on the target.
    
    parameter1 - Modifies the attack roll; when parameter1 is higher, the attack is more accurate.
    
    parameter2 - Specifies a stat that also modifies the attack roll (parameter2 should be equal to 0 (no stat), 36 (Strength),
     38 (Intelligence), 39 (Wisdom), 40 (Dexterity), 41 (Constitution), or 42 (Charisma)). If parameter2 is equal to 36, it uses
     STRMOD.2DA to determine the attack bonus; for any other stat, it uses DEXMOD.2DA.
    
    savingthrow - This function uses several extra bits on this parameter:
     Bit 16: If set, the attack roll ignores the target's base armor class (treating it as if it were 10)
     Bit 17: If set, your bonus THAC0 with melee weapons is added to the roll.
     Bit 18: If set, your bonus THAC0 with missile weapons is added to the roll, and the target's
      AC vs. missiles is subtracted from it.
     Bit 19: If set, your bonus THAC0 with fist weapons is added to the roll.
     Bit 20: If set, you are treated as having the base THAC0 of a fighter the same level as your caster level.
     Bit 21: If set, on a critical hit, the spell will be cast twice on the target.
     Bit 22: If set, feedback will be given on the attack roll.
    
    resource3 - Resref of spell to cast if the attack hits. If this effect is not being called from an EFF file, the resref
     is instead set to the resref of the spell that called this function with a "D" added at the end.
     
    --]]
    ex_dexterity_thac0 = {[0] = -20, [1] = -6, [2] = -4, [3] = -3, [4] = -2, [5] = -1, [6] = 0, [7] = 0, [8] = 0, [9] = 0, [10] = 0, [11] = 0, [12] = 0, [13] = 0, [14] = 0, [15] = 0, [16] = 1, [17] = 2, [18] = 2, [19] = 3, [20] = 3, [21] = 4, [22] = 4, [23] = 4, [24] = 5, [25] = 5}
    ex_strength_thac0 = {[0] = -20, [1] = -5, [2] = -3, [3] = -3, [4] = -2, [5] = -2, [6] = -1, [7] = -1, [8] = 0, [9] = 0, [10] = 0, [11] = 0, [12] = 0, [13] = 0, [14] = 0, [15] = 0, [16] = 0, [17] = 1, [18] = 1, [19] = 3, [20] = 3, [21] = 4, [22] = 4, [23] = 5, [24] = 6, [25] = 7}
    function EXSPLATK(effectData, creatureData)
    	local sourceID = EEex_ReadDword(effectData + 0x10C)
    	local targetID = EEex_ReadDword(creatureData + 0x34)
    	local savingthrow = EEex_ReadDword(effectData + 0x3C)
    	local casterlvl = EEex_ReadDword(effectData + 0xC4)
    	local parent_resource = EEex_ReadLString(effectData + 0x90, 8)
    	local spellType = 4
    	local spellData = EEex_DemandResData(parent_resource, "SPL")
    	if spellData > 1000 then
    		spellType = EEex_ReadWord(spellData + 0x1C, 0x0)
    	end
    	local roll = math.random(20)
    	local baseTHAC0 = EEex_GetActorStat(sourceID, 7)
    	local bonusTHAC0 = EEex_ReadDword(effectData + 0x18) + EEex_GetActorStat(sourceID, 32) + EEex_GetActorStat(sourceID, 610)
    	if bit32.band(savingthrow, 0x20000) > 0 then
    		bonusTHAC0 = bonusTHAC0 + EEex_GetActorStat(sourceID, 166)
    	end
    	if bit32.band(savingthrow, 0x40000) > 0 then
    		bonusTHAC0 = bonusTHAC0 + EEex_GetActorStat(sourceID, 72)
    	end
    	if bit32.band(savingthrow, 0x80000) > 0 then
    		bonusTHAC0 = bonusTHAC0 + EEex_GetActorStat(sourceID, 170)
    	end
    	if bit32.band(savingthrow, 0x100000) > 0 then
    		baseTHAC0 = 21 - EEex_GetActorCasterLevel(sourceID, spellType)
    	end
    	local attackStat = EEex_ReadDword(effectData + 0x1C)
    	if attackStat > 0 then
    		local attackStatValue = EEex_GetActorStat(sourceID, attackStat)
    		if attackStatValue < 0 then
    			attackStatValue = 0
    		elseif attackStatValue > 25 then
    			attackStatValue = 25
    		end
    		if attackStat == 36 then
    			bonusTHAC0 = bonusTHAC0 + ex_strength_thac0[attackStatValue]
    			if attackStatValue == 18 then
    				local exStrength = EEex_GetActorStat(sourceID, 37)
    				if exStrength >= 51 then
    					bonusTHAC0 = bonusTHAC0 + 1
    				end
    				if exStrength >= 100 then
    					bonusTHAC0 = bonusTHAC0 + 1
    				end
    			end
    		else
    			bonusTHAC0 = bonusTHAC0 + ex_dexterity_thac0[attackStatValue]
    		end
    	end
    	local criticalMissThreshold = 1
    	local criticalHitThreshold = 20
    	EEex_IterateActorEffects(sourceID, function(eData)
    		local theopcode = EEex_ReadDword(eData + 0x10)
    		local theparameter1 = EEex_ReadDword(eData + 0x1C)
    		local theparameter2 = EEex_ReadDword(eData + 0x20)
    		local thespecial = EEex_ReadDword(eData + 0x48)
    		if theopcode == 54 and bit32.band(savingthrow, 0x100000) > 0 then
    			if theparameter2 == 0 then
    				baseTHAC0 = baseTHAC0 - theparameter1
    			elseif theparameter2 == 1 then
    				baseTHAC0 = theparameter1
    			elseif theparameter2 == 2 then
    				baseTHAC0 = math.floor(baseTHAC0 * theparameter1 / 100)
    			end
    		elseif theopcode == 278 and theparameter2 == 0 then
    			bonusTHAC0 = bonusTHAC0 + theparameter1
    		elseif theopcode == 301 and theparameter2 == 0 and (thespecial == 0 or thespecial == 3 or (thespecial == 1 and bit32.band(savingthrow, 0x20000) > 0) or (thespecial == 2 and bit32.band(savingthrow, 0x40000) > 0)) then
    			criticalHitThreshold = criticalHitThreshold - theparameter1
    		elseif theopcode == 362 and theparameter2 == 0 and (thespecial == 0 or thespecial == 3 or (thespecial == 1 and bit32.band(savingthrow, 0x20000) > 0) or (thespecial == 2 and bit32.band(savingthrow, 0x40000) > 0)) then
    			criticalMissThreshold = criticalMissThreshold + theparameter1
    		end
    	end)
    	local targetAC = EEex_GetActorStat(targetID, 2)
    	if bit32.band(savingthrow, 0x10000) > 0 then
    		local baseAC = EEex_ReadSignedWord(creatureData + 0x45C, 0x0)
    		EEex_IterateActorEffects(targetID, function(eData)
    			local theopcode = EEex_ReadDword(eData + 0x10)
    			local theparameter1 = EEex_ReadDword(eData + 0x1C)
    			local theparameter2 = EEex_ReadDword(eData + 0x20)
    			if theopcode == 0 and theparameter1 < baseAC and theparameter2 == 0x10 then
    				baseAC = theparameter1
    			end
    		end)
    		targetAC = targetAC + 10 - baseAC
    	end
    	bonusTHAC0 = bonusTHAC0 - EEex_GetActorStat(targetID, 611)
    	if bit32.band(savingthrow, 0x40000) > 0 then
    		bonusTHAC0 = bonusTHAC0 + EEex_GetActorStat(targetID, 4)
    	end
    	local attackFeedback = ex_spell_attack_feedback_string_1 .. roll
    	if bonusTHAC0 >= 0 then
    		attackFeedback = attackFeedback .. " + " .. bonusTHAC0 .. " = " .. (roll + bonusTHAC0) .. " : "
    	else
    		attackFeedback = attackFeedback .. " - " .. (bonusTHAC0 * -1) .. " = " .. (roll + bonusTHAC0) .. " : "
    	end
    	local hitType = 1
    	if roll >= criticalHitThreshold then
    		local criticalHitAverted = false
    		EEex_IterateActorEffects(targetID, function(eData)
    			local thetiming = EEex_ReadDword(eData + 0x24)
    			
    			if thetiming == 2 and not criticalHitAverted then
    				local itemData = EEex_DemandResData(EEex_ReadLString(eData + 0x94, 8), "ITM")
    				if itemData > 1000 then
    					local itemType = EEex_ReadWord(itemData + 0x1C, 0x0)
    					local criticalHitBit = (bit32.band(EEex_ReadDword(itemData + 0x18), 0x2000000) > 0)
    					if itemType == 7 or itemType == 72 then
    						if not criticalHitBit then
    							criticalHitAverted = true
    						end
    					else
    						if criticalHitBit then
    							criticalHitAverted = true
    						end
    					end
    				end
    			end
    		end)
    		if criticalHitAverted then
    			hitType = 2
    			attackFeedback = attackFeedback .. ex_spell_attack_feedback_string_2
    			EEex_ApplyEffectToActor(sourceID, {
    ["opcode"] = 139,
    ["target"] = 2,
    ["timing"] = 1,
    ["parameter1"] = 20696,
    ["source_id"] = sourceID
    })
    		else
    			hitType = 3
    			attackFeedback = attackFeedback .. ex_spell_attack_feedback_string_4
    		end
    	elseif roll <= criticalMissThreshold then
    		hitType = 0
    		attackFeedback = attackFeedback .. ex_spell_attack_feedback_string_5
    	elseif baseTHAC0 - bonusTHAC0 - roll <= targetAC then
    		hitType = 2
    		attackFeedback = attackFeedback .. ex_spell_attack_feedback_string_2
    	else
    		attackFeedback = attackFeedback .. ex_spell_attack_feedback_string_3
    	end
    	if bit32.band(savingthrow, 0x400000) > 0 then
    		Infinity_SetToken("EX_SPLATK", attackFeedback)
    		EEex_ApplyEffectToActor(sourceID, {
    ["opcode"] = 139,
    ["target"] = 2,
    ["timing"] = 1,
    ["parameter1"] = ex_spell_attack_feedback_strref,
    ["source_id"] = sourceID
    })
    	end
    	local targetX = EEex_ReadDword(creatureData + 0x8)
    	local targetY = EEex_ReadDword(creatureData + 0xC)
    	local sourceX = targetX
    	local sourceY = targetY
    	if hitType >= 2 then
    		local spellRES = EEex_ReadLString(effectData + 0x74, 8)
    		if spellRES == "" then
    			spellRES = parent_resource .. "D"
    		end
    		if EEex_IsSprite(sourceID, true) then
    			local sourceData = EEex_GetActorShare(sourceID)
    			sourceX = EEex_ReadDword(sourceData + 0x8)
    			sourceY = EEex_ReadDword(sourceData + 0xC)
    		end
    		EEex_ApplyEffectToActor(targetID, {
    ["opcode"] = 146,
    ["target"] = 2,
    ["timing"] = 1,
    ["parameter1"] = casterlvl,
    ["parameter2"] = 1,
    ["casterlvl"] = casterlvl,
    ["resource"] = spellRES,
    ["source_x"] = sourceX,
    ["source_y"] = sourceY,
    ["target_x"] = targetX,
    ["target_y"] = targetY,
    ["source_id"] = sourceID
    })
    		if hitType == 3 and bit32.band(savingthrow, 0x200000) > 0 then
    			EEex_ApplyEffectToActor(targetID, {
    ["opcode"] = 146,
    ["target"] = 2,
    ["timing"] = 1,
    ["parameter1"] = casterlvl,
    ["parameter2"] = 1,
    ["casterlvl"] = casterlvl,
    ["resource"] = spellRES,
    ["source_x"] = sourceX,
    ["source_y"] = sourceY,
    ["target_x"] = targetX,
    ["target_y"] = targetY,
    ["source_id"] = sourceID
    })
    		end
    	end
    end
    

    Download version 1.6.6 here.
  • southfla79southfla79 Member Posts: 214
    Trying to install but keep getting this error:
    ERROR locating resource for 'COPY'
    Resource [m_mestr1.lua] not found in KEY file:
    [./chitin.key]
    Stopping installation because of error.
    Stopping installation because of error.

    Also attached debug and weidu logs. Granted it is a large install so something else could be mucking things up.
  • OlvynChuruOlvynChuru Member Posts: 3,075
    @southfla79

    Okay, I fixed the problem. Download the fixed version here.
  • southfla79southfla79 Member Posts: 214
    Thought I'd report back. Tried the new version you posted, still failed with the same error message on the large install.

    Did an install on a unmodded BG2ee game and all installed fine. Something in my large mod order is messing around with something
  • OlvynChuruOlvynChuru Member Posts: 3,075
    southfla79 wrote: »
    Thought I'd report back. Tried the new version you posted, still failed with the same error message on the large install.

    Did an install on a unmodded BG2ee game and all installed fine. Something in my large mod order is messing around with something

    Are you sure it was the same error message? Could you show me the error this time?
  • southfla79southfla79 Member Posts: 214
    Ok weird......it worked this time
  • MasterChefMasterChef Member Posts: 43
    I've tried to install this mod (I don't have EEex installed) but the installer disappears after I click on the application, and the installation menu doesn't boot up. Any idea what might be causing this? Thanks!
  • OlvynChuruOlvynChuru Member Posts: 3,075
    edited July 2020
    @MasterChef What? I've never heard of anyone having an error like that. So you're saying you clicked on setup-MESpells.exe, and the black WeiDU screen appeared momentarily before disappearing? Or does the black WeiDU screen not appear at all for you? Does this happen each time you click on setup-MESpells.exe?
  • MasterChefMasterChef Member Posts: 43
    It's weird - I click on setup-MESpells.exe, a white screen pops up for a millisecond and disappears, I hear an error ding, and the exe application vanishes from my computer (I have to re-download the exe application if I want to run it again). The black WeiDu screen never appears.

    I have tested this 5-6 times and the above always occurs.
  • OlvynChuruOlvynChuru Member Posts: 3,075
    @MasterChef Maybe your antivirus doesn't like setup-MESpells.exe? Try setting an exception for setup-MESpells.exe.
  • Necromanx2Necromanx2 Member Posts: 1,246
    I am in BGEE and have a cleric (I am using DoF mod for clerics). I used the Repulse 1st level spell and it knocked everyone back including Imoen who was in my party. Descriptions says allies should be fine, which I interpret as party members and summons should not be impacted.
  • OlvynChuruOlvynChuru Member Posts: 3,075
    @Necromanx2 I'll have that bug fixed in the next update.
  • Necromanx2Necromanx2 Member Posts: 1,246
    edited August 2020
    I am not sure if this is related to this mod, but this bug only showed up when I installed this mod.
    In BGEE, when the Sirens cast Dire Charm on any party member (including my PC) and succeed, the party member keeps attacking the Siren. I lose control and can't move or change who they attack and they get the red circle on them, but they only attack enemies and not my party like they used to.
  • Necromanx2Necromanx2 Member Posts: 1,246
    edited August 2020
    Feedback on Power Word - Pull.
    In BGEE, I had Garrick cast it at a zombie. It pulled the zombie next to him as advertised.
    I then had Garrick run away (as the zombie started beating on him) and found that the zombie was still being pulled and would keep right next to me. After several seconds it finally let go and I was able to get away.
    In my opinion it would be nice if it pulled next to me and ended, that way I can draw something into my party and then run.

    EDIT: Heightening did not add levels to my spells. I had my 6th level Bard cast it and then magic missile. Only got 3 missiles instead of 5. You can see in the log in screenshot that the top shows Garrick casts Heightening and then only 3 magic missiles.

    I do have EEex installed and the Ghostwalk spell works fine, though you need to have seen the other side of the wall to be able to walk through it. Can't investigate a non-revealed area through a wall.
    v01dhzff4kdx.png
    [spoiler/]
    Post edited by Necromanx2 on
  • OlvynChuruOlvynChuru Member Posts: 3,075
    Necromanx2 wrote: »
    EDIT: Heightening did not add levels to my spells. I had my 6th level Bard cast it and then magic missile. Only got 3 missiles instead of 5. You can see in the log in screenshot that the top shows Garrick casts Heightening and then only 3 magic missiles.
    v01dhzff4kdx.png
    [spoiler/]

    That's not what Heightening does. It doesn't make spells more powerful; it makes spells higher level for purposes of bypassing spell level immunities like Globes of Invulnerability.
Sign In or Register to comment.