Post your modding questions here

knuckles88
New member
 
Posts: 1
Joined: Wed Apr 30, 2014 17:27

Re: Post your modding questions here

by knuckles88 » Wed Apr 30, 2014 17:40

How do you read the state of a checkbox?

I've configured a formspec with fields, labels, dropdowns, and a checkbox. All of them display as expected when I right-click on the node. Within on_receive_fields, I can access the fields and dropdowns via fields.[field or dropdown name], but I can't access the checkbox in the same way. When I add
Code: Select all
for k,v in pairs(fields) do
   print(k)
end

to my on_receive_fields code, the log shows a list which includes all the fields and dropdowns, but doesn't include the checkbox. Where is the state of the checkbox stored?
 

jeffery
New member
 
Posts: 2
Joined: Fri May 02, 2014 00:23

Re: Post your modding questions here

by jeffery » Fri May 02, 2014 00:40

I got the mod PilzAdam-mobs and placed it in .minetest/mods ran the game and enabled the mod, when I logged into my world a message popped up ModError: failed to load and run , I have 3 other mods installed: Vanessae home decor pack, x fences and x panes.

please help meh
 

User avatar
mimilus
Member
 
Posts: 75
Joined: Thu Mar 06, 2014 09:08
Location: France
GitHub: mimilus
IRC: Mimilus

Re: Post your modding questions here

by mimilus » Fri May 02, 2014 06:43

Hello

When i place a nodebox wich has facedir as parameter all the textures of the node are turning in the same time.
Is there a parameter / function wiche exists to keep some textures aligned to "the north of the map" in my case for top and bottom texture, to keep them aligned, at this time it's breaking the visual style of the texture.
 

User avatar
Topywo
Member
 
Posts: 1721
Joined: Fri May 18, 2012 20:27

Re: Post your modding questions here

by Topywo » Fri May 02, 2014 09:02

jeffery wrote:I got the mod PilzAdam-mobs and placed it in .minetest/mods ran the game and enabled the mod, when I logged into my world a message popped up ModError: failed to load and run , I have 3 other mods installed: Vanessae home decor pack, x fences and x panes.

please help meh


If you already didn't, rename the folder name of your mods to the name that in their topics is written between the brackets [ ]

Example: mobs-master --> mobs

See also: viewtopic.php?f=9&t=6450


If this doesn't help, copy/paste the ERROR lines of your debug.txt in this post.
 

Kilarin
Member
 
Posts: 778
Joined: Mon Mar 10, 2014 00:36

Re: Post your modding questions here

by Kilarin » Tue May 06, 2014 03:30

Is it possible to, in one mod, override a function in a different mod?

For example, the Carts mod contains: function cart:on_step(dtime)
Could I create a mod in a DIFFERENT folder, cartsplus for example, set the depends to carts, then override the on_step function so carts uses my new on_place function instead of it's original?

I tried just defining
cart:function on_step(dtime)
in cartsplus, but it ran the old carts on_step function not my replacement.

I tried
cart.on_step=cartplus_on_step

and that didn't work. I tried:

minetest.override_item(cart, {on_step = cartplus_on_step,})

and got:

20:42:59: ERROR[main]: ========== ERROR FROM LUA ===========
20:42:59: ERROR[main]: Failed to load and run script from
20:42:59: ERROR[main]: /home/donald/.minetest/mods/cartsplus/init.lua:
20:42:59: ERROR[main]: /usr/share/minetest/builtin/misc_register.lua:327: attempt to concatenate local 'name' (a table value)
20:42:59: ERROR[main]: stack traceback:
20:42:59: ERROR[main]: /usr/share/minetest/builtin/misc_register.lua:327: in function 'override_item'
20:42:59: ERROR[main]: /home/donald/.minetest/mods/cartsplus/init.lua:31: in main chunk
20:42:59: ERROR[main]: ======= END OF ERROR FROM LUA ========

IS there a way to do this?
I was hoping not to just fork carts, because that means you've got two different mods with the same folder name, and I foresee difficulties with that. And I don't want to redefine everything because then you would have both carts and cartsplus each defining a different kind of cart with different behavior, which could get confusing.

Any help would be greatly appreciated.
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
Location: Hawaii
GitHub: HeroOfTheWinds
IRC: WindHero

Re: Post your modding questions here

by HeroOfTheWinds » Tue May 06, 2014 03:52

I was trying to do something like this in lockpicks. All I can think of is that override_item SHOULD work, and you're merely using it wrong. I would copy the whole function instead of a reference to the function, but that's just me. Disregard that if you're redefining multiple objects using that function. Also, judging by the error, you should put the actual name of the cart as a string, e.g. "carts:cart" or whatever it is you are overriding. I think that's your problem there.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

jeffery
New member
 
Posts: 2
Joined: Fri May 02, 2014 00:23

Re: Post your modding questions here

by jeffery » Tue May 06, 2014 04:31

Topywo wrote:
jeffery wrote:I got the mod PilzAdam-mobs and placed it in .minetest/mods ran the game and enabled the mod, when I logged into my world a message popped up ModError: failed to load and run , I have 3 other mods installed: Vanessae home decor pack, x fences and x panes.

please help meh


If you already didn't, rename the folder name of your mods to the name that in their topics is written between the brackets [ ]

Example: mobs-master --> mobs

See also: viewtopic.php?f=9&t=6450


If this doesn't help, copy/paste the ERROR lines of your debug.txt in this post.


Thanks heaps working now
 

Kilarin
Member
 
Posts: 778
Joined: Mon Mar 10, 2014 00:36

Re: Post your modding questions here

by Kilarin » Tue May 06, 2014 04:55

HeroOfTheWinds wrote: All I can think of is that override_item SHOULD work, and you're merely using it wrong.

My thoughts exactly.

you should put the actual name of the cart as a string, e.g. "carts:cart" or whatever it is you are overriding. I think that's your problem there.


That makes sense! BUT, while it eliminated the error, the newly redefined on_step function is still not running. <sigh>
 

User avatar
Hybrid Dog
Member
 
Posts: 2726
Joined: Thu Nov 01, 2012 12:46

Re: Post your modding questions here

by Hybrid Dog » Tue May 06, 2014 17:38

̣
Last edited by Hybrid Dog on Fri May 09, 2014 18:26, edited 1 time in total.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

User avatar
philipbenr
Member
 
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
Location: United States
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
Location: Hawaii
GitHub: HeroOfTheWinds
IRC: WindHero

Re: Post your modding questions here

by HeroOfTheWinds » Wed May 07, 2014 01:34

Does anybody know what parameters I would have to use for perlin noise in Lua to simulate the humidity and temperature features that were in mgv7 for a while? I know about the minetest.config trick when using mgv7, but I need this for singlenode.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

User avatar
LionsDen
Member
 
Posts: 530
Joined: Thu Jun 06, 2013 03:19

Re: Post your modding questions here

by LionsDen » Wed May 07, 2014 03:28

I think paramat and his mods might be one of the best places for temperature and humidity perlin noise.
 

User avatar
spootonium
Member
 
Posts: 94
Joined: Fri May 02, 2014 01:38
Location: Down the mine.

Re: Post your modding questions here

by spootonium » Wed May 07, 2014 06:02

Perhaps a bit of a broad question, but:
What are the capabilities of game.conf, beyond name and common_mods? Can it, for example, overload any of the settings in minetest.conf?

The reason I ask is, that I'm looking for an elegant way to be able to impose certain settings for a game, that wouldn't be relevent or optimal for other games. I'm aware of minetest.setting_set(), but I'm hoping for a method slightly less blunt than altering configs for the whole programme for one particular use-case.
I write code. Sometimes, it even works.
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
Location: Hawaii
GitHub: HeroOfTheWinds
IRC: WindHero

Re: Post your modding questions here

by HeroOfTheWinds » Wed May 07, 2014 06:26

spootonium wrote:Perhaps a bit of a broad question, but:
What are the capabilities of game.conf, beyond name and common_mods? Can it, for example, overload any of the settings in minetest.conf?

The reason I ask is, that I'm looking for an elegant way to be able to impose certain settings for a game, that wouldn't be relevent or optimal for other games. I'm aware of minetest.setting_set(), but I'm hoping for a method slightly less blunt than altering configs for the whole programme for one particular use-case.


It's rather funny that I was just asking this yesterday on IRC. game.conf can not override minetest.config. However, you can include a separate minetest.config in the game's own folder, which will then take precedence over the main minetest.config, as far as I know.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

User avatar
spootonium
Member
 
Posts: 94
Joined: Fri May 02, 2014 01:38
Location: Down the mine.

Re: Post your modding questions here

by spootonium » Wed May 07, 2014 06:39

HeroOfTheWinds wrote:It's rather funny that I was just asking this yesterday on IRC. game.conf can not override minetest.config. However, you can include a separate minetest.config in the game's own folder, which will then take precedence over the main minetest.config, as far as I know.


Sounds legit. Odd that it's not documented, though. Thanks.
I write code. Sometimes, it even works.
 

User avatar
spootonium
Member
 
Posts: 94
Joined: Fri May 02, 2014 01:38
Location: Down the mine.

Re: Post your modding questions here

by spootonium » Wed May 07, 2014 17:47

Further to my previous question, are there any other fields that that game.conf has, other than name or common_mods? For that matter, is there any reason why it could/should not be utilised by modders as a game-wide settings file (i.e. with custom fields)? (It occurs to me that I may have stepped beyond the scope of this forum, but if I can get a complete, authoritive answer, I intend to put it in the wiki.)

And what about modpack.txt? I know that it needn't necessary be empty, but would it "break" anything if it were actually read/written. I'm thinking about things like version strings, manifest, hash/checksum - possibly through to modpack-wide defaults, and those sorts of odd-&-ends that are useful to have in one place, but which don't really belong in a README or .conf(ig).

Anyone want to have a go at answering that? :-D
I write code. Sometimes, it even works.
 

User avatar
rubenwardy
Moderator
 
Posts: 5961
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Post your modding questions here

by rubenwardy » Wed May 07, 2014 18:08

spootonium wrote:Further to my previous question, are there any other fields that that game.conf has, other than name or common_mods? For that matter, is there any reason why it could/should not be utilised by modders as a game-wide settings file (i.e. with custom fields)? (It occurs to me that I may have stepped beyond the scope of this forum, but if I can get a complete, authoritive answer, I intend to put it in the wiki.)

And what about modpack.txt? I know that it needn't necessary be empty, but would it "break" anything if it were actually read/written. I'm thinking about things like version strings, manifest, hash/checksum - possibly through to modpack-wide defaults, and those sorts of odd-&-ends that are useful to have in one place, but which don't really belong in a README or .conf(ig).

Anyone want to have a go at answering that? :-D


You can place a minetest.conf file in the same directory as game.conf, and it overrides default settings.

modpack.txt contents are never read by the game.
 

User avatar
spootonium
Member
 
Posts: 94
Joined: Fri May 02, 2014 01:38
Location: Down the mine.

Re: Post your modding questions here

by spootonium » Wed May 07, 2014 18:29

rubenwardy wrote:You can place a minetest.conf file in the same directory as game.conf, and it overrides default settings.


That clarified my previous question, but what other fields does/can game.conf contain?

rubenwardy wrote:modpack.txt contents are never read by the game.


Presumably, therefore, it can contain any text that I want, and be read and/or written while the game is running.

Cheers.
I write code. Sometimes, it even works.
 

User avatar
paramat
Developer
 
Posts: 3546
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: Post your modding questions here

by paramat » Thu May 08, 2014 20:57

HeroOfTheWinds wrote:Does anybody know what parameters I would have to use for perlin noise in Lua to simulate the humidity and temperature features that were in mgv7 for a while?

Temp and humidity noises are and will always be in mgv7, the default noise params used in your version of mgv7 are shown in minetest.conf.example, and are currently:
Code: Select all
# Offset, scale, spread factor, seed offset, number of octaves, persistence
#mgv7_np_heat = 25, 50, (500, 500, 500), 35293, 1, 0
#mgv7_np_humidity = 50, 31.25, (750, 750, 750), 12094, 2, 0.6

The noise values output are determined by offset and scale, and will be -25 to 75 for temp, 0 to 100 for humidity, i use 0 and 1 for offset and scale in my mods to get a noise value varying roughly between -1 and 1.
 

User avatar
TG-MyinaWD
Member
 
Posts: 356
Joined: Thu May 08, 2014 21:22
Location: Far Eden
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .

Re: Post your modding questions here

by TG-MyinaWD » Thu May 08, 2014 21:52

Has anyone yet made a Alt. Minetest?
Like have different crafting ways and, maybe a texture style like my Avatar looks like?
Yeah that the chest will look like if no one did so I will start working on it even more.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.
 

User avatar
Krock
Developer
 
Posts: 4469
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: Post your modding questions here

by Krock » Fri May 09, 2014 12:56

Alt. Tester wrote:Has anyone yet made a Alt. Minetest?
Like have different crafting ways and, maybe a texture style like my Avatar looks like?
Yeah that the chest will look like if no one did so I will start working on it even more.

What's Alt. Minetest?

Gets skins:
http://lmgtfy.com/?q=site:forum.minetest.net+skins+mod
Changes chest textures:
viewforum.php?f=4
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
Hybrid Dog
Member
 
Posts: 2726
Joined: Thu Nov 01, 2012 12:46

Re: Post your modding questions here

by Hybrid Dog » Fri May 09, 2014 18:28

HeroOfTheWinds wrote:Does anybody know what parameters I would have to use for perlin noise in Lua to simulate the humidity and temperature features that were in mgv7 for a while? I know about the minetest.config trick when using mgv7, but I need this for singlenode.

the heat and humidity functions of minetest has been removed
"The weather functions were dropped at Apr 18, 2014. "

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

Frai
Member
 
Posts: 14
Joined: Tue Apr 22, 2014 05:51

Re: Post your modding questions here

by Frai » Sat May 10, 2014 19:33

Code: Select all
minetest.register_node("snow:snow_brick", {
   description = "Snow Brick",
   tiles = {"snow_snow_brick.png"},
   groups = {cracky=2},
   drop = 'snow:snow_brick',
   sounds = default.node_sound_stone_defaults(),
})

gives me the error
16:01:49: ERROR[main]: ========== ERROR FROM LUA ===========
16:01:49: ERROR[main]: Failed to load and run script from
16:01:49: ERROR[main]: D:\_\spiele\minetest\minetest-0.4.9-dev20140504\bin\..\games\kubisch\mods\snow\init.lua:
16:01:49: ERROR[main]: ....4.9-dev20140504\bin\..\games\kubisch\mods\snow\init.lua:7: attempt to index global 'default' (a nil value)
16:01:49: ERROR[main]: stack traceback:
16:01:49: ERROR[main]: ....4.9-dev20140504\bin\..\games\kubisch\mods\snow\init.lua:7: in main chunk
16:01:49: ERROR[main]: ======= END OF ERROR FROM LUA ========
init.lua:7 pointing to "sounds = default.node_sound_stone_defaults()," already tried with other sounds, no success
 

User avatar
kaeza
Moderator
 
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Post your modding questions here

by kaeza » Sat May 10, 2014 20:33

Frai wrote:
Code: Select all
minetest.register_node("snow:snow_brick", {
   description = "Snow Brick",
   tiles = {"snow_snow_brick.png"},
   groups = {cracky=2},
   drop = 'snow:snow_brick',
   sounds = default.node_sound_stone_defaults(),
})

gives me the error
16:01:49: ERROR[main]: ========== ERROR FROM LUA ===========
16:01:49: ERROR[main]: Failed to load and run script from
16:01:49: ERROR[main]: D:\_\spiele\minetest\minetest-0.4.9-dev20140504\bin\..\games\kubisch\mods\snow\init.lua:
16:01:49: ERROR[main]: ....4.9-dev20140504\bin\..\games\kubisch\mods\snow\init.lua:7: attempt to index global 'default' (a nil value)
16:01:49: ERROR[main]: stack traceback:
16:01:49: ERROR[main]: ....4.9-dev20140504\bin\..\games\kubisch\mods\snow\init.lua:7: in main chunk
16:01:49: ERROR[main]: ======= END OF ERROR FROM LUA ========
init.lua:7 pointing to "sounds = default.node_sound_stone_defaults()," already tried with other sounds, no success

Go to the mods/snow/ folder, create a file named "depends.txt" (if there's not already one) and add "default" (without quotes) to it.

Also, this topic is for generic modding questions. If you have problems with a specific mod, post in the mod's thread.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal
 

User avatar
Ackirb
Member
 
Posts: 23
Joined: Thu Mar 27, 2014 21:01
Location: United States

Pay Doors [please help]

by Ackirb » Sat May 10, 2014 23:50

I would like to create a "pay door". Basically, it can only be opened if a player inserts a specified item into it (eg - they would right-click on the door, and an inventory would open. The player would add 10 cobble stone blocks to this inventory (for example), and then the door would open).

Any ideas on how I could do this?
 

PreviousNext

Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 3 guests