Icon Editor

Dream Maker allows you to edit icon files used by BYOND. Icon files are stored with a .dmi extension. In BYOND 4.0 and later, this is just a PNG image file with comments that define its structure, so any editor that leaves comments intact can be used to make changes to your icon. A typical BYOND icon is 32 pixels to a side, but you can make an icon file use a larger size with multiples of 32; such a file is callled a "big" icon.

The structure of each icon file is broken up into several layers:

Icon: The icon file itself.

State: An individual part of the icon file with a unique name, accessed by setting an atom's icon_state var. It is sometimes called a graphic. A state may be either a movie or a pixmap.

Movie: A collection of pixmaps used for animation and/or for icons facing different directions.

Pixmap: A single block of pixels, which can either stand alone or be used as part of a movie.

When you open an icon, the state editor will appear. There is also a movie editor, and a pixmap editor.

Note: If your icon is bigger than 32×32, Dream Maker does not support editing the pixmaps within it. You will need to use a different tool for this. To edit a larger pixmap, copy and paste it between Dream Maker and a 32-bit image editor.

The State Editor
The state editor is the main window that appears when you open an icon file. For new icons it will be empty, but for icons you have already created, it will show each individual icon state.

At any time in the state editor, you can use the Edit | Undo menu command or the Ctrl+Z key to undo the last change. Only the last change may be undone.

Creating Icon States
There are several ways to create a new state:


 * Press the button with a palette icon or use the Graphic | New Pixmap... menu command.


 * Press the button with a camera icon or use the Graphic | New Movie... menu command.


 * Use the Graphic | Import... menu command or Ctrl+I keyboard shortcut to import an image file.


 * Copy another state from within Dream Maker, and paste it into the icon with the Edit | Paste menu command or the Ctrl+V keyboard shortcut. (Note: You cannot copy and paste icon states between two different Dream Maker windows, but you can do so with pixmaps.)


 * Paste an image from another window or program.

Removing Icon States
To remove an icon state, highlight it and select the Edit | Delete menu command or press the Del key. You can also cut an icon state, and paste it into another icon, using the Edit | Cut command or Ctrl+X keyboard shortcut.

Saving Changes
Any changes you make to an icon file will not be made permanent until you choose to save it. Use the File | Save menu command or Ctrl+S shortcut to save the file. If you wish to save the changes to a different file, use File | Save As... or File | Save Copy As... instead.

Icon Size
Icon sizeA standard icon is 32 pixels by 32 pixels. However you can choose larger sizes if you wish. The individual pictures (pixmaps) of large icons cannot be edited directly in Dream Maker, but can be copied and pasted from another program. An icon bigger than 32×32 pixels is called a big icon. To change the size of your icon before any icon states are added, go to the text boxes at the top of the state editor and change their values. The new icon size must be in multiples of 32. When you use the icon it will be broken down into individual tiles. Another way to change the icon size is to import an icon, before adding any other icons to the file. If you import a large icon or image, Dream Maker will ask if you want to use its built-in size, or use the size for your current icon. Internally, big icons break down into a number of smaller icons. Each icon state in a 64×64 icon breaks down into five smaller icon states. The first is a thumbnail image, and the others are individual 32×32 sections of the icon. The lower left section is "statename 0,0" with a space between the name and numbers, or just "0,0" (no space) if the name is blank. The next one to the right is "1,0", the one just above the lower left corner is "0,1", and so on.

Icon state names
Icon state namesIn the icon state editor, each individual state will have a name. Usually, these names should be unique. When you set an atom's icon_state var, the first matching state in the icon will be used. (If you have one version of the icon state that displays when an atom is not moving, and another that displays when it moves, then both should have the same name, and one should be marked as a movement state.) To change a state's name, select it. Then double-click its name, or choose Graphic | Edit State... from the menu, or hit the F2 key. This will allow you to rename the state.

Movement States
Movement statesDream Seeker can display the same icon state two different ways: moving and non-moving. If you have two icon states with the same name in your icon file, and one of them is marked as a movement state, then it will appear only when the object is moving, and the other state will appear when the object is at rest. Movement states are usually animated.

To mark an icon state as a movement state, select it. Then double-click its name, or choose Graphic | Edit State... from the menu, or hit the F2 key. This will allow you to rename the state, and/or make it a movement state. Check the Movement State checkbox that appears. Once you have marked a state as a movement state, a big M will appear next to the icon.

Editing Icon States
Editing icon statesEditing icon statesEach icon state may be either a movie or a pixmap, and there are different ways to edit each one. The only real difference between a movie and a pixmap is that a movie has more than one direction and/or more than one animation frame. The simplest way to edit an icon state is to double-click it, or highlight it and press the Enter key. (Both of those actions are equivalent to highlighting the icon and choosing the Graphic | Edit... menu command.) If the state is a pixmap, then the pixmap editor will open. Otherwise if the state is a movie, the movie editor will open.

Editing icon statesIt is possible to open a state in a different editing mode, such as for example if you wanted to change a single pixmap into a movie. To do that, highlight the icon and use the Graphic | Edit As Movie... menu command or the Ctrl+Shift+M keyboard shortcut. A pixmap edited as a movie will only show one direction and one animation frame. If you use the movie editor to give it more than one direction or animation frame, then the next time you edit this icon state, it will open as a movie automatically.

Editing icon statesLikewise a movie can be collapsed into a single pixmap. Select an icon state and use the Graphic | Edit As Pixmap... menu command or the Ctrl+Shift+P keyboard shortcut. Dream Maker will warn you that this will pick just the first pixmap out of the movie, and discard all the others. If that's what you really want, confirm your choice. The next time you edit that state, it will open as a pixmap.

Importing and Exporting Icons
Icons can be converted to and from the .dmi format used by Dream Maker, making it easier to work in other image editors and bring the results into your project.

Importing an Icon
Importing and exporting iconsWhen you import an icon, it is added to states that already belong to your icon. If your icon has no states yet at all, and you import an icon larger than 32×32 pixels, Dream Maker will ask if you want to use the larger size, or split up the imported icon into chunks. To import, use the Graphic | Import... menu command or the Ctrl+I keyboard shortcut. A box will open prompting you to choose a file to import. The file can be another .dmi file, .png, .bmp, or .jpg.

Exporting an Icon
To save a part of your icon in another format, highlight the state you want to export, and use the Graphic | Export... menu command or Ctrl+E keyboard shortcut. You will be asked which image format is best to save the image. Dream Maker will only export to .png, .bmp, and .dmi formats.

Changing Colors in the Entire Icon
Changing colors in the entire iconIn the icon editor, sometimes it's desirable to change one color to another throughout the entire icon. In older versions of BYOND this was easy to do by editing the palette. BYOND 4.0 doesn't have a palette because it uses 32-bit icons, so the Colors menu has been added for this purpose. In the Colors menu, select the Edit... choice. A box will appear showing all the colors in use in the current icon. (Only the RGB colors themselves are shown. Alpha opacity values are not affected.) Double-click on one of the colors to change it. In the color choice box, make a new selection and click OK. The color will change throughout the whole icon.

Movie Editor
Movie editorA movie is just a collection of pixmaps that can have multiple directions, and multiple frames of animation. The movie editor window shows the pixmaps used for each direction, and beside each direction is an animation showing how that icon state will appear when used in the game. In the movie editor, each individual pixmap is called a frame, because it can be a frame of animation or it can be different for each direction. To return from the movie editor to the state editor, press the Back arrow button or the Backspace key. At any time in the movie editor, you can use the Edit | Undo menu command or the Ctrl+Z key to undo the last change. Only the last change may be undone.

Directional Icons
Directional IconsA movie may have one, four, or eight directions. If an icon state has multiple directions, then an atom's dir var determines which version of the icon to show. This can be used to make an icon that looks different depending on whether it faces south, north, east, or west. It is also possible to handle diagonal directions as well. To change the number of directions a movie uses, find the dropdown list labeled #Dirs and make a new choice. If you choose a lower number, any pixmaps you no longer use will be discarded when you leave the movie editor. If you change the number of directions to 1, and there is only one animation frame, the icon state will open as a pixmap the next time you edit it.

Icon Animation Settings
Icon animation settingsAn animated icon changes its appearance every 1/10 of a second, or longer if you choose to slow it down. The sequence will repeat over and over. Such an icon requires more than one frame to animate.====Number of Frames====

Icon animation settingsTo change the number of animation frames for the movie, go to the box labeled #Frames and press one of the spinner buttons next to it. If you increase the number of frames, blank frames will be inserted at the end of the animation, so you will have to fill those in.====Rewind==== Icon animation settingsSometimes it is desirable for an animation sequence to go forward and then back again. This can be done in the usual way by having duplicate frames, but a much easier method is to turn on the Rewind checkbox. When this box is active, an icon will animate from the first frame to the last, then from the next-to-last frame all the way back to the second frame. To picture this, imagine an icon with a bouncing ball. The first frame is the ball bouncing off the floor, and the last is the ball at the top of its bounce.====Delay====

Icon animation settingsA typical animated icon goes as fast as BYOND will allow, 10 frames per second. However if you want the icon to animate more slowly, you will need a longer delay between frames. The Delay box shows the number of ticks between frames. If you press a spinner button to increase this to 2, then the icon will only change every 1/5 of a second.