Skip to content

How do I add Sprites to Custom Units

Dave N edited this page Sep 9, 2024 · 3 revisions

Starting in 0.49.19 we've implemented the ability for players to manage custom sprites in MegaMekLal. We've added an icon selector to MegaMekLab (MML), allowing players to store a custom icon directly within a unit file (either .mtf or .blk) in base64 encoding, similar to the recently added fluff feature. This is designed for custom units, so that they can be passed around or moved while retaining their unique icon and fluff without needing to modify external files like mechset.txt. However, it’s still possible to use the mechset if preferred.

Key Features:

  1. Icon Selection for Custom Units:

    • A new option in MML allows users to select a custom icon from a file or from the cache of existing unit icons.
    • The selected icon will be saved within the unit file itself, ensuring that it moves with the unit wherever it goes.
  2. Automatic vs. Custom Icons:

    • Icons chosen automatically from mechset will display with a white camo (see tooltip).
    • Icons selected by the user, either from file or from the cache, will be shown with a gold camo.
    • Only gold camo icons will be saved into the unit file, meaning that the icon is explicitly set and portable.
  3. Designed for Custom Units:

    • This feature is aimed specifically at custom units, allowing them to be self-contained.
    • Canon units should still rely on the mechset, and this change is not intended to replace mechset handling for those units.
  4. Icon Storage in Base64:

    • Icons are stored in base64 encoding, much like the fluff images.
    • The system checks for a custom icon in the unit file first before falling back to the mechset.

Icon Integration:

  • To fully support this feature, icons must be present in MML.

Current Limitations:

  • Big Icons (e.g., landed DropShips) and state-specific icons for LAMs and QuadVees are not yet supported but are planned for future updates.

This feature, starting in version 0.49.19, streamlines the customization of units in MegaMekLab, making it easier to manage and share unique units without needing to worry about external files like mechset.txt.

Clone this wiki locally