第98页:养殖火鸡
展开九十八.养殖火鸡(用鸡蛋种会下蛋且不用圈养的火鸡)
1.用记事本打开游戏目录\data\DLC0001\scripts\prefabs\egg.lua文件,在inst.components.cookable.product = "bird_egg_cooked"的下一行插入以下内容:
local function OnDeploy (inst, pt)
SpawnPrefab("perd").Transform:SetPosition(pt.x, pt.y, pt.z)
inst.components.stackable:Get():Remove()
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
2.用记事本打开游戏目录\data\scripts\prefabs\perd.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
inst:AddComponent("periodicspawner")
inst.components.periodicspawner:SetPrefab("bird_egg")
inst.components.periodicspawner:SetRandomTimes(360, 480)
inst.components.periodicspawner:Start()
3.用记事本打开游戏目录\data\scripts\brains\perdbrain.lua文件,将下列内容:
WhileNode(function() return clock and not clock:IsDay() end, "IsNight",
DoAction(self.inst, GoHomeAction, "Go Home", true )),
DoAction(self.inst, EatFoodAction, "Eat Food"),
RunAway(self.inst, "scarytoprey", SEE_PLAYER_DIST, STOP_RUN_DIST),
DoAction(self.inst, PickBerriesAction, "Pick Berries", true),
Wander(self.inst, HomePos, MAX_WANDER_DIST),
替换为:
DoAction(self.inst, EatFoodAction, "Eat Food"),
RunAway(self.inst, "scarytoprey", SEE_PLAYER_DIST/2.5, STOP_RUN_DIST/3),
即可用鸡蛋种会下蛋且不用圈养的火鸡,火鸡不会乱跑,养在果树丛旁也不会消失,一天左右下一个蛋
更多相关内容请关注:饥荒专区
责任编辑:Shy夏夏