饥荒 MOD方法全开地图
看到很多人要求地图全开MOD,分享一个方法,理论全版通用,至少适用于4.10开始后的中英文版。
在游戏中找到main.lua文件,地址在dont_starvedatascripts,打开记事本,拖到最后一行(即ModManager):LoadMods()——添加以下代码以保存此行前),进入游戏后ctrl 1地图全开,ctrl 2瞬间移动到鼠标所在位置。建议在修改前保存原始文件!!!
--地图全开
TheInput:AddKeyUpHandler(KEY_1, function()
if TheInput:IsKeyDown(KEY_CTRL) then
local MainCharacter = TheSim:FindFirstEntityWithTag("player")
local map = TheSim:FindFirstEntityWithTag("minimap")
if MainCharacter and map then
local x, y, z = MainCharacter.Transform:GetWorldPosition()
map.MiniMap:ShowArea(x, y, z, 10000)
end
end
end
);
--传送
TheInput:AddKeyUpHandler(KEY_2, function()
if TheInput:IsKeyDown(KEY_CTRL) then
local player = TheSim:FindFirstEntityWithTag("player");
player.Transform:SetPosition(TheInput:GetMouseWorldPos():Get())
end
end
)
修改后的4.24收藏版main文件:点击进入