Visual Vault Editor


If you are interested in helping with tiles, vaults, patches or documentation, this is the place for that.

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Wednesday, 16th May 2012, 05:14

Visual Vault Editor

I am moving the stuff about my vault editor to this thread so that it doesn't clutter up the Trouble Understanding Vaults? forum.


infiniplex wrote:
galehar wrote:
omndra wrote:While what is already in place Works i think that a video tutorial would be very much welcome.
Also i've brought this up before but it instantly got shot down (for some reason?)
Alot of games have level editing side programs. Why can't Crawl have one for people to make their own Dungeon Sprints/Zot defense maps?

Duh. Because it's a lot of work to code one. And there's already so much things to do on the game itself. If someone wants to contribute...


I have written a simple visual vault editor. It is an Java applet an is currently at http://infiniplix.ca/applets/vault_editor.html. I have visual images for each tile ("borrowed" from DCSS Tiles of course). You can enter your vault as tiles and copy it out as text. Or copy in a vault as tiles. There is also a Preview command that will eventually show you what your vault looks like with SHUFFLE, SUBST, and NSUBST commands. I am not finished the program yet, so NSUBST currently does nothing. However, I thought I could post it anyway.

I am not sure if this is where I should post this. Possibly it should have its own thread. Or something else. I can provide the source code if desired, but as of yet is is kind of disorganized and entirely undocumented.

On another note, there are ambiguities in the syntax.txt file. Those I have found so far are:
1. SHUFFLE: xc/mx
- do existing 'x's become 'm's or 'c's
- ditto SHUFFLE: xx/cm
2. When exactly do SUBST: lines resolve as weights and when as characters?
- what is the meaning of SUBST: c = m x:20b
- what about SUBST: c = m xb:20
3. SUBST: a = : b c
- Does this replace all 'a's with a random one of ':', 'b', or 'c'
- Or are all 'a's and all '='s replaced with the same one of 'b' or 'c'
4. NSUBST with '/' characters is just explained



twelwe wrote:I'll jave to disable java to try that out (or get a browser that supports it first) but I want to thank you for making an editor. Any kind of editor that simplifies the process of making vaults, even if it does not include every feature, will vastly improve the quantity of vaults and nudge people closer to learning how to "code" then from scratch. You see this with the portal 2 community test chambers: valve released a very simple portal editor that lacks many features, yet has enough support that a good hand can make some very impressive stuff.

Minmay, I haven't submitted any vaults yet (still learning how to utilize every modifier) however I have made a few dozen so far and none of them were done without using your maps as a reference. So thank you as well. I think video tutorials are a great thing, and something I have experience doing having run a successful youtube account. This is something I'd seriously consider when I have vault creation down on the same level as the regular contributors.



infiniplex wrote:Opps. I meant to say

4. NSUBST with '/' characters is just NOT explained

Another one:

5. The layout_BAR tags are unclear. When I saw them, I assumed that they would correspond to the layouts in builder.des. However, this is empirically not the case. They actually use some sort of different system that is not documented in the syntax file. Attempting to use the layouts in builder.des (e.g. layout_forbidden_doughnut) just makes the vault not appear.



mumra wrote:This sounds like a great project, but I would make one suggestion: the easiest way to test a vault is to reuse game code, i.e. develop an in-game vault editor system instead of building a separate application. This will mean as well as solving your problems with SHUFFLE, SUBST, etc. you can also test LUA without having to reimplement a huge chunk of the game API (and think of the maintenance nightmare if you want to keep up-to-date with trunk, which happens to be the version that most serious vault development is done against).



ontoclasm wrote:I did a bit of testing to check some of these but I might still be wrong:

1. Say my map is:
MAP
xxxx.ccc.mm
ENDMAP

SHUFFLE: xc/mx
If the shuffling happens (of course %50 of the time it does nothing) I get mmmm.xxx.xx - x > m, c > x, m > x. My impression is that we run through the declaration in order: x>m then c>x then m>x then x>c, changing each in turn, but never changing a tile that we've already changed (so we don't get m's changing to x's and then to c's).

SHUFFLE: xx/cm
In this case when the shuffling occurs I get cccc.xxx.xx; x > c, c > x, m > x. This fits with the above, since we first change all the x's to c's, leaving the second x to do nothing.


2. It seems to only get counted as a weight (and not crash) if you put a space, one character, a colon, the weight number, and then another space.
SUBST: c = m x:20b gives me a crash, presumably because the game tries to interpret 20b as a number.
SUBST: c = m xb:20 gets interpreted as just a string of characters so you get :'s and 0's getting laid down, for example.


3. SUBST: a = : b c replaces each individual a randomly with {:bc}, and doesn't touch ='s.
SUBST: am = : b c messes with both a's and m's and doesn't touch ='s.
SUBST: a= = : b c replaces each individual a randomly with {=:bc}. Still doesn't touch ='s.
Thus it seems like it grabs the first = or : (after the first character, for cases like SUBST: = = ab) and uses that as the operator.


4. The / means something like "then," so
NSUBST: ! = 3:x / 10:cb / *: m a:20 G
will do this:
First, replace 3 !'s with x's.
Then, replace 10 of the remaining !'s with a mix of c's and b's.
Then, replace all the remaining !'s with a mix of m's, a's, and G's, with a's being twice as common as the others.

Hope those are clear (and correct).

For this message the author infiniplex has received thanks:
MyOtheHedgeFox

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Wednesday, 16th May 2012, 06:19

Re: Visual Vault Editor

mumra wrote:This sounds like a great project, but I would make one suggestion: the easiest way to test a vault is to reuse game code, i.e. develop an in-game vault editor system instead of building a separate application. This will mean as well as solving your problems with SHUFFLE, SUBST, etc. you can also test LUA without having to reimplement a huge chunk of the game API (and think of the maintenance nightmare if you want to keep up-to-date with trunk, which happens to be the version that most serious vault development is done against).


There are several reasons why I did not make an addition to DCSS. I did consider it and actually came up with some (not all) of these beforehand.
1. Although I do know C++, I have never seriously looked at the DCSS code before. Also, I do know it is built on packages that I have never actually used. I know SDL is involved, maybe Curses for colsole mode, and probably at least one more to do the console in Tiles mode.
2. I am not good at working with others and adding to DCSS would have to be a collaborative effort. After all, its not my program.
3. DCSS currently has, to the best of my knowledge, no text editing support. In contrast, Java comes with have some very nice classes to put text in windows. Also, Java has better string handling.
4. One of my most important design goals was the ability to copy in and out vaults as text. I cannot see how this could be connected with DCSS. This feature was valuable because it allowed me to easily display existing vaults. This made it much easier to make my own vaults that were not too different.
5. Making a component to DCSS would be a big project, and I might constitute implicit agreement to support it for the rest of my life. In contrast, the basic editor (display as tiles or test, mouse-based editing) took less than a dozen hours, and a lot of that was getting the images into the format I wanted.
6. I was mostly making this program for my own use. I did not think I could reliably do the mental substitution needed to build a vault with characters, and I have always hated programming by trial and error (e.g. CSS). In a sense, I made this program so I could do vault editing without having to keep track of what all the symbols meant.
7. A full vault editor would be extremely complex. Some features it would need would be:
-> preview vaults, allowing parameters such as branch, depth, and player species to be set
-> subvaults that did not lock up DCSS if they were infinitely recursive (this would probably be a good thing anyway and can be done with a nesting limit at which the vault is rejected)
-> the ability to set the default tiles (e.g. for Pandemonium)
-> prune out old vaults from Lua compiled memory if the vault was renamed or deleted, but not interfere the vaults loaded from real .des files in the process
-> test vaults for cells that might become unreachable (after SHUFFLE, etc calls) so they could be marked as invalid for random teleport
As this is a very difficult (and probably incomplete) set of desired requirements, I had to choose what to put in. Originally, it was just putting in tiles visually and converting to text and back. Later, based on the vaults I was using, I decided I wanted to be able to test my SHUFFLE: lines without starting DCSS. Then it was SUBST: and NSUBST: as well. As of now (May 16, 2012), I intend that will be the limit of my functionality. Also, I doubt these will change in newer versions of DCSS because it they did so, they would break a lot of vaults, which means a lot of work fixing (or removing) them.
8. Adding an vault editor to DCSS directly would probably mean I would have to deal with Lua at least some of the time. I don't know Lua, and my experiances with other scripting languages have been largely negative.
9. A vault editor in DCSS would (assuming it matched the rest of the program), depend largely on keyboard commands. As I always forget keyboard commands, this would make it not that useful to me.

I did not intend this to be the ultimate vault editor. If someone wants to write a better one, I would agree that that would be a good thing. I am not going to do it for the same reason that no one else has so far:

galehar wrote:Because it's a lot of work to code one.


I am open, however, to simpler suggestions and comments.

For this message the author infiniplex has received thanks:
MyOtheHedgeFox
User avatar

Vestibule Violator

Posts: 1593

Joined: Thursday, 19th May 2011, 16:38

Location: Penza, Russia

Post Saturday, 19th May 2012, 15:57

Re: Visual Vault Editor

Excellent work!

But, just as many things connected with Dungeon Crawl, it seems to be quite hard to use -- mostly because of the lack of documentation. =)
Could you please describe the meaning of the glyphs that are, in your opinion, the hardest for the uninitiated to understand?


The original post:
Maybe the idea is stupid, but what if we just found a not exactly vault editor, but just a tiles editor that would allow actually seeing how the vault would look in tiles/symbols, and allow "drawing" them, but would not make the vault map for you?

I remember seeing a program for making Worms:Armageddon maps or something else of this kind that had this capability and was even able to assemble tiles in at least two or three layers by taking them out of a prepared-in-advance grid of 32*32 tiles. It could be helpful with designing vaults, if not making them automatically.


Completely off the topic: Thank you for hosting a Recipes section on your personal site! The vegetarian lasagna recipe looks interesting.
Last edited by MyOtheHedgeFox on Sunday, 20th May 2012, 06:22, edited 1 time in total.
If you find any mistakes or typos in my post, feel free to PM me about it. Thanks in advance!

The Verse flows throughout Aquaria...
Through each ripple and wave...
Through every living being...
The Verse binds us all as one.

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Sunday, 20th May 2012, 00:38

Re: Visual Vault Editor

As a quick fix, I will change the tiles to all have the appropriate letter superimposed on them (probably up sometime Tuesday). More detailed documentation/explanations will take time, and probably be put off until I get NSUBST working (hopefully soon). Thank you for the suggestion.

On a side note: MyOtheHedgeFox, where is "The original Post" you cited from?
User avatar

Vestibule Violator

Posts: 1593

Joined: Thursday, 19th May 2011, 16:38

Location: Penza, Russia

Post Sunday, 20th May 2012, 06:22

Re: Visual Vault Editor

Select all my message, including those two "lines" below "original post:" and that barely visible white string right above my signature, and copypaste it into Notepad. =)

I did not cite from it: I simply did not read your messages well enough before posting.
If you find any mistakes or typos in my post, feel free to PM me about it. Thanks in advance!

The Verse flows throughout Aquaria...
Through each ripple and wave...
Through every living being...
The Verse binds us all as one.

Lair Larrikin

Posts: 28

Joined: Sunday, 13th May 2012, 04:57

Location: Regina, Saskatchewan, Canada

Post Tuesday, 22nd May 2012, 19:26

Re: Visual Vault Editor

The new version is up. There are letters on all the tiles, full support for SUBST, and limited support for NSUBST.

For this message the author infiniplex has received thanks:
MyOtheHedgeFox

Return to Contributions

Who is online

Users browsing this forum: No registered users and 0 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.