Difference between revisions of "DSB/Editing in ESB"

From DmWiki
Jump to navigationJump to search
(New page: == "Editor Strikes Back" - A GUI editor for DSB == Included with DSB is '''Editor Strikes Back''', a GUI editor for DSB. The first thing you'll have to do to get started is to create a ...)
 
m (added category)
 
(One intermediate revision by one other user not shown)
Line 46: Line 46:
 
** counter: it's like a msg_sender, except it will send its message when it's count is zero. You guessed, it has an exvar count=number
 
** counter: it's like a msg_sender, except it will send its message when it's count is zero. You guessed, it has an exvar count=number
  
** qswapper when activated, the qswapper will exchange it's target type of item (for example, a fountain) for another defined type (for example exvar: arch=gorface)
+
** qswapper: will exchange it's target type of item (for example, a fountain) for another defined type (for example exvar: arch=gorface)
  
 
** item_action: it incorporates many of the actions in RTC's '''WALLITEM_ACTION''', and allows shuffling of the "operating instance" of a trigger etc. as well as the manipulation of various objects in the dungeon. For example, you can use it to send a certain message to any monster that steps on a certain trigger, or send a message to all instances of a certain type, or create a new instance and put it somewhere in the dungeon, or whatever else.
 
** item_action: it incorporates many of the actions in RTC's '''WALLITEM_ACTION''', and allows shuffling of the "operating instance" of a trigger etc. as well as the manipulation of various objects in the dungeon. For example, you can use it to send a certain message to any monster that steps on a certain trigger, or send a message to all instances of a certain type, or create a new instance and put it somewhere in the dungeon, or whatever else.
Line 60: Line 60:
  
 
<small>[http://www.dungeon-master.com/forum/viewtopic.php?f=53&t=28860#p118919 By Joramun]</small>
 
<small>[http://www.dungeon-master.com/forum/viewtopic.php?f=53&t=28860#p118919 By Joramun]</small>
 +
 +
[[Category:DSB|Editing in ESB]]

Latest revision as of 14:03, 9 May 2011

"Editor Strikes Back" - A GUI editor for DSB

Included with DSB is Editor Strikes Back, a GUI editor for DSB.

The first thing you'll have to do to get started is to create a new game directory. You can do that from within the editor, or just make a folder in Windows before you start. This will be where ESB puts your newly created dungeon.lua, and where you can store any other files you need, like graphics or a custom startup.lua. After you've created a new dungeon, you'll be presented with a grid of walls, where, by selecting items from the tree view on the right, you can stick in all the objects necessary. Most that use exvars (external variables) have a standard selection of exvars predefined when you place them.

The test_dungeon provides a lot of examples of most of the game's objects in use, as well as some additional ones that expand the functionality of traditional DM and show what DSB can do. The test_dungeon's Lua source code also contains examples for adding new objects and adding new spells.

Questions?

First Steps

  • Step 1: Explore
Open the dungeon.lua file in the test_dungeon directory with ESB.
Explore it. Check the mechanics. Play the dungeon.
  • Step 2: Experiment
Do you start from scratch or from RTC?
Try and modify things.
Mechanics in DSB are using a MESSAGE system.
For example: If you walk on a pad, the said pad will send a message to a target.
In ESB, edit the pad you will see the following exvars: msg=M_ACTIVATE and target=128
Where 128 is the identity number of the target item (it can be any number).
In dungeon.lua, you will see:
   exvar[55]={ msg=M_ACTIVATE, target=128 }
Where 55 is the identity number of the pad (it can be any number).
  • Step 3: Get ready

The main mechanics in ESB are the following:

    • trigger: ground item that will send a message when it's stepped on by the party / by a monster / by an item
    • msg_sender: it's a relayer of messages. When it receives a M_ACTIVATE message, it will send a message to its own targets. It can be used as a repeat fire: add the exvar repeat_rate=number, then it will send the message every number ticks (roughly 1/5 of a second). If it receives a M_DEACTIVATE, it will stop doing so.
    • sequencer: it's like a msg_sender, except that it sends its messages to its targets ONE AT A TIME, every tick. It can be used to make a sequence of events. If you add the exvar send_reverse=true, everytime it sends a message to a target, the previous target will get the opposite message (NB: the opposite compared to what it received on the previous step, not compared to the current message being sent to the new target)
    • counter: it's like a msg_sender, except it will send its message when it's count is zero. You guessed, it has an exvar count=number
    • qswapper: will exchange it's target type of item (for example, a fountain) for another defined type (for example exvar: arch=gorface)
    • item_action: it incorporates many of the actions in RTC's WALLITEM_ACTION, and allows shuffling of the "operating instance" of a trigger etc. as well as the manipulation of various objects in the dungeon. For example, you can use it to send a certain message to any monster that steps on a certain trigger, or send a message to all instances of a certain type, or create a new instance and put it somewhere in the dungeon, or whatever else.
I leave the rest to your curiosity. The main messages are: M_ACTIVATE, M_DEACTIVATE, M_TOGGLE, M_DESTROY
  • Step 4: Customize
Open the object.lua of the test_dungeon and in base.
Open the startup.lua of the test_dungeon.
See how items are defined by an "archetype": obj.arch = { graphics, properties }
Explore the files to see what's what. Graphics are the easiest to modify.

By Joramun