An CLI archiver script for wplace.live. Preserve 🧡
Currently archived: see wplace-archives.
This is Command Line Utility, meaning it will only run through console/terminal. Just running the EXE file will not work.
Grab a binary from releases. Binaries are available for linux-x64 and windows-x64 (untested).
To run:
./wplace_archiver [args] <mode> [mode args]
where:
[args]
are optional general arguments.<mode>
is a archival mode. Currently, onlyregion
mode is available.[mode args]
are mode-specific arguments. Some arguments could be required, some are optional.
See Modes for the list of available modes.
The script operates on tiles. A tile is a 1000x1000px image that holds pixels of a part of a map. Entire map is 2048x2048 tiles. To get your current tile position:
- Open Developer tools.
- Go to Network tab.
- Press "All" or "XHR" tab.
- Move around.
- Click on any .png file that appears in the list.
- Click on "Headers" tab for that request.
- You will see a URL (or part of it) that looks something like
/files/s0/tiles/1792/708.png
.1792/708
is a tile position of nearby tile;1792
is X and708
is Y.
For help (to see available commands), run:
./wplace_archiver help
To see commands for a specific mode, run:
./wplace_archiver help [mode]
A grabby mode that allows to archive leaderboards. Currently only supports Regions category and all-time period.
- The mode is toggled one when in grabby mode, by passing
--leaderboard
. - Leaderboard category is toggled by
--by-<category>
. Currently only--by-region
is available. - Currently, only available period is
--all-time
.
Example (regions, all time): ./wplace_archiver grabby --leaderboard --by-region --all-time
.
Output path is also modified. See help on --out2
and --out3
for more.
To get help on this mode (see available commands), run:
./wplace_archiver help grabby
Code: grabby
Grabs tiles around starting tile until there are no more tiles to grab within a radius. The grab radius is also configurable, as well as minimum amount of pixels in a tile. Best mode for archiving places, since it works on any configuration of tiles and doesn't get onto empty tiles much.
./wplace_archiver grabby tile_x,tile_y [--radius <value>] [--pixel-threshold <amount>] [--tile-tolerance <radius>]
For example, to archive the entirety of Moscow, run: npm start -- grabby 1238,639
.
To get help on this mode (see available commands), run:
./wplace_archiver help grabby
Note: if you getting Too Many Requests error, it is expected. The script "bruteforces" through these errors and it works anyway (to a degree) due to poor rate limiting implementation on Wplace.
Note2: if you want to go paint while archival in progress, press Ctrl+C to pause the archival and free bandwidth to the server. This should help tiles load. Pressing Enter will resume the process. Currently works only for this mode, and not in between runs.
Code: region
Allows to save a rectangular region of the map.
- To save a region with upper left corner at
tile_x
andtile_y
and widthwidth_tiles
and heightheight_tiles
, run:
./wplace_archiver region tile_x,tile_y --size width_tiles,height_tiles [--center]
Example: ./wplace_archiver region 570,710 --size 50,50
- To save a region with upper left corner at
tile_x1
andtile_y1
and lower right corner attile_x2
andtile_y2
, run:
./wplace_archiver region tile_x1,tile_y1 --to tile_x2,tile_y2
Example: ./wplace_archiver region 570,710 --to 600,750
- To save a region centered at
tile_x1
andtile_y1
with radiusradius_tiles
, run:
./wplace_archiver region tile_x,tile_y --radius radius_tiles
Example: ./wplace_archiver region 594,733 --radius 8
To get help on this mode (see available commands), run:
./wplace_archiver help region
To make the initial position a center of a region instead of the upper left corner, pass --center
.
./wplace_archiver region tile_x,tile_y --size width_tiles,height_tiles --center
Example: ./wplace_archiver region 594,733 --size 20,40 --center
Allows to run the archival continuously. Once once archival "cycle" is done, next starts, saving tiles to a new folder.
Can be enabled by passing --loop
.
Example: npm start -- grabby 1792,708 --loop
.
The server has pretty low limits on amount of requests per second, so some tweaking might be required. At the moment of writing this, the defaults are pretty good and fine-tuned for good RPS, even going past the limit and rate limit errors (to some degree).
- To change the requests per second limit, use
--rps
option. - To change the amount of simultaneous requests, use
--rc
option. - To respect the delay that server requests on Too Many Requests error, set
--respect-429-delay
option.
Requires Node and Bun installed.
Install dependencies:
npm i
Bun is used as a "compiler" for CLI binaries.
Build for all configured platforms with:
npm run build
Build for current platform:
npm run build:current