Modding Tutorial Book (new: Code architecture, unit testing)

Re: Modding Tutorial Book (new: Privileges)

Postby Lone_Wolf » Fri Oct 20, 2017 3:07 am

Could you add a part that shows you how to register a tool? Or is there and I missed it?
I'm having trouble understanding the highlighted text:
snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3},
Lone_Wolf
Member
 
Posts: 2151
Joined: Sun Apr 09, 2017 5:50 am
GitHub: LoneWolfHT
In-game: Lone_Wolf

Re: Modding Tutorial Book (new: Privileges)

Postby Napiophelios » Fri Oct 20, 2017 3:21 am

Lone_Wolf wrote:Could you add a part that shows you how to register a tool? Or is there and I missed it?
I'm having trouble understanding the highlighted text:
snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3},


Krock explains it pretty well here
Napiophelios
Member
 
Posts: 973
Joined: Mon Jul 07, 2014 1:14 am
GitHub: Napiophelios
In-game: Nappi

Re: Modding Tutorial Book (new: Privileges)

Postby Lone_Wolf » Sat Nov 04, 2017 12:37 am

Where can i get ChatCmdBuilder?
Lone_Wolf
Member
 
Posts: 2151
Joined: Sun Apr 09, 2017 5:50 am
GitHub: LoneWolfHT
In-game: Lone_Wolf

Re: Modding Tutorial Book (new: BasicMapOps, AutoErrorChecki

Postby rubenwardy » Sun Feb 25, 2018 12:07 am

Two new chapters added:


Also made ChatCmdBuilder a bit less misleading, and added a short section on Lua patterns

Available to download in HTML or PDF form: https://github.com/rubenwardy/minetest_ ... g/20180225
The book is 110 pages when made into a standard paperback book!
rubenwardy
Moderator
 
Posts: 5739
Joined: Tue Jun 12, 2012 6:11 pm
GitHub: rubenwardy
In-game: rubenwardy

Re: Modding Tutorial Book

Postby hajo » Sun Feb 25, 2018 11:00 pm

rubenwardy wrote:Two new chapters added:

I had another look at your book, and noticed
* "Getting and Setting Privileges" - needs an explanation how to check if a player has an account
* Detached inventory - where are they stored, is there a sizelimit ?

Also:
* How about geany, to recommand as editor / IDE ?
* In the PDF, some headings should start on a new page, eg.
Mod Folder Structure, Overriding, Foods, Liquid, Map Structure-Reading, Writing Nodes,
Getting a Metadata Object, Setting Metadata, Admin complex command,
Displaying Formspecs, Inventory-More Methods, Adding to a List,
Github, or another VCS
hajo
Member
 
Posts: 596
Joined: Thu Oct 13, 2016 10:45 am

Re: Modding Tutorial Book (new: BasicMapOps, AutoErrorChecki

Postby KCoombes » Wed Feb 28, 2018 1:53 am

Most excellent resource! Any chance of updating the downloadable examples file?
KCoombes
Member
 
Posts: 414
Joined: Thu Jun 11, 2015 11:19 pm
In-game: Knatt

WHY?

Postby Wuzzy » Tue Apr 03, 2018 4:19 pm

Why is this still not in official?
WHYYYYYY?
Wuzzy
Member
 
Posts: 3443
Joined: Mon Sep 24, 2012 3:01 pm
GitHub: Wuzzy2
In-game: Wuzzy

Re: Modding Tutorial Book (new: BasicMapOps, AutoErrorChecki

Postby MineYoshi » Sat Apr 28, 2018 1:28 am

Hi, Rubenwardy. Recently I got illuminated while eating a piece of chicken and I got the idea of translating your modding tutorial to Spanish. Do you allow me to do so? Also, do I edit the HTML files directly - whilst adding the UTF-8 header to assure the characters will show correctly - or do I send you the translation on any other form?
MineYoshi
Member
 
Posts: 5373
Joined: Wed Jul 08, 2015 1:20 pm

Re: Modding Tutorial Book (new: BasicMapOps, AutoErrorChecki

Postby muhdnurhidayat » Sun Apr 29, 2018 10:12 pm

MineYoshi wrote:Hi, Rubenwardy. Recently I got illuminated while eating a piece of chicken and I got the idea of translating your modding tutorial to Spanish. Do you allow me to do so? Also, do I edit the HTML files directly - whilst adding the UTF-8 header to assure the characters will show correctly - or do I send you the translation on any other form?

there's instruction on how to add language on the website
https://rubenwardy.com/minetest_modding ... w-language

just follow that for any languages... but it will take some time to translate as there's many pages
(am translating the book to Malay locally at the moment, will only make pull request once everything is translated)
muhdnurhidayat
Member
 
Posts: 296
Joined: Wed Nov 16, 2016 10:55 pm
GitHub: MuhdNurHidayat
In-game: muhdnurhidayat

Re: Modding Tutorial Book (new: BasicMapOps, AutoErrorChecki

Postby MineYoshi » Wed May 02, 2018 12:33 am

muhdnurhidayat wrote:
MineYoshi wrote:Hi, Rubenwardy. Recently I got illuminated while eating a piece of chicken and I got the idea of translating your modding tutorial to Spanish. Do you allow me to do so? Also, do I edit the HTML files directly - whilst adding the UTF-8 header to assure the characters will show correctly - or do I send you the translation on any other form?

there's instruction on how to add language on the website
https://rubenwardy.com/minetest_modding ... w-language

just follow that for any languages... but it will take some time to translate as there's many pages
(am translating the book to Malay locally at the moment, will only make pull request once everything is translated)

Oh. Thank you very much. :-)
MineYoshi
Member
 
Posts: 5373
Joined: Wed Jul 08, 2015 1:20 pm

Crazy idea for which I will get shouted at by every core dev

Postby Wuzzy » Sat Jun 02, 2018 9:59 pm

Crazy idea for which I will get shouted at by every core dev: Include the modding book into the Minetest repository.
Wuzzy
Member
 
Posts: 3443
Joined: Mon Sep 24, 2012 3:01 pm
GitHub: Wuzzy2
In-game: Wuzzy

Re: Crazy idea for which I will get shouted at by every core

Postby TumeniNodes » Sat Jun 02, 2018 10:24 pm

Wuzzy wrote:Crazy idea for which I will get shouted at by every core dev: Include the modding book into the Minetest repository.


Why?
Not being argumentative or a smartass..., legitimately asking why. What would be the reason, and the benefit, etc..

IMO it is better as a separate project. If it were merged in or lumped in, it may create some confusion and neglect over time
TumeniNodes
Member
 
Posts: 2643
Joined: Fri Feb 26, 2016 7:49 pm
GitHub: TumeniNodes
In-game: TumeniNodes

Re: Modding Tutorial Book (new: BasicMapOps, AutoErrorChecki

Postby texmex » Sat Jun 02, 2018 11:45 pm

Alternative idea: Rewrite the dull default repo readme to include an ”awesome-minetest” style section of important community repos and web sites.
texmex
Member
 
Posts: 1293
Joined: Mon Jul 11, 2016 9:08 pm
GitHub: tacotexmex
In-game: texmex

Re: Modding Tutorial Book (new: Code architecture, unit test

Postby rubenwardy » Sun Jul 15, 2018 6:42 pm

New Chapters!




Also added previous next chapter links, and changed a lot of the URLs.
rubenwardy
Moderator
 
Posts: 5739
Joined: Tue Jun 12, 2012 6:11 pm
GitHub: rubenwardy
In-game: rubenwardy

Re: Modding Tutorial Book (new: Code architecture, unit test

Postby TumeniNodes » Sun Jul 15, 2018 11:10 pm

rubenwardy wrote:

New Chapters!




Also added previous next chapter links, and changed a lot of the URLs.


Next: Point all wiki dev link to the modding book ; )
TumeniNodes
Member
 
Posts: 2643
Joined: Fri Feb 26, 2016 7:49 pm
GitHub: TumeniNodes
In-game: TumeniNodes

Re: Modding Tutorial Book (new: Code architecture, unit test

Postby cryptavian » Thu Sep 06, 2018 4:51 am

Is the IDE/Lua debugging section still accurate and up-to-date? At the very least I think server property "secure.enable_security false" needs to be set in order for the "require('debugger')" line to grab the correct module without triggering mod security exceptions.

After setting that and the subsequent steps, I still got the error that follows Lua Runtime error "module 'socket.core' not found" from within debugger.lua; does anyone know what I'm doing wrong?

Code: Select all
2018-09-06 04:36:55: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mobs_monster' in callback LuaABM::trigger(): /usr/local/lib/lua/5.1/debugger.lua:53: module 'socket.core' not found:
2018-09-06 04:36:55: ERROR[Main]:       no field package.preload['socket.core']
2018-09-06 04:36:55: ERROR[Main]:       no file './socket/core.lua'
2018-09-06 04:36:55: ERROR[Main]:       no file '/usr/local/share/lua/5.1/socket/core.lua'
2018-09-06 04:36:55: ERROR[Main]:       no file '/usr/local/share/lua/5.1/socket/core/init.lua'
2018-09-06 04:36:55: ERROR[Main]:       no file '/usr/local/lib/lua/5.1/socket/core.lua'
2018-09-06 04:36:55: ERROR[Main]:       no file '/usr/local/lib/lua/5.1/socket/core/init.lua'
2018-09-06 04:36:55: ERROR[Main]:       no file './socket/core.so'
2018-09-06 04:36:55: ERROR[Main]:       no file '/usr/local/lib/lua/5.1/socket/core.so'
2018-09-06 04:36:55: ERROR[Main]:       no file '/usr/local/lib/lua/5.1/loadall.so'
2018-09-06 04:36:55: ERROR[Main]:       no file './socket.so'
2018-09-06 04:36:55: ERROR[Main]:       no file '/usr/local/lib/lua/5.1/socket.so'
2018-09-06 04:36:55: ERROR[Main]:       no file '/usr/local/lib/lua/5.1/loadall.so'
2018-09-06 04:36:55: ERROR[Main]: stack traceback:
2018-09-06 04:36:55: ERROR[Main]:       [C]: in function 'require'
2018-09-06 04:36:55: ERROR[Main]:       /usr/local/lib/lua/5.1/debugger.lua:53: in main chunk
2018-09-06 04:36:55: ERROR[Main]:       [C]: in function 'require'
2018-09-06 04:36:55: ERROR[Main]:       /path/to/minetest/bin/../mods/mobs/api.lua:3212: in function </path/to/minetest/bin/../mods/mobs/api.lua:3211>

Here are the steps I followed from: https://rubenwardy.com/minetest_modding ... vironments

IDEs allow you to debug code like a native application. These are harder to set up than just a text editor.

One such IDE is Eclipse with the Koneki Lua plugin:

    Install Eclipse + Koneki.
    Create a new Lua project from existing source (specify Minetest’s base directory).
    Follow instructions from Koneki wiki how to do “Attach to remote Application” debugging (just a few steps).
    It is suggested to add those lines from wiki at beginning of builtin.lua.
    Start the debugger (set “Break on first line” in debugger configuration to see if it is working).
    Start Minetest.
    Enter the game to startup Lua.


EDIT - Update

I resolved this issue by running "luarocks install luasocket" which downloaded and installed the appropriate socket library onto my system's Lua path thanks to help on Discord from rubenwardy and others. Debugging through Eclipse Koneki works great now!
cryptavian
New member
 
Posts: 1
Joined: Thu Sep 06, 2018 4:42 am

Re: Modding Tutorial Book (new: Code architecture, unit test

Postby Kilarin » Fri Sep 14, 2018 4:37 pm

Just wanted to add my voice to the other saying that this book is AWESOME and very helpful. THANK YOU!
Kilarin
Member
 
Posts: 723
Joined: Mon Mar 10, 2014 12:36 am

Re: Modding Tutorial Book (new: Code architecture, unit test

Postby FrostRanger » Wed Nov 07, 2018 11:35 am

Koneki does not seem to be in the eclipse marketplace (well, it is, but it is not for lua though). The only thing that seems to be available for lua in the eclipse marketplace is Lua Development Tools. Just staring out with modding so I haven't had a chance to play around with it much but it seems to work fine. Thank you for making this awesome resource!
FrostRanger
Member
 
Posts: 12
Joined: Thu Oct 11, 2018 5:40 am
GitHub: WulftheNordicRanger
In-game: FrostRanger

Re: Modding Tutorial Book (new: Code architecture, unit test

Postby ThorfinnS » Mon Mar 25, 2019 4:06 pm

As you said, Gimp is way overpowered for just working on 16x16s, and though MS Paint now does transparency, it's not intuitive..

Might I suggest the 20+ year old Ultimate Paint, now available only as freeware. Less than 2 megs so loads fast, and almost hard to not figure out transparency, since there's a fill-in transparency box that pops up as soon as you select one of the fill tools.

I've been using it since about the time it came out, and the middle and high school kids I work with now pick it up with almost no assistance. Most were able to create their own first node made from scratch and place it in a game in under an hour.
ThorfinnS
Member
 
Posts: 70
Joined: Mon Feb 25, 2019 10:05 pm

Simple image editor

Postby Godo » Mon Mar 25, 2019 4:57 pm

For those no longer able to use 32-bit programs like myself, who have switched to Linux, I recommend Kolour Paint, it is as simple as the one I used in Windows XP (an old program called Photomagic), with a very simple interface but quite a wide range of tools. To select a background colour you just click on a transparency icon next to the other colours in the default palette. Of course, it is freeware.
Godo
Member
 
Posts: 21
Joined: Mon May 02, 2016 6:41 am
In-game: Godo

Re: Modding Tutorial Book (new: Code architecture, unit test

Postby Lone_Wolf » Mon Mar 25, 2019 5:52 pm

I used a program called Pinta back when I had a potato for a computer. It was nice and simple.
Lone_Wolf
Member
 
Posts: 2151
Joined: Sun Apr 09, 2017 5:50 am
GitHub: LoneWolfHT
In-game: Lone_Wolf

Re: Modding Tutorial Book (new: Code architecture, unit test

Postby ThorfinnS » Mon Mar 25, 2019 6:35 pm

Thanks for the suggestion. I'll take a look. I'm always on the lookout for lightweight and ideally portable programs for stuff like this.
ThorfinnS
Member
 
Posts: 70
Joined: Mon Feb 25, 2019 10:05 pm



Return to Modding Discussion



Who is online

Users browsing this forum: Bing Bot [Bot] and 0 guests