A level editor, scripting interface, campaign editor, and reverse engineering tool for Levelhead in ongoing development, made using LÖVE.
There's a button that shows all the keybinds in the misc. tab. \ Binary releases that can be run without manually installing LÖVE can be found somewhere in that bar on the right. \ Chaoshead is rather stable these days, and will verify that it saved (mostly) correctly before irrevocably removing the old level.
If you have any questions, feel free to ask.
Chaoshead Update Awareness Day is annually on february 27, in order to spread awareness about Chaoshead updates.
Chaoshead tries to impose as little limits as possible. For more information about those limits and which your allowed to break, go here.
There's practically no active development anymore, though if someone runs into a bug or has a very highly requested feature I'll try to fix/add that. I also still watch this repository and can be found in the BScotch Discord, so if there're any question please reach out to me.
Chaoshead comes with some built-in scripts, which are shown in the .built-in
folder in the scripting interface.
More information about the scripts can be found in comments at the top of their files. Their files can be found in the scripts/.built-in
Chaoshead executes from the scripts folder, which can be opened from the Misc. tab. When it says running scripts without sandbox is dangerous, it mostly means that you shouldn't randomly trust script from others, making a script yourself will most likely be alright.
Scripts get provided access to the following globals:
level
: The Level opened in the editor. You usually want to modify this one (using the provided methods).
If you overwrite it with a new value though, Chaoshead will use that one.selection
: The selection in the current editor, nil
if nothing is selected. Has the following fields:
mask
: The SelectionMask that shows which area of the level is selected.
If you overwrite it with a new value, Chaoshead will use that one (modifying an existing one is probably easier though).
If the selection
global is not set at first, you can set it to a table yourself and then set the mask
field to a new SelectionMask.contents
: The SelectionContents that have all the objects in the current selection.
Does not update if you change the level or the mask.
Modifications and overwriting get ignored (the new contents get constructed based on the new mask).For documentation on how to use these globals and other stuff, have a look at the docs/ folder.
WIP file specification:
https://docs.google.com/document/d/1_Nt0u3DpgLA2KHgwVdcCnMYaY6nGjZcjbRyx1hHp9rA/
Levelhead data (level elements, properties, etc.):
https://docs.google.com/spreadsheets/d/1bzASSn2FgjqUldPzX8DS66Lv-r2lk3V12jZjl51uaTk/
The old Trello/todo-list for this project, should probably be deleted since GitHub issues are used now:
https://trello.com/b/eqxuD1A4/chaoshead
Collection of update cinematics (when I remember to update it):
http://levelmod.epizy.com/wiki/doku.php?id=cinematics#chaoshead
A very WIP spreadsheet about the campaign levels and their internal data:
https://docs.google.com/spreadsheets/d/1wongis8qvVj3-cHEa4HhmzpL1XkP1TXjWYjV5RobZNw
There's always data that needs collecting, usually about how something behaves in Levelhead.
If you need to look at the raw representation in the file, you can enable the misc.editor.showRawNumbers
setting so they will be displayed in Chaoshead.
There's also still parts that need to be reverse engineered in which case the Hex Inspector is your friend.
You can look at the issues with the reverse engineering label
for the more interesting/useful things. Data collection stuff also has that label.
Though if you want to help program this thing, that's also possible.
A basic overview of the code architecture/what goes where can be found in design.md
#1D is the hexadecimal value for the top-right position in a 30 by 30 level.
When CH crashes because of an invalid property save-format, it prints the bytes (in hexadecimal) of the sub-entry to the console. Just looks how many bytes there are before the first position to see which save-format it is.
Works towards adding type annotations as used by sumneko's language server (and VSCode extension) is tracked in issue 85.
Chaoshead has some integration with the Local Lua Debugger VSCode extension, automatically hooking into it if it's active. The following launch configuration works:
{
"type": "lua-local",
"request": "launch",
"name": "Run",
"program": {
"command": "love",
},
"args": [
".",
],
},
With the local lua interpreter set to love
, and the love
binary available in the PATH.
Chaoshead itself is licensed under the Apache 2.0 license (see LICENSE.txt)
Copyright 2020 tyoeer and the Chaoshead contributors
Chaoshead uses some libraries and resources from others, see credits.txt for their authors and licenses.