Jump to content

Component Clarification


Recommended Posts

Hello, I have a question that I cannot seem to find the answer to anywhere. Forgive me if I missed it.

I wanted to try out the "Add Save Penalties for Spells Cast by High-Level Casters" component this playthrough, but I'm worried it may be somewhat incompatible with my other mods. I use SCS and have the IWDification spells bundled into it as well as a few other mods that affect spells, like Cleric Remix adding in a few divine spells and aTweaks that has some modifications for select spells.

How, exactly, does Tweaks Anthology make the changes to spells to give them a save penalty? If it simply edits each spell to add that functionality, I'm not sure if it will work with any of the other mods (and it's not super important to me, not as important as the other mods anyway, so I could just leave it out in that case) without causing strange inconsistencies. Otherwise though, I'd like to use it.

Link to comment

This is actually one of the more complex bits of code in the Anthology because of the structure of spells in the IE. However, it *is* a patch and will happily modify spells from other mods.

Spell files have several headers to distinguish the effects of the spell at a given level. For example, Magic Missile has headers for the spell at levels 1, 3, 5, 7, and 9 since those are the levels where the effects of the spell changes (you get two missiles at level 3, three missiles at level 5, etc.). Spells such as Sleep with a duration that depends on the caster's level (five  rounds/level for Sleep) have a header for every level, out to the spell cap (level 20 for BG/BG2. 30 for IWD), with the appropriate duration. If a header is missing the engine goes to the next lower header, e.g. casting Magic Missile at level 8 will use the level 7 header. By convention the first header is always set to level 1 even if the spell can't be accessed at level 1.

What Tweaks does is go through the existing headers and, if a saving throw is found, add the appropriate penalty. In the case of Sleep, it modifies the headers for levels 6-10 to add an additional -1 penalty (so the save is now at -4), a -2 penalty for levels 11-15, and -3 for 16-20. Headers beyond level 20 don't exist for Sleep, so Tweaks copies the last header (level 20), adds a level-appropriate penalty (-4) and inserts that as the level 21 header. This repeats again as it creates headers at level 26, 31, 36, 41, and 46, iterating the penalty at each step. In this fashion, the effects are still capped at level 20--since we're cloning the level 20 header--but the save penalties continue to get worse. Headers for, say, level 22-25 are not needed since the engine will default to the next lowest, the newly created level 21.

Tweaks will also insert interstitial headers as needed for spells without a continuous set of headers. For example, BG2's arcane Confusion spell lasts 5 rounds plus 1 round/6 levels, so it has headers at levels 1 (five rounds), 6 (six rounds), 12 (seven rounds), and 18 (eight rounds). Since the spell can't be cast until the caster has access to level three spells at character level five, the save penalties start at level 10. Tweaks copies the level 6 header to create a header at level 10 (the first save penalty), copies the level 12 header to create a level 15 header (second save penalty), and then clones the level 18 header to make headers at levels 20, 25, 30, 25, 40, 45, and 50 with the penalties iterating on each new header.

One place where I do make it a little less complicated for myself is basing these purely on the base mage and cleric spell progressions. While mages, sorcerers, and bards get access to level 3 spells at different points (levels 5, 6, and 7 respectively), the penalties are calculated from when a mage can access them. One other thing is that I assume that the levels where mages and clerics can access these spells is unchanged, e.g. if some mod changes the cleric spell progression to where they don't get level 7 spells until level 20, the mod will still assume they get level 7 spells at level 14 and calculate penalties off of that.

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