|
1 | | -# Sauer-Demo-Editor |
2 | | -An in-game menu for scheduling actions during playback of Sauerbraten demos. |
| 1 | +# Cube 2 Sauerbraten Pseudo Demo Editor |
| 2 | +A menu for [Sauerbraten](http://sauerbraten.org) with functions to execute client commands at a specific time of a demo (replay), as well as functions to rewind and fast forward. |
| 3 | + |
| 4 | +### Installation |
| 5 | +1. Download the [demoeditor.zip](https://github.com/SalatielSauer/Sauer-Demo-Editor/releases/latest) (without extracting it). |
| 6 | +2. Move it to the root folder of your Sauerbraten (the home folder or the main installation folder). |
| 7 | +3. Find your autoexec.cfg file or create a new one (also in one of the root folders), open it in a text editor and add the two commands:<br> |
| 8 | + `addzip demoeditor.zip; exec demoeditor.cfg`<br> |
| 9 | + The zip will be extracted internally and the configuration file (demoeditor.cfg) will be applied whenever you start the game. |
| 10 | + |
| 11 | +To open the menu you can either type `/demoeditor` in the game's chat console (T key by default), or add an "edit" argument to the demo command (`/demo anydemoname edit`). |
| 12 | + |
| 13 | +Alternatively to step 3 you can type the command `/notepad autoexec.cfg` during the game to open the built-in text editor. |
| 14 | + |
| 15 | +### Tools |
| 16 | +<img src="packages/icons/de_skip_left.png" width="16px"/><img src="packages/icons/de_skip_right.png" width="16px"/> **Rewind and Fast-forward**:<br> |
| 17 | +You can use the arrow icons to control the current remaining time, and the gray sum/minus icons to control the selected target time.<br> |
| 18 | +<br> |
| 19 | +The colors of the arrows represent a state:<br> |
| 20 | +- Invisible: Current remaining time equals selected time |
| 21 | +- Gray: Unable to rewind/forward |
| 22 | +- Orange: Able to rewind/forward<br> |
| 23 | + |
| 24 | +<img src="packages/icons/de_plus.png" width="16px"/> **Adding Actions**:<br> |
| 25 | +You can use the green sum icon to add actions to the current project, just select the time you want and fill the text field with any command.<br> |
| 26 | +<br> |
| 27 | + |
| 28 | +<img src="packages/icons/de_gear.png" width="16px"/> **Starting Actions**:<br> |
| 29 | +Actions are not executed by default, you can enable or disable them using the gear icon.<br> |
| 30 | +<br> |
| 31 | +Each color of the gear represents a state:<br> |
| 32 | +- Gray: Actions are disabled and game is paused |
| 33 | +- Yellow: Actions are enabled and game is paused |
| 34 | +- Red: Actions are disabled and game is running |
| 35 | +- Green: Actions are enabled and game is running<br> |
| 36 | + |
| 37 | +<img src="packages/icons/de_minus.png" width="16px"/> **Removing Actions**:<br> |
| 38 | +You can use the red minus icon to remove individual actions, or the gear icon submenu to remove all actions.<br> |
| 39 | +<br> |
| 40 | + |
| 41 | +<img src="packages/icons/de_folder.png" width="16px"/> **Saving and Loading Actions**:<br> |
| 42 | +The folder icon allows you to save or load actions from an external (.cfg) file.<br> |
| 43 | +<br> |
| 44 | +The demo/project name is added automatically, if no path is specified, the .cfg file will be saved in the $demodir, next to the .dmo file.<br> |
| 45 | +The colors of the save button also represent a state:<br> |
| 46 | +- Red: The specified demo name does not exist |
| 47 | +- Yellow: There is already a .cfg file available with the demo name |
| 48 | +- White: The demo exists and there is no .cfg file available |
| 49 | + |
| 50 | +If you prefer, you can edit the actions configuration file manually following this structure: |
| 51 | +``` |
| 52 | +_de_echo [Loaded 3 actions by unnamed] |
| 53 | +_de_actions_time = [[540] [480] [443]] |
| 54 | +_de_actions_timereadable = [[9 0] [8 0] [7 23]] |
| 55 | +_de_actions_command = [[echo "action 1"] [echo "action 2"] [echo "action 3"]] |
| 56 | +``` |
| 57 | +For an action file to be automatically detected when loading a demo, it must be in the same folder and have the same name as the .dmo. |
| 58 | +If you want to load an action file manually, just apply the file with `/exec actionfile.cfg` or change the project name using the interface. |
0 commit comments