Furrae Races
Moderator: Moderator
Re: Furrae Races
Gimme the current code for the talent.
My feedback meter decays into coding. Give me feedback and I make mods.
-
- Archmage
- Posts: 362
- Joined: Tue Nov 09, 2010 7:43 pm
Re: Furrae Races
newTalent{
name = "Together Forever",
image = "talents/multiply.png",
type = {"wild-gift/animal-training", 3},
require = gifts_req2,
points = 5,
mode = "sustained",
sustain_equilibrium = 20,
remove_on_zero = false,
cooldown = function(self, t) return 20 end,
range = 0,
requires_target = false,
getPercentage = function(self, t)
return self:getTalentLevel(t)
end,
getClear = function(self, t)
if self.summoner then
return self.summoner:getTalentLevel(t) * 2
else
return self:getTalentLevel(t) * 2
end
end,
do_statusclear = function(self, t)
local effs = {}
-- Go through all spell effects
for eff_id, p in pairs(self.tmp) do
local e = self.tempeffect_def[eff_id]
if e.status == "detrimental" then
effs[#effs+1] = {"effect", eff_id}
end
end
if #effs > 0 then
local eff = rng.tableRemove(effs)
if eff[1] == "effect" and rng.percent(t.getClear(self, t)) then
self:removeEffect(eff[2])
game.logSeen(self, "%s has recovered with their friend's help!", self.name:capitalize())
end
end
end,
callbackOnActBase = function(self, t)
local tt = self:isTalentActive(t.id)
if not tt then return end
if not self.animalfriend then
return nil
end
if self.animalfriend.dead then
return nil
end
mine = self.life / self.max_life
pet = self.animalfriend.life / self.animalfriend.max_life
animalfriend = self.animalfriend
if mine < 0.26 and pet < 0.26 then
return nil
end
if mine > 0.89 and pet > 0.89 then
return nil
end
animalfriend:incEquilibrium(0 - t.getPercentage(self, t))
if mine > pet then
amount = self.max_life * t.getPercentage(self,t) / 100
self.life = self.life - amount
animalfriend:attr("allow_on_heal", 1)
animalfriend:heal(self:mindCrit(amount*1.5), self)
animalfriend:attr("allow_on_heal", -1)
t.do_statusclear(animalfriend, t)
else
amount = animalfriend.max_life * t.getPercentage(self,t) / 100
animalfriend.life = animalfriend.life - amount
self:attr("allow_on_heal", 1)
self:heal(animalfriend:mindCrit(amount*1.5), animalfriend)
self:attr("allow_on_heal", -1)
t.do_statusclear(self, t)
end
end,
activate = function(self, t)
return {}
end,
deactivate = function(self, t, p)
return true
end,
info = function(self, t)
return ([[You and your animal friend are in it together to the bloody end. Every round whichever one of you is less injured will give up life energy to renew the other. They will give up %1.1f%% of their hit points and restore half again as much. This will not trigger if the most healthy of the two is at or below 25%%, or if neither is injured beneath 90%%.
This will also cure 1 negative status with a %d%% chance on the party being healed.
While active, your animal friend will begin to lose equilibrium at a rate of %d per round.]]):
format(t.getPercentage(self,t),t.getClear(self,t),t.getPercentage(self,t))
end,
}
name = "Together Forever",
image = "talents/multiply.png",
type = {"wild-gift/animal-training", 3},
require = gifts_req2,
points = 5,
mode = "sustained",
sustain_equilibrium = 20,
remove_on_zero = false,
cooldown = function(self, t) return 20 end,
range = 0,
requires_target = false,
getPercentage = function(self, t)
return self:getTalentLevel(t)
end,
getClear = function(self, t)
if self.summoner then
return self.summoner:getTalentLevel(t) * 2
else
return self:getTalentLevel(t) * 2
end
end,
do_statusclear = function(self, t)
local effs = {}
-- Go through all spell effects
for eff_id, p in pairs(self.tmp) do
local e = self.tempeffect_def[eff_id]
if e.status == "detrimental" then
effs[#effs+1] = {"effect", eff_id}
end
end
if #effs > 0 then
local eff = rng.tableRemove(effs)
if eff[1] == "effect" and rng.percent(t.getClear(self, t)) then
self:removeEffect(eff[2])
game.logSeen(self, "%s has recovered with their friend's help!", self.name:capitalize())
end
end
end,
callbackOnActBase = function(self, t)
local tt = self:isTalentActive(t.id)
if not tt then return end
if not self.animalfriend then
return nil
end
if self.animalfriend.dead then
return nil
end
mine = self.life / self.max_life
pet = self.animalfriend.life / self.animalfriend.max_life
animalfriend = self.animalfriend
if mine < 0.26 and pet < 0.26 then
return nil
end
if mine > 0.89 and pet > 0.89 then
return nil
end
animalfriend:incEquilibrium(0 - t.getPercentage(self, t))
if mine > pet then
amount = self.max_life * t.getPercentage(self,t) / 100
self.life = self.life - amount
animalfriend:attr("allow_on_heal", 1)
animalfriend:heal(self:mindCrit(amount*1.5), self)
animalfriend:attr("allow_on_heal", -1)
t.do_statusclear(animalfriend, t)
else
amount = animalfriend.max_life * t.getPercentage(self,t) / 100
animalfriend.life = animalfriend.life - amount
self:attr("allow_on_heal", 1)
self:heal(animalfriend:mindCrit(amount*1.5), animalfriend)
self:attr("allow_on_heal", -1)
t.do_statusclear(self, t)
end
end,
activate = function(self, t)
return {}
end,
deactivate = function(self, t, p)
return true
end,
info = function(self, t)
return ([[You and your animal friend are in it together to the bloody end. Every round whichever one of you is less injured will give up life energy to renew the other. They will give up %1.1f%% of their hit points and restore half again as much. This will not trigger if the most healthy of the two is at or below 25%%, or if neither is injured beneath 90%%.
This will also cure 1 negative status with a %d%% chance on the party being healed.
While active, your animal friend will begin to lose equilibrium at a rate of %d per round.]]):
format(t.getPercentage(self,t),t.getClear(self,t),t.getPercentage(self,t))
end,
}
Re: Furrae Races
Try replacing this:
With this:
You don't want those life checks interfering with your equilibrium restoration.
Code: Select all
mine = self.life / self.max_life
pet = self.animalfriend.life / self.animalfriend.max_life
animalfriend = self.animalfriend
if mine < 0.26 and pet < 0.26 then
return nil
end
if mine > 0.89 and pet > 0.89 then
return nil
end
animalfriend:incEquilibrium(0 - t.getPercentage(self, t))
Code: Select all
mine = self.life / self.max_life
pet = self.animalfriend.life / self.animalfriend.max_life
animalfriend = self.animalfriend
animalfriend:incEquilibrium(0 - t.getPercentage(self, t))
if mine < 0.26 and pet < 0.26 then
return nil
end
if mine > 0.89 and pet > 0.89 then
return nil
end
My feedback meter decays into coding. Give me feedback and I make mods.
Re: Furrae Races
Ah, of course! Fixing.
-
- Archmage
- Posts: 362
- Joined: Tue Nov 09, 2010 7:43 pm
Re: Furrae Races
any plans to grant a skill to remove pet so you can manage not to kill pets you are trying to tame?
Re: Furrae Races
I thought there was already a way to stuff your pet away?
-
- Archmage
- Posts: 362
- Joined: Tue Nov 09, 2010 7:43 pm
Re: Furrae Races
Found a conditional bug that can happen if your first pet is somehow lost
Lua Error: /data-furraerace/talents/animalkin.lua:851: attempt to index field 'animalfriend' (a nil value)
At [C]:-1 __index
At /data-furraerace/talents/animalkin.lua:851 getTraining
At /data-furraerace/talents/animalkin.lua:879 info
At /data-Infinite500/talentsI500.lua:51 info
At /mod/class/Actor.lua:5468 getTalentFullDescription
At /mod/dialogs/LevelupDialog.lua:972 getTalentDesc
At ...dons/Infinite500/superload/mod/dialogs/LevelupDialog.lua:299 tooltip
At /mod/dialogs/elements/TalentTrees.lua:184 updateTooltip
At /mod/dialogs/elements/TalentTrees.lua:110 fct
At /engine/Mouse.lua:76 receiveMouseMotion
At /engine/Mouse.lua:96 delegate
At /engine/ui/Dialog.lua:691 mouseEvent
At /engine/ui/Dialog.lua:428 fct
At /engine/Mouse.lua:76
Comes up when training is moused over and when i put points into together forever at level 5 it automatically granted by 4 points in both training skills.
Lua Error: /data-furraerace/talents/animalkin.lua:851: attempt to index field 'animalfriend' (a nil value)
At [C]:-1 __index
At /data-furraerace/talents/animalkin.lua:851 getTraining
At /data-furraerace/talents/animalkin.lua:879 info
At /data-Infinite500/talentsI500.lua:51 info
At /mod/class/Actor.lua:5468 getTalentFullDescription
At /mod/dialogs/LevelupDialog.lua:972 getTalentDesc
At ...dons/Infinite500/superload/mod/dialogs/LevelupDialog.lua:299 tooltip
At /mod/dialogs/elements/TalentTrees.lua:184 updateTooltip
At /mod/dialogs/elements/TalentTrees.lua:110 fct
At /engine/Mouse.lua:76 receiveMouseMotion
At /engine/Mouse.lua:96 delegate
At /engine/ui/Dialog.lua:691 mouseEvent
At /engine/ui/Dialog.lua:428 fct
At /engine/Mouse.lua:76
Comes up when training is moused over and when i put points into together forever at level 5 it automatically granted by 4 points in both training skills.
-
- Archmage
- Posts: 362
- Joined: Tue Nov 09, 2010 7:43 pm
Re: Furrae Races
nope thats only if your kennels are not already full after they are all full you can not kennel the current pet in only switch pet or make pet move past player view to auto remove the pet.nuku wrote:I thought there was already a way to stuff your pet away?
-
- Archmage
- Posts: 362
- Joined: Tue Nov 09, 2010 7:43 pm
Re: Furrae Races
Another thing i think it would be better to switch animal care and befriend animal around so you can get new pet early if you want in the case that you find a rare early on (normal pets do not work out very well at all since they dont have enough stats pet level for skills). And from my experience with the new dead but was high level animal kin I had elites are likely to strong to have as a pet perhaps (rares are normally find since player does not have many damage skills as animal kin).
Re: Furrae Races
That's not a bug. Keep a spot open if you want to be able to do what you want to do.Hellcommander wrote:nope thats only if your kennels are not already full after they are all full you can not kennel the current pet in only switch pet or make pet move past player view to auto remove the pet.nuku wrote:I thought there was already a way to stuff your pet away?
Re: Furrae Races
Define 'lost', please.Hellcommander wrote:Found a conditional bug that can happen if your first pet is somehow lost
Lua Error: /data-furraerace/talents/animalkin.lua:851: attempt to index field 'animalfriend' (a nil value)
At [C]:-1 __index
At /data-furraerace/talents/animalkin.lua:851 getTraining
At /data-furraerace/talents/animalkin.lua:879 info
At /data-Infinite500/talentsI500.lua:51 info
At /mod/class/Actor.lua:5468 getTalentFullDescription
At /mod/dialogs/LevelupDialog.lua:972 getTalentDesc
At ...dons/Infinite500/superload/mod/dialogs/LevelupDialog.lua:299 tooltip
At /mod/dialogs/elements/TalentTrees.lua:184 updateTooltip
At /mod/dialogs/elements/TalentTrees.lua:110 fct
At /engine/Mouse.lua:76 receiveMouseMotion
At /engine/Mouse.lua:96 delegate
At /engine/ui/Dialog.lua:691 mouseEvent
At /engine/ui/Dialog.lua:428 fct
At /engine/Mouse.lua:76
Comes up when training is moused over and when i put points into together forever at level 5 it automatically granted by 4 points in both training skills.
-
- Archmage
- Posts: 362
- Joined: Tue Nov 09, 2010 7:43 pm
Re: Furrae Races
as can not be revived and error is fixed after new pet is gotten
-
- Archmage
- Posts: 362
- Joined: Tue Nov 09, 2010 7:43 pm
Re: Furrae Races
Moving between levels can randomly remove the active pet and when you move back to level it gets left at you can find it waiting but after since its not in party anymore it disappears.
Re: Furrae Races
Ok, so sometimes your pet just... vanishes?
-
- Archmage
- Posts: 362
- Joined: Tue Nov 09, 2010 7:43 pm
Re: Furrae Races
if not kenneled and says no pet to revive when using the revive skill issue with that bug is that both training skill try calculating training value for current pet but if somehow pet is lost from it not being close enough on zone transfer (i guess) then it some how bugs out and oddly error ends up granting both training skills for free somehow when point placed in together forever