Difference between revisions of "DSB/DSB for RTC users"
(New page: Here are some tips and tricks for using DSB if you're used to using RTC. ==Floor Triggers== Unlike in RTC, DSB floor triggers need not be on the CENTER of the tile. By placing them on one...) |
|||
Line 29: | Line 29: | ||
DSB currently does not support the PNG format. Convert your images to TGA (Targa). DSB does, however, support alpha channels. | DSB currently does not support the PNG format. Convert your images to TGA (Targa). DSB does, however, support alpha channels. | ||
− | [[Category:DSB | + | [[Category:DSB|DSB for RTC users]] |
Revision as of 20:38, 16 August 2008
Here are some tips and tricks for using DSB if you're used to using RTC.
Floor Triggers
Unlike in RTC, DSB floor triggers need not be on the CENTER of the tile. By placing them on one of the other directions, you can respond only to objects that are in that position.
It may also be important to note that unlike in RTC (I think?), no guarantee is made as to the order that multiple triggers on one tile will execute. If you need to do a complex set of tasks in a specific order, use one trigger linked to multiple targets, or write some custom Lua code.
Alcoves
DSB alcoves are, in general, much simpler than RTC alcoves. To do complicated things in response to objects put into an alcove, put a floor trigger on the same square as the alcove and use that instead. In particular, DSB alcoves have no concept of constant weight; you will need to use a floor trigger. A CENTER'd floor trigger will respond to anything put in any alcove on that tile. To respond only to a single alcove on a tile with multiple alcoves, put the trigger on the same direction as the alcove. (That is, to respond only to the alcove on the NORTH side of the tile, put the floor trigger in the NORTH tile position, not in the CENTER)
WALLITEM_RELAY
A message chain (dsbmsgchain) can also be used to emulate some of the simpler behavior of RTC's "WALLITEMRELAY," but a more thorough implementation of this is given by the "xrelay" arch. For details, see base/objects.lua. For really complex relays, you're best off just converting their functionality to Lua code.
However, one of the most common applications of relays, increasing the number of targets and/or changing the message type, is not even needed in DSB: while RTC has a maximum of eight targets per trigger and they must all be sent the same message, DSB allows an effectively unlimited number, and in addition, each target can have a different message. For example :
exvar~trigger''id = { target = {id1, id2, id3}, msg = {MACTIVATE, MTOGGLE, MDEACTIVATE} }
This will cause triggerid
to send MACTIVATE to id1, MTOGGLE to id2, and MDEACTIVATE to id3.
Door Buttons
DSB door buttons are treated the same as any other button. Unlike RTC door buttons, they must be explicitly given a message and a target. Of course, the upside is that door buttons in DSB can do anything that any other button can do, not just open a door on the same tile.
Wallsets
RTC wallsets should work, unmodified, in DSB as "ext wallsets," using dsbmakewallset_ext.
PNG and Alpha Channels
DSB currently does not support the PNG format. Convert your images to TGA (Targa). DSB does, however, support alpha channels.