Tron91 Posted September 24, 2022 Posted September 24, 2022 I was trying to get the mod Recruit More Blades (Extra Blades) work with EFF, which I managed to do. It was working as intended as I had hoped, but later realized there was an error as the dialogue conditionals were not working as intended. When checked in console, I found that when an script is extended by another script, the variable instance from the parent script are no longer updated and the variable instance in the extended script is updated. Now, the problem is that I can't extract the value of the updated variable via the GetVMQuestVariable function to properly execute the conditional dialogues. This problem can be solved by using a GlobalVariable in the plugin itself. But if there is any other workaround do mention.
traison Posted September 24, 2022 Posted September 24, 2022 (edited) I'm assuming what you mean by variables is fields. A couple of things: The concept of base class fields being somehow separate from those in the derived class makes no sense to me. Papyrus is a weird language sure, but I wouldn't say its that weird. Are you sure you're not re-declaring the same field names in the derived class? That would be something I'd imagine Papyrus allowing, a concept that also doesn't make sense (yes yes shadowing but that's another topic). Generally when it comes to accessing things from outside of scripts I get the feeling properties were meant to be used instead of fields. If the base class was working as is then this doesn't explain your problem, however if there is some weirdness with derived classes, maybe properties behave differently? Are you casting the derived class to its base class before passing it to GetVMQuestVariable? That's also something I'd imagine could be weird in Papyrus. Don't do that unless you have to. Edited September 24, 2022 by traison
Tron91 Posted September 24, 2022 Author Posted September 24, 2022 run "sqv e38c9" in console. You should have EFF installed and brought one of the recruits to Delphine. You can see the two screenies below. the BladesCount_var is different for the two scripts. The EFF script is just extending the other script, which is the quest script.
traison Posted September 24, 2022 Posted September 24, 2022 (edited) Quests can run multiple scripts. They will as far as I know be completely separate instances. To access these instances, cast the quest to either EFF_FreeformSkyHavenTempleAScript or FreeformSkyHavenTempleAScript. How to manage this from conditionals in the CK I do not know. If as you say one script extends the other, then you probably should get rid of the base script instance from the quest entirely. You'd have to redo any property values and perhaps other things but that to me seems like the correct thing to do just in general. Edited September 24, 2022 by traison
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now