Fire Flys mod ?
Fire Flys mod ?
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 !!
-
- Member
- Posts: 570
- Joined: Fri Feb 17, 2012 21:55
- Location: Canada
Butterflies by day, Fireflies by night? That would be a fun mod.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 !!
We are what we create.
I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.
My github:
https://github.com/tinoesroho/
I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.
My github:
https://github.com/tinoesroho/
- philipbenr
- Member
- Posts: 1897
- Joined: Fri Jun 14, 2013 01:56
- GitHub: philipbenr
- IRC: philipbenr
- In-game: robinspi
- Location: United States
the glow mod has fireflies by night...
viewtopic.php?id=6300
viewtopic.php?id=6300
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
- Casimir
- Member
- Posts: 1207
- Joined: Fri Aug 03, 2012 16:59
- GitHub: CasimirKaPazi
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.
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.
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},
},
})
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
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.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.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}, }, })
Back from the dead!
- Casimir
- Member
- Posts: 1207
- Joined: Fri Aug 03, 2012 16:59
- GitHub: CasimirKaPazi
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
Yes, I was kind of thinking of doing it that way myself.Casimir wrote:The node itself is the one emitting light, that's the trick.
EDIT: Just throwing the code together as we speak.
Last edited by Evergreen on Thu Aug 01, 2013 02:11, edited 1 time in total.
Back from the dead!
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
- Casimir
- Member
- Posts: 1207
- Joined: Fri Aug 03, 2012 16:59
- GitHub: CasimirKaPazi
That's what I have now. But the particles move to fast.
And there is one major problem: the night is to bright.
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,
})
Last edited by Casimir on Thu Aug 01, 2013 03:06, edited 1 time in total.
- Evergreen
- Member
- Posts: 2135
- Joined: Sun Jan 06, 2013 01:22
- GitHub: 4Evergreen4
- IRC: EvergreenTree
- In-game: Evergreen
- Location: A forest in the midwest
- Contact:
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.Casimir wrote:That's what I have now. But the particles move to fast.And there is one major problem: the night is to bright.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, })
Back from the dead!
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.
Who is online
Users browsing this forum: No registered users and 3 guests