Page 1 of 1

trying to understand particles...

Posted: Wed Oct 09, 2013 12:55 am
by shooth
Can someone point me to the relevant code that would show what particles are, how to use, existing particle effects, etc.

Specifically, I was looking to understand this kind of block:

local grids = self:project(tg, self.x, self.y, DamageType.ARCANE, {dist=3, dam=self:spellCrit(t.getDamage(self, t))})
game.level.map:particleEmitter(self.x, self.y, tg.radius, "ball_fire", {radius=tg.radius})

I grepped for "ball_fire" figuring its definition somewhere in the code would lead me to the appropriate place that defined functions for particleEmitter, but all the references were usages, like the example above. I looked through the map.lua file, but didnt see any references to a function particleEmitter. Am I misreading that syntax? I am brand spanking new to lua.

Also, I was grepping in the tome.team archive... should I be looking elsewhere?
-------
On an unrelated note - am I right in reading the "tactics" field in talent definitions is used by the AI to determine how the talent is used?

Thanks in advance,
shooth

Re: trying to understand particles...

Posted: Wed Oct 09, 2013 3:01 am
by HousePet
"ball_fire" is a file name.
Look in data/gfx/particles.

You are correct about the tactics field.

Re: trying to understand particles...

Posted: Sun Oct 13, 2013 2:07 am
by Castler
There's also a page on the ToME wiki on particle effects at http://te4.org/wiki/Particle_Effects. If anything there isn't clear, feel free to ask more questions here or make edits directly there.