Page 1 of 1

Making a new class, need help.

Posted: Thu Aug 09, 2012 10:00 am
by Jack Trades
Hi,
I'm trying to make a new class, Blade Dancer, a mix between a Warrior and a Rogue specializing in dual-wielding shortswords, and I'm looking for some advice since it's my first attempt at developing anything for ToME.

Right now I've got a new class script and a new weapon type and I'm using overload to switch objects.lua and descriptors.lua but it's obviously a wrong way to add new classes since it'll clash with any other class addon.
How to I add extra lines to those scripts properly?

Also, I think I've read Darkgod saying that superloading is slow and you should use hooks instead.
How do I use superloading and how do I use hooks?

Thanks in advance.

Re: Making a new class, need help.

Posted: Thu Aug 09, 2012 10:09 am
by grayswandir
If you take a look at my thrown weapons addon, I used a hook to add in the new objects.
You want to look in hooks/load.lua, the second half

http://te4.org/games/addons/tome/thrown-weapons