Page 1 of 1
Trying to make a class, gonna need help
Posted: Sun Feb 10, 2013 3:38 am
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.
Re: Trying to make a class, gonna need help
Posted: Sun Feb 10, 2013 4:19 am
by HousePet
the init file looks fine.
do you have the addon compressed or uncompressed?
Re: Trying to make a class, gonna need help
Posted: Sun Feb 10, 2013 4:23 am
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.
Re: Trying to make a class, gonna need help
Posted: Sun Feb 10, 2013 4:41 am
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.
Re: Trying to make a class, gonna need help
Posted: Sun Feb 10, 2013 5:28 am
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.
Edit: missing an equals sign will do that, I guess... Now it gets stuck at the loading screen.
Re: Trying to make a class, gonna need help
Posted: Sun Feb 10, 2013 5:42 am
by HousePet
Excellent, now consult the log file for whatever typo it jammed on.
Re: Trying to make a class, gonna need help
Posted: Sun Feb 10, 2013 5:51 am
by Zaive
Where do I find it?
Re: Trying to make a class, gonna need help
Posted: Sun Feb 10, 2013 8:37 am
by HousePet
its right next to the exe
Re: Trying to make a class, gonna need help
Posted: Sun Feb 10, 2013 5:33 pm
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,
Re: Trying to make a class, gonna need help
Posted: Mon Feb 11, 2013 1:08 am
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.
Re: Trying to make a class, gonna need help
Posted: Sat Feb 16, 2013 1:42 am
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?
Re: Trying to make a class, gonna need help
Posted: Sat Feb 16, 2013 2:11 am
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).