Turning all items and materials into scripts

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Turning all items and materials into scripts

by MirceaKitsune » Sat May 21, 2011 23:06

Hello everyone. I've been trying out Minetest for a while. Just tried the latest version in the repository now, and wow! It's advancing fast, even if it still has a long way to go. Congratulations to celeron55 for the splendid work he's doing! :D

Anyway, I wanted to start off with a small suggestion. I mentioned this on IRC a while back, but here it should be easier to discuss. I heard about the upcoming scripting support, and that's very good! But I was thinking about something else that would be nice, and doesn't seem to have been done yet (not sure if it's planned, but still asking).

Could each and every object in Minetest (including natural materials / blocks and all items) be turned into scripts, and not hard coded any more? So basically, the Minetest code does not contain any information about any item itself, but just properties that can be used (what that item is and how it works). Then in a script file, each object is defined with a name, texture, and a property of what it is and how it works.

Here's an example: To make the stone rockpick, you would only create a texture for it, then something like this in a script file:

stone_rockpick
{
name: Stone_Rockpick
texture: data\stone_rockpick.png
type: tool #is an item you hold and use
crafted_with: a-plank-here a-stick-there bla-bla-bla #position of each item for crafting pattern
duration: 10 #lets say each dig reduces by 1, so you can dig 10 times with this
improvement: mining_stone 1.5 #says that while holding this tool, you mine stone half a time faster
}

Just a random example (in a random scripting language that came to mind) to illustrate what I mean. This could make Minetest VERY flexible and easy to edit in all ways, without having to change any code. One could add new tools very easily, remove tools they don't care about, and do anything they want.

Same could be done with everything... even blocks the world is generated with. You would define within the script if that block should be used by the world generator, and you could even invent new materials, stuff like alien trees (or whatever comes to mind) and make new worlds that way, without having to change any code.

I believe this would be really cool. So I just wanted to propose it here, since I wasn't sure if turning every item and object into scripts is planned with the scripting support. Hope it will happen :)
 

User avatar
titformatt
Member
 
Posts: 15
Joined: Wed May 11, 2011 19:36

by titformatt » Mon May 23, 2011 23:01

I wrote:
Might be worth looking at this thread before making anymore posts here...

Scripting discontinued

 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Tue May 24, 2011 01:59

Oh, I see. Sorry to hear that scripting got discontinued :( I believe this would have been awesome. Maybe someday, in the more distant future...
 

Fisherman
Member
 
Posts: 10
Joined: Fri Apr 22, 2011 14:13

by Fisherman » Tue May 24, 2011 16:21

It kinda looks like JSON or something. It's not really scripting, it's more a way to store structured data.

I agree that minetest should use something like that. Maybe YML, XML, JSON, ...

Hardcoding items seems like a Bad Idea (TM)
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Wed May 25, 2011 12:51

Fisherman wrote:It kinda looks like JSON or something. It's not really scripting, it's more a way to store structured data.

I agree that minetest should use something like that. Maybe YML, XML, JSON, ...

Hardcoding items seems like a Bad Idea (TM)


Agreed. Hard coded items and materials are a bad way to go, in my opinion. And cut a flexibility that would make everything a lot more fun. Also, XML seems like the best way to me (and most common one).
 

User avatar
Staffs
Member
 
Posts: 329
Joined: Thu Aug 04, 2011 13:16

by Staffs » Wed Oct 12, 2011 18:01

So i guess this is not gonna happen huh :D ?
I love mods :D
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Wed Oct 12, 2011 18:08

this would be much better than what is right now
If you can think it, you can make it.
 

TBC_x
Member
 
Posts: 16
Joined: Wed Nov 02, 2011 13:18

by TBC_x » Wed Nov 02, 2011 16:08

I'm GREATLY supporting this idea, because of... because of ideas in this forum. People could implement their own stuff on the server side, then client can download and interpret it.
 

User avatar
RAPHAEL
Member
 
Posts: 627
Joined: Tue Nov 01, 2011 09:09

by RAPHAEL » Fri Nov 18, 2011 04:25

Decided to chime in. A form of scripting support may be a good idea overall. For the administrator, having scripting support isn't going to cause a rash of forks/clones. If anything it will help get more features available in minetest a lot faster.

If someone comes along and they have an idea for an item, if there's scripting available then they can make a script for that item. If there was a "user script directory" they could then share it and if it's good it could become an official minetest included script.

The drawbacks I see is the potential for slowdowns of gameplay, potential a**holes making damaging scripts and various clients not having access to same set of scripts.

The solutions to the above would be to have minetest come with a set of "official scripts" and on the script repo page (maybe on the wiki?) make sure the user understands the drawbacks of using any unofficial script.

An example of items:
* Let's say a number of people want beds. Make a bed script and put in wiki. Others could modify it to make it better and eventually get included in official minetest distribution.
* Say people want a monster that looks like dragon, script could be made by someone who really wants it and others could modify/improve it and maybe eventually get into minetest.

Might be a good idea to have community votes on if a script is worthy enough to be included in the official script set.

My two cents.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)
 

User avatar
lmtea
Member
 
Posts: 35
Joined: Tue Oct 18, 2011 13:40

by lmtea » Mon Nov 21, 2011 05:59

It will be really good.
 

TBC_x
Member
 
Posts: 16
Joined: Wed Nov 02, 2011 13:18

by TBC_x » Tue Nov 29, 2011 21:55

I have exact idea how the concept should look (by my personal thoughts) i'll split in into few points:
- minetest on its own should be only engine
- implementation of GUI, blocks, items, entities should be in LUA scripts
- scripts, that could be shared between client and server like blocks/entities definition
- it could use different communication protocols, implementation in LUA scripts/dynamic library (to be compatible with other blocky games)
- different chunk formats (dynamic library implementation)

this could make minetest pretty universal and moddable game.

I'm not pro, but i think, it could work
 

Roflo
Member
 
Posts: 51
Joined: Sun Nov 06, 2011 16:31

by Roflo » Wed Nov 30, 2011 04:08

For the record.. there's a new version.

It has LUA mods (c55 says "mods" sounds cooler than "scripts").

C55's announcement:
http://c55.me/blog/?p=665

Kahrl requests help figuring out a TOC for a Mod Tutorial:
http://celeron.55.lt/~celeron55/minetest/forum/viewtopic.php?id=475
Unless otherwise specified: I use linux and run (and compile) the latest dev.
 

TBC_x
Member
 
Posts: 16
Joined: Wed Nov 02, 2011 13:18

by TBC_x » Wed Nov 30, 2011 10:17

awesome!
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Sat Feb 11, 2012 12:57

Just checked the latest version of MineTest from GIT, and took a look at the LUA scripts. All items seem to have been moved from the code, and the script looks exactly like what I had in mind for defining them. Cheers for this great improvement :D It will make modding very easy, and I believe this is a huge advantage from MineCraft and any other forks.
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Sat Feb 11, 2012 15:50

Minecraft devlopers said they will add a modding API, with texture downloading/etc...
I guess it'll be Java, so MT will still be better about modding. :P
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

by MirceaKitsune » Sat Feb 11, 2012 23:11

Awesome :) Also, I noticed on Youtube that after the date when LUA and modding were added, there's been an explosion of Minetest videos, some of people creating their own items and mods. Till then, there were barely a few people posting videos about it. I believe this already says something ^_^
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 11 guests

cron