饥荒mod吧 关注:57,832贴子:235,542
  • 34回复贴,共1

『04-21』【问题求助】自制人物mod进游戏后变透明

只看楼主收藏回复

楼主特别喜欢夏洛克= =于是乎打算自己做一个夏洛克
根据这个贴的教程http://tieba.baidu.com/p/2389518224,完成后进入游戏,发现我做完的人物是透明的,也就是在游戏里完全看不见我的人物。。。相当于人物消失了、、玩还是能正常玩
不知道是哪一步出了问题。。。在线等待解决~~


IP属地:上海1楼2014-04-21 13:59回复
    额= =那个教程的地址发错了 是这个http://tieba.baidu.com/p/2462089633
    我怀疑是贴图除了问题 可明明是按照上面做的吖


    IP属地:上海2楼2014-04-21 14:01
    回复
      不知道坟帖吗?不知道的士大半年前就不玩了吗?影子没有吗?夜魔查理不打你吗?TeXCRATor的“ALpha”不打勾吗?蜘蛛猎狗没追吗?是真的没人还是其他生物都看到你就你看不到你吗


      IP属地:中国台湾来自Android客户端3楼2014-04-21 16:28
      收起回复

        我说的是TEXCreator的“ALpha”
        另外大半年前的老帖别回,我有强迫症


        IP属地:中国台湾4楼2014-04-21 19:15
        收起回复
          两个都打勾,或者对着其他人物的anim贴图(比如坟贴里的赵云、ezio)确认一下图片正脸、背面、手脚、表情等位置


          IP属地:中国台湾6楼2014-04-22 11:25
          收起回复
            @自语着503
            灰常感谢~!!!再问最后一个问题,我想要拿着武器A时自动回复脑残值,应该添加什么代码呢?
            我找到这两个代码
            ①天生自带SAN回复 inst.components.sanity.dapperness = TUNING.DAPPERNESS_LARGE
            将LARGE改为以下语句则可以调整回复速度
            ②inst:AddComponent("sanityaura")
            inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL
            第一个是用于人物角色,第二个虽然是用于武器,但却是靠近回复san值,而不是我需要的拿在手上装备回复san值。。。。


            IP属地:上海8楼2014-04-22 23:05
            收起回复
              = =原谅我真的一句都看不懂 完全没学过
              这是影刀的 不知道哪一句是管恢复脑残的
              @自语着503
              local assets=
              {
              Asset("ANIM", "data/anim/nightmaresword.zip"),
              Asset("ANIM", "data/anim/swap_nightmaresword.zip"),
              }
              local function onfinished(inst)
              inst:Remove()
              end
              local function onequip(inst, owner)
              owner.AnimState:OverrideSymbol("swap_object", "swap_nightmaresword", "swap_nightmaresword")
              owner.AnimState:Show("ARM_carry")
              owner.AnimState:Hide("ARM_normal")
              end
              local function onunequip(inst, owner)
              owner.AnimState:Hide("ARM_carry")
              owner.AnimState:Show("ARM_normal")
              end
              local function fn(Sim)
              local inst = CreateEntity()
              local trans = inst.entity:AddTransform()
              local anim = inst.entity:AddAnimState()
              MakeInventoryPhysics(inst)
              inst.AnimState:SetBank("nightmaresword")
              inst.AnimState:SetBuild("nightmaresword")
              inst.AnimState:PlayAnimation("idle")
              inst.AnimState:SetMultColour(1, 1, 1, 0.6)
              inst:AddTag("shadow")
              inst:AddTag("sharp")
              inst:AddComponent("weapon")
              inst.components.weapon:SetDamage(TUNING.NIGHTSWORD_DAMAGE)
              -------
              inst:AddComponent("finiteuses")
              inst.components.finiteuses:SetMaxUses(TUNING.NIGHTSWORD_USES)
              inst.components.finiteuses:SetUses(TUNING.NIGHTSWORD_USES)
              inst.components.finiteuses:SetOnFinished( onfinished )
              inst:AddComponent("inspectable")
              inst:AddComponent("inventoryitem")
              inst:AddComponent("dapperness")
              inst.components.dapperness.dapperness = TUNING.CRAZINESS_MED,
              inst:AddComponent("equippable")
              inst.components.equippable:SetOnEquip( onequip )
              inst.components.equippable:SetOnUnequip( onunequip )
              return inst
              end
              return Prefab( "common/inventory/nightsword", fn, assets)


              IP属地:上海9楼2014-04-22 23:16
              收起回复
                local assets=
                {
                Asset("ANIM", "data/anim/nightmaresword.zip"),
                Asset("ANIM", "data/anim/swap_nightmaresword.zip"),
                }
                local function onfinished(inst)
                inst:Remove()
                end
                local function onequip(inst, owner)规定装备时效果
                owner.AnimState:OverrideSymbol("swap_object", "swap_nightmaresword", "swap_nightmaresword")
                owner.AnimState:Show("ARM_carry") 人物显示为装备武器姿态
                owner.AnimState:Hide("ARM_normal") 人物显示为无武器姿态
                end
                local function onunequip(inst, owner) 规定卸下装备效果
                owner.AnimState:Hide("ARM_carry") 人物显示为无武器姿态
                owner.AnimState:Show("ARM_normal") 人物显示为装备武器姿态
                end
                local function fn(Sim)主方法
                local inst = CreateEntity()
                local trans = inst.entity:AddTransform()
                local anim = inst.entity:AddAnimState()
                MakeInventoryPhysics(inst)
                inst.AnimState:SetBank("nightmaresword")
                inst.AnimState:SetBuild("nightmaresword")武器外形为影刀
                inst.AnimState:PlayAnimation("idle")引入动画
                inst.AnimState:SetMultColour(1, 1, 1, 0.6)可能是颜色
                inst:AddTag("shadow")标签
                inst:AddTag("sharp")
                inst:AddComponent("weapon")引入方法:武器
                inst.components.weapon:SetDamage(TUNING.NIGHTSWORD_DAMAGE)
                -------
                inst:AddComponent("finiteuses")引入方法:耐久
                inst.components.finiteuses:SetMaxUses(TUNING.NIGHTSWORD_USES)
                inst.components.finiteuses:SetUses(TUNING.NIGHTSWORD_USES)
                inst.components.finiteuses:SetOnFinished( onfinished )
                inst:AddComponent("inspectable")可检阅
                inst:AddComponent("inventoryitem")可放包里
                inst:AddComponent("dapperness") !------------------------------!想象成代数X,那
                inst.components.dapperness.dapperness = TUNING.CRAZINESS_MED,么加个-就行
                inst:AddComponent("equippable")
                inst.components.equippable:SetOnEquip( onequip )使用装备时效果
                inst.components.equippable:SetOnUnequip( onunequip )使用卸下装备时效果
                return inst
                end
                return Prefab( "common/inventory/nightsword", fn, assets)
                下面跟脑残无关
                在scripts/prefabs/soa.lua里,开头部分,应该加入这么两句话:
                Asset("IMAGE", "images/inventoryimages/soa.tex"),
                Asset("ATLAS", "images/inventoryimages/soa.xml"),
                在inst:AddComponent("inventoryitem")的那一行下加入以下这句话:
                inst.components.inventoryitem.atlasname = "images/inventoryimages/soa.xml"


                IP属地:中国台湾10楼2014-04-23 08:57
                收起回复
                  22版是可以这么改的,DLC不行,不知道为什么。LZ用的DLC吗


                  IP属地:中国台湾12楼2014-04-24 20:29
                  收起回复
                    @自语着503 这是我在Don't starve\data\scripts\prefabs\hats里找到的代码
                    奇怪的是,海象帽、花环什么的都能回复脑残,照理说我应该能找到一段相同的代码(除了后面了SMALL、MED什么的不一样),那段代码便是回复脑残的。但是居然没有找到。。。


                    IP属地:上海13楼2014-04-24 21:13
                    回复
                      function MakeHat(name)
                      local fname = "hat_"..name
                      local symname = name.."hat"
                      local texture = symname..".tex"
                      local prefabname = symname
                      local assets=
                      {
                      Asset("ANIM", "anim/"..fname..".zip"),
                      --Asset("IMAGE", texture),
                      }
                      if name == "miner" then
                      table.insert(assets, Asset("ANIM", "anim/hat_miner_off.zip"))
                      end
                      local function onequip(inst, owner, fname_override)
                      local build = fname_override or fname
                      owner.AnimState:OverrideSymbol("swap_hat", build, "swap_hat")
                      owner.AnimState:Show("HAT")
                      owner.AnimState:Show("HAT_HAIR")
                      owner.AnimState:Hide("HAIR_NOHAT")
                      owner.AnimState:Hide("HAIR")
                      if owner:HasTag("player") then
                      owner.AnimState:Hide("HEAD")
                      owner.AnimState:Show("HEAD_HAIR")
                      end
                      if inst.components.fueled then
                      inst.components.fueled:StartConsuming()
                      end
                      end
                      local function onunequip(inst, owner)
                      owner.AnimState:Hide("HAT")
                      owner.AnimState:Hide("HAT_HAIR")
                      owner.AnimState:Show("HAIR_NOHAT")
                      owner.AnimState:Show("HAIR")
                      if owner:HasTag("player") then
                      owner.AnimState:Show("HEAD")
                      owner.AnimState:Hide("HEAD_HAIR")
                      end
                      if inst.components.fueled then
                      inst.components.fueled:StopConsuming()
                      end
                      end
                      local function opentop_onequip(inst, owner)
                      owner.AnimState:OverrideSymbol("swap_hat", fname, "swap_hat")
                      owner.AnimState:Show("HAT")
                      owner.AnimState:Hide("HAT_HAIR")
                      owner.AnimState:Show("HAIR_NOHAT")
                      owner.AnimState:Show("HAIR")
                      owner.AnimState:Show("HEAD")
                      owner.AnimState:Hide("HEAD_HAIR")
                      if inst.components.fueled then
                      inst.components.fueled:StartConsuming()
                      end
                      end
                      local function simple()
                      local inst = CreateEntity()
                      inst.entity:AddTransform()
                      inst.entity:AddAnimState()
                      MakeInventoryPhysics(inst)
                      inst.AnimState:SetBank(symname)
                      inst.AnimState:SetBuild(fname)
                      inst.AnimState:PlayAnimation("anim")
                      inst:AddTag("hat")
                      inst:AddComponent("inspectable")
                      inst:AddComponent("inventoryitem")
                      inst:AddComponent("tradable")
                      inst:AddComponent("equippable")
                      inst.components.equippable.equipslot = EQUIPSLOTS.HEAD
                      inst.components.equippable:SetOnEquip( onequip )
                      inst.components.equippable:SetOnUnequip( onunequip )
                      return inst
                      end
                      local function bee()
                      local inst = simple()
                      inst:AddComponent("armor")
                      inst.components.armor:InitCondition(TUNING.ARMOR_BEEHAT, TUNING.ARMOR_BEEHAT_ABSORPTION)
                      inst.components.armor:SetTags({"bee"})
                      return inst
                      end
                      local function generic_perish(inst)
                      inst:Remove()
                      end
                      local function earmuffs()
                      local inst = simple()
                      inst:AddComponent("insulator")
                      inst.components.insulator.insulation = TUNING.INSULATION_SMALL
                      inst.components.equippable:SetOnEquip( opentop_onequip )
                      inst:AddComponent("fueled")
                      inst.components.fueled.fueltype = "USAGE"
                      inst.components.fueled:InitializeFuelLevel(TUNING.EARMUFF_PERISHTIME)
                      inst.components.fueled:SetDepletedFn(generic_perish)
                      inst.AnimState:SetRayTestOnBB(true)
                      return inst
                      end
                      local function winter()
                      local inst = simple()
                      inst:AddComponent("dapperness")
                      inst.components.dapperness.dapperness = TUNING.DAPPERNESS_TINY
                      inst:AddComponent("insulator")
                      inst.components.insulator.insulation = TUNING.INSULATION_MED
                      inst:AddComponent("fueled")
                      inst.components.fueled.fueltype = "USAGE"
                      inst.components.fueled:InitializeFuelLevel(TUNING.WINTERHAT_PERISHTIME)
                      inst.components.fueled:SetDepletedFn(generic_perish)
                      return inst
                      end
                      local function football()
                      local inst = simple()
                      inst:AddComponent("armor")
                      inst.components.armor:InitCondition(TUNING.ARMOR_FOOTBALLHAT, TUNING.ARMOR_FOOTBALLHAT_ABSORPTION)
                      return inst
                      end
                      local function ruinshat_proc(inst, owner)
                      inst:AddTag("forcefield")
                      inst.components.armor:SetAbsorption(TUNING.FULL_ABSORPTION)
                      local fx = SpawnPrefab("forcefieldfx")
                      fx.entity:SetParent(owner.entity)
                      fx.Transform:SetPosition(0, 0.2, 0)
                      local fx_hitanim = function()
                      fx.AnimState:PlayAnimation("hit")
                      fx.AnimState:PushAnimation("idle_loop")
                      end
                      fx:ListenForEvent("blocked", fx_hitanim, owner)
                      inst.components.armor.ontakedamage = function(inst, damage_amount)
                      if owner then
                      local sanity = owner.components.sanity
                      if sanity then
                      local unsaneness = damage_amount * TUNING.ARMOR_RUINSHAT_DMG_AS_SANITY
                      sanity:DoDelta(-unsaneness, false)
                      end
                      end
                      end
                      inst.active = true
                      owner:DoTaskInTime(--[[Duration]] TUNING.ARMOR_RUINSHAT_DURATION, function()
                      fx:RemoveEventCallback("blocked", fx_hitanim, owner)
                      fx.kill_fx(fx)
                      if inst:IsValid() then
                      inst:RemoveTag("forcefield")
                      inst.components.armor.ontakedamage = nil
                      inst.components.armor:SetAbsorption(TUNING.ARMOR_RUINSHAT_ABSORPTION)
                      owner:DoTaskInTime(--[[Cooldown]] TUNING.ARMOR_RUINSHAT_COOLDOWN, function() inst.active = false end)
                      end
                      end)
                      end


                      IP属地:上海14楼2014-04-24 21:15
                      回复
                        太长了。。。发不完。。。。。


                        IP属地:上海15楼2014-04-24 21:16
                        回复
                          我只知道高礼帽函数有“TaLL”小写标志,花环函数可能是SiMple,海象函数WaLrus差不多。可以用“查找”来搜索


                          IP属地:中国台湾来自Android客户端16楼2014-04-24 23:20
                          收起回复