Post your modding questions here

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Mon Oct 28, 2013 23:34

Someone could show me a tutorial for creating mods
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Mon Oct 28, 2013 23:37

brunob.santos wrote:Someone could show me a tutorial for creating mods

Read the code for other (simple) mods, and learn how they do stuff. That's the best way to learn.
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 | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Tue Oct 29, 2013 23:27

Chinchow wrote:Does anyone know how to set up schematics?

Sorry about this just bumping the question in case someone that does know didn't see it.
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
Ikishida
Member
 
Posts: 107
Joined: Sat Aug 17, 2013 08:02

by Ikishida » Wed Oct 30, 2013 10:13

Aqua wrote:
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.


where can I download DirectX or Blender?
When life hands you lemons,throw it back at life saying "I don't need your goddamn lemons!" =D
 

User avatar
Dan Duncombe
Member
 
Posts: 904
Joined: Thu May 09, 2013 21:11

by Dan Duncombe » Wed Oct 30, 2013 10:29

Ikishida wrote:
Aqua wrote:
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.


where can I download DirectX or Blender?

Download blender from it's website- just search Blender 3d modelling.

It has a built-in DirectX exporter to export the models.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

User avatar
fairiestoy
Member
 
Posts: 191
Joined: Sun Jun 09, 2013 19:25

by fairiestoy » Wed Oct 30, 2013 22:05

Chinchow wrote:
Chinchow wrote:Does anyone know how to set up schematics?

Sorry about this just bumping the question in case someone that does know didn't see it.


Question would be what exactly you want to know. Docs says this:

Lua Docs wrote:Schematics:
minetest.create_schematic(p1, p2, probability_list, filename)
^ Create a schematic from the volume of map specified by the box formed by p1 and p2.
^ Apply the specified probability values to the specified nodes in probability_list.
^ probability_list is an array of tables containing two fields, pos and prob.
^ pos is the 3d vector specifying the absolute coordinates of the node being modified,
^ and prob is the integer value from 0 to 255 of the probability (see: Schematic specifier).
^ If there are two or more entries with the same pos value, the last occuring in the array is used.
^ If pos is not inside the box formed by p1 and p2, it is ignored.
^ If probability_list is nil, no probabilities are applied.
^ Saves schematic in the Minetest Schematic format to filename.


That would lead ( to me ) to a example call like this:

minetest.create_schematic( {x=1,y=1,z=0}, {x=10,y=10,z=5}, nil, 'test_schematic' )

Which would lead to a box with a x_length = 10 , y_length = 10, height = 6, didn't test it though. Was how i understood the explanation. Otherwise did you took a look at the City generator of MKitsune? Its using schematics iirc.
Interesting about new things is, to figure out how it works ...
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Thu Oct 31, 2013 00:16

fairiestoy wrote:
Chinchow wrote:
Chinchow wrote:Does anyone know how to set up schematics?

Sorry about this just bumping the question in case someone that does know didn't see it.


Question would be what exactly you want to know. Docs says this:

Lua Docs wrote:Schematics:
minetest.create_schematic(p1, p2, probability_list, filename)
^ Create a schematic from the volume of map specified by the box formed by p1 and p2.
^ Apply the specified probability values to the specified nodes in probability_list.
^ probability_list is an array of tables containing two fields, pos and prob.
^ pos is the 3d vector specifying the absolute coordinates of the node being modified,
^ and prob is the integer value from 0 to 255 of the probability (see: Schematic specifier).
^ If there are two or more entries with the same pos value, the last occuring in the array is used.
^ If pos is not inside the box formed by p1 and p2, it is ignored.
^ If probability_list is nil, no probabilities are applied.
^ Saves schematic in the Minetest Schematic format to filename.


That would lead ( to me ) to a example call like this:

minetest.create_schematic( {x=1,y=1,z=0}, {x=10,y=10,z=5}, nil, 'test_schematic' )

Which would lead to a box with a x_length = 10 , y_length = 10, height = 6, didn't test it though. Was how i understood the explanation. Otherwise did you took a look at the City generator of MKitsune? Its using schematics iirc.


I will look into what you showed me but MirceaKitsune's files are all in .mts and I can't open those or edit them so they just look like mush.
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Thu Oct 31, 2013 06:22

Chinchow wrote:I will look into what you showed me but MirceaKitsune's files are all in .mts and I can't open those or edit them so they just look like mush.

Those .mts files are in a binary format and not intended to be edited with a normal editor.

The best way to create your own schematics is to use Worldedit:
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
//mtschemcreate your_file_name

ought to do it.
A list of my mods can be found here.
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Sat Nov 02, 2013 15:09

Thanks for the help Sokomine a sneak peek of things to come:
Image
Cheers!
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

User avatar
durtective6
Member
 
Posts: 167
Joined: Sun Aug 12, 2012 14:19
In-game: derplez

by durtective6 » Sat Nov 02, 2013 19:46

Hi, im just wondering, for my mod i'd like to make a alchemy furnace like thing. It would be like the alloy furnaces from things like technic, however i do not know how to add in the second slot for things to smelt like what the alloy furnaces have. Would someone be able to help? and also how would you make a new crafting type like what the furnace has (cooking) as i would like to make alchemy as a type. thanks for any help
Last edited by durtective6 on Sat Nov 02, 2013 20:21, edited 1 time in total.
 

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

by LionsDen » Sat Nov 02, 2013 20:28

durtective6 wrote:Hi, im just wondering, for my mod i'd like to make a alchemy furnace like thing. It would be like the alloy furnaces from things like technic, however i do not know how to add in the second slot for things to smelt like what the alloy furnaces have. Would someone be able to help? and also how would you make a new crafting type like what the furnace has (cooking) as i would like to make alchemy as a type. thanks for any help


About the best thing I can tell you is to examine the code for technic, both for the alloy furnace and the alloy furnace recipes.
 

User avatar
durtective6
Member
 
Posts: 167
Joined: Sun Aug 12, 2012 14:19
In-game: derplez

by durtective6 » Sat Nov 02, 2013 20:34

i have but have had no luck, ive also looked at this https://forum.minetest.net/viewtopic.php?id=3546 with only little success plus i dont like editing other peoples code and posting it because it doesnt look like i made the mod, i only look at other code to see if im doing stuff right
Last edited by durtective6 on Sat Nov 02, 2013 20:46, edited 1 time in total.
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Sun Nov 03, 2013 00:25

If you want to use your own code take their code and use your own words to describe it like writing a book, besides we're all in this together.
durtective6 wrote:i have but have had no luck, ive also looked at this https://forum.minetest.net/viewtopic.php?id=3546 with only little success plus i dont like editing other peoples code and posting it because it doesnt look like i made the mod, i only look at other code to see if im doing stuff right
 

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

by LionsDen » Sun Nov 03, 2013 01:06

And you will be learning how other people do it and possibly improving your own code in the process. Plus sometimes you will find errors in their code that you can tell them about. I have done that once or twice with some stuff in minetest. :)
 

User avatar
durtective6
Member
 
Posts: 167
Joined: Sun Aug 12, 2012 14:19
In-game: derplez

by durtective6 » Sun Nov 03, 2013 11:51

Also if i have a dependency which is someone elses mod, am i allowed to include it as a component of a mod pack
also does wtfpl cover code like code editing?
 

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

by LionsDen » Sun Nov 03, 2013 16:49

If it says the code is WTFPL then it means that anyone can do anything that they want to the code and the author doesn't care. You don't even have to credit them but it is always nice anyway to do so. Textures and sounds may or may not be WTFPL but usually the mod will tell you whatever license they have. Basically WTFPL means public domain.
 

leetelate
Member
 
Posts: 205
Joined: Thu Aug 29, 2013 18:07

by leetelate » Sun Nov 03, 2013 17:34

exactily - all my stuff is wtfpl and you can use it however you want, but some other modders use different licenses that require notification that you are using it - just read the readme on their mod to know what to do

oh and if you use a texture from somewhere (like the web), be sure you trace it yourself and not just drop it in as there are 'programmed pixels' that report use back to the owner - weird but true - just trace it out yourself (edge-detect,fill, tweak) and don't just drop it in

worlds made from a mod have to have the default and any dependencies included with them in the game, and that requires the license for those mods be included - i just put in a disclaimer saying it is in there because it has to be in there since it is a world and reference the default's readme (slacking, yes)
Last edited by leetelate on Sun Nov 03, 2013 17:44, edited 1 time in total.
MT IS MC'S SMARTER BROTHER
minetest 0.4.8 compiled from latest git on linux mint 15 with qjoypad and wired 360 controller
freeminer, pilztest, buildcraft and next are the idea factories
my minetest page is http://1337318.zymichost.com if zymic isn't down - meh, it is free...
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Tue Nov 05, 2013 05:04

Once i get my mits on 0.4.8 stable how do i make "air" nodes drownable, for my space mods, is it even possible?
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Tue Nov 05, 2013 05:08

Chinchow wrote:Thanks for the help Sokomine a sneak peek of things to come:
https://pbs.twimg.com/media/BYEzucBCAAAx3TW.png
Cheers!

Wow is that MGV7? that red terrain look very interesting.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
Chinchow
Member
 
Posts: 683
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Tue Nov 05, 2013 11:07

paramat wrote:
Chinchow wrote:Thanks for the help Sokomine a sneak peek of things to come:
https://pbs.twimg.com/media/BYEzucBCAAAx3TW.png
Cheers!

Wow is that MGV7? that red terrain look very interesting.

Yes it is MGV7
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Thu Nov 07, 2013 01:29

I found the spawn command on our server
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
-- Suicide command

minetest.register_chatcommand("spawn",
{
    params = "",
    description = "Causes you to die and respawn",
    func = function(name, param)
        minetest.env:get_player_by_name(name):set_hp(0);
    end
})

how would I get the static spawn instead of set_hp(0)?
 

User avatar
fairiestoy
Member
 
Posts: 191
Joined: Sun Jun 09, 2013 19:25

by fairiestoy » Thu Nov 07, 2013 02:27

I suggest you dig through this here:
Multispawn
Use this mod as it is, or just extract the spawn/teleport part of it
Interesting about new things is, to figure out how it works ...
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Thu Nov 07, 2013 02:59

None of these appear to refer to the static spawn.
fairiestoy wrote:I suggest you dig through this here:
Multispawn
Use this mod as it is, or just extract the spawn/teleport part of it
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Thu Nov 07, 2013 03:38

paramat wrote:Once i get my mits on 0.4.8 stable how do i make "air" nodes drownable, for my space mods, is it even possible?

The answer it seems is yes, "air" can be redefined in lua and made drownable.
"air" is a node defined in 'builtin/misc_register.lua' https://github.com/minetest/minetest/blob/master/builtin/misc_register.lua#L276
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
fairiestoy
Member
 
Posts: 191
Joined: Sun Jun 09, 2013 19:25

by fairiestoy » Thu Nov 07, 2013 07:52

wcwyes wrote:None of these appear to refer to the static spawn.
fairiestoy wrote:I suggest you dig through this here:
Multispawn
Use this mod as it is, or just extract the spawn/teleport part of it


And again i suggest to use google. If you google 'minetest static spawn', you get enough answers ( i prefer the second link, is more up to date ). Question is: Are you talking about the spawn set in config: Use minetest.setting_get ( or so ) from the API to get the value and let the user spawn there. Otherwise use the mod i linked as reference to set your own spawn point.
Interesting about new things is, to figure out how it works ...
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Sat Nov 09, 2013 07:19

fairiestoy wrote:
wcwyes wrote:None of these appear to refer to the static spawn.
fairiestoy wrote:I suggest you dig through this here:
Multispawn
Use this mod as it is, or just extract the spawn/teleport part of it


And again i suggest to use google. If you google 'minetest static spawn', you get enough answers ( i prefer the second link, is more up to date ). Question is: Are you talking about the spawn set in config: Use minetest.setting_get ( or so ) from the API to get the value and let the user spawn there. Otherwise use the mod i linked as reference to set your own spawn point.

It says setpos expects a table. not a string
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
minetest.register_chatcommand("spawn",
{
    params = "",
    description = "Causes you to die and respawn",
    func = function(name, pos)
        local spawn_point = minetest.setting_get("static_spawnpoint")
        local player = minetest.env:get_player_by_name(name)
        player:setpos(spawn_point);
    end
})
Last edited by wcwyes on Sat Nov 09, 2013 07:40, edited 1 time in total.
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Sat Nov 09, 2013 07:29

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
minetest.register_chatcommand("spawn", {
    params = "",
    description = "Return to spawn",
    func = function(name)
        local spawn_point = minetest.string_to_pos(minetest.setting_get("static_spawnpoint") or "0,0,0")
        local player = minetest.get_player_by_name(name)
        player:setpos(spawn_point);
    end
})
Last edited by kaeza on Sat Nov 09, 2013 07:30, edited 1 time in total.
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 | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Sat Nov 09, 2013 08:05

kaeza wrote:
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
minetest.register_chatcommand("spawn", {
    params = "",
    description = "Return to spawn",
    func = function(name)
        local spawn_point = minetest.string_to_pos(minetest.setting_get("static_spawnpoint") or "0,0,0")
        local player = minetest.get_player_by_name(name)
        player:setpos(spawn_point);
    end
})
thanks
 

User avatar
Neon
Member
 
Posts: 119
Joined: Thu Aug 15, 2013 02:03
In-game: Neon

by Neon » Sat Nov 09, 2013 14:15

There has got to be a faster way to substitute one node for another on a massive scale during mapgen..
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
locations = minetest.find_nodes_in_area(minp, maxp, sand_nodes)
for k,v in ipairs(locations) do
minetest.set_node( v, {name=sand_replacement_node} )
end

This slows mapgen waaaay down. is there a better way to do this?
 

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

by Casimir » Sat Nov 09, 2013 16:31

LuaVoxelManipulator?
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron