Increase Starting Health, Magicka, Stamina

Post » Thu Jun 21, 2012 7:41 am

Typo: OnUpdate()
User avatar
Kelly Tomlinson
 
Posts: 3503
Joined: Sat Jul 08, 2006 11:57 pm

Post » Thu Jun 21, 2012 7:10 am

I thought SetAV didn't stick on derived attributes, don't they have to be 'forced' or 'modded'?

Health
Magicka
Stamina
SpeedMult

are all derived attributes.
User avatar
Queen
 
Posts: 3480
Joined: Fri Dec 29, 2006 1:00 pm

Post » Thu Jun 21, 2012 9:04 am

Hi,

thanks Justin, I gonna try it soon.

Just another question: Is it possible to script, that different races get different amounts of health, magicka and stamina when they level up?

@ PurpleLunchBox: Tried it with the SetAV and it works (for health, magicka, stamina). It seem to be, that only some of the attributes can't altered permanently with "SetActorValue". Here's a list of the values, where it doesn't stick (Source: http://www.creationkit.com/Actorvalue):
  • Aggression
  • Assistance
  • BowSpeedBonus
  • BrainCondition
  • CarryWeight
  • Confidence
  • CritChance
  • DamageResist
  • EnduranceCondition
  • EquippedItemCharge
  • EquippedStaffCharge
  • HealRate
  • InventoryWeight
  • LeftAttackCondition
  • LeftMobilityCondition
  • MagickaRate
  • Mass
  • MeleeDamage
  • Mood
  • Morality
  • NormalWeaponsResist
  • PerceptionCondition
  • RightAttackCondition
  • RightMobilityCondition
  • SpeedMult
  • StaminaRate
  • UnarmedDamage
  • VoiceRate
User avatar
Bonnie Clyde
 
Posts: 3409
Joined: Thu Jun 22, 2006 10:02 pm

Post » Thu Jun 21, 2012 5:42 am

Hi Justin,

it works! Thank you a lot.

If you (or Moopus) got any idea about the "different-health-stamina-magicka-level-up" (see my post above), please let me know.
User avatar
Darren
 
Posts: 3354
Joined: Wed Jun 06, 2007 2:33 pm

Post » Thu Jun 21, 2012 5:07 am

Hi,

I got a problem with the above solution and need some help.

The different races got different stats through the script from above, but the use of "OnRaceSwitchComplete()" causes a problem, when I transform into a werewolf or a vampire and later transform back into the real race of my character. When the retransformation (nothing else than a race switch) is completed, the stats of my character are back to the start stats (which are the given health, magicka etc. from the script; f.e. "PlayerREF.SetAV("Health", XX)").

Is it possible (to add some lines to the script) to prevent this? Something like: If the player has the "WerewolfRace" or one of the "VampireRaces", then don't modifiy the stats?
I hope someone can help me!

Thanks!
User avatar
Rebecca Dosch
 
Posts: 3453
Joined: Thu Jan 18, 2007 6:39 pm

Post » Wed Jun 20, 2012 9:51 pm

I'm a relatively new modder myself, but here's an idea:

ScriptName SpecificsRace extends ObjectReferenceActor Property PlayerREF AutoRace Property ArgonianRace AutoRace Property BretonRace AutoRace Property DarkElfRace AutoRace Property HighElfRace AutoRace Property ImperialRace AutoRace Property KhajiitRace AutoRace Property NordRace AutoRace Property OrcRace AutoRace Property RedguardRace AutoRace Property WoodElfRace AutoRace Property WerewolfBeastRace AutoRace Property ArgonianRaceVampire Autoint hasbeenvampyin hasbeenwolfyEvent OnInit()		RegisterForSingleUpdate(10)EndEventEvent OnUpdate()		If bGetGameLoaded(PlayerREF)				;reapply any unsaved		EndIf		RegisterForSingleUpdate(10)EndEventEvent OnRaceSwitchComplete()		Debug.MessageBox("Skript gestartet")	  	   If PlayerREF.GetRace() == WerewolfBeastRace				hasbeenwolfy = 1	   endif	   if PlayerRef.GetRace() ==ArgonianRaceVampire				hasbeenvampy = 1	   endif		If PlayerREF.GetRace() == ArgonianRace				if hasbeenwolfy ==1						 ;do nothing				elseif hasbeenvampy ==1						 ;do nothing				else				PlayerREF.SetAV("Health", 45)				PlayerREF.SetAV("Magicka", 50)				PlayerREF.SetAV("Stamina", 50)				PlayerREF.SetAV("SpeedMult", 95)				PlayerREF.SetAV("LeftWeaponSpeedMult", 1.05)				PlayerREF.SetAV("WeaponSpeedMult", 1.05)				Debug.MessageBox("Argonier wurde angepasst")

You will have to do this with each vampire race, but it should work (And I obviously left the rest of the code unfinished, but you get the idea).
User avatar
Nana Samboy
 
Posts: 3424
Joined: Thu Sep 14, 2006 4:29 pm

Post » Wed Jun 20, 2012 6:04 pm

Here's another idea: In the spell tree, you can find the starting bonuses of each race (editor ID's start with "race"). Couldn't you just add the desired effects to those?
User avatar
Danger Mouse
 
Posts: 3393
Joined: Sat Oct 07, 2006 9:55 am

Post » Thu Jun 21, 2012 5:36 am

Hi aryancey,

thanks for your advise. I already thought about the spell tree, right from the beginning, but it is a lot of work to put all my desired effects to all the racial spells - with the script it went much easier. I will try your script method from above and report.
User avatar
elliot mudd
 
Posts: 3426
Joined: Wed May 09, 2007 8:56 am

Post » Thu Jun 21, 2012 5:08 am

Hi,

many thanks! It works exactly how I want it!
User avatar
Austin England
 
Posts: 3528
Joined: Thu Oct 11, 2007 7:16 pm

Previous

Return to V - Skyrim