So...I've been play-testing my mod for about 5 hours now.For some reason my scripts don't always execute. Need some serious help here. About to provide a lot of information
------------------Code----------------------
The entirety of my Quest Source Code:
Spoiler
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 28Scriptname QF_MOD1QPart1_01002991 Extends Quest Hidden;BEGIN ALIAS PROPERTY Player;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_Player Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY HoodedDude;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_HoodedDude Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Citizen_1;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_Citizen_1 Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Citizen_3;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_Citizen_3 Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Citizen_2;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_Citizen_2 Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Giddeon;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_Giddeon Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Citizen_4;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_Citizen_4 Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Reginald;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_Reginald Auto;END ALIAS PROPERTY;BEGIN FRAGMENT Fragment_0Function Fragment_0();BEGIN AUTOCAST TYPE QF_MOD1QPart1_01002991Quest __temp = self as QuestQF_MOD1QPart1_01002991 kmyQuest = __temp as QF_MOD1QPart1_01002991;END AUTOCAST;BEGIN CODE;InitilizationIf (MQ305.GetStageDone(200) == true) Mod1Qpart1. SetStage(1)EndIf;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_6Function Fragment_6();BEGIN CODE;player has killed Alduin and Hooded Man appearsAlias_HoodedDude.GetReference().Enable();END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_27Function Fragment_27();BEGIN CODE;Cultists Activated, and Scene avaliable;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_17Function Fragment_17();BEGIN CODE;Upon entering the hideout;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_25Function Fragment_25();BEGIN CODE;Cultists Flee;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_8Function Fragment_8();BEGIN CODE;Disables Hooded ManAlias_HoodedDude.GetReference().Disable();END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_20Function Fragment_20();BEGIN CODE;Player Has Speaken to Gideon YuroSetObjectiveCompleted(15)SetObjectiveDisplayed(17);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_7Function Fragment_7();BEGIN CODE;Player has encountered Hooded ManSetObjectiveDisplayed(2);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_21Function Fragment_21();BEGIN CODE;Player has Reached Dragon's Rest Sanctum;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_19Function Fragment_19();BEGIN CODE;After cave Scene, Before Speaking to Gideon YuroSetObjectiveCompleted(10)SetObjectiveDisplayed(15);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_14Function Fragment_14();BEGIN CODESetObjectiveCompleted(2)SetObjectiveDisplayed(10);Player Has Read InvitationAlias_Citizen_1.GetReference().Enable()Alias_Citizen_2.GetReference().Enable()Alias_Citizen_3.GetReference().Enable()Alias_Citizen_4.GetReference().Enable();END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin comment;Event OnInit();If (MOD1QPart1.GetStage() == 0); If (MQ305.GetStageDone(200) == true); Mod1Qpart1.SetStage(1); EndIf;EndIf;EndEventQuest Property MQ305 AutoQuest Property MOD1QPart1 Auto
My Book Script:
Scriptname Mod1QPart1LetterScript extends ObjectReference Quest Property MOD1QPart1 Auto Event OnRead() MOD1QPart1.SetStage(10)endEvent
Alias_HoodedDude Dialogue Script (The Papyrus Fragment from the Dialogue Info of the HoodedDude Alias Actor.):
Spoiler
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 3Scriptname TIF__01002F00 Extends TopicInfo Hidden;BEGIN FRAGMENT Fragment_0Function Fragment_0(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODEActorBase PlayerBase = Game.GetPlayer().GetBaseObject() as ActorBaseRace PlayerRace = Game.GetPlayer().GetRace()If (PlayerRace == RedguardRace || PlayerRace == BretonRace || PlayerRace == NordRace || PlayerRace == ImperialRace) Game.GetPlayer().AddItem(MOD1SecretInvitationHU)ElseIf (PlayerRace == WoodElfRace || PlayerRace == HighElfRace || PlayerRace == DarkElfRace) Game.GetPlayer().AddItem(MOD1SecretInvitationElv)ElseIf (PlayerRace == ArgonianRace) Game.GetPlayer().AddItem(MOD1SecretInvitationAr)ElseIf (PlayerRace == KhajiitRace) Game.GetPlayer().AddItem(MOD1SecretInvitationKj)ElseIf (PlayerRace == OrcRace) Game.GetPlayer().AddItem(MOD1SecretInvitationOc)Else Debug.MessageBox("Player Race not found")EndIfGetOwningQuest().SetStage(2);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_2Function Fragment_2(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODEakSpeaker.EvaluatePackage();END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentBook Property MOD1SecretInvitationHU AutoBook Property MOD1SecretInvitationElv AutoBook Property MOD1SecretInvitationKj AutoBook Property MOD1SecretInvitationAr AutoBook Property MOD1SecretInvitationOc AutoRace Property ImperialRace AutoRace Property NordRace AutoRace Property RedguardRace AutoRace Property BretonRace AutoRace Property WoodElfRace AutoRace Property DarkElfRace AutoRace Property HighElfRace AutoRace Property ArgonianRace AutoRace Property KhajiitRace AutoRace Property OrcRace AutoQuest Property MOD1QPart1 Auto----The Problem--------------------
My scripts all work, but only half the time. I can't figure out why. The HoodedDude alias points to a unique actor called MOD1LetterDude. What I mean by only half the time is this:
The player is supposed to begin the quest by encountering the hoodeddude, the Alias has 2 packages. A forcegreet package, and a run away package (the second package happens when the quest stage > 1). Sometimes the forcegreet dialogue works, other times it doesn't. When it doesn't work, it causes problems, because the dialogue is supposed to set the quest stage to 2 (which is >1) and make the actor run away. Therefore when this dialogue doesn't run, the quest is frozen at stage 1. Which is bad.
AGAIN, it's important to remember that it's not completely broken. out of 50 trials this has happend approx 20 times. Sometimes the code executes fine, other times it doesn't. The weird thing is all quest variables (SQV) are the same before the code fails to execute, as they are when it executes properly. Have no idea why this is.
The same goes for the book script. It is attached to the letter that the player recieves. *Take this time to refer to the code*
This code only executes about 50% of the time also. Don't understand it.
Before anyone asks all of my Properties are defined, filled, and Quest Stages Created.
SQV Shows that all aliases are being filled.
Any help?
I'd appreciate it.

My Base Actors have no packages. At all.