模组文件免费下载和使用,谨防上当受骗。

YN306-生鲜售卖机(用木板种生鲜售卖机,放入生鲜产品,每天清晨自动卖出换黄金)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 三0六.生鲜售卖机(用木板种生鲜售卖机,放入生鲜产品,每天清晨自动卖出换黄金) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/boards.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function OnDeploy (inst, pt) local vending = SpawnPrefab("boards") vending.Transform:SetPosition(pt.x, pt.y, pt.z) vending.AnimState:SetBank("icebox") vending.AnimState:SetBuild("ice_box") vending.AnimState:PlayAnimation("closed") vending.Transform:SetScale(1.3, 1.3, 1.3) vending.AnimState:SetMultColour(255/255,255/255,0/255,1) vending:RemoveComponent("stackable") vending:RemoveComponent("tradable") vending:RemoveComponent("edible") vending:RemoveComponent("inventoryitem") vending:RemoveComponent("repairer") vending:RemoveComponent("fuel") vending:RemoveComponent("burnable") vending:RemoveComponent("propagator") vending:RemoveComponent("deployable") vending.components.container.canbeopened = true vending:DoPeriodicTask(2, function(vending) vending.AnimState:SetBloomEffectHandle("shaders/anim.ksh") vending:DoTaskInTime(1, function() vending.AnimState:SetBloomEffectHandle("") end ) end ) vending:AddComponent("workable") vending.components.workable:SetWorkAction(ACTIONS.HAMMER) vending.components.workable:SetWorkLeft(3) vending.components.workable:SetOnFinishCallback(function(vending) SpawnPrefab("collapse_big").Transform:SetPosition(vending.Transform:GetWorldPosition()) GetPlayer().SoundEmitter:PlaySound("dontstarve/common/destroy_wood") vending:Remove() end ) vending:ListenForEvent( "daytime", function() local num_found = 0 for k,v in pairs(vending.components.container.slots) do if v and v.prefab ~= "goldnugget" and v.prefab ~= "spoiled_food" then num_found = num_found + v.components.stackable:StackSize() v:Remove() end end for k = 1, num_found do local goldnugget = SpawnPrefab("goldnugget") vending.components.container:GiveItem(goldnugget) end end, GetWorld()) vending:AddTag("vendings") inst.components.stackable:Get():Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy local function onsave(inst, data) if inst:HasTag("vendings") then data.vendings = true end end local function onload(inst, data) if data and data.vendings then inst.AnimState:SetBank("icebox") inst.AnimState:SetBuild("ice_box") inst.AnimState:PlayAnimation("closed") inst.Transform:SetScale(1.3, 1.3, 1.3) inst.AnimState:SetMultColour(255/255,255/255,0/255,1) inst:RemoveComponent("stackable") inst:RemoveComponent("tradable") inst:RemoveComponent("edible") inst:RemoveComponent("inventoryitem") inst:RemoveComponent("repairer") inst:RemoveComponent("fuel") inst:RemoveComponent("burnable") inst:RemoveComponent("propagator") inst:RemoveComponent("deployable") inst.components.container.canbeopened = true inst:DoPeriodicTask(2, function(inst) inst.AnimState:SetBloomEffectHandle("shaders/anim.ksh") inst:DoTaskInTime(1, function() inst.AnimState:SetBloomEffectHandle("") end ) end ) inst:AddComponent("workable") inst.components.workable:SetWorkAction(ACTIONS.HAMMER) inst.components.workable:SetWorkLeft(3) inst.components.workable:SetOnFinishCallback(function(inst) SpawnPrefab("collapse_big").Transform:SetPosition(inst.Transform:GetWorldPosition()) GetPlayer().SoundEmitter:PlaySound("dontstarve/common/destroy_wood") inst:Remove() end ) inst:ListenForEvent( "daytime", function() local num_found = 0 for k,v in pairs(inst.components.container.slots) do if v and v.prefab ~= "goldnugget" and v.prefab ~= "spoiled_food" then num_found = num_found + v.components.stackable:StackSize() v:Remove() end end for k = 1, num_found do local goldnugget = SpawnPrefab("goldnugget") inst.components.container:GiveItem(goldnugget) end end, GetWorld()) inst:AddTag("vendings") end end inst.OnSave = onsave inst.OnLoad = onload local slotpos = {} for y = 3, 0, -1 do for x = 0, 2 do table.insert(slotpos, Vector3(75*x-75*2+75, 75*y-75*2+75,0)) end end inst:AddComponent("container") inst.components.container:SetNumSlots(#slotpos) inst.components.container.widgetslotpos = slotpos inst.components.container.widgetpos = Vector3(0,100,0) inst.components.container.side_align_tip = 160 inst.components.container.canbeopened = false inst.components.container.onopenfn = function(inst) inst.AnimState:PlayAnimation("open") GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/equip_item_gold") end inst.components.container.onclosefn = function(inst) inst.AnimState:PlayAnimation("close") GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/equip_item_gold") end inst.components.container.itemtestfn = function(inst, item, slot) if item.prefab == "cave_banana" or item.prefab == "carrot" or item.prefab == "corn" or item.prefab == "pumpkin" or item.prefab == "eggplant" or item.prefab == "durian" or item.prefab == "pomegranate" or item.prefab == "dragonfruit" or item.prefab == "berries" or item.prefab == "cactus_meat" or item.prefab == "watermelon" or item.prefab == "acorn" or item.prefab == "meat" or item.prefab == "smallmeat" or item.prefab == "fish" or item.prefab == "eel" or item.prefab == "drumstick" or item.prefab == "bird_egg" or item.prefab == "froglegs" or item.prefab == "monstermeat" or item.prefab == "spoiled_food" or item.prefab == "butter" or item.prefab == "butterflywings" or item.prefab == "cutlichen" or item.prefab == "foliage" or item.prefab == "honey" or item.prefab == "lightbulb" or item.prefab == "red_cap" or item.prefab == "green_cap" or item.prefab == "blue_cap" or item.prefab == "petals" or item.prefab == "petals_evil" or item.prefab == "goatmilk" or item.prefab == "goldnugget" then return true end return false end inst:AddTag("fridge") 即可用木板种生鲜售卖机,鼠标左键点售卖机,可打开格子,将蔬菜和肉类等生鲜产品放入格子中,每天清晨将全部卖出,每个售价1个黄金,结算的黄金在售卖机中领取。有了生鲜售卖机,不用发愁过剩的产品不好销售了。可以出售的生鲜产品包括香蕉、胡萝卜、玉米、南瓜、茄子、榴莲、石榴、火龙果、浆果、仙人掌肉、西瓜、橡果、大肉、小肉、鱼、鳗鱼、鸡腿、鸟蛋、蛙腿、疯肉、黄油、蝴蝶翅膀、苔藓、叶子、蜂蜜、荧光果、红蘑菇、绿蘑菇、蓝蘑菇、花瓣、噩梦花瓣。不想要生鲜售卖机了,用锤子砸掉即可。不要与“用木板种鱼人房”一同修改

2025/04/23 · Bny

YN307-炸弹客(用红色护身符种炸弹客,购买遥控炸弹,放在地上按键盘Delete键引爆)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 三0七.炸弹客(用红色护身符种炸弹客,购买遥控炸弹,放在地上按键盘Delete键引爆) 1.用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/player_common.lua文件,在inst:AddComponent("playeractionpicker")的下一行插入以下内容: TheInput:AddKeyUpHandler(KEY_DELETE, function() GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/equip_item_gold") inst:DoTaskInTime(0.1, function() local pos = Vector3(inst.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 100) for k,v in pairs(ents) do if v:HasTag("bomballright") and v.components.inventoryitem and not v.components.inventoryitem:IsHeld() then local pos1 = Vector3(v.Transform:GetWorldPosition()) local ents1 = TheSim:FindEntities(pos1.x,pos1.y,pos1.z, 15) for k,i in pairs(ents1) do if i.components.combat and i.components.health and not i.components.health:IsDead() and not i:HasTag("player") then SpawnPrefab("ground_chunks_breaking").Transform:SetPosition(i.Transform:GetWorldPosition()) i.components.health:Kill() end if i.components.workable and i.components.workable.workleft > 0 and not i.components.inventoryitem then SpawnPrefab("ground_chunks_breaking").Transform:SetPosition(i.Transform:GetWorldPosition()) i.components.workable:Destroy(v) end end GetPlayer().SoundEmitter:PlaySound("dontstarve_DLC001/creatures/glommer/foot_ground") SpawnPrefab("collapse_big").Transform:SetPosition(v.Transform:GetWorldPosition()) SpawnPrefab("explode_small").Transform:SetPosition(v.Transform:GetWorldPosition()) SpawnPrefab("groundpoundring_fx").Transform:SetPosition(v.Transform:GetWorldPosition()) GetClock():DoLightningLighting() GetPlayer().components.playercontroller:ShakeCamera(v, "FULL", 0.7, 0.02, .5, 40) v:Remove() end end end ) end ) 2.用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/amulet.lua文件,在inst.AnimState:PlayAnimation("redamulet")的下一行插入以下内容: local function makebomber(inst) local pt = inst:GetPosition() local bomber = SpawnPrefab("amulet") bomber.Transform:SetPosition(pt.x, pt.y, pt.z) bomber.AnimState:SetBank("wilson") bomber.AnimState:SetBuild("wx78") bomber.AnimState:OverrideSymbol("swap_hat", "hat_catcoon", "swap_hat") bomber.AnimState:OverrideSymbol("swap_body", "swap_krampus_sack", "backpack") bomber.AnimState:OverrideSymbol("swap_body", "swap_krampus_sack", "swap_body") bomber.AnimState:Show("HAT") bomber.AnimState:Show("HAT_HAIR") bomber.AnimState:Hide("HAIR_NOHAT") bomber.AnimState:Hide("HAIR") bomber.AnimState:Hide("ARM_carry") bomber.AnimState:Show("ARM_normal") bomber.Transform:SetFourFaced() bomber.AnimState:PlayAnimation("idle") bomber:RemoveComponent("equippable") bomber:RemoveComponent("inventoryitem") bomber:RemoveComponent("finiteuses") bomber:RemoveComponent("deployable") MakeLargeBurnable(bomber) MakeLargePropagator(bomber) bomber:AddComponent("trader") bomber.components.trader:SetAcceptTest(function(bomber, item) if GetPlayer().components.inventory:Has("goldnugget", 10) then if item.prefab == "goldnugget" then return true end end return false end ) bomber.components.trader.onaccept = function(bomber, giver, item) GetPlayer().components.inventory:ConsumeByName("goldnugget", 9) GetPlayer().SoundEmitter:PlaySound("dontstarve/HUD/research_available") bomber.AnimState:PlayAnimation("give") local bomb = SpawnPrefab("amulet") bomb.AnimState:SetBank("bee_mine_maxwell") bomb.AnimState:SetBuild("bee_mine_maxwell") bomb.AnimState:PlayAnimation("idle") bomb.Transform:SetScale(0.8, 0.8, 0.8) bomb.AnimState:SetMultColour(255/255,255/255,0/255,1) bomb.AnimState:SetBloomEffectHandle("shaders/anim.ksh") bomb:AddComponent("named") bomb.components.named:SetName("Bomb") local minimap = bomb.entity:AddMiniMapEntity() minimap:SetIcon( "beemine.png" ) bomb:RemoveComponent("equippable") bomb:RemoveComponent("inventoryitem") bomb:RemoveComponent("finiteuses") bomb:RemoveComponent("deployable") bomb:AddComponent("inventoryitem") bomb.components.inventoryitem:ChangeImageName("beemine") bomb.components.inventoryitem:SetOnDroppedFn(function() bomb:AddTag("bomballright") end ) bomb.components.inventoryitem:SetOnPickupFn(function() bomb:RemoveTag("bomballright") end ) bomb.components.inventoryitem:SetOnPutInInventoryFn(function() bomb:RemoveTag("bomballright") end ) bomb:AddTag("bomb") GetPlayer().components.inventory:GiveItem(bomb) end bomber:AddTag("bomber") for k = 1, 11 do local result_offset = FindValidPositionByFan(1 * 2 * PI, 2, 11, function(offset) local x,y,z = (pt + offset):Get() local ents = TheSim:FindEntities(x,y,z , 1) return not next(ents) end) if result_offset then local bombbye = SpawnPrefab("amulet") bombbye.Transform:SetPosition((pt + result_offset):Get()) bombbye.AnimState:SetBank("bee_mine_maxwell") bombbye.AnimState:SetBuild("bee_mine_maxwell") bombbye.AnimState:PlayAnimation("idle") bombbye.Transform:SetScale(0.8, 0.8, 0.8) bombbye.AnimState:SetMultColour(255/255,255/255,0/255,1) bombbye.AnimState:SetBloomEffectHandle("shaders/anim.ksh") bombbye:RemoveComponent("equippable") bombbye:RemoveComponent("inventoryitem") bombbye:RemoveComponent("finiteuses") bombbye:RemoveComponent("deployable") MakeLargeBurnable(bombbye) MakeLargePropagator(bombbye) bombbye:AddTag("NOCLICK") bombbye:AddTag("bombbye") end end end local function OnDeploy (inst, pt) makebomber(inst) inst:Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy local function onsave(inst, data) if inst:HasTag("bomber") then data.bomber = true end if inst:HasTag("bombbye") then data.bombbye = true end if inst:HasTag("bomb") then data.bomb = true end if inst:HasTag("bomballright") then data.bomballright = true end end local function onload(inst, data) if data and data.bomber then makebomber(inst) inst:Remove() end if data and data.bombbye then inst:Remove() end if data and data.bomb then inst.AnimState:SetBank("bee_mine_maxwell") inst.AnimState:SetBuild("bee_mine_maxwell") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.8, 0.8, 0.8) inst.AnimState:SetMultColour(255/255,255/255,0/255,1) inst.AnimState:SetBloomEffectHandle("shaders/anim.ksh") inst:AddComponent("named") inst.components.named:SetName("Bomb") local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon( "beemine.png" ) inst:RemoveComponent("equippable") inst:RemoveComponent("inventoryitem") inst:RemoveComponent("finiteuses") inst:RemoveComponent("deployable") inst:AddComponent("inventoryitem") inst.components.inventoryitem:ChangeImageName("beemine") inst.components.inventoryitem:SetOnDroppedFn(function() inst:AddTag("bomballright") end ) inst.components.inventoryitem:SetOnPickupFn(function() inst:RemoveTag("bomballright") end ) inst.components.inventoryitem:SetOnPutInInventoryFn(function() inst:RemoveTag("bomballright") end ) inst:AddTag("bomb") end if data and data.bomballright then inst:AddTag("bomballright") end end inst.OnSave = onsave inst.OnLoad = onload 即可用红色护身符种炸弹客,给炸弹客10个黄金(拿着黄金对炸弹客点鼠标左键),可购买遥控炸弹,将炸弹放在地上,按键盘Delete键可遥控引爆,能炸死除主角外的任何生物,炸毁建筑、树木等。遥控炸弹在小地图上显示为炸弹图标,引爆时不要让同伴靠近。不想要炸弹客了,烧掉即可(拿着火炬对其点鼠标右键)。红色护身符在魔法选项(画着红骷髅)下,用3个黄金、2个噩梦燃料、1个红宝石制造

2025/04/23 · Bny

YN308-百变存钱罐(用鱼竿种百变存钱罐,每天获得3个黄金的零花钱,可变外型、防雷击、照明、补脑)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 三0八.百变存钱罐(用鱼竿种百变存钱罐,每天获得3个黄金的零花钱,可变外型、防雷击、照明、补脑) 用MT管理器打开游戏目录/assets/scripts/prefabs/fishingrod.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function itemtest(inst, item, slot) if item.prefab == "goldnugget" then return true end return false end local slotpos = { Vector3(0,-75,0)} local widgetbuttoninfo = { text = "Change", position = Vector3(0, -15, 0), fn = function(inst) GetPlayer().SoundEmitter:PlaySound("dontstarve/characters/wx78/levelup") inst:RemoveTag("doll_1") inst:RemoveTag("doll_2") inst:RemoveTag("doll_3") inst:RemoveTag("doll_4") inst:RemoveTag("doll_5") inst:RemoveTag("doll_6") inst:RemoveTag("doll_7") inst:RemoveTag("doll_8") inst:RemoveTag("doll_9") inst:RemoveTag("doll_10") if math.random()<.08 then inst:AddTag("doll_1") inst.AnimState:SetBank("bearger") inst.AnimState:SetBuild("bearger_build") inst.AnimState:PlayAnimation("idle_loop") inst.Transform:SetScale(0.2,0.2,0.2) elseif math.random()<.16 then inst:AddTag("doll_2") inst.AnimState:SetBank("lightning_goat") inst.AnimState:SetBuild("lightning_goat_build") inst.AnimState:PlayAnimation("idle_loop") inst.Transform:SetScale(0.6,0.6,0.6) elseif math.random()<.24 then inst:AddTag("doll_3") inst.AnimState:SetBank("leif") inst.AnimState:SetBuild("leif_build") inst.AnimState:PlayAnimation("idle_loop") inst.Transform:SetScale(0.35,0.35,0.35) elseif math.random()<.32 then inst:AddTag("doll_4") inst.AnimState:SetBank("beefalo") inst.AnimState:SetBuild("beefalo_build") inst.AnimState:PlayAnimation("idle_loop") inst.Transform:SetScale(0.5,0.5,0.5) elseif math.random()<.4 then inst:AddTag("doll_5") inst.AnimState:SetBank("rook") inst.AnimState:SetBuild("rook_build") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.3,0.3,0.3) elseif math.random()<.48 then inst:AddTag("doll_6") inst.AnimState:SetBank("deerclops") inst.AnimState:SetBuild("deerclops_build") inst.AnimState:PlayAnimation("idle_loop") inst.Transform:SetScale(0.35,0.35,0.35) elseif math.random()<.56 then inst:AddTag("doll_7") inst.AnimState:SetBank("rook") inst.AnimState:SetBuild("rook_rhino") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.3,0.3,0.3) elseif math.random()<.64 then inst:AddTag("doll_8") inst.AnimState:SetBank("Pig_King") inst.AnimState:SetBuild("Pig_King") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.4,0.4,0.4) elseif math.random()<.72 then inst:AddTag("doll_9") inst.AnimState:SetBank("goosemoose") inst.AnimState:SetBuild("goosemoose_build") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.3,0.3,0.3) elseif math.random()<.95 then inst:AddTag("doll_10") inst.AnimState:SetBank("dragonfly") inst.AnimState:SetBuild("dragonfly_build") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.3,0.3,0.3) else inst.AnimState:SetBank("trinkets") inst.AnimState:SetBuild("trinkets") inst.AnimState:PlayAnimation(tostring(4)) inst.Transform:SetScale(1.5,1.5,1.5) end end } local function OnDeploy (inst, pt) local doll = SpawnPrefab("fishingrod") doll.Transform:SetPosition(pt.x, pt.y, pt.z) doll.AnimState:SetBank("trinkets") doll.AnimState:SetBuild("trinkets") doll.AnimState:PlayAnimation(tostring(4)) doll.Transform:SetFourFaced() doll.Transform:SetScale(1.5,1.5,1.5) local light = doll.entity:AddLight() light:SetFalloff(0.5) light:SetIntensity(.8) light:SetRadius(3.0) light:SetColour(180/255, 195/255, 50/255) light:Enable(true) MakeObstaclePhysics(doll, 0.5) doll:RemoveComponent("fishingrod") doll:RemoveComponent("finiteuses") doll:RemoveComponent("inventoryitem") doll:RemoveComponent("equippable") if doll.components.weapon then doll:RemoveComponent("weapon") end doll:RemoveComponent("deployable") doll.components.container.canbeopened = true doll:AddComponent("named") doll.components.named:SetName("Piggy bank") doll:AddComponent("sanityaura") doll.components.sanityaura.aura = TUNING.SANITYAURA_MED doll:AddTag("lightningrod") doll:ListenForEvent("lightningstrike", function() doll.AnimState:SetBloomEffectHandle( "shaders/anim.ksh" ) doll:DoTaskInTime(60, function() doll.AnimState:SetBloomEffectHandle("") end ) end ) doll:AddComponent("workable") doll.components.workable:SetWorkAction(ACTIONS.HAMMER) doll.components.workable:SetWorkLeft(3) doll.components.workable:SetOnFinishCallback(function(doll) doll.Light:Enable(false) doll.components.container:DropEverything() SpawnPrefab("ground_chunks_breaking").Transform:SetPosition(doll.Transform:GetWorldPosition()) GetPlayer().SoundEmitter:PlaySound("dontstarve/common/destroy_wood") doll:Remove() end ) doll:ListenForEvent( "daytime", function() for k = 1, 3 do local goldnugget = SpawnPrefab("goldnugget") doll.components.container:GiveItem(goldnugget) end end, GetWorld()) doll:AddTag("scarytoprey") doll:AddTag("dolls") inst:Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy local function onsave(inst, data) if inst:HasTag("dolls") then data.dolls = true end if inst:HasTag("doll_1") then data.doll_1 = true end if inst:HasTag("doll_2") then data.doll_2 = true end if inst:HasTag("doll_3") then data.doll_3 = true end if inst:HasTag("doll_4") then data.doll_4 = true end if inst:HasTag("doll_5") then data.doll_5 = true end if inst:HasTag("doll_6") then data.doll_6 = true end if inst:HasTag("doll_7") then data.doll_7 = true end if inst:HasTag("doll_8") then data.doll_8 = true end if inst:HasTag("doll_9") then data.doll_9 = true end if inst:HasTag("doll_10") then data.doll_10 = true end end local function onload(inst, data) if data and data.dolls then inst.AnimState:SetBank("trinkets") inst.AnimState:SetBuild("trinkets") inst.AnimState:PlayAnimation(tostring(4)) inst.Transform:SetFourFaced() inst.Transform:SetScale(1.5,1.5,1.5) local light = inst.entity:AddLight() light:SetFalloff(0.5) light:SetIntensity(.8) light:SetRadius(3.0) light:SetColour(180/255, 195/255, 50/255) light:Enable(true) MakeObstaclePhysics(inst, 0.5) inst:RemoveComponent("fishingrod") inst:RemoveComponent("finiteuses") inst:RemoveComponent("inventoryitem") inst:RemoveComponent("equippable") if inst.components.weapon then inst:RemoveComponent("weapon") end inst:RemoveComponent("deployable") inst.components.container.canbeopened = true inst:AddComponent("named") inst.components.named:SetName("Piggy bank") inst:AddComponent("sanityaura") inst.components.sanityaura.aura = TUNING.SANITYAURA_MED inst:AddTag("lightningrod") inst:ListenForEvent("lightningstrike", function() inst.AnimState:SetBloomEffectHandle( "shaders/anim.ksh" ) inst:DoTaskInTime(60, function() inst.AnimState:SetBloomEffectHandle("") end ) end ) inst:AddComponent("workable") inst.components.workable:SetWorkAction(ACTIONS.HAMMER) inst.components.workable:SetWorkLeft(3) inst.components.workable:SetOnFinishCallback(function(inst) inst.Light:Enable(false) inst.components.container:DropEverything() SpawnPrefab("ground_chunks_breaking").Transform:SetPosition(inst.Transform:GetWorldPosition()) GetPlayer().SoundEmitter:PlaySound("dontstarve/common/destroy_wood") inst:Remove() end ) inst:ListenForEvent( "daytime", function() for k = 1, 3 do local goldnugget = SpawnPrefab("goldnugget") inst.components.container:GiveItem(goldnugget) end end, GetWorld()) inst:AddTag("scarytoprey") inst:AddTag("dolls") end if data and data.doll_1 then inst:AddTag("doll_1") inst.AnimState:SetBank("bearger") inst.AnimState:SetBuild("bearger_build") inst.AnimState:PlayAnimation("idle_loop") inst.Transform:SetScale(0.2,0.2,0.2) end if data and data.doll_2 then inst:AddTag("doll_2") inst.AnimState:SetBank("lightning_goat") inst.AnimState:SetBuild("lightning_goat_build") inst.AnimState:PlayAnimation("idle_loop") inst.Transform:SetScale(0.6,0.6,0.6) end if data and data.doll_3 then inst:AddTag("doll_3") inst.AnimState:SetBank("leif") inst.AnimState:SetBuild("leif_build") inst.AnimState:PlayAnimation("idle_loop") inst.Transform:SetScale(0.35,0.35,0.35) end if data and data.doll_4 then inst:AddTag("doll_4") inst.AnimState:SetBank("beefalo") inst.AnimState:SetBuild("beefalo_build") inst.AnimState:PlayAnimation("idle_loop") inst.Transform:SetScale(0.5,0.5,0.5) end if data and data.doll_5 then inst:AddTag("doll_5") inst.AnimState:SetBank("rook") inst.AnimState:SetBuild("rook_build") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.3,0.3,0.3) end if data and data.doll_6 then inst:AddTag("doll_6") inst.AnimState:SetBank("deerclops") inst.AnimState:SetBuild("deerclops_build") inst.AnimState:PlayAnimation("idle_loop") inst.Transform:SetScale(0.35,0.35,0.35) end if data and data.doll_7 then inst:AddTag("doll_7") inst.AnimState:SetBank("rook") inst.AnimState:SetBuild("rook_rhino") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.3,0.3,0.3) end if data and data.doll_8 then inst:AddTag("doll_8") inst.AnimState:SetBank("Pig_King") inst.AnimState:SetBuild("Pig_King") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.4,0.4,0.4) end if data and data.doll_9 then inst:AddTag("doll_9") inst.AnimState:SetBank("goosemoose") inst.AnimState:SetBuild("goosemoose_build") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.3,0.3,0.3) end if data and data.doll_10 then inst:AddTag("doll_10") inst.AnimState:SetBank("dragonfly") inst.AnimState:SetBuild("dragonfly_build") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.3,0.3,0.3) end end inst.OnSave = onsave inst.OnLoad = onload inst:AddComponent("container") inst.components.container:SetNumSlots(#slotpos) inst.components.container.widgetslotpos = slotpos inst.components.container.widgetpos = Vector3(0,150,0) inst.components.container.side_align_tip = 160 inst.components.container.itemtestfn = itemtest inst.components.container.widgetbuttoninfo = widgetbuttoninfo inst.components.container.canbeopened = false 即可用鱼竿种百变存钱罐,鼠标左键点存钱罐可打开格子,每天将获得3个黄金的零花钱,在格子中拿取。点格子上方的“Change”按钮,可使存钱罐改换为巨鹿、猪王、熊等造型。百变存钱罐放在家中,可防雷击、照明,靠近会补脑,并且可以吓阻火鸡、兔子等小动物,让它们不敢偷吃你扔在地上的食物。不想要百变存钱罐了,用锤子砸掉即可,里面的黄金会掉在地上。鱼竿在生存选项(画着绳套)下,用2个树枝、2个蛛丝制造

2025/04/23 · Bny

YN309-度假营地(按键盘B键租赁度假营地,各种设施一应俱全,再按B键退房)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 三0九.度假营地(按键盘B键租赁度假营地,各种设施一应俱全,再按B键退房) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/player_common.lua文件,在inst:AddComponent("playeractionpicker")的下一行插入以下内容: TheInput:AddKeyUpHandler(KEY_B, function() if not inst:HasTag("campsite") then if inst.components.inventory:Has("goldnugget", 50) then inst.components.inventory:ConsumeByName("goldnugget", 50) GetPlayer().SoundEmitter:PlaySound("dontstarve/HUD/research_available") inst:AddTag("campsite") local pt = inst:GetPosition() local pt0 = Vector3(inst.Transform:GetWorldPosition()) for k = 1, 50 do local result_offset = FindValidPositionByFan(1 * 2 * PI, 8.5, 50, function(offset) local x,y,z = (pt0 + offset):Get() local ents = TheSim:FindEntities(x,y,z , 1) return not next(ents) end ) if result_offset then local wall = SpawnPrefab("wall_wood") wall.Transform:SetScale(0.65,0.65,0.65) MakeObstaclePhysics(wall, .25) wall:RemoveComponent("workable") wall.components.health:SetInvincible(true) wall.persists = false wall:AddTag("tempbuilding") wall.Transform:SetPosition((pt0 + result_offset):Get()) wall.components.inspectable.getstatus = function(wall) wall.Transform:SetScale(0.65, 0.1, 0.65) wall.Physics:SetActive(false) GetPlayer().SoundEmitter:PlaySound("dontstarve/common/destroy_wood") wall:DoTaskInTime(5, function(wall) wall.Transform:SetScale(0.65, 0.65, 0.65) wall.Physics:SetActive(true) GetPlayer().SoundEmitter:PlaySound("dontstarve/common/destroy_wood") end ) end end end local building1 = SpawnPrefab("tent") building1.Transform:SetPosition(pt.x-4, 0, pt.z-4) building1.AnimState:SetMultColour(255/255,105/255,0/255,1) building1.persists = false building1:AddTag("tempbuilding") local building2 = SpawnPrefab("ancient_altar") building2.Transform:SetPosition(pt.x-4+2.5, 0, pt.z-4-2.5) building2.Transform:SetScale(0.45,0.45,0.45) building2.persists = false building2:AddTag("NOCLICK") building2:AddTag("tempbuilding") local building3 = SpawnPrefab("lightning_rod") building3.Transform:SetPosition(pt.x-4-2.4, 0, pt.z-4+2.4) building3.Transform:SetScale(0.7,0.7,0.7) building3.persists = false building3:AddTag("NOCLICK") building3:AddTag("tempbuilding") local building4 = SpawnPrefab("ruins_table") building4.Transform:SetPosition(pt.x+3.3, 0, pt.z-3.3) building4.persists = false building4:AddTag("NOCLICK") building4:AddTag("tempbuilding") local building5 = SpawnPrefab("ruins_chair") building5.Transform:SetPosition(pt.x+4.9, 0, pt.z-4.9) building5.persists = false building5:AddTag("NOCLICK") building5:AddTag("tempbuilding") local building6 = SpawnPrefab("cookpot") building6.Transform:SetPosition(pt.x+4.3, 0, pt.z+4.3) building6.Transform:SetScale(0.7,0.7,0.7) building6.persists = false building6:AddTag("tempbuilding") local building7 = SpawnPrefab("icebox") building7.Transform:SetPosition(pt.x+4.5-1.3, 0, pt.z+4.5+1.3) building7.persists = false building7:AddTag("tempbuilding") for k = 1, 3 do local foodnames = {"butterflymuffin","frogglebunwich","taffy","pumpkincookie","stuffedeggplant","fishsticks","honeynuggets","honeyham","dragonpie","kabobs","mandrakesoup","baconeggs","meatballs","bonestew","perogies","turkeydinner","ratatouille","jammypreserves","fruitmedley","fishtacos","waffles","unagi","flowersalad","icecream","watermelonicle","trailmix","hotchili","guacamole"} local foodname = foodnames[math.random(#foodnames)] local food = SpawnPrefab(foodname) building7.components.container:GiveItem(food) end local building8 = SpawnPrefab("dragonflychest") building8.Transform:SetPosition(pt.x+3.8+3, 0, pt.z-3.8+3) building8.persists = false building8:AddTag("tempbuilding") local lantern = SpawnPrefab("lantern") building8.components.container:GiveItem(lantern) if not GetSeasonManager():IsSummer() then local building9 = SpawnPrefab("firepit") building9.Transform:SetPosition(pt.x, 0, pt.z) building9:RemoveAllEventCallbacks() building9:ListenForEvent("onextinguish", function(building9) if building9.components.cooker then building9:RemoveComponent("cooker") end if building9.components.fueled then building9.components.fueled:InitializeFuelLevel(0) end end ) building9:ListenForEvent("onignite", function(building9) if not building9.components.cooker then building9:AddComponent("cooker") end end ) building9.persists = false building9:AddTag("tempbuilding") for k = 1, 10 do local log = SpawnPrefab("log") building8.components.container:GiveItem(log) end else local building9 = SpawnPrefab("coldfirepit") building9.Transform:SetPosition(pt.x, 0, pt.z) building9.persists = false building9:AddTag("tempbuilding") for k = 1, 10 do local nitre = SpawnPrefab("nitre") building8.components.container:GiveItem(nitre) end end local building10 = SpawnPrefab("firesuppressor") building10.Transform:SetPosition(pt.x-4+3, 0, pt.z+4+3) building10.Transform:SetScale(0.8,0.8,0.8) building10.persists = false building10:AddTag("tempbuilding") local building11 = SpawnPrefab("eyeturret") building11.Transform:SetPosition(pt.x-4+1, 0, pt.z+4+1) building11.components.combat:SetAttackPeriod(0.5) if building11.components.machine then building11:RemoveComponent("machine") end building11.persists = false building11:AddTag("tempbuilding") local building12 = SpawnPrefab("pumpkin_lantern") building12.Transform:SetPosition(pt.x-4-2, 0, pt.z+4-2) building12.Transform:SetScale(1.5,1.5,1.5) building12.components.inventoryitem.canbepickedup = false building12.persists = false building12:AddTag("NOCLICK") building12:AddTag("tempbuilding") end else GetPlayer().SoundEmitter:PlaySound("dontstarve/HUD/research_available") inst:RemoveTag("campsite") local pos = Vector3(inst.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 3000) for k,v in pairs(ents) do if v:HasTag("tempbuilding") then v:Remove() end end end end ) 即可在身上有50个黄金时,在空旷的地方,按键盘B键租赁度假营地(身上黄金不足时无法租赁),再次按B键退房。度假营地外有围墙保护(鼠标左键点围墙可开门,5秒后自动关门),内有火堆、帐篷、锅、箱子、冰箱、南瓜灯等生活设施,还配有眼睛炮塔、灭火器、避雷针等安全设备,其中箱子里有火堆燃料(夏天为硝石,其余季节为木头),还提供一盏提灯供你外出使用,冰箱里有3份料理(品种随机),让你在野外也可以品尝新鲜美味。由于环保原因,度假营地为临时设施,存档退出后再读档,度假营地将消失,记得之前取出箱子中的私人物品哦

2025/04/23 · Bny

YN310-疯狂躲避球(用浣熊尾巴种躲避球场,在圈内60秒不被球打到,赢50个黄金)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 三一0.疯狂躲避球(用浣熊尾巴种躲避球场,在圈内60秒不被球打到,赢50个黄金) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/coontail.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function makecourt(inst) local pt = inst:GetPosition() local caddie = SpawnPrefab("coontail") caddie.Transform:SetPosition(pt.x, pt.y, pt.z) caddie.AnimState:SetBank("wilson") caddie.AnimState:SetBuild("wes") caddie.AnimState:OverrideSymbol("swap_hat", "hat_football", "swap_hat") caddie.AnimState:OverrideSymbol("swap_body", "armor_sweatervest", "swap_body") caddie.AnimState:Show("HAT") caddie.AnimState:Show("HAT_HAIR") caddie.AnimState:Hide("HAIR_NOHAT") caddie.AnimState:Hide("HAIR") caddie.AnimState:Hide("ARM_carry") caddie.AnimState:Show("ARM_normal") caddie.Transform:SetFourFaced() caddie.AnimState:PlayAnimation("idle") caddie:RemoveComponent("inventoryitem") caddie:RemoveComponent("stackable") caddie:RemoveComponent("deployable") caddie:RemoveTag("cattoy") caddie:AddComponent("workable") caddie.components.workable:SetWorkAction(ACTIONS.HAMMER) caddie.components.workable:SetWorkLeft(1) caddie.components.workable:SetOnFinishCallback(function(caddie) SpawnPrefab("collapse_big").Transform:SetPosition(caddie.Transform:GetWorldPosition()) GetPlayer().SoundEmitter:PlaySound("dontstarve/common/destroy_wood") GetPlayer().SoundEmitter:KillSound("beavermusic") local pos = Vector3(caddie.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 10) for k,v in pairs(ents) do if v:HasTag("border") or v:HasTag("landmine") then SpawnPrefab("collapse_big").Transform:SetPosition(v.Transform:GetWorldPosition()) v:Remove() end end caddie:Remove() end ) caddie:AddComponent("named") caddie.components.named:SetName("Pitcher") caddie:AddComponent("talker") caddie:AddComponent("trader") caddie.components.trader:SetAcceptTest(function(caddie, item) if not caddie:HasTag("startgame") then if GetPlayer().components.inventory:Has("goldnugget", 10) then if item.prefab == "goldnugget" then return true end end end return false end ) caddie.components.trader.onaccept = function(caddie, giver, item) caddie:AddTag("startgame") GetPlayer().components.inventory:ConsumeByName("goldnugget", 9) GetPlayer().SoundEmitter:PlaySound("dontstarve/HUD/research_available") caddie.components.talker:Say("Are you ready ?", 3, false) GetPlayer().SoundEmitter:PlaySound("dontstarve/music/music_hoedown", "beavermusic") for k = 1, 10 do local landmine = SpawnPrefab("coontail") landmine.Transform:SetPosition(pt.x+(math.random(7)-math.random(7)), 0, pt.z+(math.random(7)-math.random(7))) landmine.AnimState:SetBank("bee_mine") landmine.AnimState:SetBuild("bee_mine") landmine.AnimState:PlayAnimation("idle") landmine.Transform:SetScale(1.2, 1.2, 1.2) landmine.AnimState:SetMultColour(255/255,105/255,0/255,1) landmine.AnimState:SetBloomEffectHandle("shaders/anim.ksh") landmine:RemoveComponent("inventoryitem") landmine:RemoveComponent("stackable") landmine:RemoveComponent("deployable") landmine:RemoveTag("cattoy") landmine.persists = false landmine:DoPeriodicTask(0.01, function() local pos0 = Vector3(landmine.Transform:GetWorldPosition()) local ents0 = TheSim:FindEntities(pos0.x,pos0.y,pos0.z, 1) for k,v in pairs(ents0) do if v and v:HasTag("player") and not v:HasTag("pain")then v:AddTag("pain") v.sg:GoToState("hit") if v.components.health then v.components.health:DoDelta(-3) end v:DoTaskInTime(0.5, function() v:RemoveTag("pain") end ) end end end ) landmine:AddTag("landmine") end caddie:DoTaskInTime(3, function() caddie.components.talker:Say("Go !", 1, false) GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/equip_item_gold") caddie.task = caddie:DoPeriodicTask(0.4, function(caddie) local target = FindEntity(caddie, 9, function(guy) return guy:HasTag("player") end ) if target then caddie.Transform:SetRotation(GetPlayer().Transform:GetRotation() - 180) caddie.AnimState:PlayAnimation("give") local dodgeball = SpawnPrefab("coontail") dodgeball.AnimState:SetBank("bulb") dodgeball.AnimState:SetBuild("bulb") dodgeball.AnimState:PlayAnimation("idle") dodgeball.Transform:SetPosition(pt.x, 0, pt.z) dodgeball:RemoveComponent("inventoryitem") dodgeball:RemoveComponent("stackable") dodgeball:RemoveComponent("deployable") dodgeball:RemoveTag("cattoy") dodgeball.persists = false dodgeball:AddComponent("complexprojectile") dodgeball.components.complexprojectile.yOffset = 1 if math.random()<.5 then local targetpos = target:GetPosition() dodgeball.components.complexprojectile:Launch(targetpos) else dodgeball.components.complexprojectile:Launch(Point(pt.x+(math.random(9)-math.random(9)), 0, pt.z+(math.random(9)-math.random(9)))) end dodgeball.components.complexprojectile:SetOnHit(function() SpawnPrefab("small_puff").Transform:SetPosition(dodgeball.Transform:GetWorldPosition()) dodgeball:Remove() end ) dodgeball:DoPeriodicTask(0.01, function() local pos = Vector3(dodgeball.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 1) for k,v in pairs(ents) do if v and v:HasTag("player") then v.sg:GoToState("hit") if caddie.task then caddie.task:Cancel() caddie.task = nil end if caddie.task2 then caddie.task2:Cancel() caddie.task2 = nil end caddie.Transform:SetRotation( 0 ) caddie.AnimState:PlayAnimation("idle_onemanband1_loop",true) caddie:DoTaskInTime(2, function() caddie.AnimState:PlayAnimation("idle") end ) caddie.components.talker:Say("Game over !", 3, false) GetPlayer().SoundEmitter:PlaySound("dontstarve/creatures/eyeballturret/shotexplo") GetPlayer().SoundEmitter:KillSound("beavermusic") SpawnPrefab("collapse_small").Transform:SetPosition(dodgeball.Transform:GetWorldPosition()) dodgeball:Remove() local pos1 = Vector3(caddie.Transform:GetWorldPosition()) local ents1 = TheSim:FindEntities(pos1.x,pos1.y,pos1.z, 10) for k,v in pairs(ents1) do if v:HasTag("landmine") then v:Remove() end end caddie:RemoveTag("startgame") end end end ) else if caddie.task then caddie.task:Cancel() caddie.task = nil end if caddie.task2 then caddie.task2:Cancel() caddie.task2 = nil end caddie.Transform:SetRotation( 0 ) caddie.AnimState:PlayAnimation("idle_onemanband1_loop",true) caddie:DoTaskInTime(2, function() caddie.AnimState:PlayAnimation("idle") end ) caddie.components.talker:Say("Game over !", 3, false) GetPlayer().SoundEmitter:PlaySound("dontstarve/creatures/eyeballturret/shotexplo") GetPlayer().SoundEmitter:KillSound("beavermusic") local pos1 = Vector3(caddie.Transform:GetWorldPosition()) local ents1 = TheSim:FindEntities(pos1.x,pos1.y,pos1.z, 10) for k,v in pairs(ents1) do if v:HasTag("landmine") then v:Remove() end end caddie:RemoveTag("startgame") end end ) end ) caddie.task2 = caddie:DoTaskInTime(63, function() if caddie:HasTag("startgame") then if caddie.task then caddie.task:Cancel() caddie.task = nil end if caddie.task2 then caddie.task2:Cancel() caddie.task2 = nil end caddie.Transform:SetRotation( 0 ) caddie.AnimState:PlayAnimation("give") caddie.components.talker:Say("You win !", 3, false) GetPlayer().SoundEmitter:KillSound("beavermusic") caddie:StartThread(function() for k = 1, 10 do GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/equip_item_gold") Sleep(0.15) end end ) for k = 1, 50 do local goldnugget = SpawnPrefab("goldnugget") GetPlayer().components.inventory:GiveItem(goldnugget) end local pos1 = Vector3(caddie.Transform:GetWorldPosition()) local ents1 = TheSim:FindEntities(pos1.x,pos1.y,pos1.z, 10) for k,v in pairs(ents1) do if v:HasTag("landmine") then v:Remove() end end caddie:RemoveTag("startgame") end end ) end caddie:AddTag("caddie") for k = 1, 50 do local result_offset = FindValidPositionByFan(1 * 2 * PI, 8.5, 50, function(offset) local x,y,z = (pt + offset):Get() local ents = TheSim:FindEntities(x,y,z , 1) return not next(ents) end) if result_offset then local border = SpawnPrefab("coontail") border.Transform:SetPosition((pt + result_offset):Get()) border.AnimState:SetBank("bulb") border.AnimState:SetBuild("bulb") border.AnimState:PlayAnimation("idle") border.Transform:SetScale(1.2, 1.2, 1.2) border.AnimState:SetMultColour(255/255,0/255,0/255,1) border.AnimState:SetOrientation( ANIM_ORIENTATION.OnGround ) border.AnimState:SetLayer( LAYER_BACKGROUND ) border.AnimState:SetSortOrder( 1 ) border:RemoveComponent("inventoryitem") border:RemoveComponent("stackable") border:RemoveComponent("deployable") border:RemoveTag("cattoy") border:DoPeriodicTask(2, function(shopsign) border.AnimState:SetMultColour(0/255,255/255,0/255,1) border:DoTaskInTime(1, function() border.AnimState:SetMultColour(255/255,0/255,0/255,1) end ) end ) border:AddTag("NOCLICK") border:AddTag("border") end end end local function OnDeploy (inst, pt) makecourt(inst) inst.components.stackable:Get():Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy local function onsave(inst, data) if inst:HasTag("caddie") then data.caddie = true end if inst:HasTag("border") then data.border = true end end local function onload(inst, data) if data and data.caddie then makecourt(inst) inst:Remove() end if data and data.border then inst:Remove() end end inst.OnSave = onsave inst.OnLoad = onload 即可在空旷的地上,用浣熊尾巴种躲避球场(拿着1个浣熊尾巴对地面点鼠标右键,如果拿着多个,则不会种出来)。给投手10个黄金玩一次(拿着黄金对投手点鼠标左键),他会不断向你扔球,在不跑出圆圈边界、不被砸到的情况下,坚持60秒,就可赢得50个黄金的奖励。球场内会随机出现障碍物,碰到会被扎伤(减3点血),绕着点跑吧。不想要躲避球场了,用锤子砸投手即可

2025/04/23 · Bny

YN311-快速孵化高鸟蛋(游戏中1小时孵出小高鸟)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 三一一.快速孵化高鸟蛋(游戏中1小时孵出小高鸟) 用MT管理器打开游戏目录/assets/DLC0002/scripts/tuning.lua文件,将SMALLBIRD_HATCH_TIME = total_day_time * 3, -- must be content for this amount of cumulative time to hatch替换为以下内容: SMALLBIRD_HATCH_TIME = seg_time*1, 即可在游戏中1小时孵出小高鸟

2025/04/23 · Bny

YN312-青年高鸟不长大,增加血量及攻击力,喂食可重新认人

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 三一二.青年高鸟不长大,增加血量及攻击力,喂食可重新认人 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/smallbird.lua文件, 1.在--print("smallbird - OnGetItemFromPlayer")的下一行插入以下内容: local player = GetPlayer() if player and player.components.leader then player.components.leader:AddFollower(inst) end 2.将inst.components.combat:SetDefaultDamage(TUNING.TEENBIRD_DAMAGE)替换为inst.components.combat:SetDefaultDamage(TUNING.TEENBIRD_DAMAGE*5) 3.将return TUNING.TEENBIRD_GROW_TIME替换为return TUNING.TEENBIRD_GROW_TIME*1000 4.将inst.components.health:SetMaxHealth(TUNING.TEENBIRD_HEALTH)替换为inst.components.health:SetMaxHealth(TUNING.TEENBIRD_HEALTH*100) 即可让青年高鸟18000天不长大,血量30000,攻击力180,如果不认主角了,喂食即可重新认人

2025/04/23 · Bny

YN313-喂自养高鸟产便便

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 三一三.喂自养高鸟产便便 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/smallbird.lua文件,在local function OnEat(inst, food)的下一行插入以下内容: if food.components.edible then local poo = SpawnPrefab("poop") poo.Transform:SetPosition(inst.Transform:GetWorldPosition()) end 即可喂自养高鸟产便便

2025/04/23 · Bny

YN314-自养高鸟不用喂食

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 三一四.自养高鸟不用喂食 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/smallbird.lua文件,在inst:AddComponent("hunger")的下一行插入以下内容: inst.components.hunger.burning = false 即可让自养高鸟不用喂食,因为它不会自动掉饥饿值,除非受伤才须靠喂食补血

2025/04/23 · Bny

YN315-牙齿陷阱不伤害自养高鸟

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 三一五.牙齿陷阱不伤害自养高鸟 用MT管理器打开游戏目录/assets/scripts/prefabs/trap_teeth.lua文件,将if target then替换为if target and not target:HasTag("smallbird") then 即可让牙齿陷阱不伤害自养高鸟

2025/04/23 · Bny