Jump to content

Changing Magicka Formulae


Xenoseal

Recommended Posts

I know the 'PC' is under the NPC list as 'player', but I can't seem to find any scripts that deal with the PC, such as your maximum magicka forumla, strength/encumberence forumla ect.. I've skimmed through the complete script list and nothing resembled this, I didn't go through and read every script though, just looked at names, which seemed to be self explanitory as far as what they deal with.

 

Am I lookin in the right place? Or are these things not dealt with in scripts.

 

What I'm trying to do is change the magicka formula from X*Int = Max Magicka to 1* Int + Willpower = Max Magicka. So instead of a normal character (No special Magicka *) having a maximum of 100 Magicka with 100 Intel, they'd have 200 Max Magicka if they have 100 Intel and 100 Willpower.

 

I'm also trying to add Magicka Regeneration to this, which I'm almost certain deals with a script. (Still new to Modding) Trying to make something along the lines of 1% of Max Magicka is regenerated every 5 seconds, or .2% of Max Magicka regenerated every 1 second. Not sure if I can make it 'pulse' every 5 seconds or just alter it to 1/5 what I want it to regenerate in that time if I can't alter the 'pulse' timer.

 

Also, I haven't seen it anywhere, but is there a explanitory list of all the visual effects in TES?

 

Example:

in_v_s_examplewall - Vivec Style Interior Wall

in_v_s_examplecorn - Vivec Style Interior Corner

 

And so on...

 

Or is it pretty much a Guess & Check thing? I know they are labeled by type, so they aren't completely scattered, but some can be hard to figure out.

 

Alright, that's it for now.

 

Thanks,

-X :nazgul:

 

 

*Edit*

 

I've looked through all kinds of scripting tutorials before posting this, and couldn't find anything dealing with the PC in general, I've seen race, class, birthsign modding tutorials, but nothing that deals with what I'm looking for.

 

*End Edit*

Link to comment
Share on other sites

the formulas are hardcoded in the engine mate ....

 

though you can tweak it and script around the hardcoded elements ... by scripting something like this

 

begin blah

 

short pcwill

short pcintell

 

Set pcwill to player->GetWillpower

set pcintell to player->GetIntelligence

 

Player->SetMagicka, ( pcintell + pcwill )

 

stopscript blah

 

end

 

now activate that at the end of chargen

 

as for regen ... just add an ability or something

 

much easier than scripting it ... much less time consuming.

Link to comment
Share on other sites

Alright thanks, so I'm gonna hafta restart my character to get the magicka formula I want eh? Oh well I'll live, not that far into the game anyway.

 

Also, I know there are magicka regeneration mods, could I just alter one of those to do what I want? If they add a script that regens mana, then I could just set the values to the ones I want personally right?

 

Thanks

-X

Link to comment
Share on other sites

you could do that yes ... but whenever I state something its so that mod can be shared ... unless you give a readme telling them to startscript blah in the console :D

 

But yeah for you character just do that ... though I could never get far in Morrowind ... kept making a new character <_<

Link to comment
Share on other sites

it should work if not its just a problem with syntax

 

Begin Magiscript

 

Short PCInt

Short PCWill

 

Set PCInt to ( player->GetIntelligence )

Set PCWill to ( player->GetWillpower )

 

Player->SetMagicka, ( PCInt + PCWill )

 

Stopscript Magiscript

 

end

Link to comment
Share on other sites

Says, invalid script on line 9

 

Begin Magiscript

 

Short PCInt

Short PCWill

 

Set PCInt to ( player->GetIntelligence )

Set PCWill to ( player->GetWillpower )

 

Player->SetMagicka, ( PCInt + PCWill ) (Line 9)

 

Stopscript Magiscript

 

end

 

 

 

Tried taking off the , adding a space between ->SetMagicka everything I could think of with my very limited scripting knowledge, any solutions?

 

Oh, and I can just add that to the startscript list and it will run everytime the game loads and give me Int + Will magicka, correct?

Link to comment
Share on other sites

;*******************************************************************************

********* **

;** Fair Magicka Regeneration **

;** Scripted by GlassBoy **

;** [email protected] **

;** Thanks to the authors of mana regen v1.2 as a model for my own **

;*******************************************************************************

*********

 

begin mana_regen

 

float CurrentTime ; This is the time one frame needs to be rendered

float PassedTime ; Time in seconds that have passed

long PlayerWillpower ; This is the player's willpower

float PlayerWillpowerFactor ; This is the player's willpower/100, serves as what percentage of 1% of the player's max magicka is regerated each second

float MagickaRegenerated; The amount of mana regenerated each second if no "stopping conditions" are met

long IntelligenceMagicka ; Magicka from intelligence

long PlayerMaxMagicka ; Base amount of magicka determined by intelligence

long RaceBonus ; bonus magicka from race

long BirthBonus ; bonus magicka from Birthsign

float PcMagickaMult : The gameplay setting fPcBaseMagickaMult - 1.0000

 

if ( MenuMode == 1 )

return

endif

 

Set CurrentTime to GetSecondsPassed

Set PassedTime to ( PassedTime + CurrentTime )

Set PlayerWillpower to ( Player->GetWillpower )

Set PlayerWillpowerFactor to ( PlayerWillpower * 0.01 )

Set IntelligenceMagicka to ( Player->GetIntelligence )

 

;-----> HERE IS WHERE YOU CAN CHANGE YOUR BASE MAGICKA MULTIPLIER FROM INTELLIGENCE ACCORDINGLY

;-----> WITH YOUR SETTING IN GAMEPLAY SETTINGS: (fPCBaseMagickaMult). if the value of this number in your

;-----> settings is 1.0000, then don't remove the semicolon, if it's greater than 1.0000, remove the semicolon and

;-----> enter the value of the setting ( MINUS 1.0000 ) replacing the *** portion of the following statement,

;-----> ignoring the first individual *, make sure you include a zero to the left if it is less than one.

 

;Set PcMagickaMult to ( IntelligenceMagicka * *.**** )

 

;RaceCheck

if ( Player->GetRace "Breton" == 1 )

set RaceBonus to ( IntelligenceMagicka * 0.5 )

elseif ( Player->GetRace "High Elf" == 1 )

set RaceBonus to ( IntelligenceMagicka * 1.5 )

endif

 

;Birthsign Check

if ( Player->GetSpellEffects, "fay ability" == 1 ) ; mage birthsign

Set BirthBonus to ( IntelligenceMagicka * 0.5 )

elseif ( Player->GetSpellEffects, "elfborn ability" == 1 ) ; apprentice birthsign

Set BirthBonus to ( IntelligenceMagicka * 1.5 )

; Atronach Magicka bonus is not included because of stunted magicka

endif

 

;PlayerMaxMagicka consolodated here

set PlayerMaxMagicka to ( IntelligenceMagicka + RaceBonus + BirthBonus + PcMagickaMult )

 

if ( Player->GetSpellEffects, "wombburn" == 1 )

return

elseif ( Player->GetEffect, sEffectStuntedMagicka == 1 ) ;Exit if magicka is stunted

return

elseif ( PassedTime >= 1 )

Set PassedTime to 0.0 ; Reset passed time so this condition can be entered again in a second

 

Set MagickaRegenerated to ( PlayerMaxMagicka * 0.01 )

Set MagickaRegenerated to ( MagickaRegenerated * PlayerWillpowerFactor )

 

Player->ModCurrentMagicka, MagickaRegenerated

endif

 

end mana_regen

 

 

 

This is the current mana regen script I use, but it regens a little too fast for my taste.

 

Trying to combine both my scripts into one. My PCInt + PCWill = Max Magica, AND Make my script Regen 1% of Maximum Magicka every 2 seconds*, anyone willing to help me out with this? Both scripts are already written and posted here, not by me, but I'd like to combine them to make my own little script for personal use, or I may post it (With credit where it is due of course)

 

*(If possible)

 

 

Thanks

-X

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...