anjenthedog Posted August 12, 2022 Share Posted August 12, 2022 Anyone have anything to offer on these two beyond the brief descriptions found in the Tweaks.ini file? Are these encountered in mod code with any frequency? (ie is setting them true of any potential benefit in reality) PS> Yes, aware they're in the "experimental" section and default to an OFF (safe) state. I'm all for experimenting, but I have no clear indication of what they might do, beyond sounding like some form of optimization=, so an experiment with an entirely unknown outcome isn't an experiment, it's just walking around in the dark bumping into things. It implies optimization, but it also implies a potential for some sort of destabilization. both unknown to me at present. And ftr, I have done a search on the widenet with no results beyond the same blurbs from the ini file PPS> no offense to the author. I understand why descriptions in code comments are short. They're simply mnemonics for the devs who wrote them and others intimate with their code. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 12, 2022 Share Posted August 12, 2022 Only reason to decouple from the framerate would be if your looking to speed up the script processing and you've already optimized the script to be as quick as possible. But then that begs the question, what is being done that needs to be sped up that much. Are we so impatient that we cannot wait for the framerate timing? </rhetorical> Usually, RandomInt and RandomFloat are called prior to doing something so that a random value can be used for some purpose. On rare occasions a mod may want to randomize an order of unique items. In that case, RandomInt may be called with the result compared against another list of already used values and if the result has already been used, run RandomInt again and again until an unused value has been reached. The latter case is probably the only situation where decoupling from the framerate would have any noticeable bearing. Now if you are talking about GetRandomInt or GetRandomFloat as mentioned in the description page of powerofthree's Tweaks mod, I have no idea as I have never used it and do not know where to find those functions. One could surmise that they are typos since it does indicate that they are on the Utility script, which is where RandomInt and RandomFloat are located. But without asking powerofthree what is meant, we can only guess... Link to comment Share on other sites More sharing options...
anjenthedog Posted August 12, 2022 Author Share Posted August 12, 2022 Hi Ishara. I see... Ok, so they're usually just called during some declarative or "staging" events (setting the item count for a vendor on cell entrance, loading a chest, etc), which means they're usually encountered only infrequently and on somewhat a singleton basis. Hmm. And RandomFloat I suppose is used much the same, no "realtime" or routine iterative use? (no need I can guess) ah well. Nothing revolutionary. I guess I'll give them a try anyway, since I'm still a curious boy, and every little bit helps, but thanks a bunch for filling in that missing space in my gray stuff, since at least now I know what the heck they are and how they're used. I can always disable them if they misbehave. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 13, 2022 Share Posted August 13, 2022 If you want a usage scenario of the base game's RandomInt function, my RandomMining mod uses it in the modified MineOreScript.psc to obtain the number of ore and / or number of strikes for a given vein at the time of activation / attack. Link to comment Share on other sites More sharing options...
anjenthedog Posted August 13, 2022 Author Share Posted August 13, 2022 Hey Ishara, Thanks for the recommendation. I'll try it after I run with them enabled in the game as is, then install it and compare the difference (if I can... Hmm... Elephants' script tool for a simple script lag metric, right?) Even if it only shaves a few milliseconds, I'll take it. will dial back late tonight or tomorrow with feedback. BTW, Ooh, neat. I've been using vanilla mining since day one. thanks twice for recommendation. ;) Link to comment Share on other sites More sharing options...
anjenthedog Posted August 13, 2022 Author Share Posted August 13, 2022 Well, it turns out I can't really detect any change in performance, whether or not your mod is installed. The settings don't appear to do much of anything, at least in my game. So I'm disabling them again. (nice mining mod btw) Thanks for the help Ishara. Link to comment Share on other sites More sharing options...
Recommended Posts