游戏达人
![Rank: 7](static/image/common/star_level3.gif) ![Rank: 7](static/image/common/star_level2.gif) ![Rank: 7](static/image/common/star_level1.gif)
- 贡献度
- 80
- 金元
- 18912
- 积分
- 2221
- 精华
- 1
- 注册时间
- 2010-11-27
|
994274298 发表于 2013-10-24 22:58 ![](static/image/common/back.gif)
想说新出的那个能不能分两个版本 第2个就是单纯的同伴 不要那么不和谐 砍树 挖矿就够了 其余旁观 走的也 ...
有些行为受限于脑文件、运动文件和动画,修改太过繁琐,很难改动。我给你这条修改的具体参数,你可以自己调节到想要的伙伴
我的小伙伴(用火炬召唤其他主角一起工作战斗,22版使用)
1.用记事本打开游戏目录\data\scripts\prefabs\torch.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
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("shadowwaxwell")
light.Transform:SetPosition(pos.x, pos.y, pos.z)
local caster = staff.components.inventoryitem.owner
light.components.follower:SetLeader(caster)
end
inst:AddComponent("spellcaster")
inst.components.spellcaster:SetSpellFn(createlight)
inst.components.spellcaster:SetSpellTestFn(cancreatelight)
inst.components.spellcaster.canuseonpoint = true
inst.components.spellcaster.canusefrominventory = false
2.用记事本打开游戏目录\data\scripts\prefabs\shadowwaxwell.lua文件,将下列内容:
anim:SetBuild("waxwell_shadow_mod")
anim:PlayAnimation("idle")
anim:Hide("ARM_carry")
anim:Hide("hat")
anim:Hide("hat_hair")
inst:AddTag("NOCLICK")
inst:AddComponent("colourtweener")
inst.components.colourtweener:StartTween({0,0,0,.5}, 0)
inst:AddComponent("locomotor")
inst.components.locomotor:SetSlowMultiplier( 0.6 )
inst.components.locomotor.pathcaps = { ignorecreep = true }
inst.components.locomotor.runspeed = TUNING.SHADOWWAXWELL_SPEED
inst:AddComponent("combat")
inst.components.combat.hiteffectsymbol = "torso"
-- inst.components.combat:SetRetargetFunction(1, Retarget)
inst.components.combat:SetKeepTargetFunction(KeepTarget)
inst.components.combat:SetAttackPeriod(TUNING.SHADOWWAXWELL_ATTACK_PERIOD)
inst.components.combat:SetRange(2, 3)
inst.components.combat:SetDefaultDamage(TUNING.SHADOWWAXWELL_DAMAGE)
inst:AddComponent("health")
inst.components.health:SetMaxHealth(TUNING.SHADOWWAXWELL_LIFE)
inst.components.health.nofadeout = true
inst:ListenForEvent("death", ondeath)
inst:AddComponent("inventory")
inst.components.inventory.dropondeath = false
inst:AddComponent("sanityaura")
inst.components.sanityaura.penalty = TUNING.SHADOWWAXWELL_SANITY_PENALTY
替换为:
local names = {"wilson","wendy","wes","wickerbottom","willow","wolfgang","wx78"}
inst.animname = names[math.random(#names)]
anim:SetBuild(inst.animname)
anim:PlayAnimation("idle")
anim:Hide("ARM_carry")
anim:Hide("hat")
anim:Hide("hat_hair")
inst:AddComponent("locomotor")
inst.components.locomotor.pathcaps = { ignorecreep = true }
inst.components.locomotor.runspeed = TUNING.SHADOWWAXWELL_SPEED*2
inst:AddComponent("combat")
inst.components.combat.hiteffectsymbol = "torso"
inst.components.combat:SetKeepTargetFunction(KeepTarget)
inst.components.combat:SetAttackPeriod(TUNING.SHADOWWAXWELL_ATTACK_PERIOD*.1)
inst.components.combat:SetRange(2, 3)
inst.components.combat:SetDefaultDamage(TUNING.SHADOWWAXWELL_DAMAGE*10)
inst:AddComponent("health")
inst.components.health:SetMaxHealth(TUNING.SHADOWWAXWELL_LIFE*10)
inst.components.health.nofadeout = true
inst:AddComponent("inventory")
inst.components.inventory.dropondeath = false
3.将inst.lifetime = TUNING.SHADOWWAXWELL_LIFETIME替换为inst.lifetime = TUNING.SHADOWWAXWELL_LIFETIME*1000
即可装备火炬在空地上点鼠标右键,随机召唤其他主角,一起砍树、开矿、战斗。不想要伙伴时,对其按Ctrl + 鼠标左键杀掉即可,不杀掉几天后其也会自然死去,想要就再召唤吧。不要与“火炬召唤亡灵”一同修改,使用麦斯维尔作主角时不要修改本条。
1)其中"wilson","wendy","wes","wickerbottom","willow","wolfgang","wx78"为可召唤主角的名字,如果只想召唤某个人,比如温蒂(wendy),就只留下她的名字即可。
2)其中inst.components.locomotor.runspeed = TUNING.SHADOWWAXWELL_SPEED*2为小伙伴的跑动速度,如果去掉*2就是1倍速度,*0.5就是一半的速度
3)其中inst.components.combat:SetAttackPeriod(TUNING.SHADOWWAXWELL_ATTACK_PERIOD*.1)为攻击节奏,最后面*.1为加快10倍,数字越小攻击越快
4)其中inst.components.combat:SetDefaultDamage(TUNING.SHADOWWAXWELL_DAMAGE*10)为攻击力,*10为10倍攻击力(1倍为40点),可自行调节
5)其中inst.components.health:SetMaxHealth(TUNING.SHADOWWAXWELL_LIFE*10)为生命值,*10为10倍生命值(1倍为75点),可自行调节
6)其中inst.lifetime = TUNING.SHADOWWAXWELL_LIFETIME*1000为生存时间,*1000为1000倍(2500天)
|
|