Tileset Editor 1.0 (Proof of Concept)

That’s the whole bloody point, pardon me overzealous emphasis.

Make it only work if the tile sizes of tileset and the ASCII tilepage match. Not hard to check for by far. The point is to allow custom tilesets to plug holes with matching ASCII automatically rather than having to slog through everything. All good sets start from an ASCII page anyway, so every tileset maker should already have a tilepage in the required size available.

Respect +1

Okay, number 0.10. Last I checked 10 > 9, so not a downgrade.
Version: “You are welcome to a full refund if your satisfaction is not guaranteed.”

download

Changes:
Tweaked the ascii tile generator, now produces a colored rim aroudn text for its BG color.
Added a menu option to generate a black background for generated ascii.
Greatly improved the “Add missing tiles” menu item to add more of the missing tiles, now supports vehicles! Also supports psudo entries not found in json.
Figured out what was causing cataclysm to crash, an “unknown” entry with a tile is required.

Okay, stop saying things are “easy”, I am the one who determines if something is to be considered “easy” or not with this program. After all I wrote it.

Also, vote time. Should I make the source to this available? It’s a real mess, I wasn’t actually planning to support it this far.

Well, I’ve seen how Cataclysm pulls ASCII tiles out of font data, and adapting it for bitmap ASCII graphics would be fairly easy, at least as far as I could see.
With that in mind, yes I do support the notion of making the source to this program available. :stuck_out_tongue:

[quote=“Sean Mirrsen, post:41, topic:5029”]That’s the whole bloody point, pardon me overzealous emphasis.

Make it only work if the tile sizes of tileset and the ASCII tilepage match. Not hard to check for by far. The point is to allow custom tilesets to plug holes with matching ASCII automatically rather than having to slog through everything. All good sets start from an ASCII page anyway, so every tileset maker should already have a tilepage in the required size available.[/quote]

I’d like to point out that this is an extremely rude attitude toward someone who’s carrying out your requests for free. Your opinion is valued, but please, do keep in mind that the person you’re addressing here has absolutely no reason not to just toss their hands in the air and walk away, other than their good will and positive feedback from the community.

[quote=“CIB, post:45, topic:5029”][quote=“Sean Mirrsen, post:41, topic:5029”]That’s the whole bloody point, pardon me overzealous emphasis.

Make it only work if the tile sizes of tileset and the ASCII tilepage match. Not hard to check for by far. The point is to allow custom tilesets to plug holes with matching ASCII automatically rather than having to slog through everything. All good sets start from an ASCII page anyway, so every tileset maker should already have a tilepage in the required size available.[/quote]

I’d like to point out that this is an extremely rude attitude toward someone who’s carrying out your requests for free. Your opinion is valued, but please, do keep in mind that the person you’re addressing here has absolutely no reason not to just toss their hands in the air and walk away, other than their good will and positive feedback from the community.[/quote]I… honestly don’t think I was being rude there, at the very least that was far from the intended tone. Sorry if that’s what I actually sounded like.

I’ve just been seeing that line of reasoning (tilesets would have to have matching tilepage) before, and it makes so little sense to me as an obstacle to making the idea work that I just don’t know what to do with it. Dwarf Fortress makes it work with entirely unlinked “tileset” and “graphics set” packages, and graphics packages not meant for a given tileset size, or sometimes even a given specific tileset don’t work, and it still works fine on the overall. Here it’s matter of the tileset creator having a page of ASCII characters in the same tile size as the set he’s making, and it is a sufficiently “given” thing that I cannot comprehend it being considered a valid point of obstruction.

I’ll be happy to implement the feature into the program myself, if that’s what it takes.
(even if it’ll be rendered pointless as soon as Cataclysm itself can render hybrid ASCII/Tileset graphics)

[quote=“Sean Mirrsen, post:46, topic:5029”]I’ve just been seeing that line of reasoning (tilesets would have to have matching tilepage) before, and it makes so little sense to me as an obstacle to making the idea work that I just don’t know what to do with it. Dwarf Fortress makes it work with entirely unlinked “tileset” and “graphics set” packages, and graphics packages not meant for a given tileset size, or sometimes even a given specific tileset don’t work, and it still works fine on the overall. Here it’s matter of the tileset creator having a page of ASCII characters in the same tile size as the set he’s making, and it is a sufficiently “given” thing that I cannot comprehend it being considered a valid point of obstruction.

I’ll be happy to implement the feature into the program myself, if that’s what it takes.
(even if it’ll be rendered pointless as soon as Cataclysm itself can render hybrid ASCII/Tileset graphics)[/quote]
I’d suggest that you go ahead and code exactly what you are suggesting.

I’m not sure how you would do it with a game that is in constant flux, where new items are popping up with each release, where creatures are changing and being added, etc.

I’ve looked at the various tilesets and none of them follow the template suggested by Cataclysm. I imagine if you were to follow the template you could create some sort of standardization which is needed to do what you are wanting to do.

But, how are you going to handle the implementation of a dozen new creatures in a given release?

I figure one would just append them to the existing file but if you’re trying to do a ascii chart and a tileset… are you proposing two separate files? If you are using the one file then how are you going to handle it? Since DDA seems to interpret what to display based one position having two entries per item / creature seems… odd. But I don’t think that’s what you are planning.

Maybe you’re suggesting a backup ascii chart just for the editor to reference and to pad out any missing tiles?

The more I think about your “simple” idea the more I wonder how I’m missing the simplicity of implementation. I don’t think I’m following your thought process on this and I’m in another space thinking the wrong way. :slight_smile:

You clearly see an “easy”(ish) way to get this done and I’m totally wandering around it blind.

I think what he is suggesting is this:

Maybe you're suggesting a backup ascii chart just for the editor to reference and to pad out any missing tiles?

[quote=“whiran, post:47, topic:5029”]You clearly see an “easy”(ish) way to get this done and I’m totally wandering around it blind.[/quote]Actually, yes I do. I suggested that way, and it is already implemented in this program. This program can, right now, find all the tiles missing from a tileset, and assign each of them the same ASCII tile that the console version of C:DDA uses to display that creature/item/object. The net result is, if you create a blank tileset with nothing but the tilesize defined, this program could ideally generate a tileset entirely out of ASCII for you - and plugging that tileset into the game would give the an exact lookalike of the non-tiled, console version of C:DDA.

The only problem, right now, is that it uses a default ASCII tilepage generated from a font, and scaled to whichever tilesize it used by the set. My suggestion - my original suggestion - involves using a 16x16 (256 tiles) bitmap ASCII codepage, instead of a font. So that any ASCII bitmap tileset, be it 16x16:

8x8:

Or any other size, could be used quickly and easily, even if specific graphics for individual units and items and everything else is not yet specifically defined in the set. It’s already possible - the program just needs to learn to load a PNG instead of generating tiles from a font. I’m no expert in programming, but what little I do know points to the PNG method being almost easier to implement than the font thing. :slight_smile:

Actually the game already has the ability to load from a bitmap font, in fact I had to update that bit of loading code for the SDL2 conversion. You just have to point the typeface definition at a bmp or png file (which has to be in data/font/).

Not sure if this is what you have in mind.

[quote=“Chase, post:50, topic:5029”]Actually the game already has the ability to load from a bitmap font, in fact I had to update that bit of loading code for the SDL2 conversion. You just have to point the typeface definition at a bmp or png file (which has to be in data/font/).

Not sure if this is what you have in mind.[/quote]Heh, it certainly appears to work. However it kinda immediately becomes apparent why it’s not a terribly good way for the game to run - even with a 10x10 set, the width of the sidebar increased 25% from what it originally was. Cataclysm’s point of issue there is the sidebar - it’s the reason square fonts are hard to use.

With the hybrid SDL/Tiles setup, the sidebar would be displayed with the usual 8x12 console font, which is perfect for displaying text, whereas the actual viewport would be rendered in ASCII/Graphics tiles of whichever size the user wants.

So it’s kinda what I had in mind, except I wanted the bitmap ASCII only used in the viewport, not for the UI. Not to mention that it does not address the missing tileset tiles, and the fact that the set can’t be transparent, otherwise all UI menus will be solid blocks of color.

edit: Elaborating a little more on how I see the “perfect” way for the game to work. Take Dwarf Fortress. It has “tilesets”, and “graphics sets”. Tilesets are the pink-background things I posted above - 16x16 tile ASCII pages. “Graphics sets” are what Cataclysm right now calls “tilesets” - collections of replacement graphics for creatures. But with a twist - keyword being “replacement”.
Graphics sets are made to match a given size of tileset, and just as there are many tilesets, there are many graphics sets, some of which even include their own painted-up tilesets - and anything a graphics set does not define, simply renders as it would have rendered without the graphics set installed.

Bottom line being, ideally a C:DDA “tileset” must become a “graphics set”, that overrides the tiles only for the things it defines, with the rest of the game using a provided ASCII page to display everything.

This relates to this Tileset Editor program in the way that it provides a feasible workaround for the game not doing the above at the moment. If the Tileset Editor itself can make a C:DDA “tileset” comprised of ASCII tiles out of a provided ASCII sheet, then the current game will be able to functionally look and behave the same as the hypothetical version of the game with ASCII fallback for missing tiles - except in this case the missing tiles will be pre-defined in ASCII.
And like I stated before, this program already does that, with the only caveat being that it doesn’t allow loading a premade bitmap ASCII sheet, so that the ASCII tiles used match the style of the rest of the tileset. Add that little capability, and barring any bugs with hardcoded graphics elements, it will be perfect.

Request:
can you make it so the editor always tells you what’s the current ASCII+color combination that you are trying to bind to a tile?

I mean showing you the ASCII defaults of each object.

And yeah, please look at what I’m asking here to see if it’s doable:
http://smf.cataclysmdda.com/index.php?topic=3901.msg94167#msg94167

Ah yeah, HRose I was actually considering doing something like that. I already have most of the infrastructure required for it.

The other thing I want to add is the ability to select a tile from the tileset and see what entries use that tile. I want to get both these in for 0.11, but having issues finding a place for the second one in the GUI.

Created a Git Repository with this. So you can commit to it if you really want to. Also you can see some of the insanity I have done.

1 Like

Really great program!

So, apparently compiling this from source doesn’t actually work. I might be missing something obvious in regards to prerequisites, but even if I don’t have experience with Java I can still read a manual.

I installed the latest Oracle JDK. I “installed” Ant and set its variables so that it works. Running the build script with Ant results in a success (minus the launcher app, which is inexplicably in C, but doesn’t ultimately matter). But trying to run the resulting jar file results in nothing. No errors, no anything. Checking with Java Decompiler against the existing 0.10 build reveals no significant abnormalities except that your versions of Ant and the JDK are older.

So… am I missing something here?

Just running the jar the old fashioned way should work. But I usually run it via the launcher.

I use the ant to build it for release.

So, to answer the question… No, it doesn’t seem like you are missing anything, it should run.

Found the problem. On your end, mind. :wink:

You renamed the “cdda” folder holding the class packages to “cddatse” and everything in the code to use the “org.csdgn.cddatse” package - but in the build script, you are still pointing the “Main” function to “org.csdgn.cdda.Main” - which doesn’t work. Took some trying to figure it out. :stuck_out_tongue:

Ooops, yeah. That would be me “refactoring without testing” again. A bad habit.

Okay, so I got to that magical point where I think it should be working as intended, but it actually does no such thing, leaving me completely dumbfounded.

Is there anything in the way of debug functions in this language? I can’t tell where the process is refusing to work.

It doesn’t seem like it should be failing completely, because I mostly just gutted the part of the createAsciiTile function that actually draws the tile, not anything that actually creates the basic tile or returns it.