Page 1 of 1

[svn] Skeleton Mage resource error?

Posted: Sat Sep 22, 2012 2:42 pm
by Avianpilot
Playing svn revision 5703, self-compiled, Linux. Only addon active was the Old RPG tileset.

Every time that I try to go into a level that generates a skeleton mage the game hangs on the level generation dialog. Or at least that's what I'm assuming is causing it, given the error I see.

Code: Select all

[TALENT]	skeleton mage	25022	learning	T_FLAME	true	1
[TALENT]	skeleton mage	25022	learning	T_MANA_POOL	true	nil
Lua Error: /engine/utils.lua:1463: attempt to compare table with number
	At [C]:-1 __lt
	At /engine/utils.lua:1463 bound
	At /engine/interface/ActorResource.lua:124 recomputeRegenResources
	At /mod/class/Actor.lua:3048 learnPool
	At /mod/class/Actor.lua:2947 learnTalent
	At /mod/class/Actor.lua:3000 learnPool
	At /mod/class/Actor.lua:2947 learnTalent
	At /engine/resolvers.lua:90 
	At /engine/Entity.lua:520 resolve
	At /engine/Zone.lua:374 finishEntity
	At /engine/Zone.lua:317 makeEntity
	At /mod/class/generator/actor/OnSpots.lua:39 generateOne
	At /engine/generator/actor/Random.lua:118 regenFrom
	At /engine/generator/actor/Random.lua:47 generate
	At /engine/Zone.lua:793 newLevel
	At /engine/Zone.lua:714 getLevel
	At /mod/class/Game.lua:713 changeLevelReal
	At /mod/class/Game.lua:598 changeLevel
	At /mod/class/Game.lua:1400 
	At /engine/KeyBind.lua:236 

Re: [svn] Skeleton Mage resource error?

Posted: Sat Sep 22, 2012 9:02 pm
by aardvark
I could be wrong, but it looks like this is a result of recomputing the fast regen before the newly minted resource pool is finished. It looks like it adds the magic talent, which adds the resource pool, which adds the resource pool talent, which adds a "nothing" pool, which does the recalculation before the real resource pool is finished. It looks like adding dont_provide_pool to the resource pool talents might fix it, like so:

Code: Select all

--- data/talents/misc/misc.lua.old	2012-09-22 13:49:12.984375000 -0700
+++ data/talents/misc/misc.lua	2012-09-22 13:50:29.718750000 -0700
@@ -90,6 +90,7 @@
 	mode = "passive",
 	hide = "always",
 	no_unlearn_last = true,
+	dont_provide_pool = true,
 }
 
 newTalent{
@@ -99,6 +100,7 @@
 	mode = "passive",
 	hide = "always",
 	no_unlearn_last = true,
+	dont_provide_pool = true,
 	on_learn = function(self, t)
 		if self:getMaxFeedback() <= 0 then
 			self:incMaxFeedback(100)
@@ -115,6 +117,7 @@
 	mode = "passive",
 	hide = "always",
 	no_unlearn_last = true,
+	dont_provide_pool = true,
 }
 newTalent{
 	name = "Vim Pool",
@@ -123,6 +126,7 @@
 	mode = "passive",
 	hide = "always",
 	no_unlearn_last = true,
+	dont_provide_pool = true,
 }
 newTalent{
 	name = "Stamina Pool",
@@ -131,6 +135,7 @@
 	mode = "passive",
 	hide = "always",
 	no_unlearn_last = true,
+	dont_provide_pool = true,
 }
 newTalent{
 	name = "Equilibrium Pool",
@@ -139,6 +144,7 @@
 	mode = "passive",
 	hide = "always",
 	no_unlearn_last = true,
+	dont_provide_pool = true,
 }
 newTalent{
 	name = "Positive Pool",
@@ -147,6 +153,7 @@
 	mode = "passive",
 	hide = "always",
 	no_unlearn_last = true,
+	dont_provide_pool = true,
 }
 newTalent{
 	name = "Negative Pool",
@@ -155,6 +162,7 @@
 	mode = "passive",
 	hide = "always",
 	no_unlearn_last = true,
+	dont_provide_pool = true,
 }
 newTalent{
 	name = "Hate Pool",
@@ -163,6 +171,7 @@
 	mode = "passive",
 	hide = "always",
 	no_unlearn_last = true,
+	dont_provide_pool = true,
 	updateRegen = function(self, t)
 		-- hate loss speeds up as hate increases
 		local hate = self:getHate()
@@ -217,6 +226,7 @@
 	mode = "passive",
 	hide = "always",
 	no_unlearn_last = true,
+	dont_provide_pool = true,
 }
 
 -- Mages class talent, teleport to angolwen
This would prevent the learning of a resource pool talent from trying to create another non-existent pool. I haven't tested this to see if it would fix the error, but it would at least prevent the recursive learnPool call.

Re: [svn] Skeleton Mage resource error?

Posted: Sat Sep 22, 2012 9:02 pm
by darkgod
Na it's because I left in a line which should not be in ;)