Skyrim Special Edition

File information

Last updated

Original upload

Created by

Tommas666

Uploaded by

tommas666

Virus scan

Safe to use

About this mod

This mod introduces Magic Rebound/Backfire/Overflow for player and NPCs.

Requirements
Permissions and credits
Changelogs
Donations
Social Links: Youtube Channel - Twitch - My Mods


LE Version


Discord


----------------------------------------------------------------------------------------------------------
Rebound (definition)
1. bounce back through the air after hitting something hard.
"his shot hammered into the post and rebounded across the goal"
----------------------------------------------------------------------------------------------------------


So, this mod introduces the mechanic of Spell Rebound. When you "Hold" your spell "Ready" to cast, there is a chance the magic will bounce, or overflow, creating a new spell that can be Good/Bad/Neutral to the caster.

Yes, I know there are other mods that do this, but not in the same way, I do not want to compare them, because the scope of this and those mods is different.



How it works (Most options are tweakeable from MCM menu, or even can be set to 0 to deactivate):
Definitions
Check = Depending on the Spell Level, and your Level on the Magic School (including buffs AND debuffs you may have) + Acumulated Success you get a % and it is compared against a Dice Roll.
Acumulated Success = This can be a positive or negative number, depending on your MCM options (Explained on Example 3) Resets with each cast.
Dice Roll = A random number from 1 to 100.
Random Time = A random number from 2.5 to 6. This is in seconds.
Acumulated Time = This number acumulates each check. Check passed accumulates 0.5. Check lost accumulates 1.0. This is in seconds. It resets each time the spell is recasted, starting from 0 seconds. (Each hand has its own separated accumulated time)

All Spells - Dual casting
* Dual casting a spell does NOT trigger a check, so you will not get a rebound no matter how long you hold it.

Concentration Spells - Not dual cast (spells like flames, sparks, etc...)
* The moment it is casted there is only ONE check (per hand), if passed, you can cast the spell normally.
* Will not check again until you stop the cast, and recast the spell (again, per hand).

Other Spells - Not dual cast
* Once you finish charging the spell and it is ready to be casted, you will get the first check.
* After the first check and every Random Time + Acumulated Time you will get another Check with Acumulated Succes Chance.

Loosing the check
This is totally dependant on the MCM options you have on your game, so various things can happend:
Example 1 (default MCM options like in the first image)
* You have a 75% chance to get a rebound (Rebound Option MCM set to 0 and you will ALWAYS get interrupted without ever getting a rebound), if you don't get a rebound, your spell will FAIL and all casting will be interrupted (Set Rebound Option to 100 to never get interrupted, more or less, see next).
* If you get a rebound, you have a 25% of getting interrupted anyway (Interrupt Option MCM, can be set to 0 to never be interrupted AFTER a rebound)
* If you do not get interrupted the casting will continue normally, and after Random Time + Acumulated Time, you will get another check.

Example 2 (Never interrupt me) (THIS IS WHAT I USE IN MY GAME, and the real scope of the mod)
 MCM Options = Interrupt Chance (0%) Rebound Chance (100%)
* With this options you will always get a Rebound ONLY IF YOU FAIL THE CHECK.
* If the spell is not interrupted you will be able to hold the spell as long as you want, with a new check that can be passed or failed (getting a new rebound) every Random Time + Accumulated Time.

Example 3
MCM Options = Success Chance Acumulates With Time = CHECK | Success Chance Additive = 1.0 %
Spell Casted = Adept | Magic School Level 25 | Total 62% Chance of success (According to table in last image)

* Unchecking Success Chance Acumulates With Time (first Option) REVERSES IT!. If you want to turn off this feature, you have to set Success Chance Additive to 0.
* Each time you have a Check no matter if you pass or fail, the next check will have Actual Success Chance + Success Chance Additive (per hand separated chance and additive):

Success chance OptionCheckedUnchecked
First Check:62%62%
Second Check:                            63%61%
Third Check:64%60%
Fourth Check:65%59%


** Separated Options and Porcentages for NPCs (MCM).

How it Works internally
(Super Technical)
Spoiler:  
Show


This is done when you equip the spell to save script time when casting the spells, so it does less "on the fly" checks:
* Spell and it's characteristics (School, Level, IsConcentrationSpell?, character level in that school, Gets Lists of Rebounds depending on School) are checked when you equip a spell and saved for future use.
* Chance is calculated when the spell is equipped (Success chance using the gathered data from the spell)



Spell casting start()
When the spell casting animation starts the scripts already have all the information from when you equipped the spell, so it does:
Reset TimeOffset to 0 (This accumulates with each check, and resets to 0 when you stop casting or get interrupted)

If the spell the script saved is NOT the same you are trying to cast
Check the spell again and redo everything, then continue
End

If the caster level in that school is NOT the same as the one on the script
Check the level again and redo chance math, then continue
End
StartFailPassCicle()
End


FailPassCicle:
Checks against random generated number to see if you pass.

If Pass
If the spell is NOT a concentration Spell (Like Flames, Spark, etc)
TimeOffset + 0.5 seconds (Accumulate Time so it takes longer for the next Check)
NextTryIn(TimeOffset + RandomTime(form 2.5 to 6 seconds))
Wait for the next Check (NOT actively waiting, but doing nothing untill the next check)
ElseIf the spell IS a concentration Spell
Don'tTryAgain, Concentration spells have ONE check, if it passes it does not check again until you recast the spell
End
ElseIf Fail
Checks if it has to interrupt Only or Backfire (BackFire Option MCM menu can be 100% to always have a backfire)
If Interrupt
Interrupts() Do nothing else
ElseIf Backfire
Checks if the backfire has to be good or bad and casts it (Good Backfire Option MCM Menu)
Checks if it has to interrupt the cast too (Interrupt Option MCM Menu can be set to 0%)
If Interrupt
Iterrupts() Do nothing else
ElseIf NOT interrupt AND spell is NOT concentration Spell
TimeOffset + 1 second (Accumulate Time so it takes longer for the next Check)
UpdateAgainIn(TimeOffset + RandomTime(form 2.5 to 6 seconds)) (So it takes longer for each check)
End
End
End




MCM Options Explained
Spoiler:  
Show

Success Chance
Success Increases with time
Toggle
: ON - Each time the mod checks to see if you will have a rebound, it will increase you chances of success. For example, casting X spell at X level gives you 60% chance to success, after the first check you will have 61%, after the second check 62% and so on, if the spell is interrupted, casted, or you lower your hands this goes back to 60% and starts over when you cast the spell again.
Toggle OFF - Setting this to OFF does not turns this off, it reverses it. In the example, it will be 60%, 59%, 58%. So you get "less chances" of success.

Success Chance Additive - Value: This is how much it is going to grow, in the example I used the Default 1.0, if you set it to 5.0, the example will get 60%, 65%, 70%. (Can be set to 0 to remove this feature)

Min Success Chance - Porcentage: When casting a spell, depending on your skill and the level of the spell, you will get a % of success. If this % is less than what you select on this option, it will be overwritten by whatever you select here, and the same will happend when the Success Chance goes down over time if you choose that option. Lets say we select 23% in this Option. A master spell at level 1 will have almost 0% chance, but as the min is 23%, you will have 23% chance of success and it will not go down this value.

Max Success Chance - Porcentage: Lets say we select 87% in this option. If casting a Novice spell at level 100, you will have 99% chance of success, but as the max is 87%, you will have 87% and it will not go over this value, even with the cumulative chance, it will stay at the max.

Rebound Chance
Interrupt Cast Chance - Porcentage: This option manages the chances of being interrupted AFTER HAVING A REBOUND/OVERFLOW. This check will only trigger AFTER you get a rebound and it is totally independent of everything else. Set to 100 Always, 0 Never, get interrupted when you have a rebound.
Rebound Chance - Porcentage: This is the first check done after a spell fails, you have this chance to have a rebound. Example, you fail the check, in default you have a 75% of having a rebound. If you loose this check, as you already failed the spell, you will get interrupted. Set to 100 to always have a rebound and never get interrupted.
Good Effect Chance - Porgentage: After the checks decide you will have a rebound, this % can turn it into a Good Rebound (Now called Overflow) Note that neutral Rebounds are part of both Good and Bad lists.



** Note that NPCs (followers included) will have a MAX limit on how many times a spell can bounce PER HAND (MCM), as they ussually hold the spells when the target is out of range. This is to prevent constant Rebound from NPCs Default: 2.
* NPCs (and followers for example) have a less complicated math when checking for success chance, but the % are pretty close to the player's.

***** VERY IMPORTANT *****
For this to work on NPCs you need the mod Spell Perk Item Distributor. There is a ini file packed with the mod, that, when Spell Perk Item Distributor mod is active, will distribute my spell to all NPCs. This is to avoid checking constantly if there are enemies and attaching the spell on the fly.
With Spell Perk Item Distributor, my scripts only run when they need to, if nobody is casting anything, my scripts will not be doing anything.
They only run when an NPC is loaded, to check what spells it have equipped, and then it does nothing until a spell is casted.



Rebound List - I will be adding more as I create them, any recomendation is welcome.
Spoiler:  
Show

Most spells on this list will level with your skill, even the ones that didn't in vanilla, so sometimes a Rebound will be more powerfull than the original spell.
No Rebound should give you experience, if you find one that does, please report it, thanks!


* New in the current version
** Modified in some way in the current version

ALL SCHOOLS
** Fortify Magicka Regen - Good: You are overflowing with Magicka. For <dur> seconds your Magicka regeneration is increased by <mag>%.
** Fortify Magick Resist - Good: For <dur> seconds the caster is <mag>% more resistant to Magic.
** Damage Magicka Regen - Bad: The caster has lost concentration. Magicka will not regenerate for <dur> seconds.<mag>
** Weakness to Magick - Bad: For <dur> seconds the caster is <mag>% weaker to Magic.

Alteration
CandleLight - Neutral: Creates a hovering light that lasts for <dur> seconds.
** Ease Burden - Good:You feel lighter. For <dur> seconds you can carry <mag> more weight.
Detect Dead - Good
: Nearby dead and undead can be seen through walls. Dropped.
Detect Life - Good: Nearby living creatures, but not undead, machines or daedra, can be seen through walls.
Dropped.
WaterWalking - Good: Can walk on water for <dur> seconds.
WaterBreathing - Good
: Can breathe water for <dur> seconds.
** Mage Armor - Good: Improves the caster's armor rating by <mag> points for <dur> seconds.
** Burden - Bad: You feel hevier. For <dur> seconds you can carry <mag> less weight.
** Defective Armor - Bad
: The caster's armor rating is decreased by <mag> points for <dur> seconds.

Conjuration
Summon Weak Creature - Neutral
: Summons a Weak Creature that will not fight, for <dur> seconds.
Summon Misc
Object - Neutral: Summons a useless object close to the caster.
** Summon Creature - Good: Summons a Powerfull Creature for <dur> seconds.
** Summon Hostile Creature - Bad: Summons a Creature Hostile to the caster, for <dur> seconds.
** Summon Frenzied Creature - Bad: Summons a Frenzied Creature for <dur> seconds.


Destruction
** Elemental Armor (Fire) - Good
: For <dur> seconds the caster is <mag>% more resistant to Fire damage.
** Elemental Armor (Frost) - Good: For <dur> seconds the caster is <mag>% more resistant to Frost damage.
** Elemental Armor (Shock)- Good: For <dur> seconds the caster is <mag>% more resistant to Shock damage.
** Elemental Weakness (Fire) - Bad: For <dur> seconds the caster is <mag>% weaker to Fire damage.
** Elemental Weakness (Frost) - Bad: For <dur> seconds the caster is <mag>% weaker to Frost damage.
** Elemental Weakness (Shock) - Bad: For <dur> seconds the caster is <mag>% weaker to Shock damage.
** Elemental Ball (Fire/Frost/Shock) - Bad: A concentrated elemental force that will
hover for five seconds, and then fall and explode on contact.

Illusion
Invisibility - Good: Caster is invisible for <dur> seconds. Activating an object or attacking will break the spell.
Muffle - Good: You move more quietly for <dur> seconds.
** Mass Calm Explosion - Good: Creatures and people up to level <mag> nearby won't fight for <dur> seconds.
** Friendly Fire - Bad: Friendly creatures and people caught up in the explosion, up to level <mag>, will attack anyone nearby for <dur> seconds.
** Mass Fear Explosion - Bad: Creatures and people up to level <mag> flee from combat for <dur> seconds.
** Reverse Invisibility Cloak - Bad: For <dur> seconds, hostiles in melee range will became invisibile.

Restoration
Heal ALL - Neutral
: Heals everyone close to the caster <mag> points.
Heal Self - Good: Heals the caster <mag> points. Replaced by Fortify Health Regen
** Fortify Health Regeneration - Good: You feel your wounds closing rapidly. For <dur> seconds your Health regeneration is increased by <mag>%.
** Fortify Stamina Regeneration - Good: You feel like you can never be tired again. For <dur> seconds your Stamina regeneration is increased by <mag>%.
** Holy Circle - Good: Undead inside the circle will be weakened. Caster heals <20> health per second inside it.
* Fortify Poison Resist - Good: Resists <mag>% of poison damage for <dur> seconds.
* Turn Undead Explosion - Good: Undead caught up in the explosion flee for <dur> seconds.

** Damage Health Regeneration - Bad: Your wounds have stoped healing. Health will not regenerate for <dur> seconds.
** Damage Stamina Regeneration - Bad: You can't seem to get your breath back. Stamina will not regenerate for <dur> seconds.
** Unholy Circle - Bad: Inside the circle, the caster will be weakened, health will not regenerate, and Undead enemies will regain their health.

* Weakness to Poison - Bad: The caster is <mag>% weaker to poison damage for <dur> seconds.



Recommendations:
Armor Affects Casting - Adds a debuff to ALL the Magic SKILLS when wearing Armor, which interacts with my mod's checks as if you effectively have less Skill on the Magic Schools, triggering Fails/Rebound/Overflows more often on armored mages. (you can abolish the penalty by training in your Armor Skill)

Shields Affect Casting - Same as Armor Affects Casting but for shields, can be used in conjunction with Armor Affects Casting or as a stand alone.


Compatibility
This mod does not modify anything, it just adds it's own Rebound Spells (mosly tweaked copies of vanilla spells or effects).

All spells from mods are compatible, in the sense that they will all backfire the same way as vanilla spells.

Spell Research Mod: NO PATCH NEEDED. While researching spells you still have rebounds, but they do not count or give you experience or archetipes. The way it implements the research does not register spells casted by scripts (My mod works by casting the spells via scripts, so no incopatibility there)

Dragon's Keep Mod: The patch makes it so the locations added by Dragon's Keep mod are considered Guild Locations, this makes NPCs ignore Rebounds while inside this locations. No other compatibility issues. NOTE that this only applyes to NPCs and Followers, the player will still have rebound mechanics active while inside this locations.


------------------------------------------------------------------------------------
All my mods are always going to be free, and requests will never need a transaction, but if you would like to contribute to my xBox found I would appreciate it
https://streamelements.com/tommas2404/tip
All donations are going to be used to buy an xBox and/or xBox related accessories, so I can finally test my own mods and give better support for them, check for incompatibilities and testing the patches I make.