YN152-延长蓝色魔杖冻住敌人时间

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一五二.延长蓝色魔杖冻住敌人时间 用MT管理器打开游戏目录/assets/DLC0002/scripts/components/freezable.lua文件,将self.wearofftime = 10替换为self.wearofftime = 50000000 即可延长蓝色魔杖冻住敌人时间至存档退出游戏。手动解冻用任何武器打击冰冻敌人即可

2025/04/23 · Bny

YN153-蓝色魔杖升级版(一打冻住一大片)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一五三.蓝色魔杖升级版(一打冻住一大片) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/staff.lua文件,将下列内容: local function onattack_blue(inst, attacker, target) if attacker and attacker.components.sanity then attacker.components.sanity:DoDelta(-TUNING.SANITY_SUPERTINY) end if target.components.freezable then target.components.freezable:AddColdness(1) target.components.freezable:SpawnShatterFX() end 替换为: local function onattack_blue(inst, attacker, target) local pos = Vector3(target.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 15) for k,v in pairs(ents) do if v.components.freezable and not v:HasTag("player") then v.components.freezable:AddColdness(10) v.components.freezable:SpawnShatterFX() end end 即可让蓝色魔杖冻住一大片敌人,将其中15调整为更大数字,就可以加大冻住敌人的范围

2025/04/23 · Bny

YN154-全人物可制造打火机(原来只有薇洛专用)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一五四.全人物可制造打火机(原来只有薇洛专用) 1.用MT管理器打开游戏目录/assets/DLC0002/scripts/recipes.lua文件,在Recipe("torch", {Ingredient("cutgrass", 2),Ingredient("twigs", 2)}, RECIPETABS.LIGHT, TECH.NONE)的下一行插入Recipe("lighter", {Ingredient("goldnugget", 1),Ingredient("nitre", 1)}, RECIPETABS.LIGHT, TECH.NONE) 2.用MT管理器打开游戏目录/assets/scripts/prefabs/lighter.lua文件,将下列内容: inst:AddComponent("characterspecific") inst.components.characterspecific:SetOwner("willow") 替换为: --inst:AddComponent("characterspecific") --inst.components.characterspecific:SetOwner("willow") 3.将inst:DoTaskInTime(0, function() if not GetPlayer() or GetPlayer().prefab ~= "willow" then inst:Remove() end end)替换为--inst:DoTaskInTime(0, function() if not GetPlayer() or GetPlayer().prefab ~= "willow" then inst:Remove() end end) 即可在照明选项(画着火)下,用1个黄金、1个硝石制造打火机

2025/04/23 · Bny

YN155-全人物可制造伍迪的斧子(8下砍倒1棵树,普通斧子15下)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一五五.全人物可制造伍迪的斧子(8下砍倒1棵树,普通斧子15下) 1.用MT管理器打开游戏目录/assets/DLC0002/scripts/recipes.lua文件,在Recipe("razor", {Ingredient("twigs", 2), Ingredient("flint", 2)}, RECIPETABS.TOOLS, TECH.SCIENCE_ONE)的下一行插入Recipe("Lucy", {Ingredient("twigs", 4), Ingredient("goldnugget", 4)}, RECIPETABS.TOOLS, TECH.SCIENCE_ONE) 2.用MT管理器打开游戏目录/assets/scripts/prefabs/lucy.lua文件,将下列内容: inst:AddComponent("sentientaxe") inst:AddComponent("characterspecific") inst.components.characterspecific:SetOwner("woodie") 替换为: --inst:AddComponent("sentientaxe") --inst:AddComponent("characterspecific") --inst.components.characterspecific:SetOwner("woodie") 即可在工具选项(画着斧子和镐)下,用4个树杈、4个黄金制造伍迪的斧子

2025/04/23 · Bny

YN156-全人物可制造魔法书

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一五六.全人物可制造魔法书 1.用MT管理器打开游戏目录/assets/DLC0002/scripts/recipes.lua文件,在Recipe("batbat", {Ingredient("batwing", 5), Ingredient("livinglog", 2), Ingredient("purplegem", 1)}, RECIPETABS.MAGIC, TECH.MAGIC_THREE)的下一行插入以下内容: Recipe("book_birds", {Ingredient("papyrus", 2), Ingredient("bird_egg", 2)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO) Recipe("book_gardening", {Ingredient("papyrus", 2), Ingredient("seeds", 1), Ingredient("poop", 1)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO) Recipe("book_sleep", {Ingredient("papyrus", 2), Ingredient("nightmarefuel", 2)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO) Recipe("book_brimstone", {Ingredient("papyrus", 2), Ingredient("redgem", 1)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO) Recipe("book_tentacles", {Ingredient("papyrus", 2), Ingredient("tentaclespots", 1)}, RECIPETABS.MAGIC, TECH.MAGIC_TWO) 2.用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/player_common.lua文件,在inst:AddComponent("temperature")的下一行插入inst:AddComponent("reader") 3.用MT管理器打开游戏目录/assets/scripts/prefabs/books.lua文件,将下列内容: inst:AddComponent("characterspecific") inst.components.characterspecific:SetOwner("wickerbottom") 替换为: --inst:AddComponent("characterspecific") --inst.components.characterspecific:SetOwner("wickerbottom") 即可在魔法选项(画着红骷髅)下制造魔法书

2025/04/23 · Bny

YN157-全民吹气球(气球威力大、不伤主角、不降脑、彩色光、分散怪物注意力)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一五七.全民吹气球(气球威力大、不伤主角、不降脑、彩色光、分散怪物注意力) 1.用MT管理器打开游戏目录/assets/DLC0002/scripts/recipes.lua文件,在Recipe("heatrock", {Ingredient("rocks", 10),Ingredient("pickaxe", 1),Ingredient("flint", 3)}, RECIPETABS.SURVIVAL, TECH.SCIENCE_TWO)的下一行插入以下内容: Recipe("balloons_empty", {Ingredient("cutgrass", 1)}, RECIPETABS.SURVIVAL, TECH.NONE) 2.用MT管理器打开游戏目录/assets/DLC0002/scripts/actions.lua文件,将act.doer.components.sanity:DoDelta(-TUNING.SANITY_TINY)替换为act.doer.components.sanity:DoDelta(TUNING.SANITY_TINY) 3.用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/balloons_empty.lua文件,将下列内容: inst:AddComponent("characterspecific") inst.components.characterspecific:SetOwner("wes") 替换为: --inst:AddComponent("characterspecific") --inst.components.characterspecific:SetOwner("wes") 4.将inst:DoTaskInTime(0, function() if not GetPlayer() or GetPlayer().prefab ~= "wes" then inst:Remove() end end)替换为以下内容: --inst:DoTaskInTime(0, function() if not GetPlayer() or GetPlayer().prefab ~= "wes" then inst:Remove() end end) 5.用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/balloon.lua文件,将inst.components.combat:DoAreaAttack(inst, 2)替换为inst.components.combat:DoAreaAttack(inst, 8) 6.将inst.components.combat:SetDefaultDamage(5)替换为以下内容: inst.components.combat.playerdamagepercent = 0 inst.components.combat:SetDefaultDamage(500) local light = inst.entity:AddLight() light:SetIntensity(.8) light:SetRadius(2) light:SetFalloff(.6) light:Enable(true) light:SetColour(colours[inst.colour_idx][1],colours[inst.colour_idx][2],colours[inst.colour_idx][3]) inst:AddTag("character") 即可让全部主角吹进化版气球,空气球在生存选项(画着绳套)下,用1个草制造。官方原本的气球只有wes有,且功能很烂,所以我改造了一下

2025/04/23 · Bny

YN158-全人物可制造瓦丝格雷斯矛、瓦丝格雷斯帽

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一五八.全人物可制造瓦丝格雷斯矛、瓦丝格雷斯帽 用MT管理器打开游戏目录/assets/DLC0002/scripts/recipes.lua文件,在Recipe("trap_teeth", {Ingredient("log", 1),Ingredient("rope", 1),Ingredient("houndstooth", 1)}, RECIPETABS.WAR, TECH.SCIENCE_TWO)的下一行插入以下内容: Recipe("spear_wathgrithr", {Ingredient("twigs", 2), Ingredient("flint", 2), Ingredient("goldnugget", 2)}, RECIPETABS.WAR, TECH.SCIENCE_ONE, nil, nil, nil, nil, true) Recipe("wathgrithrhat", {Ingredient("goldnugget", 2), Ingredient("rocks", 2)}, RECIPETABS.WAR, TECH.SCIENCE_ONE, nil, nil, nil, nil, true) 即可在战斗选项(画着两把剑)下,用2个树枝、2个燧石、2个黄金制造瓦丝格雷斯矛,用2个黄金、2个石头制造瓦丝格雷斯帽

2025/04/23 · Bny

YN159-瑞士手杖(砍树、凿石、锤墙、挖草、祛暑、取暖、防雨、补脑、瞬移、10倍攻击力、2倍速度、照明)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一五九.瑞士手杖(砍树、凿石、锤墙、挖草、祛暑、取暖、防雨、补脑、瞬移、10倍攻击力、2倍速度、照明) 用MT管理器打开游戏目录/assets/scripts/prefabs/cane.lua文件, 1.在local function onequip(inst, owner)的下一行插入以下内容: inst.Light:Enable(true) GetPlayer().components.temperature:SetTemp(20) GetPlayer():PushEvent("stopfreezing") GetPlayer():PushEvent("stopoverheating") GetPlayer().components.moisture:SetMoistureLevel(0) 2.在local function onunequip(inst, owner)的下一行插入以下内容: inst.Light:Enable(false) GetPlayer().components.temperature:SetTemp(nil) 3.在anim:PlayAnimation("idle")的下一行插入以下内容: inst:AddComponent("tool") inst.components.tool:SetAction(ACTIONS.CHOP, 15) inst.components.tool:SetAction(ACTIONS.MINE, 15) inst.components.tool:SetAction(ACTIONS.HAMMER,15) inst.components.tool:SetAction(ACTIONS.DIG) inst:AddComponent("waterproofer") inst.components.waterproofer:SetEffectiveness(TUNING.WATERPROOFNESS_ABSOLUTE) inst:AddComponent("blinkstaff") local light = inst.entity:AddLight() light:SetFalloff(0.4) light:SetIntensity(.7) light:SetRadius(2.5) light:SetColour(180/255, 195/255, 150/255) light:Enable(true) 4.将inst.components.weapon:SetDamage(TUNING.CANE_DAMAGE)替换为inst.components.weapon:SetDamage(TUNING.CANE_DAMAGE*10) 5.将inst.components.equippable.walkspeedmult = TUNING.CANE_SPEED_MULT替换为以下内容: inst.components.equippable.walkspeedmult = TUNING.CANE_SPEED_MULT*2 inst.components.equippable.dapperness = TUNING.DAPPERNESS_HUGE 即可让手杖拥有瑞士军刀般的多功能。装备手杖时,在空地上点鼠标右键可瞬移,借此可跳过较窄沟壑,少走冤枉路

2025/04/23 · Bny

YN160-神之矛(矛攻击时召唤闪电雷击敌人)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一六0.神之矛(矛攻击时召唤闪电雷击敌人) 用MT管理器打开游戏目录/assets/scripts/prefabs/spear.lua文件, 1.在local function onequip(inst, owner)的下一行插入以下内容: if owner.components.playerlightningtarget then owner:AddTag("nolightning") owner:RemoveComponent("playerlightningtarget") end 2.在local function onunequip(inst, owner)的下一行插入以下内容: if owner:HasTag("nolightning") then owner:RemoveTag("nolightning") owner:AddComponent("playerlightningtarget") end 3.将inst:AddComponent("weapon")替换为以下内容: local function onattack(inst, attacker, target) inst:StartThread(function() for k = 1, 5 do local pos = target:GetPosition() GetSeasonManager():DoLightningStrike(pos) target.components.health:DoDelta(-100) Sleep(0.3) end end) end inst:AddComponent("weapon") inst.components.weapon:SetRange(20, 25) inst.components.weapon:SetOnAttack(onattack) inst.components.weapon:SetProjectile("bishop_charge") 即可让矛在攻击时召唤5道闪电,连续雷击敌人,会烧着附近的敌人。因为神之矛太过凶猛,请远离自己的基地使用,也千万不要在带同伴时使用

2025/04/23 · Bny

YN161-钓金龟(用鱼竿将敌人变成黄金雕像)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 一六一.钓金龟(用鱼竿将敌人变成黄金雕像) 用MT管理器打开游戏目录/assets/scripts/prefabs/fishingrod.lua文件,将下列内容: inst:AddComponent("weapon") inst.components.weapon:SetDamage(TUNING.FISHINGROD_DAMAGE) inst.components.weapon.attackwear = 4 替换为: local function onattack(inst, attacker, target) SpawnPrefab("ruins_statue_mage").Transform:SetPosition(target.Transform:GetWorldPosition()) SpawnPrefab("collapse_small").Transform:SetPosition(target.Transform:GetWorldPosition()) target:Remove() end inst:AddComponent("weapon") inst.components.weapon:SetDamage(0) inst.components.weapon:SetRange(12, 15) inst.components.weapon:SetOnAttack(onattack) inst.components.weapon:SetProjectile("bishop_charge") 即可用鱼竿远距离攻击敌人时,把敌人变成黄金雕像,用锤子砸碎雕像可得宝石和铥矿石。鱼竿在生存选项(画着绳套)下,用2个树杈、2个蛛丝制造

2025/04/23 · Bny