The Dink Network

"New" dmod editor

November 8th 2015, 01:56 PM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
As I wrote in the topic about my upcoming DMod, I'm working on a major rewrite of my editor. I'm now at a point where others can take a look and give some feedback. However, note that it is not finished and in particular I haven't completed the part to compile the result into a playable DMod. So don't expect anything useful yet. This is for DMod authors, to see if they like the interface.

It's missing several features. I have plans for:
Tile editing (not supported at all currently).
Selecting multiple sprites by dragging over a region (currently only ctrl-click is supported).
Display hardness.
Add textual notes to the map.
Better control over sprite selection.
Sequences which use other sequences as their source are currently not drawn.


If you have any other features you'd like to see, let me know.

Here's how it works:

First, you take an existing DMod and decompile it into the format my Python code uses, or you create a new DMod with my Python code. I do not expect anyone other than me to do this at the moment.

If you want to add new graphics or music, you place it into the DMod directory.

Then you run the mkhtml script on it. This will convert the DMod into a directory which includes all the sources (so it's quite large), plus the html, css and javascript files to edit them. I do not expect anyone other than me to do this at the moment.

You open pde.html with a browser and use it to edit the DMod. This is the step that is ready for testing now. You can save your progress to local browser storage with the "Save" button, or to a file on disk with the "Export" link.

The exported file is converted back into the format my Python editor expects. This step is untested, and I don't expect anyone to use it yet.

You edit scripts with a text editor at any point.

The Python code is used to build a DMod from it, which can be played with Freedink (and maybe 1.08, if you're lucky).

So to try it out, you need the directory that was created with mkhtml. I've prepared one for you from the original game. Get it here. Note that it is 250MB, because it contains all the graphics and sounds.

Once you have this, you can get updates (which are very small) from here. Just copy them over the files you extracted from the zip file.

Instructions on how to use:
Use a keyboard with a number pad; disable num lock.
Drag with the middle mouse button to pan the view.
Store positions with alt and a letter. Return to the position with shift and the same letter.
Jump to the currently selected sprite(s) with j. Jump to their warp target(s) with t.
Left-click within the hardbox of a sprite to select it; use ctrl to select multiple.
Only sprites in the active layer can be selected. Press a number to activate that layer. Press ctrl and a number to move all selected sprites to a new layer.
Edit properties in the settings window. Use the selection box and "Single Sprite Settings" to edit only one selected sprite; uncheck the box to edit all at once. (This can be used to separate sprites at the same position.)
Move sprites by selecting them, pressing m and moving the pointer.
Move warp targets by selecting their sprite, pressing t and moving the pointer.
Set the Que similarly with q.
Press ctrl-insert to create a new map, ctrl-delete to delete one.
Press delete to delete the selected sprites.
Press 0 on the number pad to select a non-collection sequence. Press any other number to select a direction from a collection. Select with left button; change frame with - and =. Set frame to 1 with 0.
Middle-click to copy the selected sprites (which can be new or from the map).
In sequence (or collection) selection view, press s to set the appearance of the selected sprite(s) to this sequence and frame. Press t to set the touch sequence for the currently selected sprites. In collection selection view, press w, i, a, or d to set the walk, idle, attack, or death collection respectively. Press the key without a selected collection to clear the current setting.
The map screen with the red border (yellow if indoor) is the one that is being edited. Change it by moving a different screen to the center of the window.
Editing works in layers. By default, layer 1 through 7 are normal, layer 8 is ignored (items in there will not be in the DMod), layer 9 is invisible background and layer 0 is visible background. This can all be changed. The checkboxes define the function of the layer in the DMod, the selection defines how it is shown in the editor.

Let me know what you think. If you have any questions, please ask.

Thanks!
November 9th 2015, 09:30 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
Very interesting. Thanks for sharing. Does this mean it's all written in HTML/CSS and JavsScript then?
November 9th 2015, 09:58 AM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
Does this mean it's all written in HTML/CSS and JavsScript then?

Yes, the part that I released here is. The other parts (for converting between the different storage formats) are all still in Python. But now those parts no longer depend on Gtk+, which should make them a lot easier to install and run on Windows and Mac.

By the way, I've tried to follow standards, so I'm pretty confident things will not work on Internet Explorer. I've only tested it on Firefox, so it may not work on anything else.

Also, on my system the browser sometimes decides to claim all memory in the computer, resulting in a hang. If anyone has an idea how to fix that, I'm interested. Can I force garbage collection somehow?
November 9th 2015, 10:36 AM
wizardg.gif
Leprochaun
Peasant He/Him Japan bloop
Responsible for making things not look like ass 
I'll try testing this on Mac sometime. Maybe today, maybe wednesday, maybe friday. Probably one of those days when/if I have time. May need help installing, not sure. We'll see.

If I can get it to work I will be very excited.
November 9th 2015, 11:50 AM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
I've added and fixed some things and updated the top post to reflect that. I posted the changed files to my server. You need the original zip file, and after extracting the files, you should copy those new versions over the old ones of the same name.

The changes are:
- Warp targets are now visible and editable. Use t to move them with the mouse.
- Map positions can be stored with alt-letter and revisited with shift-letter. Apart from moving around the DMod with this, the purpose is to make an area with monster templates that have all the settings you want, which can easily be selected and then copied into the DMod.
- Setting base_* and touch sequences now works. Also, by pressing s you can set the main sequence (and frame) for a sprite.
- Use j to jump to the currently selected sprite(s). Use w to jump to their warp target(s).

Note that to use any of the keys, the map must be the active element. If it isn't, ctrl-click on it (to avoid losing your selection) before pressing the key.