游民星空 > 攻略秘籍 > 攻略 > 正文

饥荒 全人物解锁及主角自动回血等实用修改教程

2015-01-21 11:28:46 来源:互联网 作者:易宁 我要投稿

第307页:生物克隆机

展开

二五七.生物克隆机(用夜魔盔甲种克隆机,随身携带,大量克隆各种生物)

  用记事本打开游戏目录\data\DLC0001\scripts\prefabs\armor_sanity.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:

  local function itemtest(inst, item, slot)

  if item.prefab == "silk" or item.prefab == "houndstooth" or item.prefab == "beefalowool" or item.prefab == "tentaclespots" or item.prefab == "froglegs" or item.prefab == "stinger" or item.prefab == "mosquitosack" or item.prefab == "tallbirdegg" or item.prefab == "walrus_tusk" or item.prefab == "livinglog" or item.prefab == "bird_egg" or item.prefab == "trunk_summer" or item.prefab == "trunk_winter" or item.prefab == "deerclops_eyeball" or item.prefab == "fish" or item.prefab == "plantmeat" or item.prefab == "rocks" or item.prefab == "cave_banana" or item.prefab == "slurper_pelt" or item.prefab == "minotaurhorn" or item.prefab == "wormlight" or item.prefab == "slurtle_shellpieces" or item.prefab == "slurtleslime" or item.prefab == "batwing" or item.prefab == "manrabbit_tail" or item.prefab == "pigskin" or item.prefab == "lightninggoathorn" or item.prefab == "dragon_scales" or item.prefab == "goose_feather" or item.prefab == "bearger_fur" then

  return true

  end

  return false

  end

  local slotpos = { Vector3(0,-75,0)}

  local widgetbuttoninfo = {

  text = "GO",

  position = Vector3(0, -135, 0),

  fn = function(inst)

  if inst:HasTag("machines") then

  if not inst.components.container:IsEmpty() then

  for k,v in pairs(inst.components.container.slots) do

  if v and v.prefab == "silk" then inst.weirdo = "spiderqueen" end

  if v and v.prefab == "houndstooth" then inst.weirdo = "firehound" end

  if v and v.prefab == "beefalowool" then inst.weirdo = "beefalo" end

  if v and v.prefab == "tentaclespots" then inst.weirdo = "tentacle" end

  if v and v.prefab == "froglegs" then inst.weirdo = "frog" end

  if v and v.prefab == "stinger" then inst.weirdo = "killerbee" end

  if v and v.prefab == "mosquitosack" then inst.weirdo = "mosquito" end

  if v and v.prefab == "tallbirdegg" then inst.weirdo = "tallbird" end

  if v and v.prefab == "walrus_tusk" then inst.weirdo = "walrus" end

  if v and v.prefab == "livinglog" then inst.weirdo = "leif_sparse" end

  if v and v.prefab == "bird_egg" then inst.weirdo = "perd" end

  if v and v.prefab == "trunk_summer" then inst.weirdo = "koalefant_summer" end

  if v and v.prefab == "trunk_winter" then inst.weirdo = "koalefant_winter" end

  if v and v.prefab == "deerclops_eyeball" then inst.weirdo = "deerclops" end

  if v and v.prefab == "fish" then inst.weirdo = "merm" end

  if v and v.prefab == "plantmeat" then inst.weirdo = "lureplant" end

  if v and v.prefab == "rocks" then inst.weirdo = "rocky" end

  if v and v.prefab == "cave_banana" then inst.weirdo = "monkey" end

  if v and v.prefab == "slurper_pelt" then inst.weirdo = "slurper" end

  if v and v.prefab == "minotaurhorn" then inst.weirdo = "minotaur" end

  if v and v.prefab == "wormlight" then inst.weirdo = "worm" end

  if v and v.prefab == "slurtle_shellpieces" then inst.weirdo = "slurtle" end

  if v and v.prefab == "slurtleslime" then inst.weirdo = "snurtle" end

  if v and v.prefab == "batwing" then inst.weirdo = "bat" end

  if v and v.prefab == "manrabbit_tail" then inst.weirdo = "bunnyman" end

  if v and v.prefab == "pigskin" then inst.weirdo = "pigman" end

  if v and v.prefab == "lightninggoathorn" then inst.weirdo = "lightninggoat" end

  if v and v.prefab == "dragon_scales" then inst.weirdo = "dragonfly" end

  if v and v.prefab == "goose_feather" then inst.weirdo = "moose" end

  if v and v.prefab == "bearger_fur" then inst.weirdo = "bearger" end

  v:Remove()

  end

  local pt0 = Vector3(GetPlayer().Transform:GetWorldPosition())

  for k = 1, 20 do

  local result_offset = FindValidPositionByFan(1 * 2 * PI, 10, 20, 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 newweirdo = SpawnPrefab(inst.weirdo)

  newweirdo.Transform:SetPosition((pt0 + result_offset):Get())

  GetPlayer().components.playercontroller:ShakeCamera(inst, "FULL", 0.2, 0.02, .25, 40)

  local fx = SpawnPrefab("collapse_small")

  local pos = pt0 + result_offset

  fx.Transform:SetPosition(pos.x, pos.y, pos.z)

  end

  end

  end

  end

  end }

  local function OnDeploy (inst, pt)

  local machine = SpawnPrefab("armor_sanity")

  machine.Transform:SetPosition(pt.x, pt.y, pt.z)

  machine.AnimState:SetBank("rain_meter")

  machine.AnimState:SetBuild("rain_meter")

  machine.AnimState:PlayAnimation("meter", 0)

  machine.Transform:SetScale(0.5, 0.5, 0.5)

  machine:RemoveTag("sanity")

  machine:RemoveComponent("inventoryitem")

  machine:RemoveComponent("armor")

  machine:RemoveComponent("equippable")

  machine:RemoveComponent("deployable")

  machine.components.container.canbeopened = true

  machine:AddComponent("inventoryitem")

  machine.components.inventoryitem:ChangeImageName("rainometer")

  machine:AddComponent("equippable")

  machine.components.equippable.equipslot = EQUIPSLOTS.BODY

  machine.components.equippable.walkspeedmult = TUNING.CANE_SPEED_MULT*2

  machine.components.equippable:SetOnEquip( function(machine)

  GetPlayer().components.inventory:SetOverflow(machine)

  machine.components.container:Open(GetPlayer())

  GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/backpack_open", "open")

  GetPlayer():Hide()

  local shadow = GetPlayer().entity:AddDynamicShadow()

  shadow:SetSize( 0, 0 )

  end )

  machine.components.equippable:SetOnUnequip( function(machine)

  machine.components.container:Close(GetPlayer())

  GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/backpack_close", "open")

  GetPlayer():Show()

  local shadow = GetPlayer().entity:AddDynamicShadow()

  shadow:SetSize( 1.3, .6 )

  end )

  machine:AddTag("machines")

  inst:Remove()

  end

  inst:AddComponent("deployable")

  inst.components.deployable.ondeploy = OnDeploy

  local function onsave(inst, data)

  if inst:HasTag("machines") then

  data.machines = true

  end

  end

  local function onload(inst, data)

  if data and data.machines then

  inst.AnimState:SetBank("rain_meter")

  inst.AnimState:SetBuild("rain_meter")

  inst.AnimState:PlayAnimation("meter", 0)

  inst.Transform:SetScale(0.5, 0.5, 0.5)

  inst:RemoveTag("sanity")

  inst:RemoveComponent("inventoryitem")

  inst:RemoveComponent("armor")

  inst:RemoveComponent("equippable")

  inst:RemoveComponent("deployable")

  inst.components.container.canbeopened = true

  inst:AddComponent("inventoryitem")

  inst.components.inventoryitem:ChangeImageName("rainometer")

  inst:AddComponent("equippable")

  inst.components.equippable.equipslot = EQUIPSLOTS.BODY

  inst.components.equippable.walkspeedmult = TUNING.CANE_SPEED_MULT*2

  inst.components.equippable:SetOnEquip( function(inst)

  GetPlayer().components.inventory:SetOverflow(inst)

  inst.components.container:Open(GetPlayer())

  GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/backpack_open", "open")

  GetPlayer():Hide()

  local shadow = GetPlayer().entity:AddDynamicShadow()

  shadow:SetSize( 0, 0 )

  end )

  inst.components.equippable:SetOnUnequip( function(inst)

  inst.components.container:Close(GetPlayer())

  GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/backpack_close", "open")

  GetPlayer():Show()

  local shadow = GetPlayer().entity:AddDynamicShadow()

  shadow:SetSize( 1.3, .6 )

  end )

  inst:AddTag("machines")

  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(-80,150,0)

  inst.components.container.side_widget = true

  inst.components.container.itemtestfn = itemtest

  inst.components.container.widgetbuttoninfo = widgetbuttoninfo

  inst.components.container.acceptsstacks = false

  inst.components.container.canbeopened = false

  即可用夜魔盔甲种克隆机,装备克隆机后主角隐身(以免遭怪物围攻),屏幕右侧会出现格子和按钮,在格子中放入1个生物掉落的物品,按GO按钮,就可以克隆20个该生物,具体为:蜘蛛丝克隆蜘蛛女王、犬牙克隆火狗、牛毛克隆牛、触手皮克隆触手、蛙腿克隆青蛙、蜂刺克隆杀人蜂、蚊子血囊克隆蚊子、高鸟蛋克隆大高鸟、海象牙克隆海象、活木头克隆树精、鸡蛋克隆火鸡、夏象鼻克隆夏象、冬象鼻克隆冬象、巨鹿眼球克隆巨鹿、鱼克隆鱼人、食人花肉克隆食人花、岩石克隆龙虾、香蕉克隆猴子、缀食者皮克隆缀食者、远古守护者角克隆远古守护者、虫子果克隆虫子、蜗牛龟壳片克隆蜗牛龟、蜗牛龟粘液克隆黏糊虫、蝙蝠翅膀克隆蝙蝠、兔人尾巴克隆兔人、猪皮克隆猪人、闪电羊角克隆闪电羊、蜻蜓鳞片克隆蜻蜓、熊皮克隆熊、鹿鸭羽毛克隆鹿鸭。卸载克隆机后主角现身。拥有克隆机,让你有无限的怪物可刷,也可用于以怪制怪,比如在牛群里制造触手,在蜘蛛群里释放杀人蜂等,创造一个生机勃勃的世界吧。夜魔盔甲在魔法选项(画着红骷髅)下用5个噩梦燃料、3张纸制造

更多相关内容请关注:饥荒专区

责任编辑:Shy夏夏

上一页 301 302 303 304 305 306 307 308 309 310 311 下一页
友情提示:支持键盘左右键“← →”翻页

本文是否解决了您的问题

文章内容导航
游民星空APP
随手浏览游戏攻略
code
攻略合集
单机游戏下载
休闲娱乐
综合热点资讯
游民星空联运游戏