ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Tue Aug 21, 2018 6:22 pm

All times are UTC




Post new topic Reply to topic  [ 229 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16  Next
Author Message
 Post subject: Re: Furrae Races
PostPosted: Tue Sep 22, 2015 2:06 am 
Offline
Perspiring Physicist

Joined: Sun Sep 09, 2012 7:43 am
Posts: 5747
Gimme the current code for the talent.

_________________
My feedback meter decays into coding. Give me feedback and I make mods.


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Tue Sep 22, 2015 2:14 am 
Offline
Archmage

Joined: Tue Nov 09, 2010 7:43 pm
Posts: 355
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,
}


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Tue Sep 22, 2015 2:52 am 
Offline
Perspiring Physicist

Joined: Sun Sep 09, 2012 7:43 am
Posts: 5747
Try replacing this:
Code:
   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))

With this:
Code:
   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

You don't want those life checks interfering with your equilibrium restoration.

_________________
My feedback meter decays into coding. Give me feedback and I make mods.


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Tue Sep 22, 2015 2:57 am 
Offline
Halfling

Joined: Tue Jan 31, 2012 3:06 pm
Posts: 112
Ah, of course! Fixing.


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Tue Sep 22, 2015 5:13 am 
Offline
Archmage

Joined: Tue Nov 09, 2010 7:43 pm
Posts: 355
any plans to grant a skill to remove pet so you can manage not to kill pets you are trying to tame?


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Tue Sep 22, 2015 1:23 pm 
Offline
Halfling

Joined: Tue Jan 31, 2012 3:06 pm
Posts: 112
I thought there was already a way to stuff your pet away?


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Thu Sep 24, 2015 3:39 am 
Offline
Archmage

Joined: Tue Nov 09, 2010 7:43 pm
Posts: 355
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.


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Thu Sep 24, 2015 3:41 am 
Offline
Archmage

Joined: Tue Nov 09, 2010 7:43 pm
Posts: 355
nuku wrote:
I thought there was already a way to stuff your pet away?

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.


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Thu Sep 24, 2015 3:49 am 
Offline
Archmage

Joined: Tue Nov 09, 2010 7:43 pm
Posts: 355
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).


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Thu Sep 24, 2015 3:51 am 
Offline
Halfling

Joined: Tue Jan 31, 2012 3:06 pm
Posts: 112
Hellcommander wrote:
nuku wrote:
I thought there was already a way to stuff your pet away?

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.

That's not a bug. Keep a spot open if you want to be able to do what you want to do.


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Thu Sep 24, 2015 3:51 am 
Offline
Halfling

Joined: Tue Jan 31, 2012 3:06 pm
Posts: 112
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.

Define 'lost', please.


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Thu Sep 24, 2015 4:04 am 
Offline
Archmage

Joined: Tue Nov 09, 2010 7:43 pm
Posts: 355
as can not be revived and error is fixed after new pet is gotten


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Thu Sep 24, 2015 4:06 am 
Offline
Archmage

Joined: Tue Nov 09, 2010 7:43 pm
Posts: 355
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.


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Thu Sep 24, 2015 4:08 am 
Offline
Halfling

Joined: Tue Jan 31, 2012 3:06 pm
Posts: 112
Ok, so sometimes your pet just... vanishes?


Top
 Profile  
 
 Post subject: Re: Furrae Races
PostPosted: Thu Sep 24, 2015 4:25 am 
Offline
Archmage

Joined: Tue Nov 09, 2010 7:43 pm
Posts: 355
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 229 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group