YN112-提灯改用木头、树杈、牛粪等可燃物作燃料

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一一二.提灯改用木头、树杈、牛粪等可燃物作燃料 用MT管理器打开游戏目录/assets/scripts/prefabs/mininglantern.lua文件,将inst.components.fueled.fueltype = "CAVE"替换为--inst.components.fueled.fueltype = "CAVE" 即可在提灯没有燃料时,添加木头、树杈、牛粪等可燃物作燃料,不用添加荧光果了

2025/04/23 · Bny

YN113-提灯可以点50天

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一一三.提灯可以点50天 用MT管理器打开游戏目录/assets/DLC0002/scripts/tuning.lua文件, 1.将MED_LARGE_FUEL = seg_time * 3,替换为MED_LARGE_FUEL = total_day_time*50, 2.将LANTERN_LIGHTTIME = (night_time+dusk_time)*2.6,替换为LANTERN_LIGHTTIME = total_day_time*50, 即可使提灯可以点50天。当然改999天也行,只要把两句的50改为999即可

2025/04/23 · Bny

YN114-南瓜灯永不坏(无限使用)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一一四.南瓜灯永不坏(无限使用) 用MT管理器打开游戏目录/assets/scripts/prefabs/pumpkin_lantern.lua文件, 1.将共2句inst.components.perishable:StopPerishing()均替换为--inst.components.perishable:StopPerishing() 2.将下列内容: inst:AddComponent("perishable") inst.components.perishable:SetPerishTime(30*TUNING.SEG_TIME) inst.components.perishable:SetOnPerishFn(onperish) inst.components.inventoryitem:SetOnDroppedFn(function(inst) inst.components.perishable:StartPerishing() 替换为: --inst:AddComponent("perishable") --inst.components.perishable:SetPerishTime(30*TUNING.SEG_TIME) --inst.components.perishable:SetOnPerishFn(onperish) inst.components.inventoryitem:SetOnDroppedFn(function(inst) --inst.components.perishable:StartPerishing() 即可让南瓜灯无限使用

2025/04/23 · Bny

YN115-用硝石种麦斯威尔灯(靠近自动点燃、远离自动灭)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一一五.用硝石种麦斯威尔灯(靠近自动点燃、远离自动灭) 1.用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/nitre.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function OnDeploy (inst, pt) SpawnPrefab("maxwelllight").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/maxwelllight.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function onhammered(inst, worker) SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition()) SpawnPrefab("nitre").Transform:SetPosition(inst.Transform:GetWorldPosition()) inst:Remove() end inst:AddComponent("playerprox") inst.components.playerprox:SetDist(17, 27 ) inst.components.playerprox:SetOnPlayerNear(function() if not inst.components.burnable:IsBurning() then inst.components.burnable:Ignite() end end) inst.components.playerprox:SetOnPlayerFar(extinguish) inst:AddComponent("workable") inst.components.workable:SetWorkAction(ACTIONS.HAMMER) inst.components.workable:SetWorkLeft(1) inst.components.workable:SetOnFinishCallback(onhammered) 3.用MT管理器打开游戏目录/assets/scripts/prefabs/maxwelllight_flame.lua文件,将下列内容: {anim="level1", sound="dontstarve/common/maxlight", radius=1, intensity=.75, falloff= 1, colour = {207/255,234/255,245/255}, soundintensity=.1}, {anim="level2", sound="dontstarve/common/maxlight", radius=1.5, intensity=.8, falloff=.9, colour = {207/255,234/255,245/255}, soundintensity=.3}, {anim="level3", sound="dontstarve/common/maxlight", radius=2, intensity=.8, falloff=.8, colour = {207/255,234/255,245/255}, soundintensity=.6}, {anim="level4", sound="dontstarve/common/maxlight", radius=2.5, intensity=.9, falloff=.7, colour = {207/255,234/255,245/255}, soundintensity=1}, {anim="level1", sound="dontstarve/common/maxlight", radius=2, intensity=.75, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.1}, {anim="level2", sound="dontstarve/common/maxlight", radius=3, intensity=.8, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.3}, {anim="level3", sound="dontstarve/common/maxlight", radius=4, intensity=.8, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.6}, {anim="level4", sound="dontstarve/common/maxlight", radius=6, intensity=.9, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=1}, 替换为: {anim="level1", sound="dontstarve/common/maxlight", radius=5, intensity=.75, falloff= 1, colour = {207/255,234/255,245/255}, soundintensity=.1}, {anim="level2", sound="dontstarve/common/maxlight", radius=7.5, intensity=.8, falloff=.9, colour = {207/255,234/255,245/255}, soundintensity=.3}, {anim="level3", sound="dontstarve/common/maxlight", radius=10, intensity=.8, falloff=.8, colour = {207/255,234/255,245/255}, soundintensity=.6}, {anim="level4", sound="dontstarve/common/maxlight", radius=12.5, intensity=.9, falloff=.7, colour = {207/255,234/255,245/255}, soundintensity=1}, {anim="level1", sound="dontstarve/common/maxlight", radius=10, intensity=.75, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.1}, {anim="level2", sound="dontstarve/common/maxlight", radius=15, intensity=.8, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.3}, {anim="level3", sound="dontstarve/common/maxlight", radius=20, intensity=.8, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=.6}, {anim="level4", sound="dontstarve/common/maxlight", radius=30, intensity=.9, falloff=.4, colour = {207/255,234/255,245/255}, soundintensity=1}, 即可用硝石种麦斯威尔灯,靠近自动点燃、远离自动灭,不想要时用锤子砸毁即可。其中inst.components.playerprox:SetDist(17, 27 )语句中的17为靠近点燃距离,27为远离熄灭距离,可自行调整

2025/04/23 · Bny

YN116-石头营火永不灭

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一一六.石头营火永不灭 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/firepit.lua文件,将if section == 0 then替换为if section < 0 then 即可让石头营火永不灭,但睡觉、下地洞后系统还是会将其熄灭,随便填块燃料即可又保持不灭

2025/04/23 · Bny

YN117-光明世界(地上、洞穴、远古遗址都永无黑暗)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一一七.光明世界(地上、洞穴、远古遗址都永无黑暗) 1.用MT管理器打开游戏目录/assets/DLC0002/scripts/components/clock.lua文件,将下列内容: self.dayColour = Point(255/255, 230/255, 158/255) self.duskColour = Point(100/255, 100/255, 100/255) self.nightColour = Point(0/255, 0/255, 0/255) self.fullMoonColour = Point(84/255, 122/255, 156/255) self.caveColour = Point(0/255, 0/255, 0/255) self.dayNightVisionColour = Point(200/255, 200/255, 200/255) self.duskNightVisionColour = Point(120/255, 120/255, 120/255) self.nightNightVisionColour = Point(200/255, 200/255, 200/255) self.fullMoonNightVisionColour = Point(200/255, 200/255, 200/255) self.caveNightVisionColour = Point(200/255, 200/255, 200/255) 替换为: self.dayColour = Point(255/255, 230/255, 158/255) self.duskColour = Point(255/255, 230/255, 158/255) self.nightColour = Point(255/255, 230/255, 158/255) self.fullMoonColour = Point(255/255, 230/255, 158/255) self.caveColour = Point(255/255, 230/255, 158/255) self.dayNightVisionColour = Point(255/255, 230/255, 158/255) self.duskNightVisionColour = Point(255/255, 230/255, 158/255) self.nightNightVisionColour = Point(255/255, 230/255, 158/255) self.fullMoonNightVisionColour = Point(255/255, 230/255, 158/255) self.caveNightVisionColour = Point(255/255, 230/255, 158/255) 2.用MT管理器打开游戏目录/assets/scripts/components/nightmareclock.lua文件,将下列内容: self.calmColour = Point(0, 0, 0) self.warnColour = Point(0, 0, 0) self.nightmareColour = Point(0, 0, 0) self.dawnColour = Point(0, 0, 0) 替换为: self.calmColour = Point(255/255, 230/255, 158/255) self.warnColour = Point(255/255, 230/255, 158/255) self.nightmareColour = Point(255/255, 230/255, 158/255) self.dawnColour = Point(255/255, 230/255, 158/255) 即可拥有一个光明世界,不需要为照明而点火了

2025/04/23 · Bny

YN118-机器可携带

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一一八.机器可携带 1.用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/scienceprototyper.lua文件,将MakeObstaclePhysics(inst, .4)替换为以下内容: local function turnon(inst) inst.components.machine.ison = true inst:AddComponent("inventoryitem") end local function turnoff(inst) inst.components.machine.ison = false inst:RemoveComponent("inventoryitem") end inst:AddComponent("machine") inst.components.machine.turnonfn = turnon inst.components.machine.turnofffn = turnoff inst:AddComponent("equippable") 2.用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/magicprototyper.lua文件,将MakeObstaclePhysics(inst, .4)替换为以下内容: local function turnon(inst) inst.components.machine.ison = true inst:AddComponent("inventoryitem") end local function turnoff(inst) inst.components.machine.ison = false inst:RemoveComponent("inventoryitem") end inst:AddComponent("machine") inst.components.machine.turnonfn = turnon inst.components.machine.turnofffn = turnoff inst:AddComponent("equippable") 即可在机器上按鼠标右键解除固定,再按鼠标左键点击即可带在身上。想固定机器时,将机器放在地上,在机器上按鼠标右键即可固定在地上

2025/04/23 · Bny

YN119-建造机器零距离

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一一九.建造机器零距离 用MT管理器打开游戏目录/assets/DLC0002/scripts/recipes.lua文件, 1.将下列内容: Recipe("researchlab", {Ingredient("goldnugget", 1),Ingredient("log", 4),Ingredient("rocks", 4)}, RECIPETABS.SCIENCE, TECH.NONE, "researchlab_placer") Recipe("researchlab2", {Ingredient("boards", 4),Ingredient("cutstone", 2), Ingredient("transistor", 2)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE, "researchlab2_placer") 替换为: Recipe("researchlab", {Ingredient("goldnugget", 1),Ingredient("log", 4),Ingredient("rocks", 4)}, RECIPETABS.SCIENCE, TECH.NONE, "researchlab_placer",1) Recipe("researchlab2", {Ingredient("boards", 4),Ingredient("cutstone", 2), Ingredient("transistor", 2)}, RECIPETABS.SCIENCE, TECH.SCIENCE_ONE, "researchlab2_placer",1) 2.将下列内容: Recipe("researchlab4", {Ingredient("rabbit", 4), Ingredient("boards", 4), Ingredient("tophat", 1)}, RECIPETABS.MAGIC, TECH.SCIENCE_ONE, "researchlab4_placer") Recipe("researchlab3", {Ingredient("livinglog", 3), Ingredient("purplegem", 1), Ingredient("nightmarefuel", 7)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO, "researchlab3_placer") 替换为: Recipe("researchlab4", {Ingredient("rabbit", 4), Ingredient("boards", 4), Ingredient("tophat", 1)}, RECIPETABS.MAGIC, TECH.SCIENCE_ONE, "researchlab4_placer",1) Recipe("researchlab3", {Ingredient("livinglog", 3), Ingredient("purplegem", 1), Ingredient("nightmarefuel", 7)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO, "researchlab3_placer",1) 即可让机器挨着建造,节省空间

2025/04/23 · Bny

YN120-用黄金种远古祭坛(以解锁远古科技)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一二0.用黄金种远古祭坛(以解锁远古科技) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/goldnugget.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function OnDeploy (inst, pt) SpawnPrefab("ancient_altar").Transform:SetPosition(pt.x, pt.y, pt.z) inst.components.stackable:Get():Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy 即可用黄金种远古祭坛,想造远古装备不用再去地下2层了

2025/04/23 · Bny

YN121-增加墙的耐久力

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一二一.增加墙的耐久力 用MT管理器打开游戏目录/assets/DLC0002/scripts/tuning.lua文件,将以下内容: HAYWALL_HEALTH = 100, WOODWALL_HEALTH = 200, STONEWALL_HEALTH = 400, RUINSWALL_HEALTH = 800, 替换为: HAYWALL_HEALTH = 1000, WOODWALL_HEALTH = 2000, STONEWALL_HEALTH = 4000, RUINSWALL_HEALTH = 8000, 即可增加墙的耐久力10倍

2025/04/23 · Bny