IsharaMeradin Posted April 18, 2021 Share Posted April 18, 2021 Is _DOM_DominqueRecruitQuest the name of the quest or the name of the script? It needs to be the name of the script rather than the quest. Link to comment Share on other sites More sharing options...
Dahveed Posted April 18, 2021 Author Share Posted April 18, 2021 oooooooooooooooooooooh ok, I it's called _DOM_DominiqueController Thanks again :) Link to comment Share on other sites More sharing options...
Dahveed Posted April 18, 2021 Author Share Posted April 18, 2021 Now I get this: Starting 1 compile threads for 1 files...Compiling "_DOM_TIF__060D5BDD"...F:\Skyrim Special Edition\Data\Source\Scripts\temp\_DOM_TIF__060D5BDD.psc(9,28): cannot convert to unknown type _dom_dominquecontrollerF:\Skyrim Special Edition\Data\Source\Scripts\temp\_DOM_TIF__060D5BDD.psc(9,28): cannot cast a quest to a _dom_dominquecontroller, types are incompatibleF:\Skyrim Special Edition\Data\Source\Scripts\temp\_DOM_TIF__060D5BDD.psc(9,56): _dom_dominquecontroller is not a known user-defined typeNo output generated for _DOM_TIF__060D5BDD, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on _DOM_TIF__060D5BDD The script is _DOM_DominiqueController, which is in the "scripts" tab of my follower quest. Link to comment Share on other sites More sharing options...
Dahveed Posted April 18, 2021 Author Share Posted April 18, 2021 This is my entire _DOM_DominiqueController script (from the "script" tab on the right side of the quest window): Scriptname _DOM_DominiqueController extends QuestActor Property PlayerREF AutoReferenceAlias Property FollowerAlias AutoFaction Property DismissedFollowerFaction AutoFaction Property CurrentHireling AutoMessage Property FollowerDismissMessage AutoMessage Property FollowerDismissMessageWedding AutoMessage Property FollowerDismissMessageCompanions AutoMessage Property FollowerDismissMessageCompanionsMale AutoMessage Property FollowerDismissMessageCompanionsFemale AutoMessage Property FollowerDismissMessageWait AutoSetHirelingRehire Property HirelingRehireScript AutoGlobalVariable Property FollowerRecruited AutoInt Property iFollowerDismiss Auto ConditionalObjectReference Property DomGiftChest Auto MiscObject Property BrowniePoint Auto Function SetFollower(ObjectReference FollowerRef) actor FollowerActor = FollowerRef as Actor FollowerActor.RemoveFromFaction(DismissedFollowerFaction) If FollowerActor.GetRelationshipRank(PlayerREF) <3 && FollowerActor.GetRelationshipRank(PlayerREF) >= 0 FollowerActor.SetRelationshipRank(PlayerREF, 3) EndIf FollowerActor.SetPlayerTeammate() FollowerAlias.ForceRefTo(FollowerActor) FollowerActor.EvaluatePackage() FollowerRecruited.SetValue(1)EndFunction Function FollowerWait() actor FollowerActor = FollowerAlias.GetActorRef() as Actor FollowerActor.SetActorValue("WaitingForPlayer", 1) SetObjectiveDisplayed(10, abforce = true)EndFunction Function FollowerFollow() actor FollowerActor = FollowerAlias.GetActorRef() as Actor FollowerActor.SetActorValue("WaitingForPlayer", 0) SetObjectiveDisplayed(10, abdisplayed = false) FollowerActor.EvaluatePackage()EndFunction Function DismissFollower(Int iMessage = 0, Int iSayLine = 1) If FollowerAlias && FollowerAlias.GetActorReference().IsDead() == False If iMessage == 0 FollowerDismissMessage.Show() ElseIf iMessage == 1 FollowerDismissMessageWedding.Show() ElseIf iMessage == 2 FollowerDismissMessageCompanions.Show() ElseIf iMessage == 3 FollowerDismissMessageCompanionsMale.Show() ElseIf iMessage == 4 FollowerDismissMessageCompanionsFemale.Show() ElseIf iMessage == 5 FollowerDismissMessageWait.Show() Else FollowerDismissMessage.Show() EndIf actor DismissedFollowerActor = FollowerAlias.GetActorRef() as Actor DismissedFollowerActor.StopCombatAlarm() DismissedFollowerActor.AddToFaction(DismissedFollowerFaction) DismissedFollowerActor.SetPlayerTeammate(false) DismissedFollowerActor.RemoveFromFaction(CurrentHireling) DismissedFollowerActor.SetActorValue("WaitingForPlayer", 0) FollowerRecruited.SetValue(0) HirelingRehireScript.DismissHireling(DismissedFollowerActor.GetActorBase()) If iSayLine == 1 iFollowerDismiss = 1 DismissedFollowerActor.EvaluatePackage() Utility.Wait(2) EndIf FollowerAlias.Clear() iFollowerDismiss = 0 EndIfEndFunction Link to comment Share on other sites More sharing options...
WhiteWolf424242 Posted April 18, 2021 Share Posted April 18, 2021 (edited) I seem to recall Scriptname being the rare exception in Windows that is still case sensitive. So try with correct capital lettering.Your fragment script should read: Form BP = (GetOwningQuest() as _DOM_DominiqueController).BrowniePoint ObjectReference DGC = (GetOwningQuest() as _DOM_DominiqueController).DomGiftChest ... Also note that the type of BrowniePoint is MiscObject on your quest script but Form on your fragment. This is not necessarily a problem, but it is if you want to use functions that are specific to MiscObjects and not available to just a Form. I suggest to keep it consistent and use MiscObject = (GetOwningQuest() as _DOM_DominiqueController).BrowniePoint instead. Edited April 18, 2021 by WhiteWolf424242 Link to comment Share on other sites More sharing options...
Dahveed Posted April 18, 2021 Author Share Posted April 18, 2021 However, the script is capitalized and everything in the code is also capitalized properly. Only the errors put it in lower case. Also, the errors it throws me have nothing to do with the references and such, but all with the scripts/quests.... Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 18, 2021 Share Posted April 18, 2021 Sometimes Papyrus doesn't like the nesting, so let us try a different approach: Quest myQuest = GetOwningQuest() ;get the topic info's quest _DOM_DominiqueController DOM_DC = myQuest as _DOM_DominiqueController ;cast the quest into the script ObjectReference DGC = DOM_DC.DomGiftChest ;pull the propertyMake sure the _DOM_DominiqueController.psc file is available for the compiler to locate. Link to comment Share on other sites More sharing options...
Dahveed Posted April 19, 2021 Author Share Posted April 19, 2021 Alright, I give up. I'm just going to make new properties for every fragment. This the the script compiles, but in-game the items won't be moved to the chest. I declared a new property (in the add property button for the fragment) as HBMead, it's a honningbrew mead potion. I then copied your code and put in my quest name so it looks like this: Quest _DOM_DominiqueRecruitQuest = GetOwningQuest() ;get the topic info's quest _DOM_DominiqueController DOM_DC = _DOM_DominiqueRecruitQuest as _DOM_DominiqueController ;cast the quest into the script ObjectReference DGC = DOM_DC.DomGiftChest ;pull the property MiscObject BP = DOM_DC.BrowniePoint DGC.AddItem(BP,1) Game.GetPlayer().removeitem(HBMeadGift,1) DGC.Additem(HBMeadGift,1) So it's supposed to remove a mead from my player, add 1 mead to the chest, and add 1 brownie point to the chest. It compiled, and the final form of the script (when I edit source) looks like this: ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 2Scriptname _DOM_TIF__060DFDE9 Extends TopicInfo Hidden;BEGIN FRAGMENT Fragment_1Function Fragment_1(ObjectReference akSpeakerRef)Actor akSpeaker = akSpeakerRef as Actor;BEGIN CODEQuest _DOM_DominiqueRecruitQuest = GetOwningQuest() ;get the topic info's quest_DOM_DominiqueController DOM_DC = _DOM_DominiqueRecruitQuest as _DOM_DominiqueController ;cast the quest into the scriptObjectReference DGC = DOM_DC.DomGiftChest ;pull the propertyMiscObject BP = DOM_DC.BrowniePointDGC.AddItem(BP,1)Game.GetPlayer().removeitem(HBMeadGift,1)DGC.Additem(HBMeadGift,1);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentPotion Property HBMeadGift Auto The BrowniePoint and DomGiftChest properties were defined in the main script (in the scripts tab of my follower quest).the HBMeadGift was declared in the properties of the script fragment. The dialogue works in game, the mead is removed from the player, but nothing is added to the chest. I really appreciate all your help, but the whole point of this workaround was to save time... But it's just costing me more time in the long run :/ I do feel like I am (slowly!) learning some things though, so I appreciate your help nonetheless! Thank you! Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 19, 2021 Share Posted April 19, 2021 If you are going to remove something from the player and put it into a container, you can condense it into a single line. Valid code just change what you need for the situation: PlayerRef.RemoveItem(myObject,Quantity,true,TargetContainer)Are you testing on a new game? Some of these script changes might not reflect if the quest is already active in your save file. Link to comment Share on other sites More sharing options...
Dahveed Posted April 19, 2021 Author Share Posted April 19, 2021 Yes and no... I have a new character set up standing right next to my follower before I recruit her. The dialogue for gifts I have set up is at the same level as the "follow me" line, it's not necessary for her to be a follower to select it. Link to comment Share on other sites More sharing options...
Recommended Posts