Jump to content
ℹ️ Intermittent Download History issues ×

Need Help Correctly Setting Skill Value


larryrathbun

Recommended Posts

Good afternoon,

 

I am working on a mod to do something like the legendary skills in Skyrim. At level 100 in a skill, the player can choose to make the skill Legendary, reduce it to 25 and get a bonus perk.

 

First Question:

 

I need to be able to permanently force the player's skill value for a skill back to 25 and grant a bonus perk. This needs to be permanent, but not affect any perks, bobbles, etc... For example, the player is at 100 in Barter with a perk that adds +5. I want to allow them to make the skill "Legendary" and have it reset back to 25 (still getting the +5 from the perk for a total of 30). I have been playing around with SetAV, ModAV, ForceAV and none seem to perform as expected. Can anyone clue me in on the correct way to do this?

 

Second question:

 

I have worked out some level-up logic that calls the level-up screen without causing an XP loss and have it working successfully. To solve the issue of the player getting new skill points I tried setting all skill points settings to 0 using SetNumericGameValue but couldn't get any results. That command just didn't seem to do anything in the script. When I use it in console it returns that it worked, but the level-up changes don't take. I am trying to make this Project Nevada compatible, and I am sure PN is changing some values as well, which override the base game settings. I also tried giving a temporary perk that Adjust the Skill Point Gain Entry Point, but it also doesn't work. Possibly a PN override as well.

 

As a work-around I currently assign a perk that maxes all skills at 100 (which prevents gaining skill points), then unassign the perk after level up. This has the undesirable side effect of allowing any perk to be chosen, even if the player could not otherwise qualify due to skill level.

 

Can anyone help with either of these questions?

 

<Edit> Third Question: - Resolved - DERP

 

I am trying to setup my level up script as a function I can call from the main script. As soon as I change it to "Begin Function" it fails to compile. When set to OnActivate and placed on an object it works fine.

 

As a test I created a simple script to test. This is set to be an Object script, which is what the Wiki says it should be.

 

scn TestFunctionUDF

 

Begin Function { }

;nothing

End

 

This fails to compile as well. I do not want to send any variables to the function or get results back. It is going to possibly be called multiple times during the script running and was trying to avoid a ginormous repeatd block of code that might have to be changed over and over in the future. Anyone know why it won't compile?

Apparently the { } is required even if you are passing no arguments to the function.

 

 

Thanks.

Edited by larryrathbun
Link to comment
Share on other sites

If you used ForceAV in your testing, you need to reload a previous save because using forceAV on the player wrecks that stat for the rest of the game.

You want to use SetAV or ModAV for changes.


You can see the effects of SetAV and ModAV with this console command:



Player.GetActorValueInfo Statname

Link to comment
Share on other sites

Good evening,

 

All testing is done from a save which is not saved again and has no modifications. Each test is done by loading the same clean save to ensure consistent results.

 

I guess I am going to need to go in and actually see what these do. Because, they don't seem to do exactly what they say they do.

 

Can anyone confirm that they act the same if called from script and console? I.e. does setav act the same from either? In the testing I was doing, I was getting different net results from player.setAV Barter 50 when called from console vs. from a script.

 

It doesn't help that there are multiple different GetAV functions either. GetAV, GetBaseAV, GetPermAV.

 

I guess I will try to figure out the difference in those as well.

 

<Edit> I did some research on this and posted it in another thread here: https://forums.nexusmods.com/index.php?/topic/4903920-how-actorvalue-av-functions-work/?p=42853370. Hopefully it will help others. So, Question 2 is still out there. Any thoughts?

Edited by larryrathbun
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...