Quest question..

Post » Tue Dec 29, 2009 8:18 am

I am following the wiki and got some good stuff there...

what I'm trying to do is to start a quest at the beginning of the game that will fire when the player leaves the doc's house and steps out into the mojave..

I want that quest to run pretty much the length of the game and only finish near the end...

I'm pretty new to scripting for new vegas but have scripted with other games so not completely noob...

any help would be appreciated..

M
User avatar
Rhiannon Jones
 
Posts: 3423
Joined: Thu Sep 21, 2006 3:18 pm

Post » Tue Dec 29, 2009 1:58 pm

Attach something like the below to a "Start Game Enabled" quest. It won't do anything until after leaving the Doc's house.
scn YourQuestSCPTInt bInitializedBegin GameMode	If bInitialized		If Criterion ; Whatever condition(s) you want met before the quest stops itself			StopQuest YourQuest		Else			;Meat & Potatoes		EndIf	ElseIf Player.GetInWorldspace WastelandNV		Set bInitialized to 1 ; Wont be switched until after leaving Doc Mitchell's	EndIfEnd

User avatar
tannis
 
Posts: 3446
Joined: Sat Dec 09, 2006 11:21 pm

Post » Tue Dec 29, 2009 9:41 am

Attach something like the below to a "Start Game Enabled" quest. It won't do anything until after leaving the Doc's house.
scn YourQuestSCPTInt bInitializedBegin GameMode	If bInitialized		If Criterion ; Whatever condition(s) you want met before the quest stops itself			StopQuest YourQuest		Else			;Meat & Potatoes		EndIf	ElseIf Player.GetInWorldspace WastelandNV		Set bInitialized to 1 ; Wont be switched until after leaving Doc Mitchell's	EndIfEnd




Thanks Justin.. appreciate it!

M
User avatar
Scott Clemmons
 
Posts: 3333
Joined: Sun Sep 16, 2007 5:35 pm

Post » Tue Dec 29, 2009 11:37 am

Won't this make the game evaluate an if statement once per frame for pretty much the entire game, though? That seems... Well, I know it's not a huge performance hit or anything, but it makes my fingers itch.
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am

Post » Tue Dec 29, 2009 10:56 am

It'll check at least two conditions per iteration, but quest scripts can have their script processing delay changed so that scripts are processed less than once per frame (the default value is once every 5 seconds).

That said, checking a simple conditional statement like this will have a negligible performance hit - when I tested it I noticed it takes around 9,000 checks per frame before there's a noticeable performance hit, and that's in ideal conditions so that other bottlenecks are minimised.

Still, I always try to keep my scripts as efficient as possible, even if it will never have a noticeable effect, and I recommend others do the same.

Cipscis
User avatar
Darian Ennels
 
Posts: 3406
Joined: Mon Aug 20, 2007 2:00 pm

Post » Tue Dec 29, 2009 7:04 am

Actually it really doesn't need to check it that often, only when certain conditions are met..

Is there an efficient way to do this... I'm trying to make a main quest that has several
smaller quests that need to be completed before the main quest is finished...

Questing is quite different in fallout compared to the other games I've worked on...

btw, thanks Cipscis for the geck powerup.. gonna install that later tonight...

I tried writing the script last night and it kicked me out without saving... I thought wtf?
I guess I didn't type it in correctly... lol
I'm not a good enough scripter to just look at a script and know what is wrong, I need
a compiler to tell me there's an error so I can troubleshoot the script...

M
User avatar
sally R
 
Posts: 3503
Joined: Mon Sep 25, 2006 10:34 pm

Post » Tue Dec 29, 2009 7:53 am

I am following the wiki and got some good stuff there...

what I'm trying to do is to start a quest at the beginning of the game that will fire when the player leaves the doc's house and steps out into the mojave..

I want that quest to run pretty much the length of the game and only finish near the end...

I'm pretty new to scripting for new vegas but have scripted with other games so not completely noob...

any help would be appreciated..

M


You've got plenty of options to make this happen.

My recommendation, always influenced by performance-concerns, is to put an Actor-Zone volume outside Doc Mitchell's house that starts the quest. To close it, put an Actor-Zone near the end game where players will have to cross it in order to access the Legate's Camp.

Now, if we were talking about an ESM here I would suggest differently, but since this is for a plugin (ESP file) it's best to not modify ESM records that other modders will change down-the-line. Also, adding an invisible, transversable, volume in a cell will jive in harmony with almost any other plugin that changes that cell.

With that said, your quest can be set to "Start Game Enabled," which means that it runs the moment that the game is loaded. If you really don't want it to kick-start until leaving Doc Mitchell's house, then forego this method. Otherwise, it's best to have it start from the get-go, letting the game's code handle the necessary operations in your ESP record (the quest).

One more thing, FYI, keep in mind that quest scripts do have a built-in delay system. However, long pauses in-game (loading, etc) will queue quest-script cycles... these cycles will unload, at unison, whenever the "slow-down" period ends (loading screen ends, for example). This is okay when the quest delay is set to default (5 secs), but it's not so coolio when the delay has been manually set to a much higher frequency, and you've ended up with a gazillion updates in the queue.

O.
User avatar
Music Show
 
Posts: 3512
Joined: Sun Sep 09, 2007 10:53 am

Post » Tue Dec 29, 2009 12:49 pm

You've got plenty of options to make this happen.

My recommendation, always influenced by performance-concerns, is to put an Actor-Zone volume outside Doc Mitchell's house that starts the quest. To close it, put an Actor-Zone near the end game where players will have to cross it in order to access the Legate's Camp.

Now, if we were talking about an ESM here I would suggest differently, but since this is for a plugin (ESP file) it's best to not modify ESM records that other modders will change down-the-line. Also, adding an invisible, transversable, volume in a cell will jive in harmony with almost any other plugin that changes that cell.

With that said, your quest can be set to "Start Game Enabled," which means that it runs the moment that the game is loaded. If you really don't want it to kick-start until leaving Doc Mitchell's house, then forego this method. Otherwise, it's best to have it start from the get-go, letting the game's code handle the necessary operations in your ESP record (the quest).

One more thing, FYI, keep in mind that quest scripts do have a built-in delay system. However, long pauses in-game (loading, etc) will queue quest-script cycles... these cycles will unload, at unison, whenever the "slow-down" period ends (loading screen ends, for example). This is okay when the quest delay is set to default (5 secs), but it's not so coolio when the delay has been manually set to a much higher frequency, and you've ended up with a gazillion updates in the queue.

O.



Thanks Jorge, good to know...
M
User avatar
Petr Jordy Zugar
 
Posts: 3497
Joined: Tue Jul 03, 2007 10:10 pm


Return to Fallout: New Vegas