Editing in ESB for noobs and heReTiCs

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
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Editing in ESB for noobs and heReTiCs

Post by Joramun »

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:

Code: Select all

exvar[55]={ msg=M_ACTIVATE, target=128 }
Where 55 is the identity number of the pad (it can be any number).

*exvar stands for external variable :wink:

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 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)
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.
Last edited by Joramun on Sat Dec 04, 2010 9:43 pm, edited 1 time in total.
What Is Your Quest ?
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Editing in ESB for noobs and heReTiCs

Post by Sophia »

Nice post.
I made a couple of small edits where there was slightly inaccurate information (e.g., a DSB tick is 1/5 of a second)

One more important mechanics archetype is 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.
User avatar
Trantor
Duke of Banville
Posts: 2467
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Re: Editing in ESB for noobs and heReTiCs

Post by Trantor »

Really good post, thans for that! But could you change the blue color of the headings? It's barely readable if you use the ProScreamer skin.
Post Reply