why is radiance doing radius 0?

Have a really dumb question? Ask it here to get help from the experts (or those with too much time on their hands)

Moderator: Moderator

Post Reply
Message
Author
xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

why is radiance doing radius 0?

#1 Post by xnd »

if i copy the talent code without changing it (must change name of course), it makes it have radius 0 instead of 3 that it usually starts with.
I looked a lot of places like in celestial class but failed to see what makes the talent start with radius 3 instead of 0.

original radiance code just renamed:

newTalent{
short_name = "X_LIGHT",
name = "4th Light Tesseract",
type = {"celestial/radiance", 1},
mode = "passive",
require = divi_req1,
points = 5,
radius = function(self, t) return self:combatTalentScale(t, 3, 7) end,
getResist = function(self, t) return self:combatTalentLimit(t, 100, 25, 75) end,
passives = function(self, t, p)
self:talentTemporaryValue(p, "radiance_aura", radianceRadius(self))
self:talentTemporaryValue(p, "blind_immune", t.getResist(self, t) / 100)
end,
info = function(self, t)
return ([[You are so infused with sunlight that your body glows permanently in radius %d, even in dark places.
Your vision adapts to this glow, giving you %d%% blindness resistance.
The light radius overrides your normal light if it is bigger (it does not stack).
]]):
format(radianceRadius(self), t.getResist(self, t))
end,
}


--

if illumination is added:

"All enemies in your Radiance aura have their invisibility and stealth power reduced by %d.
In addition, all actors affected by illumination are easier to see and therefore hit; their defense is reduced by %d and all evasion bonuses from being unseen are negated."

So since the PC is radiating light, the PC is easier to see, defense is reduced, invis and stealth and evasion negated.... Does this effect the PC??? I see some talents clearly state they make it so you cant stealth, and that makes sense if you are lit up like a lightbulb, but why would I want to lower my defense and evasion? and then with 0 radius, there is no one getting this curse but the PC!

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: why is radiance doing radius 0?

#2 Post by HousePet »

Did you copy radianceRadius() as well, and change the self:getTalentRadius(self:getTalentFromId(self.T_RADIANCE)) line?
My feedback meter decays into coding. Give me feedback and I make mods.

xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

Re: why is radiance doing radius 0?

#3 Post by xnd »

oh yeah i copied this:


function radianceRadius(self)
if self:hasEffect(self.EFF_RADIANCE_DIM) then
return 1
else
return self:getTalentRadius(self:getTalentFromId(self.T_RADIANCE))
end
end




edit: oh......

xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

Re: why is radiance doing radius 0?

#4 Post by xnd »

well now the text SAYS it increases the radius, however, in character sheet there is no increase (still 2, not 4), and under current effects it doesnt say anything but it DOES add the 50% blind resistance (talent at lvl 2).

i dont see a lua error code in the log.
does show
Activating non activable or sustainable talent: T_X_LIGHT :: 4th Light Tesseract :: passive

this is the current code, just added the part copied in from illumination (i think these two should be combined anyway):


function radianceRadius(self)
if self:hasEffect(self.EFF_RADIANCE_DIM) then
return 1
else
return self:getTalentRadius(self:getTalentFromId(self.T_X_LIGHT))
end
end


newTalent{
short_name = "X_LIGHT",
name = "4th Light Tesseract",
type = {"race/Chrono_Xorn", 1},
mode = "passive",
require = race_req1,
points = 5,
radius = function(self, t) return self:combatTalentScale(t, 3, 7) end,
getResist = function(self, t) return self:combatTalentLimit(t, 100, 25, 75) end,
getPower = function(self, t) return 15 + self:combatTalentSpellDamage(t, 1, 100) end,
getDef = function(self, t) return 5 + self:combatTalentSpellDamage(t, 1, 35) end,
passives = function(self, t, p)
self:talentTemporaryValue(p, "radiance_aura", radianceRadius(self))
self:talentTemporaryValue(p, "blind_immune", t.getResist(self, t) / 100)
end,
callbackOnActBase = function(self, t)
local radius = radianceRadius(self)
local grids = core.fov.circle_grids(self.x, self.y, radius, true)
for x, yy in pairs(grids) do for y, _ in pairs(grids[x]) do local target = game.level.map(x, y, Map.ACTOR) if target and self ~= target then
if (self:reactionToward(target) < 0) then
target:setEffect(target.EFF_ILLUMINATION, 1, {power=t.getPower(self, t), def=t.getDef(self, t)})
local ss = self:isTalentActive(self.T_SEARING_SIGHT)
if ss then
local dist = core.fov.distance(self.x, self.y, target.x, target.y) - 1
local coeff = math.max(0.1, 1 - (0.1*dist)) -- 10% less damage per distance
DamageType:get(DamageType.LIGHT).projector(self, target.x, target.y, DamageType.LIGHT, ss.dam * coeff)
if ss.daze and rng.percent(ss.daze) and target:canBe("stun") then
target:setEffect(target.EFF_DAZED, 3, {apply_power=self:combatSpellpower()})
end
end
end
end end end
end,

info = function(self, t)
return ([[You are so infused with sunlight that your body glows permanently in radius %d, even in dark places.
Your vision adapts to this glow, giving you %d%% blindness resistance.
The light radius overrides your normal light if it is bigger (it does not stack).
All enemies in your Radiance aura have their invisibility and stealth power reduced by %d.
In addition, all actors affected by illumination are easier to see and therefore hit; their defense is reduced by %d and all evasion bonuses from being unseen are negated.
The effects increase with your Spellpower.
]]):
format(radianceRadius(self), t.getResist(self, t), t.getPower(self, t), t.getDef(self, t))
end,
}

xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

Re: why is radiance doing radius 0?

#5 Post by xnd »

the illumination part seems to work at range 4, shows on enemies,

But the character sheet shows visible light 0, (if unequip lantern), not 4 that this talent claims it should be, right?

and no "current effect" listed for this passive doing something.

"The light radius overrides your normal light if it is bigger (it does not stack)." not doing this, according to character sheet.

edit:
well as long as this is the only issue i dont care since 2 lantern slots anyway deals with light.

Frumple
Sher'Tul Godslayer
Posts: 1517
Joined: Sat May 15, 2010 9:17 pm

Re: why is radiance doing radius 0?

#6 Post by Frumple »

The radiance radius isn't a light radius, and doesn't show on the character sheet, no.

xnd
Archmage
Posts: 307
Joined: Sat Mar 21, 2015 7:33 pm

Re: why is radiance doing radius 0?

#7 Post by xnd »

isnt that odd though if a light radius isnt a light radius?

"The light radius overrides your normal light if it is bigger" so that's sure what it seems to say.

Micbran
Sher'Tul
Posts: 1154
Joined: Sun Jun 15, 2014 12:19 am
Location: Yeehaw, pardner

Re: why is radiance doing radius 0?

#8 Post by Micbran »

If it was a true light radius it would show up on your character sheet, wouldn't it? My guess, it's a programming thing.
A little bit of a starters guide written by yours truly here.

Post Reply