OneOnOne1162 Posted January 27, 2021 Share Posted January 27, 2021 I'm trying to make an Alternate Start patch for one of my mods and I made the script for the origin. But when I try to access properties for the script it now says "Errors encountered while attempting to reload the script." I extracted all of the scripts Dawnguard, Hearthfire and Dragonborn .psc files in "sources" in order. The error message disappears if I remove "ARTH_LAL_StartQuest Property ChargenQuest Auto" however. I tried a method suggested in the replies to Arthmoor's instructions to solve this problem of making StartQuest a Quest property and then casting it as ARTH_LAL_StartQuest" but it doesn't seem to work. Currently the script looks like this. But I still get the same error message. Anyone else have any idea what the problem may be? ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 1 Scriptname TrTh_TIF__07005905 Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE ARTH_LAL_StartQuest ChargenQuest = StartQuest as ARTH_LAL_StartQuest ChargenQuest.SetAddonQuestStage(10, MakeThaneAlternateStart) ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment Quest Property MakeThaneAlternateStart Auto Quest Property StartQuest Auto Link to comment Share on other sites More sharing options...
IsharaMeradin Posted January 28, 2021 Share Posted January 28, 2021 Do you have the appropriate LAL source scripts in your source folder?Whenever you reference another script like this, that script's source file needs to be present in order to compile the current script. Link to comment Share on other sites More sharing options...
OneOnOne1162 Posted January 28, 2021 Author Share Posted January 28, 2021 Do you have the appropriate LAL source scripts in your source folder?Whenever you reference another script like this, that script's source file needs to be present in order to compile the current script. The script compiles successfully. It's only when I try to access the script's properties that I get an error message. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted January 28, 2021 Share Posted January 28, 2021 Use GetFormFromFile to grab the quest from LAL and then cast to the script. Here is an example from my Random Mining MCM mod where I did not want to add a property to the base game's MineOreScriptDeclare the variableabim_RM_MCM_QuestScript MCMScript Define the variableMCMScript = (Game.GetFormFromFile(0x00000D62,"Random Mining MCM.esp") as Quest) as abim_RM_MCM_QuestScript See if going that route lets you get past this hurdle and end up with something usable in the game. Link to comment Share on other sites More sharing options...
ReDragon2013 Posted January 29, 2021 Share Posted January 29, 2021 (edited) You did not post anything about your Skyrim installation like Windows version or used Tools for example SKSE or ModOrganizer. I found this thread: https://github.com/ModOrganizer2/modorganizer/issues/709Jaiim commented on 3 Aug 2019: "ModOrganizer 2.1.6 seems to resolve the issues" Edited January 29, 2021 by ReDragon2013 Link to comment Share on other sites More sharing options...
OneOnOne1162 Posted January 29, 2021 Author Share Posted January 29, 2021 Use GetFormFromFile to grab the quest from LAL and then cast to the script. Here is an example from my Random Mining MCM mod where I did not want to add a property to the base game's MineOreScriptDeclare the variable abim_RM_MCM_QuestScript MCMScriptDefine the variable MCMScript = (Game.GetFormFromFile(0x00000D62,"Random Mining MCM.esp") as Quest) as abim_RM_MCM_QuestScriptSee if going that route lets you get past this hurdle and end up with something usable in the game. I'll give it a try. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted January 29, 2021 Share Posted January 29, 2021 You would look up the quest you want to reference and get its ID number and place it after the 0x. You would replace the esp name with the name of the plugin where the quest record is coming from. The link should have explained all that and in better detail. I just included a working instance as an additional example. Link to comment Share on other sites More sharing options...
OneOnOne1162 Posted January 29, 2021 Author Share Posted January 29, 2021 You would look up the quest you want to reference and get its ID number and place it after the 0x. You would replace the esp name with the name of the plugin where the quest record is coming from. The link should have explained all that and in better detail. I just included a working instance as an additional example. I'm not sure what to add here, however. I think it's not referencing anything actually in the CK but a script from the mod. I think the example I posted made it more confusing than it had to be by adding the "StartQuest" thing because that was a potential fix that I saw on the instruction page for making an Alternate Start Patch. This is the original form of the script and the way you're technically supposed to do it according to his instructions: ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 1 Scriptname TrTh_TIF__07005905 Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE ChargenQuest.SetAddonQuestStage(10, MakeThaneAlternateStart) ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment Quest Property MakeThaneAlternateStart Auto ARTH_LAL_StartQuest Property ChargenQuest Auto And the "ARTH_LAL_StartQuest" property I think just refers to a script attached to the quest named ARTHLALChargenQuest. So I'm not sure what to use instead of the (0x00000D62,"Random Mining MCM.esp") here. Link to comment Share on other sites More sharing options...
OneOnOne1162 Posted January 29, 2021 Author Share Posted January 29, 2021 You did not post anything about your Skyrim installation like Windows version or used Tools for example SKSE or ModOraganizer. I found this thread: https://github.com/ModOrganizer2/modorganizer/issues/709Jaiim commented on 3 Aug 2019: "ModOrganizer 2.1.6 seems to resolve the issues" I'm not entirely sure that I get the connection. This thread seems to be about being unable to compile scripts. I can compile the script in question, I just get an error when I try to go to "properties." And it's ONLY for this script, not for any of my other scripts. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted January 29, 2021 Share Posted January 29, 2021 (edited) Take a look at this, I adapted your latest posted code using LAL's SSE information. You'll need to adapt it for LE if that is the version of the game you are working with. ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 1 Scriptname TrTh_TIF__07005905 Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE ARTH_LAL_StartQuest ChargenQuest = (Game.GetFormFromFile(0x00000DAF,"Alternate Start - Live Another Life.esp") as Quest) as ARTH_LAL_StartQuest ;used SSE version of LAL as example ;if using LE, please look up correct values for yourself ChargenQuest.SetAddonQuestStage(10, MakeThaneAlternateStart) ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment Quest Property MakeThaneAlternateStart Auto ;ARTH_LAL_StartQuest Property ChargenQuest Auto ;this property no longer needed A little explanation... 00000DAF is the non-load order specific Form ID # for the LAL quest called ARTHLALChargenQuest0x in front tells the papyrus engine that it is dealing with a hex value rather than a decimal valueAlternate Start - Live Another Life.esp is the string name of the plugin that the form we want is located inThe resulting Form is cast into a Quest and then cast into the specific script attached to that quest in this case, ARTH_LAL_StartQuest Edited January 29, 2021 by IsharaMeradin Link to comment Share on other sites More sharing options...
Recommended Posts