十倍修改房间声望
在 GameAlgorithms里
// Token: 0x06001281 RID: 4737
public static RoomPrestige CalculateRoomPrestige(FloorPlan floorPlan)
{
int num = 0;
float num2 = 0f;
float progress = 0f;
RoomPrestigeLevel roomPrestigeLevel = GameAlgorithms._config.RoomPrestigeLevels[num];
if (floorPlan != null)
{
float num3 = 0f;
float num4 = GameAlgorithms.CalculateRoomTilePrestige(floorPlan);
foreach (RoomItem roomItem in floorPlan.Items)
{
num3 += roomItem.Prestige * 10f;
}
num2 = num3 + num4;
for (int i = 0; i < GameAlgorithms._config.RoomPrestigeLevels.Length; i++)
{
RoomPrestigeLevel roomPrestigeLevel2 = GameAlgorithms._config.RoomPrestigeLevels[i];
if (num2 >= (float)roomPrestigeLevel2.Points)
{
num = i;
roomPrestigeLevel = roomPrestigeLevel2;
}
}
if (num == GameAlgorithms._config.RoomPrestigeLevels.Length - 1)
{
progress = 0f;
}
else
{
float num7 = (float)GameAlgorithms._config.RoomPrestigeLevels[num + 1.Points;
int num5 = (roomPrestigeLevel == null) ? 0 : roomPrestigeLevel.Points;
float num6 = num7 - (float)num5;
progress = (num2 - (float)num5) / num6;
}
}
return new RoomPrestige
{
Level = num + 1,
Points = num2,
Progress = progress,
Data = roomPrestigeLevel
};
}
修改加红部分,*10f则十倍增长,随便放点就五级了
感谢分享!!!大赞 666666666666666 谢谢分享 太感谢了 需要这修改很久了 谢谢分享~~~~!
66666666666666666 快来看你们要的金星奖修改 红字部分的*两侧有空格吗? 找不到4737啊 树下猫头鹰 发表于 2018-9-17 11:23
找不到4737啊
找到4754
sephiroth2012 发表于 2018-9-17 11:09
红字部分的*两侧有空格吗?
有没有都行
会自动补全
树下猫头鹰 发表于 2018-9-17 11:23
找不到4737啊
为什么不直接搜索函数名CalculateRoomPrestige呢
修改不成功,添加*10f以后,就提示有别的函数冲突还是怎么的 在 GameAlgorithms的calculateroomprestige里面 gfseed2 发表于 2018-9-18 07:51
GameAlgorithms是游戏那个文件?我没找到
这个是需要用DNSPY软件来编辑文件的。:\Steam\SteamApps\common\TPH\TPH_Data\Managed
用DNSPY打开Assembly-CSharp.dll文件,进行编辑
求教,我只会用IL改数字,但是增加,减少,好像得用 编辑方法 和 编辑类 的选项,但是我进去改了以后,没有确定,只有个编辑,一点编辑很多错误,然后反正保存不了。
求解,感谢
这段代码居然是用Java写的 高手教教怎样加上*10f这个字段 dwdwdwqq 发表于 2021-10-8 13:25
高手教教怎样加上*10f这个字段
搜索CalculateRoomPrestige-右键num3 += roomItem.Prestige后面的Prestige编辑方法加入 * 10f;
页:
[1]