Perk idea - Need help! I can't script!

Post » Sun Nov 30, 2014 5:20 pm

I need to make a companion perk for my companion mod. The idea I had is too increase Charisma by 1, Speech by 10, and have the player suffer no negative karma losses.

How would I go about doing this, specifically the last part? What scripts would I need to write? Please help!

User avatar
Hairul Hafis
 
Posts: 3516
Joined: Mon Oct 29, 2007 12:22 am

Post » Mon Dec 01, 2014 3:20 am

Charisma and Speech can be handled by a simple ability. As for the no karma loss, I can't write the script from the top of my head, but I'd create a global that is set to the player's current karma when the follower is hired, and then in the script I'd check if the player has the new companion's perk, and if yes then check if the player's karma is lower than the global, and if yes then set player's karma to the value of the global. Or if you can't set the value directly I'd make it calculate the difference between the current value and the global and then reward the palyer with that amount of karma. However, this would still display the message that you lost and gained karma.

User avatar
Flesh Tunnel
 
Posts: 3409
Joined: Mon Sep 18, 2006 7:43 pm

Post » Sun Nov 30, 2014 2:31 pm

This link might prove useful to you: http://geck.gamesas.com/index.php?title=Scripting_for_Beginners

User avatar
Susan Elizabeth
 
Posts: 3420
Joined: Sat Oct 21, 2006 4:35 pm

Post » Sun Nov 30, 2014 8:58 pm

Karma is an actor value, so you can check it's value with

player.GetActorValue karma

It's special though and you can't set it directly like most actor values. You will need to use http://geck.gamesas.com/index.php?title=RewardKarma instead.

User avatar
Milagros Osorio
 
Posts: 3426
Joined: Fri Aug 25, 2006 4:33 pm


Return to Fallout: New Vegas