Post your modding questions here

gamergardencat
Member
 
Posts: 55
Joined: Wed Oct 01, 2014 11:58

Re: Post your modding questions here

by gamergardencat » Tue Oct 21, 2014 00:12

Thanks kaeza, I will try that out.

pixelface [Mod] Technic [0.4.10] [technic] viewtopic.php?id=2538 has a node detector.

Xenon, something like?
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_craft({
   output = 'mochathicket:mocha_mixedsandstone_ladder 7',
   recipe = {
      {'mochathicket:mocha_mixedsandstone_block', '', 'mochathicket:mocha_mixedsandstone_block'},
      {'mochathicket:mocha_mixedsandstone_block', 'mochathicket:mocha_mixedsandstone_block', 'mochathicket:mocha_mixedsandstone_block'},
      {'mochathicket:mocha_mixedsandstone_block', '', 'mochathicket:mocha_mixedsandstone_block'},
   }
})
superman slices a giant apple into 3 and hands it to guest220
 

Xenon
New member
 
Posts: 7
Joined: Mon Oct 13, 2014 17:55

Re: Post your modding questions here

by Xenon » Tue Oct 21, 2014 01:00

No I meant like there's smelting, crafting, fuel, so how would you add a new type?
 

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

Re: Post your modding questions here

by kaeza » Tue Oct 21, 2014 01:04

Xenon wrote:No I meant like there's smelting, crafting, fuel, so how would you add a new type?

Technic mod has such a feature. Here's how the mod does it.

EDIT: The code is used by e.g. alloy furnaces.
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
Esteban
Member
 
Posts: 872
Joined: Sun Sep 08, 2013 13:26
GitHub: Esteban-
IRC: Esteban
In-game: Esteban

Re: Post your modding questions here

by Esteban » Wed Oct 22, 2014 18:24

Does anyone have a simple code for an item that "on_punch" plays a sound(universally, that can everyone hear)?
This is the last thing I am missing to finish my Five Nights At Freddy's Map. Thanks in advance.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Post your modding questions here

by Nathan.S » Wed Oct 22, 2014 22:04

I'm messing around with the new 3d nodes, and I'm wondering if I can use sprite sheets to do animated textures. I tried to do some searching online, but couldn't find anything. I that I can have animated textures in Blender, but I don't know how I would set them up in the lua file.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Post your modding questions here

by twoelk » Wed Oct 22, 2014 22:09

maybe studying the furnace way of doing it?
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Post your modding questions here

by Nathan.S » Wed Oct 22, 2014 23:08

twoelk wrote:maybe studying the furnace way of doing it?

The furnace isn't an actual 3d mesh, just a node. I'm dealing with a campfire I have mesh logs, and then want to have some flames, just three planes that intersect through each other, that show an animated flame. I'll probably look into the furnace anyways, but I don't think that going to help me.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Post your modding questions here

by twoelk » Wed Oct 22, 2014 23:54

uh? plantlike (like fire) ontop of mesh?
maybe the large windmills by sokomine then or the ventilators in home_decor?
might want to ask Jordach or VanessaE.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Post your modding questions here

by Nathan.S » Thu Oct 23, 2014 00:47

That wouldn't be a bad idea. I had the campfire just acting like the grass, but now I have mesh logs. I will look into some of the other mods, and if I can't figure it out I'll ask one of the gurus.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Post your modding questions here

by twoelk » Thu Oct 23, 2014 01:34

actually an easy way might be to use the node above the logs for the fire and just offset that a little down to appear on the logs. You would use two nodes this way but I guess the node 1m above a campfire shouldn't be obstructing the smoke anyway ;-). Can't remember the mod that did something like that though.
 

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

Re: Post your modding questions here

by kaeza » Thu Oct 23, 2014 01:58

I don't know if it would work, but AFAIK, you can use several textures for one mesh. You could specify the first texture as the logs, and a second (animated) texture for the flames. Though it isn't the same, some player modifying mod (I think it was stu's 3darmor) allowed using e.g. the first texture for the normal skin, and a second one for the "armor" overlay. Maybe he could help you with that?

twoelk wrote:Can't remember the mod that did something like that though.

sea modpack did something like that for some nodes IIRC.
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
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Post your modding questions here

by kaeza » Thu Oct 23, 2014 02:02

Esteban wrote:Does anyone have a simple code for an item that "on_punch" plays a sound(universally, that can everyone hear)?
This is the last thing I am missing to finish my Five Nights At Freddy's Map. Thanks in advance.

Did you already try something like this? (honest question)
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_node("foo:bar", {
  -- ...
  on_punch = function(...)
    minetest.sound_play({name="foo_bar"})
  end,
})
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
Esteban
Member
 
Posts: 872
Joined: Sun Sep 08, 2013 13:26
GitHub: Esteban-
IRC: Esteban
In-game: Esteban

Re: Post your modding questions here

by Esteban » Thu Oct 23, 2014 02:53

kaeza wrote:
Esteban wrote:Does anyone have a simple code for an item that "on_punch" plays a sound(universally, that can everyone hear)?
This is the last thing I am missing to finish my Five Nights At Freddy's Map. Thanks in advance.

Did you already try something like this? (honest question)
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_node("foo:bar", {
  -- ...
  on_punch = function(...)
    minetest.sound_play({name="foo_bar"})
  end,
})


(I haven't tried it before, I was busy with some home, sorry :P)

Thanks! I actually just needed to know where to place it, which is what you just did. I read before about "minetest.sound_play", but I was unsure of how it was used (what was the proper spacing from the margin, I use wordpad to edit Lua).
 

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

Re: Post your modding questions here

by Topywo » Thu Oct 23, 2014 07:51

kaeza wrote:sea modpack did something like that for some nodes IIRC.


Screenshot:
viewtopic.php?p=92369#p92369

Alternative Sokomine (last big paragraph):
viewtopic.php?p=101965#p101965

Working links to 0.2.1 in Hampa16's post:
viewtopic.php?p=107218#p107218


This method is not longer used for the sea modpack (iirc since 0.3.0), because it seemed to cause a lot of lag (over time).


Edit: Better screenshot through Hampa's post linking to my dropbox:
https://dl.dropboxusercontent.com/u/654 ... _scrot.png
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Post your modding questions here

by Hybrid Dog » Thu Oct 23, 2014 12:17

 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Post your modding questions here

by Nathan.S » Sat Oct 25, 2014 22:40

Hi again, does anybody know how to setup sound for a node. I have a campfire and I want it to have a burning sound. I've looked at everything in the wiki and can't figure it out. I was able to get the fire to have sound, but it only was activated when you placed the node, so loading worlds lost all the sound, and then the sound kept playing even after the node was destroyed. I tried using the sound_stop but that always threw up a fatal error and crashed the world.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

benedict424
Member
 
Posts: 28
Joined: Thu Oct 02, 2014 06:24
IRC: ozwald
In-game: arimeikata

Re: Post your modding questions here

by benedict424 » Mon Oct 27, 2014 09:06

How would I go about making a copy of a furnace with it's own recipes?

Reason: I'm making an alchemy furnace.
Who said that there are only four elements? I have Terra, Aqua, Ignus, Air, Ather, and Incognitus.
 

benedict424
Member
 
Posts: 28
Joined: Thu Oct 02, 2014 06:24
IRC: ozwald
In-game: arimeikata

Re: Post your modding questions here

by benedict424 » Tue Oct 28, 2014 19:56

What would be a good name for an element themed magic mod?
Who said that there are only four elements? I have Terra, Aqua, Ignus, Air, Ather, and Incognitus.
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: Post your modding questions here

by philipbenr » Tue Oct 28, 2014 21:27

modname: magichem
Name: Magichem: elemental magic
 

benedict424
Member
 
Posts: 28
Joined: Thu Oct 02, 2014 06:24
IRC: ozwald
In-game: arimeikata

Re: Post your modding questions here

by benedict424 » Tue Oct 28, 2014 23:40

philipbenr wrote:modname: magichem
Name: Magichem: elemental magic


I meant Air, Ingnus, Aqua, Terra as elements.
Who said that there are only four elements? I have Terra, Aqua, Ignus, Air, Ather, and Incognitus.
 

User avatar
hunterdelyx1
Member
 
Posts: 27
Joined: Fri Aug 10, 2012 02:14

Re: Post your modding questions here

by hunterdelyx1 » Wed Oct 29, 2014 00:07

*deleted*
 

User avatar
Esteban
Member
 
Posts: 872
Joined: Sun Sep 08, 2013 13:26
GitHub: Esteban-
IRC: Esteban
In-game: Esteban

Re: Post your modding questions here

by Esteban » Wed Oct 29, 2014 00:34

benedict424 wrote:
philipbenr wrote:modname: magichem
Name: Magichem: elemental magic


I meant Air, Ingnus, Aqua, Terra as elements.


What do you think about the name "Aether"?

Aristotle proposed a fifth element, aether, in addition to the four proposed earlier by Empedocles.

Earth, which is cold and dry; this corresponds to the modern idea of a solid.
Water, which is cold and wet; this corresponds to the modern idea of a liquid.
Air, which is hot and wet; this corresponds to the modern idea of a gas.
Fire, which is hot and dry; this corresponds to the modern ideas of plasma and heat.
Aether, which is the divine substance that makes up the heavenly spheres and heavenly bodies (stars and planets).

Each of the four earthly elements has its natural place. All that is earthly tends toward the center of the universe, i.e., the center of the Earth. Water tends toward a sphere surrounding the center. Air tends toward a sphere surrounding the water sphere. Fire tends toward the lunar sphere (in which the Moon orbits). When elements are moved out of their natural place, they naturally move back towards it. This is "natural motion"—motion requiring no extrinsic cause. So, for example, in water, earthy bodies sink while air bubbles rise up; in air, rain falls and flame rises.
 

benedict424
Member
 
Posts: 28
Joined: Thu Oct 02, 2014 06:24
IRC: ozwald
In-game: arimeikata

Re: Post your modding questions here

by benedict424 » Wed Oct 29, 2014 01:02

Esteban wrote:
benedict424 wrote:
philipbenr wrote:modname: magichem
Name: Magichem: elemental magic


I meant Air, Ingnus, Aqua, Terra as elements.


What do you think about the name "Aether"?

Aristotle proposed a fifth element, aether, in addition to the four proposed earlier by Empedocles.

Earth, which is cold and dry; this corresponds to the modern idea of a solid.
Water, which is cold and wet; this corresponds to the modern idea of a liquid.
Air, which is hot and wet; this corresponds to the modern idea of a gas.
Fire, which is hot and dry; this corresponds to the modern ideas of plasma and heat.
Aether, which is the divine substance that makes up the heavenly spheres and heavenly bodies (stars and planets).

Each of the four earthly elements has its natural place. All that is earthly tends toward the center of the universe, i.e., the center of the Earth. Water tends toward a sphere surrounding the center. Air tends toward a sphere surrounding the water sphere. Fire tends toward the lunar sphere (in which the Moon orbits). When elements are moved out of their natural place, they naturally move back towards it. This is "natural motion"—motion requiring no extrinsic cause. So, for example, in water, earthy bodies sink while air bubbles rise up; in air, rain falls and flame rises.



For now, the 5th element is called Incognitus, but that's a great idea!
Who said that there are only four elements? I have Terra, Aqua, Ignus, Air, Ather, and Incognitus.
 

User avatar
hunterdelyx1
Member
 
Posts: 27
Joined: Fri Aug 10, 2012 02:14

Re: Post your modding questions here

by hunterdelyx1 » Thu Oct 30, 2014 02:47

Hello! For some reason string.char() takes "|" in regexp as char. So i can't realize alternative choosing in capturing group. Is there way to fix it?
 

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

Re: Post your modding questions here

by kaeza » Thu Oct 30, 2014 10:22

hunterdelyx1 wrote:Hello! For some reason string.char() takes "|" in regexp as char. So i can't realize alternative choosing in capturing group. Is there way to fix it?

I think you mean `string.match` (or `string.gsub`).

Unfortunately, no. Regexp support in Lua is pretty limited. If you need more comprehensive support, you will need an external library.
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
Esteban
Member
 
Posts: 872
Joined: Sun Sep 08, 2013 13:26
GitHub: Esteban-
IRC: Esteban
In-game: Esteban

Re: Post your modding questions here

by Esteban » Thu Oct 30, 2014 13:18

I have a doubt, does mods like pipeworks/technic work fine in multiplayer? Or they can cause lag? Im trying to make a subgame and I want to add technology, but I want that the game can be used in a server. Finally, if these are too much for a multiplayer game, is there other options out there?
Thanks in advance

EDIT: oops, this question is supposed to be on modding requests, sorry.
Last edited by Esteban on Thu Oct 30, 2014 15:08, edited 1 time in total.
 

User avatar
hunterdelyx1
Member
 
Posts: 27
Joined: Fri Aug 10, 2012 02:14

Re: Post your modding questions here

by hunterdelyx1 » Thu Oct 30, 2014 14:59

kaeza wrote:
hunterdelyx1 wrote:Hello! For some reason string.char() takes "|" in regexp as char. So i can't realize alternative choosing in capturing group. Is there way to fix it?

I think you mean `string.match` (or `string.gsub`).

Unfortunately, no. Regexp support in Lua is pretty limited. If you need more comprehensive support, you will need an external library.

Oh. Yeah. Right. string.match. It's pity to hear thant. But thanks for answering.
 

benedict424
Member
 
Posts: 28
Joined: Thu Oct 02, 2014 06:24
IRC: ozwald
In-game: arimeikata

a nil value on players

by benedict424 » Fri Oct 31, 2014 04:17

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_tool("alchemtinker:light_wand", {
    description = "light_wand",
    inventory_image = "tinker_light_wand.png",

   on_use = function(itemstack, user, pointed_thing)
      local playerpos = minetest.player:getpos()
      itemstack:add_wear(1) -- To do: Look up how the hech this thing works.
      minetest.place_node({playerpos}, {name="alchemtinker:light_node"})
      return itemstack
      end
})


Why is this code bringing up this error:

21:14:45: ERROR[main]: ServerError: /home/jack/.minetest/mods/alchemtinker/spells.lua:22: attempt to index field 'player' (a nil value)


This code should place a node right where you stand, but instead it crashes.
Who said that there are only four elements? I have Terra, Aqua, Ignus, Air, Ather, and Incognitus.
 

benedict424
Member
 
Posts: 28
Joined: Thu Oct 02, 2014 06:24
IRC: ozwald
In-game: arimeikata

Re: Post your modding questions here

by benedict424 » Fri Oct 31, 2014 04:19

Esteban wrote:I have a doubt, does mods like pipeworks/technic work fine in multiplayer? Or they can cause lag? Im trying to make a subgame and I want to add technology, but I want that the game can be used in a server. Finally, if these are too much for a multiplayer game, is there other options out there?
Thanks in advance

EDIT: oops, this question is supposed to be on modding requests, sorry.


This works fine in multi-player. I've been on servers where I was suppose to test this, the contraptions break if they cause too much lag.
Who said that there are only four elements? I have Terra, Aqua, Ignus, Air, Ather, and Incognitus.
 

User avatar
Esteban
Member
 
Posts: 872
Joined: Sun Sep 08, 2013 13:26
GitHub: Esteban-
IRC: Esteban
In-game: Esteban

Re: Post your modding questions here

by Esteban » Fri Oct 31, 2014 12:17

benedict424 wrote:
Esteban wrote:I have a doubt, does mods like pipeworks/technic work fine in multiplayer? Or they can cause lag? Im trying to make a subgame and I want to add technology, but I want that the game can be used in a server. Finally, if these are too much for a multiplayer game, is there other options out there?
Thanks in advance

EDIT: oops, this question is supposed to be on modding requests, sorry.


This works fine in multi-player. I've been on servers where I was suppose to test this, the contraptions break if they cause too much lag.


Thanks for clarifying! Anyways, I will use a simpler version known as Itest for the subgame, I will try to add missing textures and fork it to work with the industry pack. I got to say technic is awesome, but each time I try to make a simple machine (solar panel - wire - battery) It does not work. Prob I am missing a component since I made sure everything was using the same V.
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 60 guests

cron