Page 1 of 1
Fire Flys mod ?

Posted:
Sun Aug 05, 2012 03:13
by Spots
just wondering because i get a little bored when night hits in the game has anyone thought of making like fireflys or something that has a glow to it at night to make night time a little more fun for players, at night i tend to hit caves to mine and farm ores and coal but i'd like to see if you guys have any ideas for it . Thanks !!

Posted:
Sun Aug 05, 2012 04:05
by Menche
Would be nice to see fireflies back, they were in the game by default pre-0.4 but were taken out.

Posted:
Mon Jul 29, 2013 13:57
by TenPlus1
Would be a nice option to enable/disable that could spawn around trees and light up an area at night time :)

Posted:
Mon Jul 29, 2013 21:31
by tinoesroho
Spots wrote:just wondering because i get a little bored when night hits in the game has anyone thought of making like fireflys or something that has a glow to it at night to make night time a little more fun for players, at night i tend to hit caves to mine and farm ores and coal but i'd like to see if you guys have any ideas for it . Thanks !!
Butterflies by day, Fireflies by night? That would be a fun mod.

Posted:
Mon Jul 29, 2013 22:41
by philipbenr

Posted:
Wed Jul 31, 2013 03:10
by Josh
I never got to experience being around fireflies ingame.
they would be intresting.

Posted:
Wed Jul 31, 2013 22:54
by Evergreen
Maybe that could be possible with something like
Bas080's Bee mod

Posted:
Thu Aug 01, 2013 01:34
by Casimir
Just had an idea:
Turn grass into grass with fireflies that emits light and spawns firefly-particles. Now I need someone to make the particle spawner, i don't understand how to use them.
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
minetest.register_abm({
nodenames = {"default:grass_5"},
interval = 5,
chance = 5,
action = function(pos, node)
if ((minetest.env:get_timeofday() < 0.2) or (minetest.env:get_timeofday() > 0.8)) then
node.name = "firefly:grass_5"
minetest.env:add_node(pos, node)
end
end
})
minetest.register_abm({
nodenames = {"firefly:grass_5"},
interval = 5,
chance = 5,
action = function(pos, node)
if ((minetest.env:get_timeofday() > 0.2) and (minetest.env:get_timeofday() < 0.8)) then
node.name = "default:grass_5"
minetest.env:add_node(pos, node)
end
end
})
minetest.register_node("firefly:grass_5", {
description = "Grass",
drawtype = "plantlike",
tiles = {"default_grass_5.png"},
inventory_image = "default_grass_5.png",
wield_image = "default_grass_5.png",
paramtype = "light",
walkable = false,
light_source = 10,
buildable_to = true,
is_ground_content = true,
drop = "default:grass_1",
groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})

Posted:
Thu Aug 01, 2013 01:42
by Evergreen
Casimir wrote:Just had an idea:
Turn grass into grass with fireflies that emits light and spawns firefly-particles. Now I need someone to make the particle spawner, i don't understand how to use them.
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
minetest.register_abm({
nodenames = {"default:grass_5"},
interval = 5,
chance = 5,
action = function(pos, node)
if ((minetest.env:get_timeofday() < 0.2) or (minetest.env:get_timeofday() > 0.8)) then
node.name = "firefly:grass_5"
minetest.env:add_node(pos, node)
end
end
})
minetest.register_abm({
nodenames = {"firefly:grass_5"},
interval = 5,
chance = 5,
action = function(pos, node)
if ((minetest.env:get_timeofday() > 0.2) and (minetest.env:get_timeofday() < 0.8)) then
node.name = "default:grass_5"
minetest.env:add_node(pos, node)
end
end
})
minetest.register_node("firefly:grass_5", {
description = "Grass",
drawtype = "plantlike",
tiles = {"default_grass_5.png"},
inventory_image = "default_grass_5.png",
wield_image = "default_grass_5.png",
paramtype = "light",
walkable = false,
light_source = 10,
buildable_to = true,
is_ground_content = true,
drop = "default:grass_1",
groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})
I could see if I can figure out the code in the bee mod, and maybe change it to fireflies. Emitting light, however, is going to be much more difficult.

Posted:
Thu Aug 01, 2013 01:52
by Casimir
The node itself is the one emitting light, that's the trick.

Posted:
Thu Aug 01, 2013 01:59
by Evergreen
Casimir wrote:The node itself is the one emitting light, that's the trick.
Yes, I was kind of thinking of doing it that way myself.
EDIT: Just throwing the code together as we speak.

Posted:
Thu Aug 01, 2013 02:32
by Evergreen
Okay, just finished the first version, will post it tomorrow.

Posted:
Thu Aug 01, 2013 02:59
by Casimir
That's what I have now. But the particles move to fast.
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
minetest.register_abm({
nodenames = {"firefly:grass_5"},
interval = 0.1,
chance = 3,
action = function(pos, node, _, _)
local p = {x=pos.x, y=pos.y+math.random(), z=pos.z}
minetest.add_particle(p, {x=(math.random()-0.8),y=(math.random()-0.8),z=(math.random()-0.8)}, {x=math.random()-0.5,y=math.random()-0.5,z=math.random()-0.5}, math.random(2,5), math.random(1,1.5), true, "firefly_particle.png")
end,
})
And there is one major problem: the night is to bright.

Posted:
Thu Aug 01, 2013 11:43
by Evergreen
Casimir wrote:That's what I have now. But the particles move to fast.
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
minetest.register_abm({
nodenames = {"firefly:grass_5"},
interval = 0.1,
chance = 3,
action = function(pos, node, _, _)
local p = {x=pos.x, y=pos.y+math.random(), z=pos.z}
minetest.add_particle(p, {x=(math.random()-0.8),y=(math.random()-0.8),z=(math.random()-0.8)}, {x=math.random()-0.5,y=math.random()-0.5,z=math.random()-0.5}, math.random(2,5), math.random(1,1.5), true, "firefly_particle.png")
end,
})
And there is one major problem: the night is to bright.
I actually just finished the code, and added a texture. I just have to do a bit of tweaking. Also, you are right about the light being too bright.

Posted:
Mon Aug 05, 2013 00:09
by Gambit
Fireflies were self illuminating, not actually a light source, but it gave it that impression. I miss those little fellas. They were so mindless and random. With a bit of improvement, they would make the night in Minetest pretty again. I personally like to catch them and put into those glass vessels thus making a Firefly lantern or something.