How to convert a graphic set?
The basic conversion is extremely simple: Look for your old style file, e.g. "goodstyle.dat", and drag it onto the "GSConvert.exe" file. A black console window should appear (don't worry, you don't have to use it!) and after it has disappeared again, the converted files should be available:
- The actual style files in the subfolder "styles/goodstyle" (where of course "goodstyle" is replace by your style name).
- A translation table file in called "goodstyle.nxtt" in the subfolder "data/translation". This is actually a pure text file, so you can open it with any text editor.
Actually your style is already fully functional now. But if that would have been everything, then I could have done the conversion myself. So here is a list of issues to look out for:
1) Give your pieces proper namesIf you haven't already given your pieces human-readable names, they will be called "T5.png" or "O42.png". That's bad. They should be at least somewhat descriptive. Please have a look at the example styles and the names used there. For example "block_12" is fine, while "stuff_112" is borderline and "blue_large_block_with_three_red_stripes" is probably overkill.
So how can I change the name? Let's assume we want to rename piece "T5" to "block_03". Then do the following:
- rename the file "T5.png" into "block_03.png"
- If there is a file "T5.nxmt" or "T5.nxmo", rename it into "block_03.nxmt" resp. "block_03.nxmo"
- Open the translation file and search for the line "PIECE T5" and replace it by "PIECE block_03".
Alternatively you can do the following: Open the style in the old graphics style tool, and add proper names there. Then save the style and convert it again with the "GSConvert.exe". Now all name changes should be properly applied.
2) Style name have to start with your nicknameAll styles from non-official games now have to start with your nickname (or an abbreviation thereof). As this was already a recommendation before and semi-enforced by namida, I don't expect any troubles here. If you nevertheless have to change your style name (or want to rename it for a completely different reason), then you have to do two things:
- rename the folder of your style in the "styles" directory, e.g. from "goodstyle" to "nepster_greatstyle".
- open the translation file "goodstyle.nxtt" in the "translation" folder, and replace every occurance of "goodstyle" with "nepster_greatstyle". Do
not change the name of the translation file, itself!
3) Check that your terrain pieces are arranged in a proper way in the editorFor terrain pieces, the editor orders them according to their name. So try to use similar names of pieces that should be grouped together in the editor. For this reason piece names like "block_03" or "block_blue" are encouraged over "large_block", "small_block" and "blue_block".
If you have to rename your pieces due to this reason, use the same steps as described in point 2).
4) Remove slowfreeze and triggered decoration objectsThe graphics converter still outputs them, even though they will no longer be supported for the simple reason, that you might want to reuse their sprites. So if you have such objects in your style, please do the following:
- Delete the sprite file (or move to somewhere else) and delete the ".nxmo" file of the same name.
- Search for your sprite name in the translation tabe file, and delete the whole section starting from "$TERRAIN" and ending with "$END" that contains the piece name.
The same applies if you want to remove any other piece for some reason.
PS: If you have a decoration object without any trigger area, then it is either a pure decoration object or a movable background and can stay.
5) Remove duplicated piecesWe want to avoid duplication of pieces. So if you used an object (or less likely terrain piece) from another style, then please do the following steps:
- Find the sprite you copied from. A good place to look for it is the folder "styles/default" and in case of splat-pads "styles/namida_wasteland".
- Check whether they are actually the same sprites. If they look the same, but have different size, please contact me and I will deal with it.
- Delete the sprite file and the corresponding ".nxmo" file coming with it.
- Locate another translation table file that has a reference to this sprite in it. For everything not contained in "styles/default" you can use the translation table for the corresponding style.
- Go to the section in your translation table, that contains the name of your piece, and replace all lines starting from "COLLECTION..." until "$END" with the ones from the other translation table. Make sure to keep your original line starting with "INDEX".
I know this copying of lines from translation tables isn't easy, so I have compiled a list of common such objects and how their section should look like at the end. So you can basically copy from here, too, but please make sure to keep your piece index!
$OBJECT
INDEX "Keep this!"
COLLECTION default
PIECE updraft
LEFT_OFFSET 0
RIGHT_OFFSET 0
TOP_OFFSET 0
BOTTOM_OFFSET 0
WIDTH 32
HEIGHT 16
$END
If you have an updraft object, that uses the same type of sprite, but has a different size, then you still can use this section. You only have to change numbers in the lines "WIDTH 32" and "HEIGHT 16" to the size of your actual updraft piece.
$OBJECT
INDEX "Keep this!"
COLLECTION default
PIECE pickup
LEFT_OFFSET 0
RIGHT_OFFSET 0
TOP_OFFSET 0
BOTTOM_OFFSET 0
PICKUP_PATCH
$END
$OBJECT
INDEX "Keep this!"
COLLECTION default
PIECE owa_left
LEFT_OFFSET 0
RIGHT_OFFSET 0
TOP_OFFSET 0
BOTTOM_OFFSET 0
WIDTH 32
HEIGHT 32
$END
$OBJECT
INDEX "Keep this!"
COLLECTION namida_wasteland
PIECE splat_wire
LEFT_OFFSET 0
RIGHT_OFFSET 0
TOP_OFFSET 0
BOTTOM_OFFSET 0
$END
$OBJECT
INDEX "Keep this!"
COLLECTION namida_wasteland
PIECE antisplat_wire
LEFT_OFFSET 0
RIGHT_OFFSET 0
TOP_OFFSET 0
BOTTOM_OFFSET 0
$END
6) Edit out preplaced lemmingsHopefully the graphics converter does this already for you, but just in case it does not do so:
- Delete your preplaced lemming sprite and the corresponding ".nxmo" file.
- Replace the section for the preplaced lemming piece in the translation table by the following (while keeping your original index number):
$OBJECT
INDEX "Keep this!"
SPECIAL lemming
LEFT_OFFSET 2
TOP_OFFSET 9
$END
7) Combine exit and exit topsIn the new-formats we want that level designers don't have to place two objects per exit. So please create a sprite where they are already combined. As there have to be some nasty manual changes to both the translation file and the ".nxmo" file, you can send me your style with the unmodified exit in the style folder and an extra combined exit sprite, and I will do all the necessary modifications.
If you want to do everything yourself, you are welcome to do so. Ask me for more infos in this case.
Btw. at the moment you cannot combine the locked exit and the exit animation, so keep these as they are.
8) Crop huge empty spacesThis should not be a problem for custom styles, but was one for the original styles. But if you nevertheless see a spite with huge empy spaces at some side, consider cropping it a bit. As this affects the placement of the piece, you will have to modify the translation table a bit. Look at the section for your piece and you'll notice some lines called "OFFSET". These are exactly for such purposes:
- If you remove N pixels from the top, change the line "TOP_OFFSET 0" to "TOP_OFFSET N".
- If you remove N pixels from the bottom, change the line "BOTTOM_OFFSET 0" to "BOTTOM_OFFSET -N".
- If you remove N pixels from the left, change the line "LEFT_OFFSET 0" to "LEFT_OFFSET N".
- If you remove N pixels from the right, change the line "RIGHT_OFFSET 0" to "RIGHT_OFFSET -N".
If you have any further questions or problems, please contact me.
For those who want to modify their styles:
a) Removal of old piecesDelete your piece (.png), the text file with the same name (.nxmt or .nxmo) if it exists and delete the section corresponding to this piece in the translation table.
b) Addition of a new pieceJust load your style in the new graphic style tool, add the new piece there and then save the style again. Please make sure that you don't choose a piece name that already exists within the style.
You don't have to change anything in the translation table.
c) Changing a pieceIf you keep the size of the sprite and want to keep the same position and size of the trigger area (if any), then this is very simple: Just change the image .png file.
If you want to change the size/position of the trigger area or the sprite itself, most likely you have to modify both the translation table and the .nxmo file. Contact me, if you have problems there.