First time addon problem

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
Planetus
Archmage
Posts: 346
Joined: Sat Jun 23, 2012 8:44 pm

First time addon problem

#1 Post by Planetus »

Hey everyone, so I've been working on my Generalist classes here. I've got the folder setup with all the sub-folders and files as:
tome-Generalist_1/data/birth/classes/various.lua files
/hooks/load.lua
/init.lua

Since I'm just making classes that recombine existing talent trees, I don't think I need anything more than that. The class .lua files are the exact files from the game with a generalist class added to the bottom.

When I drop tome-Generalist_1 into my Addons folder, the main game loads up to 84% just fine, and then takes about 30 minutes to get to 100%, and never progresses from there. At this point, I have no idea where to even start looking for things that could be wrong. Does this sound like a syntax problem in one of my files? Do I NEED the overload and superload folders even if I'm not using them? My load.lua file is:

Code: Select all

local class = require"engine.class"
local Birther = require "engine.Birther"

class:bindHook("ToME:load", function(self, data)
	Birther:loadDefinition("/data-generalist/birth/classes/afflicted.lua")
	Birther:loadDefinition("/data-generalist/birth/classes/celestial.lua")
	Birther:loadDefinition("/data-generalist/birth/classes/chronomancer.lua")
	Birther:loadDefinition("/data-generalist/birth/classes/corrupted.lua")
	Birther:loadDefinition("/data-generalist/birth/classes/mage.lua")
	Birther:loadDefinition("/data-generalist/birth/classes/psionic.lua")
	Birther:loadDefinition("/data-generalist/birth/classes/rogue.lua")
	Birther:loadDefinition("/data-generalist/birth/classes/warrior.lua")
	Birther:loadDefinition("/data-generalist/birth/classes/wilder.lua")
end)
Any help? Any other info you need?

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: First time addon problem

#2 Post by Doctornull »

There ought to be a file "te4_log.txt" in the same directory as your game's executable.

It gets overwritten every time you re-start the game, but if you look at it right after a bug like that, the end ought to contain at least one stack trace.

The stack trace is the info we need to help you.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Planetus
Archmage
Posts: 346
Joined: Sat Jun 23, 2012 8:44 pm

Re: First time addon problem

#3 Post by Planetus »

Doctornull and Aura of the Dawn helped me to understand this through mIRC. Thanks a ton, guys. My core problem is that I had misunderstood the version variable in the init.lua file as the addon version, for recordkeeping, not the version of ToME. It worked once I chanced version from {1} to { 1, 2, 5 }.

Now I have another problem. Each class should start out with 2 generic points, 3 class points, and no talent points assigned (with the exception of the Afflicted version, which starts out with 1 point in Unnatural Body and 1 other generic point).

To achieve this, after defining the available talent trees, I have:

Code: Select all

copy_add = {
		unused_generics = 2,
		unused_talents = 3,
	},
The problem is that each class I've put together seems to end up with a different number of points than defined there. And it varies between classes, as well.

Thinking that something else was just adding and subtracting a fixed value per meta-class the class was in, I decided to just adjust the numbers accordingly. It worked wonderfully... for Thief (the rogue version). For Warrior, it added the missing generic point, but class points were still fixed at 2. It doesn't seem to have made any change for anyone else.

Does anyone have any idea what may be causing this?

Nagyhal
Wyrmic
Posts: 282
Joined: Tue Feb 15, 2011 12:01 am

Re: First time addon problem

#4 Post by Nagyhal »

Planetus, have you had any more luck since we last spoke? :D

I had a quick look at the code again, and only found two ways really this could be happening.

1) You've set starting talents which your characters don't have the prerequisites for, so you're being refunded some of those talent points.
2) You've turned off the feature "auto assign talent points on birth", hence, with each class starting with wildly differing numbers of default talents, you're being refunded all these and seeing weird numbers on starting.
3) It's probably 3... but no one knows what the heck that is yet.

Is it any of these? I'll download the latest version and see what's what.

See you next time I hit the forums, I hope!

Post Reply