applesmmmmmmmm Posted January 5, 2019 Share Posted January 5, 2019 A lot of objects have a particular script attached to them. This script needs to have a property set on each of the objects to reference a quest script I made to add an MCM page. Each object is going to reference the same property value, and I was wondering if there is an elegant way of changing a large number of these references at once through some kind of batch edit. I can of course go through one by one and set them, but with the load time of the windows I'd rather not resort to that. I attempted to do batch editing in the Creation Kit by selecting the objects together and pressing "-" to bring up the batch edit window, but it appears those instructions are outdated. I'd appreciate it if anyone can offer advice on how to accomplish this. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted January 5, 2019 Share Posted January 5, 2019 In this case, you do not want to add a property. I needed to do this very thing with my Random Mining MCM mod and rather than creating a property and editing every instance I opted to do the following method. Example speaks the loudest: Add a local variable to reference the script within the empty state abim_RM_MCM_QuestScript MCMScriptWithin the first event ever possible to run on the object define the local variable by using GetFormFromFile to assign the quest and cast it to the quest's script. In my case the event was OnCellAttach MCMScript = (Game.GetFormFromFile(0x00000D62,"Random Mining MCM.esp") as Quest) as abim_RM_MCM_QuestScriptPass whatever property values needed from the MCM script into local variables. Can also call upon functions on the MCM script this way too. Int EV = MCMScript.ExpValue as Int String MS = MCMScript.MSType Link to comment Share on other sites More sharing options...
applesmmmmmmmm Posted January 5, 2019 Author Share Posted January 5, 2019 Great! I was trying to figure out how to do something similar to set a default state for the reference earlier, but that didn't seem possible. Thanks for the quick reply! Link to comment Share on other sites More sharing options...
Recommended Posts