時間:2021-08-23 10:45:14 來源:當游網(wǎng) 作者:當游網(wǎng) 編輯:ryu112358 字體大小:
在游戲中人口和軍隊是非常重要的,而且可以通過一些修改快速刷出來,那么世嘉人類怎么快速刷人口軍隊呢?還不知道的玩家快來看小編帶來的詳細方法介紹吧。
dnspy打開Amplitude.Mercury.firstpass.dll
找到Amplitude.Mercury.Simulation包下的DepartmentOfIndustry類
找這個方法private void ProcessOrderBuyoutConstructionAt(OrderBuyoutConstructionAt order)
其中有一行是this.majorEmpire.DepartmentOfTheTreasury.Pay(buyoutCost);
括號里給它改成this.majorEmpire.DepartmentOfTheTreasury.Pay(FixedPoint.Zero);
具體改法就是右鍵編輯IL指令(因為反編譯會因為引用外部dll無法再次編譯,為了省事直接干IL)
找到調(diào)用Pay的這句:
26 004E callvirt instance void Amplitude.Mercury.Simulation.DepartmentOfTheTreasury::Pay(valuetype [Amplitude.Framework]Amplitude.FixedPoint)
然后找它前面一句,就是加載buyoutCost的那句,應該是ldloc.3,如果不是就看看前面的一個函數(shù)GetBuyoutCost之后存到第幾個位置了,應該有一句stloc.3和這個ldloc.3是對著的先存后讀的。
把ldloc.3給改成
25 0049 ldsfld valuetype [Amplitude.Framework]Amplitude.FixedPoint [Amplitude.Framework]Amplitude.FixedPoint::Zero
就是加載了一個FixedPoint.Zero這個靜態(tài)變量。如果怕寫錯就找一下這個變量,然后查它的引用,找一行讀取的IL指令復制過來,我就是這么搞的。
保存進游戲,造個建筑,用金幣直接買,然后金幣不減少,修改成功。
再來一個,解散部隊返還人口數(shù)量5倍。結(jié)合上面的免費金幣雇傭就可以原地一回合炒人口/軍隊了
namespace Amplitude.Mercury.Simulation
internal class DepartmentOfDefense : Agency, ISerializable
private void ProcessOrderDisbandUnits(OrderDisbandUnits order)
這句
population = unit.UnitDefinition.PopulationInstantCostDefinition.Constant;
進IL編輯,找到這句
67 00CF ldfld int32 [Amplitude.Mercury.Data]Amplitude.Mercury.Data.Simulation.Costs.PopulationInstantCostDefinition::Constant
后面加兩行
ldc.i4.5
mul
改好變成這樣
population = unit.UnitDefinition.PopulationInstantCostDefinition.Constant * 5;
以上就是今天為大家?guī)硎兰稳祟愒趺纯焖偎⑷丝谲婈牭娜績?nèi)容,希望對大家有所幫助,更多的內(nèi)容請持續(xù)關(guān)注當游網(wǎng),為你帶來最新最全的游戲相關(guān)內(nèi)容。
0