Post your modding questions here

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

by Topywo » Post

wcwyes wrote:where is the register chat command spawn?
Under:
minetest/builtin/chatcommands.lua

(search for spawn)

Code: Select all

minetest.register_chatcommand("spawnentity", {
    params = "<entityname>",
    description = "spawn entity at your position",
    privs = {give=true, interact=true},
    func = function(name, param)
        local entityname = string.match(param, "(.+)$")
        if not entityname then
            minetest.chat_send_player(name, "entityname required")
            return
        end
        print('/spawnentity invoked, entityname="'..entityname..'"')
        local player = minetest.get_player_by_name(name)
        if player == nil then
            print("Unable to spawn entity, player is nil")
            return true -- Handled chat message
        end
        local p = player:getpos()
        p.y = p.y + 1
        minetest.add_entity(p, entityname)
        minetest.chat_send_player(name, '"'..entityname
                ..'" spawned.');
    end,
})

User avatar
Element
Member
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962
Location: New York
Contact:

by Element » Post

how do i put a folder in a reply box
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9

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

by Chinchow » Post

Does anyone know how to set up schematics?
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests

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

by wcwyes » Post

It appears that chatcommands.lua only has /spawnentity, I'm looking for /spawn it should look like

Code: Select all

minetest.register_chatcommand("spawn"
Topywo wrote:
wcwyes wrote:where is the register chat command spawn?
Under:
minetest/builtin/chatcommands.lua

(search for spawn)

Code: Select all

minetest.register_chatcommand("spawnentity", {
    params = "<entityname>",
    description = "spawn entity at your position",
    privs = {give=true, interact=true},
    func = function(name, param)
        local entityname = string.match(param, "(.+)$")
        if not entityname then
            minetest.chat_send_player(name, "entityname required")
            return
        end
        print('/spawnentity invoked, entityname="'..entityname..'"')
        local player = minetest.get_player_by_name(name)
        if player == nil then
            print("Unable to spawn entity, player is nil")
            return true -- Handled chat message
        end
        local p = player:getpos()
        p.y = p.y + 1
        minetest.add_entity(p, entityname)
        minetest.chat_send_player(name, '"'..entityname
                ..'" spawned.');
    end,
})

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

by fairiestoy » Post

Spawn is afaik a self-written mod. if you just start a singleplayer world, /spawn shouldn't be available ( at least on my 0.4.7+ versions ). If you want some spawn commands, search the forum by using the search tool respectively.
Here is an example i know from BrandonReese: Custom Spawn points. It works different, but should give you a good feeling. And next time:
Hell use the search tool in the top bar(!)
Last edited by fairiestoy on Fri Oct 25, 2013 16:45, edited 1 time in total.
Interesting about new things is, to figure out how it works ...

User avatar
BrunoMine
Member
Posts: 1074
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

by BrunoMine » Post

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
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

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

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

by Chinchow » Post

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
Location: (secret)

by Ikishida » Post

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
Location: In the unknown depths of Earth

by Dan Duncombe » Post

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
Location: Germany

by fairiestoy » Post

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: 684
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Post

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: 4170
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

by Sokomine » Post

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:

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: 684
Joined: Tue Sep 18, 2012 21:37

by Chinchow » Post

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: 186
Joined: Sun Aug 12, 2012 14:19
In-game: derplez or BlockFrog
Location: a shed in the desert

by durtective6 » Post

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.
I'm still here, last time I checked at least.

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

by LionsDen » Post

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: 186
Joined: Sun Aug 12, 2012 14:19
In-game: derplez or BlockFrog
Location: a shed in the desert

by durtective6 » Post

i have but have had no luck, ive also looked at this 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.
I'm still here, last time I checked at least.

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

by wcwyes » Post

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 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: 530
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Post

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: 186
Joined: Sun Aug 12, 2012 14:19
In-game: derplez or BlockFrog
Location: a shed in the desert

by durtective6 » Post

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?
I'm still here, last time I checked at least.

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

by LionsDen » Post

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.

User avatar
leetelate
Member
Posts: 205
Joined: Thu Aug 29, 2013 18:07
Location: 한인 타운, Huntsville,Alabama,USA

by leetelate » Post

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

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

by paramat » Post

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 for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

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

by paramat » Post

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 for basic income. PayPal viewtopic.php?f=3&t=14935 Patreon https://www.patreon.com/paramat

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

by Chinchow » Post

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

Locked

Who is online

Users browsing this forum: No registered users and 2 guests