[How To] Edit .bclyt Layout file

Discussion in '3DS - Tutorials' started by RosaliinaDaHacker64, May 12, 2017.

  1. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 don't click on me pls, it hurts :c

    Member
    506
    214
    Oct 7, 2015
    Ireland
    F:\luma\payloads
    Hello. I'm going to show you how to edit a layout file that you can move around the display.
    This isn't going to be kinda clear to follow, I'll improve it. Pablo has a better example for structures.

    Requirements:
    Luma3DS 7.0+
    Floating point converter
    HxD
    EveryFileExplorer


    Let's start!

    For example, on Super Mario 3D Land, you want to move a Timer display to the bottom.
    [​IMG]

    1. First, locate under RomFS > LayoutData

    2. Open EFE, drag .szs (CounterTimeLimit) into the program.

    3. Go into blyt directory, you should find .bclyt, Right-Click on it and Export.
    [​IMG]

    4. Open up a Hex editor, drag a .bclyt into the program.

    5. Find some hex values with strange text-strings that are not "..€?..€?"
    [​IMG]

    You found it! Most are located on 0x140 for this game, some are different even other games, so keep searching.

    Each 4 bytes have X and Y positions

    [​IMG]
    But, each byte values are reversed, for example in this picture, X is 43 3E 00 00, and Y is 42 E8 00 00.

    You must know about coordinates for screens.
    (Image by Zyneros)
    [​IMG]

    6. Go to Float point converter site.

    7. Type reversed bytes (which is 0x42e80000) in Hexadecimal Representation section.
    You'll get a result on Decimal Representation section, this is a good sign because it shows ".0" on the end, if it isn't, you'll get 5.34235523 because you pick wrong bytes. My result is 116.0, this is on +Y coordinate.
    Now we want to move to the bottom. It's gonna be -86 (on -Y).

    8. So type it on Decimal Representation, the result on Hexadecimal Representation will be shown, which is 0xc2ac0000, but you must flip bytes again, for example: 00 00 AC C2.

    9. Now go back to Hex editor, paste-write over original hex values.

    10. Save.

    Feel free to drag modified .bclyt into EFE to preview to check if it's good to go. This is normal if corresponding textures or BCLIM images are missing since the file is moved to somewhere else, outside its RomFS.

    11. Go back to EFE, right click on .bclyt and Replace. Save.
    [​IMG]

    12. Put the file into SD:/luma/titles/0004000000053F00/romfs/LayoutData

    13. Play the game. Enjoy! :D

    Here's my video on how it goes.
     
    Last edited by RosaliinaDaHacker64, May 13, 2017
  2. skullkeeper94

    skullkeeper94 Professional USB Corrupter

    Member
    234
    38
    Jun 21, 2016
    United States
    It's... Beautiful^_^
     
    RosaliinaDaHacker64 likes this.
  3. PabloMK7

    PabloMK7 Red Yoshi! ^ω^

    Member
    1,656
    932
    Feb 21, 2014
    World -1
    You can do better :P
    pan1 offset + 0xC: pane name

    pan1 offset + 0x24: X position
    pan1 offset + 0x28: Y position
    pan1 offset + 0x2C: Z position

    pan1 offset + 0x30: X rotation (radians)
    pan1 offset + 0x34: Y rotation (radians)
    pan1 offset + 0x38: Z rotation (radians)

    pan1 offset + 0x3C: X size
    pan1 offset + 0x40: Y size
    pan1 offset + 0x44: Z size (not sure if a Z size exists tho)

    For example, in the first image there is a "pan1" string at 0x11C with the name at 0x11C + 0xC = 0x128 "CounterTimeLimit" has the size X at 0x11C + 0x3C = 0x158 with a value of 1.
     
  4. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 don't click on me pls, it hurts :c

    Member
    506
    214
    Oct 7, 2015
    Ireland
    F:\luma\payloads
    Wow, you're smart. I never knew there's Z position lol :)
     
    PabloMK7 likes this.
  5. HuseyinDerMachtige

    HuseyinDerMachtige Newbie

    Newcomer
    4
    2
    May 12, 2017
    Gambia, The
    I can't Import the new .bclyt, only exporting the original.
     
  6. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 don't click on me pls, it hurts :c

    Member
    506
    214
    Oct 7, 2015
    Ireland
    F:\luma\payloads
    Are you sure you selected "Replace" option then hit save?
     
  7. HuseyinDerMachtige

    HuseyinDerMachtige Newbie

    Newcomer
    4
    2
    May 12, 2017
    Gambia, The
    [​IMG]
     
    Last edited by HuseyinDerMachtige, May 12, 2017
  8. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 don't click on me pls, it hurts :c

    Member
    506
    214
    Oct 7, 2015
    Ireland
    F:\luma\payloads
    That's weird. I assume you're trying to modify .arc file, while .szs's bclyt is importable fine. What game is that?
     
  9. Explos

    Explos Advanced Member

    Newcomer
    55
    33
    Jun 19, 2016
    That's nsmb2, and you should use darc tool to extract and re-pack the layout files from the .arc(darc) files.
     
    Last edited by Explos, May 12, 2017
    PabloMK7 likes this.
  10. HelpTheWretched

    HelpTheWretched Advanced Member

    Newcomer
    50
    22
    Feb 4, 2010
    Canada
    Thanks for the info on floating-point values and screen coordinates! I'm trying to edit Tri Force Heroes layouts but it uses a hybrid of BCLYT and BFLYT (Wii U).
     
  11. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 don't click on me pls, it hurts :c

    Member
    506
    214
    Oct 7, 2015
    Ireland
    F:\luma\payloads
    No problem. :)

    I don't think this layout file is Wii U's, it's still 3DS, I assume it is fnl1 format. Mario & Luigi Paper Jam Bros. has .bffnt font (FINF), it's still 3DS font, most games use .bcfnt normally. I was confused that it's a Wii U font, so I tried porting 3DS' bffnt to Mario Kart 8 but it didn't work -- texts were blank.
     
    Last edited by RosaliinaDaHacker64, Jun 9, 2017
  12. HelpTheWretched

    HelpTheWretched Advanced Member

    Newcomer
    50
    22
    Feb 4, 2010
    Canada
    Interesting... seems like the same situation with Tri Force Heroes. It uses BFLYT/BFLAN but the structure seems to be 3DS; values are little-endian. No programs seem to know what to do with them. XD
    For now I'm just using your guide to see what I can figure out.
     
    RosaliinaDaHacker64 likes this.
  13. RosaliinaDaHacker64
    OP

    RosaliinaDaHacker64 don't click on me pls, it hurts :c

    Member
    506
    214
    Oct 7, 2015
    Ireland
    F:\luma\payloads
    That's kinda weird the way it is lol, didn't know that 3DS has different letter than codename C (CTR, BCSTM for example) on file extension, while Wii U's codename is only F (Cafe) and no different letter comes after B (Binary) so far, same with Wii's codename R (Revolution).
     
    Last edited by RosaliinaDaHacker64, Jun 10, 2017