Subject: Graphics Editing Tutorial Complete From: "Skharr" Date: Sat, 13 Dec 1:06 PM 12/13/2008 LUNAR MAGIC GRAPHICS EDITING TUTORIAL. (c) Tyler Moffatt 2008 LEVEL > ENABLE CUSTOM PALETTE Checking this ensures that the palette changes you make on this level effect THIS LEVEL ONLY. if you do not check this, editing the palette will affect the appearance of other levels that share it's palette. LEVEL > EXTEND ANIMATED TILE GRAPHICS Changing this option allows you to use any standard graphics or EXGFX chunk as more graphics space for the animated tiles in this level. to actually make use of this requires you to change the animated tile data, which is a topic for another tutorial and will not be covered here. LEVEL > BYPASS STANDARD FG/BG GFX LIST if you're using EXGFX, or you need a combination of graphics files which wasn't present in the original SMW rom, using a standard FG/BG GFX index number isn't going to help. you need this function. selecting it will bring up a window which is completely ghosted untill you click the 'enable bypass for this level' box. check the box. the 'custom list index' is the index number of the new graphics scheme you want to create. this list is global to the whole game, but has so many entries that you don't really need to be cautious when creating a new one. you should set this to a number which is 'available for new list' - unless of course you are making changes to an existing scheme. the set of four boxes below shows the graphics scheme currently loaded. three are attributed to the foreground, and one is typically a background file. clicking on a field will cause a list of all the available graphics 'chunks' or files (each one contains 128 8x8 tiles, often arranged in groups of 4 to make larger 16x16 tiles), which you can browse and select. pressing 'OK' will update the main display, showing you what effect the change will have. if you don't like it and want to 'undo', you can reload the level (provided you saved beforehand!) and it will go back to how it was. the list has three types of entry. first, the standard graphics ones - 0 to 31 - this is the good old nintendo preset stuff (barf). then follows a bunch of 'unusable' entries from 32 to 7F which you should ignore. the remainder from 80 onwards is where your EXGFX will be listed after you insert them. if you don't see your EXGFX listed here, then they haven't been inserted properly. note - a useful feature of this menu is that if you move to an 'unused' entry, the contents of the four boxes will not change. this is useful when you want a list to be almost exactly the same as another one, but with a slight difference. EXAMPLE: load SMW into LM. goto level F6. goto the bypass menu, and check the 'enable bypass' box. since this is a fresh copy of SMW, the top box should already be displaying 'free for new list', since there are no bypass lists. now, you will see FG3 is set to index 15 in the boxes below. click on it and change it to point to 16. now have a look and scroll along the level. you will see the ground has changed it's appearance to a rope because of the new graphics that are loaded. also, the bushes have glitched, because the graphics for them are not present in graphics chunk 16 (they were in 15 which is no longer loaded). LEVEL > BYPASS STANDARD SP GFX LIST this is EXACTLY the same as the above command, only it deals with sprite graphics. LEVEL > CHANGE INDEX OF GRAPHICS IN HEADER this menu allows you to select from the standard list of nintendo's sprite and object graphics. if you are using nintendo's graphics/tilesets, you are better off setting it here, as i believe it will change what appears in the 'tileset specific objects' list of the 'add objects' window. OPTIONS > USE JOINED GFX FILES if this option is checked, when you extract the graphics from the ROM, they will come out in one file, as opposed to in chunks of 128 8x8 tiles. the big file will be called allgfx.bin and will replace whatever is currently in that file in the 'graphics' folder. FILE > GRAPHICS > EXTRACT GFX FROM ROM this is the first thing you should do if you want to modify any graphics. it decompresses the graphics from the ROM and saves them into a dicrectory called 'graphics'. note that it does NOT do EXGFX, just the standard nintendo graphics. FILE > GRAPHICS > EXTRACT EXGFX FROM ROM as above, only this time with EXGFX, and to a folder called (astonishingly enough) 'exgraphics'. due to their nature, EXGFX files are always saved and loaded as individual 128 x 8x8 chunks. EDITING THE GRAPHICS EXTERNALLY now you can load the graphics in your favourite tile editor (i recommend tile layer pro), and edit away. remember to save afterwards ;). depending on what kind of edit you want to make, your method should vary. for example: MAKING EXGFX is best done by copying an existing chunk of 128 8x8's in windows, and renaming it EXGFX80 or whatever slot is free. then you can edit it, and save it in your 'exgraphics' folder (if there isn't one, make one next to the 'graphics' folder) ready to be inserted later. MODIFYING EXISTING GRAPHICS - for example, changing the look of the sloped hills, pipes etc, coins is best done by exporting the graphics in one big chunk, then editing in a tile editor. to do this, enable 'use joined GFX files' then extract the graphics (see above). EDITING ANIMATED TILES is best done in the same way as modifying the existing graphics, since animated tiles can't be loaded and swapped around as EXGFX. you'll find the animations at the bottom of the allgfx.bin file that LM produces. EDITING OVERWORLD GRAPHICS is only possible by altering the overworld tiles - found in allgfx.bin - in an external tile editor. EDITORS > 8x8 TILE EDITOR WINDOW (EDITING THE GRAPHICS INTERNALLY) LM has it's own tile editor which is slightly more limited than using an external program - however it is convenient and very useful. as with all graphics editing, make sure the graphics are EXTRACTED first. now get the 8x8 editor on the screen. page up and page down (or arrow up and down) can be used to choose the 4 pages. the first 2 pages are objects and background, the last 2 pages are sprite graphics. each page is divided into two halves (top half and bottom half) showing 2 of the 4 chunks loaded for FG/BG and sprite (SP) graphics respectively respectively, and correspond to the settings in the bypass list or header pointers for that level. to edit a tile, left click it and it will appear blown up in the window below. you can 'load' the mouse with two colours by using the left and right buttons on the palette strip at the bottom, and 'paint' with these colours by left/right clicking on the blown up block image. the flip and rotate functions are self-explanitory. pal up and pal down switch around which colours are used from the palette. map col sets up a 'remapping scheme' where you can change one colour to another. for example you may wish to change white to red or whatever. note that this doesn't alter the pallete, just the bit values in the block to change which colour of the palette the block uses. click 'do map' to force the changes. right clicking on the tile array pastes whatever's in the edit window back to wherever you click. be careful! also - NOTE that you can't edit animated tiles (at the time of writing - LM v1.41) WHEN YOU ARE DONE editing, press F9 - this saves the changes to the graphics folder (not to the ROM) to be inserted later. FILE > GRAPHICS > INSERT GFX TO ROM whatever method you have used to edit the graphics, this is how you put them back in. it re-compresses everything in the 'graphics' folder and inserts it into your ROM. your new graphics should now be ready for use. NOTE that (at the time of writing) some animated graphics changes don't seem to show up right away, so you may have to reload your ROM to see them in LM. FILE > GRAPHICS > INSERT EXGFX TO ROM as above, but with the 'exgraphics' folder. this folder should contain ALL your added graphics at all times. once you have inserted them to the ROM, keep them in this folder, and re-insert them along with any new EXGFX you make. NOTE: DO NOT try to insert files (GFX or EXGFX) which have more than 128 8x8 tiles into the ROM. it will possibly corrupt your ROM! FILE > GRAPHICS > INSERT/EXTRACT BYPASS LIST TO/FROM ROM saves and loads the list of custom graphics schemes for both sprites and objects, so you can export them from one ROM to another. these are the schemes set up in LEVEL > BYPASS STANDARD FG/BG GFX LIST or SP GFX LIST.