SonLVL

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

  1. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    I have just finished a SonED2 -> SonLVL project converter, which is now available in SonLVL's updater.

    Simply give it the path to a folder containing project files (not a file) and it will convert them all to a single SonLVL ini with object definitions.

    It will likely be slow to load the first level since SonED2 tends to include a definition for every object in the game, even if you would never want to place it in a level, so SonLVL has to convert each of those definitions from XML to C# code, compile it, then load the resulting dll, which is then cached so it doesn't have to rebuild it (until SonLVL or the definition is updated).
     
  2. Crash

    Crash Well-Known Member Member

    Joined:
    Jul 15, 2010
    Messages:
    300
    Location:
    Australia
    Hey, I know this isn't related to your latest update, and I think I asked it before, but do you know why you can't view the collision at all with Project 128?
     
  3. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    Because the collision data was not defined in the ini file. I have now added it.
     
  4. JeffCharizardFlame

    JeffCharizardFlame Escape Reality and Play Video Games Member

    Joined:
    Jan 27, 2013
    Messages:
    37
    Location:
    United States
    I try to open sonlvl and I keep getting a FileNotFound Unhandled exception error. How do I fix this?
     
  5. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
  6. JeffCharizardFlame

    JeffCharizardFlame Escape Reality and Play Video Games Member

    Joined:
    Jan 27, 2013
    Messages:
    37
    Location:
    United States
    I already have the updater and it won't open anyways. Every time I run the updater it will crash, saying SonLVL Updater has encountered a problem and needs to close. I'm starting to get really frustrated with these things crashing on me.
     
  7. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
  8. Crash

    Crash Well-Known Member Member

    Joined:
    Jul 15, 2010
    Messages:
    300
    Location:
    Australia
    Thanks :)
     
  9. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    I just added a feature to SonLVL that may be familiar to spreadsheet program users (specifically, MS Excel, from which I shamelessly copied it): the ability to insert or delete 'cells' in the FG/BG layouts.

    [​IMG]

    [​IMG]

    [​IMG]

    The following operations will change the size of levels in games that support it (currently Sonic 1 and S3K):

    • Any Insert operation
    • Delete entire row/column
    Also, I've been thinking about adding more export options for layouts, objects, etc. I can add options for CSV, INI, XML and JSON.
     
    Last edited by a moderator: Mar 1, 2013
  10. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    Update:

    • Added option to cut/copy/paste/clear objects with foreground layout selections (in Edit menu)
    • Layout selections now include loop flag
    • 'Enable Grid' setting now properly saved between sessions
    • Fixed Row/Column labeling in 'Add Group of Objects' dialog
    • For example, it is now possible to copy a loop and all objects inside it as a single unit.
     
  11. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    SonLVL has been updated, with some changes to the object definition API:

    • New method of declaring custom properties in object definitions, removing need for subclassing ObjectEntry.
    • Enum members in XML-based definitions can now use spaces and others in names.
    • XML definitions can now specify a displayname attribute on CustomProperty/BitsProperty.
    • XML definitions can now declare a DefaultImage element with ImageRef subelements instead of specifying image as an ObjDef attribute.
    • XML definitions can now declare ImageRef subelements on Subtype elements instead of specifying an image attribute.
    The first item breaks any C#/VB definitions with custom properties (most of them), and any XML definitions that use the CustomProperty element (one or two).The following INI file sets have been updated already:

    • Sonic 1 SVN/Hg
    • Sonic 2 SVN/Hg
    • Sonic 2 2007
    • Sonic & Knuckles SVN/Hg
    The S1 2005 inis are coming later because first off, I converted a lot of the S1 SVN/Hg definitions to XML, and secondly, I've been working on this for the past three days and need a break.[​IMG]

    Edit: also the XSD document for XML definitions has been updated, if anyone cares.
     
    Last edited by a moderator: Mar 29, 2013
  12. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    Update:

    • XML-based object definitions that do not use the CustomProperty element (all but one or two) are now interpreted directly rather than creating and compiling a code file (saves loading time).
    • The 'Paste' option in the layout editors has been split into two options: Paste Once behaves as before, Paste Repeating repeats the copied data across the currently selected area.
    • A new 'Fill With Selected Chunk' option has been added to the layout editor.
    Also the Sonic 1 2005 and Project 128 INIs have been updated.
     
    Last edited by a moderator: Apr 19, 2013
  13. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    I tried to convert a soned2 project to Sonlvl but when I load it up in Sonlvl and select the stage it gives me error message saying "there is an error in the XML Document".
     
  14. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    Probably because I haven't updated the converter since changing the definition API.

    Do you really need to convert your SonED2 project files? Usually the INIs in SonLVL's updater should work, and even if you've changed stuff, it's not that hard to figure out.
     
    Last edited by a moderator: Apr 20, 2013
  15. InfiniteWave

    InfiniteWave Veteran Of The Arte & Sword Member

    Joined:
    Apr 18, 2013
    Messages:
    77
    Location:
    Visiting the Hakurei Shrine
    The project files are for Hidden Palace and Wood Zone in which someone (i forgot who but from Sonic Retro) restored back into the game and included project files for soned2 but I want to use SonLVL because it's a-lot easier to work with.

    Nevermind, I changed the object list to the one GHZ uses and it loaded. Actually there was something wrong with the files in the common folder.
     
    Last edited by a moderator: Apr 20, 2013
  16. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    SonLVL has some new features:

    The object editor has a toolbar now, with buttons to align objects with the nearest solid part of the level layout, or with each other.
     
  17. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    New feature:

    [​IMG]

    [​IMG]

    Also includes a "Find Next" option, and works for chunks in the FG and BG as well.
     
  18. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    Update:

    All View and Export settings are now saved. The current tab, window mode (normal, maximized, fullscreen) and menu visibility are also saved.

    Added ability to export only collision of blocks and chunks, ability to export solidity maps, and ability to export files with hexadecimal indexes.
     
  19. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    DhillonMP found a bug in SonLVL that caused it to crash when updates are found and you say yes to closing SonLVL and installing them.

    If he happens to read this, and he still encounters an error with the EHZ1 layout file: could you possibly upload it somewhere, and post a link in the comments section of the bug report?
     
  20. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    860
    I have completely overhauled the editors for chunk blocks and block tiles:

    [​IMG]