Post your modding questions here

Locked
User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

AMMOnym wrote:How i can make throwing (like throwing mod) from block, then i punch block and block throw something.??:_?:?
Do you expect someone to write the mod for you? Get started and post any questions you have.
Back from the dead!

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

by Krock » Post

I've another problem, when use "allow_metadata_inventory_put" and "allow_metadata_inventory_take", then I can't get the new stack-informations, it will always show up the previous stack.
How can I solve this? I've found the circular saw codes, which do parts of what I try to do, but those code aren't easy to understand :/

EDIT: solved myself...
Last edited by Krock on Sat Nov 30, 2013 09:24, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
addi
Member
Posts: 665
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

by addi » Post

how must i set up the particle spawner to add particles like this:
Image

Code: Select all

minetest.add_particlespawner(amount, time,
    minpos, maxpos,
    minvel, maxvel,
    minacc, maxacc,
    minexptime, maxexptime,
    minsize, maxsize,
    collisiondetection, texture, playername)

User avatar
Casimir
Member
Posts: 1189
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Post

Can someone make a tutorial on how to use particles/the particle spawner? The api txt is just confusing me.
Last edited by Casimir on Sun Dec 01, 2013 01:18, edited 1 time in total.

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

by PilzAdam » Post

Casimir wrote:Can someone make a tutorial on how to use particles/the particle spawner? The api txt is just confusing me.
I personally dont think its confusing... could you tell me your problems with it, so it would be easier to write the tutorial?

User avatar
D0431791
Member
Posts: 19
Joined: Wed Nov 06, 2013 11:43

by D0431791 » Post

Topic: When Minetest allows custom crafting type?
Reason: I want to make a machine that works like the furnaces cooking/smelting but with different output.
More Info(optional):
Image
Transparent woods and bricks
Last edited by D0431791 on Sun Dec 01, 2013 02:11, edited 1 time in total.
Minetest can be better if
*better data structure for players and unstackable items like JSON
*multi sqlite files so that multi dimension can be easily implemented
*more convenient mob developing interface

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

by PilzAdam » Post

D0431791 wrote:Topic: When Minetest allows custom crafting type?
Reason: I want to make a machine that works like the furnaces cooking/smelting but with different output.
More Info(optional):
http://img716.imageshack.us/img716/5364/pwcl.png
Transparent woods and bricks
Just define your own get_craft_result() and register_craft() functions.

User avatar
addi
Member
Posts: 665
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

by addi » Post

Hybrid Dog wrote:
addi wrote:how must i set up the particle spawner to add particles like this:
http://www.king-arthur.eu/gallery/image.php?album_id=2&image_id=138&mode=thumbnail

Code: Select all

minetest.add_particlespawner(amount, time,
    minpos, maxpos,
    minvel, maxvel,
    minacc, maxacc,
    minexptime, maxexptime,
    minsize, maxsize,
    collisiondetection, texture, playername)

Code: Select all

minetest.add_particlespawner(
        3, --amount
        0.1, --time
        pos, --minpos
        pos, --maxpos
        {x=0, y=3, z=0}, --minvel
        {x=0, y=4, z=0}, --maxvel
        {x=-4,y=-4,z=-4}, --minacc
        {x=4,y=-4,z=4}, --maxacc
        0.1, --minexptime
        1, --maxexptime
        2, --minsize
        8, --maxsize
        false, --collisiondetection
        "smoke_puff.png" --texture
    )
thanks that helped me a lot :)

User avatar
derpswa99
Member
Posts: 78
Joined: Sun Mar 24, 2013 21:26

by derpswa99 » Post

Can someone tell the correct furnace definition and what I can customize within the code. Also please don't link the development wiki because it honestly doesn't assist in any way especially with functions.

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

by wcwyes » Post

wcwyes wrote:How do I check for hostile mobs around me?
Can anyone help me?

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

by Krock » Post

derpswa99 wrote:Can someone tell the correct furnace definition and what I can customize within the code. Also please don't link the development wiki because it honestly doesn't assist in any way especially with functions.
the name of it is: default:furnace
All nodes/blocks/cubes acn you find in the folder games\Minetest_game\mods\default\ (nodes.lua?)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
derpswa99
Member
Posts: 78
Joined: Sun Mar 24, 2013 21:26

by derpswa99 » Post

Krock wrote:
derpswa99 wrote:Can someone tell the correct furnace definition and what I can customize within the code. Also please don't link the development wiki because it honestly doesn't assist in any way especially with functions.
the name of it is: default:furnace
All nodes/blocks/cubes acn you find in the folder games\Minetest_game\mods\default\ (nodes.lua?)
How does this help at all! I am attempting to create my own furnace but I want to know how the functions and formspec coincide with each other and what I can tailor to create my very own furnace.

User avatar
Casimir
Member
Posts: 1189
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Post

wcwyes wrote:
wcwyes wrote:How do I check for hostile mobs around me?
Can anyone help me?
Get all entities in the area, compare the table with a table of all known hostile mobs (for ... do ...).
PilzAdam wrote:I personally dont think its confusing... could you tell me your problems with it, so it would be easier to write the tutorial?
I read it again, and now I understand. No problem.



Recently there where some commits about ground contend. In the lua_api.txt it says "is_ground_content = false, -- Currently not used for anything", so why the changes? Do modders have to care about that?

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

Hybrid Dog wrote:Could anyone tell me why my rocket bag doesn't work?
https://raw.github.com/HybridDog/extrab ... r/mvmt.lua
try replacing nil with 1
Coding;
1X coding
3X debugging
12X tweaking to be just right

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

by BrunoMine » Post

I created a mod. I used the following materials: "https://github.com/minetest/minetest/bl ... ua_api.txt".I used the "C + +"
My problem is that I do not know which license should I describe in my mod.
Someone tell me what I should by? do not quite understand it yet.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com

User avatar
addi
Member
Posts: 665
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

by addi » Post

brunob.santos wrote:I created a mod. I used the following materials: "https://github.com/minetest/minetest/bl ... ua_api.txt".I used the "C + +"
My problem is that I do not know which license should I describe in my mod.
Someone tell me what I should by? do not quite understand it yet.
on this page you can choose (create) ur own license http://creativecommons.org/choose/

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

by Sokomine » Post

brunob.santos wrote: My problem is that I do not know which license should I describe in my mod.
Do you have any special wishes regarding your license? If you want your mod to be moved to mod releases, it has to be an open license that allows much. I personally prefer the GPLv3, but there can be almost "wars" over which license is best. Some people also love to use WTFPL.
addi wrote: on this page you can choose (create) ur own license http://creativecommons.org/choose/
The CC licenses IMHO are less well suited for code. They aim at other creative work like images, texts, animations etc.
A list of my mods can be found here.

User avatar
webdesigner97
Member
Posts: 1327
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
Location: Cologne, Germany
Contact:

by webdesigner97 » Post

How can I make sure that a certain piece of code gets executed when ALL nodes of ALL mods are registered?

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

by BrunoMine » Post

I really do not understand how will the license. I created the mod and just want everyone to use it. I post the forum "Modding Geral"?
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com

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

by philipbenr » Post

brunob.santos wrote:I really do not understand how will the license. I created the mod and just want everyone to use it. I post the forum "Modding Geral"?
Okay. If you want everyone to be able to use, edit and distribute the mod, then use GPLv3. If you want any other license, you might try LGPL or some other one. CC licenses aren't really for code...

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

by BrunoMine » Post

philipbenr wrote: Okay. If you want everyone to be able to use, edit and distribute the mod, then use GPLv3. If you want any other license, you might try LGPL or some other one. CC licenses aren't really for code...
Yes!
Get to work!
:D
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com

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

by Krock » Post

Topic: Are things like this here possible? (A scrollbar in chests)
Image
Reason: Mods
More Info: Could be interesting to work with that
Last edited by Krock on Sun Dec 08, 2013 08:27, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Nightshade
Member
Posts: 25
Joined: Thu Oct 24, 2013 15:25

by Nightshade » Post

Ok, so I'm putting together a mod for personal use, and I added a food item. But on use of this food item, I want part of it to return back to the inventory (it's soda, I want an empty bottle back). I have no coding experience, so I'm just going on what I see in minetest_game mods and other mods. I have this...

Code: Select all

minetest.register_craftitem("morestuff:apple_soda", {
    description = "Apple Soda",
    inventory_image = "apple_soda.png",
    on_use = minetest.item_eat(3),
    replacements = { {"morestuff:apple_soda", "vessels:glass_bottle"} },
})
Can someone tell me where I'm going wrong?

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

by Krock » Post

Nightshade wrote:Ok, so I'm putting together a mod for personal use, and I added a food item. But on use of this food item, I want part of it to return back to the inventory (it's soda, I want an empty bottle back). I have no coding experience, so I'm just going on what I see in minetest_game mods and other mods. I have this...

Code: Select all

minetest.register_craftitem("morestuff:apple_soda", {
    description = "Apple Soda",
    inventory_image = "apple_soda.png",
    on_use = minetest.item_eat(3),
    replacements = { {"morestuff:apple_soda", "vessels:glass_bottle"} },
})
Can someone tell me where I'm going wrong?

Code: Select all

... replacements = { { ...
those are used in the crafting grid
Codes from moretree mod:

Code: Select all

-- Food recipes!

minetest.register_craftitem("moretrees:coconut_milk", {
    description = "Coconut Milk",
    inventory_image = "moretrees_coconut_milk_inv.png",
    wield_image = "moretrees_coconut_milk.png",
    on_use = minetest.item_eat(2),
})
More I can't help you, try and try, maybe you'll find a possible soulation :)

EDIT:
you could do it like the bucket mod: (modifed)

Code: Select all

on_use = function(itemstack, user, pointed_thing)
        -- Dig if pointed on node
        if pointed_thing.type == "node" then
            return
        end
        minetest.item_eat(3)
        return ItemStack({name = "vessels:glass_bottle"})
    end,
Last edited by Krock on Sun Dec 08, 2013 17:39, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Nightshade
Member
Posts: 25
Joined: Thu Oct 24, 2013 15:25

by Nightshade » Post

Krock wrote: EDIT:
you could do it like the bucket mod: (modifed)

Code: Select all

on_use = function(itemstack, user, pointed_thing)
        -- Dig if pointed on node
        if pointed_thing.type == "node" then
            return
        end
        minetest.item_eat(3)
        return ItemStack({name = "vessels:glass_bottle"})
    end,
This worked perfectly, thanks!

Locked

Who is online

Users browsing this forum: No registered users and 2 guests