Trying to make a class, gonna need help

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Zaive
Archmage
Posts: 313
Joined: Mon May 24, 2010 1:33 pm

Trying to make a class, gonna need help

#1 Post by Zaive »

I'm trying to make an "Arcane Trickster" class, which is pretty much a trapper rogue who's picked up a bit of alchemy as well. Haven't done anything with T-Engine or lua before though, so I'm probably gonna have a lot of trouble with it. In any rate, the first thing I need to do is to get the addon to actually show up in the game.

Here's the init file...

Code: Select all

long_name = "Arcane Trickster"
short_name = "zaive-trickster"
for_module "tome"
version = {1,0,0}
weight = 100
author = { "Zaive", "" }
homepage = ""
description = [[Adds Arcane Trickster as a playable class.]]
data = true
hooks = true
I haven't added anything new yet - just uses a mix of skill trees from the other classes - so I don't think I need overloading/superloading, yet. Adding them in doesn't change anything either...

So, what super obvious thing am I missing here? I got it zipped up in a .teaa in the addons section... so it should be working....

I've been trying to do this on a mac if that makes a difference.
Burb Lulls wrote:"FLURRYFLURRYFLURRYFLURRYFLURRYFLURRY"

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Trying to make a class, gonna need help

#2 Post by HousePet »

the init file looks fine.
do you have the addon compressed or uncompressed?
My feedback meter decays into coding. Give me feedback and I make mods.

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

Re: Trying to make a class, gonna need help

#3 Post by lukep »

It's a bit tough to tell without looking at the files, but my suggestion would be to grab an existing class addon, and just modify everything out. Also, the name having a hyphen may be a problem, I haven't seen any others with one.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

aardvark
Wyrmic
Posts: 200
Joined: Wed Aug 22, 2012 12:16 am

Re: Trying to make a class, gonna need help

#4 Post by aardvark »

Things to check:
  • The init file is called init.lua, right?
  • The addon is named tome-zaive-trickster.teaa? The first part of the name must match the name of the module you're modifying, usually "tome".
  • The files zipped in the .teaa should NOT be in a subdirectory. init.lua must be a top-level file.
lukep wrote:Also, the name having a hyphen may be a problem, I haven't seen any others with one.
All of mine have hyphenated short_names. It works fine.

Zaive
Archmage
Posts: 313
Joined: Mon May 24, 2010 1:33 pm

Re: Trying to make a class, gonna need help

#5 Post by Zaive »

aardvark wrote:The files zipped in the .teaa should NOT be in a subdirectory. init.lua must be a top-level file.
Ah. That was it. I used the mac compression... which puts the folder into a zip file instead of turning the folder into a zip file. Slight difference there.

Well, now the game sends an error whenever I try to bring up the addons menu. 8)

Edit: missing an equals sign will do that, I guess... Now it gets stuck at the loading screen.
Last edited by Zaive on Sun Feb 10, 2013 5:51 am, edited 1 time in total.
Burb Lulls wrote:"FLURRYFLURRYFLURRYFLURRYFLURRYFLURRY"

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Trying to make a class, gonna need help

#6 Post by HousePet »

Excellent, now consult the log file for whatever typo it jammed on.
My feedback meter decays into coding. Give me feedback and I make mods.

Zaive
Archmage
Posts: 313
Joined: Mon May 24, 2010 1:33 pm

Re: Trying to make a class, gonna need help

#7 Post by Zaive »

Where do I find it?
Burb Lulls wrote:"FLURRYFLURRYFLURRYFLURRYFLURRYFLURRY"

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Trying to make a class, gonna need help

#8 Post by HousePet »

its right next to the exe
My feedback meter decays into coding. Give me feedback and I make mods.

Zaive
Archmage
Posts: 313
Joined: Mon May 24, 2010 1:33 pm

Re: Trying to make a class, gonna need help

#9 Post by Zaive »

I'm on a mac, so.... No, it's not.

A quick look at the SDL_log.h file said that on other platforms it's sent to stderr, so running the executable (not the application, which is how you normally open it) brings up a terminal window with the log on it.

Well, I can get in the game. Having some trouble starting off with alchemist gems in the quiver though. (The alchemist function does both that and golem creation so no copy pasta.)

This is the code that should do it, right?

Code: Select all

resolvers.generic(function(self) self:birth_create_alchemist_gems() end),
		birth_create_alchemist_gems = function(self)
			local t = self:getTalentFromId(self.T_CREATE_ALCHEMIST_GEMS)
			local gem = t.make_gem(self, t, "GEM_AGATE")
			self:wearObject(gem, true, true)
			self:sortInven()
		end,
Burb Lulls wrote:"FLURRYFLURRYFLURRYFLURRYFLURRYFLURRY"

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Trying to make a class, gonna need help

#10 Post by HousePet »

tabs are a bit off, but that should work.

Also, stupid macs! I think there is a flag you can stick on it to dump the log somewhere accessible.
My feedback meter decays into coding. Give me feedback and I make mods.

Zaive
Archmage
Posts: 313
Joined: Mon May 24, 2010 1:33 pm

Re: Trying to make a class, gonna need help

#11 Post by Zaive »

How's the CombatTalentSpellDamage function work? I want the skills to work off of spellpower so I assume I need to know how to use this. I can't find where it is...

I've been wanting to create a time-bomb style trap that causes something to happen a few turns after it is set. How can I create something like this?
Burb Lulls wrote:"FLURRYFLURRYFLURRYFLURRYFLURRYFLURRY"

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

Re: Trying to make a class, gonna need help

#12 Post by lukep »

From Combat.lua:

Code: Select all

1192 --- Gets damage based on talent
1193 function _M:combatTalentSpellDamage(t, base, max, spellpower_override)
1194         -- Compute at "max"
1195         local mod = max / ((base + 100) * ((math.sqrt(5) - 1) * 0.8 + 1))
1196         -- Compute real
1197         return self:rescaleDamage((base + (spellpower_override or self:combatSpellpower())) * ((math.sqrt(self:getTalentLevel(t)) - 1) * 0.8 + 1) * mod)
1198 end
For a time bomb style effect, make a timed effect like "incoming time prison", that applies the Time Prison effect when it is deactivated (see stoning poison for an example).
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

Post Reply