Quick script question

Post » Wed Apr 27, 2011 12:55 am

Will this script work as expected? I've attached it to the referenced quest already. I expect it to check to see if the player is of the Shojo race, but only after they've exited the Vault; if they aren't a Shojo or if they have the Child at Heart perk, it won't do anything, but if they are a Shojo and don't have the Child At Heart perk, the script will add it to them. Also, is there a way to silently add the perk? Here's the script from beginning to end:

scn ShojoAddCAHPerkBegin GameMode	if GetStage CG04 == 200		if player.getisrace Shojo			if (Player.HasPerk ChildAtHeart) == 0				Player.AddPerk ChildAtHeart				StopQuest ShojoAddCAHPerkQuest			endif		endif	endifend


Also, is there anything special I have to do with the quest other than make it start game enabled, and apply the script to it?

I tried to figure most of this stuff out on my own using my own knowledge from Oblivion modding as well as the GECK Wiki and the Fallout Wiki as resources. I got it to where the logic looks right (figuring out how to test for the absence of a perk was a bit tricky), and it compiles and saves; I just want to pick the brains of the more experienced modders here to make sure I have it right.
User avatar
AnDres MeZa
 
Posts: 3349
Joined: Thu Aug 16, 2007 1:39 pm

Post » Tue Apr 26, 2011 1:58 pm

Yea that looks like it should work. And all you have to do is check StartGameEnabled and add the script, then it will run from the start of the game until told to stop, or forever.
User avatar
Eric Hayes
 
Posts: 3392
Joined: Mon Oct 29, 2007 1:57 am

Post » Tue Apr 26, 2011 9:44 am

Cool thanks :)
User avatar
Sian Ennis
 
Posts: 3362
Joined: Wed Nov 08, 2006 11:46 am

Post » Tue Apr 26, 2011 11:44 am

Yep it worked, and also didn't pop up a box (making me think, at first, that it didn't work, until I verified that the plugin was loaded and checked the perks list, which had it listed). I know it worked without a doubt because I had the perk on a level 3 character; it doesn't come available normally until level 4, and even then I usually wait until level 7 to get it, picking up Educated at 4, Comprehension at 5, and Fortune Finder at 6. But that's beside the point :) This script is actually part of a small mod I made to tweak the Shojo race a little bit more to my liking.
User avatar
Life long Observer
 
Posts: 3476
Joined: Fri Sep 08, 2006 7:07 pm


Return to Fallout 3