Mod Template/Standard

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Mod Template/Standard

by LNJ » Wed Jun 29, 2016 20:12

I created a mod template. (actually for a friend to show him how I do it)

So I came up with the idea, to make a official one. So every mod would be uniformly.
And you can say what I should change. And when the devs are satisfied with it, we could also move it to the minetest-mods organization on GitHub (if thats ok).

Here is the repo: https://github.com/LNJ2/mod_template
Last edited by LNJ on Sun Jul 03, 2016 15:34, edited 1 time in total.
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Mod/README.txt Template

by MineYoshi » Sat Jul 02, 2016 00:33

Seems to be a nice template, i like the idea of uniformly mods..
Also, would be nice if you add "FAQ" about the mod in the README.txt template, likely: "i have some trouble, i can't dig this block" or "exactly how i get this item called <itemname>"...
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: Mod/README.txt Template

by LNJ » Sat Jul 02, 2016 12:47

I added Links to GitHub, MT Forum, MT Wiki to the README. (https://git.io/vKvrV)
I added "How to use this mod" heading with a link to the MT Wiki (is that ok? - on the wiki can be a very detailed description on how to use the mod) (https://git.io/vKvrw)

MineYoshi: Is that ok?
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Mod/README.txt Template

by Wuzzy » Sat Jul 02, 2016 14:13

It's a lame template. It's just using the style used in most Minetest Game mods, I hate this style since it is so useless most of the time.

First some criticisms about the template design and content:
The license information comes before the actual description. But the description is more important and should come first. It is the main reason why people bother to read readme files in the first place. Also, why making LGPLv2.1 part of the template? That decision seems arbitrary.
The section “How to use this mod:” suggests to add external links which point to the actual manual of the mod. This is a very bad idea and I hate it whenever I open readme files. This defeats the whole purpose of a readme file. If the user is not online at the moment, then the readme file becomes useless. There are many situations where you can be offline, e.g. you are travelling, your router is broken, the ISP screwed up, and so on. The readme should contain the help text, not just pointers to the help text.
But I am OK with links to licenses since this is not as important as the actual description.

Finally, I prefer to use Markdown syntax and call the file “README.md” instead of “README.txt”. First its syntax is well-defined and second Markdown's syntax is already actively being used to pretty-print the readme file on Minetest Bower. That's very useful! Here's an example:
https://minetest-bower.herokuapp.com/mods/pep

Markdown files can also be read without problems in any text editor:
http://repo.or.cz/minetest_pep.git/blob ... /README.md

IMO this approach is better than using ad-hoc syntax where everyone uses a different style, and your template is, frankly, not helping as you have not formally defined the syntax.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: Mod/README.txt Template

by LNJ » Sat Jul 02, 2016 16:02

Wuzzy wrote:It's a lame template. It's just using the style used in most Minetest Game mods, I hate this style since it is so useless most of the time.

First some criticisms about the template design and content:
The license information comes before the actual description. But the description is more important and should come first. It is the main reason why people bother to read readme files in the first place. Also, why making LGPLv2.1 part of the template? That decision seems arbitrary.
The section “How to use this mod:” suggests to add external links which point to the actual manual of the mod. This is a very bad idea and I hate it whenever I open readme files. This defeats the whole purpose of a readme file. If the user is not online at the moment, then the readme file becomes useless. There are many situations where you can be offline, e.g. you are travelling, your router is broken, the ISP screwed up, and so on. The readme should contain the help text, not just pointers to the help text.
But I am OK with links to licenses since this is not as important as the actual description.

Finally, I prefer to use Markdown syntax and call the file “README.md” instead of “README.txt”. First its syntax is well-defined and second Markdown's syntax is already actively being used to pretty-print the readme file on Minetest Bower. That's very useful! Here's an example:
https://minetest-bower.herokuapp.com/mods/pep

Markdown files can also be read without problems in any text editor:
http://repo.or.cz/minetest_pep.git/blob ... /README.md

IMO this approach is better than using ad-hoc syntax where everyone uses a different style, and your template is, frankly, not helping as you have not formally defined the syntax.

I have to say, I didn't even know that there is something like Minetest Bower. I'm going to remake it with a Markdown README and a bower.json file.

The license of the template can be WTFPL, I just wanted to describe how you should add the license. My mistake.
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Mod/README.txt Template

by Wuzzy » Sat Jul 02, 2016 16:22

Adding bower.json might be overkill (I also don't know 100% how Minetest Bower works), I think. But Markdown would be a good idea, even if the mod never shows up on Minetest Bower.
And okay, I almost guessed the license thing was more like an example. But still, people tend to be lazy and forget to change it, so it should be something like “insert license here” or whatever. ;-)
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: Mod/README.txt Template

by LNJ » Sat Jul 02, 2016 16:33

Wuzzy wrote:Adding bower.json might be overkill (I also don't know 100% how Minetest Bower works), I think. But Markdown would be a good idea, even if the mod never shows up on Minetest Bower.
And okay, I almost guessed the license thing was more like an example. But still, people tend to be lazy and forget to change it, so it should be something like “insert license here” or whatever. ;-)

Ok, no bower.json. But I'll spilt the README into LICENSE.txt and README.md.

In the LICENSE.txt there are only information about the license(s) of the textures and the code.

And in the README.md there will be all information on how to use the mod and a small note that it's LGPLv2.1/WTFPL/whatever, without author, year and e-mail address.
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Mod/README.txt Template

by Wuzzy » Sun Jul 03, 2016 13:26

I suggest to also add the following dummy files:

- screenshot.png
- description.txt
- settingtypes.txt
- Empty directories: sounds, textures, media, models

Screenshot can be just a dummy image, but of the correct size because it can be easily forgotten.
Description can contain just a dummy description and settingtypes.txt contains maybe some examples or just a referece to builtin/settingtypes.txt of the Minetest installation.

The idea is that the user can always delete files which are not required.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: Mod Template

by LNJ » Sun Jul 03, 2016 14:49

Wuzzy wrote:I suggest to also add the following dummy files:

- screenshot.png
- description.txt
- settingtypes.txt
- Empty directories: sounds, textures, media, models

Screenshot can be just a dummy image, but of the correct size because it can be easily forgotten.
Description can contain just a dummy description and settingtypes.txt contains maybe some examples or just a referece to builtin/settingtypes.txt of the Minetest installation.

The idea is that the user can always delete files which are not required.

But I can't add empty directories in git. There have to be at least one file inside them (as in minetest mods/mods_here.txt).
Or is there a special option in git, that I don't know?

And which size should have the screenshot?
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Mod/README.txt Template

by twoelk » Sun Jul 03, 2016 15:30

I had just been working on the http://wiki.minetest.net/Mods page adding a new file structure tree.

I very much agree to add templates for as many meta-data files as are known; even a bower.json file as Wuzzy stated before these can easily be deleted if not needed.
As such I think each file should have a comment as header that states it's purpose and declares wether it is optional or recommended. Analog to this each folder could contain a blah_goes_here.txt that starts with some info of the folder use, wether it is optional and what file types and formats it might contain.

It seems that a 300*200 picture works well for the screenshot.png although sizes double that have been used but most have a ratio of 3 by 2.
It may be of interest that in the default resolution on startup the text of the description.txt file is not wraped but cut of after around 45 characters in a line. Maybe a hint to include line breaks might be usefull or rather to simply keep the description short.

You might want to browse the Repositories at https://github.com/minetest-mods as efforts are made to bring all the mods included to a common standard.

In fact I would suggest to indeed stick to the standards developed there, so that mods using this template may be easily added.
Last edited by twoelk on Sun Jul 03, 2016 15:55, edited 1 time in total.
 

User avatar
srifqi
Member
 
Posts: 508
Joined: Sat Jun 28, 2014 04:31
GitHub: srifqi
IRC: srifqi
In-game: srifqi

Re: Mod Template

by srifqi » Sun Jul 03, 2016 15:44

LNJ wrote:But I can't add empty directories in git. There have to be at least one file inside them (as in minetest mods/mods_here.txt).
Or is there a special option in git, that I don't know?

You can't, as stated in Git FAQ:
Git FAQ wrote:Currently the design of the Git index (staging area) only permits files to be listed, and nobody competent enough to make the change to allow empty directories has cared enough about this situation to remedy it.
Directories are added automatically when adding files inside them. That is, directories never have to be added to the repository, and are not tracked on their own.
You can say "git add <dir>" and it will add the files in there.
If you really need a directory to exist in checkouts you should create a file in it. .gitignore works well for this purpose (there is also a tool MarkEmptyDirs using the .NET framework which allows you to automate this task); you can leave it empty or fill in the names of files you do not expect to show up in the directory.


LNJ wrote:And which size should have the screenshot?

About 3:2 in aspect ratio, as kaeza said:
kaeza wrote:From the source, it seems the aspect ratio is 3:2. The *actual* (as in, pixel) dimensions of the image vary depending on screen resolution/window size and is scaled accordingly.

EDIT: Maybe 360x240 would be a good choice (480x320 if you want/need more detail).

Also, from ExcaliburZero's comment on this.
I'm from Indonesia! Saya dari Indonesia!
Terjemahkan Minetest!
Mods by me. Modifikasi oleh saya.

Pronounce my nick as in: es-rifqi (IPA: /es rifˈki/)
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: Mod Template/Standard

by LNJ » Wed Aug 17, 2016 12:12

I nearly had forgotten to post it here, but I updated the mod template.
And I also added a GUIDE.txt that explains everything what you have to do.
See here: https://github.com/LNJ2/mod_template
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 

User avatar
LNJ
Member
 
Posts: 200
Joined: Tue Sep 23, 2014 16:02
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

Re: Mod Template/Standard

by LNJ » Wed Aug 17, 2016 12:20

And a question:
The mod directory is not empty anymore, so it can be confusing when you split your code up into several files, to see all the lua-files totally mixed up with the README.md, LICENSE.txt, mod.conf, description.txt, screenshot.png and depends.txt.
I'd suggest to add another folder for lua-files. I already saw this in some mods before.
My Minetest Modding Tutorials (German) | Minetest TNG - My survival subgame! (OUTDATED... :() | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron