Elin
50 betyg
Optimization for too many characters on the same map
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
System: Utility
Filstorlek
Lades upp
Uppdaterades
81.061 KB
23 feb @ 3:12
27 feb @ 20:44
4 ändringsnotiser ( visa )

Abonnera för att ladda ner
Optimization for too many characters on the same map

Beskrivning
When there are a large number of characters (over 1000) on the same map, Elin will experience serious CPU performance issues, leading to lag.

This mod is designed for the longest running Chara.FindNewEnemy() func.
1. Replace ToEnum() called by this function with switch which takes less time.
2. When the number of characters exceeds 200, enable a faster optimization. The general idea is to write characters that may be hostile to a specific faction into a bucket. When calling Chara.FindNewEnemy(), directly traverse the buckets of a specific faction to avoid traversing all characters every time. If the vast majority of characters in the map are allies of the player, there should be a significant optimization effect.

https://github.com/105gun/ElinOptimization
10 kommentarer
707120257 15 okt @ 20:46 
很好用 但是有一种情况还是卡 就是分裂怪剪毛农场+养殖大量其他牲口 (乌龟) 不知道如何解决
西兰°雨入 9 jul @ 4:46 
此mod可能会导致频繁闪退,有时候玩5分钟就闪退了,卸掉之后正常了,玩一整天都没闪退,【NullReferenceException: Object reference not set to an instance of an object
at DG.Tweening.Core.TweenManager.Update (DG.Tweening.Tween t, System.Single deltaTime, System.Single independentTime, System.Boolean isSingleTweenManualUpdate) [0x001b0] in <fcc0bbf6bf4e430c91d4aa05736fc5c6>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.<>c:<RegisterUECatcher>b__0_0(Object, UnhandledExceptionEventArgs)】
Tangent Logic 28 feb @ 22:45 
Its still somewhat buggy. Ran up gains a random [Stalker] and my oarty refused to engage. I would fire spells at it, and it would move one square towards me, then forget. I did have an ally aggro and it was killed by it, but the other allies 2 squares away just stared doing nothing. Confirm not fixed just yet.
Skyfall Terminus 28 feb @ 20:45 
confirm fixed, thanks a lot :LetiHeart:
105gun  [skapare] 28 feb @ 20:35 
@Skyfall Terminus
Sorry about this, but it should be fixed in the last update (which was uploaded about 24hrs ago). maybe your steam didnt get that update. Try to stop subscribe and re-subscribe this mod and check whether the bug still exists.
Skyfall Terminus 28 feb @ 8:43 
somehow made monster stop aggro at player entirely :demoneye:
kinino 23 feb @ 20:38 
想和作者约会,有途径吗
kinino 23 feb @ 20:32 
作者你是我的神
DK 23 feb @ 11:22 
:yoohoo:
105gun  [skapare] 23 feb @ 3:37 
我是看了其他人的聊天记录才想着搞优化的。但我本人没有大后期的存档,用测试工具模拟出的场景可能不太符合实际情况。所以,如果你觉得打了我这个mod还是卡,或者你有其他的场景想让我看看能不能优化一下,可以把卡顿前的存档发给我,告诉我要怎么复现。