mastahbossu Posted November 23, 2017 Share Posted November 23, 2017 I want to improve the scripting in my Simple DLC Delay mod and I'm curious about functions and conditions etc. to avoid using in a script that is constantly running to improve performance. For example in the upcoming version I have switched from GetInGrid to GetMapMarkerVisible for when the player is near the entrances to the DLC areas and so forth, which I assume i much less taxing on the CPU. The ones I'm more curious about however are GetInWorldSpace, GetQuestCompleted and calling local variables assigned in Quest scripts from other scripts.. is there anything I should worry about with these? Thanks! Link to comment Share on other sites More sharing options...
Mktavish Posted November 23, 2017 Share Posted November 23, 2017 (edited) Switching to using a primitive trigger box / plane ... would keep it from always checking the player position / view to said map marker. With a script like this ... ~~~~~~~~~~~~~~ Begin OnTriggerEnter Player StartQuest ; enable dlc ??? However you are delaying the dlc ? DisableMarkForDelete End~~~~~~~~~~~~~ Of course you would probably have to surround an area with a bunch of long thin triggers ... Which could be refs of 1 base-ID with all using the same script.But after 1 gets disable , marked for delete. Would have to disable the others for that map marker surround. Which I guess the easiest is to name the refs , and call them all in the same script. Edited November 23, 2017 by Mktavish Link to comment Share on other sites More sharing options...
mastahbossu Posted November 28, 2017 Author Share Posted November 28, 2017 Thanks for your input, I have removed some of the functionality that impacts performance the most at this point. Link to comment Share on other sites More sharing options...
Mktavish Posted November 30, 2017 Share Posted November 30, 2017 I'm sorry ... not sure what you mean ? You mean you tried the trigger surround , and you noticed a performance increase ? Link to comment Share on other sites More sharing options...
truestiven Posted December 3, 2017 Share Posted December 3, 2017 I assume i much less taxing on the CPU.I doubt that most of users scripts would have any noticeable impact on performance, since most scripts in one or another way working in game "thicks", and have priority optimization inside game engine. In fact many of vanilla script in f3 and NV, in always on mode. Ofc it is possible to break the game with one simple script and there some problems which must to be avoided. But for the most part you probably safe with how your scripts are atm. Link to comment Share on other sites More sharing options...
Mktavish Posted December 3, 2017 Share Posted December 3, 2017 Well there is a difference between "GetInGrid" banging away with the gamemode block.And "GetMapMarkerVisible " But my point was to take away that script ... piling on to the always running even the simple map marker check. To a 1 time event upon situational happening. It really depends on how many of those you have going ... 1 doesn't make a difference ... but 20 of them does.And considering a long list of mods ... it helps to cut the cpu cycles when you can. Link to comment Share on other sites More sharing options...
Recommended Posts