Problem with custom Karma Based Perks script

Post » Mon Nov 18, 2013 2:04 pm

Alright, I'm working on a mod that gives the player perks based on his/her karma level. (Yes, I'm aware that there is already a mod that does this, but I wanted to make my own, different functioning version.)

There are six karma based perks in all that I've made: one for 300 or more karma, 600 or more karma, 900 or more karma, -300 or less karma, -600 or less karma, and -900 or less karma. I've set the perks to be neither playable or hidden in their respective perk windows since I don't want people to be able to pick these perks up in the level up menu, but I also don't want them to be hidden from player view. It is set up so that the perks are removed if you fail to meet the karma requirement, but you also keep lesser perks once you unlock the better ones. (e.g: keep KarmaGood1 once you achieve KarmaGood2)

The problem then is that the perks aren't being added when the karma level is reached.

Here's the entire code I'm using.

scn KarmaPerkScript begin gamemode if (player.getav karma >= 300)player.addperk KarmaGood1elseplayer.removeperk KarmaGood1endifif (player.getav karma >= 600)player.addperk KarmaGood2elseplayer.removeperk KarmaGood2endifif (player.getav karma >= 900)player.addperk KarmaGood3elseplayer.removeperk KarmaGood3endifif (player.getav karma <= -300)player.addperk KarmaBad1elseplayer.removeperk KarmaBad1endifif (player.getav karma <= -600)player.addperk KarmaBad2elseplayer.removeperk KarmaBad2endifif (player.getav karma <= -900)player.addperk KarmaBad3elseplayer.removeperk KarmaBad3endifend
The script compiles correctly and everything, yet when I go to the game and change my karma level, the perks aren't added. (I'm using http://newvegas.nexusmods.com/mods/42402/ mod to change it, since I can't use the console to do it.)
What am I doing wrong? Is the problem that the script isn't firing up, or a problem with the script itself? Is it a problem with the perks themselves? I didn't set any icons for the perks yet, so could that be it?
Could it just be a problem with the mod I'm using to alter my karma?
Any help is greatly appreciated :s
User avatar
Sophie Morrell
 
Posts: 3364
Joined: Sat Aug 12, 2006 11:13 am

Return to Fallout: New Vegas