Trouble tracking time in my mod

Post » Fri Feb 18, 2011 11:37 pm

So I've been working on a mod for a while now, and have been repeatedly frustrated by a certain problem. There is a quest to fix up a ruined house. Theoretically, I want the house to update every twenty-four hours to the next stage of renovation. I get the quest to start (kind of; more on that later), but it won't update paste that initial stage (stage 30). Here's my scripting thus far:

ScN KDBAbandonedHouseQuestScript

ref KDBSecretCandle
ref KDBSecretLever
ref KDBAbandonedHouseMarkerRef
short DoOnce
short StartDay
short GameDaysPassed

Begin GameMode
set DoOnce to 0
StartQuest KDBAbandonedHouseQuest
if Player.GetDistance KDBAbandonedHouseMarkerRef < 500
SetStage KDBAbandonedHouseQuest 1
endif

if GetStage Dark10Sanctuary == 20
if GetStage KDBAbandonedHouseQuest >= 30
Setstage KDBAbandonedHouseQuest 17
Set DoOnce to 0
endif
endif

if GetStage KDBAbandonedHouseQuest == 17
if GetStage Dark19Whispers == 10
SetStage KDBAbandonedHouseQuest 25
Set DoOnce to 0
endif
endif

if GetStage KDBAbandonedHouseQuest == 15
if GetStage Dark19Whispers == 10
SetStage KDBAbandonedHouseQuest 25
Set DoOnce to 0
endif
endif

if GetStage KDBAbandonedHouseQuest == 30
if DoOnce == 0
set StartDay to GameDaysPassed
set DoOnce to 1
endif
endif

if GameDaysPassed == ( StartDay + 1 )
if DoOnce == 1
SetStage KDBAbandonedHouseQuest 35
endif
endif

if GetStage KDBAbandonedHouseQuest == 35
if GameDaysPassed == ( StartDay + 2 )
SetStage KDBAbandonedHouseQuest 37
endif
endif

if GetStage KDBAbandonedHouseQuest == 37
if GameDaysPassed == ( StartDay + 3 )
SetStage KDBAbandonedHouseQuest 40
endif
endif


if GetStage KDBAbandonedHouseQuest == 40
KDBSecretCandle.enable
KDBSecretLever.enable
endif

Probably messy at the moment but that's because I keep going back in and revising things, trying to make it work. Also, I can't get the quest to update to stage 1, which is what gives the player the initial entry and the topic to continue the quest. I go near the Xmarker, but no update. So, any thoughts?
User avatar
Emily Jeffs
 
Posts: 3335
Joined: Thu Nov 02, 2006 10:27 pm

Post » Sat Feb 19, 2011 11:30 am

Doonce will never equal 1, as you set it to zero every frame.
User avatar
sarah taylor
 
Posts: 3490
Joined: Thu Nov 16, 2006 3:36 pm

Post » Sat Feb 19, 2011 5:39 am

Doonce will never equal 1, as you set it to zero every frame.

Are you sure? I thought it only did it on 17 and 25?
User avatar
Chantel Hopkin
 
Posts: 3533
Joined: Sun Dec 03, 2006 9:41 am

Post » Sat Feb 19, 2011 6:31 am

1. You probably should not be doing a 'startquest' every single execution frame. I am not sure if that restarts the quest since I am not a quest builder, just a scripter.

2. Anytime the player is within 500 units of the abandoned house reference, it constantly sets the quest to stage 1. No matter what. Every single execution frame.

3. You set DoOnce to 0 every single execution frame, right at the beginning of your GameMode block. No matter what, its reset so its useless for a switch.

There's more, but these probably need to be addressed first.
User avatar
jason worrell
 
Posts: 3345
Joined: Sat May 19, 2007 12:26 am

Post » Fri Feb 18, 2011 8:57 pm

1. You probably should not be doing a 'startquest' every single execution frame. I am not sure if that restarts the quest since I am not a quest builder, just a scripter.

2. Anytime the player is within 500 units of the abandoned house reference, it constantly sets the quest to stage 1. No matter what. Every single execution frame.

3. You set DoOnce to 0 every single execution frame, right at the beginning of your GameMode block. No matter what, its reset so its useless for a switch.

There's more, but these probably need to be addressed first.

But if 2 is true, why do I never get the journal entry for quest stage 1? Regardless, I'll implement the changes and see how it works after that.
User avatar
Schel[Anne]FTL
 
Posts: 3384
Joined: Thu Nov 16, 2006 6:53 pm

Post » Sat Feb 19, 2011 1:24 am

Perhaps because of #1? That might reset it to 0.

Its also possible the script is not running at all?
User avatar
R.I.p MOmmy
 
Posts: 3463
Joined: Wed Sep 06, 2006 8:40 pm

Post » Sat Feb 19, 2011 2:42 am

So I tried changing that first block to this:
Begin GameMode
if Started == 0
if Player.GetDistance KDBAbandonedHouseMarkerRef < 500
SetStage KDBAbandonedHouseQuest 1
Set Started to 1
endif
endif

No dice. Quest still never updates to stage 1, and still doesn't update from 30 to any of the further stages.
User avatar
An Lor
 
Posts: 3439
Joined: Sun Feb 18, 2007 8:46 pm

Post » Sat Feb 19, 2011 8:40 am

post your current script.
User avatar
Jesus Sanchez
 
Posts: 3455
Joined: Sun Oct 21, 2007 11:15 am

Post » Sat Feb 19, 2011 2:05 am

ScN KDBAbandonedHouseQuestScript

ref KDBSecretCandle
ref KDBSecretLever
ref KDBAbandonedHouseMarkerRef
short DoOnce
short StartDay
short GameDaysPassed
short Started

Begin GameMode
if Started == 0
if Player.GetDistance KDBAbandonedHouseMarkerRef < 500
SetStage KDBAbandonedHouseQuest 1
Set Started to 1
endif
endif

if GetStage Dark10Sanctuary == 20
if GetStage KDBAbandonedHouseQuest >= 30
Setstage KDBAbandonedHouseQuest 17
Set DoOnce to 0
endif
endif

if GetStage KDBAbandonedHouseQuest == 17
if GetStage Dark19Whispers == 10
SetStage KDBAbandonedHouseQuest 25
Set DoOnce to 0
endif
endif

if GetStage KDBAbandonedHouseQuest == 15
if GetStage Dark19Whispers == 10
SetStage KDBAbandonedHouseQuest 25
Set DoOnce to 0
endif
endif

if GetStage KDBAbandonedHouseQuest == 30
if DoOnce == 0
set StartDay to GameDaysPassed
set DoOnce to 1
endif
endif

if GameDaysPassed == ( StartDay + 1 )
if DoOnce == 1
SetStage KDBAbandonedHouseQuest 35
endif
endif

if GetStage KDBAbandonedHouseQuest == 35
if GameDaysPassed == ( StartDay + 2 )
SetStage KDBAbandonedHouseQuest 37
endif
endif

if GetStage KDBAbandonedHouseQuest == 37
if GameDaysPassed == ( StartDay + 3 )
SetStage KDBAbandonedHouseQuest 40
endif
endif


if GetStage KDBAbandonedHouseQuest == 40
KDBSecretCandle.enable
KDBSecretLever.enable
endif
User avatar
Cagla Cali
 
Posts: 3431
Joined: Tue Apr 10, 2007 8:36 am

Post » Sat Feb 19, 2011 7:27 am

Is your quest listed as a Start quest"? If it isn't, the script isn't even running.
User avatar
courtnay
 
Posts: 3412
Joined: Sun Nov 05, 2006 8:49 pm

Post » Sat Feb 19, 2011 7:35 am

You can put a messagebox in there to verify your script is running.
User avatar
Samantha Mitchell
 
Posts: 3459
Joined: Mon Nov 13, 2006 8:33 pm

Post » Sat Feb 19, 2011 10:17 am

So I did a messagebox, just

Begin GameMode

MessageBox "Your quest is running!"

End

And loaded a saved game. MessageBox came up fine. Still no update for going within 500 of the marker. I checked the box for "Start Game Enabled" on the Quest menu as well.
User avatar
Sheeva
 
Posts: 3353
Joined: Sat Nov 11, 2006 2:46 am

Post » Fri Feb 18, 2011 10:22 pm

Need to see some of the other quest scripts that are running as well. You check some variables, but, we have no clue what the values are going to be, or, when they change.....
User avatar
sarah simon-rogaume
 
Posts: 3383
Joined: Thu Mar 15, 2007 4:41 am

Post » Fri Feb 18, 2011 8:19 pm

Need to see some of the other quest scripts that are running as well. You check some variables, but, we have no clue what the values are going to be, or, when they change.....

This is the whole quest script, and the only quest I have added. Am I misunderstanding you?
User avatar
Donatus Uwasomba
 
Posts: 3361
Joined: Sun May 27, 2007 7:22 pm

Post » Sat Feb 19, 2011 3:36 am

What about this one?

if GetStage Dark19Whispers == 10
User avatar
Umpyre Records
 
Posts: 3436
Joined: Tue Nov 13, 2007 4:19 pm


Return to IV - Oblivion