Xenoseal
May 1 2004, 02:33 PM
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

*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*
Greywolf
May 1 2004, 07:43 PM
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.
Xenoseal
May 2 2004, 12:54 AM
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
Greywolf
May 2 2004, 05:29 AM
Yeah you could and no worries mate ... have fun modding and playing.
Xeniorn
May 2 2004, 03:02 PM
You don't have to restart your character, just open the console and type in
| QUOTE |
| startscript blah (put the script's name instead blah) |
Greywolf
May 2 2004, 09:29 PM
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

But yeah for you character just do that ... though I could never get far in Morrowind ... kept making a new character
Xenoseal
May 3 2004, 02:00 AM
Greywolf, was that the exact script I need? (Excluding Blahs and stuff) If so I'll just copy and paste it, if it's alright with you.
Greywolf
May 3 2004, 02:19 AM
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
Xenoseal
May 5 2004, 02:19 AM
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?
Xenoseal
May 5 2004, 05:30 PM
;**************************************************************************************** **
;** Fair Magicka Regeneration **
;** Scripted by GlassBoy **
;** MeteoricDragon@hotmail.com **
;** 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
Greywolf
May 5 2004, 09:01 PM
:/ okay the reason that first script didn't save right is this ... you need to save the script then add the line
Stopscript blah blah ... because if you try to save it before there is no script saved yet for that stopscript to access. That is why you get the error ...
Xenoseal
May 5 2004, 11:44 PM
Line (#) function reference object "player" not found.
That's the error that comes up, tried removing the Stopscript command first, then changing the "player" referrence to PC but that didn't work either.
Which umm... is really bad isn't it? Because Player by definition is the PC Unique_ID.. so is there somethin wrong with my MW, or ....?
Greywolf
May 6 2004, 11:54 AM
Okay try this script I've cleaned it up :/ this should work ... I need to take more time into my posts
Begin Magiscript
Short PCInt
Short PCWill
Short PCboth
If ( CharGenState == -1 )
Set PCInt to ( player->GetIntelligence )
Set PCWill to ( player->GetWillpower )
Set PCboth to ( PCInt + PCWill )
Player-> SetMagicka, PCboth
Stopscript Magiscript ; save first then add this line
endif
end
now this should work, if not .... then yeah something must be wrong
Add script to start scripts
Xenoseal
May 6 2004, 07:22 PM
Thanks Greywolf, ya have been a ton of help so far, gonna try this out later on tonite then I'll let ya know how it went.
Greywolf
May 7 2004, 01:21 AM
No worries mate ... if it wasn't for university I would of come up with that script earlier ... ... I need sleep.
Xenoseal
May 7 2004, 01:28 AM
I know how it is, I'm in school myself (High School) I graduate in 6 days, so I'll be happy then. And I'll have some time to learn some of the more of the scripting language, so in the future I wont need as much help. Gonna try and figure out how to make my magic regen script as well.. but first I want to make a dungeon mod. Which I know how to do pretty much, made a house in a mod, so it's just a matter of a different scructure and adding enemies and unique items.
Xenoseal
May 12 2004, 10:11 PM
Now.. I could add this in too, to add more magicka?
ShortPC Lvl
Set PCLvl to ( player->GetLevel )
Set PCboth to ( 2* PCLvl + PCWill + PCInt )
So Intelligence plus Willpower plus double the characters level = max magicka.
Just add that into the original script.
I do this right?
Greywolf
May 12 2004, 10:54 PM
yeah should work
shortPC Lvl = short PCLvl (I take it)
but yes that should work fine
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.