Script to set skill level to 100 when it reaches 101

Post » Thu Jun 21, 2012 10:30 am

I am trying to make it so when a skill reaches 101, it goes back to 100. The purpose of this is to allow the player to keep leveling up by using a skill that has reached 100.

(I used the Skyrim- Community- Unpacker- to set the max skill level at 101).

I used CIPSPIC 'My first script' guide to create a quest to run the script. The script compiles fine ... but nothing happens.

ScriptName WZTestPerpetual extends Quest       Event OnInit ()             if (Game.GetPlayer().GetActorValue("OneHanded") == 101)                         Game.GetPlayer().ModActorValue("OneHanded", -1)endIfEndEvent

I can't find any applicable entry in the logs. When I used the sqv console command I got this message:

Missing Parameter Quest.

Compiled Script Not Saved!
I'm not sure what either of these could mean. The quest exists, and the script is saved in the right place.

Help?
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am

Post » Thu Jun 21, 2012 12:35 pm

A standard quest won't do what you're trying to do.

You need to create and add your quest to the Story Manager Event Node for skill increase.

You need to put your code inside a http://www.creationkit.com/OnStoryIncreaseSkill_-_Quest event block.

You need to "filter" the skill you wish to "hack".

In short, you need to read up on http://www.creationkit.com/Story_Manager.
User avatar
Vivien
 
Posts: 3530
Joined: Fri Apr 13, 2007 2:47 pm

Post » Thu Jun 21, 2012 10:49 am

Thanks!

I don't know what you mean by 'filter' but the rest of it worked.

Spoiler


ScriptName WZTestPerpetual extends QuestEvent OnStoryIncreaseSkill(string asSkill)		   if (Game.GetPlayer().GetActorValue("OneHanded") == 101)					  Game.GetPlayer().SetActorValue("OneHanded", 100)endIfEndEvent

Except it didn't work because it isn't the base skill value that is changed, it just applies a -1 modifier, meaning it can't level up. The skill level is still 101. Instead of -1 I need to set the skill level to 100 I suppose.

EDIT: Changed it to set actor value 100 and it works now, thanks for the help. Now to get rid of that 'increased to 101' message.
User avatar
Calum Campbell
 
Posts: 3574
Joined: Tue Jul 10, 2007 7:55 am


Return to V - Skyrim