Page 2 of 2

Re: Mini Sun, Pesudo Brighter Light Source. Updated.

Posted: Mon Sep 15, 2014 01:37
by bdjnk
Doh, sorry about that. The glow texture being visible like that is something I use for debugging. It got left in by mistake. I've fixed it on github.

As a note, it's a very easy thing to toggle. Lines 5 and 6 of init.lua in the version with visible glow texture read

Code: Select all

  drawtype = "plantlike",
  --drawtype = "airlike",
A plantlike drawtype results in textured glow. while with an airlike drawtype the glow is untextured. All you need to do is swap the comment so lines 5 and 6 read

Code: Select all

  --drawtype = "plantlike",
  drawtype = "airlike",

Re: Mini Sun, Pesudo Brighter Light Source. Updated.

Posted: Mon Sep 15, 2014 21:34
by balthazariv
Hello,

I like this but no items to my inventory.
I added

Code: Select all

description = "glow",
to

Code: Select all

minetest.register_node("mini_sun:glow", {
	description = "glow",
and

Code: Select all

description = "mini_sun",
to

Code: Select all

minetest.register_node("mini_sun:source", {
	inventory_image = minetest.inventorycube("mini_sun.png", "mini_sun.png", "mini_sun.png"),
	description = "mini_sun", (description = "mini_sun", 
You can also rename your post to [Mod] Mini Sun, Pesudo Brighter Light Source. Updated. [mini_sun] if you want that your mod is detect by the new interface of Krock Search Minetest mods

Thanks for all your works

Re: [Mod] Mini Sun, Pesudo Brighter Light Source [mini_sun]

Posted: Sun Feb 15, 2015 06:12
by bdjnk
Thanks balthazariv,

It took a while, but I've renamed the first post. I've also given the mod a license and dependencies.

What I really what now is a better recipe. Something involving Mese perhaps?

Re: [Mod] Mini Sun, Pesudo Brighter Light Source [mini_sun]

Posted: Sun Feb 15, 2015 22:25
by Napiophelios
bdjnk wrote:Thanks balthazariv,

It took a while, but I've renamed the first post. I've also given the mod a license and dependencies.

What I really what now is a better recipe. Something involving Mese perhaps?
Its not that great, but in my little subgame; the recipe is a mese block surrounded by mese crystals and mese fragments.
Its supposed to look like a little sun on the crafting grid:

Code: Select all

minetest.register_craft({
output = "mini_sun:sun_source",
recipe = {
   {'default:mese_crystal_fragment',  'default:mese_crystal',  'default:mese_crystal_fragment'},
   {'default:mese_crystal', 'default:mese', 'default:mese_crystal'},
   {'default:mese_crystal_fragment',  'default:mese_crystal',  'default:mese_crystal_fragment'}
  }
})
I also made a nice little texture for it Image

Re: [Mod] Mini Sun, Pesudo Brighter Light Source [mini_sun]

Posted: Tue Mar 10, 2015 21:01
by dgm5555
I just wanted to say this is my favorite mod of all time, but I've always found it intensly irritating that it didn't show up in the inventory. Thanks to balthazariv, I now know the following needs to be added to the register function and it shows up fine (so could you please merge this suggestion):-

Code: Select all

description = "mini_sun",
And I really like Napiophelios' texture and recipe, so my vote for that too (actually my perfect texture would improve it to include some animated brightening, but this one is pretty close)!!

Re: [Mod] Mini Sun, Pesudo Brighter Light Source [mini_sun]

Posted: Wed Mar 11, 2015 02:31
by bdjnk
dgm5555 wrote:I just wanted to say this is my favorite mod of all time, but I've always found it intensely irritating that it didn't show up in the inventory. Thanks to balthazariv, I now know the following needs to be added to the register function and it shows up fine

And I really like Napiophelios' texture and recipe, so my vote for that too (actually my perfect texture would improve it to include some animated brightening, but this one is pretty close)!!
Geh, I thought I'd merged the inventory fix ages ago. I really need to pay more attention. It's merged now. Thanks balthazariv. Sorry it took forever.

Thanks for the compliment though. Glad you like it.

Napiophelios, thanks for the recipe suggestion and texture. I like the texture, but it feels stone-like. It's also 32x32, while I like my included textures to be 16x16 to match the default textures. As to the recipe, that seems like it might be too much Mese.

Anyway, it's motivated me to update the recipe, and thus the texture. Here's the new recipe:

Code: Select all

copper_ingot  glass         copper_ingot
glass         mese_crystal  glass
copper_ingot  glass         copper_ingot
And here is the slightly updated texture to match:
mini_sun.png
mini_sun.png (407 Bytes) Viewed 607 times
Edit: It doesn't look so good here, but in the game it looks fine.

Re: Mini Sun, Pesudo Brighter Light Source. Updated.

Posted: Thu Mar 12, 2015 01:33
by yyt16384
bdjnk wrote:
  • Line of slight only glow node placement, which I'm not even sure is a good idea.
It would be better to do a floodfill in the air nodes, so only the nodes connected with the source will be replaced. (It may be slow, though)

Re: Mini Sun, Pesudo Brighter Light Source. Updated.

Posted: Thu Mar 12, 2015 02:55
by bdjnk
yyt16384 wrote:
bdjnk wrote:
  • Line of slight only glow node placement, which I'm not even sure is a good idea.
It would be better to do a floodfill in the air nodes, so only the nodes connected with the source will be replaced. (It may be slow, though)
It would be both easier and more realistic to use line of sight, but even that requires thought in terms of optimization and correctness.

I do know that when you're in an adjacent hallway, and it's bright like the noon-day sun, despite the source being on the other side of the wall, it feels a bit awkward.

If you feel strongly about it, and know a bit how to program, you could code it up and submit a pull request. Otherwise, I likely will do line of sight eventually, but not today ;)

Re: [Mod] Mini Sun, Pesudo Brighter Light Source [mini_sun]

Posted: Thu Mar 12, 2015 14:14
by u34
+1 awesome mod...

Re: [Mod] Mini Sun, Pesudo Brighter Light Source [mini_sun]

Posted: Sun Mar 15, 2015 19:14
by Napiophelios
bdjnk wrote: Napiophelios, thanks for the recipe suggestion and texture. I like the texture, but it feels stone-like. It's also 32x32, while I like my included textures to be 16x16 to match the default textures. As to the recipe, that seems like it might be too much Mese.
Oh I didnt mean to suggest you include the texture with the mod,
Its created from a Nasa picture of the sun's surface,
I just thought it was neat looking and wanted to share it with others.

I make the craft recipe expensive because I think this is a powerful mod
and should be hard to get. Its awesome advantage for farming underground.

Re: [Mod] Mini Sun, Pesudo Brighter Light Source [mini_sun]

Posted: Tue Apr 24, 2018 19:44
by fergoy
Hi, I'm here just to tell about some ideas over this concept. I'm using 4.13 version and playing solo, so many mods are too mutch or just incompatible to me. So, to help me explore caves withour putting hundreds of torchs for each inch I step, I found out this mod but wasn't just fine for me so I did mine based on this concept.

I'm not publishing mine version because it's too simple and I don't know if it can cause some trouble on servers. I home my idea help another mod to became the one we all hope.

So, my mod is a block made of 9 torches, it's like a block of torches. It glows with the 14 lightmax limit, so I've included an airblock that glows too, but it's still air. The trick is that an ABM searches every time for a random node around 6 blocks from the block of torches, so if this random node is air, it changes it for my glowing air. So the block spawn as many blocks as the room space, but slowly to not compromise the processes.

The second trick is a second ABM to the air blocks, they have a life = 12 and every 10 seconds they lose 1. When gets to 0 the blocks comes back to be just air, not glowing. So, this block live 120 seconds. If you dig back the block of torches, all the air blocks remains until the life goes 0.

Hope my idea helps! Thank you.

Here is the code:

Code: Select all

minetest.register_node("supertorch:torch", {
	description = "Super Torch",
	inventory_image = "icon.png",
	paramtype = "light",
	tiles = { {
	name = "torch_up.png",
	animation = {
		type = "vertical_frames",
		aspect_w=16,
		aspect_h=16,
		lenght = 2.0
	}}},
	is_ground_content = false,
	groups = {crumbly = 3},
	light_source = 14,

})
minetest.register_abm({
	label = "supertorch light propagation",
	nodenames = {"supertorch:torch"},
	interval = 1,
	chance = 1,
	action = function(pos,node)
		local v = vector.new(math.random(-6,6),math.random(-6,6),math.random(-6,6))
		local p = vector.add(pos,v)
		local node = minetest.get_node(p)
		if node.name == "air" then
			minetest.set_node(p,{name = "supertorch:airlight"})
		end
	end
})
minetest.register_node("supertorch:airlight", {
	description = "Super torch air light",
	paramtype = "light",
	drawtype = "airlike",
	light_source = 14,
	sunlight_propagates = true,
	walkable = false,
	pointable = false,
	diggable = false,
	buildable_to = true,
	on_construct = function(pos)
		local meta = minetest.get_meta(pos)
		meta:set_int("life", 12)
	end
})
minetest.register_abm({
	label = "supertorch light remove",
	nodenames = {"supertorch:airlight"},
	interval = 10,
	chance = 1,
	action = function(pos,node)
		local meta = minetest.get_meta(pos)
		local life = meta:get_int("life")
		if life <= 0 then
			minetest.set_node(pos,{name = "air"})
		else
			meta:set_int("life", life - 1)
		end
	end
})
minetest.register_craft({
    output = "supertorch:torch",
    recipe = {{"default:torch","default:torch","default:torch"},
	{"default:torch","default:torch","default:torch"},
	{"default:torch","default:torch","default:torch"}}
})

Re: [Mod] Mini Sun, Pesudo Brighter Light Source [mini_sun]

Posted: Tue Apr 24, 2018 21:12
by rubenwardy
fergoy wrote:I'm using 4.13 version and playing solo
Your Minetest version is almost 3 years old. Please update to 0.4.16

To do that on Ubuntu, run the following commands:

Code: Select all

sudo add-apt-repository ppa:minetestdevs/stable
sudo apt update
sudo apt upgrade