wkRopeGP 0.0.15
===================

Race against RopeGP world-record and personal-record ghosts inside
Worms Armageddon.

Requirements
------------

- Worms Armageddon 3.8.1
- WormKit module loading enabled
- An internet connection when a ghost is not already cached

Installation
------------

1. Close Worms Armageddon.
2. Copy wkRopeGP.dll and wkRopeGP.ini next to WA.exe.
3. Open wkRopeGP.ini in a text editor.
4. Set PlayerName to your RopeGP BigRR nickname, or to any public TUS nickname
   whose TTRR personal-best ghost you want to follow.
   Example: PlayerName=RopeRacer
5. Start Worms Armageddon normally.

Leaving PlayerName empty makes the module try the active WormNET nickname.
Setting it explicitly is recommended so the selected personal ghost stays the
same even when your in-game nickname changes.

How it works
------------

wkRopeGP identifies the loaded map from its terrain, identifies TTRR or BigRR
from the scheme turn time, and downloads only the matching world record and
your personal record. Ghosts are transferred compressed, decoded in the
background, and verified before they are cached locally. They normally start
on the active worm's first movement. If the first download finishes after that
movement, the ghost joins at the matching race frame; an already loaded ghost
is never replaced automatically during a running match. An explicit !track
command may replace only the blue slot.

On BigRR maps, different worms from the same team can each race the current
ghost segment. When the same worm plays again, the ghost advances to the next
segment. This also supports records made with several retry worms in one team.

During a run, the native turn-timer frame turns green when you are ahead of the
world-record trajectory and red when you are behind it. In TTRR and Trick Race
the timer digits use the same colour; BigRR and Bungee Race keep their native
digit colour. Before the first reliable comparison, the digits keep W:A's
normal colour; after that, a brief ambiguous sample keeps the last reliable red
or green colour.

At the end of a BigRR turn, RopeGP compares your terminal route progress with
the end of both current target segments. While you are behind an endpoint, the
missing distance is expressed in frames of that ghost, so an immediate loss of
control against a complete 40-second segment reports close to 40 seconds
behind. Once you reach or pass the endpoint through continuous ordered route
tracking, RopeGP uses the exact live-versus-reference timing split at the
matched point. Future base segments are unlocked only through that continuous
progress; visual-only tails are never included. A loss of control away from the
route keeps the last reliable result. WR and BLUE are tracked independently,
including across rotations and late !track loading. TTRR deliberately shows no
end-of-turn gap message. Bungee Race and continuous Trick Race retain their
validated clock comparison.

- Ctrl+G: show or hide the world-record ghost
- Ctrl+F: show or hide the personal-record ghost
- !ranks: show the active leaderboard, one chat message per record
- !track 2: replace the blue ghost with rank 2 (rank 1 is already gold)
- !track me: restore your personal-record ghost in blue

Showing a ghost again does not restart it.

Configuration
-------------

The public INI groups player-facing settings by purpose:

[General]
- Enabled: set to 0 to disable the module completely.
- PlayerName: player whose personal record is loaded into the blue slot.

[RaceFeedback]
- EndOfTurnGapEnabled: set to 1 to show RopeGP's local top-of-screen comparison
  with the world-record and blue ghosts at the end of supported race turns;
  set it to 0 to hide these messages. It keeps the familiar black, bordered
  GameText appearance and W:A fonts, but is drawn only into your completed
  local frame. It therefore cannot change an online match or replay. TTRR
  deliberately has no end-of-turn gap message.
- TurnTimerColorEnabled: set to 1 to make the native timer green while you are
  ahead of the world-record trajectory and red while you are behind; set it to
  0 to keep W:A's normal timer colour. In TTRR and Trick Race both the timer
  frame and digits change colour. BigRR and Bungee Race keep their native digit
  colour.

When viewing a .WAgame replay, ghosts, local chat commands and the renderer-only
end-of-turn gap overlay remain available. Native timer colour changes stay
neutral because that separate feature rebuilds W:A's timer cache.

[WorldRecordGhost]
- GoldOpacityPercent sets the world-record ghost's normal opacity from 0 to
  100. Zero is fully transparent and 100 is fully opaque.

[BlueGhost]
- BlueOpacityPercent sets the normal opacity of the personal or !track ghost
  from 0 to 100. Zero is fully transparent and 100 is fully opaque.

[ProximityFade]
- ProximityFadeEnabled: set to 1 to make an overlapping ghost fade so it does
  not hide the live worm; set it to 0 to disable this effect.
- ProximityFadeStartPixels is the live-worm-to-ghost distance where opacity
  starts decreasing. At this distance or farther away, the ghost uses its
  normal GoldOpacityPercent or BlueOpacityPercent.
- ProximityFadeFullPixels is the closer distance where fading reaches its
  maximum. Between StartPixels and FullPixels, opacity decreases gradually.
- ProximityFadeMinimumOpacityPercent sets the opacity reached at
  FullPixels or closer, from 0 to 100. Zero allows a nearby ghost to become
  completely transparent.

The proximity fade can only reduce a ghost's normal opacity. For example, a
ghost with 10% opacity and a 15% proximity minimum remains at 10%; use a lower
minimum (including 0) if you want that ghost to fade further. FullPixels must
be lower than StartPixels.

Close and restart W:A after changing wkRopeGP.ini.

Uninstallation
--------------

Close the game, then remove wkRopeGP.dll and wkRopeGP.ini. The optional
wkRopeGP.cache folder can also be removed if you do not want to keep downloaded
ghosts.
