SonLVL

Discussion in 'Utilities' started by MainMemory, Mar 29, 2011.

  1. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    The chunk limit is $100, because the level layout is stored as bytes, so any chunks over $FF wouldn't be accessible anyway. Sonic 1 only has enough space in its RAM for $52 chunks IIRC, but SonLVL doesn't enforce that, as it can be easily circumvented by loading uncompressed chunks from ROM.

    You can see the current count of chunks/blocks/tiles and the limits under the selected item's index in their respective editors.
     
  2. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Some art editing improvements:

    • Chunk editing now uses the same mouse mapping as layout editing: right to select, left to draw.
    • Block editor now supports the same functionality as the chunk editor.
    • Right clicking in the tile editor now changes the selected color.
    • Added "Show Block" checkbox to solidity editor, which draws the currently selected block under the solidity data.
    • Selecting a tile in the Tiles tab now changes the tile that will be pasted into the block editor, and selecting a block in the Blocks tab now changes the block that will be pasted into the chunk editor.
    • Selected chunk stays in view in the chunk list when switching tabs.
     
  3. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    I've noticed a few rather annoying issues with the current variation of SonLVL:

    • The Chunk and Block editors suffer from an odd issue, where selecting and copying over a block/tile to another place moves the selection cursor, but trying to flip the selected area or change the palettes results in the previously selected option undergoing the change, instead of the current one (hope that makes sense...)
    • When you delete a block, all the blocks in the level chunks, including the uneditable animated blocks, have their Block IDs brought down by 1, which makes sense; this is what makes it so SonLVL doesn't scramble the level, obviously. However, Adding a new block adds 1 to all the block IDs in the chunks except for those uneditable animated blocks, forcing you to go through and fix them by hand. I'd reccomend making these blocks that aren't available in the levels block mappings a bit more static, so they don't get shifted with the rest of chunk mappings.
     
  4. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Sorry about that, apparently I had only fixed adding chunks/blocks/tiles, not deleting them. Both issues are fixed now.
     
  5. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I've added the ability to define the size of chunks in the INI by setting a chunksize value, or even set width and height independently via chunkwidth and chunkheight. When a custom chunk size is specified, the chunk format (chunkfmt) will only determine whether the game uses a single or dual path system. So it's possible to use dual-path 256x256 chunks, single-path 128x128 chunks, 64x64 chunks, or even 16x32 chunks. Obviously the sizes have to be a multiple of 16.

    Also the object grid size setting is properly saved and loaded now.
     
  6. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I've added an option to the Palette Export menu to export up to four full palettes at once to the format used by YY-CHR (and I guess anything else that uses palettes stored in plain RGB bytes).
     
  7. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    When placing blocks in the chunk editor, the settings for x/y flip and collision rarely carry over to newly placed blocks, which is painful to say the least. The copied blocks often have completely blank settings, or seemingly random settings, and rarely copy over exactly as they should.
     
  8. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
  9. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I've made some changes to art importing lately:

    • It now checks for flipped blocks, in addition to flipped tiles.
    • All existing tiles/blocks/chunks are checked for duplicates, instead of only the ones that have been imported so far.
    • Fixed a bug with duplicate blocks in chunk importing.
    • Added two methods to import layout data (tiles/blocks/chunks/layout) from images: using the context menu item in Select mode will paste the data directly into the level, while clicking the button above the Layout Sections list will add a new layout section that you can use later.
     
  10. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    If anyone tried importing or flipping blocks or chunks since the last update and got a broken mess, that's been fixed now. Also 1bpp (2 color) and 4bpp (16 color) images will now import to the palette line that is selected in the palette editor, instead of always using line 1.
     
  11. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    SonLVL can now import collision from an image when importing layout, chunks or blocks. Assuming your art is named Bitmap.ext, the collision will be either Bitmap_col.ext, or Bitmap_col1.ext and Bitmap_col2.ext. The collision image(s) must use the following colors: Magenta (#FF00FF) (or transparent) for Not Solid, White (#FFFFFF) for Top Solid, Yellow (#FFFF00) for Left/Right/Bottom Solid, and Black (#000000) for All Solid.

    For example, these three images:

    [​IMG]|[​IMG]|[​IMG]

    Will produce something like this:

    [​IMG][​IMG]

    Also I fixed PNG palette exporting, the View->Collision->Angles menu item, and I moved the Import option for chunks, blocks and tiles to a button on the toolbar above their respective lists.
     
    Last edited by a moderator: Apr 22, 2015
  12. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    I found a really oddball problem which was obviously unexpected by you, so I didn't report it for a time, but since I've hit it multiple times now...

    When invalid chunk IDs exist in the layout (aka layout sections with chunks not defined in the chunk mappings), and I accidentally right click on them, SonLVL gives me an error saying whether I should continue or quit, which is understandable. The big issue is, if you select continue, it brings the error up again, forcing you to quit SonLVL. A really rare problem, obviously, but I'd appreciate a fix, nonetheless, as this tends to occur more often then I'd expect.
     
  13. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    SonLVL can now import priority settings as well, using an image named Bitmap_pri.ext (assuming the original image is Bitmap.ext). This image should consist of 8x8 squares for each tile, with black/transparent being low priority and white being high priority. Additionally, scrollbars in tile/block/chunk lists now scroll by entire rows/columns at a time, and when viewing angles in the level, the proper values for flipped blocks are shown.

    GetArt.NET has also been updated for priority importing.

    Pacguy, I will see if I can fix that...

    Edit: that should fix it.
     
    Last edited by a moderator: Apr 24, 2015
  14. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    SonLVL has a new feature:

    [​IMG]

    You can now display a water palette together with a normal palette at a configurable height from the View menu. It applies to the Objects and Foreground tabs, and the Foreground export option.

    You can set defaults for each level in the INI by entering the palette number as 'waterpal' (if palette2 is the water palette, put waterpal=2) and the height in hex as 'waterheight'.

    Edit: I also fixed the "Hide Debug Objects" toggle in the Export menu.
     
    Last edited by a moderator: May 1, 2015
  15. LooneyDude

    LooneyDude Back after a long absence! Member

    Joined:
    Feb 1, 2014
    Messages:
    277
    Location:
    EVERYWHERE
    I'm not sure if there's a way to do this already, but if there isn't, could you please add a feature that makes left clicking the method for selecting 16x16 blocks and right clicking the method for painting with that block? It feels uncomfortable using the default controls.
     
  16. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I was just asked to change it to be the way it is now for consistency with the layout editor. It is also consistent with SonED2 this way.
     
  17. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Perhaps an option to decide which control scheme to use, in the "View" menu might do dX
     
  18. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    So, would such a toggle (which would go in the Edit menu, thank you) affect all drawing, or only the Chunks, Blocks, and Tiles tabs? Maybe even make it global, so left clicking would open context menus?
     
  19. LooneyDude

    LooneyDude Back after a long absence! Member

    Joined:
    Feb 1, 2014
    Messages:
    277
    Location:
    EVERYWHERE
    I'd prefer if it only affected the chunks, blocks, and tiles.
     
  20. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    SonLVL update:

    • Adding loopchunks setting to INI files, which contains a comma-separated list of hex chunk IDs that will automatically have the loop flag set when placed in a level. Conversely, any chunks not listed will automatically unset the loop flag when placed. Note that if you are copying from the list in the ASM, you will have to clear the high bit, so B5 becomes 35.
    • Saving FG/BG editing mode in settings file.
    • Adding option to switch mouse buttons for chunk/block editing (in Edit menu).
    • Fixed foreground collision export when water palette is enabled.
    • Adding option to export art+collision+priority all at once. This affects blocks, chunks, foreground and background exporting. Note that visibility settings will be ignored with this option enabled, and objects will not be exported with the foreground. If a Sonic 1-style level layout has any chunks with the loop flag set, two collision images will be exported for the layout, showing both states of each loop.
    • Adding JASC-PAL (Paint Shop Pro) palette export.
    • Switching block tile import to go vertically across the block first, for improved interlaced mode (S2 2P) compatibility.
    Edit: also, Clownacy has been doing a great job of updating the object definitions on GitHub, and I've updated the copies in the updater to match for those disassemblies.
     
    Last edited by a moderator: May 8, 2015