Two different kinds of sys_* functions

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.
Post Reply
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Two different kinds of sys_* functions

Post by Sophia »

There are actually two distinctly different sorts of sys_* functions defined in base/system.lua: blank ones ready to be overridden, and useful ones that already perform useful tasks for the base code. There are also some that are in-between, like sys_character_die.

As many of you have already noticed, base/hooks.lua contains various h_* hook functions. The purpose of these hook functions is that they are called by complex base code functions in order to make changing certain behaviors easier without having to override and copy/paste an entire hugely complicated base code function-- but, to make things even more confusing, some of the complex sys_* functions have their own h_* hooks.

It's a little bit of a mess. I'd like to clean this up so that the functions that can be easily overridden are all in one place, or two places, depending on how useful the distinction is between h_* and sys_* functions (for the dungeon designer, probably almost useless!); perhaps I should move all of the easily overridden sys_* functions into base/hooks.lua as well.

Any thoughts are welcome. :)
User avatar
Gambit37
Should eat more pies
Posts: 13719
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Two different kinds of sys_* functions

Post by Gambit37 »

Since I hardly understood a word of that, I'll let others give you more valuable feedback ;-)
Post Reply