PDA

View Full Version : Need help modding Paladin's Prayer ability


zubovsergei
04-19-2010, 04:32 PM
I can't find where to mod this ability. I want to make it so it heals all units. I looked in paladin.atom but there is nothing in there that specifies which units the ability works on.

TIA

pavned
04-19-2010, 04:50 PM
I don'T think you can find it in the data.kfs

check ses.kfs and look for the special_paran.txt file, unit_skill or units_special.txt file. Something like that. I know I saw it in one of the file.

N3MES1S
04-19-2010, 06:32 PM
U can find it on the addon_special_attacks.lua file on the KBMaster mod. U can do a search with winrar and find "prayer".

zubovsergei
04-23-2010, 02:16 PM
Hi, thanks for the help but I still can't seem to get it to work. I looked in the addon_special_attacks.lua. I removed demon and undead from the attack part but demons still get damaged. And I am not sure where to make it so demons would also get healed.

Any help would be appreciated

TIA

pavned
04-23-2010, 04:27 PM
Hey guys, did you namage to understand the way prayer work so you can make the paladin resurrect all your units not just those near the paladin?

There's a loop function where it goeas from 0 to 5 around the paladin. You think if I modified the numbers of loop it might check the entire arena area? I'm just affraid it's gonna crash if it goea out of bond.

Might be simplier to modify to makes it like the mass_healing spell that stills there in one of the file but doesn't remember being use in the game!

zubovsergei
04-23-2010, 05:27 PM
I am trying to edit the prayer ability in addon_special_attacks.lua and no matter what I change, nothing seems to change in the game. The prayer ability still damages demons and doesn't heal them.

DO I need to start a new game for changes in addon_special_attacks.lua to take place? I have edited other files so I know how to do it and everything else works okay.

zini4_tha_grunt
04-23-2010, 09:36 PM
no. you haven't.
you should create a new lua file, paste source code for the hability and then edit it in that file. i advice simply delete checking for features.

zubovsergei
04-23-2010, 10:04 PM
LIke I said, editing or deleting anything related to the prayer ability doesn't change anything. I even deleted the whole source code for the prayer ability and the ability was not changed at all. It still worked fine even though I deleted it. That is why I thought that I need to start a new game or something.

N3MES1S
04-24-2010, 01:54 AM
I just used the prayer skill from the paladin to create another "prayer" style skill on my phoenix mod. It resurrect ALL units except undead, and undead doesnt suffer damage.

And like Zini4 said, dont modify the original files, create your own script files with a copy of the skill u want to use, and refer it in the atom file, look examples.

U dont need to start a new game, the final part of the code should be like this (this is my phoenix mod code, but healing/res all units):

function legendaryphoenix_resur()

Attack.aseq_remove(0)
Attack.act_aseq(0,"victory")

local pal_count = Attack.act_size(0)
local dmgts = Attack.aseq_time(0, "x") -- x time of attacker

Attack.atom_spawn(0, dmgts, "effect_lightpower")
dmgts1=0 --Attack.aseq_time(a, "x")

local ccnt = Attack.cell_count()
for i=0,ccnt-1 do

local tgt = Attack.cell_get(i)

if tgt~=nil and Attack.cell_dist(0,tgt)<=1 then
if Attack.act_ally(tgt) then

if (Attack.act_need_cure(tgt) or Attack.cell_need_resurrect(tgt)) and (Attack.act_ally(tgt) and not (Attack.act_feature(tgt,"golem,plant,mech,pawn,boss"))) then
local min_dmg,max_dmg = text_range_dec(Attack.get_custom_param("heal"))
local heal = math.floor(Game.CurLocRand(min_dmg*pal_count,max_d mg*pal_count))*(1+tonumber(skill_power2("resurrection",2)/100))

local need = Attack.act_initsize(tgt)*Attack.act_get_par(tgt,"health") - Attack.act_totalhp(tgt)
if need < 0 then need = Attack.act_get_par(tgt,"health") - Attack.act_hp(tgt) end
heal = math.min(need, heal)

local aa = Attack.atom_spawn(tgt, dmgts+dmgts1, "effect_total_cure")
local dmgts3 = Attack.aseq_time(aa, "x")
local count_old = Attack.act_size(tgt)

if need > 0 and Attack.cell_need_resurrect(tgt) then
Attack.cell_resurrect(tgt, heal, dmgts+dmgts1+dmgts3)
local n = Attack.act_size(tgt) - count_old
if n > 0 then
Attack.act_cure(tgt, -n, dmgts+dmgts1+dmgts3)
end
end


local d, label, slabel = Attack.act_size(tgt) - count_old
if Attack.act_size(tgt)>1 then slabel = "2" else slabel = "1" end
if d > 0 then label = "add_blog_res_"; heal = d else label = "add_blog_cure_" end
Attack.log(0.001, label..slabel, "target",blog_side_unit(tgt,0),"special",heal)
end
end
end
end


return true
end