Post your modding questions here

Locked
User avatar
pandaro
Member
Posts: 323
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro
Location: behind

by pandaro » Post

In which folder is stored the starry sky of minetest?
sorry for bad english
Linux debian 7 wheezy 64
kde

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

by PilzAdam » Post

pandaro wrote:In which folder is stored the starry sky of minetest?
Its not stored anywhere, its generated at runtime.

User avatar
pandaro
Member
Posts: 323
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro
Location: behind

by pandaro » Post

I think about the possibility of creating a starry sky always the same, that would enable the player to navigate at night using the stars.
It would be possible at least in theory?
sorry for bad english
Linux debian 7 wheezy 64
kde

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

by paramat » Post

Hi, i searched but no success ... how would i control the order of execution of 'on generated' functions in various mods? ... dependancies maybe?

User avatar
qwrwed
Member
Posts: 325
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Post

How do I use add_node or set_node to create other nodes? i am making a plasma screen TV mod which has 6 nodes, arranged like this:
1 2 3
4 5 6
5 is the node that is placed, and when the player places it the other 5 nodes should generate. However, I don't know how to do this, and looking in the code for the stargate mod, doors mod and beds mod did not help - the first two were more complicated, and I don't even know where I'm going wrong using code from beds, so I would like to start from scratch.

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

webdesigner97 wrote:If you need your manually placed node to facedir, make sure to add param2 to the node:

Code: Select all

    after_place_node = function(pos,placer,itemstack)
        --Don't forget to modify the <pos> table
        minetest.set_node(pos,{name="bla", param2=minetest.dir_to_facedir(placer:get_look_dir())})
    end
And for changing pictures: Why not use a texture animation?

User avatar
dannydanger
Member
Posts: 40
Joined: Mon May 06, 2013 23:55

by dannydanger » Post

how do you make terracotta roof tile

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

by Topywo » Post

dannydanger wrote:how do you make terracotta roof tile
You mean the one from VanessaE's homedecor? -->

http://minetest-home-decor.wikia.com/wi ... Decor_Wiki

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

by Casimir » Post

Code: Select all

    on_rightclick = function(pos, node, clicker)
        local inv = clicker:get_inventory()
        if inv:room_for_item("main", {name="flowers:pot", count=1, wear=0, metadata=""}) then
            node.name = "flowers:dandelion_white"
            minetest.env:set_node(pos, node)
            minetest.sound_play("default_dug_node", {pos,gain = 1.0})
            inv:add_item("main", "flowers:pot")
        end
    end,
Everything works, except adding the item. It is added when there is already a stack of flowers:pot in the inventory, but not when there is non.

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

Casimir wrote:

Code: Select all

    on_rightclick = function(pos, node, clicker)
        local inv = clicker:get_inventory()
        if inv:room_for_item("main", {name="flowers:pot", count=1, wear=0, metadata=""}) then
            node.name = "flowers:dandelion_white"
            minetest.env:set_node(pos, node)
            minetest.sound_play("default_dug_node", {pos,gain = 1.0})
            inv:add_item("main", "flowers:pot")
        end
    end,
Everything works, except adding the item. It is added when there is already a stack of flowers:pot in the inventory, but not when there is non.
have you tried removing 'wear=0' from the room_for_item() call? It sounds silly, but 'wear' should only be set on tools (note that '0' is neither nil, nor a "false" boolean value).
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
Casimir
Member
Posts: 1189
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Post

Setting the node and playing sound is working, so that's not the problem.

At the moment I have a much bigger one: I moved a mod into another folder, because I wanted to publish it. Using strg-x and strg-v and then is just disappeared :(
Is is Mint, is it Thunar or is it me who has done something wrong? (Yes, I should have made backups.)
It might be to late at night - I'm very confused - in the game everything still works but the mod-folder is nowhere.
Last edited by Casimir on Mon Jul 29, 2013 02:42, edited 1 time in total.

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

by fairiestoy » Post

Hello guys,

is it possible to access the tiles that were used on minetest.register_node( <parameters> ) ? I found param1 & param2 as well as the name, but no way to find the registered image files used for that specific tile. Is that somehow possible?
(If i missed something really obvious, sorry for that :-/ )

Greetings
Interesting about new things is, to figure out how it works ...

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

by Casimir » Post

I don't understand what you mean but this might help: https://github.com/minetest/minetest/bl ... .txt#L1956
Do you want to change the texture of a node (like stone and desertstone) or the way it is displayed (like papyrus/stone/torch/sign/rail...)?

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

by derpswa99 » Post

Is there any way someone can port minetest to a ps3?

User avatar
Calinou
Moderator
Posts: 3166
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

derpswa99 wrote:Is there any way someone can port minetest to a ps3?
No.

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

fairiestoy wrote:Hello guys,

is it possible to access the tiles that were used on minetest.register_node( <parameters> ) ? I found param1 & param2 as well as the name, but no way to find the registered image files used for that specific tile. Is that somehow possible?
(If i missed something really obvious, sorry for that :-/ )

Greetings

Code: Select all

local first_tile = minetest.registered_nodes["default:wood"].tiles[1]
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
fairiestoy
Member
Posts: 191
Joined: Sun Jun 09, 2013 19:25
Location: Germany

by fairiestoy » Post

kaeza wrote:

Code: Select all

local first_tile = minetest.registered_nodes["default:wood"].tiles[1]
Thanks kaeza. Thats exactly what im looking for :3

Casimir wrote:I don't understand what you mean but this might help: https://github.com/minetest/minetest/bl ... .txt#L1956
Do you want to change the texture of a node (like stone and desertstone) or the way it is displayed (like papyrus/stone/torch/sign/rail...)?
I dont want to change it. I need the references to see, if i can create a way of changing the appearance of a node ( with use of a dummy node ) especially its mesh in a way that is not dependent on hard coded links to other mods. As example:
The stairpick mod uses references to the stairsplus stairs. So it looks up the fitting stairs out of this mod in order to replace the node you are pointing to and replace it with the stair.
BUT if you are capable of accessing the tiles of a registered node, you could create a stairpick (as example) that uses no references to other mods. Instead it uses a dummy model of a mesh (also an example) and assigns the texture of the node you were pointing to in the first place.

I hope this will work ( up to now its only a idea)
Interesting about new things is, to figure out how it works ...

User avatar
Exilyth
Member
Posts: 73
Joined: Sun Jul 28, 2013 18:46
Location: Earth

by Exilyth » Post

How do you use the facedir param (param2) of nodes? E.g. how do you make the facedir of a node depend on where the player looked when it is placed?
I'm running 0.4.13 stable with [technic][carts][farming_plus][biome_lib][unified_inventory] and a few other mods.

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

Exilyth wrote:How do you use the facedir param (param2) of nodes? E.g. how do you make the facedir of a node depend on where the player looked when it is placed?
To make a node have facedir:

Code: Select all

paramtype2 = "facedir",
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.

User avatar
Exilyth
Member
Posts: 73
Joined: Sun Jul 28, 2013 18:46
Location: Earth

by Exilyth » Post

Dan Duncombe wrote:
Exilyth wrote:How do you use the facedir param (param2) of nodes? E.g. how do you make the facedir of a node depend on where the player looked when it is placed?
To make a node have facedir:

Code: Select all

paramtype2 = "facedir",
D'oh.
I looked up the paramtype2 line of my node definition in my code again and saw this...

Code: Select all

          sounds = default.node_sound_wood_defaults(),
      paramtype = "light",
      paramtype2 == "facedir",
      on_construct = function(pos)
      ....
Obviosly, that comparision doesn't make for a proper paramtype ;)
I fixed that line, now it works like a charm.
I'm running 0.4.13 stable with [technic][carts][farming_plus][biome_lib][unified_inventory] and a few other mods.

User avatar
deivan
Member
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Post

I have a small problem. How I drop a quarter block over a fluid? In the horizontal. Have a short cut or hot key to it?

User avatar
Exilyth
Member
Posts: 73
Joined: Sun Jul 28, 2013 18:46
Location: Earth

by Exilyth » Post

I have a node with paramtype2 = "facedir" and an abm which gets called on that node.


Why does

Code: Select all

local direction = minetest:facedir_to_dir(minetest.env:get_node(pos).param2)
give me an error saying the method facedir_to_dir is a nil value?


Why does

Code: Select all

local direction = minetest.facedir_to_dir(minetest.env:get_node(pos).param2)
give me an error saying the field facedir_to_dir is a nil value?


How are you supposed to call facedir_to_dir then?
(I'm using 0.4.7 stable btw)
I'm running 0.4.13 stable with [technic][carts][farming_plus][biome_lib][unified_inventory] and a few other mods.

User avatar
deivan
Member
Posts: 452
Joined: Fri Feb 15, 2013 10:16
Location: Brazil. :D

by deivan » Post

Try remove the "local" word and test again. If I remember correctly the local cause some trouble some times.

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

by LionsDen » Post

Here's a question, is there a command or way to change the textures on a node that has been placed into the world? For instance I have a node and I place it in the world. I then punch the node and have some lua code run but I would like to change the texture on the node. I already replace the original node with a new one but I have 8 textures to run through and I would rather not create a new node for each texture and replace each one with the new one every time. A simple command to change the texture is what I would really like. I have done searches but haven't found anything.

User avatar
miner
New member
Posts: 2
Joined: Tue May 28, 2013 17:41

by miner » Post

I've been trying to make a server how in the world do I?
ive already made one but its not working nobody gets on is it
working? anyway plz help.

Locked

Who is online

Users browsing this forum: Bing [Bot] and 2 guests