op8819699 发表于 2013-9-28 23:52

好东西一定要顶一下!

愛妳墲誨 发表于 2013-9-29 01:17

希望LZ能把能给懒人护符能添加的几个常用标签给添加到修改指南里面

比如 光源(提灯) 远程武器(飞镖 回旋镖 其实这个才是我的主要目的)

yzzn2009 发表于 2013-9-29 01:22

weather唯爱妮 发表于 2013-9-28 23:18 static/image/common/back.gif
非常感谢,我参考你的修改技巧,自己修改了很多装备去除了100%的数值,但是armor护甲类型的装备100%数值 ...
盔甲与修改其他物品无限使用本质的区别在于,其他物品都是在功能之外存在有限使用标签,但盔甲标签本身就是有限使用的,去掉盔甲标签可以去除百分比,但盔甲功能也去掉了,修改标签中的语句也不能不显示百分比。所以我在“全部物品无限使用”中用的方法是,一方面不让盔甲掉耐久度,另一方面不显示盔甲百分比数值。下面itemtile.lua文件就是显示盔甲百分比的文件,在其中废除获取盔甲百分比的语句,就可以实现显示百分比。armor.lua文件是盔甲标签,修改其中语句就实现了不让盔甲掉耐久度


二十五.全部物品无限使用(工具、武器、盔甲、魔杖、护身符、衣服、帽子、照明物品等全部无限使用)

    1.用记事本打开游戏目录\data\scripts\widgets\itemtile.lua文件,将下列内容:

    if invitem.components.fueled then
      self:SetPercent(invitem.components.fueled:GetPercent())
    end

    if invitem.components.finiteuses then
      self:SetPercent(invitem.components.finiteuses:GetPercent())
    end

    if invitem.components.perishable then
      self:SetPerishPercent(invitem.components.perishable:GetPercent())
    end


    if invitem.components.armor then
      self:SetPercent(invitem.components.armor:GetPercent())
    end

    替换为:

    --if invitem.components.fueled then
      --self:SetPercent(invitem.components.fueled:GetPercent())
    --end

    --if invitem.components.finiteuses then
      --self:SetPercent(invitem.components.finiteuses:GetPercent())
    --end

    if invitem.components.perishable then
      self:SetPerishPercent(invitem.components.perishable:GetPercent())
    end


    --if invitem.components.armor then
      --self:SetPercent(invitem.components.armor:GetPercent())
    --end


    2.用记事本打开游戏目录\data\scripts\components\finiteuses.lua文件,将self:SetUses(self.current - (num or 1))替换为self:SetUses(self.current - 0)


    3.用记事本打开游戏目录\data\scripts\components\fueled.lua文件,将self.consuming = true替换为self.consuming = false


    4.用记事本打开游戏目录\data\scripts\components\armor.lua文件,将下列内容:

function Armor:SetCondition(amount)
    self.condition = amount

替换为:

function Armor:SetCondition(amount)
    self.condition = self.maxcondition

    即可让全部物品无限使用。其中火堆和石头营火会无限燃烧,直到睡过帐篷后熄灭

yzzn2009 发表于 2013-9-29 01:57

愛妳墲誨 发表于 2013-9-29 01:17 static/image/common/back.gif
希望LZ能把能给懒人护符能添加的几个常用标签给添加到修改指南里面

比如 光源(提灯) 远程武器(飞镖 回 ...

光源什么没有问题,但装备和工具武器不同,这个格子不具备动作的功能,否则既拿着武器,又佩戴武器功能的护身符,系统不知道点攻击敌人时要用哪种武器。你这么喜欢橙色护身符,让我想想有没有什么好的点子,把一些功能组合在一起,否则太突兀了

fbi007sos 发表于 2013-9-29 03:41

请问那种5装备栏的MOD,能不能自己改出来?
有背包就没法用橙护符捡东西了,捡东西又需要背包来装,很矛盾啊

或者能不能让背包在物品栏就生效。不用装备上也可以使用。

最后请问有没有什么办法可以快速建围墙,一个一个的建,围一圈要好久啊。。。有没有办法能放置围墙 直接就是 比如10X10的一圈。或者50x50的一圈 然后自己砸个门就行?

yzzn2009 发表于 2013-9-29 03:50

fbi007sos 发表于 2013-9-29 03:41 static/image/common/back.gif
请问那种5装备栏的MOD,能不能自己改出来?
有背包就没法用橙护符捡东西了,捡东西又需要背包来装,很矛盾 ...

5装备栏必须画图,光修改不够。以游戏现有的代码工具,支持不了拉围墙,缺的东西太多,除非深度改写游戏,工作量太大了

愛妳墲誨 发表于 2013-9-29 05:04

yzzn2009 发表于 2013-9-29 04:11 static/image/common/back.gif
我为你做了更新

一一九.橙色护身符吸取物品加速、范围加大、不吸常用物品


多谢!!!{:3_125:}




{:3_103:}话说你这么晚了还不睡啊....

愛妳墲誨 发表于 2013-9-29 09:24

{:3_103:}怎样修改猪人跟随的距离?
离玩家多远开始跟随的距离

主要是在砍树的时候 有时候近距离的树砍玩了去稍微远点树跑一半就又跑回来了严重降低砍树效率啊特别是猪人多的时候{:3_91:}

小涛丶 发表于 2013-9-29 12:13

怎么修改存档里的物品数量

小涛丶 发表于 2013-9-29 12:30

能不能修改挖尖刺灌木得10尖刺灌木根

打死、烤肉酱 发表于 2013-9-29 13:09

可不可以让紫魔杖右击一下传送三角就可以让传送三角上有3个紫宝石

yzzn2009 发表于 2013-9-29 13:34

愛妳墲誨 发表于 2013-9-29 09:24 static/image/common/back.gif
怎样修改猪人跟随的距离?
离玩家多远开始跟随的距离



猪人砍树范围加大:用记事本打开游戏目录\data\scripts\brains\pigbrain.lua文件,将local KEEP_CHOPPING_DIST = 10替换为local KEEP_CHOPPING_DIST = 100

bersaka 发表于 2013-9-29 13:41

可以增加一个猪王交易的修改,只掉金子太无聊了..而且又有些单调,不够实用

yzzn2009 发表于 2013-9-29 13:48

小涛丶 发表于 2013-9-29 12:30 static/image/common/back.gif
能不能修改挖尖刺灌木得10尖刺灌木根

存档打开全是乱码,不能改。挖尖刺灌木将加入下期更新

挖尖刺灌木一次得10个尖刺灌木根

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

        inst.components.lootdropper:SetLoot({"dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush", "dug_marsh_bush"})
        local pt = Point(inst.Transform:GetWorldPosition())
        inst.components.lootdropper:DropLoot(pt)

    即可挖尖刺灌木一次得10个尖刺灌木根

yzzn2009 发表于 2013-9-29 14:41

bersaka 发表于 2013-9-29 13:41 static/image/common/back.gif
可以增加一个猪王交易的修改,只掉金子太无聊了..而且又有些单调,不够实用 ...

猪王交易已经有人做过mod了

小涛丶 发表于 2013-9-29 14:59

yzzn2009 发表于 2013-9-29 13:48 static/image/common/back.gif
存档打开全是乱码,不能改。挖尖刺灌木将加入下期更新

挖尖刺灌木一次得10个尖刺灌木根


求添加修理里面

yzzn2009 发表于 2013-9-29 15:09

小涛丶 发表于 2013-9-29 14:59 static/image/common/back.gif
求添加修理里面

已经添加并更新了

渊小乖 发表于 2013-9-29 15:09

大神求解决范围伤害问题啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊!我都纠结半天了帮帮我吧我自己实在搞不定!

打死、烤肉酱 发表于 2013-9-29 15:10

渊小乖 发表于 2013-9-29 15:08 static/image/common/back.gif
你这个问题很简单啊教你个办法
用记事本打开游戏目录\data\scripts\components\pickable.lua文件,将self ...

我是说装备紫魔杖后右击一下传送三角就可以让传送三角上有3个紫宝石

打死、烤肉酱 发表于 2013-9-29 15:11

渊小乖 发表于 2013-9-29 15:08 static/image/common/back.gif
你这个问题很简单啊教你个办法
用记事本打开游戏目录\data\scripts\components\pickable.lua文件,将self ...

无限使用倒没关系

渊小乖 发表于 2013-9-29 15:17

yzzn2009 发表于 2013-9-29 15:14 static/image/common/back.gif
给你发了啊,把相关语句添加到子弹文件里就可以了,你也可以参考“一三一.犬牙手雷(扔犬牙炸倒一大片, ...

我不知道子弹文件啊 大神哥哥
local assets=
{
       
        Asset("ANIM", "anim/brscanno.zip"),
        Asset("ANIM", "anim/swap_brscanno.zip"),


    Asset("ATLAS", "inventoryimages/brscanno.xml"),
}

local prefabs =
{
    "ice_projectile",
}

local function onfinished(inst)
    inst:Remove()
end

local function onequip(inst, owner)
    ---- 增加亮光
        --inst.entity:AddLight()
    --inst.Light:Enable(true)
    --inst.Light:SetIntensity(0.75)
    --inst.Light:SetColour(241/255,141/255,0/255)
    --inst.Light:SetFalloff( 0.4 )
   --inst.Light:SetRadius( 8 )

    owner.AnimState:OverrideSymbol("swap_object", "swap_brscanno", "swap_icestaff")
    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 onattack(inst, owner, target)

        if owner.components.sanity and owner.components.sanity:GetPercent() < 1.1 and not target:HasTag("wall") then
      owner.components.health:DoDelta(2)      
    end
end

local function fn(Sim)


        local inst = CreateEntity()
        local trans = inst.entity:AddTransform()
        local anim = inst.entity:AddAnimState()
        inst.entity:AddSoundEmitter()

    ----
    MakeInventoryPhysics(inst)

    anim:SetBank("icestaff")
    anim:SetBuild("brscanno")
    anim:PlayAnimation("idle")

    inst:AddTag("icestaff")
    inst:AddTag("rangediceweapon")
    ----- 放地上可以用来做饭
    --inst:AddComponent("cooker")
    ----- 发热
    --inst:AddComponent("heater")
    --inst.components.heater.equippedheat = 9999
    ----- 点火
    --inst:AddComponent("lighter")
    ----- 保温
    --inst:AddComponent("insulator")
    --inst.components.insulator.insulation = TUNING.INSULATION_MED
    ----- 保护脑残值
    --inst:AddComponent("dapperness")
    --inst.components.dapperness.dapperness = TUNING.DAPPERNESS_TINY
    ----- 工具添加
    --inst:AddComponent("tool")
    --inst.components.tool:SetAction(ACTIONS.CHOP, 2)
    --inst.components.tool:SetAction(ACTIONS.MINE, 2, 2)
    --inst.components.tool:SetAction(ACTIONS.DIG, 2)
    --inst.components.tool:SetAction(ACTIONS.HAMMER, 2)


--if TheInput:IsKeyDown(KEY_CTRL) then
    --inst.components.tool:SetAction(ACTIONS.NET)
--end

    ---- 钓鱼
    --inst:AddComponent("fishingrod")
    ----- 武器相关
    inst:AddComponent("weapon")
    inst.components.weapon:SetDamage(300)
    inst.components.weapon:SetRange(100, 100)
    inst.components.weapon:SetOnAttack(onattack)
    inst:AddComponent("finiteuses")
    inst.components.finiteuses:SetMaxUses(TUNING.SHOVEL_USES)
    inst.components.finiteuses:SetUses(TUNING.SHOVEL_USES)

    inst.components.finiteuses:SetOnFinished( onfinished )
       
    inst.components.weapon:SetProjectile("brs_projectile")
    inst.components.weapon.quickAttack=true--攻击加速
       

    -------



    inst:AddComponent("inspectable")

    inst:AddComponent("inventoryitem")
        inst.components.inventoryitem.atlasname = "inventoryimages/brscanno.xml"

   inst:AddComponent("dapperness")
    inst.components.dapperness.dapperness = TUNING.CRAZINESS_MED,

    inst:AddComponent("equippable")
        inst.components.equippable.walkspeedmult = 1.2, --移动加速



    inst.components.equippable:SetOnEquip( onequip )
    inst.components.equippable:SetOnUnequip( onunequip )

    return inst
end

STRINGS.NAMES.BRSCANNO = "AK rifle"
STRINGS.CHARACTERS.GENERIC.DESCRIBE.BRSCANNO = "Only use it in critical situation."

return Prefab( "common/inventory/brscanno", fn, assets, prefabs)




    "ice_projectile", 这个我没找到在哪根本没这个文件

渊小乖 发表于 2013-9-29 15:18

你告诉我子弹文件怎么找好不

渊小乖 发表于 2013-9-29 15:20

那就不搞杀人蜂了 我求子弹文件

yzzn2009 发表于 2013-9-29 15:22

渊小乖 发表于 2013-9-29 15:20 static/image/common/back.gif
那就不搞杀人蜂了 我求子弹文件

mod借用了冰魔杖的冰弹,在游戏目录\data\scripts\prefabs\staff_projectile.lua文件中,其中包括冰、火两种弹,local function ice()下面是冰弹

渊小乖 发表于 2013-9-29 15:23

yzzn2009 发表于 2013-9-29 15:22 static/image/common/back.gif
mod借用了冰魔杖的冰弹,在游戏目录\data\scripts\prefabs\staff_projectile.lua文件中,其中包括冰、火 ...

可是冰弹的图片是一个白色的球球 我发射的图片是六个点状物明显不是

yzzn2009 发表于 2013-9-29 15:26

渊小乖 发表于 2013-9-29 15:23 static/image/common/back.gif
可是冰弹的图片是一个白色的球球 我发射的图片是六个点状物明显不是

那就是brs_projectile,在mod文件夹里找

渊小乖 发表于 2013-9-29 15:28

yzzn2009 发表于 2013-9-29 15:26 static/image/common/back.gif
那就是brs_projectile,在mod文件夹里找

我来看看

晴空朝阳 发表于 2013-9-29 15:28

这个不错啦,我也自己动手改改好了,,不会是SF吧

渊小乖 发表于 2013-9-29 15:29

yzzn2009 发表于 2013-9-29 15:26 static/image/common/back.gif
那就是brs_projectile,在mod文件夹里找

我只找到这个
local assets=
{
        Asset("ANIM", "anim/brsh_projectile.zip"),
}

local function OnHit(inst, owner, target)
    inst:Remove()
end

local function common()
        local inst = CreateEntity()
        local trans = inst.entity:AddTransform()
        local anim = inst.entity:AddAnimState()
    MakeInventoryPhysics(inst)
    RemovePhysicsColliders(inst)

    anim:SetBank("projectile")
    anim:SetBuild("brsh_projectile")

    inst:AddTag("projectile")

    inst:AddComponent("projectile")
    inst.components.projectile:SetSpeed(25)
    inst.components.projectile:SetOnHitFn(OnHit)
    inst.components.projectile:SetOnMissFn(OnHit)

    return inst
end


local function brph()
    local inst = common()
    inst.AnimState:PlayAnimation("ice_spin_loop", true)
        local light = inst.entity:AddLight()
    inst.Light:Enable(true)
        inst.Light:SetRadius(5)
    inst.Light:SetFalloff(1)
    inst.Light:SetIntensity(.7)
    inst.Light:SetColour(255/255,50/255,50/255)
       
    return inst
end



return Prefab( "common/inventory/brsh_projectile", brph, assets)
          



yzzn2009 发表于 2013-9-29 15:31

本帖最后由 yzzn2009 于 2013-9-29 15:33 编辑

渊小乖 发表于 2013-9-29 15:29 static/image/common/back.gif
我只找到这个
local assets=
{

好像不是这个,有时候必须要试错才能找到解决问题的方法,你把可能的文件添加区域伤害代码,在游戏中试试,会找到的
页: 40 41 42 43 44 45 46 47 48 49 [50] 51 52 53 54 55 56 57 58 59
查看完整版本: 易宁:饥荒游戏实用修改技巧(非MOD模式,请自行备份)支持海难版——6月6日更新:简化修船工具制作材料(只用木板和绳子)