Page 1 of 1

Sun Lamps

PostPosted: Fri May 03, 2013 16:02
by Idanwin
Is it possible to make a lamp give more light than the LIGHT_MAX?
What files would I have to change?
I want to make an underground cave with plants in it and need light to make them grow, but the ceiling is high so I need lights with a huuge range.

Thanks in advance

PostPosted: Fri May 03, 2013 16:10
by jojoa1997
yes set the light setting for the node above 14(which is LIGHT_MAX)

PostPosted: Fri May 03, 2013 16:20
by PilzAdam
Idanwin wrote:Is it possible to make a lamp give more light than the LIGHT_MAX?

Nope.

PostPosted: Fri May 03, 2013 17:09
by Idanwin
Shaders are enabled, but it doesn't seem to make any difference.
So I'd have to mod the actual game to allow for lights with a higher range?

PostPosted: Fri May 03, 2013 18:23
by BlockMen
Idanwin wrote:Shaders are enabled, but it doesn't seem to make any difference.
So I'd have to mod the actual game to allow for lights with a higher range?


You can't get over 14 until you change the source code (c++). The value is always reset to a max value of 14.

https://github.com/minetest/minetest/blob/master/src/light.h#L82

PostPosted: Fri May 03, 2013 18:46
by PilzAdam
Hybrid Dog wrote:
BlockMen wrote:
Idanwin wrote:Shaders are enabled, but it doesn't seem to make any difference.
So I'd have to mod the actual game to allow for lights with a higher range?


You can't get over 14 until you change the source code (c++). The value is always reset to a max value of 14.

https://github.com/minetest/minetest/blob/master/src/light.h#L82
the maximum is 15

No, only the sun can be 15.

PostPosted: Fri May 03, 2013 18:54
by Nore
What you can do is a node that will change air under itself to another airlike node emitting light, and have code to place them / remove them on node placing / destruction

PostPosted: Fri May 03, 2013 19:14
by sfan5
Hybrid Dog wrote:
PilzAdam wrote:
Hybrid Dog wrote:the maximum is 15

No, only the sun can be 15.
The moreblocks mod uses it, too.
So don't say this.

Just because the MoreBlocks mod uses it doesn't mean it is valid and will be used.
You can also change the source code of moreblocks and set the light level to 255, it will get reset to 14

PostPosted: Fri May 03, 2013 20:58
by Idanwin
Nore wrote:What you can do is a node that will change air under itself to another airlike node emitting light, and have code to place them / remove them on node placing / destruction

Thank you, that sounds like a good solution!

(it does bring up a few problems though: when you place a block in the cave, the air under it will stay lea (light emitting air) also when removing/deactivating the actual 'sunbeam' block (that generates the lea's))

PostPosted: Fri May 03, 2013 22:17
by Idanwin
Found a solution to the earlier mentioned problem:
The LEAP block when activated replaces all air block below with LEA untill it hits a non-air block or is 15 blocks down
The LEAP block when deactivated replaces all LEA blocks with air blocks until it is 15 blocks down.

Fantastic!! Thank you guys!

EDIT: I do have another problem though: the inventory textures of some blocks are now totally messed up, any idea what I could have done wrong?

EDIT2: They seem to be killing the grass rather than making it grow ... any suggestions about what to do about this?

PostPosted: Fri Jun 28, 2013 23:44
by bdjnk
Idanwin wrote:EDIT: I do have another problem though: the inventory textures of some blocks are now totally messed up, any idea what I could have done wrong?

EDIT2: They seem to be killing the grass rather than making it grow ... any suggestions about what to do about this?


Issue one is (likely) not associated with anything you did. It's probably this known bug, more recently mentioned over here.

Issue two is more subtle. As you may (or may not) be aware, my mini sun mod is very similar to what you were attempting. Anyway, I just fixed that issue by changing 'paramtype = light' to 'paramtype = "light"' (though I'm not certain why...).

PostPosted: Sat Jun 29, 2013 00:54
by kaeza
bdjnk wrote:Anyway, I just fixed that issue by changing 'paramtype = light' to 'paramtype = "light"' (though I'm not certain why...).

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
paramtype = light

This sets 'paramtype' to the value of the 'light' variable (which I'm sure is nil).

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
paramtype = "light"

This sets 'paramtype' to an actual value (a string).