YN090-空手抓蜜蜂、杀人蜂、蝴蝶、萤火虫(用橙色护身符可以快速吸取)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 九十.空手抓蜜蜂、杀人蜂、蝴蝶、萤火虫(用橙色护身符可以快速吸取) 1.空手抓蜜蜂、杀人蜂:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/bee.lua文件,将inst.components.inventoryitem.canbepickedup = false替换为inst.components.inventoryitem.canbepickedup = true 2.空手抓蝴蝶:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/butterfly.lua文件,将inst.components.inventoryitem.canbepickedup = false替换为inst.components.inventoryitem.canbepickedup = true 3.空手抓萤火虫:用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/fireflies.lua文件,将共2句inst.components.inventoryitem.canbepickedup = false均替换为inst.components.inventoryitem.canbepickedup = true 即可空手抓蜜蜂、杀人蜂、蝴蝶、萤火虫,也可以用橙色护身符快速吸取

2025/04/23 · Bny

YN091-快速找到牛(牛在地图上显示)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 九十一.快速找到牛(牛在地图上显示) 用MT管理器打开游戏目录/assets/scripts/prefabs/beefalo.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon( "beemine.png" ) 即可在地图上看到牛的位置,显示为炸弹图标,因为你不知道它什么时候会发狂

2025/04/23 · Bny

YN092-牛产便便速度增加1倍

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 九十二.牛产便便速度增加1倍 用MT管理器打开游戏目录/assets/scripts/prefabs/beefalo.lua文件,将inst.components.periodicspawner:SetRandomTimes(40, 60)替换为inst.components.periodicspawner:SetRandomTimes(20, 30) 即可让牛产便便速度增加1倍,约20至30秒产一次。牛的附近如果有便便,就不会再拉了,要勤捡起哦

2025/04/23 · Bny

YN093-喂牛蔬菜无限产黄油

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 九十三.喂牛蔬菜无限产黄油 用MT管理器打开游戏目录/assets/scripts/prefabs/beefalo.lua文件,在inst.components.eater:SetVegetarian()的下一行插入以下内容: local function OnGetItemFromPlayer(inst, giver, item) if item.components.edible.foodtype == "VEGGIE" then SpawnPrefab("butter").Transform:SetPosition(inst.Transform:GetWorldPosition()) end end inst:AddComponent("trader") inst.components.trader.onaccept = OnGetItemFromPlayer 即可喂牛胡罗卜、浆果等蔬菜无限产黄油,相当于挤牛奶

2025/04/23 · Bny

YN094-牛醒着也可剪牛毛

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 九十四.牛醒着也可剪牛毛 用MT管理器打开游戏目录/assets/scripts/prefabs/beefalo文件,将下列内容: inst.components.beard.canshavetest = function() if not inst.components.sleeper:IsAsleep() then return false, "AWAKEBEEFALO" end return true end 替换为: inst.components.beard.canshavetest = function() if not inst.components.sleeper:IsAsleep() then return true, "AWAKEBEEFALO" end return true end 即可在牛醒着时也可剪牛毛

2025/04/23 · Bny

YN095-游牧生涯(带牛毛帽让牛群跟随,牛不集体攻击主角)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 九十五.游牧生涯(带牛毛帽让牛群跟随,牛不集体攻击主角) 1.用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/hats.lua文件,将下列内容: local function beefalo_equip(inst, owner) onequip(inst, owner) owner:AddTag("beefalo") end local function beefalo_unequip(inst, owner) onunequip(inst, owner) owner:RemoveTag("beefalo") end local function beefalo() local inst = simple() inst.components.equippable:SetOnEquip( beefalo_equip ) inst.components.equippable:SetOnUnequip( beefalo_unequip ) inst:AddComponent("insulator") inst.components.insulator:SetInsulation(TUNING.INSULATION_LARGE) inst:AddComponent("waterproofer") inst.components.waterproofer:SetEffectiveness(TUNING.WATERPROOFNESS_SMALL) inst:AddComponent("fueled") inst.components.fueled.fueltype = "USAGE" inst.components.fueled:InitializeFuelLevel(TUNING.BEEFALOHAT_PERISHTIME) inst.components.fueled:SetDepletedFn(generic_perish) return inst end 替换为: local function beefalo_disable(inst) if inst.updatetask then inst.updatetask:Cancel() inst.updatetask = nil end local owner = inst.components.inventoryitem and inst.components.inventoryitem.owner owner.components.leader:RemoveFollowersByTag("beefalo") end local function beefalo_update(inst) local owner = inst.components.inventoryitem and inst.components.inventoryitem.owner if owner and owner.components.leader then local x,y,z = owner.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x,y,z, TUNING.SPIDERHAT_RANGE, {"beefalo"}) for k,v in pairs(ents) do if v.components.follower and not v.components.follower.leader and not owner.components.leader:IsFollower(v) and owner.components.leader.numfollowers < 50 then owner.components.leader:AddFollower(v) end end end end local function beefalo_enable(inst) inst.updatetask = inst:DoPeriodicTask(0.5, beefalo_update, 1) end local function beefalo_equip(inst, owner) onequip(inst, owner) beefalo_enable(inst) owner:AddTag("beefalo") end local function beefalo_unequip(inst, owner) onunequip(inst, owner) beefalo_disable(inst) owner:RemoveTag("beefalo") end local function beefalo_perish(inst) beefalo_disable(inst) inst:Remove() end local function beefalo() local inst = simple() inst.components.equippable:SetOnEquip( beefalo_equip ) inst.components.equippable:SetOnUnequip( beefalo_unequip ) inst:AddComponent("insulator") inst.components.insulator.insulation = TUNING.INSULATION_LARGE inst:AddComponent("waterproofer") inst.components.waterproofer:SetEffectiveness(TUNING.WATERPROOFNESS_SMALL) inst:AddComponent("fueled") inst.components.fueled.fueltype = "USAGE" inst.components.fueled:InitializeFuelLevel(TUNING.BEEFALOHAT_PERISHTIME) inst.components.fueled:SetDepletedFn(beefalo_perish) return inst end 2.用MT管理器打开游戏目录/assets/scripts/prefabs/beefalo.lua文件,将return not guy:HasTag("beefalo") and替换为return not guy:HasTag("beefalo") and not guy:HasTag("player") and 3.将return dude:HasTag("beefalo") and not dude:HasTag("player") and not dude.components.health:IsDead()替换为return dude:HasTag("beefalo") and dude:HasTag("player") and not dude.components.health:IsDead() 4.将inst.components.locomotor.walkspeed = 1.5替换为inst.components.locomotor.walkspeed = 3 即可带牛毛帽让牛群跟随,杀牛它们不会集体反击,也提高了牛走路的速度。加上“牛产便便速度增加1倍”、“喂牛蔬菜无限产黄油”、“牛醒着也可剪牛毛”的修改(见本修改技巧),就可以烧着便便取暖,吃牛肉、黄油,经营自己的牛群吧

2025/04/23 · Bny

YN096-养殖牛(用牛毛种小牛)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 九十六.养殖牛(用牛毛种小牛) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/beefalowool.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function OnDeploy (inst, pt) SpawnPrefab("babybeefalo").Transform:SetPosition(pt.x, pt.y, pt.z) inst.components.stackable:Get():Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy 即可用牛毛种小牛,人工繁育自己的牛群

2025/04/23 · Bny

YN097-养殖兔子(用兔子种兔子洞、兔子可堆叠)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 九十七.养殖兔子(用兔子种兔子洞、兔子可堆叠) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/rabbit.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function OnDeploy (inst, pt) SpawnPrefab("rabbithole").Transform:SetPosition(pt.x, pt.y, pt.z) inst.components.stackable:Get():Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy inst:AddComponent("stackable") inst.components.stackable.maxsize = TUNING.STACK_SIZE_LARGEITEM 即可种兔子得兔子洞、兔子可堆叠

2025/04/23 · Bny

YN098-养殖火鸡(用鸡蛋种会下蛋且不用圈养的火鸡)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 九十八.养殖火鸡(用鸡蛋种会下蛋且不用圈养的火鸡) 1.用MT管理器打开游戏目录/assets/DLC0002/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.用MT管理器打开游戏目录/assets/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.用MT管理器打开游戏目录/assets/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), 即可用鸡蛋种会下蛋且不用圈养的火鸡,火鸡不会乱跑,养在果树丛旁也不会消失,一天左右下一个蛋

2025/04/23 · Bny

YN099-养殖大象(用兔人尾巴种大象)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 九十九.养殖大象(用兔人尾巴种大象) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/manrabbit_tail.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function OnDeploy (inst, pt) local names = {"koalefant_summer","koalefant_winter"} inst.name = names[math.random(#names)] SpawnPrefab(inst.name).Transform:SetPosition(pt.x, pt.y, pt.z) inst.components.stackable:Get():Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy 即可用兔人尾巴种大象,品种随机,可能是冬象、也可能是夏象

2025/04/23 · Bny