(done) Hooks (new events)

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

(done) Hooks (new events)

Post by Sophia »

At it stands, wading though the base code is a bit of a mess, trying to find certain key events in order to override them. I'm going to separate some of these out into another file, and call them "hooks". These will be separate small functions that can be expanded upon instead of having to override big, complex functions.

These are not events called by the engine, but instead, game events that the base code takes care of. Here's a list of some so far, please add any along the same lines you think would be good--

:arrow: door_hits_party
:arrow: door_hits_monster
:arrow: monster_takes_damage
:arrow: party_falls_down
:arrow: party_climbs_up
Last edited by Sophia on Fri Jun 27, 2008 7:02 pm, edited 1 time in total.
User avatar
ian_scho
High Lord
Posts: 2807
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

When I override an event in DSB, I always write the name down in startup.lua and add it to my list. That way, when you announce a new version, I can easily ignore most of the changes that you do rather than having to compare each one line by line.
User avatar
Parallax
DMwiki contributor
Posts: 424
Joined: Mon Aug 28, 2006 7:56 pm
Location: Back in New Jersey

Post by Parallax »

Here are a few I'd really like.
:arrow: party goes to sleep
:arrow: party wakes up
:arrow: game gets saved
:arrow: game gets loaded
I may add more as I think about them. :)
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Those are more game engine things but I'll make sys_ functions for them. :)
Post Reply