C-POD26 v1.0.2
==============

A POD archive tool for Monster Truck Madness 2.

Successor to C-POD 1.00.0057 and C-PODINI by CH_2005 (2002), whose icon this
build still uses. Both were Visual Basic 6 and no source survives, so their
file formats and behaviour were reverse engineered from the binaries and
checked against their own output. The two are merged here into one program:
the Archive tab is C-POD, the Install Analysis tab is C-PODINI.


INSTALLING
----------

There is nothing to install. C-POD26.exe is self-contained — it carries its
own .NET runtime, so it does not need .NET, the VB6 runtime, or the
COMDLG32.OCX / MSCOMCTL.OCX registration the original wanted.

Put it wherever you like and run it. Windows SmartScreen may warn about an
unrecognised publisher on first launch, because the file is not code-signed:
"More info" then "Run anyway".

First thing worth doing: Game -> Locate MTM2 Folder. That is how model
textures resolve across pods the way the game does, it is what the Install
Analysis tab reads, and it also picks up METALCR2.ACT and PodZipFiles.txt
from your install, which the tool uses for palette matching and stock-file
detection. Everything else works without it.

Settings live in %APPDATA%\CPod\settings.json. If the original C-POD is on
this machine, its configured paths are read from the registry on first run.


WHAT IT DOES
------------

Archives      open, create, add, delete, rename, extract, edit the comment,
              build from a .LST or a .TRK, write a .LST on extract
Images        BMP, PNG, TGA and MTM2's RAW+ACT, in both directions, one file
              or in bulk (Tools -> Batch Convert)
Models        .BIN viewer, textured / flat / wireframe, vertex overlay, the
              texture list with offsets, and renaming a texture inside a model
Tracks        .SIT and .TRK decoded, race-type conversion, small-tires [ST]
              conversion, logo and map preview, the course plotted with its
              checkpoints, segment/checkpoint counts, enable/disable
Load order    POD.INI editing, and PodZip stock-file reduction
Analysis      the Install Analysis tab scans every pod in your load order
Ordering      move entries up and down inside a pod (Alt+Up / Alt+Down)


KEYBOARD
--------

Help -> Keyboard Shortcuts (F1) lists them all, read from the menus, so it is
never out of date. The ones worth knowing up front:

  Ctrl+O / Ctrl+S      open, save
  Insert / Delete      add files, delete the selection
  F2                   rename
  Ctrl+E               extract the selection
  Ctrl+F               jump to the filter box
  F11                  enlarge the preview
  Alt+Up / Alt+Down    move the selected entries within the pod

With a .BIN selected, the viewer takes T for textured, F for flat, W for
wireframe and V for the vertex overlay, and you rotate it by dragging.

Some .BIN files are animation controls: they hold no geometry themselves, only
the names of the models that are their frames. MODELS\REX.BIN is 348 bytes and
names rex1..rex4.bin, each a full T-rex mesh in a different pose. The viewer
draws frame 1 and says so across the top; press A, or click the PLAY button
under that line, to step through the frames at the rate the file asks for. It
never starts on its own. Frames are looked for in the open pod first and then
across your load order, so a control can name models that live elsewhere.

Moving entries changes the pod's own order, which is the order the game
reads. Two consequences: if you have sorted the list by a column that sort is
cleared first, because the pod's order is what you are editing and it has to
be what you can see; and if a filter is active, an entry moves past hidden
neighbours to the nearest visible one, so a move never looks like it did
nothing. Nothing is written until you save, and saving a reorder patches only
the directory, so it is quick whatever the archive weighs.


THE INSTALL ANALYSIS
--------------------

The second tab is what C-PODINI's Analyze did, and it answers "what is
actually in my install?" — pod count, files, megabytes, how many tracks and
trucks you have and how many are enabled, and how much of it is stock
content PodZip could strip.

The useful part is Overrides. MTM2 resolves a filename through the mounted
pods in load order and takes the first one it finds, so the same name in two
pods means the later copy is never read. That is invisible from inside any
single pod. On a large install it adds up: a 139-pod setup here has 23,609
shadowed files across 9,430 names, with DATA\ZERO.RAW provided by 103
different pods.

A disabled pod is not mounted, so it neither wins nor is shadowed.

Double-click any pod in the results to open it in the Archive tab.

It needs Game -> Locate MTM2 Folder set. PodZipFiles.txt is optional and
only affects the stock-content figure. The scan takes well under a second.


THINGS TO KNOW
--------------

Nothing is written to a pod until you save it. Every edit is held in memory
until File -> Save or Save As. The original applied some operations straight
to the archive and deferred others with nothing to tell them apart, which is
how tracks got converted without being asked.

Saving keeps the previous version as name.pod.bak by default. Turn it off in
Preferences if you would rather not. It is free when the archive is rebuilt
and costs one file copy when a save is small enough to patch in place.

POD1 offsets are signed 32-bit, so an archive cannot exceed 2 GB. The status
bar shows how close you are, and a save that would exceed it is refused
rather than producing a pod with wrapped offsets.

Derived maps are found by name, not by reference. Beside ART\<stem>.PNG the
engine also looks for <stem>_N.PNG (normal map), _AO (ambient occlusion), _DTL
(terrain detail normal) and _MASK (terrain detail mask), and pairs them up
itself. You add one by naming it correctly and putting it in the pod; nothing
records the link and nothing needs to.

That list is where the 18-character stem cap comes from, and the arithmetic
lands exactly: ART\ + 18 + _MASK + .PNG is 31 characters, which is the whole
pod entry. So any stem the tool accepts can carry every map, and you never
have to budget for them yourself — but a longer stem would push its _MASK
sibling out of the pod, and that failure is silent. The file simply stops
resolving and the effect quietly does not appear.

Two of the original's features are not here because they do not work in the
original either: Remove Checkpoints never appears in its menu, and Convert
Back to Big Tires crashes it. The tire conversion does have a working reverse
here, and it restores the pod exactly.


WHAT CHANGED IN 1.0.2
---------------------

Most of this came out of a day of testing against real pods, so nearly every
item below is something that was breaking on content people actually ship.

Building
  Open a .TRK and C-POD builds the podzipped truck pod from it, deriving the
  wheels, level-of-detail bodies and every texture the way the engine does.
  Files it cannot find are sorted into "stock, already in your load order" and
  "found nowhere, probably a typo", and anything in the folder the truck does
  not name is counted so you know what is being left out.

  Open a loose .RAW, .BMP, .PNG, .TGA or .ACT and it is shown rather than
  reported as a damaged archive. A .RAW is drawn against its .ACT when one
  sits beside it.

Models
  Models were drawn mirrored — MTM2 model space is left-handed and both
  renderers treated it as right-handed. Anything with lettering read the
  wrong way round.
  Animated textures now draw their first frame instead of bare grey.
  Animation controls (a .BIN holding only its frames' names) draw frame 1,
  say so in the viewport, and will play through the frames on request.
  Right-clicking one lists its frames and where each resolves from.
  Models using MRGL_ORDER, MRGL_JUMP or MRGL_MATERIAL2 now open at all.

Archives
  Entries can be moved up and down within a pod (Alt+Up / Alt+Down); saving a
  reorder patches the directory rather than rewriting the archive.
  Accented characters in entry paths and comments survive a save — they were
  being rewritten as '?', which silently renamed 191 files across the pods
  installed here.
  A pod that will not open now says WHY: another format, compressed data, or
  genuinely corrupted, with an estimate of how much survives.
  Track previews that are a few bytes shorter than their header claims are
  drawn instead of refused, with a note saying the file was written that way.

Elsewhere
  Help -> Keyboard Shortcuts (F1), read from the menus so it cannot go stale.
  C-POD no longer locks a pod against itself, which made saving an installed
  pod fail as "used by another process".


WHAT CHANGED IN 1.0.1
---------------------

Six of these were breaking on real content, not polish.

Models using the August 2026 record types (MRGL_MATERIAL, MRGL_MATFACET,
MRGL_TEXTURE64, MRGL_KEYFRAME64) now parse. An unknown record made the
walker advance by the wrong amount, so the rest of the model was read out
of the middle of the previous one — models simply stopped part-way.

.SI2 tracks are recognised everywhere a .SIT is. A track hidden from
pre-HD engines was previously treated as an unknown file: no track row, no
course map, no conversions. Disabling one now uses .SIY, so re-enabling it
cannot silently turn it back into a plain .SIT.

Textures resolve by stem, probing .PNG then .TGA then .RAW as the engine
does. A model recording FOO.RAW finds FOO.PNG when that is what the pod
ships, instead of reporting the art as missing.

Truck names read from MTM2.1, MTM3 and bare "truckName" files, not just
MTM2 ones. About a tenth of the trucks in a large install were listing as
"(unnamed)".

A track's DATA\*.TXV version record is checked against the pod around it,
since editing art can make it lie. Right-click a track -> Check Version
Record. It reports; it only changes the record when you ask, and it never
renames the situation file, because that decides which engines can see the
track.

Two tracks whose stems share their first 7 characters are highlighted:
they derive the same UI\ logo and map bitmaps. The derivation is fixed, so
this is a warning — the first 7 characters have to differ.

Also: over-long names and comments are refused by name rather than quietly
trimmed; HD-only art is never reported as damaged; and the Recent menu
shows its arrow on first open.

CREDITS
-------

CH_2005 — the original C-POD and C-PODINI, and the icon.
SLO_Fila — this build.
