Weird problem getting Addons to work

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Immet
Posts: 3
Joined: Wed Feb 15, 2012 7:09 pm

Weird problem getting Addons to work

#1 Post by Immet »

I've been playing ToME for a little while and really enjoying it so I thought I'd try to make an addon class. However, I kept getting more and more frustrated at the fact that my class wasn't showing up in the list even though other addons were working. I ended up trying to change a copy of Goblinz's Death Knight- at first large changes but later smaller and smaller changes until I was just trying to change some of the text.

I then tried unzipping the file, deleting the old one and compressing the folder again immediately without any changes, then converting back to .teaa and it no longer shows up. As in a class which definitely works stops working because I personally zipped it rather than it being zipped elsewhere.

So basically, if I compress the addon folder into a .zip using the standard context menu (Mac OS 10.6) then convert it to a .teaa it doesn't work. It doesn't work for mine or other addons so its not a programming error on my part.

Is there something specifically wrong about using the Mac compression, or is there something else going on?

Goblinz
Module Developer
Posts: 163
Joined: Tue Dec 14, 2010 3:23 am
Location: Where I need to be

Re: Weird problem getting Addons to work

#2 Post by Goblinz »

Have you tried to make an addon in non .teaa form? That is the way to start out and is much simpler. The change to .teaa is just for publishing purposes so it does no invalidate your online characters. You also may be compressing the folder that contains the actual addon. so for a normal folder you have something like this

Code: Select all

addons/foo/init.lua
for .teaa you have this

Code: Select all

addons/foo.teaa/init.lua
what you are probably doing ins

Code: Select all

addons/foo.teaa/foo/int.lua
also what compression format are you using? it could be possible that it does not work. If nothing here helps check out the irc channel. there is a good chance someone will be able to help you.
Those who complain are just Volunteering to fix the problem

<yufra> every vault designer should ask themselves exactly that: What Would Grey Do?

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: Weird problem getting Addons to work

#3 Post by lukep »

To compress in a mac, you cannot select the folder. Instead, select all of the files in the folder, and compress those (then rename it from archive.zip to tome-foo.teaa in the "get info" window, so you aren't getting tome-foo.teaa.zip.)
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

Immet
Posts: 3
Joined: Wed Feb 15, 2012 7:09 pm

Re: Weird problem getting Addons to work

#4 Post by Immet »

Oh, thats absolutely brilliant. It works fine now.

I think I tried just having an addon as a folder earlier, but when I tried starting a new game to test the class it started loading extremely slowly around the 34% mark. As in about 1% every other second. I tried leaving it to get to 100% but nothing happened once it got there so I had to force quit it. After that I thought it had to be .teaa files.

Which... doesn't make sense now that I'm thinking about it since the example module addons are folders instead of .team files.

It did start loading slowly about the 34% mark again, but at about 36% onwards it was fine. And I was compressing it as a zip file.

Thanks again.

Phoenix1
Thalore
Posts: 160
Joined: Mon Dec 05, 2011 8:25 pm

Re: Weird problem getting Addons to work

#5 Post by Phoenix1 »

So the problem is that the class isn't showing up in the character creation page, right? I think missing any of the following could cause that:

Did you attach the class to an existing metaclass, or if it's part of a new metaclass, did you attach the metaclass to the campaigns?

Did you add the class definition to the birther in the ToME:load hook?

Did you format init.lua for the addon? And in particular, is it set to work with your version of ToME?

If none of that...I dunno. If you want to try uploading the addon, we might be able to spot a problem.

Post Reply