Sun Lamps

Idanwin
Member
 
Posts: 22
Joined: Tue Apr 23, 2013 14:41

Sun Lamps

by Idanwin » Fri May 03, 2013 16:02

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
This is a signature virus. Add me to your signature so that I can multiply.
 

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

by jojoa1997 » Fri May 03, 2013 16:10

yes set the light setting for the node above 14(which is LIGHT_MAX)
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

by PilzAdam » Fri May 03, 2013 16:20

Idanwin wrote:Is it possible to make a lamp give more light than the LIGHT_MAX?

Nope.
 

Idanwin
Member
 
Posts: 22
Joined: Tue Apr 23, 2013 14:41

by Idanwin » Fri May 03, 2013 17:09

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?
This is a signature virus. Add me to your signature so that I can multiply.
 

User avatar
BlockMen
Member
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
GitHub: BlockMen

by BlockMen » Fri May 03, 2013 18:23

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
 

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

by PilzAdam » Fri May 03, 2013 18:46

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.
 

Nore
Member
 
Posts: 468
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

by Nore » Fri May 03, 2013 18:54

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
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Fri May 03, 2013 19:14

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
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Idanwin
Member
 
Posts: 22
Joined: Tue Apr 23, 2013 14:41

by Idanwin » Fri May 03, 2013 20:58

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))
This is a signature virus. Add me to your signature so that I can multiply.
 

Idanwin
Member
 
Posts: 22
Joined: Tue Apr 23, 2013 14:41

by Idanwin » Fri May 03, 2013 22:17

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?
Last edited by Idanwin on Fri May 03, 2013 23:02, edited 1 time in total.
This is a signature virus. Add me to your signature so that I can multiply.
 

User avatar
bdjnk
Member
 
Posts: 104
Joined: Wed Mar 20, 2013 21:03
GitHub: bdjnk

by bdjnk » Fri Jun 28, 2013 23:44

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...).
Last edited by bdjnk on Sat Jun 29, 2013 00:12, edited 1 time in total.
 

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

by kaeza » Sat Jun 29, 2013 00:54

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).
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
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 7 guests

cron