Skip to content

Releases: juk0de/mtf2json

v0.2.7

09 Jan 15:45
900aae4

Choose a tag to compare

  • Unified tech_base strings for all components (and mechs). Available strings are:
    • IS
    • Clan
    • All
    • Mixed
    • Unknown
  • Renamed the mech techbase to tech_base
    • this makes it consistent with other components
  • The following components now have a tech base entry:
    • Engine
    • Armor
    • Structure
    • Mech
  • Added new engine section to the JSON structure. Example:
"engine": {    
    "name": "380 XL Engine",
    "type": "XL",
    "tech_base": "IS" 
}, 

Known issues:

  • Some MTF files contain components with two different tech bases
    • e.g. the Turkina U has the following engine: engine:285 XL (Clan) Engine(IS)
    • in this case, mtf2json will either choose the tech base that corresponds to the mech tech base, or the first one (if the mech has Mixed tech base)
  • Some MTF files contain conflicting tech bases
    • e.g. the Turkina U has tech base Clan but an IS structure (according to the MTF file)
    • no workaround has been implemented for this (yet)
  • Both issues are very likely MegaMek bugs

v0.2.6

29 Nov 19:11
6c4eb1f

Choose a tag to compare

v0.2.5

19 Nov 08:29
5df5fcf

Choose a tag to compare

  • Format change: renamed weapon to name in weapon entries
  • New JSON section: equipment
  • Items with a :SIZE: value are now correctly supported and stored in the new equipment section.
    • E. g. Liquid Storage (OMNIPOD):SIZE:1.0 (ARMORED) will be stored as:
    "equipment": [
      {
        "name": "Cargo (Liquid)",
        "location": "left_torso",
        "type": "transport bay",
        "tags": [
          "armored",
          "omnipod"
        ],
        "size": "1t"
      },
    ]
    
  • More items will be stored in the equipment section in future releases

v0.2.4

30 Sep 15:59
122529a

Choose a tag to compare

  • New handled keys:
    • base_chassis_heat_sinks
    • ejection
    • notes
  • The following keys are now explicitly ignored:
    • fluffimage
    • imagefile
    • nocrit
  • Added new option --statistics
  • Refactoring and test improvements

v0.2.3

27 Sep 09:42
668d015

Choose a tag to compare

  • The weapons section is now a list of dictionaries
    • this breaks compatibility with the old format
  • Weapon quirks are now stored in the weapon_quirks section
    • before that, only the last weaponquirk key was stored (verbatim) in case there were multiple of them
  • The mtf2json version is now stored as the first key in every JSON file

v0.2.2

26 Sep 19:37
6ef5089

Choose a tag to compare

  • Empty values are now allowed (fixes errors for MTF files with e. g. empty model entry)
  • Added clanname to the list of known keys
  • Test improvements

v0.2.1

25 Sep 17:27

Choose a tag to compare

Fixed license in the PyPi package.

v0.2.0

25 Sep 16:42
44406c5

Choose a tag to compare

  • If a critical slot line contains :size: or :SIZE:, the value is set to the preceding string (the size part is discarded)
  • Updated latest supported commit to dfeb43e28132c2723ac8e3147e41b00960b989fd
  • <P> and </P> are now also removed from fluff entries
  • Added --verbose flag
  • Added new testcases
    • ShadowHawk SHD-5S
    • Hermes_II_HER-4K_Hermes_III
  • Code refactoring
    • parsing is now done by a generator function
    • only known keys are parsed, others are ignored
    • lines without keys are ignored, unless it's a known special case
    • replaced the mtf2json.pyi stub file with py.typed
    • switched from flake8 to ruff (for linting and formatting)
      • reformatted all existing code

v0.1.9

20 Sep 09:29
98fcde9

Choose a tag to compare

Fluff lines without keys are now ignored (fixes #14).

v0.1.8

19 Sep 06:49
cf9919b

Choose a tag to compare

Fixed regular expression that detects weapon lines (fixes #12).