List of handles

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
Parallax
DMwiki contributor
Posts: 424
Joined: Mon Aug 28, 2006 7:56 pm
Location: Back in New Jersey

List of handles

Post by Parallax »

I was wondering if it would be possible to have a list of all DSB handles. The list of functions is great when I know what I want to do and I how I want to do it, it tells me how to get the information I need. The exvar list is good to know what parts of standard archetypes are customizable, and to what extent. For the most part, however, the most common problem a designer faces when stepping out of the standard puzzles is to answer the question: "How do I get the game to do X?"

I know there is a handle for when the party tries to turn. If I want to prevent the party from turning in some parts of a custom dungeon, this is the handle for me. But what if I want to trigger something when the party goes to sleep on a certain tile? Is there an on_party_sleep handle? And if there is, in what file is it likely to be? I can look, and rummage and search, but it takes time and a list would certainly help. Is there an on_save handle, so I can mess with people who practice save-scumming (this monster is hard to kill because every time you save it regenerates! :evil: ) Is there an on-reload handle, to mess with the people who mess with the random number generator (save right before leveling, reload until you get a good stat roll. Oh my, are your stats lowering?) Once again, I could check, and look and dig, but what if I don't find any? Absence of evidence is not evidence of absence, maybe the handles are there and I just missed them. Maybe they are named something I wasn't expecting, or I mistook them for something else (there might be an on_load that I thought was triggered when you add weight to a party member or something.)

So yea, this is a plea for an exhaustive list of handles, so we can first know what is and isn't possible, and then request additional handles so we make the number of impossible things shrink. I know your (Sophia) time is finite, but I certainly don't have the understanding of DSB it takes to make such a list. Maybe someone else does?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

What you're suggesting is the logical complement to the list of dsb_* functions. Rather than a list of functions the game provides that you can call, it's a list of functions you can provide for the game to call.

What you're calling "handles" is two main groups:
- Events (on_* functions associated with archs)
- System Functions (sys_* functions)

So, where's the information on these two?

:arrow: I think ian_scho had made a pretty good list of on_* functions. Maybe he could post it... :)

:arrow: You can get an exhaustive (at least if I think it is!) list of sys_* functions by looking at base/system.lua. Each function has some small explanation. If any aren't clear, though, let me know.

I've wanted to put DSB documentation on the wiki now, but I've been sort of busy lately, or just plain come up with excuses not to do it... documentation is never fun. ;)
User avatar
Parallax
DMwiki contributor
Posts: 424
Joined: Mon Aug 28, 2006 7:56 pm
Location: Back in New Jersey

Post by Parallax »

Oh, the wiki. I would not have thought to look there. When you do put DSB info up there, please post an announcement here about it. And I agree that having to write documentation is even worse than having to read it, but it will help in the long run.

In any case, thanks for the info. I look forward to seeing Ian_scho's list ;).

And I call them "handles" because they are the places where you can grap the code and twist it to do your bidding. :)
User avatar
ian_scho
High Lord
Posts: 2807
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

You rascals.... :wink:
Post Reply