refmap

command
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

refmap converts rectangles a human dragged on a live frame into the reference coordinates the bot's asset files are written in.

The wall-flow assets are consumed through game.Calibration's HUD law (HudRect): a stored value is an 860x732 reference coordinate that the bot re-maps onto whatever device it is running on. The picking tools capture PHYSICAL pixels, so something has to invert the law — and inverting it is not a division. tools/select_wall_upgrade_buttons.py used to write its drags straight into assets/wall_upgrade_buttons.json, which the loader then read as reference values and re-mapped: the recorded boxes moved on every run, and the live 1280x720 session proved it (the boxes landed on builder-menu rows, and the gate in internal/bot/wall_upgrade.go now refuses to tap when they do).

Usage, for every rect a picking session captured (one per line, physical pixels; the key may be omitted for a single-rect schema):

refmap -w 1280 -h 720 -k 1.325 -schema buttons <<'EOF'
gold   591 503 692 601
elixir 717 503 816 601
EOF

Output is the asset file's exact contents, so a picker writes stdout to disk unchanged. Diagnostics — how far the recorded box sits from the drag, and whether the drag fell in a band seam the reference frame cannot express — go to stderr, because a JSON asset must not carry a comment.

-schema wall accepts a whole session at once and, with -write, saves each key to the asset file that consumes it — stdout printing would have to interleave several JSON documents, so a multi-file set demands -write.

Run with -describe to list the schemas.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL