Page 1 of 1

Game mechanics questions

Posted: Fri Oct 10, 2014 3:44 pm
by Omega Blue
Hi all,

I am slowly putting together my new class, and there are a couple of questions I would like to ask, to see if it needs some major revision.

1. Can a talent be triggered upon a certain condition? Lets say I am putting together a talent called LaunchAntiTankMissleAtBill, which will automatically launch an anti tank missile at Bill the Troll given 1. I have such a missile 2. Bill has appeared 3. he's within range. Is that possible to set something up like that?

2. Can talents be resolved in a particular sequence? Say I have three talents going that would allow me to 1. attempt to knock missiles aside 2. attempt to jump out of the way 3. reduce incoming damage. Can I resolve the talents in the order of talent 1 first, talent 2 second, and talent 3 last?

Re: Game mechanics questions

Posted: Fri Oct 10, 2014 4:03 pm
by grayswandir
Basically, throughout the code there's a couple places for hooks and callbacks that you can put code into - when you take damage, or avoid a melee strike, for instance. So if there's a hook where you want something to happen - great! Otherwise, you'll have to do it some other way.

You can setup a talent to trigger every game turn, or every time you do something. That's the easiest way to do the Bill thing - every turn, see if you have a missile, then see if Bill is in your LoS, then check your range, then do the thing.

For ordering, again, it depends on if there's a hook where you want it. If you want something to be specifically between two events (like after sanctuary damage reduction but before the fortress chant damage reduction), you might not be able to, since the code goes straight from one to another. Of course, if it's just stuff that you yourself are adding, it shouldn't be too hard to make them happen in the order you want.

Re: Game mechanics questions

Posted: Thu Oct 16, 2014 3:13 pm
by Omega Blue
Ah, I see. Thanks!

Re: Game mechanics questions

Posted: Thu Oct 16, 2014 5:51 pm
by Doctornull
Though, in that specific case with Bill, given that Bill is usually not on-screen, I'd suggest giving BILL a special talent with a callback that calls into the player, rather than the other way around.

That way, the callback will only trigger when Bill is on the map, and the code won't slow down the game at all when Bill is not on the map -- which is most of the time.