[CSM] CSM Designing and Testing Environment [csm_dte]

FiftySix
New member
 
Posts: 7
Joined: Sun Jan 14, 2018 10:58
Location: Scotland
GitHub: BenjieFiftysix
In-game: fiftysix or benjie

[CSM] CSM Designing and Testing Environment [csm_dte]

by FiftySix » Mon May 21, 2018 23:24

CSM DTE
Client Side Mod Designing & Testing Environment

Edit, Test, and Run CSMs or other Lua Code inside of Minetest without having to reload, adn without causing the game to crash with errors!

CSMs can be pasted in and used permanently using the startup option. You don't even have to reload the game!

I tested this by pasting in a few random CSMs, and they all worked just like they should.
FEATURES:
- print function
- coloured error output
- multiple files
- file creation and deletion
- safe function execution
- automatically run files at startup
- run full CSMs
- Formspec editor coming soon!

detailed instructions can be found at the top of the init.lua file

Github
Download

Screenshot:
Image

Please tell me of any differences when running a CSM in this and the usual way. Thanks


I am working on a formspec editor which will become part of this:

you can put the preview file into its own mod folder, rename it to init.lua, and run it in minetest using .gui to test the current progress.
Image
Last edited by FiftySix on Thu Jun 07, 2018 20:58, edited 4 times in total.
 

User avatar
Lejo
Member
 
Posts: 311
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo
 

User avatar
octacian
Member
 
Posts: 588
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
GitHub: octacian
IRC: octacian
In-game: octacian

Re: [CSM] lua IDE [lua_ide]

by octacian » Tue May 22, 2018 13:32

This is a very interesting concept, and I quite like it - in fact, I once considered making something similar. There is one very basic problem, however, that for me anyway voids the usefulness of the entire concept. That reason is that Minetest's textarea is very limited. For me to be happy with writing more than a few short lines of code in an editor, it must at least have automatic indentation and syntax highlighting, two things which are completely impossible to implement within Minetest. Besides that, I'd prefer if it had the ability to do things such as select multiple parts of the code at once (multiple cursors). Not only that, but I usually have trouble copy-pasting stuff in and out of Minetest due to a weird bug in Irrlicht related to Linux, so I wouldn't be able to use it efficiently no matter what, but this is in no way your fault as it doesn't even have anything to do with Minetest.

Anyways, TL;DR: this is an amazing idea and a good implementation, but it lacks features that are impossible in Minetest, features that I consider a requirement for a good code editor.

May I also suggest that maybe you rename this to "lua_editor", and title it "In-Game Lua Code Editor"? Why? Well, the term IDE (Integrated Development Environment) refers to an environment usually specialized for a specific language, having debugging and testing tools, and usually having many if not all of the features I mentioned above.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
 

FiftySix
New member
 
Posts: 7
Joined: Sun Jan 14, 2018 10:58
Location: Scotland
GitHub: BenjieFiftysix
In-game: fiftysix or benjie

Re: [CSM] lua IDE [lua_ide]

by FiftySix » Tue May 22, 2018 15:33

octacian wrote:This is a very interesting concept, and I quite like it

Thank You!

The textarea is not great for writing in, but things can easily be pasted into it. My idea of how I would use it, was to write the code in a normal text editor, then copy it into the textarea (I'm on windows), so I wouldn't have to reload the game, and it wouldn't crash.
My post was poorly written and rushed, so I will probably make it more usefull in the future.

I will rename it to something else, probably not "Lua Editor", because I plan on adding some features for UI design and testing. Maybe "CSM Designing and Testing Envirnonment", or "CSM DTE" for short.
 

User avatar
Linuxdirk
Member
 
Posts: 1461
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: [CSM] lua IDE [lua_ide]

by Linuxdirk » Tue May 22, 2018 15:45

FiftySix wrote:CSMs can be pasted in and used permanently using the startup option. You don't even have to reload the game!

Great, no more script-based automatic CSM updates using Git!
 

User avatar
Lone_Wolf
Member
 
Posts: 1789
Joined: Sun Apr 09, 2017 05:50
Location: You wouldn't believe me
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf or Somebody

Re: [CSM] CSM Designing and Testing Environment [csm_dte]

by Lone_Wolf » Tue May 22, 2018 20:06

This looks slightly cooler than the basic_robot csm. Love it!
I've noticed the number of mods I can contribute to has decreased. I'm sticking with Github. Even though I don't like MS
 

User avatar
Lejo
Member
 
Posts: 311
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: [CSM] CSM Designing and Testing Environment [csm_dte]

by Lejo » Mon Jun 11, 2018 13:35

If you run a not Startup CSM with minetest.register_on_joinplayer(function(player)
The minetest.register_on_joinplayer(function(player) will never be done.
 

FiftySix
New member
 
Posts: 7
Joined: Sun Jan 14, 2018 10:58
Location: Scotland
GitHub: BenjieFiftysix
In-game: fiftysix or benjie

Re: [CSM] CSM Designing and Testing Environment [csm_dte]

by FiftySix » Mon Jun 11, 2018 16:01

All(most?) options for registering functions with minetest will be overwritten in a future version, meaning they will work after startup. So far the only function which I have done this for is minetest(/core).get_mod_storage(). They will also automatically be run in a safe environment (error catching) without using the safe() function, and can hopefully be unregistered from the GUI.

A list of API functions for registering things or commands would be usefull, since I am new to modding. but most importantly all functions which don't work after startup.
 


Return to Client-side modding



Who is online

Users browsing this forum: No registered users and 2 guests