FrankFamily Posted April 26, 2016 Share Posted April 26, 2016 (edited) Damn nexus erased my post... I need to set specific default values for a long (+50 elements) int array, options: A) set them in ck, painful, tedious and not reusable. I'd prefer to have that done within the script and reduce the amount of time setting it up each time. B) Massive on init block: Array[0] = 45 Array[1] = 342 ... Array[50] = 32I wish this would work, like in java: int[] num = {1,2,3,4,5};Or that you could cast string to array same way you cast array to string and it outputs something like: [0, 23, 454, 1345 ,352]So, question, would the massive on init block cause a noticiable performance impact when compared to setting then in ck? Any other/better way to approach this? Edited April 26, 2016 by FrankFamily Link to comment Share on other sites More sharing options...
DavidJCobb Posted April 27, 2016 Share Posted April 27, 2016 (edited) I think there'd be a performance hit, but I don't think it'd be that significant. That said, anything that tries to touch your script (e.g. accessing properties) will be forced to wait until the OnInit call stack (that is, OnInit and called during OnInit) has finished executing. EDIT: I have TES5Edit scripts for setting up Papyrus properties in bulk. One of them allows you to enter an Int array as a comma-separated list. The "Skyrim - Papyrus Resource Library" and "CobbTES5EditUtil" scripts are libraries that the other scripts rely on, so be sure to install them alongside whatever specific ones you need. Edited April 27, 2016 by DavidJCobb Link to comment Share on other sites More sharing options...
FrankFamily Posted April 27, 2016 Author Share Posted April 27, 2016 That script sounds like exactly what i need, thanks! :) Link to comment Share on other sites More sharing options...
Recommended Posts