Jump to content

Chargable Spells


grmblf

Recommended Posts

CHARGEABLE SPELLS by grmblf

Pre-Final Version 0.35 - Requires OBSE 0018b4

 

 

 

DOWNLOAD IT HERE.

 

 

 

Mod Info:

Mod name: Chargeable Spells

Version: Pre-Final v0.35

Author: grmblf

Requirements: OBSE v0018b4 or higher.

Source: http://www.tesnexus.com/downloads/file.php?id=27746

Thread at TESNexus: http://thenexusforums.com/index.php?showtopic=155243

Thread at Bethesda forums: http://www.bethsoft.com/bgsforums/index.ph...owtopic=1051429

 

 

 

Summary

 

This mod revamps completely how magic is used in Oblivion into a more tactical and believable fashion, allowing you to regulate the power of the spells you cast by charging them, simply holding down the cast key just for a while, and then releasing to actualy cast the spell. This process takes into account your magicka spent, the time charging, the skill corresponding to that spell and it's governing attribute, and the result is calculated using default game's formulas but taking the values from your overhaul / magic mods.

A lot of lines of code and so many speepless hours has been put here to achieve this effect and to make it smooth and fair, but also to add a lot of other small features that could improve gameplay and immersion. Read the full list of features here below:

 

 

 

 

Features

 

* A completely new spell-charging system, complex in it's ends but easy and intuitive in it's usage:

  • - Charging process visualy noticeable: your magicka pool depletes at a constant rate as long as you're charging, and it plays on yourself the visual effect for the spell you're charging.
    - Accurate cost / magnitude calculation according to spell's cost default formula with a decent boost for charging longer.
    - Every calc is proportional and non-scaled, therefor every single magicka point, every millisecond spent charging and every skill level achieved are taken into account for the final result.
    - Several sounds complement the charging process.

 

* A full set of chargeable spells, few but versatile, to not clutter the spells list:

  • - More than 80 Chargeable Spells covering almost every default magic effect. All they available to charge and cast!
    - Chargeable Spells don't have a pre-set level, what determines they power is the amount of magicka you put in them and your current skill level, so the same spell becomes useful at every skill level.
    - There's only one spell per magical effect. Dynamic settings like making ranged spells becoming "on touch" automaticaly when under water plus the "alternative cast" feature allow for just a few spells dealing with several uses.
    - Holding block when the cast key is released will activate an "alternative casting mode" for that spell. Basicaly this will make ranged spells increase their AoE at some magnitude cost, and it will make "on self" spells become ranged, to cast them on companions or friendly NPCs.

 

* Dynamic chargeable spells' purchase system and chargeable spells updater:

  • - Chargeable spells are available to purchase from every spells merchant. When you talk to them they will have the appropiate chargeable spells corresponding to the ones he/she actualy has. This is made by script, so there's no spell or merchant altered or replaced. When you end your conversation they recover their original spells (AI isn't smart enought for chargeable spells).
    - Due to this, NPCs from other mods now might sell chargeable spells too.
    - When you first load Chargeable Spells you might choose to obtain the chargeable spells corresponding to the ones you already have, replacing default spells that aren't modified by other mods.

 

* A full perks system and a penalties system for charging:

  • - It includes a dynamic perks system that limits your mobility while charging at lower levels as well as your fatigue loss and the possibility to loose the charge if you run out of magicka or fatigue, or if you are injuried.
    - Optional feature (enabled by default) that adds a small chance for your spell to drain from you some extra fatigue or health, or even hit your attributes. This is progressive and the chances are increasing for as long as you're charging, so you can stop charging and cast the spell once you see it starts to hurt you. If you decide to charge longer, all your stats drained this way are added to the spell's power. This feature is complemented with blurred vision effect (optional) and a sound and the "damage attribute" visuals that warns you when this happens.

 

* Aditional features:

  • - Optional feature (enabled by default) that makes every chargeable spell able to be casted at Novice skill level. Spells will still show their real mastery level but you will be able to cast them. If using the feature above and considering that at novice skill level spells power won't be really great it's fair to make them all available and it shouldn't be considered a cheat.
    - Increased experience (XP) proportional to the time charged for every cast.
    - Spell casting responds to magical effectiveness, magical resistance and spell absorption/reflection.
    - Being staggered, knocked or silenced renders the PC unable to charge.
    - While a spell is being charged, a light effect shows on the player, and it's radius grows exponentially each second. It's meant to make you easier to detect if charging a huge spell.
    - Spells values are updated after each casting, so you can see how much powerful it’s been. An optional message may be enabled to show spell’s info in-game after each casting.
    - Optional features can be enabled / disabled editing the .ini file provided.

 

 

 

Playing this mod

 

* Getting started:

 

Chargeable Spells will work either on new games and on saved games.

Once in-game, a message box will prompt asking you to replace your default spells by a chargeable version of each one. Choosing so will give you the chargeable version corresponding to the spells you have, and then it will remove from your spells list those spells that only have an effect wich is not scripted, so it won't replace spells from other mods, unless they only alter cost/magnitude.

If you're not sure about replacing your spells, a lesser power will be added to you. Casting it will open the menu again so you can choose to "update" your spells list.

 

 

* How do I get the spells I'm missing?

 

Every spells vendor will sell now chargeable spells for a nice price, even NPCs from mods.

Following the same procedure as avobe, they will have the chargeable version of the spells they had, so default spells won't be available to purchase as long as any other mod modifies them.

Notice that NPCs still have their original spells, they are only temporary replaced for them as long as you speak with them.

 

 

* Charging spells:

 

It's not necessary for you to know exactly how calcs are done but this things might be important:

- What determines a spell's power is the amount of magicka you put in the spell and your skill level, but there's also a bonus for charging long.

- When charging a spell it always drains 1/4 of your total magicka pool per second, proportionaly. So a big magicka pool means you put more magicka per second, and therefor it allows for more powerful spells being cast in less time.

- Even draining 1/4 of your magicka each second you can charge for longer than 4 seconds, because you regenerate some magicka also while charging. This means that a higher magicka regeneration rate (high INT+WIL) will allow you to charge for longer, and therefor put in there more magicka and obtain a bigger time bonus. Using restore magicka potions works as well.

- The "time bonus" for charging longer multiplies the final result by 1+(time/10). ie, charging for 3.25 seconds will multiply the result by 1.325, ie a 32.5% more, up to a x2 multiplier at 10 seconds of charge.

- By default every spell can be cast at novice level eventhought they still show it's original mastery level.

- Charging for long might hurt you. If your health drains so quickly or if you hear your character's gasp better release it and cast the spell.

 

 

* Perks and movement limitation:

 

As it's been commented, this mod also features a perks system that limits player's movement at lower levels and unlock them as your character progress in each magic school. This perks are associated with your current skill level and they are re-calculated every time you select a spell. Fortify / Drain skill effects may un/lock pertinent perks temporaly.

 

Novice:

- can't run or walk while charging.

- can't stand in sneak mode charging (your PC will stand up automatically when charging).

- can't charge or cast under water.

- can't jump or attack, but stills can block.

- if runs out of magicka while charging, spell and magicka are lost.

 

Apprentice:

- can charge under water.

- can walk while charging or simply stand in sneaking mode.

- if gets exhausted while charging (zero fatigue), the spell is automaticaly casted. This will work even if a fatigue mod knocks you out for being exhausted.

 

Journeyman:

- can run while charging.

- can walk in sneak mode while charging.

- if runs out of magicka while charging the spell is automaticaly casted.

 

Expert:

- can run in sneak mode while charging.

- can jump while charging.

 

Master:

- never looses the charge due to being injuried, but still loosing the charge if knocked out/down.

- can attack while charging.

 

All this movement limitations are performed in a smooth fashion, giving the player a one-second transition between each mode. For instance, a novice running will automatically start to walk when charging and one second after will be stuck until the spell is released. Right after casting the spell the player will be running or sneaking again, however he/she was before.

 

 

* Spells and alternative casting:

 

The spells this mod adds have been built upon the basis of just very few patterns for ease of usage, and it all has been carefuly designed to be as logical and intuitive as possible. Here are some considerations that may help understanding better this new spells.

To activate the "alternative casting mode" the block button must be held down the moment the cast key is released.

 

- If a spell can do all it's effect at once, it does. Only spells that really require time to be effective will last (ie charm, silence, weakness to, etc).

- If a spell can be 'on target' instead than 'on touch' then it is, so there's no 'fire damage on touch' spell.

- Spells that last for a while and have a magnitude (ie, shield, but not night eye), have double duration than magnitude. For instance, a spell that charms 32 pts will lasts 64 seconds, and therefor it will cost according to that. In fact time has been doubled, so half of time is for free.

- Ranged spells have a small Area of Effect (AoE) rangnig from 2 to 7 or 8, depending on your skill and governing attribute.

- The alternative cast for ranged spells makes them less powerful but increases their area of effect. It's power will be between 50% to 80% from it's original magnitude, depending on your skill and attribute, and it's radius depends on this but also on the percentage of your total magicka you've spent, up to a hard to reach maximum of 150 feet.

- "Benefical" spells that are cast on self (restore health, resist poison, etc) can be cast on target using the alternative cast, either to heal a companion, to give water walking to a slaughterfish or to cast light on fleeing enemy. Some doesn't have an alternative casting, like bound stuff, summoning, night-eye and detect life.

- The alt. mode for Absorb health/fatigue/magicka spells will make them lasting for long and absorbing the proper stats slowly.

- Only those magical effects related to some percent check (like reflect spell, shield, resist/weakness, etc) are restrained to a max of 100. In this case, the extra magicka spent makes it lasts for longer.

- Those effects that rely on an absolute value have no maximum and can effectively exceed 100 (for instance, feather, detect life, light, etc).

 

 

* Penalties system with reward:

 

After one second charging a spell a random check is performed, depending on your skill and will (higher stats are better), to determine if you're affected by it, kinda you start to loose control over the spell. Charging for less than one second has no risks at all, but after one second this check is performed continuosly, twice per second, until the spell is cast. Chances of failure are increasing each time, so charging really long may become dangerous.

 

Penalties you might suffer from charging a spell are set in a few severity levels, so you won't suddenly loose the spell, if this has to happen first your fatigue will be hit, then your health, after that your attributes will suffer and then you might loose the spell, being 0.5 seconds between each step, so you can react if things go wrong. If you suffer once from a "penalty" it doesn't mean you'll be suffering it continuously until you release the spell or that you will get automaticaly next "penatly", all this is randomized each check, but chances to fail increase quickly with time, so the normal thing is that once you start to loose fatigue you'll be loosing fatigue each second, and maybe with health will happen so, but that's very random.

 

Each "penalty" has it's own chance to apply, smaller as the more severe they are. Once it hits your attributes it will hit one point at each attribute, you'll hear your character gasps and a red visual effect will play on the PC. Penalties come in form of 1 fatigue point loss per check failed, 1 health point, 1 pt on attributes and finally a chance to loose the spell.

 

The reward is that every stats point drained is added to the spell's power, just like extra magicka spent. Each fatigue point adds 1 to magicka, a health point adds 2 and each time your attributes are damaged it counts like spending 50 magicka points more.

This makes long charges far more exciting and dangerous, but also rewarding, mostly for novices and apprentices. In higher skill levels things are getting more stable, but there's always a small chance to fail.

 

 

 

Check the full readme in the download page for installation instructions, compatibility issues and known limitations,

... and enjoy the update!

 

 

 

grmblf

Link to comment
Share on other sites

  • Replies 96
  • Created
  • Last Reply

Top Posters In This Topic

Sounds good, but what about the charge vs magic? You'd have to put in that the charge gets limited by a few factors, such as you max of magicka and your skill. Indeed you can ask the player to cast a spell, but just on itself..so you can't use tha tone...A bypass is possible, but it is up to you what you want. I would say to use a different button (OBSE) to charge the spells and just use the C button to cast it..They would be scripted spell, so a variable will be increased on the charge and the effect of the spell will fire on that one. Of course there are many more options, you could track the C button and the current spell, (although totally possible) with some OBSE commands and Questscripts, building on that.

 

Yes it is possible to cast a ball straight ahead by using statics as casters. (There is a tutorial of it on the wiki)

You'd have to coordinate the animation with a static that casts the spell.

Link to comment
Share on other sites

My script already takes care of the total Magic and current magic. It's designed to empty the pool in 4 sec regardless of it's size (this can be modified, maybe 6 is better for lighter shots), so if you have just half of your pool you'd be able to charge during 2 seconds only. It's tested and magica is never below 0 so it's safe and fairly accurate (still have to add stunted magicka while charging to be 100% accurate).

 

That thing you mention about using a static (static reference?) that cast the spell sounds good, I'll try that way.

 

Making the 'charge' button the one that triggers the whole effect doesn't seem to me to be appropiate, but probably I think so because of my little knowledge at scripting so if you think there's some advantadges in doing so plz tell me. I've set it by now to the block button, wich is commfortable and also helpful, but the main reasons for making all starting from the spell casting is that: 1) there's no background script running, it triggers only when the spell is cast, and 2) I can't figure out a way to transfer values from a script to another in oblivion, except with quest stages functions, so I woudn't know how to use the values I've stored.

 

Anyway, a big :thanks: for the input.

 

PS: I do use OBSE and track bttonpressed but the problem with 'C' key is that constantly cast a new spell, that forces me to choose another key but the perfect one would be the 'C' of course.

Link to comment
Share on other sites

One thing you could do is disable the cast key. Then when you press and release cast, have your static shoot your spell. You can then get the reference of the projectile you just cast and edit the spell effects to match the amount of charge you had. I did something kinda similar in my full auto mod: http://tesnexus.com/downloads/file.php?id=25513

 

Of course you're welcome to use my scripts as needed, but I would like to point out beforehand that I borrowed heavily from the Summon Object script on the CS wiki: http://cs.elderscrolls.com/constwiki/index.php/Summon_Object

 

I remember seeing this spell charging idea on the Bethesda Oblivion Mod forum before, but I don't know if anybody made a mod for it or not.

Link to comment
Share on other sites

Since the file servers are down could you copy and paste your script by chance? I've been working on something similar when I have spare time and following this thread. I checked out the wiki and understand it pretty well, but I'm not sure exactly how you made it cast the spell. Maybe I just missed something important, but being able to actively scan the script in question helps me far more than anything else. :)
Link to comment
Share on other sites

One thing you could do is disable the cast key. Then when you press and release cast, have your static shoot your spell.

Yes I'll do that, I thought of it afterwards, good point thought.

 

You can then get the reference of the projectile you just cast and edit the spell effects to match the amount of charge you had.

yay! That's amazing, that makes things much easier! I need to do little research on this, it sounds promising.

 

Of course you're welcome to use my scripts as needed, but I would like to point out beforehand that I borrowed heavily from the Summon Object script on the CS wiki: http://cs.elderscrolls.com/constwiki/index.php/Summon_Object

Thanks for the offering, I've also used that tutorial to make a function to place the objects (caster and target) but it doesn't cover the vertical offset and I'm really bad at maths so sure it will be useful to me. I'll download it as soon as downloads are available again.

 

Man, a big BIG thanks to you for your help. I start to see the light at the end of the tunnel :smile: Kudos given.

 

----------

 

Since the file servers are down could you copy and paste your script by chance?

Do you mean my script or Documn's one? I have no problem in posting it here but it's still fairly un-done.

 

EDIT: what a stupid comment on my side, of course you're referring to documn work as my script isn't hosted here nor anywhere :P forget it

 

----------

 

I'll still working on the 'technical' stuff but I've already started thinking of additional features for the spells, like:

- If you don't release the key before running out of magicka simply the spell isn't casted and your magicka 'charged' is lost. (already implemented).

- If you spend more than a 75% of your total magicka in a single spell there's an increasing chance to suffer a bit from it (not backfiring, just like it affects you too, in a smaller percentage that it does to your target). It should consider Willpower and Destruction.

- Make the spells have extra random features depending on your level, stats and the strenght of the spell. ie growing area effect and duration.

- Make some racial bonus or kind of 'magic schools' (or maybe user-defined values) so for example Bretons or High Elves might regain magicka while charging and therefore be able to charge for a longer period, Dunmer could be able to charge beyond their total magicka by consuming health once the magicka pool is empty, etc. Also the total time they're charging could depend on races or user settings (a longer timer makes it more accurate for small shots, but harder to concentrate all the power in a single spell, while a shorter timer acts in the opposite way, making it easier to cast big spells and also emptying your pool faster).

 

I'll consider every idea given on this as well as any other feature you might suggest.

 

I'm glad to see there's people interested (or at least curious) about this, I really appreciate your inputs, so keep them comming, people!

Link to comment
Share on other sites

Be sure to make the amount of magicka lost proportionate to the damage done. If you're going to use up 75% of your magicka in one shot, it had better do a ton of damage.

Sure, but it will depend on your total magicka and your destruction skill level, I'm not willing to make it something overpowered, in fact I was planning to use vanilla game formula if I can find it, but perhaps a little (and proportional) bonus for spending 50% or more of your magicka in a shot would be nice. I'm thinking about half of the percentage above 50%, ie spending 70% gives a bonus of +10% to damage, spending 99% of magicka gives +25% to damage. How do you see that? Anyway I haven't reached this stage yet (still trying to make the projectile flies properly) so there will be time to discuss and test it.

Link to comment
Share on other sites

Haha yeah I meant his, but no worries. I actually found this on the wiki that helped me a ton, you might appreciate it, I'm not sure if you've already got this part working or not.

 

http://cs.elderscrolls.com/constwiki/index...om_An_Activator

 

 

As a thought, I agree with the above poster, if I use 75% of my magicka it better be darn powerful. I think it might be better to not base it off a percentage of your total magicka but trather numbers. Because if you base it off of percentages then an orc warrior who charges a fireball for 2 second (which we'll pretend uses 50% magicka) would do the same damage as an altmer mage, even though he technically used a much smaller amount of magicka.

 

And charging past full causing you to lose your magicka without casting a spell sucks. What if say you had snuck up to a pretty intense boss. And decided to throw everything you had at him, so you try to charge to use as much magicka as possible. Using your way it wouldn't be possible to use 100%, and you'd have to cut it short, if you didn't you'd be stuck watching the boss wander around while your mana recharged.

 

 

Other than that sounds pretty cool keep us updated.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...