SonLVL

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

  1. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    SonLVL cannot adjust every layout file that references the chunk set you're currently editing, unless I add a list of every relevant layout file into every level's INI entry, which would end up being huge and unfriendly looking.

    You can press the Delete key to delete things.
     
  2. FFuser

    FFuser a.k.a Darklight Member

    Joined:
    Nov 14, 2013
    Messages:
    88
    Well, it really only seems to be the loops that are affected (the other stuff was just stuff that needed to be removed from the background). Is there anything I can do manually to make the loop chunk reference the chunk it's supposed to switch to when Sonic passes? (I'll also ask in the Basic Q&A thread).

    Edit: Solution found - change the loopnums.bin file to add the new chunk ID number + $80 to the list.

    The delete key only works in the object editor for me. The quickest way I've found to delete tiles/blocks and chunks is to right-click and press D.
     
    Last edited by a moderator: Sep 10, 2014
  3. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    I can use the delete key in all the windows just fine.
     
  4. FFuser

    FFuser a.k.a Darklight Member

    Joined:
    Nov 14, 2013
    Messages:
    88
    I found how to manually fix the loop change digging through the Q&A thread.

    As far as the delete key, I can only go by my experience, so that's why I thought it didn't work. I have two delete keys on my laptop that work elsewhere and it just doesn't work for me in this scenario. No combination of ctrl+del, alt+del, or shift+del works either. I tried those as well since my two delete keys also cover "insert" and "." respectively. If it works for everyone else, that's fine. Right-click+D is still relatively fast compared to what I was doing before I asked about it.
     
    Last edited by a moderator: Sep 10, 2014
  5. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Are you sure you had the chunk/block/tile list focused when pressing Delete?
     
  6. FFuser

    FFuser a.k.a Darklight Member

    Joined:
    Nov 14, 2013
    Messages:
    88
    Yes. I pretty much exhausted all the possibilities, that's why I asked about it.
     
  7. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    Is their any way to have Sonlvl read multiple ini files as one? I have a menu system setup like the S3K ini, but I want each "game" to have a separate ini file, for easy editing.
     
  8. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    No, SonLVL can only read one INI and its corresponding _user INI at a time.
     
  9. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    I found this bug while working on Neon Casino. The "Flip Vertically" button is broken for chunks.

    Before:

    [​IMG]

    After (couldn't be arsed to remove white square surrounding the current block as I did with the before picture):

    [​IMG]
     
    Last edited by a moderator: Oct 12, 2014
  10. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I've fixed the bug.
     
  11. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    SonLVL now has support for custom ring layout formats. I can't imagine many people will use this ability, but there it is. The method for setting it up is similar to a custom level layout format, except that you can choose to define rings as an object with a specific ID rather than have them completely separate as S2 and S3K do.
     
  12. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    Do you think you could add support for Sonic 2s' 2 player mode? I really want my hacks 2 player mode to work for me, and I get the feeling that part of the reason this mode is neglected and/or removed may be that getting the proper mappings and artwork can be rather painful, especially when It isn't built into their go to editor.
     
  13. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I certainly could add a function to rearrange the art so that it's compatible with interlace mode 2, as SonED2 already has. I'm not really sure if it'll be able to work with multiple tile/block files though (for example, HTZ and WFZ, GHZ, anything in S3K).
     
    Last edited by a moderator: Oct 30, 2014
  14. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    That should be fine, seeing as sonic 2 doesn't use HTZ, SCZ, or WFZ in the default 2-player mode menu, and S3K doesn't use the S2 system (unless porting it's tiles, blocks, and chunks break things? I'd like that to be clarified...)
     
  15. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    No, LevelConverter merges all the data into single files, avoiding the issue.
     
  16. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I've created a new command-line program which is available via the SonLVL updater: ObjectLayoutDiff. The program has two modes of operation; in create mode, it takes two object layout files, and compares them to see which objects were added and removed in the second file, and records that information in a file (I use .objdiff, but it's just an ini file); in apply mode, it takes an object layout file and a previously generated diff file, and applies the changes in the diff file to create a new object layout file.

    The program is rather basic, if an object is moved the diff records it as a deletion and addition, and if you've altered any objects in a file that you're applying a diff to, it may not be able to delete everything it's meant to.

    The reason I wrote this is so that I could apply the changes made in Knuckles in Sonic 2 to a Sonic 2 hack without having to manually port over all the changes I've made to the KiS2 files. In case anyone is interested, here are the objdiff files to turn S2 object layouts into KiS2 layouts.
     
  17. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    There's been an issue with sonlvl that's been annoying me for a long time. Usually, when you add or remove blocks, the program automatically shifts the IDs on the chunks so that the artwork lines up properly, which is good. However, when animated art gets involved, adding or removing blocks becomes impossible, as doing so shifts the animated tiles around and causes havoc, ruining lava and animated oil, and scrambling other art which happens to get stuck using the now not properly mapped animated art. Is there any way to fix or work around this? Adding art to OOZ and HTZ (particularly HTZ) is painful with this issue in the way.
     
  18. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    You would have to properly add the animated blocks into the block file and get rid of the "animated pattern mappings" stuff in the asm.
     
  19. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    SonLVL can now use different compressions for FG and BG layout files in layout formats that use separate files, either by setting fglayoutcmp and/or bglayoutcmp in the INI or by overriding DefaultFGCompression and/or DefaultBGCompression in a custom layout format class. Anything not specified will use the layoutcmp/DefaultCompression data as before.
     
  20. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    Some errors I came across when redoing FDZ:

    - If all chunks are deleted, you cannot add a new one. It gives an error saying the following:

    Unhandled Exception

    ArgumentOutOfRangeException

    - Blocks cannot be deleted using the Del hotkey
     
    Last edited by a moderator: Dec 13, 2014