Really? I thought that Lua was better than php.orwell wrote:This is because the type of player attributes is always "string", you can't save other type's values there
When setting the atttribute, the value is implicitly converted to a string
Fortunately, for Lua, the expression "1" is equal to 1 when doing maths, so "1"+"1" will result in 2
(as well as 1..2 results in "12")
Post your modding questions here
-
- Member
- Posts: 818
- Joined: Tue Apr 14, 2015 01:59
- GitHub: raymoo
- IRC: Hijiri
- In-game: Raymoo + Clownpiece
Re: Post your modding questions here
Every time a mod API is left undocumented, a koala dies.
- Casimir
- Member
- Posts: 1206
- Joined: Fri Aug 03, 2012 16:59
- GitHub: CasimirKaPazi
Re: Post your modding questions here
Well... good to know.orwell wrote:This is because the type of player attributes is always "string", you can't save other type's values there
Re: Post your modding questions here
How can i disable clouds?
Reason: Since minetest 0.4.15 the clouds are not disabled by changing the Skybox,
and i don't know now to disable it for the mars-mod (because mars has no clouds ;) )
More Info(optional): I've tried this mod: viewtopic.php?f=9&t=17392
in the video (from 1-th post) they said, that with changing the skybox the clouds are removed,
but at my PC with latest minetest they are not removed.
Reason: Since minetest 0.4.15 the clouds are not disabled by changing the Skybox,
and i don't know now to disable it for the mars-mod (because mars has no clouds ;) )
More Info(optional): I've tried this mod: viewtopic.php?f=9&t=17392
in the video (from 1-th post) they said, that with changing the skybox the clouds are removed,
but at my PC with latest minetest they are not removed.
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Post your modding questions here
go to advanced settings and serch for disable_clouds
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
Re: Post your modding questions here
juli wrote:How can i disable clouds?
Reason: Since minetest 0.4.15 the clouds are not disabled by changing the Skybox,
and i don't know now to disable it for the mars-mod (because mars has no clouds ;) )
More Info(optional): I've tried this mod: viewtopic.php?f=9&t=17392
in the video (from 1-th post) they said, that with changing the skybox the clouds are removed,
but at my PC with latest minetest they are not removed.
that's because when I initially wrote that mod, you had no choice: skybox would automatically turn off clouds.
However, I don't want that, and this was fixed in minetest about 2 weeks ago, so now clouds are possible in combination with skybox textures, and the skybox mod leaves them enabled (and tunes them to match the textures)
- TumeniNodes
- Member
- Posts: 2941
- Joined: Fri Feb 26, 2016 19:49
- GitHub: TumeniNodes
- IRC: tumeninodes
- In-game: TumeniNodes
- Location: in the dark recesses of the mind
- Contact:
Re: Post your modding questions here
Mars does have clouds though.
perhaps you could experiment with the settings for fog and clouds, to match them to the Mars mod?
This new feature and fix, actually gives more opportunity to add some better depth and overall feel of being in such a mysterious place such as Mars ; )
this link can give some visual ideas
https://www.reference.com/science/mars- ... 072668ed25
perhaps you could experiment with the settings for fog and clouds, to match them to the Mars mod?
This new feature and fix, actually gives more opportunity to add some better depth and overall feel of being in such a mysterious place such as Mars ; )
this link can give some visual ideas
https://www.reference.com/science/mars- ... 072668ed25
A Wonderful World
Re: Post your modding questions here
Ok i didn't find anything in the mod where the clouds are tuned,sofar wrote:juli wrote: However, I don't want that, and this was fixed in minetest about 2 weeks ago, so now clouds are possible in combination with skybox textures, and the skybox mod leaves them enabled (and tunes them to match the textures)
and i don't wanna remove them only in client side - i know that this is possible - so is there a minetest
function like minetest.set_clouds() or so?
@sofar can u post maybe an example to disable/recolor/tune clouds?
@Tumeni ok, i have to speak with players, whether there should be clouds or not :)
- Lone_Wolf
- Member
- Posts: 2576
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: Post your modding questions here
Set the cloud height to -29999?
Re: Post your modding questions here
and how can i set them to -29999?
Re: Post your modding questions here
minetest.conf (see minetest.conf.example)
or via settings page cloud_height parameter
or via settings page cloud_height parameter
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )
- Lone_Wolf
- Member
- Posts: 2576
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: Post your modding questions here
Settings, client, menus.
(I can't assure you that is right but it should be close)
(I can't assure you that is right but it should be close)
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Post your modding questions here
you can remove the clouds with your minetest conf!!!
it's clouds_enable = false
or somethin' like that
it's clouds_enable = false
or somethin' like that
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- orwell
- Member
- Posts: 958
- Joined: Wed Jun 24, 2015 18:45
- GitHub: orwell96
- IRC: orwell96_mt
- In-game: orwell
- Location: Raxacoricofallapatorius
Re: Post your modding questions here
minetest.conf.example wrote: # Clouds are a client side effect.
# type: bool
# enable_clouds = true
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: Post your modding questions here
How do I replace placed locked chests with regular chest while retaining its inventory and facedir? I'm a buffoon at this. I got the ABM working but that's it. Any advice on the right solution and any simplifications?
Code: Select all
minetest.register_abm({
nodenames = {"default:chest_locked"},
interval = 3,
chance = 1,
action = function(pos)
local meta_src = minetest.get_meta(pos)
local inv_src = meta_src:get_inventory()
minetest.set_node(pos, {name="default:chest"})
local inv_dst = meta_src:get_inventory()
-- for i=1,#inv_src do
inv_dst:set_stack("main",1,inv_src[1])
-- end
end,
})
Re: Post your modding questions here
Use minetest.swap_node() instaed of minetest.set_node() and the metadata stays.texmex wrote:How do I replace placed locked chests with regular chest while retaining its inventory and facedir? I'm a buffoon at this. I got the ABM working but that's it. Any advice on the right solution and any simplifications?
Facedir is the param2 value of the node.
This should work:
Code: Select all
action = function(pos, node)
node.name = "default:chest"
minetest.swap_node(pos, node)
end
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: Post your modding questions here
The purpose is to simply convert locked chests to regular chests, in order to completely remove locked chests from the game. Thank you for swap_node, should do it! Suspected LBM could be suitable for such simple task but didn't try it.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: Post your modding questions here
How do i populate the right side of this node box with texture? Can I make a texture stretch the whole area or do I divide the textures (like I've started on here)?
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Post your modding questions here
should work normally. size of texture?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: Post your modding questions here
16x16 in this case, but I tried with 32x16 too. No matter what size I use, it stretches only to the first square.azekill_DIABLO wrote:should work normally. size of texture?
Re: Post your modding questions here
I think the clean solution is to define two nodes like doors.texmex wrote:How do i populate the right side of this node box with texture? Can I make a texture stretch the whole area or do I divide the textures (like I've started on here)?
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: Post your modding questions here
Thank you, I'll track the door code down and have a look.Gerald wrote:I think the clean solution is to define two nodes like doors.texmex wrote:How do i populate the right side of this node box with texture? Can I make a texture stretch the whole area or do I divide the textures (like I've started on here)?
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: Post your modding questions here
how to use node timer?
returns: missing <name>
Code: Select all
on_timer = function(pos,1)
--[functions...]
end,
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
Re: Post your modding questions here
How are map information stored in the database? I can't find the reference
Re: Post your modding questions here
Why do you define a function with a parameter called "1"?azekill_DIABLO wrote:how to use node timer?returns: missing <name>Code: Select all
on_timer = function(pos,1) --[functions...] end,
If you want to run the function every second you can do something like this:
Code: Select all
minetest.register_node(<nodename>, {
...
after_place_node = function(pos, placer, itemstack, pointed_thing)
-- start the timer
local timer = minetest.get_node_timer(pos)
timer:start(1)
end,
on_timer = function(pos, elapsed)
<code to be executed>
return true -- restart the timer
end,
}
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: Post your modding questions here
Turns out doors are mesh and not nodeboxes.Gerald wrote:I think the clean solution is to define two nodes like doors.texmex wrote:How do i populate the right side of this node box with texture? Can I make a texture stretch the whole area or do I divide the textures (like I've started on here)?
Who is online
Users browsing this forum: No registered users and 5 guests