Increase Starting Health, Magicka, Stamina

Post » Wed Jun 20, 2012 9:11 pm

Hi,

I'm new to modding and tried to increase/decrease the starting health / magica / stamina (from several races) with the CK, but I din't have any success.

For example: I click on the orc race in the loaded skyrim.esm databank, open it up and increase the starting health to 150 (from 50). Clicking Ok, save the changes and load the modification via NMM. But now, when I start a new game, choose the orc race and look into the skill tree, there is furthermore just a amount of 100 points of health indicated.

Did I forget something? Is there any other value that I have to change in the CK, so that the increased health shows up in game?

Thanks for your help!
User avatar
Yvonne
 
Posts: 3577
Joined: Sat Sep 23, 2006 3:05 am

Post » Thu Jun 21, 2012 5:26 am

Hi,

I'm new to modding and tried to increase/decrease the starting health / magica / stamina (from several races) with the CK, but I din't have any success.

For example: I click on the orc race in the loaded skyrim.esm databank, open it up and increase the starting health to 150 (from 50). Clicking Ok, save the changes and load the modification via NMM. But now, when I start a new game, choose the orc race and look into the skill tree, there is furthermore just a amount of 100 points of health indicated.

Did I forget something? Is there any other value that I have to change in the CK, so that the increased health shows up in game?

Thanks for your help!

Hmm... What you did seems that it should have worked. If you really need to you could attach this script to the Player in the CK (make sure you define the races in the Properties Window):
Spoiler

Scriptname HealthierPlayer Extends ObjectReferenceRace Property rArgonian AutoRace Property rOrc AutoRace Property rNord AutoRace Property rHighElf AutoRace Property rWoodElf AutoRace Property rDarkElf AutoRace Property rKhajiit AutoRace Property rBreton AutoRace Property rImperial AutoEvent OnInit()If Game.GetPlayer().GetRace() == rArgonian	 ;Do StuffEndifIf Game.GetPlayer().GetRace() == rOrc	 Game.GetPlayer().SetAV("Health", 150)EndifIf Game.GetPlayer().GetRace() == rNord	 ;Do StuffEndifIf Game.GetPlayer().GetRace() == rHighElf	 ;Do StuffEndifIf Game.GetPlayer().GetRace() == rWoodElf	 ;Do StuffEndifIf Game.GetPlayer().GetRace() == rDarkElf	 ;Do StuffEndifIf Game.GetPlayer().GetRace() == rKhajiit	 ;Do StuffEndifIf Game.GetPlayer().GetRace() == rBreton	 ;Do StuffEndifIf Game.GetPlayer().GetRace() == rImperial	 ;Do StuffEndifEndEvent

[Edit] Wow, made a huge fail. Forgot the endIf's in the script.
User avatar
Tarka
 
Posts: 3430
Joined: Sun Jun 10, 2007 9:22 pm

Post » Wed Jun 20, 2012 11:42 pm

Hi,

thanks for the quick answer. But I'm REALLY new to this whole modding thing :D

Could you shortly explain, how I attach this script in the "player"? Where I have to place it?
User avatar
Annika Marziniak
 
Posts: 3416
Joined: Wed Apr 18, 2007 6:22 am

Post » Thu Jun 21, 2012 10:05 am

Hi,

thanks for the quick answer. But I'm REALLY new to this whole modding thing :biggrin:

Could you shortly explain, how I attach this script in the "player"? Where I have to place it?

Go to the Object Window, and expand the Actors tree. Then click Actor. Scroll down the list till you get to "Player". Double click it. Then on the left it will say Papyrus Scripts. Hit Add. Then click "[New Script]". Put any name for it, and then start editing it (by right clicking it and hitting "edit source"). Copy and paste the script I gave (except for the very first line of it). Then save and compile it. Now, close the script editor, and click the little Properties button. It will bring up a Properties window. Click all those Race properties and define them one by one (by clicking "Edit Value"). Finally, hit OK, and save the plug in, and finish.
User avatar
Louise Lowe
 
Posts: 3262
Joined: Fri Jul 28, 2006 9:08 am

Post » Thu Jun 21, 2012 3:40 am

Hi,

got a "compilation failed".

In detail:
Starting 1 compile threads for 1 files...
Compiling "test"...
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\test.psc(31,0): mismatched input 'EndEvent' expecting ENDIF
No output generated for test, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on test

Changed it like that, now it saves (but is it right?):

Spoiler
 [/size][size=4] [/size][size=4]Race Property rArgonian AutoRace Property rOrc AutoRace Property rNord AutoRace Property rHighElf AutoRace Property rWoodElf AutoRace Property rDarkElf AutoRace Property rKhajiit AutoRace Property rBreton AutoRace Property rImperial AutoEvent OnInit()If Game.GetPlayer().GetRace() == rArgonian;Do Stuff[/size][size=4]ENDIFIf Game.GetPlayer().GetRace() == rOrcGame.GetPlayer().SetAV("Health", 150)[/size][size=4]ENDIFIf Game.GetPlayer().GetRace() == rNord;Do Stuff[/size][size=4]ENDIFIf Game.GetPlayer().GetRace() == rHighElf;Do Stuff[/size][size=4]ENDIFIf Game.GetPlayer().GetRace() == rWoodElf;Do Stuff[/size][size=4]ENDIFIf Game.GetPlayer().GetRace() == rDarkElf;Do Stuff[/size][size=4]ENDIFIf Game.GetPlayer().GetRace() == rKhajiit;Do Stuff[/size][size=4]ENDIFIf Game.GetPlayer().GetRace() == rBreton;Do Stuff[/size][size=4]ENDIFIf Game.GetPlayer().GetRace() == rImperial;Do Stuff[/size][size=4]ENDIFEndEvent[/size][size=4]
User avatar
Jade
 
Posts: 3520
Joined: Mon Jul 10, 2006 6:42 am

Post » Thu Jun 21, 2012 1:02 am

Just a heads up, I made a script error and forgot to put EndIf's. Check the script now.

[Edit] Haha, I knew you would notice. Check the first post I made. I edited it.
User avatar
Avril Churchill
 
Posts: 3455
Joined: Wed Aug 09, 2006 10:00 am

Post » Wed Jun 20, 2012 11:05 pm

Ok, I just tested the script, although it compiles, it doesn't work. I fixed it up, and now it finally works:
Spoiler

Scriptname TestingLoop Extends ObjectReferenceActorBase Property aPlayer AutoRace Property rArgonian AutoRace Property rOrc AutoRace Property rNord AutoRace Property rHighElf AutoRace Property rWoodElf AutoRace Property rDarkElf AutoRace Property rKhajiit AutoRace Property rBreton AutoRace Property rImperial AutoEvent OnInit()	 RegisterForUpdate(1)EndEventEvent OnUpdate()If aPlayer.GetRace() == rArgonian		 ;Do Stuff		 UnregisterForUpdate()EndifIf aPlayer.GetRace() == rOrc		 Game.GetPlayer().SetAV("Health", 150)		 UnregisterForUpdate()EndifIf aPlayer.GetRace() == rNord		 ;Do Stuff		 UnregisterForUpdate()EndifIf aPlayer.GetRace() == rHighElf		 ;Do Stuff		 UnregisterForUpdate()EndifIf aPlayer.GetRace() == rWoodElf		 ;Do Stuff		 UnregisterForUpdate()EndifIf aPlayer.GetRace() == rDarkElf		 ;Do Stuff		 UnregisterForUpdate()EndifIf aPlayer.GetRace() == rKhajiit		 ;Do Stuff		 UnregisterForUpdate()EndifIf aPlayer.GetRace() == rBreton		 Debug.Notification("You're a Breton, Harry!")		 UnregisterForUpdate()EndifIf aPlayer.GetRace() == rImperial		 ;Do Stuff		 UnregisterForUpdate()EndifEndEvent
Make sure you define "aPlayer" in the properties window.
User avatar
lucile
 
Posts: 3371
Joined: Thu Mar 22, 2007 4:37 pm

Post » Thu Jun 21, 2012 9:49 am

Hi,

sorry, got some issues with other mods and had to fix it. My graphic card seem to be old - got the "back to desktop" crash after 15 minutes of playing.

But back to topic:
Tried your new script, unfortunetly for me it doesn't work. With "define aPlayer" you mean, that I put it to "Player", right?
And here is, how I tested it: I loaded an existing savegame, open the console and use "showracemenu" to alter my race to "orc". But when I look into the skill tree, 100 health is what I found. How did you test it? Did you perhaps start a new game (hop not, because I don't like to listen to Ralofs speech a the beginning anymore)?
User avatar
meghan lock
 
Posts: 3451
Joined: Thu Jan 11, 2007 10:26 pm

Post » Wed Jun 20, 2012 8:28 pm

Hi,

sorry, got some issues with other mods and had to fix it. My graphic card seem to be old - got the "back to desktop" crash after 15 minutes of playing.

But back to topic:
Tried your new script, unfortunetly for me it doesn't work. With "define aPlayer" you mean, that I put it to "Player", right?
And here is, how I tested it: I loaded an existing savegame, open the console and use "showracemenu" to alter my race to "orc". But when I look into the skill tree, 100 health is what I found. How did you test it? Did you perhaps start a new game (hop not, because I don't like to listen to Ralofs speech a the beginning anymore)?

Yes, I tested it. I used a Breton example to make my Health 500. Loaded up the game, and it worked. I believe its because the Script only fires when you start the game. If you go in game, and change your Race, it won't work because the Script has already fired, and thus, UnregisterForUpdate() has worked. Make sure your an Orc when you load. Here's a Script for Orc Only:

Scriptname TestingLoop Extends ObjectReferenceActorBase Property aPlayer AutoRace Property rArgonian AutoRace Property rOrc AutoRace Property rNord AutoRace Property rHighElf AutoRace Property rWoodElf AutoRace Property rDarkElf AutoRace Property rKhajiit AutoRace Property rBreton AutoRace Property rImperial AutoEvent OnInit()		 RegisterForUpdate(1)EndEventEvent OnUpdate()If aPlayer.GetRace() == rOrc				 Game.GetPlayer().SetAV("Health", 150)		 UnregisterForUpdate()EndIfEndEvent

This example will only stop firing until your an Orc. Test, and give results.
User avatar
Bloomer
 
Posts: 3435
Joined: Sun May 27, 2007 9:23 pm

Post » Wed Jun 20, 2012 5:59 pm

Thousand thanks!

It works!

Just because it seem to be, that I talk to a experienced modder: Do you know, how I change the value of the attacking speed and the movement speed of a specific race? Can I somehow use your script to change this values?
User avatar
-__^
 
Posts: 3420
Joined: Mon Nov 20, 2006 4:48 pm

Post » Wed Jun 20, 2012 9:32 pm

Thousand thanks!

It works!

Just because it seem to be, that I talk to a experienced modder: Do you know, how I change the value of the attacking speed and the movement speed of a specific race? Can I somehow use your script to change this values?

Yes you can change the movement speed, as well as attack speed. Use the script I gave you, and edit the "filling":
Scriptname TestingLoop Extends ObjectReferenceActorBase Property aPlayer AutoRace Property rArgonian AutoRace Property rOrc AutoRace Property rNord AutoRace Property rHighElf AutoRace Property rWoodElf AutoRace Property rDarkElf AutoRace Property rKhajiit AutoRace Property rBreton AutoRace Property rImperial AutoEvent OnInit()		   RegisterForUpdate(1)EndEventEvent OnUpdate()If aPlayer.GetRace() == rOrc                       Game.GetPlayer().SetAV("Health", 150)                       Game.GetPlayer().SetAV("SpeedMult", 150) ;This will make him walk 1.5x faster. The Default value is 100.                       Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.5) ;1.5x faster attacking in the left hand. Default is 1.                       Game.GetPlayer().SetAV("WeaponSpeedMult", 1.5) ;1.5x faster attacking in the right hand. Default is 1.				 UnregisterForUpdate()EndIfEndEvent
User avatar
Jack
 
Posts: 3483
Joined: Sat Oct 20, 2007 8:08 am

Post » Wed Jun 20, 2012 10:49 pm

Cool, thanks - once again.

Is there a list or something, which values I can change like that - I mean, beside "Health", "SpeedMult" (etc.). For example, I didn't find "Speed Mult" in the "[...]Race"-Objects.

By the way: Do you have an explanation, why filling the "Starting health" above "50" in the "OrcRace" didn't have any influence on the in-game stats?

And another question: I want to reset the start level of all skills (seem to be level 15), so that only the racial skill bonuses remains. Where in the CK can I get rid of this lousy "15"? It has to be some general value, I think.
User avatar
Ludivine Dupuy
 
Posts: 3418
Joined: Tue Mar 27, 2007 6:51 pm

Post » Thu Jun 21, 2012 8:45 am

Cool, thanks - once again.

Is there a list or something, which values I can change like that - I mean, beside "Health", "SpeedMult" (etc.). For example, I didn't find "Speed Mult" in the "[...]Race"-Objects.

By the way: Do you have an explanation, why filling the "Starting health" above "50" in the "OrcRace" didn't have any influence on the in-game stats?

And another question: I want to reset the start level of all skills (seem to be level 15), so that only the racial skill bonuses remains. Where in the CK can I get rid of this lousy "15"? It has to be some general value, I think.

Top Bar > Chatacter > Actor Values...

That very well could be that the default health in CK doesn't set. I think i'll do some testing myself to see if it's bugged or not.

I'm not so sure about the 15 thing though...
User avatar
Nathan Risch
 
Posts: 3313
Joined: Sun Aug 05, 2007 10:15 pm

Post » Wed Jun 20, 2012 6:36 pm

Allright, with the help of your script I can force the automatic value of 15 in every skill down to 0 - so I get what I want and can customize all races with high specific differences. Perhaps there is (somehow) an easier way to do this, but it works for me and you can't imagine how happy this makes me ;-)
You helped me a lot! Thank you for that! Without your little script and your explanations I would search for all that things until now - perhaps without any success ever.
User avatar
Emily abigail Villarreal
 
Posts: 3433
Joined: Mon Aug 27, 2007 9:38 am

Post » Wed Jun 20, 2012 8:28 pm

No problem.

Always,
Moopus.
User avatar
Dylan Markese
 
Posts: 3513
Joined: Sat Dec 01, 2007 11:58 am

Post » Wed Jun 20, 2012 11:25 pm

Hello Moopus (or everyone else, who can help me :wink:

at first: I figured out, how you can modify the starting skill level of all characters. You have to alter the value "iAVDSkillStart" under "Gameplay -> Settings" (Vanilla is at 15, so all skills start with 15 + the skill bonus from the specific character objects).

But now to "our" script from above. I tried to manage it with one race, and it works - but somehow it's unreliable. Sometimes, when I start a new game, the effects don't set in, sometimes they do. When I alter all the other races (not just orcs), it even stops to work completely. I modify your script like that, for all races:

Spoiler
Scriptname SpecificsRace extends ObjectReferenceActorBase Property aPlayer AutoRace Property rArgonian AutoRace Property rBreton AutoRace Property rDarkElf AutoRace Property rHighElf AutoRace Property rImperial AutoRace Property rKhajiit AutoRace Property rNord AutoRace Property rOrc AutoRace Property rRedguard AutoRace Property rWoodElf AutoEvent OnInit()RegisterForUpdate(1)EndEventEvent OnUpdate()If aPlayer.GetRace() == rArgonianGame.GetPlayer().SetAV("Health", 45)Game.GetPlayer().SetAV("Magicka", 50)Game.GetPlayer().SetAV("Stamina", 50)Game.GetPlayer().SetAV("SpeedMult", 95)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.05)Game.GetPlayer().SetAV("WeaponSpeedMult", 1.05)UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rBretonGame.GetPlayer().SetAV("Health", 45)Game.GetPlayer().SetAV("Magicka", 75)Game.GetPlayer().SetAV("Stamina", 45)UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rDarkElfGame.GetPlayer().SetAV("Health", 45)Game.GetPlayer().SetAV("Magicka", 60)Game.GetPlayer().SetAV("Stamina", 50)Game.GetPlayer().SetAV("SpeedMult", 135)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.15)Game.GetPlayer().SetAV("WeaponSpeedMult", 1.15)Game.GetPlayer().SetAV("FireResist", 50)UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rHighElfGame.GetPlayer().SetAV("Health", 25)Game.GetPlayer().SetAV("Magicka", 125)Game.GetPlayer().SetAV("Stamina", 30)Game.GetPlayer().SetAV("SpeedMult", 90)Game.GetPlayer().SetAV("MagicResist", 25)UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rImperialGame.GetPlayer().SetAV("Health", 50)Game.GetPlayer().SetAV("Magicka", 50)Game.GetPlayer().SetAV("Stamina", 50)Game.GetPlayer().SetAV("Block", 10)Game.GetPlayer().SetAV("HeavyArmor", 10)Game.GetPlayer().SetAV("Marksman", 10)Game.GetPlayer().SetAV("OneHanded", 10)Game.GetPlayer().SetAV("Smithing", 10)Game.GetPlayer().SetAV("TwoHanded", 10)Game.GetPlayer().SetAV("Alchemy", 10)Game.GetPlayer().SetAV("LightArmor", 10)Game.GetPlayer().SetAV("Lockpicking", 10)Game.GetPlayer().SetAV("Pickpocket", 10)Game.GetPlayer().SetAV("Sneak", 10)Game.GetPlayer().SetAV("Speechcraft", 10)Game.GetPlayer().SetAV("Alteration", 10)Game.GetPlayer().SetAV("Conjuration", 10)Game.GetPlayer().SetAV("Destruction", 10)Game.GetPlayer().SetAV("Enchanting", 10)Game.GetPlayer().SetAV("Illusion", 10)Game.GetPlayer().SetAV("Restoration", 10)UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rKhajiitGame.GetPlayer().SetAV("Health", 45)Game.GetPlayer().SetAV("Magicka", 50)Game.GetPlayer().SetAV("Stamina", 60)Game.GetPlayer().SetAV("SpeedMult", 175)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.25)Game.GetPlayer().SetAV("WeaponSpeedMult", 1.25)UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rNordGame.GetPlayer().SetAV("Health", 75)Game.GetPlayer().SetAV("Magicka", 30)Game.GetPlayer().SetAV("Stamina", 55)Game.GetPlayer().SetAV("FrostResist", 50)UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rOrcGame.GetPlayer().SetAV("Health", 125)Game.GetPlayer().SetAV("Magicka", 15)Game.GetPlayer().SetAV("Stamina", 50)Game.GetPlayer().SetAV("SpeedMult", 75)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 0.9)Game.GetPlayer().SetAV("WeaponSpeedMult", 0.9)Game.GetPlayer().SetAV("DamageResist", 10)UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rRedguardGame.GetPlayer().SetAV("Health", 55)Game.GetPlayer().SetAV("Magicka", 35)Game.GetPlayer().SetAV("Stamina", 100)Game.GetPlayer().SetAV("SpeedMult", 150)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.1)Game.GetPlayer().SetAV("WeaponSpeedMult", 1.1)UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rWoodElfGame.GetPlayer().SetAV("Health", 40)Game.GetPlayer().SetAV("Magicka", 60)Game.GetPlayer().SetAV("Stamina", 55)Game.GetPlayer().SetAV("SpeedMult", 140)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.125)Game.GetPlayer().SetAV("WeaponSpeedMult", 1.125)Game.GetPlayer().SetAV("DiseaseResist", 100)Game.GetPlayer().SetAV("PoisonResist", 100)UnregisterForUpdate()EndIfEndEvent

Is there anything wrong or did I miss something? When I save and compile the script, it says, it is all fine. But why it doesn't work?
And, just in general: Is it possible to show some message, when the game starts, if the script is loaded or not? I saw something like that by some other mods, which apply ini-files in the skyrim-folder.
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Thu Jun 21, 2012 8:37 am

Hello Moopus (or everyone else, who can help me :wink:

at first: I figured out, how you can modify the starting skill level of all characters. You have to alter the value "iAVDSkillStart" under "Gameplay -> Settings" (Vanilla is at 15, so all skills start with 15 + the skill bonus from the specific character objects).

But now to "our" script from above. I tried to manage it with one race, and it works - but somehow it's unreliable. Sometimes, when I start a new game, the effects don't set in, sometimes they do. When I alter all the other races (not just orcs), it even stops to work completely. I modify your script like that, for all races:


Is there anything wrong or did I miss something? When I save and compile the script, it says, it is all fine. But why it doesn't work?
And, just in general: Is it possible to show some message, when the game starts, if the script is loaded or not? I saw something like that by some other mods, which apply ini-files in the skyrim-folder.

I believe it's something to do with OnInit(). I think OnInit() is only fired once, and only once. Try OnCellAttach(), or OnLoad() instead. And Yes, you can send messages to the game using:
 Debug.MessageBox("YourTextHere!") ; A game-pausing box pops up on screen.
Or
 Debug.Notification("YourTextHere!") ; A line of text on the top left corner.
User avatar
Heather beauchamp
 
Posts: 3456
Joined: Mon Aug 13, 2007 6:05 pm

Post » Wed Jun 20, 2012 11:15 pm

Okay, thanks for that - I will try it tomorrow (in my timezone it's nighttime ;) ) and post my results.

One question to "Onload()": If the script is triggered every time, when I load the specific character, wouldn't it overwrite the health points (which are perhaps rised by leveling etc) with the given value of the script?
User avatar
Ellie English
 
Posts: 3457
Joined: Tue Jul 11, 2006 4:47 pm

Post » Thu Jun 21, 2012 10:10 am

You could try using http://www.creationkit.com/OnRaceSwitchComplete_-_Actor and add in a check to make sure that the player is level 1.
User avatar
Jacob Phillips
 
Posts: 3430
Joined: Tue Aug 14, 2007 9:46 am

Post » Wed Jun 20, 2012 11:26 pm

Okay, thanks for that - I will try it tomorrow (in my timezone it's nighttime :wink: ) and post my results.

One question to "Onload()": If the script is triggered every time, when I load the specific character, wouldn't it overwrite the health points (which are perhaps rised by leveling etc) with the given value of the script?

Maybe use an integer to keep it from being fired more than once?
User avatar
Shianne Donato
 
Posts: 3422
Joined: Sat Aug 11, 2007 5:55 am

Post » Wed Jun 20, 2012 9:27 pm

Hi,

I tried it with the "OnRaceSwitchComplete" command and it works ;-) So many thanks for all the help! But perhaps I got issues, when the charater later transforms in a werewolf, but the check for "level 1" would be the solution for that. How do I script this test? Sorry that I'm not more experienced - I still learn by doing it or rethinking your advices.

My script so long:

Spoiler
Scriptname SpecificsRace extends ObjectReferenceActorBase Property aPlayer AutoRace Property rArgonian AutoRace Property rBreton AutoRace Property rDarkElf AutoRace Property rHighElf AutoRace Property rImperial AutoRace Property rKhajiit AutoRace Property rNord AutoRace Property rOrc AutoRace Property rRedguard AutoRace Property rWoodElf AutoEvent OnRaceSwitchComplete()Debug.MessageBox("Skript gestartet")If aPlayer.GetRace() == rArgonianGame.GetPlayer().SetAV("Health", 45)Game.GetPlayer().SetAV("Magicka", 50)Game.GetPlayer().SetAV("Stamina", 50)Game.GetPlayer().SetAV("SpeedMult", 95)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.05)Game.GetPlayer().SetAV("WeaponSpeedMult", 1.05)Debug.MessageBox("Argonier wurde angepasst")UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rBretonGame.GetPlayer().SetAV("Health", 45)Game.GetPlayer().SetAV("Magicka", 75)Game.GetPlayer().SetAV("Stamina", 45)Debug.MessageBox("Bretone wurde angepasst")UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rDarkElfGame.GetPlayer().SetAV("Health", 45)Game.GetPlayer().SetAV("Magicka", 60)Game.GetPlayer().SetAV("Stamina", 50)Game.GetPlayer().SetAV("SpeedMult", 135)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.15)Game.GetPlayer().SetAV("WeaponSpeedMult", 1.15)Game.GetPlayer().SetAV("FireResist", 50)Debug.MessageBox("Dunkelelf wurde angepasst")UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rHighElfGame.GetPlayer().SetAV("Health", 25)Game.GetPlayer().SetAV("Magicka", 125)Game.GetPlayer().SetAV("Stamina", 30)Game.GetPlayer().SetAV("SpeedMult", 90)Game.GetPlayer().SetAV("MagicResist", 25)Debug.MessageBox("Hochelf wurde angepasst")UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rImperialGame.GetPlayer().SetAV("Health", 50)Game.GetPlayer().SetAV("Magicka", 50)Game.GetPlayer().SetAV("Stamina", 50)Game.GetPlayer().SetAV("Block", 10)Game.GetPlayer().SetAV("HeavyArmor", 10)Game.GetPlayer().SetAV("Marksman", 10)Game.GetPlayer().SetAV("OneHanded", 10)Game.GetPlayer().SetAV("Smithing", 10)Game.GetPlayer().SetAV("TwoHanded", 10)Game.GetPlayer().SetAV("Alchemy", 10)Game.GetPlayer().SetAV("LightArmor", 10)Game.GetPlayer().SetAV("Lockpicking", 10)Game.GetPlayer().SetAV("Pickpocket", 10)Game.GetPlayer().SetAV("Sneak", 10)Game.GetPlayer().SetAV("Speechcraft", 10)Game.GetPlayer().SetAV("Alteration", 10)Game.GetPlayer().SetAV("Conjuration", 10)Game.GetPlayer().SetAV("Destruction", 10)Game.GetPlayer().SetAV("Enchanting", 10)Game.GetPlayer().SetAV("Illusion", 10)Game.GetPlayer().SetAV("Restoration", 10)Debug.MessageBox("Kaiserlicher wurde angepasst")UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rKhajiitGame.GetPlayer().SetAV("Health", 45)Game.GetPlayer().SetAV("Magicka", 50)Game.GetPlayer().SetAV("Stamina", 60)Game.GetPlayer().SetAV("SpeedMult", 175)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.25)Game.GetPlayer().SetAV("WeaponSpeedMult", 1.25)Debug.MessageBox("Khajiit wurde angepasst")UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rNordGame.GetPlayer().SetAV("Health", 75)Game.GetPlayer().SetAV("Magicka", 30)Game.GetPlayer().SetAV("Stamina", 55)Game.GetPlayer().SetAV("FrostResist", 50)Debug.MessageBox("Nord wurde angepasst")UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rOrcGame.GetPlayer().SetAV("Health", 125)Game.GetPlayer().SetAV("Magicka", 15)Game.GetPlayer().SetAV("Stamina", 50)Game.GetPlayer().SetAV("SpeedMult", 75)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 0.9)Game.GetPlayer().SetAV("WeaponSpeedMult", 0.9)Game.GetPlayer().SetAV("DamageResist", 10)Debug.MessageBox("Ork wurde angepasst")UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rRedguardGame.GetPlayer().SetAV("Health", 55)Game.GetPlayer().SetAV("Magicka", 35)Game.GetPlayer().SetAV("Stamina", 100)Game.GetPlayer().SetAV("SpeedMult", 150)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.1)Game.GetPlayer().SetAV("WeaponSpeedMult", 1.1)Debug.MessageBox("Rothwardone wurde angepasst")UnregisterForUpdate()EndIfIf aPlayer.GetRace() == rWoodElfGame.GetPlayer().SetAV("Health", 40)Game.GetPlayer().SetAV("Magicka", 60)Game.GetPlayer().SetAV("Stamina", 55)Game.GetPlayer().SetAV("SpeedMult", 140)Game.GetPlayer().SetAV("LeftWeaponSpeedMult", 1.125)Game.GetPlayer().SetAV("WeaponSpeedMult", 1.125)Game.GetPlayer().SetAV("DiseaseResist", 100)Game.GetPlayer().SetAV("PoisonResist", 100)Debug.MessageBox("Waldelf wurde angepasst")UnregisterForUpdate()EndIfEndEvent

Did I need the tiles:

Event OnInit()RegisterForUpdate(1)EndEvent

I delete them for once, didn't get any problems. It will check, if the script should be triggered every second, right?

Other question: If I want to add free perk points (not adding specific perks) to a starting character (without setting his level up), is there any command, so I can do that?
User avatar
Solina971
 
Posts: 3421
Joined: Thu Mar 29, 2007 6:40 am

Post » Thu Jun 21, 2012 6:47 am

Spoiler
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 AutoEvent OnInit()	RegisterForSingleUpdate(10)EndEventEvent OnUpdate()	If bGetGameLoaded(PlayerREF)		;reapply any unsaved	EndIf	RegisterForSingleUpdate(10)EndEventEvent OnRaceSwitchComplete()	Debug.MessageBox("Skript gestartet")	If PlayerREF.GetRace() == ArgonianRace		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")	ElseIf PlayerREF.GetRace() == BretonRace		PlayerREF.SetAV("Health", 45)		PlayerREF.SetAV("Magicka", 75)		PlayerREF.SetAV("Stamina", 45)		Debug.MessageBox("Bretone wurde angepasst")	ElseIf PlayerREF.GetRace() == DarkElfRace		PlayerREF.SetAV("Health", 45)		PlayerREF.SetAV("Magicka", 60)		PlayerREF.SetAV("Stamina", 50)		PlayerREF.SetAV("SpeedMult", 135)		PlayerREF.SetAV("LeftWeaponSpeedMult", 1.15)		PlayerREF.SetAV("WeaponSpeedMult", 1.15)		PlayerREF.SetAV("FireResist", 50)		Debug.MessageBox("Dunkelelf wurde angepasst")	ElseIf PlayerREF.GetRace() == HighElfRace		PlayerREF.SetAV("Health", 25)		PlayerREF.SetAV("Magicka", 125)		PlayerREF.SetAV("Stamina", 30)		PlayerREF.SetAV("SpeedMult", 90)		PlayerREF.SetAV("MagicResist", 25)		Debug.MessageBox("Hochelf wurde angepasst")	ElseIf PlayerREF.GetRace() == ImperialRace		PlayerREF.SetAV("Health", 50)		PlayerREF.SetAV("Magicka", 50)		PlayerREF.SetAV("Stamina", 50)		PlayerREF.SetAV("Block", 10)		PlayerREF.SetAV("HeavyArmor", 10)		PlayerREF.SetAV("Marksman", 10)		PlayerREF.SetAV("OneHanded", 10)		PlayerREF.SetAV("Smithing", 10)		PlayerREF.SetAV("TwoHanded", 10)		PlayerREF.SetAV("Alchemy", 10)		PlayerREF.SetAV("LightArmor", 10)		PlayerREF.SetAV("Lockpicking", 10)		PlayerREF.SetAV("Pickpocket", 10)		PlayerREF.SetAV("Sneak", 10)		PlayerREF.SetAV("Speechcraft", 10)		PlayerREF.SetAV("Alteration", 10)		PlayerREF.SetAV("Conjuration", 10)		PlayerREF.SetAV("Destruction", 10)		PlayerREF.SetAV("Enchanting", 10)		PlayerREF.SetAV("Illusion", 10)		PlayerREF.SetAV("Restoration", 10)		Debug.MessageBox("Kaiserlicher wurde angepasst")	ElseIf PlayerREF.GetRace() == KhajiitRace		PlayerREF.SetAV("Health", 45)		PlayerREF.SetAV("Magicka", 50)		PlayerREF.SetAV("Stamina", 60)		PlayerREF.SetAV("SpeedMult", 175)		PlayerREF.SetAV("LeftWeaponSpeedMult", 1.25)		PlayerREF.SetAV("WeaponSpeedMult", 1.25)		Debug.MessageBox("Khajiit wurde angepasst")	ElseIf PlayerREF.GetRace() == NordRace		PlayerREF.SetAV("Health", 75)		PlayerREF.SetAV("Magicka", 30)		PlayerREF.SetAV("Stamina", 55)		PlayerREF.SetAV("FrostResist", 50)		Debug.MessageBox("Nord wurde angepasst")	ElseIf PlayerREF.GetRace() == OrcRace		PlayerREF.SetAV("Health", 125)		PlayerREF.SetAV("Magicka", 15)		PlayerREF.SetAV("Stamina", 50)		PlayerREF.SetAV("SpeedMult", 75)		PlayerREF.SetAV("LeftWeaponSpeedMult", 0.9)		PlayerREF.SetAV("WeaponSpeedMult", 0.9)		PlayerREF.SetAV("DamageResist", 10)		Debug.MessageBox("Ork wurde angepasst")	ElseIf PlayerREF.GetRace() == RedguardRace		PlayerREF.SetAV("Health", 55)		PlayerREF.SetAV("Magicka", 35)		PlayerREF.SetAV("Stamina", 100)		PlayerREF.SetAV("SpeedMult", 150)		PlayerREF.SetAV("LeftWeaponSpeedMult", 1.1)		PlayerREF.SetAV("WeaponSpeedMult", 1.1)		Debug.MessageBox("Rothwardone wurde angepasst")	ElseIf PlayerREF.GetRace() == WoodElfRace		PlayerREF.SetAV("Health", 40)		PlayerREF.SetAV("Magicka", 60)		PlayerREF.SetAV("Stamina", 55)		PlayerREF.SetAV("SpeedMult", 140)		PlayerREF.SetAV("LeftWeaponSpeedMult", 1.125)		PlayerREF.SetAV("WeaponSpeedMult", 1.125)		PlayerREF.SetAV("DiseaseResist", 100)		PlayerREF.SetAV("PoisonResist", 100)		Debug.MessageBox("Waldelf wurde angepasst")	Else		; This will happen with race mods	EndIfEndEventBool Function bGetGameLoaded(Actor akActor = None)        If akActor.GetActorValue("PerceptionCondition")                akActor.SetActorValue("PerceptionCondition", 0)                Return True        Else                Return False        EndIfEndFunction 
  • If the Player actor property is PlayerREF, it'll autofill. Replaced 'Game.GetPlayer()' w/ faster 'PlayerREF'.
  • Properties, if named after the EditorID of what they are to point at, will be autofilled in the CK's script box. 'r' prefix usually denotes a reference.
  • Given the Player can only be one race or the other, 'ElseIf' structure will run faster.
  • Loophole for custom race
  • SpeedMult and DamageResist AVs don't stick to a save
  • GetGameLoaded() check to reapply any AVs not saved once per save load
User avatar
Rob Davidson
 
Posts: 3422
Joined: Thu Aug 02, 2007 2:52 am

Post » Thu Jun 21, 2012 3:11 am

Hi JustinOther,

first of all, what does this:
If (akBaseItem as ActorBase)rClone = akItemReferenceClonedActorFLST.AddForm(rClone)iNumClonedActors = ClonedActorFLST.GetSize()(rClone As Actor).SetPlayerTeammate(True, True)(rClone As Actor).EnableAI(False)rClone.SetScale(0.05)EndIf

And second: If I want to compile your script, it fails with the message "SetAV is not a function or does not exist".

For Attacking Speed and Damage Resistance: Thanks for the info. Is there any other way, how I can fix this with a script (so that it remains after saving/loading)? Otherwise I have to try it via a perk (f.e. "DualFlurry" do the same in dual weapon combat).
User avatar
Jason Wolf
 
Posts: 3390
Joined: Sun Jun 17, 2007 7:30 am

Post » Thu Jun 21, 2012 3:03 am

rClone: Was an accidental copy/paste. Was tinkering with your script pasted in one of mine. Sorry 'bout the confusion.
Compile: Try it now. PlayerREF needed to be an Actor property.
Unsaved AVs: There's a solution in the edited script.

Also, to save us all from carpel tunnel and to preserve scripts' indentation, you can toggle the forum's WYSIWYG switch momentarily and...

[spoiler][code] WALL OF TEXT HERE [/code][/spoiler]
User avatar
Melly Angelic
 
Posts: 3461
Joined: Wed Aug 15, 2007 7:58 am

Post » Thu Jun 21, 2012 1:53 am

Okay,

tried to compile it in the CK - but again I got failure messages:
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\SpecificsRace.psc(19,14): mismatched input '\\r\\n' expecting LPAREN
c:\program files\steam\steamapps\common\skyrim\Data\Scripts\Source\temp\SpecificsRace.psc(0,0): error while attempting to read script SpecificsRace: Object reference not set to an instance to an object
So I need help here again.

BTW: Thanks for the spoiler tip, I already unsuccessfully searched for something like that ;-)
User avatar
Laura
 
Posts: 3456
Joined: Sun Sep 10, 2006 7:11 am

Next

Return to V - Skyrim