Game mechanics questions

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Omega Blue
Thalore
Posts: 190
Joined: Sun Oct 31, 2010 2:50 pm

Game mechanics questions

#1 Post 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?

grayswandir
Uruivellas
Posts: 708
Joined: Wed Apr 30, 2008 5:55 pm

Re: Game mechanics questions

#2 Post 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.
Addons: Arcane Blade Tweaks, Fallen Race, Monk Class, Weapons Pack
Currently working on Elementals. It's a big project, so any help would be appreciated. :)

Omega Blue
Thalore
Posts: 190
Joined: Sun Oct 31, 2010 2:50 pm

Re: Game mechanics questions

#3 Post by Omega Blue »

Ah, I see. Thanks!

Doctornull
Sher'Tul Godslayer
Posts: 2402
Joined: Tue Jun 18, 2013 10:46 pm
Location: Ambush!

Re: Game mechanics questions

#4 Post 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.
Check out my addons: Nullpack (classes), Null Tweaks (items & talents), and New Gems fork.

Post Reply