ylenard Posted May 1, 2020 Posted May 1, 2020 Hi, During the creation of my new mod I encountered an issue I have no idea how to solve. In my new mod I'm trying to create an optional connection to the "Wasteland Stress.esp" mod, but I can't find a method to get or set it's quest variables. Here is what I have so far: if IsModLoaded "Wasteland Stress.esp" set rStressQuest to GetFormFromMod "Wasteland Stress.esp" "0AE4" if eval !(IsFormValid rStressQuest) set iStressLoaded to 0 elseif GetType rStressQuest != 71 set iStressLoaded to 0 else set iStressLoaded to 1 endif endif Ok, so far so good. I get a reference to the "StressQuest" quest from the "Wasteland Stress.esp" mod and confirm that it's valid and of the correct type. The problem is, that I can't seem to access it's variables in any way. rStressQuest.Stress GetQuestVariable rStressQuest "Stress" Both do not work. The compiler won't accept them. I also tried GetVariable, but apparently the reference rStressQuest has no variables at all. I also tried referencing it's quest script directly to no avail. Is there some other way this can be acomplished, or is it simply not possible? I'd really appreciate any help. ?
Guest Posted May 1, 2020 Posted May 1, 2020 Try this: GetVariable "Stress" rStressQuest EDIT: of course I'm assuming the rest is correct, that part is more important, I'd try to be twice sure i.e. some GetQuestRunning rStressQuest should return 1 etc.
ylenard Posted May 2, 2020 Author Posted May 2, 2020 7 hours ago, A.J. said: Try this: GetVariable "Stress" rStressQuest EDIT: of course I'm assuming the rest is correct, that part is more important, I'd try to be twice sure i.e. some GetQuestRunning rStressQuest should return 1 etc. Holy crap! It worked! Thank you! But why? Arent the two forms equivalent?
Guest Posted May 2, 2020 Posted May 2, 2020 GetQuestVariable should be only for conditions (i.e. AI package etc.), GetVariable is the NVSE function for scripting
ylenard Posted May 4, 2020 Author Posted May 4, 2020 On 5/2/2020 at 10:30 PM, A.J. said: GetQuestVariable should be only for conditions (i.e. AI package etc.), GetVariable is the NVSE function for scripting Thanks, but I meant the difference between "reference.GetVariable variableName" and "GetVariable variableName reference".
Guest Posted May 4, 2020 Posted May 4, 2020 9 hours ago, ylenard said: Thanks, but I meant the difference between "reference.GetVariable variableName" and "GetVariable variableName reference". REF.FUNCTION is the usual syntax, but for some rare cases it doesn't work and it's just a matter of trials and tests until you figure it. In this case I knew it because I already used it in some mods to make soft dependencies.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.