The SSW_Parser 'program suite' right now consists of two Python programs that reads .ssw/.saw unit data files produced by Solaris Skunk Werks & Solaris Armor Werks. (BattleMechs only for SSW, Industrials are not supported.) - summary.py that takes a list of units and output a summary based on the command-line switches used. - report.py that output a more detailed analysis of one mech. Note that report.py does not handle combat vehicles at this point. summary.py is quite usable, report.py is quite raw and still needs work. == On the subject of errors == These tools does error checking of BV and also that production years and production eras are valid combinations. So, note that illegal combinations in the Prod Year/Era boxes will result in errors. Also note that the year of the base config of an omni-unit gets checked - if this produces errors I would suggest correcting the issue with a text editor, since that is easier than changing it by the relevant program. Also note that there is some disagreement on when the Jihad Era ends, I have gone with 3085 since that was mentioned to be the current plans of the TPTB in the MUL thread. Regarding BV, if you gets an error, the first this to try is to load the unit in SSW/SAW and resave it. This will remove errors caused by errors in old versions. Still there are a couple of BV errors in the latest release of SSW regarding Claws, EW Equipment (used by 4th SW Era Ravens), armored command consoles and M-pods. Other BV issues caused by unclear rules is modular armor (which we disagree on how to interpret) and cases like the Mobile Long Tom (Ammo Carriage) which has ammo on a trailer separate from the weapon (this is an issue I have not discussed with the SSW team). Other errors can be result of equipment that I do not yet support in this tool. I have added gear to the program on a need basis, so once I have created an unit that uses a certain gear it will be added to the program. Naturally gears that have not shown up have not gotten implemented. Finally there are items that have shown up but which causes we problems to implement. The most common one is armored components, which only works in certain cases (only fixed head components, gyros, shoulders and hips). Blue Shield and Klondike experimental stuff and Patchwork armor are also items that I have encountered but not implemented. == Using test data == The test directory contains a collection of a few mech files from Intro Box/3025/3029. Some example uses: summary.py -f Intro_box.txt -- Prints out a summary in MUL style of the Intro Box mechs. summary.py -f 3025.txt -r 18 -- Prints out a summary of damage at range 18 of the TRO 3025 mechs. summary.py -f 3026.txt -s -- Prints out a speed summary of the TRO 3026 combat vehicles. summary.py -f 3025.txt -f 3026.txt -a -- Prints out an armor summary of the TRO 3025 mechs and the TRO 3026 combat vehicles. summary.py -f Intro_box.txt -b -- Prints out a BV summary of the Intro Box mechs, sorted by BV/tons. summary.py -f 3025.txt -f 3026.txt -r 6 -sf 6 -- Prints out a summary of damage at range 6 for TRO 3025 mechs and TRO 3026 vehicles that has at least a walk/cruise/jump speed of 6. == A brief overview of command-line arguments for report.py == <file>: A file name without switches, is expected to be a valid .ssw file. -b: Add detailed battle value calculation to output. -r: Add raw xml data (.ssw file dump) to output. -u: List possible upgrades. == A brief overview of command-line arguments for summary.py == === Input Switches === -f <file>: Reads from the file a list of unit .ssw/.saw files. Lines that begins with '#' are comments. However adding a line containing the following: '#!cd <dir_name>' allows change of working directory, which is useful when wanting to avoid putting the file containing the list and the .ssw/.saw files in the same directory. (note that the change of working directory does not really happen, instead all input filenames are adjusted.) <file>: A file name without switches, is expected to be a valid .ssw or .saw file. === Output Switches === -b: Output that gives a summary of battle values, sorted by BV/ton. -bv: Output that gives a summary of battle values, sorted by BV. -a: Output that gives a summary of armor status, sorted by armor points. (Note that this listing contains an error where explosive ammo on combat vehicles are not noted.) -s: Output that gives a summary of speed, sorted by speed. -l: Output that gives a summary of lrm tubes, sorted by tubes. -cap: Output a list of headcappers mounted on the unit, sorted by number of cappers. -dr: Output a list of how max damage varies over range, sorted by short-range damage. (No heat taken into account.) -r <d>: Output a list of weapons with reach <d> mounted on the unit, sorted by damage at range <d>. (Less strict in filtering out designs than -sn.) -ac: Output a list of autocannons that can use special ammo. -srm: Output a list of srm tubes that can use special ammo, sorted by tubes. -w: Output a list of weapons. -mw: Output a list of main weapons. (Secondaries removed.) -bf: Output Battle Force information. (incomplete) -cost: Output cost information. Note that this listing is very much work in progress and that the cost calculations have not been debugged. (incomplete) -weight: Output weight distribution information. -tl: Output units sorted by year. -elec: Output information about mounted electronics (ECM, probes, TAG, Narc, C3) ==== Output switches are related to mech types ==== These listings are not yet nailed down, and may change (a lot). Note that these terms originate from products that use intro-rules. -sn: Output a list of units that has sniper weapons mounted, sorted by long-range damage. More restrictive than -r 18, since pure missile boats are excluded. Also requires a minimum damage of 10. (should this be lower than 10?) -str: Output a list of strikers, sorted by damage. These are fast 5/8+ units, that can do at least 15 damage at long range. -skir: Output a list of skirmishers. These are units useful for harassing the enemy with long-range fire, and are able to switch positions fast if needed. They mount at least one long-range weapon, have decent speed (5/8), and at least some armor. -brwl: Output a list of 'brawlers'. Yes, there is conflict on what the term 'brawler' really mean. (Needs work.) -jug: Output a list of juggernauts. (Needs work.) -mb: Output a list of missile boats. -scout: Output a list of scouts. Speed at least 6/9 (boring). -typ: Output info on which roles mechs qualify for. (Needs work, Combat Vehicles not supported.) The default output (no switch) is modeled after the MUL. === Filter Switches === These switches are used to limit the number of units displayed. -tag: Only list units that has a TAG, or other gear with the same functionality (C3 Master). -c3s: Only list units that mounts C3 slaves. -c3m: Only list units that mounts C3 masters. -c3i: Only list units that mounts C3i. -narc: Only list units that mounts Narc launchers. -ecm: Only list units that mounts an ECM system. -probe: Only list units that mounts an Active Probe. -taser: Only list units that mounts a Battlemech Taser. -i: Only list Inner Sphere techbase units. -cl: Only list Clan techbase units. -cc: Only list units with a Command Console. -e <d>: Only list units that are available during era <d>. Where <d> can be 2 = SW-E, 3 = SW-L, 4 = Clan, 5 = CW, 6 = Jihad. -y <d>: Only list units that are available at year <d>. That is units that has a introduction year of <d> or earlier. Extinction is not taken into account. -se <d>: Only list units as fast as <d>. -sf <d>: Only list units at least as fast as <d>. -af <d>: Only list units at least <d> points of armor. -lrm <d>: Only list units with at least <d> LRM tubes. Enhanced LRMs and MMLs count, Extended LRMs does not. Basically only tubes that can use standard LRM ammo variantions. -npr: Only list non-primitive units. -wgt <d>: Only list units of weight <d>. -rule <d>: Only list units with rules level <d> or lower. -vtol: Only list VTOLs. -j: Only list units that can jump. -light: Only list light units. -medium: Only list medium units. -heavy: Only list heavy units. -assault: Only list assault units.
ssw-parser/SSW_Parser
Parse and print info contained in Solaris Skunk Werks mech data files.
PythonGPL-2.0