7
1
Fork
You've already forked map-scripts
0
No description
  • Lua 99.3%
  • Python 0.7%
2026年03月04日 23:28:47 +01:00
condemned-pve update condemned-pve/humanpve9.lua 2025年09月18日 07:48:39 +02:00
fast-round add shaving, fast-round/human-shaving.lua 2026年03月04日 23:28:47 +01:00
fatal-error add fatal-error/alienpve1.lua 2025年06月01日 13:09:26 +02:00
medusactm add medusactm/humanpve1.lua 2025年11月07日 12:23:11 +01:00
niveus add niveus/humanpve2.lua 2025年11月06日 11:22:03 +01:00
perseus add perseus/alienpve1.lua 2025年05月08日 20:53:14 +02:00
procyon add procyon/alienpve1.lua 2025年06月29日 15:08:46 +02:00
sector50 add sector50/alienpve1.lua 2025年10月03日 13:47:45 +02:00
td update survival.lua and td/human-survival.lua 2025年10月10日 10:56:45 +02:00
uvcs update uvcs/alienpve1.lua 2025年11月06日 11:22:03 +01:00
wrecktify add wrecktify/alienpve1.lua 2025年06月21日 07:53:54 +02:00
yocto-pve add yocto-pve/humanpve1.lua 2025年12月20日 23:37:18 +01:00
bindsHuman.cfg Add human loadout prototypes 2026年01月29日 14:25:49 +03:00
bot-commander.lua add bot-commander.lua 2026年01月07日 00:48:59 +01:00
buildings.lua buildings.lua: per-building orientations 2026年02月21日 22:52:38 +01:00
client-print.lua add client-print.lua 2025年10月11日 16:36:26 +02:00
condemned-pve.lua condemned-pve.lua: fix error, there is no func_destructable_1, 2, 3 2025年04月06日 10:46:53 +02:00
coroutine-example.lua add coroutine-example.lua 2025年10月23日 11:32:33 +02:00
door.lua rename doors.lua -> door.lua, update it, add mover.lua 2026年02月28日 08:39:31 +01:00
dretchtower.lua update dretchtower.lua 2026年02月28日 08:21:44 +01:00
duplicates.py add duplicates.py 2025年04月27日 21:43:22 +02:00
entity-info.lua update entity-info.lua 2026年02月28日 07:32:09 +01:00
entity-ref.lua add entity-ref.lua 2026年01月22日 14:30:50 +01:00
gol.lua add gol.lua 2025年10月24日 16:41:35 +02:00
highscores-html.lua update highscores-html.lua 2026年02月19日 20:50:40 +01:00
hLoadout.lua Add human loadout prototypes 2026年01月29日 14:25:49 +03:00
mover-lock.lua add mover-lock.lua 2025年10月22日 20:27:43 +02:00
mover.lua rename doors.lua -> door.lua, update it, add mover.lua 2026年02月28日 08:39:31 +01:00
orion.lua add orion.lua 2025年07月18日 16:43:43 +02:00
pretty-print.lua pretty-print.lua: sort number and string keys 2025年10月10日 10:56:26 +02:00
ProcessLua.py Lua CFG generator: don't change '' strings 2025年04月24日 13:07:28 +03:00
ptcs8.lua add ptcs8.lua 2025年05月14日 23:49:56 +02:00
README.md Remove extraneous whitespaces in lua CFG generator 2025年04月23日 20:36:17 +03:00
rush-station.lua add rush-station.lua 2025年05月31日 07:49:40 +02:00
shaving.lua add shaving, fast-round/human-shaving.lua 2026年03月04日 23:28:47 +01:00
shitpost.lua add shitpost.lua 2025年10月25日 01:01:09 +02:00
string-buffer.lua update highscores-html.lua, add string-buffer.lua 2025年12月20日 23:37:14 +01:00
survival.lua update survival.lua and td/human-survival.lua 2025年10月10日 10:56:45 +02:00
timed-pve.lua add timed-pve.lua 2025年10月11日 16:36:17 +02:00
trace-example.lua add trace-example.lua 2026年01月04日 10:56:30 +01:00
zeta-facility.lua update zeta-facility.lua 2025年07月24日 14:17:12 +02:00

Unvanquished Map Scripts

Files to be loaded for all layouts should be placed in the root of this repo, with a subfolder created for that map if you need layout specific scripts.

For example:

condemned-pve.lua
condemned-pve/humanpve1.lua

Local Lua Scripting

To execute lua code locally (e. g. from the client console), one has to use the /luarocket "[code]" command. Unlike server-side lua it is currently unable to access files directly, so instead you need to use ProcessLua.py to generate cvars from lua code.

ProcessLua.py Usage

Input: luaCfgs.cfg

Input format:

Entry: `[name] [path]`
 [name]: This will be usable for script execution after running the script. Must not contain spaces or characters not allowed in cvar names.
 [path]: Path to the lua file. Must not contain spaces.
The input file may contain multiple entries, in this case each entry must be on a new line.
`//` is treated as a comment, and everything from that point and to the end of the line will be ignored

Output: luaCfgsProcessed.cfg, luaProcessed/*.cfg files corresponding to input entries

Output format:

Entry: `exec -q [path]`
 [path]: The path to the processed cfg file containing the code from a single lua file.
 Each entry corresponds to an entry in the input file.
[empty line]
Last line: `echo Loaded lua cfgs: [name] | ... | [name]`
Processed files:
 Processed files are created with paths in the form of `luaProcessed/[filename].cfg`.
 [filename]: The filename, including extension, of the input entry.
 Each processed file contains a single line: `set [name] "luarocket \"[code]\""'
 [name]: Same as the name of the corresponding input entry.
 [code]: The entirety of the lua file.
 
 Newlines, single-line comments (`--`), and block comments (`--[[]]`) are removed.
 `"` is replaced with `'`.
 All extraneous whitespaces are removed to keep the total character count down (console has a limitation to command size of ~1200 characters, the rest just gets cut off)

Execution:

- Run `ProcessLua.py`
- Use `exec -q luaCfgsProcessed.cfg`
- Each entry can be executed as `vstr [name]`

Note: The paths are assumed to be local because that's what exec uses, so the script is assumed to be in homepath/config/

Full example:

- Place `ProcessLua.py` in the `config` directory
- Create a file `luaCfgs.cfg` in the same directory with the following contents:
 luaTest test.lua
- Create a file `test.lua` in the same directory with the following contents:
 Cmd.exec( 'echo test' )
- In `autoexec.cfg` add the following:
 set luaUpdateFromCfgs "exec -q luaCfgsProcessed.cfg"
 vstr luaUpdateFromCfgs
- Run `ProcessLua.py`
- In-game, use `/vstr luaTest` after loading a map. `test` should be printed into the console.