[DSB Tutorial 1] Getting Started with DSB Editing

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: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

[DSB Tutorial 1] Getting Started with DSB Editing

Post by Sophia »

Creating A New Dungeon!
Upon initially running Editor Strikes Back (henceforth ESB) you can't really do much. You'll have to create a new dungeon or load an old one in order to be able to proceed. We'll start by creating a new dungeon. Go into the "File" menu and choose "New" and you'll be able to choose a location. Create a new folder (call it new_dungeon or something) and select it. ESB will then initialize your dungeon, and you'll be treated with a view of a brand new (and very empty!) dungeon, as well as many options for objects that you can place into that dungeon. All standard DM and CSB objects are available, and of course you can make your own, too!

You should see a screen that looks something like this.

Basic Dungeon Editing!
ESB starts out in dungeon drawing mode, which is the mode that you use to toggle between walls and floors. Any time you want to get into this mode, select Dungeon Draw in the Edit menu, or press D on the keyboard. Click and drag around to draw a bit of dungeon, like this:
Image

Now let's put the party into this maze. To position the party, choose Set Party Start in the Edit menu or press Y on the keyboard. Then click somewhere that is open. The party's initial location and direction will be positioned wherever you clicked.
Image

In the upper right, you will see four arrows. The section of the tile you're currently over determines the party's initial facing direction: the top for north, the left for west, the right for east, and the bottom for south. Go ahead and move around inside of a tile and see how the arrow direction changes.
Image

This subtile positioning is used all over ESB. If you find the tiles too small to use it comfortably, you can select Double Zoom from the View menu to increase the size of the tiles.

Go to the File menu and choose Save to save your dungeon. Be sure to save often!

After saving, try loading up DSB and test your new creation. There won't be much there yet, but at least you'll get to wander about your maze. This tutorial won't specifically prompt you to try things out in DSB very much, but you should feel free to do so at any time, whenever you want to see how things look or try out new mechanics.

Adding Some Stuff!
An empty dungeon is pretty bland. Let's add some stuff. Go to the list on the right, and expand "Things." Find the "FOOD" class, and choose an "apple."
Image
This will automatically place ESB into Add Object mode, which you can also enter by pressing A on your keyboard. However, please note: if you do not have an object selected, entering Add Object mode will not work. So if it seems to not be working properly, make sure that you have an object to add actually selected.

Click to add some apples throughout your dungeon. You can use the subtile selection, just like before, to place the apples wherever you like. Each click will add one more apple, so add as many as you want.
Image

Let's add a couple of doors, next. Find "Doors" and choose a type that looks good; for this example, I'll go with "door_wood" which is found in the "WOOD" class. Doors and their doorframes are considered separate objects in DSB, but if you attempt to add a door to a tile without a doorframe, ESB will automatically add a doorframe for you. So all you have to do is just click to add a door. Place the doors in areas that are likely to be blocked off.
Image

Next, add a button to the door sealing the party in its room. A door button is called, logically, a "doorbutton" and is located in "FloorUprights" in the "DOORBUTTON" class.
Image
Image

Champions!
There is just one problem so far. Nobody can open these doors or pick up these apples because there is nobody in the party, yet. Let's add a character. In the Edit Menu, select Champion Roster. You'll see the following window:
Image

Click "New" to add a character. You'll be asked for a unique id. This is not the character's name in-game or anything like that, but rather a unique internal name for DSB and ESB to use when referring to the character. On the other hand, the character's name isn't the worst choice for this, either. Give the character the identifier "TEST" for now. Then highlight your newly added character, and click the "Edit" button.

Image

Let's give him some levels, maybe 4 or so. Change the 0 under each of the four skills to a 4. Also, who someone who looks like Mophus? Pick someone more suitable, let's say, Zed. Delete "port_mophus" and change this text to "port_zed" and this will replace the character's portrait with Zed's. Go ahead and boost the stats, change the character's name, and add a title, too.

Image

We'll worry about inventory later. Click "Ok" to get out of this, for now.

To add this character to the party, click on party slot 0, labeled "(0) --Empty--" (under "Current Party") to highlight it. Make sure "TEST" is still highlighted as well, and click "Add" just below the "Current Party." The party slot will now be replaced with "TEST" which means that member is now in the starting party. The "Remove" button will, logically enough, remove the currently highlighted party member. After you've added "TEST" to your party, close this window, and go ahead and save, and then test this out in DSB. You'll be able to run around your dungeon, opening the door with a button, and picking up apples.

What about those other doors that we can't open yet? We'll have to create some means to open them. Sure, we could just add door buttons for them, too, but DM dungeons have so many more options than that. Next time I'll talk about buttons, triggers, and such-- as well as adding some nasty monsters to fight, and multiple levels to delve into, too!
User avatar
Kesa
Journeyman
Posts: 67
Joined: Fri Sep 10, 2010 11:44 pm

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Kesa »

This is excellent Sohpia very nice tutorial you made here I was able to understand it completely ^.^ yaaaaa
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by linflas »

That's a good start for newbies. Sorry in advance for ranting in your first ESB tutorial Sophia but why do you have to type "port_zed" instead of simply having a list of available elements of some 'portraits' table ? It feels already like programming ! Why couldn't it be 'portrait_zed' or (more natural) portrait['zed'] ? That 'port' thing makes me think of some network parameter...
"The only way out is another way in." Try Sukumvit's Labyrinth II
User avatar
Jan
Mighty Pirate
Posts: 2760
Joined: Tue Sep 23, 2008 4:55 pm
Location: Scumm Bar, Czech Republic

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Jan »

Oh, that's very cool, thanks, Sophia. I like this tutorial very much! I think I'll give the DSB / ESB a try, after all! :)
Sophia wrote:someone who looks like Mophus? Pick someone more suitable, let's say, Zed.
This is just not fair. All characters I'll add to my dungeon will look like Mophus. No wonder he looks so mophus-like when he's so much oppressed.
Finally playing and immensely enjoying the awesome Thimbleweed Park-a-reno!
User avatar
raixel
The Dungeon Master Cylinder
Posts: 1200
Joined: Mon Jun 21, 2010 10:10 am
Location: I see Mount Rainier in the distance...

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by raixel »

Oh thank god! Sophia, I could kiss you right now!
User avatar
Kesa
Journeyman
Posts: 67
Joined: Fri Sep 10, 2010 11:44 pm

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Kesa »

linflas wrote:That's a good start for newbies. Sorry in advance for ranting in your first ESB tutorial Sophia but why do you have to type "port_zed" instead of simply having a list of available elements of some 'portraits' table ? It feels already like programming ! Why couldn't it be 'portrait_zed' or (more natural) portrait['zed'] ? That 'port' thing makes me think of some network parameter...
Later on she can explain that you can customize everything about your dungeon. In my new dungeon all I have to type in is 01 or 02 for portraits :P
User avatar
Gambit37
Should eat more pies
Posts: 13766
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Gambit37 »

Excellent starting point Sophia, great job :-)

I second Linflas point though, and I think this is where you'll start to understand what average users need. Users like me don't want to have to remember codes or parameters or type stuff in, they want to select stuff from pre-defined lists or tables of images and such like. So for the portraits, I'd expect to be able to select a portrait from a panel of thumbnails or similar. Is that hard to add to ESB? (Sorry, I know that's a bit OT from the tutorial, feel free to move it to a new topic).
User avatar
Kesa
Journeyman
Posts: 67
Joined: Fri Sep 10, 2010 11:44 pm

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Kesa »

thats not a bad idea at all, but shouldnt we keep this to a suggestion forum and not in her tutorial post?
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Sophia »

Yes, please do. I'll make another post about that.
For now, please keep this thread for questions about the tutorial material.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by zoom »

where do I know what names the port_xy(portrait files) have? or : where do I look these up, or do I have to know them by heart already?

if I am new to dm, how do I know what Fighter 4 means? All this level thingies.
How hard would it be to gain a level after 4th? would it be harder than fighter 0th?
where does the scale end, what is the maximum ? fighter 16 figher 99? It does not inform me about this.

what skill would the fighter 4th level have ? (chop? Melee?) How does anybody know?
Are there hidden levels still? Can I influence those and what happens if I made a different leveling /classes system, can I then leave that blank and enter it in a lua text editor? (does it force me to fill it in?)

I would like to know the limits of the names there, since I doubt the field can be filled up completely( approx.22 letters for second name´s field)
User avatar
Gambit37
Should eat more pies
Posts: 13766
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Gambit37 »

zoom wrote:where do I know what names the port_xy(portrait files) have? or : where do I look these up, or do I have to know them by heart already?
That's why visual, pre-populated lists of what's available are such a god send ;-) Please, please, pwetty please.

And while I think Zoom is getting a bit ahead of himself asking all this stuff in tutorial 1, this next point is really important:
zoom wrote:what skill would the fighter 4th level have ? (chop? Melee?) How does anybody know?
The big problem with RTC is that no-one knows how to create balanced weapons/characters/monsters/dungeons because all the knowledge needed to do that is only in George's head and no-where else. It would be problematic for doing the same in DSB if the same knowledge is just in Sophia's head. We really do need some tables of data for this kind of stuff.... :)
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Sophia »

Gambit37 wrote:It would be problematic for doing the same in DSB if the same knowledge is just in Sophia's head. We really do need some tables of data for this kind of stuff.... :)
One advantage DSB has is that it uses actual DM formulas. So there is data on the DM encyclopedia, posted on these forums, in the CSBwin source code etc., and if all else fails you can go digging through the Lua source code of DSB and find out directly how it does something internally. I know it's not the most user-friendly but look on the bright side, at least it's not like RTC where there is absolutely no way to find out. :)
User avatar
ian_scho
High Lord
Posts: 2807
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by ian_scho »

There's also quite a lot of info now on the wiki. Sophia must have put a lot of effort in to populate it.
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Joramun »

I agree with Sophia: anyone can explore the lua files to get the info (s)he needs.

The file "global.lua" is particularly simple and holds all the info about graphics and sounds.

(and a simple copy-paste from it is enough to be able to insert custom stuff quickly)
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: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Sophia »

ian_scho wrote:There's also quite a lot of info now on the wiki. Sophia must have put a lot of effort in to populate it.
You've done quite a bit yourself, too! :D
The wiki doesn't have so much information on formulas and such but for delving into how to accomplish various tasks in DSB using Lua script it is quite useful. :)
User avatar
Gambit37
Should eat more pies
Posts: 13766
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Gambit37 »

Agreed, lots of useful stuff in the Wiki. However, I think that was my mistake: I started to try and understand all that without getting to grips with the basics first :oops:
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by zoom »

just noted that this moonstone question was the wrong tutorial!
So if I put a cloak of night on the neck the displayed dex is displayed in ESB without this bonus, but in DSB it would be adjusted. OK.

Maybe a little headline would help,
saying that stat enhancing items will give their bonus at launch - time of DSB (ESB has stats displayed without (item)boni)
(It was a bit confusing -honestly still is- that the line says: Inventory NOTE: inventory changes take effect immediately . all items will remain.. etc)
what the heck does that mean?! ;) I guess that above was part why I asked about the bonus from moonstone and wether that would be displayed

Also, I would probably highly suggest to delete the sentence: remember that values are stored 10 times their value and - if it is not too much trouble- change the displaying of stats without the additional "0"
(Would suggest to have 100 Health not be 1000 but maybe rather : 100 (and with then next to it greyed out: x10)
but that is most likely problematic to change(since, as I feel it to be ESB more or less directly gives values over to DSB. A 100 would end up being 10 really. But it would help to have from a reading perspective the real health value and so on... and it is shorter, too)

Keep up the good work. I would like a tutorial on changing the picture of a sword to sword_magic or such..Graphic changes. Wallsets with whack maybe, too.
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by Sophia »

It's actually really easy to change an image like that.
It's just code like this in your own objects.lua file.

Code: Select all

obj.sword.icon = gfx.new_icon
obj.sword.dungeon = gfx.new_dungeon_image
... or whatever you want to do. :D
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Re: [DSB Tutorial 1] Getting Started with DSB Editing

Post by zoom »

ok, have to look into this a bit more. Thought all items where packed next to each other in one great graphics file

edit: the thread HOW TO by MonFulIr deals with graphics, it is really a helpful read; almost qualifies as tutorial (page one;text by Sophia)

as a sidenote:
(I do not know how to post a link and substitute the actual url with normal text, like
when you see the above line, I would like to Have HOW TO being the link with the url hidden(only showed when hover mouse over it)

http://www.dungeon-master.com/forum/vie ... 53&t=28854 ="HOW TO"

It is something to do with Html , alt= but the options on posting do not give me that option, or am I blind?
Post Reply