inst.animname = names[math.random(#names)] if eater:HasTag(\
eater.AnimState:SetBuild(inst.animname)
SpawnPrefab(\ end end
inst.components.edible:SetOnEatenFn(item_oneaten)
即可无须开新档,靠吃疯肉就让主角随机变成其他主角的形象,变身后小地图显示不变,原主角技能也不变,该长胡子的还是会长胡子哦。想恢复原主角形象,存档退出后再读档即可。变身不会变成麦斯威尔和伍迪
一七九.毒龙兵团(装备暗影剑召唤坎普斯士兵)
1.用记事本打开游戏目录\\data\\scripts\\prefabs\\nightsword.lua文件,将下列内容:
inst:AddComponent(\
inst.components.dapperness.dapperness = TUNING.CRAZINESS_MED,
替换为:
local function cancreatelight(staff, caster, target, pos) local ground = GetWorld() if ground and pos then
local tile = ground.Map:GetTileAtPoint(pos.x, pos.y, pos.z)
return tile ~= GROUND.IMPASSIBLE and tile < GROUND.UNDERGROUND end
return false end
local function createlight(staff, target, pos) local light = SpawnPrefab(\
light.Transform:SetPosition(pos.x, pos.y, pos.z) local caster = staff.components.inventoryitem.owner end
inst:AddComponent(\
inst.components.spellcaster:SetSpellFn(createlight)
inst.components.spellcaster:SetSpellTestFn(cancreatelight) inst.components.spellcaster.canuseonpoint = true
inst.components.spellcaster.canusefrominventory = false
2.用记事本打开游戏目录\\data\\scripts\\prefabs\\krampus.lua文件,将下列内容:
local function OnAttacked(inst, data)
inst.components.combat:SetTarget(data.attacker)
--inst.components.combat:ShareTarget(data.attacker, SEE_DIST, function(dude) dude:HasTag(\end
return 替换为:
local function Retarget(inst)
local newtarget = FindEntity(inst, 20, function(guy) return guy.components.combat and
inst.components.combat:CanTarget(guy) and (guy.components.combat.target == GetPlayer() or GetPlayer().components.combat.target == guy) end)
return newtarget end
local function OnAttacked(inst, data) local attacker = data.attacker
if attacker and attacker:HasTag(\ inst.components.health:SetVal(0) else
inst.components.combat:SetTarget(attacker) end end
3.将local brain = require \替换为local brain = require \
4.将下列内容:
inst:AddComponent(\ inst:AddComponent(\
inst.components.health:SetMaxHealth(TUNING.KRAMPUS_HEALTH)
inst:AddComponent(\
inst.components.combat.hiteffectsymbol = \
inst.components.combat:SetDefaultDamage(TUNING.KRAMPUS_DAMAGE)
inst.components.combat:SetAttackPeriod(TUNING.KRAMPUS_ATTACK_PERIOD)
替换为:
inst:AddComponent(\
inst.components.health:SetMaxHealth(TUNING.KRAMPUS_HEALTH*10) inst:AddComponent(\ inst:AddComponent(\
inst.components.combat.hiteffectsymbol = \
inst.components.combat:SetDefaultDamage(TUNING.KRAMPUS_DAMAGE*10)
inst.components.combat:SetAttackPeriod(TUNING.KRAMPUS_ATTACK_PERIOD*.1) inst.components.combat:SetRetargetFunction(3, Retarget) inst.AnimState:Hide(\ inst.AnimState:Show(\
即可装备暗影剑时,在空地上按鼠标右键召唤坎普斯士兵。坎普斯经过了深度改造,不会偷东西,只会为主角浴血奋战。不想要坎普斯跟随时,杀死它即可,它虽然强悍,但主角对它一击毙命
一八0.光阴似箭(对指南针按右键跳到下个时段)
用记事本打开游戏目录\\data\\scripts\\prefabs\\compass.lua文件,在local function GetStatus(inst, viewer)的下一行插入GetClock():NextPhase()
即可对指南针按右键跳到下个时段,即白天变傍晚、傍晚变黑夜、黑夜变白天,采蘑菇、捉萤火虫等有时段要求的事情,无须再等待了
一八一.迷魂花阵(戴花环周围出现食人花眼睛保护主角)
1.用记事本打开游戏目录\\data\\scripts\\prefabs\\hats.lua文件,将下列内容: inst:AddComponent(\ inst.components.perishable:SetPerishTime(TUNING.PERISH_FAST) inst.components.perishable:StartPerishing() inst.components.perishable:SetOnPerishFn(generic_perish) inst.components.equippable:SetOnEquip( opentop_onequip )
替换为:
local function flower_equip(inst, owner) opentop_onequip(inst, owner)
inst:AddComponent(\
inst.components.minionspawner.miniontype = \ inst.components.minionspawner.maxminions = 27
inst.components.minionspawner.minionspawntime = {min = 0.01, max = 0.01} inst.components.minionspawner.numminions = 10 inst.components.minionspawner.shouldspawn = true inst.components.minionspawner:StartNextSpawn() end
local function flower_unequip(inst, owner) onunequip(inst, owner)
inst.components.minionspawner.shouldspawn = false inst.components.minionspawner:KillAllMinions() inst:RemoveComponent(\ end
inst.components.equippable:SetOnEquip( flower_equip )
inst.components.equippable:SetOnUnequip( flower_unequip )
2.用记事本打开游戏目录\\data\\scripts\\prefabs\\eyeplant.lua文件,将下列内容:
return (guy:HasTag(\or guy:HasTag(\or guy:HasTag(\or guy:HasTag(\or guy:HasTag(\or guy:HasTag(\and not checkmaster(guy, inst)
替换为:
return (guy:HasTag(\or guy:HasTag(\or guy:HasTag(\or guy:HasTag(\or guy:HasTag(\or guy:HasTag(\and not guy:HasTag(\
即可戴花环周围出现食人花眼睛保护主角,食人花眼睛被敌人打死一个又会再生一个。摘下花环,食人花眼睛立即消失
一八二.大时代里的微光(头戴萤火虫照亮四周)
用记事本打开游戏目录\\data\\scripts\\prefabs\\fireflies.lua文件,
1.将light:SetRadius(1)替换为light:SetRadius(5)
2.在inst:AddComponent(\的下一行插入以下内容:
local function onequip(inst, owner)
inst.fire = SpawnPrefab( \
local follower = inst.fire.entity:AddFollower()
follower:FollowSymbol( inst.GUID, \ inst.Light:Enable(true) end
local function onunequip(inst, owner) inst.fire:Remove() inst.fire = nil
inst.Light:Enable(false) end
inst:AddComponent(\
inst.components.equippable:SetOnEquip( onequip )
inst.components.equippable:SetOnUnequip( onunequip )
inst.components.equippable.equipslot = EQUIPSLOTS.HEAD
即可将捉来的萤火虫戴在头上照亮四周。每一个人都是大时代里的微光,当我们在一起,像数以万计的萤火,也可将黑夜点亮
一八三.御风飞翔(装备羽毛飞翔10秒)
用记事本打开游戏目录\\data\\scripts\\prefabs\\feathers.lua文件,在inst:AddComponent(\的下一行插入以下内容:
local function onequip(inst, owner)
inst.fire = SpawnPrefab( \ local follower = inst.fire.entity:AddFollower()
follower:FollowSymbol( inst.GUID, \ local pt = owner:GetPosition()
owner.Transform:SetPosition(pt.x, pt.y+30, pt.z) inst:DoTaskInTime(10, function() local pt = owner:GetPosition()
owner.Transform:SetPosition(pt.x, pt.y-30, pt.z) inst:Remove() end) end
local function onunequip(inst, owner) local pt = owner:GetPosition()
owner.Transform:SetPosition(pt.x, pt.y-30, pt.z) inst.fire:Remove() inst.fire = nil end
inst:AddComponent(\
inst.components.equippable:SetOnEquip( onequip )
inst.components.equippable:SetOnUnequip( onunequip )
inst.components.equippable.equipslot = EQUIPSLOTS.HEAD
inst.components.equippable.walkspeedmult = TUNING.CANE_SPEED_MULT*5
即可装备羽毛飞翔10秒,体会饥荒世界从未有过的美妙感觉,洞穴也可飞行。10秒后羽毛被耗尽,想飞就要多捕鸟哦。注意飞行时不要佩戴橙色护身符和带宠物
一八四.死神之光(拿提灯时右键点空地,满屏敌人通杀)
用记事本打开游戏目录\\data\\scripts\\prefabs\\mininglantern.lua文件,在inst:AddComponent(\的下一行插入以下内容:
local function cancreatelight(staff, caster, target, pos)
local fuelpercent = inst.components.fueled:GetPercent() if fuelpercent > 0.5 then return true else
return false end end
local function createlight(staff, target, pos) local SHAKE_DIST = 40
local player = GetClosestInstWithTag(\ if player then
player.components.playercontroller:ShakeCamera(inst, \1, 0.03, 2, SHAKE_DIST) end
inst:DoTaskInTime(0, function()
inst.components.combat:DoAreaAttack(inst, 30) end)
GetClock():DoLightningLighting() inst.components.fueled.currentfuel = 50 end
inst:AddComponent(\
inst.components.spellcaster:SetSpellFn(createlight)