Page 1 of 1

[svn 5725] adventurers cant see all talents

Posted: Thu Oct 04, 2012 10:37 pm
by Sradac
Even with every single tree collapsed, adventurers cant view all the talent trees. Both class and generic lists will only scroll so far down, my keyboard will keep scrolling down "below the screen" but I cant select or preview anything below it. Both trees stop about halfway through the psionic categories.

Re: [svn 5725] adventurers cant see all talents

Posted: Fri Oct 05, 2012 12:27 am
by peaceoutside
Through some clever clicking and scrolling, I was able to coerce the UI to show more than it wanted to initially.

However, once you click or expand the Psionic - Solipsism class talent tree, this error occurs repeatedly forcing me to end the process:

Lua Error: /data/talents/psionic/solipsism.lua:59: attempt to perform arithmetic on field 'solipsism_threshold' (a nil value)
At [C]:-1 __mul
At /data/talents/psionic/solipsism.lua:59 info
At /engine/interface/ActorTalents.lua:77 info
At /mod/class/Actor.lua:3818 getTalentFullDescription
At /mod/dialogs/LevelupDialog.lua:867 getTalentDesc
At /mod/dialogs/LevelupDialog.lua:639 tooltip
At /mod/dialogs/elements/TalentTrees.lua:296 on_select
At /mod/dialogs/elements/TalentTrees.lua:487 display
At /engine/ui/Dialog.lua:614 toScreen
At /engine/Game.lua:149 display
At /mod/class/Game.lua:1188

This seems like it'll be super fun once it's working.

Re: [svn 5725] adventurers cant see all talents

Posted: Fri Oct 05, 2012 5:13 am
by peaceoutside
Alright!

I've got a solution for both issues. Well, a workaround and a temporary fix.

Workaround for the talents not being visible:

Expand a talent tree you can see. Scroll down. Expand another tree. Scroll down. Repeat until you can see everything.

The last class tree is "Psionic - Thought Forms" and the last generic tree is "Psionic - Feedback."

For the Solipsism Lua error you get when you mouse over the Solipsism talent icon when it has no points in it, you must edit this file:

\game\modules\tome\data\talents\psionic\solipsism.lua

Replace the info property with the following code (starts on line 54, ends on line 60):

Code: Select all

	info = function(self, t)
		local conversion_ratio = t.getConversionRatio(self, t)
		local threshold = self.solipsism_threshold
		if threshold == nil then
			threshold = 0
		end
		return ([[You believe that your mind is the center of everything.  Permanently increases the amount of psi you gain per level by 10 and reduces your life rating (affects life at level up) by 50%% (one time only adjustment).
		You also have learned to overcome damage with your mind alone and convert %d%% of all damage into Psi damage and %d%% of your healing and life regen now recovers Psi instead of life. 
		The first talent point invested will also increase the amount of Psi you gain from willpower by 1 but reduce the amount of life you gain from constitution by 0.5.
		The first talent point also increases your solipsism threshold by 20%% (currently %d%%), reducing your global speed by 1%% for each percentage your current Psi falls below this threshold.]]):format(conversion_ratio * 100, conversion_ratio * 100, threshold * 100)
	end,
Normally, a solipsist starts with a talent point in that skill and can't unlearn it, so there was never a need for a null check there.

Since adventurers don't start with that skill, the solipsism threshold in that talent's description wasn't defined and caused and error.