0.3.2 • Published 3 years ago

recursed-xls2lua v0.3.2

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

recursed-xls2lua: Custom level design for Recursed via spreadsheets

This tool lets you design custom levels for the video game Recursed using a simple spreadsheet input format, as an alternative to (and converting to) the custom level Lua format.

The spreadsheet format also enables easy rendering of "screenshots" in SVG format using SVG Tiler. This is how we drew the figures in the 2020 paper Recursed is not Recursive: A Jarring Result by Demaine, Kopinsky, and Lynch (ISAAC 2020).

Examples

1. Very Simple Level

2. Undecidability Reduction Example

Input Format

The input file can be any spreadsheet format supported by the xlsx package, for example, .xlsx exported from Google Sheets.

Each spreadsheet file corresponds to a level, and each sheet within the file corresponds to a room. (The room name is the sheet name.) Each sheet should be 20 columns wide and 15 rows high.

Each cell in a sheet can be one of the following objects. Some objects (box, key, lock, chest, fan, generics) can be prefixed with ! to make them global (glowing green). In addition, multiple objects can be placed at the same location by separating them with commas or semicolons. (But note that the first seven types are tiles, not objects, so you can't have more than one at the same location.)

Full nameAliasesMeaningHeight
solidsimpassable wall1
ledge-top edge is a wall1
waterwwater tile1
acidaacid tile1
buoybufloating block/wall1
glitchglglitch tile/wall1
ledgewetlwglitch tile/wall1
playerpstart location2
boxbmovable block1
keykgrabbable key1
lockl, d, doorlocked door3
chestcroom specified by colon1
yieldygreen glow creating jar1
crystalcr, goalgoal of the level1
diamonddigoal of a paradox1
recordrnarration ring, path specified by colon1
fanfparadox fan1
birdbirestart bird spawn1
genericg, o, oobleckoobleck (copy)1

Alternatively, a room can in its top-left corner a command of the form duplicate:name to make an identical copy of the room with title name (but the duplicate room will have the name of the sheet). In following rows, you can specify a sequence of transformations. The first column specifies the transformation; currently, this must be replace. For replace commands, the second and third column specify a before and after transform (all cells exactly equal to the second column will be replaced with the third column).

Installation

Assuming you have Node and NPM installed, the following command should install a global command recursed-xls2lua:

npm install -g recursed-xls2lua

You can also omit the -g to get a local installation, in which case node_packages/recursed-xls2lua/index.js is the executable.

Usage

The primary usage is recursed-xls2lua filename.xlsx which generates filename.lua.

You can also specify arguments -o dirname to output filename.lua into dirname instead of the directory of the .xlsx file. You can use this to export a level directly to Steam:

## Windows
recursed-xls2lua -o "c:/Program Files (x86)/Steam/steamapps/common/Recursed/custom/missions/" level.xlsx

You can specify multiple such arguments to output to multiple directories. For example, you can add -o . to also output to the current directory.

Expansion

You can also use this tool to just process all duplicate rooms and write out a fully expanded .xlsx file. Specifically, recursed-xls2lua -e filename.xlsx generates filename-expanded.xlsx. Such an expanded spreadsheet can be useful as input to svgtiler as an alternate rendering engine.

0.3.2

3 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago