[Mod] Particles Mod [0.3.1] [particles]

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Tue Feb 28, 2012 19:31

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
WATERPARTICLES = {
    physical = true,
    collisionbox = {0,0,0,0,0,0},
    visual = "sprite",
    visual_size = {x=0.2, y=0.2},
    textures = {"default_water.png"},
    on_activate = function (self)
        self.object:setvelocity({x=math.random(-1,1)*0.5, y=math.random(-1,1)*0.5, z=math.random(-1,1)*0.5})
    end,
    on_step = function(self, dtime)
        self.timer = self.timer + dtime
        if self.timer > 20 then
            self.object:remove()
        end
        if minetest.env:get_node(self.object:getpos()).name ~= "default:water_source" then
            self.object:remove()
        end
    end,
    timer = 0,
}

minetest.register_entity("particles:water", WATERPARTICLES)

minetest.register_abm({
    nodenames = {"default:water_source"},--, "default:water_flowing"},
    interval = 10,
    chance = 1,
    action = function(pos)
        if math.random(1000) == 1 then
            minetest.env:add_entity({x=pos.x+math.random()*0.5,y=pos.y-0.25,z=pos.z+math.random()*0.5}, "particles:water")
        end
    end,
})


This code adds floating particles in water. What about adding this to V 0.2 of this mod? (Maybe with another texture for the particles)
Redstone for minetest: Mesecons (mesecons.net)
 

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

by sfan5 » Tue Feb 28, 2012 19:33

Jeija wrote:
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
WATERPARTICLES = {
    physical = true,
    collisionbox = {0,0,0,0,0,0},
    visual = "sprite",
    visual_size = {x=0.2, y=0.2},
    textures = {"default_water.png"},
    on_activate = function (self)
        self.object:setvelocity({x=math.random(-1,1)*0.5, y=math.random(-1,1)*0.5, z=math.random(-1,1)*0.5})
    end,
    on_step = function(self, dtime)
        self.timer = self.timer + dtime
        if self.timer > 20 then
            self.object:remove()
        end
        if minetest.env:get_node(self.object:getpos()).name ~= "default:water_source" then
            self.object:remove()
        end
    end,
    timer = 0,
}

minetest.register_entity("particles:water", WATERPARTICLES)

minetest.register_abm({
    nodenames = {"default:water_source"},--, "default:water_flowing"},
    interval = 10,
    chance = 1,
    action = function(pos)
        if math.random(1000) == 1 then
            minetest.env:add_entity({x=pos.x+math.random()*0.5,y=pos.y-0.25,z=pos.z+math.random()*0.5}, "particles:water")
        end
    end,
})


This code adds floating particles in water. What about adding this to V 0.2 of this mod? (Maybe with another texture for the particles)

I'll maybe add this
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Tue Feb 28, 2012 19:41

Congrats to your 600th post! ^^
Redstone for minetest: Mesecons (mesecons.net)
 

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

by sfan5 » Tue Feb 28, 2012 19:50

Jeija wrote:Congrats to your 600th post! ^^

Yay ^^:D
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Tue Feb 28, 2012 20:02

Congrats, you still playing?

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
Melkor
Member
 
Posts: 285
Joined: Sat Sep 24, 2011 01:03

by Melkor » Wed Feb 29, 2012 07:03

is possible to make rain or snow with this?
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Feb 29, 2012 08:02

yes

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Wed Feb 29, 2012 13:24

need to do it in C++ like that other guy did with weather, then we can have high performance particles
If you can think it, you can make it.
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Wed Feb 29, 2012 16:14

I guess the fact that it is lua instead of c++ isn't the main problem. The most important thing is that particles cannot be controlled by a server - It must be client-side only. So for now, it's good to have this mod, but don't put too much work into it, so if someone makes this in c++ it was not totally for nothing.
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Feb 29, 2012 16:18

Jeija wrote:I guess the fact that it is lua instead of c++ isn't the main problem. The most important thing is that particles cannot be controlled by a server - It must be client-side only. So for now, it's good to have this mod, but don't put too much work into it, so if someone makes this in c++ it was not totally for nothing.


yes, that's right, all we need now is some form of way to see if someone is digging.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

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

by sfan5 » Mon Mar 12, 2012 13:32

Update!!
Changelog:
  • Colored Digging Particles
Download in the first Post!
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Utilisatrice
Member
 
Posts: 103
Joined: Thu Feb 16, 2012 18:04

by Utilisatrice » Mon Mar 12, 2012 13:57

Thank's Sfan5 !

You're amazing.
 

User avatar
Death Dealer
Member
 
Posts: 1379
Joined: Wed Feb 15, 2012 18:46

by Death Dealer » Tue Mar 20, 2012 06:19

little bubbles in front of your face while under water would be neat:D or maybe when you first jump in
Last edited by Death Dealer on Tue Mar 20, 2012 06:21, edited 1 time in total.
Keep calm and code python^_^
 

bingo009
New member
 
Posts: 5
Joined: Mon Apr 02, 2012 15:23

by bingo009 » Mon Apr 02, 2012 15:25

Hey, i'm new in Minetest, and this mod didn't work. I create mods folder in data folder, and move particle folder into mods folder, and i haven't got a particle effects. I only use a Minecraft Texture Pack. What's wrong?
 

User avatar
Death Dealer
Member
 
Posts: 1379
Joined: Wed Feb 15, 2012 18:46

by Death Dealer » Mon Apr 02, 2012 15:30

bingo009 wrote:Hey, i'm new in Minetest, and this mod didn't work. I create mods folder in data folder, and move particle folder into mods folder, and i haven't got a particle effects. I only use a Minecraft Texture Pack. What's wrong?

what version are you using? and the mod folder doesnt need to be made its in the root directory somewhere.
Last edited by Death Dealer on Mon Apr 02, 2012 15:31, edited 1 time in total.
Keep calm and code python^_^
 

bingo009
New member
 
Posts: 5
Joined: Mon Apr 02, 2012 15:23

by bingo009 » Mon Apr 02, 2012 16:12

I download minetest from this page(latest stable version, windows 7):
http://c55.me/minetest/download.php

This is my folders structure:
bin data doc world
|
mods(i place mods folders here)
 

User avatar
Death Dealer
Member
 
Posts: 1379
Joined: Wed Feb 15, 2012 18:46

by Death Dealer » Mon Apr 02, 2012 16:20

Keep calm and code python^_^
 

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

by sfan5 » Sat Apr 07, 2012 09:51

Update!
Changelog:
  • Big Performance Improvement (make one on_dignode callback instead of ~30 of them)
  • Digging Particles support for Mesecons
Download in first Post

BTW for Modders: If you want Digging Particle Support for your Mod make a List with all Block and their Color
Example:
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
--== Modname ==--
{"modname:my_block1", "gray"},
{"modname:my_block2", "sandcolor"},

Available Colors: (List may be outdated)
  • black
  • brown
  • gray
  • green
  • lightgray
  • red
  • sandcolor
  • white
  • yellow
If you need extra Colors make a Texture for them called p_mycolor.png in the texture Folder.
Send me the List and extra Colors (if there are any) and i'll include it
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
RabbiBob
Member
 
Posts: 335
Joined: Sat Jan 28, 2012 22:40

by RabbiBob » Sat Apr 07, 2012 11:47

Nice!

Just had a random though looking at the code: would it be possible to have Particles Mod react to a node that belongs to a specific group? If so, define a custom group namespace in your mod and mod Devs would add that to their own mod code: instant integration without dependency.

Again, random thought not based on any actual working code reality.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sat Apr 07, 2012 14:35

This is fucking handy Sfan!

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

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

by sfan5 » Sat Apr 07, 2012 17:19

RabbiBob wrote:Nice!

Just had a random though looking at the code: would it be possible to have Particles Mod react to a node that belongs to a specific group? If so, define a custom group namespace in your mod and mod Devs would add that to their own mod code: instant integration without dependency.

Again, random thought not based on any actual working code reality.

Particles Mod can support any Mod, without any Dependency
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
JoseMing
Member
 
Posts: 107
Joined: Tue Feb 21, 2012 00:01

by JoseMing » Sat Apr 07, 2012 19:24

omg thanks man for make particles to the blocks
Nothing is impossible, Only you need you mind to create... and Sorry for my Bad English :D
Add me on remobo as JoseGarcia
 

User avatar
RabbiBob
Member
 
Posts: 335
Joined: Sat Jan 28, 2012 22:40

by RabbiBob » Sat Apr 07, 2012 22:09

sfan5 wrote:Particles Mod can support any Mod, without any Dependency


My idea came when I read this, which is a dependency of interaction on your part if I read it correctly.

sfan5 wrote:BTW for Modders: If you want Digging Particle Support for your Mod make a List with all Block and their Color
Example:
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
--== Modname ==--
{"modname:my_block1", "gray"},
{"modname:my_block2", "sandcolor"},


...

Send me the List and extra Colors (if there are any) and i'll include it
 

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

by sfan5 » Sun Apr 08, 2012 08:11

RabbiBob wrote:
sfan5 wrote:Particles Mod can support any Mod, without any Dependency


My idea came when I read this, which is a dependency of interaction on your part if I read it correctly.

sfan5 wrote:BTW for Modders: If you want Digging Particle Support for your Mod make a List with all Block and their Color
Example:
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
--== Modname ==--
{"modname:my_block1", "gray"},
{"modname:my_block2", "sandcolor"},


...

Send me the List and extra Colors (if there are any) and i'll include it

I need to add it to my Mod, you don't need to add something to e.g. BobBlocks
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
RabbiBob
Member
 
Posts: 335
Joined: Sat Jan 28, 2012 22:40

by RabbiBob » Sun Apr 08, 2012 10:11

Right, I get that and it's not what I'm saying.

I have the current groups on my nodes:

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
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},


The engine knows that my block belongs to those groups and acts accordingly.

My question was "would it be possible to have Particles Mod react to a node that belongs to a specific group?", meaning this as an example:

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
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, particle_mod=2},


and arbitrarily 2 equates to, lets say, red.

If the engine allowed the mod to react to that value in someway, you would not need to add things to your mod (i.e. this is a dependency of a different sort) and I could decide one day to just add it to my Mod without needing your adding/updating/me waiting for server Admins to update their servers/etc.

Does that make more sense?

Just saw this post:

http://minetest.net/forum/viewtopic.php?pid=19632#p19632
Last edited by RabbiBob on Sun Apr 08, 2012 10:12, edited 1 time in total.
 

Utilisatrice
Member
 
Posts: 103
Joined: Thu Feb 16, 2012 18:04

by Utilisatrice » Sun Apr 08, 2012 10:43

Hi,

Sfan5, when i want delete the particle mod, i can't play on my map because the game crashed !

Can you help me, please ?

My map is very great.
Last edited by Utilisatrice on Sun Apr 08, 2012 10:44, edited 1 time in total.
 

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

by sfan5 » Sun Apr 08, 2012 11:47

Utilisatrice wrote:Hi,

Sfan5, when i want delete the particle mod, i can't play on my map because the game crashed !

Can you help me, please ?

My map is very great.

What Error do you get?
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Utilisatrice
Member
 
Posts: 103
Joined: Thu Feb 16, 2012 18:04

by Utilisatrice » Sun Apr 08, 2012 12:07

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
14:04:26: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): deactivating object id=2 on inactive block (676,3,689)
14:04:26: INFO[ServerThread]: ItemSAO::getStaticData
14:04:26: VERBOSE[ServerThread]: ServerEnvironment::deactivateFarObjects(): object id=2 is known by clients; not deleting yet
14:04:26: INFO[main]: Pointing at [node under=10779,52,11032 above=10779,53,11032]
14:04:26: VERBOSE[ServerThread]: ServerEnvironment::activateObjects(): activating objects of block (673,1,689) (2 objects)
14:04:26: INFO[ServerThread]: LuaEntitySAO::create(name="particles:smoke" state="")
14:04:26: VERBOSE[ServerThread]: ServerEnvironment::activateObjects(): activated static object pos=(10780.3,28.7076,11026.1) type=7
14:04:26: VERBOSE[ServerThread]: ServerEnvironment::addActiveObjectRaw(): Added id=3; there are now 3 active objects.
14:04:26: VERBOSE[ServerThread]: scriptapi_luaentity_add: id=3 name="particles:smoke"
14:04:26: ERROR[ServerThread]: LuaEntity name "particles:smoke" not defined
14:04:26: VERBOSE[ServerThread]: scriptapi_luaentity_activate: id=3
 

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

by sfan5 » Sun Apr 08, 2012 12:40

Install Particles Mod, do /clearobjects, deinstall Particles Mod
That should work
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Utilisatrice
Member
 
Posts: 103
Joined: Thu Feb 16, 2012 18:04

by Utilisatrice » Sun Apr 08, 2012 13:17

Thank Sfan5,

His work !
 

PreviousNext

Return to Old Mods

Who is online

Users browsing this forum: No registered users and 7 guests

cron