Page 1 of 1

How is Physical Power calculated and displayed?

Posted: Thu Jul 05, 2012 6:19 am
by mstephans
Maybe this should be in the dumb questions thread, but...

The only place I find my Physical Power listed is on my tooltip. I can't find it in the character sheet. Is this intentional?

My tooltip currently lists my P.Power at 20, but my archer has Bow Mastery that should be adding 39, as well as Combat Mastery and Dagger Mastery for another 13 each. The b41 notes seem to imply that I won't get credit for the Dagger Mastery, but what about Combat Mastery? And regardless, why is it sitting at 20 instead of higher? I love the way ToME shows all the numbers up front, but this one has me confused. Thanks!

Re: How is Physical Power calculated and displayed?

Posted: Thu Jul 05, 2012 4:25 pm
by marvalis
There are 5 tiers of physical power, and each tier costs more points to increase. The result that is displayed also depends on your weapons (your talent level is counted, not the physical power increase that is in the description of the talent).

That means that if you have bow mastery and you are using a sword, you would not get any physical power increase. I know that this is not your problem.
If you read the code you can also see that STR increases physical power for bow users!

That does not explain everything so I went digging for the code, and I cannot really give you a better answer. Here is the code that computes physical power:

Code: Select all

function _M:combatPhysicalpower(mod, weapon)
	mod = mod or 1
	local add = 0
	if self:knowTalent(Talents.T_ARCANE_DESTRUCTION) then
		add = add + self:combatSpellpower() * self:getTalentLevel(Talents.T_ARCANE_DESTRUCTION) / 7
	end
	if self:isTalentActive(Talents.T_BLOOD_FRENZY) then
		add = add + self.blood_frenzy
	end
	if self:knowTalent(self.T_EMPTY_HAND) and self:isUnarmed() then
		local t = self:getTalentFromId(self.T_EMPTY_HAND)
		add = add + t.getDamage(self, t)
	end

	if not weapon then
		local inven = self:getInven(self.INVEN_MAINHAND)
		if inven and inven[1] then weapon = inven[1].combat end
	end

	add = add + 5 * self:combatCheckTraining(weapon)

	return self:rescaleCombatStats((self.combat_dam > 0 and self.combat_dam or 0) + add + self:getStr()) * mod
end

Code: Select all

function _M:rescaleCombatStats(raw_combat_stat_value)
	local x = raw_combat_stat_value
	local tiers = 5
	local total = 0
	for i = 1, tiers do
		local sub = 20*(i*(i-1)/2)
		total = total + math.min(math.max(x-sub, 0)/i, 20)
	end
	return total
end

Re: How is Physical Power calculated and displayed?

Posted: Thu Jul 05, 2012 5:26 pm
by mstephans
Ahh. I see. Actually, I'm terrible at code, so I don't. :-)

It looks like the second section is the diminishing returns by Tier section. I'll have to level up my guy when I get home to see if I gain power with another point in bow. I guess I can also hold a sling to check. So does Weapon Mastery really just mean "Sword and Mace" Mastery? And 20 seems low still for that level....

Re: How is Physical Power calculated and displayed?

Posted: Thu Jul 05, 2012 7:14 pm
by PureQuestion
Sword, mace, and axe

Re: How is Physical Power calculated and displayed?

Posted: Thu Jul 05, 2012 8:22 pm
by marvalis
Combat mastery and dagger mastery have no effect when you are wielding a bow.
Bow-mastery says that it will add 39 points

In reality, it will only add half of that: 19.5 (this looks like a bug)
you have to add your strength to that score
so yes you should have 20-something power. Ill file a bug report.

Re: How is Physical Power calculated and displayed?

Posted: Thu Jul 05, 2012 10:05 pm
by mstephans
I can update some of this. Yes, it seems that your STR (at least up till 20) translates directly to P.Power. Empty handed, I have a 20 P.Power. With a bow and 3 points in Bow Mastery (+39 to Physical Power) it now reports 29 P.Power on the tooltip. With a sling and one point in Sling Mastery (+13 to Physical Power) it reports 23 P.Power. I wonder if the tooltip wasn't updating?

I will update this when I hit another level, but it looks like you get 1 point for each point of STR and .5 for each point of Physical Power from skills. If that's larger than 20, you get 20 plus half the remainder (up to 40).

So 20 STR + 13 Skill = 20 +13/2 = 26.5 => 23.25 P.Power for sling. That's right.
20 + 39/2 = 39.5 => 29.25 P.Power for Bow. That's also right.
EDIT: After leveling up: 21 STR + 52 Skill = 21 + 26 = 47 => 33.5 P.Power which shows as 33.

Cool. Thanks all! Is there a thought to add the Power stats into the character sheet?

Re: How is Physical Power calculated and displayed?

Posted: Fri Jul 06, 2012 11:05 am
by marvalis
Bug report here:
http://forums.te4.org/viewtopic.php?f=42&t=34185

I think it should be listed on the 'attack' pane in the character screen
suggestion here:
http://forums.te4.org/viewtopic.php?f=39&t=34191

Re: How is Physical Power calculated and displayed?

Posted: Fri Jul 06, 2012 2:22 pm
by alocritani
mstephans wrote: If that's larger than 20, you get 20 plus half the remainder (up to 40).
yes, that's because it works in tiers.
So up to 20 you are in tier 1 and any increase is mapped 1:1;
when you are between 21 and 40 you're in tier2 and any increase is mapped 2:1 (every 2 points over 20 you earn 1 point);
between 41 and 60 the ratio is 3:1 (you need to add 3 point to earn a "real" point) and so on.

the same applies for all other stats (ph. save, mental save, magic save, ph power, mental power, magic power).

Any way, this is strange, because I thought that the tiers system only applies to item's bonuses and not to talents...nice to know