Elin
54 个评价
同地图角色过多优化
   
奖励
收藏
已收藏
取消收藏
System: Utility
文件大小
发表于
更新日期
81.061 KB
2 月 23 日 上午 3:12
2 月 27 日 下午 8:44
4 项改动说明 ( 查看 )

订阅以下载
同地图角色过多优化

描述
同一张地图上存在大量角色时(1000以上),Elin会出现严重的Cpu性能问题,导致卡顿。

这个Mod针对耗时最久的Chara.FindNewEnemy()进行了优化。
1. 将该函数调用到的ToEnum替换为耗时更少的switch版本。
2. 角色数量 > 200时,启用一个更快的优化。大致思路是将可能与特定阵营敌对的角色写入bucket,调用Chara.FindNewEnemy()时直接遍历特定阵营的bucket,避免每次都遍历所有角色。如果地图中的绝大多数角色都是玩家的盟友,则有显著的优化效果。

https://github.com/105gun/ElinOptimization
12 条留言
JOJO 7 小时以前 
错误原文代码 (节选)
该 MOD 错误涉及多个不同的 IL 指令失败。以下是日志中捕捉到的核心错误类型,它们显示了 MOD 试图修改的关键游戏组件:

[ElinOpt][Error] callvirt void Card::ModExp(int ele, int a)
[ElinOpt][Error] ldc.i4.1 NULL
[ElinOpt][Error] stfld int Chara::stealthSeen
[ElinOpt][Error] ldarg.0 NULL
[ElinOpt][Error] callvirt int Chara::get_isAlly()
[ElinOpt][Error] stfld class System.Collections.Generic.Dictionary`2<class Elona.Entity,int32> ...
[ElinOpt][Error] ldfld float Elona.WorldMap::distanceFromPlayer
[ElinOpt][Error] newobj instance void Elona.TargetAction::.ctor(class Elona.Entity,class Elona.Entity,int32,valuetype Elona.TargetType)
JOJO 7 小时以前 
此留言正在等待我们的自动内容检查系统分析。在我们证实其内容无害之前(例如试图窃取信息的钓鱼站点链接),留言将暂时隐藏。
707120257 10 月 15 日 下午 8:46 
很好用 但是有一种情况还是卡 就是分裂怪剪毛农场+养殖大量其他牲口 (乌龟) 不知道如何解决
西兰°雨入 7 月 9 日 上午 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 2 月 28 日 下午 10: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 2 月 28 日 下午 8:45 
confirm fixed, thanks a lot :LetiHeart:
105gun  [作者] 2 月 28 日 下午 8: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 2 月 28 日 上午 8:43 
somehow made monster stop aggro at player entirely :demoneye:
kinino 2 月 23 日 下午 8:38 
想和作者约会,有途径吗
kinino 2 月 23 日 下午 8:32 
作者你是我的神