ivanshum Posted April 8, 2012 Share Posted April 8, 2012 (edited) Hello, I want to make a mod that will increase health, mana and stamina at 20 when character get new level. Who can help? Edited April 8, 2012 by ivanshum Link to comment Share on other sites More sharing options...
tunaisafish Posted April 9, 2012 Share Posted April 9, 2012 This is the event you'll be using. http://www.creationkit.com/OnStoryIncreaseLevel_-_Quest Link to comment Share on other sites More sharing options...
ivanshum Posted April 9, 2012 Author Share Posted April 9, 2012 (edited) This is the event you'll be using. http://www.creationkit.com/OnStoryIncreaseLevel_-_QuestThank you. This I understand. But how to create a global script? In Morrowind was a special menu where you can add scripts running all the time. How to do it in this version? Or is there any script is global? Can the script does not work because of other mods using this event? Can anyone show an example of a working script with the output "Hello World" when charcter increase his level? --------------------------------------- Hmm when I change the script WISkillIncrease02 it's work fine but only on event OnStoryIncreaseSkill. I simple save into variable level and check if current level change before increase skill then we get a levelup event) But now there is another problem - the values are green, but I would like them to be white as in the original. Edited April 9, 2012 by ivanshum Link to comment Share on other sites More sharing options...
ivanshum Posted April 10, 2012 Author Share Posted April 10, 2012 Did anyone hear me? Link to comment Share on other sites More sharing options...
Outlandstalker Posted April 10, 2012 Share Posted April 10, 2012 Scriptname LevelUpTest extends Actor Event OnStoryIncreaseLevel(int aiNewLevel) Debug.MessageBox("You just reached level " + aiNewLevel) EndEvent Simply put the script in the script table of the player actor. Link to comment Share on other sites More sharing options...
scrivener07 Posted April 10, 2012 Share Posted April 10, 2012 Are you trying to increase health, mana and stamina by 20 on every levelup or are you trying to increase health, mana and stamina when you reach level 20? Link to comment Share on other sites More sharing options...
Outlandstalker Posted April 10, 2012 Share Posted April 10, 2012 Topic post changed... ModActorValueActor Value List Scriptname MyLevelUpScript extends Actor Event OnStoryIncreaseLevel(int aiNewLevel) Self.ModAV("Health", 20) Self.ModAV("Magicka", 20) Self.ModAV("Stamina", 20) EndEvent Link to comment Share on other sites More sharing options...
ivanshum Posted April 14, 2012 Author Share Posted April 14, 2012 Outlandstalker, thanks to the worked script with leveling... (my trouble was with what write after "extends") but ModAV make green color of numbers in game. I think need to use SetAV function. But also need calculate all equiped items that change Health,Magicka,Stamina add this values with ModAV. Or unequip that items before changing and equip after it. How you think? P.S. Sorry if my English not good. Link to comment Share on other sites More sharing options...
Outlandstalker Posted April 14, 2012 Share Posted April 14, 2012 (edited) You need to make only a little math. "SetAV" sets the "BaseAV" of an actor, but "GetAV" gets the total value of "BaseAV + ModAV" back."ModAV" is the part you got from equipment, etc. So we need the "BaseAV". Scriptname MyLevelUpScript extends Actor Event OnStoryIncreaseLevel(int aiNewLevel) Self.SetAV("Health", Self.GetBaseAV("Health") + 20) Self.SetAV("Magicka", Self.GetBaseAV("Magicka") + 20) Self.SetAV("Stamina", Self.GetBaseAV("Stamina") + 20) EndEvent We set the "BaseAV" to "BaseAV + 20". The "ModAV" is untouced by the "SetAV". So this comes out: BaseAV + 20 + ModAV Don't use "GetAV + 20", because this contains the ModAV and then you have: BaseAV + ModAV + 20 + ModAV Edited April 14, 2012 by Outlandstalker Link to comment Share on other sites More sharing options...
ivanshum Posted April 14, 2012 Author Share Posted April 14, 2012 Wow, you are genius! Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts