Roul'Soul 发表于 2024-10-25 18:57

【鼠托邦】dll文件升级经验需求简单修改附文件

版本1.0.0221,大概是这个版本,日期是2024-10-25最新版,大概
没找到啥相关修改的,干脆自己改了下dll里的经验上限,包括1级-10级之后的最大经验值需求,
用dnSpy打开Assembly-CSharp.dll后,找到GameUnit然后Get_PDI_ExpMax部分,可以看到

      int num = 0;
      if (_pdi == PDI.Power)
      {
            num = this.m_Power;
      }
      else if (_pdi == PDI.Dex)
      {
            num = this.m_Dex;
      }
      else if (_pdi == PDI.Int)
      {
            num = this.m_Int;


这些
然后下面的数字才是需要改的限制,

      if (num <= 1)
      {
            return 100;
      }
      if (num <= 2)
      {
            return 200;
      }
      if (num <= 3)
      {
            return 300;
      }
      if (num <= 4)
      {
            return 500;
      }
      if (num <= 5)
      {
            return 800;
      }
      if (num <= 6)
      {
            return 1300;
      }
      if (num <= 7)
      {
            return 2100;
      }
      if (num <= 8)
      {
            return 3400;
      }
      if (num <= 9)
      {
            return 5500;
      }
      if (num <= 10)
      {
            return 8900;
      }
      return 10000;


这里的参数,举例,
if (num <= 1)
      {
            return 100;
      }
就是1级需要100经验,100改成1就是需要1经验,以下类似,
最后一个

      return 10000;是指超过10级后需要多少经验,都可以随意改


顺便附上文件,记得看版本使用,覆盖前记得备份文件
/s/1thIJOCeRtaH0DHbq1g3tfQ?pwd=rx4u 提取码: rx4u

tango222 发表于 2024-10-26 06:01


感谢分享

exgbit 发表于 2024-10-26 07:39

看起来很实用,感谢分享经验修改方法,这样调整经验需求后游戏体验可能会更好。

Roul'Soul 发表于 2024-10-27 16:56

额,发现了一个小问题,移动速度太快的话就会导致ai无法进行工作取物进食等等行为,这个速度大概在5000+或者8000+的速度等级就会达到
通常小老鼠就算再怎么活得久也不会到这种离谱的等级,但是如果进行过脑力劳动的职业智慧提高了就会更加快的升级,而且跃升越快,就能达到这种离谱的属性
解决方法是,我选择了限制一下速度最高等级

找到                GameUnit的UpdatePDI部分,


                                this.m_DexExp -= (float)this.Get_PDI_ExpMax(_pdi);
                                this.m_Dex++;
的下面插上一句

                                if (this.m_Dex >= 1000)
                                {
                                        this.m_Dex = 999;
                                }
这样就会限制速度属性不超过1000
当然也可以自己设定

CC潇湘夜雨 发表于 2024-11-14 13:44

顶一个,很棒。目前在研究研究怎么改鼠鼠天赋。

injune777 发表于 2024-11-19 15:17

本帖最后由 injune777 于 2024-11-20 09:32 编辑

佩服大神 !! 很實用 , 順帶一問 , 您会修改老鼠出生特性组合吗?以及官方调试的补丁现在版本会报错 , 大神您知不知道要怎么修正

Roul'Soul 发表于 2024-11-23 11:21

injune777 发表于 2024-11-19 15:17
佩服大神 !! 很實用 , 順帶一問 , 您会修改老鼠出生特性组合吗?以及官方调试的补丁现在版本会报错 , 大神您 ...

可不是大神,会点皮毛罢了
没试过修改出生特性,主要是不知道他的逻辑函数在哪,找简单的很容易,找不明显的可就烦了
以及,我玩的不是正版,所以不太清楚啥调试补丁

injune777 发表于 2024-11-23 12:12

Roul'Soul 发表于 2024-11-23 11:21
可不是大神,会点皮毛罢了
没试过修改出生特性,主要是不知道他的逻辑函数在哪,找简单的很容易,找不明 ...

大神 我说的官方调试补丁是这个 , 可以叫出方块选单之类的功能https://www.bilibili.com/opus/811946009748832258
装了以后会报错无法存档
11:20:46 -- Version 1.0.0300
11:20:46 -- Loaded Game
11:20:46 -- 번영도 레벨 : 1
11:20:46 -- System : Not Preprocesser UNITY_ANALYTICS
11:20:49 -- GameLevel : 1000
11:20:51 -- is not syncronize : 6951 - 6950
11:20:51 -- is not syncronize : 1540 - 1524
11:20:51 -- is not syncronize : 1026 - 994
11:20:51 -- is not syncronize : 205 - 196
11:20:51 -- is not syncronize : 54 - 42
11:20:51 -- is not syncronize : 227 - 207
11:20:51 -- is not syncronize : 108 - 64
11:20:51 -- is not syncronize : 94 - 56
11:20:51 -- is not syncronize : 92 - 44
11:20:51 -- is not syncronize : 129 - 105
11:20:51 -- is not syncronize : 1653 - 1643
11:20:51 -- is not syncronize : 3031 - 3001
11:20:51 -- is not syncronize : 106 - 103
11:20:51 -- is not syncronize : 198 - 146
11:20:51 -- is not syncronize : 10 - 0
11:20:51 -- is not syncronize : 200 - 98
11:20:51 -- is not syncronize : 744 - 472
11:20:51 -- is not syncronize : 955 - 952
11:20:51 -- is not syncronize : 56 - 52
11:20:51 -- is not syncronize : 1065 - 979
11:20:51 -- is not syncronize : 3901 - 3823
11:20:51 -- is not syncronize : 646 - 622
11:20:51 -- is not syncronize : 91 - 25
11:20:51 -- is not syncronize : 7711 - 7603
11:20:51 -- is not syncronize : 102 - 78
11:20:51 -- is not syncronize : 63 - 53
11:20:51 -- is not syncronize : 132 - 86
11:20:51 -- is not syncronize : 44 - 32
11:20:51 -- is not syncronize : 222 - 176
11:20:51 -- is not syncronize : 323 - 311
11:20:51 -- is not syncronize : 3256 - 3196
11:20:51 -- is not syncronize : 1090 - 1066
11:20:51 -- is not syncronize : 697 - 667
11:20:51 -- is not syncronize : 164 - 132
11:20:51 -- is not syncronize : 10 - 7
11:20:51 -- is not syncronize : 264 - 234
11:20:51 -- is not syncronize : 3120 - 3090
11:20:51 -- is not syncronize : 4478 - 4458
11:20:51 -- is not syncronize : 336 - 330
11:20:51 -- is not syncronize : 316 - 310
11:20:51 -- is not syncronize : 119 - 107
11:20:51 -- is not syncronize : 219 - 203
11:20:51 -- is not syncronize : 204 - 200
11:20:51 -- ##### LedgerSheetManager StockData Syncronized #####
11:20:52 -- 계절 세팅 : Winter
11:20:54 -- LogToPC - (wrapper dynamic-method) PlayDataMgr.DMD<;PlayDataMgr::Save>(PlayDataMgr)
Utility.UI.GameMenuUI.OnSubmitedContentsEvent (Utility.UI.TypeCategoryGameMenu typeGameMenu) (at <cc3459f7049547e8a58dbc18e6f5cbd4>:0)
Utility.UI.GameMenuContentsUI.OnSubmitedEvent (System.Int32 index, Utility.UI.TypeInput typeInput) (at <cc3459f7049547e8a58dbc18e6f5cbd4>:0)
Utility.UI.AbstractLayoutSystem.OnSubmitedEvent (System.Int32 index, Utility.UI.TypeInput typeInput) (at <cc3459f7049547e8a58dbc18e6f5cbd4>:0)
Utility.UI.LayoutUI.OnSubmitedEvent (UnityEngine.EventSystems.ISubmitHandler handler, Utility.UI.TypeInput typeInput) (at <cc3459f7049547e8a58dbc18e6f5cbd4>:0)
Utility.UI.LayoutButtonUI.OnSubmitedEvent (UnityEngine.EventSystems.ISubmitHandler handler, Utility.UI.TypeInput typeInput) (at <cc3459f7049547e8a58dbc18e6f5cbd4>:0)
Utility.UI.LayoutButtonUI.OnSubmit (Utility.UI.TypeInput typeInput) (at <cc3459f7049547e8a58dbc18e6f5cbd4>:0)
Utility.UI.LayoutButtonUI.OnPointerUp (UnityEngine.EventSystems.PointerEventData eventData) (at <cc3459f7049547e8a58dbc18e6f5cbd4>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerUpHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <18ce464614694b54a1d376b31850cf8d>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1 functor) (at <18ce464614694b54a1d376b31850cf8d>:0)
UnityEngine.EventSystems.EventSystem:Update()
: MissingMethodException: Method not found: bool .Building.CanI_Add(TileType)
11:20:56 -- SysMgr - FrameMode : 1


Roul'Soul 发表于 2024-11-23 13:10

injune777 发表于 2024-11-23 12:12
大神 我说的官方调试补丁是这个 , 可以叫出方块选单之类的功能https://www.bilibili.com/opus/8119460097 ...

这个属于外挂型mod,比我的修改运算函数可复杂多了,技术不够我搞不懂的

injune777 发表于 2024-11-23 14:11

Roul'Soul 发表于 2024-11-23 13:10
这个属于外挂型mod,比我的修改运算函数可复杂多了,技术不够我搞不懂的
...

这东西真的难搞 , 我也不懂这些 只是看到他log上面有一行 MissingMethodException: Method not found: bool .Building.CanI_Add(TileType)
想着把那个功能的程式码删掉试试看 , 结果dnspy就报一堆错也不给修改

FuRoCas 发表于 2025-12-4 21:31

这里可以修改人口

GetMaxCitizenCount
        public int GetMaxCitizenCount()
        {
                return this.m_CurPros.Pop * 10 + this.m_CustomPopValue;
        }

红色的*10就是人口上限在原基础上*10
页: [1]
查看完整版本: 【鼠托邦】dll文件升级经验需求简单修改附文件