Changing PC Stats

Post » Sun Dec 19, 2010 8:04 pm

I was wondering which function would be the most appropriate to use if I was making a script that would increase the PC's skill points, in the same way that reading a skill book would?
User avatar
Colton Idonthavealastna
 
Posts: 3337
Joined: Sun Sep 30, 2007 2:13 am

Post » Mon Dec 20, 2010 5:51 am

You should be able to apply the existing script from a Skill Book to an object or activator. I have not done this in the GECK but that was how I did it in Morrowind's CS.

Or, at least copy and paste it and then modify it to include the skill or amount of skill increase (or decrease if you want to be nasty) that you want.
User avatar
Mrs Pooh
 
Posts: 3340
Joined: Wed Oct 24, 2007 7:30 pm

Post » Sun Dec 19, 2010 9:44 pm

The skill books in Fallout have no script. It looks to me that their effect is hard coded into the game as the only field that can be manipulated is the 'Teaches' field where a skill is assigned to it from a drop down list of skills. I would think that what you are looking for is the http://cs.elderscrolls.com/constwiki/index.php/ModActorValue command.
User avatar
Rob
 
Posts: 3448
Joined: Fri Jul 13, 2007 12:26 am

Post » Mon Dec 20, 2010 10:48 am

Thanks for the replies.
I was surprised to see that there were no scripts associated with the books ;)
I wasn't very clear in that I want the change to be permanent, just like a skill book, because what I am doing is letting the player share the skill book with an NPC follower. The script would adjust both the follower and Player's stat and then the book would be removed from the game. I thought that modAV was for temporary stat changes?

After more digging I turned up ModPCAttribute http://geck.gamesas.com/index.php/ModPCAttribute - wondering if this is what I could use or is there any known dangers or no-no's (like forceAV)?

Thanks
User avatar
Nick Swan
 
Posts: 3511
Joined: Sat Dec 01, 2007 1:34 pm

Post » Mon Dec 20, 2010 9:08 am

Somebody correct me if I am wrong, but ModAv may be temporary, but still requires another ModAv command to remove the additions made by the first. So in effect, a single ModAv acts like a permanent skill adjustment. ModPCAttribute works on attributes like strength, intelligence, etc... I think you are looking for http://geck.gamesas.com/index.php/ModPCSkill.

For me personally, I would like a clarification of the ModAv command as I have used it profusely to modify the player skills in my mod and now I am doubting weather this was the right thing to do. It seems to have worked they way I wanted, but I do know that when I used that command to raise the player's health, there were problems. I had to make the modifications to the player's health be hidden perks.
User avatar
Benji
 
Posts: 3447
Joined: Tue May 15, 2007 11:58 pm

Post » Sun Dec 19, 2010 10:27 pm

I'm relatively certain that ModAv works to permanently affect the player's skills, and yes you can remove a ModAv with a -ModAv but by the same token you can reduce a player's stats with a negative ModAv in the first place. What happened when you tried to ModAv Health? That's the only ModAv I can see being temporary along with ModAv AP because potentially the ModAv might work to affect the current health/AP and not the total (or maybe the other way around) when I presume you wanted to raise Max Health and current health along with it..?
User avatar
mollypop
 
Posts: 3420
Joined: Fri Jan 05, 2007 1:47 am

Post » Mon Dec 20, 2010 9:26 am

Somebody correct me if I am wrong, but ModAv may be temporary, but still requires another ModAv command to remove the additions made by the first. So in effect, a single ModAv acts like a permanent skill adjustment. ModPCAttribute works on attributes like strength, intelligence, etc... I think you are looking for http://geck.gamesas.com/index.php/ModPCSkill.

For me personally, I would like a clarification of the ModAv command as I have used it profusely to modify the player skills in my mod and now I am doubting weather this was the right thing to do. It seems to have worked they way I wanted, but I do know that when I used that command to raise the player's health, there were problems. I had to make the modifications to the player's health be hidden perks.


It seems you were doing the right thing - I looked at the Bobbleheads, and they DO use a script and they use ModAv. So i'll just use that, worry free ;)

Thanks

scn BobbleheadREPRScript;This is a Bobblehead script for the Collector Bobbleheads located in game;On pickup, you recieve the motivational phrase and the appropriate buffshort DoOncebegin OnActivateif IsActionRef player == 1	if ( DoOnce == 0 )		ShowMessage BobbleheadREPRBuffMessage											;This is the corner buff message		Player.ModAv Repair 10																			;Mod the perm. pool so it sticks		Activate																								;Allow item pickup		Set BH01.Bobbles to ( BH01.Bobbles + 1 )													;Add 1 to master count		Set BH01.Carrying to 1																			;Tell the script the Player has one or more Bobbleheads (for display case)		ModPCMiscStat "Bobbleheads Found", 1		Set BH01.HaveREPR to 1																		;Set the variable for Display Case			if ( BH01.Bobbles == 10 )				Addachievement 49			elseif ( BH01.Bobbles == 20 )				Addachievement 50			endif																			Set DoOnce to 1																						endifendifend

User avatar
Annick Charron
 
Posts: 3367
Joined: Fri Dec 29, 2006 3:03 pm

Post » Sun Dec 19, 2010 9:53 pm

I'm relatively certain that ModAv works to permanently affect the player's skills, and yes you can remove a ModAv with a -ModAv but by the same token you can reduce a player's stats with a negative ModAv in the first place. What happened when you tried to ModAv Health? That's the only ModAv I can see being temporary along with ModAv AP because potentially the ModAv might work to affect the current health/AP and not the total (or maybe the other way around) when I presume you wanted to raise Max Health and current health along with it..?


That is pretty much it. ModAv with health did not report to correct max health in the pipboy. Giving the player a hidden perk of a health bonus did.
User avatar
chinadoll
 
Posts: 3401
Joined: Tue Aug 22, 2006 5:09 am


Return to Fallout 3