SonPLN

Discussion in 'Utilities' started by MainMemory, Oct 7, 2019.

  1. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    SonPLN is a new plane mappings editor, based on SonLVL. For those who don't know, plane mappings are used to store an arrangement of tiles to be displayed on one of the Megadrive's two scroll planes. Usually these are things that don't move much, like the title screen emblem, or the level select text.

    [​IMG]

    Features:
    • INI-based project file stores data for multiple sets of mappings in a single file, making switching between sets in the editor easy.
    • Based on SonLVL's foreground layout editor, includes ability to select and modify sections of the mappings all at once. Includes zoom and grid features.
    • Includes tile editor, palette editor, and import/export features from SonLVL.
    • Ability to resize the current mappings set (note: you will need to edit the ASM code to make the game load it correctly).
    Text Editing

    [​IMG]

    SonPLN features advanced text editing capabilities. Simply select an area you wish to edit by dragging with the right mouse button held, then right click inside the selection and choose "Edit Text". All the text in the selected area will be converted to strings, which you can then edit in the dialog shown above. All non-text tiles in the area will be blanked out, so be careful (it will warn you before doing so). SonPLN is capable of mapping more than just letters and numbers, as seen above, symbols are also available (only characters in the Unicode BMP (0000-FFFF)).
    To enable text editing, your mappings definition in the project file must declare a text mapping, which can be defined as a simple string in the textmap field for single-tile letters, or a path to a separate ini file in the textmapfile field for multi-tile letters.
    The simple format begins with a single character (A) or a pair of characters separated by a hyphen (A-Z) to indicate a range of characters, followed by an optional colon and a tile index in hex or decimal, and a pipe character to mark the end of one definition and the beginning of another. If the colon and index are omitted, the character will be assigned the index immediately following the previous character/range of characters.
    The complex format begins with specifications for the Height of all characters in the font and a DefaultWidth to be used if the characters don't override it. Then you begin defining the characters, starting with the character itself in brackets [A], followed by an optional Width, and definitions for all the tiles to be used in each row.
    Code:
    Height=2
    DefaultWidth=2
    [A]
    Row1=1, 2
    Row2=3, 4
    [I]
    Width=1
    Row1=0xE
    Row2=0xF
    [.]
    Width=1
    Row1=0 ; all characters must be same height, so we put a blank tile here
    Row2=0x20
    Download
    You can download SonPLN from the SonLVL Updater, or on this page.
    Also, a project file for the Sonic 2 GitHub disassembly can be found... on the Sonic 2 disassembly GitHub!
     
  2. Devon

    Devon I'm a loser, baby, so why don't you kill me? Member

    Joined:
    Aug 26, 2013
    Messages:
    1,376
    Location:
    your mom
    For a future update, do you think you could implement editing plane data that uses both plane maps at once? I have a few of those, and only being able to modify data for one plane at a time and not know really know if it's being edited right until the ROM is built is a bit of a hassle.
     
    AURORA☆FIELDS and FireRat like this.
  3. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I'm not sure how to do that?
     
    Jdpense likes this.
  4. Devon

    Devon I'm a loser, baby, so why don't you kill me? Member

    Joined:
    Aug 26, 2013
    Messages:
    1,376
    Location:
    your mom
    Perhaps, in the INI file, define a general canvas size, then define the data, position in that canvas, etc. for each plane? The editor could also have a separate plane A and B tab, along with a preview tab that shows what they look like together.
     
    Last edited: Oct 13, 2019
    AURORA☆FIELDS likes this.
  5. Samey

    Samey Le Bored Hedgie Member

    Joined:
    May 3, 2017
    Messages:
    57
    I saw this and was really excited decided to upgrade from the old PlaneED editor
    And wow.
    This is amazing.

    Also I went and made a ini project file for Sonic 1 Hivebrain 2005 disassembly. I placed it at the root of my disassembly.



    Edit: Oh it looks like I forgot the special stage backgrounds... hmm lemme work on that.
    Edit 2: Ok the attached file is updated to include the special stage backgrounds.
     

    Attached Files:

    Last edited: Oct 23, 2019
  6. Ronald Rose

    Ronald Rose Newcomer In Limbo

    Joined:
    Feb 7, 2016
    Messages:
    10
    I downloaded it but Chrome prevents me from downloading.
     
  7. Samey

    Samey Le Bored Hedgie Member

    Joined:
    May 3, 2017
    Messages:
    57
    Try using Firefox instead :)
     
  8. giovanni.gen

    giovanni.gen It's still Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    313
    Location:
    Italy
    Suppose that I were to edit a plane with uncompressed mappings. How should I edit my .INI file to inform the software that I am editing a plane with uncompressed mappings?