Page 1 of 169

Post your modding questions here

PostPosted: Sun Feb 03, 2013 02:37
by Aqua
Please post any new questions in the Modding Discussion subforum

PostPosted: Sun Feb 03, 2013 03:44
by Likwid H-Craft
Title:How do I upload a Model?

You see I made a model and I like to, inport it on, Minetest but how do I?

And is there a way have the textures to work to like the player.

PostPosted: Sun Feb 03, 2013 06:00
by Aqua
Likwid H-Craft wrote:Title:How do I upload a Model?

You see I made a model and I like to, inport it on, Minetest but how do I?

And is there a way have the textures to work to like the player.

What did you make the model on? Blender? I think you have to import it to a .X file using DirectX or something.

PostPosted: Sun Feb 03, 2013 12:32
by Likwid H-Craft
Yes it on blender.

PostPosted: Sun Feb 03, 2013 12:52
by Evergreen
How do I make the mod block appear in the creative menu? Also, how do I make it show the name of the block when I hover my cursor over it?

PostPosted: Sun Feb 03, 2013 14:12
by Casimir
2. When registering a block use
Code: Select all
    description = "Name",


1. In the groups make sure there is no "not_in_creative_inventory" group. For example:
Code: Select all
    groups = {crumbly=3},

PostPosted: Sun Feb 03, 2013 15:06
by Traxie21
Topic: How does one create a seperate inventory and update it with specific items?
Reasons: Making a physical Economy system
More info...
I don't understand formspec very well,
and the InvRef documentation needs help.

PostPosted: Sun Feb 03, 2013 15:19
by 1244
Can I add metadata to items in inventory?

PostPosted: Sun Feb 03, 2013 18:31
by Evergreen
The other problem is the textures glitch, turning black randomly etc.

PostPosted: Sun Feb 03, 2013 18:45
by PilzAdam
1244 wrote:Can I add metadata to items in inventory?

Yes: https://github.com/celeron55/minetest/blob/master/doc/lua_api.txt#L1259

PostPosted: Sun Feb 03, 2013 20:47
by Evergreen
Can anyone post the ABM code for generating trees?

PostPosted: Sun Feb 03, 2013 20:50
by PilzAdam
Evergreen wrote:Can anyone post the ABM code for generating trees?

The default trees arent generated with an abm. They are generated in the mapgen in c++.

PostPosted: Sun Feb 03, 2013 21:10
by Evergreen
PilzAdam wrote:
Evergreen wrote:Can anyone post the ABM code for generating trees?

The default trees arent generated with an abm. They are generated in the mapgen in c++.

I know it can be done in ABM. Can someone write a code for that?

PostPosted: Sun Feb 03, 2013 21:35
by VanessaE
If you want them to be ABM-based, look at the original conifers or jungletrees mods, or the first version of moretrees. The former works on almost any version of minetest, but they're both kinda slow. The latter is lightning fast but requires a recent development build from minetest git.

It is not recommended to spawn trees via an ABM except in the case of planting saplings. Doing so will crowd your map and irritate your users.

PostPosted: Sun Feb 03, 2013 22:36
by Evergreen
VanessaE wrote:If you want them to be ABM-based, look at the original conifers or jungletrees mods, or the first version of moretrees. The former works on almost any version of minetest, but they're both kinda slow. The latter is lightning fast but requires a recent development build from minetest git.

It is not recommended to spawn trees via an ABM except in the case of planting saplings. Doing so will crowd your map and irritate your users.


Then how do I make different trees spawn?
Which file do I edit?

(hint, I am making a birch tree mod.)

I also need to know how to not have those strange texture glitches appear at random.

PostPosted: Sun Feb 03, 2013 23:11
by Test&Mine
Title: How I make.

Yes how do I make a way, to have two Items show... EG... Like have a pickaxe on one, side and a Gun on the other?

PostPosted: Mon Feb 04, 2013 13:49
by Likwid H-Craft
I think you use this, ^ and have X90 maybe at the end of it.

PostPosted: Mon Feb 04, 2013 14:07
by PilzAdam
Test&Mine wrote:Title: How I make.

Yes how do I make a way, to have two Items show... EG... Like have a pickaxe on one, side and a Gun on the other?

You mean one item per hand? This is not possible in the Lua API. You need to edit the engine code.

PostPosted: Mon Feb 04, 2013 14:09
by Traxie21
Minetest players are severely right-handed. They drop anything in their left hand. Fact of life.

PostPosted: Mon Feb 04, 2013 17:34
by Evergreen
PilzAdam wrote:
Test&Mine wrote:Title: How I make.

Yes how do I make a way, to have two Items show... EG... Like have a pickaxe on one, side and a Gun on the other?

You mean one item per hand? This is not possible in the Lua API. You need to edit the engine code.

Can you please answer my question about what file the map generation of trees is in? I also want to know how to fix those wierd texture glitches.

PostPosted: Mon Feb 04, 2013 17:40
by PilzAdam
Evergreen wrote:
PilzAdam wrote:
Test&Mine wrote:Title: How I make.

Yes how do I make a way, to have two Items show... EG... Like have a pickaxe on one, side and a Gun on the other?

You mean one item per hand? This is not possible in the Lua API. You need to edit the engine code.

Can you please answer my question about what file the map generation of trees is in? I also want to know how to fix those wierd texture glitches.

There are currently two files for that:
The method in mapgen_v6.cpp is used currently.

PostPosted: Mon Feb 04, 2013 17:49
by Likwid H-Craft
How do I make the, Version hidden, and change it?

And can I make Mouse 2 Click to do something just for, one item in the init.lua?

PostPosted: Mon Feb 04, 2013 18:49
by Traxie21
Title: Does anyone understand how to use minetest.get_pointed_thing_position()?

here's what I'm trying to do:

Code: Select all
local pos = minetest.get_pointed_thing_position(pointed, true)
minetest.env:remove_node(pos)


PostPosted: Mon Feb 04, 2013 19:11
by PilzAdam
Traxie21 wrote:Title: Does anyone understand how to use minetest.get_pointed_thing_position()?

here's what I'm trying to do:

Code: Select all
local pos = minetest.get_pointed_thing_position(pointed, true)
minetest.env:remove_node(pos)


  • If pointing at a node & above -> return pointed_thing.above
  • If pointing at a node & not above -> return pointed_thing.under
  • If pointing at a objec & object exists -> return object
  • If pointing at a objec & object doesn exists -> return nil
  • If none of the above -> return nil

PostPosted: Mon Feb 04, 2013 19:20
by Likwid H-Craft
How do I make the, Version hidden, and change it?

And can I make Mouse 2 Click to do something just for, one item in the init.lua?