scripting a perk

Post » Fri May 13, 2011 8:42 pm

So, I'm trying to make a script which will add karma and health when you steal something, but I don't know what begin block I should be using, they all seem to specific. A begin on minor crime block would be nice but it doesn't seem to be there :\ Help?
User avatar
Jade Muggeridge
 
Posts: 3439
Joined: Mon Nov 20, 2006 6:51 pm

Post » Fri May 13, 2011 5:46 pm

Use http://cs.elderscrolls.com/constwiki/index.php/GameMode.
User avatar
Katie Samuel
 
Posts: 3384
Joined: Tue Oct 10, 2006 5:20 am

Post » Fri May 13, 2011 8:23 pm

Thanks! But I now need to know how "Script effect" on the abillities menu works, I don't seem to bea able to specify which script I want it to use?
User avatar
Genocidal Cry
 
Posts: 3357
Joined: Fri Jun 22, 2007 10:02 pm

Post » Sat May 14, 2011 1:59 am

It is possible that you created a script with some name, but when you try to add this script to the "script effect" field, your script does not appear in the dropdown list of choices. That is because you defined the script with the wrong type. Bring up the script editor on your script. There is a dropdown field at the top for the script type, with choices "script", "spell effect" or "object". Make sure "spell effect" is selected. Then the next time you bring up the effect dialog box, you will see your script in the dropdown.
User avatar
Tammie Flint
 
Posts: 3336
Joined: Mon Aug 14, 2006 12:12 am

Post » Fri May 13, 2011 11:36 pm

It is possible that you created a script with some name, but when you try to add this script to the "script effect" field, your script does not appear in the dropdown list of choices. That is because you defined the script with the wrong type. Bring up the script editor on your script. There is a dropdown field at the top for the script type, with choices "script", "spell effect" or "object". Make sure "spell effect" is selected. Then the next time you bring up the effect dialog box, you will see your script in the dropdown.

Thank you, I've got that part working now :) but I don't understand what I've done wrong here:
scn 00KleptomaniacHealScript

begin gamemode

if getminorcrimecount += 1
addspell 0Kleptomaniachealspell
modactorvalue karma 1

else
endif
end

This is the script I was originally wondering about the begin block for, I'm trying to get it to add "0Kleptomaniachealspell" when I steal something, however it won't let me save the script... :\
User avatar
Georgia Fullalove
 
Posts: 3390
Joined: Mon Nov 06, 2006 11:48 pm

Post » Fri May 13, 2011 10:38 am

We really need to make this a faq. (a) don't start your names with numerals. (b ) use geck powerup, available at newvegasnexus, in order to see script syntax errors.
User avatar
XPidgex Jefferson
 
Posts: 3398
Joined: Fri Sep 08, 2006 4:39 pm

Post » Sat May 14, 2011 2:09 am

We really need to make this a faq. (a) don't start your names with numerals. (b ) use geck powerup, available at newvegasnexus, in order to see script syntax errors.

Ok, I downloaded power up and it says that the error is "SYNTAX" What does that mean? And how do I fix it?
User avatar
Brandi Norton
 
Posts: 3334
Joined: Fri Feb 09, 2007 9:24 pm

Post » Fri May 13, 2011 5:32 pm

The dialog box also contains some other text, such as perhaps "unrecognized variable on line 12". Then you would go to line 12, and find the variable with that name. You would probably find it is spelled incorrectly.
User avatar
Genevieve
 
Posts: 3424
Joined: Sun Aug 13, 2006 4:22 pm


Return to Fallout: New Vegas