YN062-用蘑菇种蘑菇(蘑菇可移植)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 六十二.用蘑菇种蘑菇(蘑菇可移植) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/mushrooms.lua文件,在inst.AnimState:PlayAnimation(data.animname.."_cap")的下一行插入以下内容: local function OnDeploy (inst, pt) SpawnPrefab(data.animname.."_mushroom").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

YN063-用苔藓种苔藓(苔藓可移植)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 六十三.用苔藓种苔藓(苔藓可移植) 用MT管理器打开游戏目录/assets/scripts/prefabs/cutlichen.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function OnDeploy (inst, pt) SpawnPrefab("lichen").Transform:SetPosition(pt.x, pt.y, pt.z) inst.components.stackable:Get():Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy 即可用苔藓种苔藓,使苔藓可移植。不要与“奶报箱(用苔藓种奶报箱,放入黄金,每天清晨送来报纸和5瓶牛奶,读报纸可补脑)”一同修改

2025/04/23 · Bny

YN064-用荧光果种三朵洞穴花

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 六十四.用荧光果种三朵洞穴花 用MT管理器打开游戏目录/assets/scripts/prefabs/lightbulb.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function OnDeploy (inst, pt) SpawnPrefab("flower_cave_triple").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

YN065-铲掉洞穴花得荧光果

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 六十五.铲掉洞穴花得荧光果 用MT管理器打开游戏目录/assets/scripts/prefabs/flower_cave.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function dig_up(inst, chopper) inst.components.lootdropper:SpawnLootPrefab("lightbulb") inst:Remove() end inst:AddComponent("workable") inst.components.workable:SetWorkAction(ACTIONS.DIG) inst.components.workable:SetOnFinishCallback(dig_up) inst.components.workable:SetWorkLeft(1) 即可用铲子铲掉洞穴花得荧光果,使洞穴花可以被移除

2025/04/23 · Bny

YN066-缩短草、树杈、尖刺灌木、洞穴花、苔藓、浆果、芦苇长出时间

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 六十六.缩短草、树杈、尖刺灌木、洞穴花、苔藓、浆果、芦苇长出时间 用MT管理器打开游戏目录/assets/DLC0002/scripts/tuning.lua文件, 1.将下列内容: GRASS_REGROW_TIME = total_day_time*3, SAPLING_REGROW_TIME = total_day_time*4, MARSHBUSH_REGROW_TIME = total_day_time*4, CACTUS_REGROW_TIME = total_day_time*4, FLOWER_CAVE_REGROW_TIME = total_day_time*3, LICHEN_REGROW_TIME = total_day_time*5, BERRY_REGROW_TIME = total_day_time*3, 替换为: GRASS_REGROW_TIME = total_day_time*1, SAPLING_REGROW_TIME = total_day_time*1, MARSHBUSH_REGROW_TIME = total_day_time*1, CACTUS_REGROW_TIME = total_day_time*1, FLOWER_CAVE_REGROW_TIME = total_day_time*1, LICHEN_REGROW_TIME = total_day_time*1, BERRY_REGROW_TIME = total_day_time*1, 2.将REEDS_REGROW_TIME = total_day_time*3,替换为REEDS_REGROW_TIME = total_day_time*1, 即可让这些植物1天长1次

2025/04/23 · Bny

YN067-冬天草、树杈、蘑菇、香蕉树、苔藓、浆果、芦苇也生长

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 六十七.冬天草、树杈、蘑菇、香蕉树、苔藓、浆果、芦苇也生长 用MT管理器打开游戏目录/assets/DLC0002/scripts/standardcomponents.lua文件,将inst.components.pickable:Pause()替换为inst.components.pickable:Resume() 即可让植物冬天也生长。注意如果存档已经是冬天,植物已经停止生长,那么只有将植物挖起来再种下,才会在冬天继续生长

2025/04/23 · Bny

YN068-生命号角(吹牛角让农田和植物迅速长出)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 六十八.生命号角(吹牛角让农田和植物迅速长出) 用MT管理器打开游戏目录/assets/scripts/prefabs/horn.lua文件, 1.在下列内容: local function onfinished(inst) inst:Remove() end 的下一行插入以下内容: function growfn(inst, reader) local pos = Vector3(reader.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 30) for k,v in pairs(ents) do if v.components.pickable then v.components.pickable:FinishGrowing() end if v.components.crop then v.components.crop:DoGrow(TUNING.TOTAL_DAY_TIME*3) end if v:HasTag("tree") and v.components.growable and not v:HasTag("stump") then v.components.growable:DoGrowth() end end end 2.将下列内容: inst.components.instrument.range = TUNING.HORN_RANGE inst.components.instrument:SetOnHeardFn(HearHorn) 替换为: inst.components.instrument.onheard = growfn 即可在采集过的植物根附近吹牛角,使植物瞬间生长出来,小树也可以长成大树,牛角原有让牛跟随功能失效

2025/04/23 · Bny

YN069-农田收获更多产品

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 六十九.农田收获更多产品 用MT管理器打开游戏目录/assets/DLC0002/scripts/components/crop.lua文件,将以下内容: harvester.components.inventory:GiveItem(product) 替换为: harvester.components.inventory:GiveItem(SpawnPrefab(self.product_prefab)) harvester.components.inventory:GiveItem(SpawnPrefab(self.product_prefab)) harvester.components.inventory:GiveItem(SpawnPrefab(self.product_prefab)) 即可一次收获3个产品,想收获多少,就复制多少行harvester.components.inventory:GiveItem(SpawnPrefab(self.product_prefab))即可

2025/04/23 · Bny

YN070-农作物1秒长出来

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 七十.农作物1秒长出来 1.用MT管理器打开游戏目录/assets/scripts/prefabs/seeds.lua文件,将inst.components.plantable.growtime = TUNING.SEEDS_GROW_TIME替换为inst.components.plantable.growtime = TUNING.SEEDS_GROW_TIME*0 2.用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/veggies.lua文件,将inst.components.plantable.growtime = TUNING.SEEDS_GROW_TIME替换为inst.components.plantable.growtime = TUNING.SEEDS_GROW_TIME*0 即可让所有农作物1秒长出

2025/04/23 · Bny

YN071-冬天农作物也生长

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 七十一.冬天农作物也生长 用MT管理器打开游戏目录/assets/DLC0002/scripts/tuning.lua文件,将MIN_CROP_GROW_TEMP = 5,替换为MIN_CROP_GROW_TEMP = -100, 即可让农作物在冬天也生长

2025/04/23 · Bny