2551ddbf1d
This commit contains changes best credited to flyc0r <flyc0r@localhost.localdomain>, although the changes were separated out from waspsaliva's original initial commit rev. 0e9e1f352, which added the files from DFC work tree, and squashed in numerous additions by flyc0r and collaborators. That commit log: commit 0e9e1f3528c3d2fa1f1e9a79d4a00576be8552f5 Author: flyc0r <flyc0r@localhost.localdomain> Date: Sun Oct 4 03:37:08 2020 +0200 init This rebase had the effect of griefing the git history xD, so for example `git blame` of DFC and even upstream Minetest sources appear to be originally authored by `flyc0r` in that commit. To fix this, I will recommit only the changes onto the appropriate commit in DFC, and recreate the following git history (incl. merges). After this, the git history will be at least visually the same as the original Waspsaliva, even if commit sha1sums have changed. AFAICT, the closest commit from DFC was af085acbd. That commit was found simply by running `git diff wsc-master <some_DFC_rev>`, and locating the commit with the smallest number of differences. This commit was then created as follows: # Check out the DFC base commit git checkout af085acbd # Check out the *files* from WSC's initial commit git checkout 0e9e1f352 -- . # Make sure everything is added and commit the changes git add -A git commit
60 lines
2.6 KiB
Markdown
60 lines
2.6 KiB
Markdown
# CSM DTE
|
|
## Client Side Mod Designing & Testing Environment
|
|
An advanced, ingame lua and formspec editor for minetest.
|
|
|
|
This can be used for creating, testing and using CSMs without reloading the game, and without the game crashing.
|
|
This is also the easiest way to create advanced formspecs.
|
|
It was tested with multiple CSMs from the minetest forums, and they all worked. (actually in the current version, a few things might not work, but they will be fixed in the future)
|
|
|
|
CSMs can be created, or pasted in, and they should work the same as they would normaly, except errors won't crash the game!
|
|
|
|
functions that are registered with minetest can be put in a function `safe(func)` to output errors to the UI when minetest calls them
|
|
|
|
scripts can be put in startup to run them automatically when the game loads. errors are also put in the UI
|
|
|
|
screenshots:
|
|
![lua editor](preview_1.png)
|
|
![formspec editor](preview_2.png)
|
|
|
|
## FEATURES:
|
|
lua editor:
|
|
- print function
|
|
- coloured error output
|
|
- multiple files
|
|
- file creation and deletion
|
|
- safe function execution
|
|
- automatically run files at startup
|
|
|
|
formspec editor:
|
|
- every widget is available
|
|
- widgets are easy to edit
|
|
- formspec preview, shows what it will look like
|
|
- export as a function with parameters
|
|
- export as a string
|
|
- and a whole bunch of fancy stuff
|
|
|
|
## To Use:
|
|
- use the command `.dte` to open the editor
|
|
- select the `lua editor` tab to run and edit CSMs
|
|
- select the `formspec editor` tab to create a formspec
|
|
- select the `files` tab to open, create, and delete files
|
|
- select the `startup` tab to select lua files to run when the game loads
|
|
|
|
## How to install
|
|
- make sure you have client modding enabled (search for `client modding` in advanced settings, and set it to true)
|
|
- download and extract the zip file into `clientmods\csm_dte` or paste the `init.lua` file into it.
|
|
- add `load_mod_csm_dte = true` to the `clientmods\mods.conf` file
|
|
- join a game or server, and it should work!
|
|
|
|
## Editing the files
|
|
### - if you do not wan't to edit the program, the `development` folder can be deleted!
|
|
when editing the program, it is easier to edit the smaller files found inside the `development` folder.
|
|
these can be run as seperate CSMs for testing (I recomend disabling `csm_dte`)
|
|
to join the together, copy the lua editor into `csm_dte/init.lua` and copy the formspec editor (from EDITOR START to EDITOR END) into the "PASTE FORMSPEC EDITOR HERE" section
|
|
|
|
### TODO:
|
|
- make all functions work after the game has been loaded
|
|
- add a UI to unregister functions which were registered from a program
|
|
- add a lua console
|
|
- import ui strings into the editor (?)
|