WhiteWolf424242 Posted April 16, 2021 Share Posted April 16, 2021 No, the property must be on the script that uses it, so on the topic script. It's easy to understand why: let's say your script writes Game.GetPlayer().AddItem( Garnet) How is this script supposed to know what Garnet means? It wasn't declared anywhere. Just because you define it for another script, this script still won't know it. You need to attach the properties to each. Link to comment Share on other sites More sharing options...
Dahveed Posted April 16, 2021 Author Share Posted April 16, 2021 Alright, thanks for the response. A bit of tedium, but nothing I can't handle. As some guy once said on the internet, "it just works!" Thanks again! Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 16, 2021 Share Posted April 16, 2021 Actually, you can put the properties on a single script attached to the same quest. Assume you have a script on the quest holding all the various properties needed throughout all the various topic info fragments. Assume that one of those properties points to a garnet and has been labeled as Garnet. Assume that you have named said quest script "myQuestScript". You can then do the following whenever you need to use that property from the quest script: MiscObject myObject = (GetOwningQuest() as myQuestScript).GarnetOr you can go more generic and pass the property into Form instead of the specific type that the property may be listed as. Form myObject = (GetOwningQuest() as myQuestScript).GarnetYou can then use myObject as a local variable throughout the fragment doing whatever you need (i.e. transferring from the player to the NPC). Link to comment Share on other sites More sharing options...
Dahveed Posted April 16, 2021 Author Share Posted April 16, 2021 @IsharaMeradin Thanks again, but I think my brain is too smol to understand any of that! In my example the two things I'd constantly be reusing would be the container (DomGiftChest) and the "reputation" item I created (I just made a miscobject called _Dom_BrowniePoint), the number of BrowniePoint objects in the chest being the eventual measure of the player's relationship level with the follower. Could the same thing be done? So the line would be like: Form DomGiftChest = (GetOwningQuest() as _DOM_DominiqueRecruitQuest).BrowniePoint Or did I just completely butcher that code (most likely!)? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 17, 2021 Share Posted April 17, 2021 You butchered it. :P On your quest script you would have a property for the chest and a property for the points ObjectReference Property DomGiftChest Auto MiscObject Property _Dom_BrowniePoint AutoThen in your topic info fragments when you need them you can do the following: Form BP = (GetOwningQuest() as _DOM_DominqueRecruitQuest)._Dom_BrowniePoint ObjectReference DGC = (GetOwningQuest() as _DOM_DominiqueRecruitQuest).DomGiftChest Then in that fragment you can do things like: DGC.AddItem(BP,5) ; adds five brownie points to the chest Link to comment Share on other sites More sharing options...
Dahveed Posted April 17, 2021 Author Share Posted April 17, 2021 Okay, so the name of the "BrowniePoint" CK item is _DOM_BrowniePointThe name of the chest is actually _DOM_BrownieCounterChest So in the "scripts" tab of my quest I would add to the main quest script: ObjectReference Property DomGiftChest AutoMiscObject Property BrowniePoint Auto Then in the script fragment box (in the bottom right of each dialogue) I would add: Form BP = (GetOwningQuest() as _DOM_DominqueRecruitQuest).BrowniePointObjectReference DGC = (GetOwningQuest() as _DOM_DominiqueRecruitQuest).DomGiftChest What I don't understand is how the script will know what specific object in the game world needs to be added, and how it will know where the chest is in the game world? Since nothing seems to be pointing to them anywhere, it just seems that I've given arbitrary names that are similar to the actual objects, but not the objects themselves? It seems to me that this script is still not telling the game to put a _DOM_BrowniePoint object into the _DOM_BrowniePointCounter container? Link to comment Share on other sites More sharing options...
Dahveed Posted April 17, 2021 Author Share Posted April 17, 2021 Would I just replace BrowniePoint with _DOM_BrowniePoint, and DomGiftChest with _DOM_BrownieCounterChest in all instances? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 18, 2021 Share Posted April 18, 2021 The properties on the quest script would need to have the correct object data assigned to them. After compiling that script, highlight the script on the quest record and press the properties button. A new window appears that you can use to assign each property the correct object or value. If your property variable has the same name as the Editor ID of the target object then you can press the auto fill button and have it automatically assigned. Link to comment Share on other sites More sharing options...
Dahveed Posted April 18, 2021 Author Share Posted April 18, 2021 Starting 1 compile threads for 1 files...Compiling "_DOM_TIF__060D0ADB"...F:\Skyrim Special Edition\Data\Source\Scripts\temp\_DOM_TIF__060D0ADB.psc(9,28): cannot convert to unknown type _dom_dominquerecruitquestF:\Skyrim Special Edition\Data\Source\Scripts\temp\_DOM_TIF__060D0ADB.psc(9,28): cannot cast a quest to a _dom_dominquerecruitquest, types are incompatibleF:\Skyrim Special Edition\Data\Source\Scripts\temp\_DOM_TIF__060D0ADB.psc(9,58): _dom_dominquerecruitquest is not a known user-defined typeF:\Skyrim Special Edition\Data\Source\Scripts\temp\_DOM_TIF__060D0ADB.psc(10,40): cannot convert to unknown type _dom_dominiquerecruitquestF:\Skyrim Special Edition\Data\Source\Scripts\temp\_DOM_TIF__060D0ADB.psc(10,40): cannot cast a quest to a _dom_dominiquerecruitquest, types are incompatibleF:\Skyrim Special Edition\Data\Source\Scripts\temp\_DOM_TIF__060D0ADB.psc(10,71): _dom_dominiquerecruitquest is not a known user-defined typeNo output generated for _DOM_TIF__060D0ADB, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on _DOM_TIF__060D0ADB Link to comment Share on other sites More sharing options...
Dahveed Posted April 18, 2021 Author Share Posted April 18, 2021 In the scripts tab of my follower quest: ObjectReference Property DomGiftChest Auto MiscObject Property BrowniePoint Auto In the dialogue fragment section (bottom right): Form BP = (GetOwningQuest() as _DOM_DominqueRecruitQuest).BrowniePointObjectReference DGC = (GetOwningQuest() as _DOM_DominiqueRecruitQuest).DomGiftChest DGC.AddItem(BP,5) Then it leads to the errors above. Link to comment Share on other sites More sharing options...
Recommended Posts