Post your modding questions here

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

Post your modding questions here

by Aqua » Sun Feb 03, 2013 02:37

Image
This topic is for you to ask and answer questions about modding.

To post a question:
Example
Topic: How to register node?
Reason: I want to make a mod.
More Info(optional): I've tried but I don't know how.
To answer a question:
Example
Topic: How to register node?
Reason: I want to make a mod.
More Info: I've tried but I don't know how.

Answer(please give a useful one): Check out this or this! Good luck!
Last edited by Aqua on Sun Mar 03, 2013 08:00, edited 1 time in total.
Hi there ^.~
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Sun Feb 03, 2013 03:44

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.
Last edited by Likwid H-Craft on Sun Feb 03, 2013 03:44, edited 1 time in total.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
Aqua
Member
 
Posts: 641
Joined: Wed Aug 22, 2012 09:11

by Aqua » Sun Feb 03, 2013 06:00

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.
Hi there ^.~
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Sun Feb 03, 2013 12:32

Yes it on blender.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sun Feb 03, 2013 12:52

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?
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Sun Feb 03, 2013 14:12

2. When registering a block use
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    description = "Name",


1. In the groups make sure there is no "not_in_creative_inventory" group. For example:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    groups = {crumbly=3},
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Sun Feb 03, 2013 15:06

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.
 

1244
Member
 
Posts: 45
Joined: Fri Jul 13, 2012 16:40

by 1244 » Sun Feb 03, 2013 15:19

Can I add metadata to items in inventory?
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sun Feb 03, 2013 18:31

The other problem is the textures glitch, turning black randomly etc.
Last edited by Evergreen on Sun Feb 03, 2013 18:32, edited 1 time in total.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Feb 03, 2013 18:45

1244 wrote:Can I add metadata to items in inventory?

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

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sun Feb 03, 2013 20:47

Can anyone post the ABM code for generating trees?
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Feb 03, 2013 20:50

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++.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sun Feb 03, 2013 21:10

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?
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Feb 03, 2013 21:35

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.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sun Feb 03, 2013 22:36

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.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

Test&Mine
New member
 
Posts: 8
Joined: Sun Feb 03, 2013 12:47

by Test&Mine » Sun Feb 03, 2013 23:11

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?
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Mon Feb 04, 2013 13:49

I think you use this, ^ and have X90 maybe at the end of it.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Feb 04, 2013 14:07

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.
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Mon Feb 04, 2013 14:09

Minetest players are severely right-handed. They drop anything in their left hand. Fact of life.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Mon Feb 04, 2013 17:34

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.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Feb 04, 2013 17:40

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.
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Mon Feb 04, 2013 17:49

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?
Last edited by Likwid H-Craft on Mon Feb 04, 2013 18:01, edited 1 time in total.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
Traxie21
Member
 
Posts: 753
Joined: Mon Dec 31, 2012 10:48

by Traxie21 » Mon Feb 04, 2013 18:49

Title: Does anyone understand how to use minetest.get_pointed_thing_position()?

here's what I'm trying to do:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local pos = minetest.get_pointed_thing_position(pointed, true)
minetest.env:remove_node(pos)

 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Feb 04, 2013 19:11

Traxie21 wrote:Title: Does anyone understand how to use minetest.get_pointed_thing_position()?

here's what I'm trying to do:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Mon Feb 04, 2013 19:20

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?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Feb 05, 2013 14:45

Likwid H-Craft wrote: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?

1st: Please dont double post.
2nd: http://forum.minetest.net/viewtopic.php?id=4483
3rd: Do you mean doubleclick?
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Wed Feb 06, 2013 15:09

Yes I made this but I don't know how I make it work so, Adam do you know how? or anyone?
Image
How do I get this to work?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Feb 06, 2013 16:13

Likwid H-Craft wrote:Yes I made this but I don't know how I make it work so, Adam do you know how? or anyone?
Image
How do I get this to work?

Add the background element to the players formspec.
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Wed Feb 06, 2013 18:20

PilzAdam wrote:
Likwid H-Craft wrote:Yes I made this but I don't know how I make it work so, Adam do you know how? or anyone?
Image
How do I get this to work?

Add the background element to the players formspec.


So how do I put the img make, it work?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

User avatar
pandaro
Member
 
Posts: 266
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro

by pandaro » Wed Feb 06, 2013 18:32

there is a way to know the position of a player whose name I know?
sorry for bad english
Linux debian 7 wheezy 64
kde
 

Next

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 8 guests

cron