Jump to content

Recommended Posts

Posted

I've been attempting to make a mod. What I want to do is add a book to players inventory. Then attempting to add player skills without lvling up the player. Any help is appreciated. I have been working on this for a month. Scratching my head, pounding my head on things and pondering. I know I keep getting closer to making the script work. This is my first mod and is inspired by other mods that lvl up skills and player lvl. My other half wanted to lvl up skills but not his players lvl so I went to work. I've completely made a book for this and hope to share it with others once I can figure out what is wrong with the script.

Script

 

  Reveal hidden contents

 

Posted

I'm not much of an expert, not by a long-shot, but couldn't you opt to use 'Game.GetPlayer.ModAV' instead. In my experience it is more stable, and more forgiving in the engine when you want to lower an actor value.

Posted

ModAV would be of benefit if they were wanting to temporarily affect the value or ensure that the value could be reversed for whatever reason.

SetAV would be appropriate if the intent is to make a one time permanent change.

 

If you want this to happen right at the start of the game (or when the mod is first loaded):

Make a start game enabled quest.

Add an alias pointing to the player on that quest.

Add the book to the alias inventory.

 

Then adjust your script for the book as follows (needs testing for compilation and function):

 

  Reveal hidden contents

 

Posted
  On 8/23/2019 at 9:28 PM, IsharaMeradin said:

ModAV would be of benefit if they were wanting to temporarily affect the value or ensure that the value could be reversed for whatever reason.

SetAV would be appropriate if the intent is to make a one time permanent change.

 

If you want this to happen right at the start of the game (or when the mod is first loaded):

Make a start game enabled quest.

Add an alias pointing to the player on that quest.

Add the book to the alias inventory.

 

Then adjust your script for the book as follows (needs testing for compilation and function):

 

  Reveal hidden contents

 

Wait.. isn't this the other way around :

ModAV = permanent
SetAV = temporary
In all the research i've done this is the conclusion i got, from other modders like yourself and others, and from reading online.
They all advise me to use ModAV instead of SetAV for my Gain Permanent Health/Magicka/Stamina Script - Activator.
Posted

You are also correct.

 

ModAV adds or subtracts from the permanent modifier value used in the calculation of the current value. Thus if one mods in 50, there will always be 50 more than there would have been otherwise no matter the changes.

 

I said "temporary" with ModAV not because of how it affects the value but as a contrast usage to the OP's intended one time value change. For example, my Controller Walk Run Toggle mod uses ModAV to change the speed multiplier up and down as the designated button is pressed. It is a temporary change because the previous usage gets reversed with the next usage.

 

I said "permanent" with SetAV because the idea behind its use is to change the base value so that all future calculations are affected by the new base. However, it is "temporary" in that any other usage of SetAV on that value will "permanently" erase the prior change.

 

In other words, it boils down to point of view. No confusion intended.

Posted
  On 8/24/2019 at 1:54 AM, IsharaMeradin said:

You are also correct.

 

ModAV adds or subtracts from the permanent modifier value used in the calculation of the current value. Thus if one mods in 50, there will always be 50 more than there would have been otherwise no matter the changes.

 

I said "temporary" with ModAV not because of how it affects the value but as a contrast usage to the OP's intended one time value change. For example, my Controller Walk Run Toggle mod uses ModAV to change the speed multiplier up and down as the designated button is pressed. It is a temporary change because the previous usage gets reversed with the next usage.

 

I said "permanent" with SetAV because the idea behind its use is to change the base value so that all future calculations are affected by the new base. However, it is "temporary" in that any other usage of SetAV on that value will "permanently" erase the prior change.

 

In other words, it boils down to point of view. No confusion intended.

 

Got it, thanks for the explanation.
Although i would really like to find a detailed documentation on this subject, i still don't have it 100% cover.
Posted

Thanks Everyone. I will keep testing and trying now that I have a path to work towards. I can't wait to see if I can finish this up and share it.

  • Recently Browsing   0 members

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