[Mod] Torches [3.0.1] [torches]

gsmanners
Member
 
Posts: 159
Joined: Fri Jan 10, 2014 21:37

by gsmanners » Wed Jan 22, 2014 10:34

I was looking through the code for this again and noticed this:

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
    local p2 = {x=p.x+d.x, y=p.y+d.y, z=p.z+d.z}
    local nn = minetest.env:get_node(p2).name
    local def2 = minetest.registered_nodes[nn]
    if def2 and not def2.walkable then
        return false
    end


It's pretty cool that you can tell where the torch should attach to, but I was wondering whether you can count on the neighbor node actually residing in the environment during an ABM event. That may be the iffy part I've been running into.
 

electricface
New member
 
Posts: 1
Joined: Wed Jan 22, 2014 12:26

by electricface » Wed Jan 22, 2014 12:28

I find a bug, Put a torch in the water, Can not see that the torch
 

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

by BlockMen » Wed Jan 22, 2014 12:56

Update. Version 1.3 released

Changelog:
- flames are only shown if a player is near a torch (13 blocks)
- stopped random dropping of torches
- old torches are converted now, ceiling placed removed

---
gsmanners wrote:It's pretty cool that you can tell where the torch should attach to, but I was wondering whether you can count on the neighbor node actually residing in the environment during an ABM event. That may be the iffy part I've been running into.


Removed the dropping part from abm, so they shouldnt drop randomly anymore. Thanks for pointing out problems, new bug reports and improvement ideas are always welcome ;)

electricface wrote:I find a bug, Put a torch in the water, Can not see that the torch

Do you mean that the flames are not shown correct near water? If so i cant do anything since its a know bug in engine.

But in general I'm not sure whether allowing to place torches in water or not. Some feedback would be nice.
 

gsmanners
Member
 
Posts: 159
Joined: Fri Jan 10, 2014 21:37

by gsmanners » Wed Jan 22, 2014 22:05

Ah, I see. Yes, I think register_on_dignode should work much more reliably than an ABM event. It does raise the question of what is going on with the old design, though.

I was thinking that maybe it's a corner case or possibly something esoteric like a timing issue. Now I'm wondering whether I should be worried about where I happen to find flowing water or lava.
 

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

by PilzAdam » Tue Mar 25, 2014 23:07

I noticed that the torches always drop when you dig/place a node somewhere next to them (i.e. if nodeupdate() runs).
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Wed Mar 26, 2014 19:53

/me confirms the bug.
 

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

by BlockMen » Sat Apr 05, 2014 19:30

PilzAdam wrote:I noticed that the torches always drop when you dig/place a node somewhere next to them (i.e. if nodeupdate() runs).


4aiman wrote:/me confirms the bug.


Thanks for reporting, fixed in 1.3.1
 

gsmanners
Member
 
Posts: 159
Joined: Fri Jan 10, 2014 21:37

by gsmanners » Sun Apr 06, 2014 17:06

Just saw another one:

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
11:03:29: ERROR[main]: ServerError: /home/genma/.minetest/mods/minetest/torches/init.lua:228: attempt to index local 'n' (a nil value)
11:03:29: ERROR[main]: stack traceback:
11:03:29: ERROR[main]:     /home/genma/.minetest/mods/minetest/torches/init.lua:228: in function 'callback'
11:03:29: ERROR[main]:     ...ome/genma/src/minetest-0.4.9/bin/../builtin/item.lua:442: in function <...ome/genma/src/minetest-0.4.9/bin/../builtin/item.lua:380>
11:03:29: ERROR[main]:     (tail call): ?


I think the below is what's relevant:

minetest.get_node_or_nil(pos)
^ Returns nil for unloaded area
 

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

by BlockMen » Sun Apr 06, 2014 17:19

gsmanners wrote:Just saw another one:

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
11:03:29: ERROR[main]: ServerError: /home/genma/.minetest/mods/minetest/torches/init.lua:228: attempt to index local 'n' (a nil value)
11:03:29: ERROR[main]: stack traceback:
11:03:29: ERROR[main]:     /home/genma/.minetest/mods/minetest/torches/init.lua:228: in function 'callback'
11:03:29: ERROR[main]:     ...ome/genma/src/minetest-0.4.9/bin/../builtin/item.lua:442: in function <...ome/genma/src/minetest-0.4.9/bin/../builtin/item.lua:380>
11:03:29: ERROR[main]:     (tail call): ?


I think the below is what's relevant:

minetest.get_node_or_nil(pos)
^ Returns nil for unloaded area


Could you check if this issue still occurs with lastest git version?
https://github.com/BlockMen/torches/
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Sun Apr 06, 2014 17:49

The error won't happen with the current version.
However, you shouldn't return at line #228.
It's possible, that some part of a map is still loaded. Thus you won't check "further" positions if one of your checks would return a nil. Thus some of nodes won't update.
 

gsmanners
Member
 
Posts: 159
Joined: Fri Jan 10, 2014 21:37

by gsmanners » Sun Apr 06, 2014 21:57

BlockMen wrote:Could you check if this issue still occurs with lastest git version?
https://github.com/BlockMen/torches/


I don't think the problem I saw is all that common or altogether easy to reproduce, but your fix there looks very similar to mine:

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
        local p = {x=pos.x+ix,y=pos.y+iy,z=pos.z+iz}
        local n = minetest.get_node_or_nil(p)
        if n then
            local fd = minetest.registered_nodes[n.name].update or nil


etc...
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Mon Apr 07, 2014 06:32

gsmanners wrote:...

Now this is a better solution.
Last edited by 4aiman on Mon Apr 07, 2014 06:32, edited 1 time in total.
 

xaGe
New member
 
Posts: 1
Joined: Wed Apr 09, 2014 02:49

by xaGe » Wed Apr 09, 2014 04:18

Thanks for the mod. The latest git version seems to work just fine so far with latest minetest compiled from git.
 

User avatar
JPRuehmann
Member
 
Posts: 334
Joined: Fri Mar 21, 2014 21:40

by JPRuehmann » Wed Apr 09, 2014 10:11

have just installed the latest version of torches
got the following error by hitting an unknown block.

12:09:15: ERROR[main]: ServerError: /home/ruehmann/.minetest/mods/torches/init.lua:229: attempt to index field '?' (a nil value)
12:09:15: ERROR[main]: stack traceback:
12:09:15: ERROR[main]: /home/ruehmann/.minetest/mods/torches/init.lua:229: in function 'callback'
12:09:15: ERROR[main]: /usr/share/minetest/builtin/item.lua:455: in function </usr/share/minetest/builtin/item.lua:393>
12:09:15: ERROR[main]: (tail call): ?

Thanks,
JPR
 

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

by BlockMen » Wed Apr 09, 2014 11:13

gsmanners wrote:Just saw another one:

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
11:03:29: ERROR[main]: ServerError: /home/genma/.minetest/mods/minetest/torches/init.lua:228: attempt to index local 'n' (a nil value)
11:03:29: ERROR[main]: stack traceback:
11:03:29: ERROR[main]:     /home/genma/.minetest/mods/minetest/torches/init.lua:228: in function 'callback'
11:03:29: ERROR[main]:     ...ome/genma/src/minetest-0.4.9/bin/../builtin/item.lua:442: in function <...ome/genma/src/minetest-0.4.9/bin/../builtin/item.lua:380>
11:03:29: ERROR[main]:     (tail call): ?


JPRuehmann wrote:have just installed the latest version of torches
got the following error by hitting an unknown block.

12:09:15: ERROR[main]: ServerError: /home/ruehmann/.minetest/mods/torches/init.lua:229: attempt to index field '?' (a nil value)
12:09:15: ERROR[main]: stack traceback:
12:09:15: ERROR[main]: /home/ruehmann/.minetest/mods/torches/init.lua:229: in function 'callback'
12:09:15: ERROR[main]: /usr/share/minetest/builtin/item.lua:455: in function </usr/share/minetest/builtin/item.lua:393>
12:09:15: ERROR[main]: (tail call): ?

Thanks,
JPR


Both fixed in 1.3.2
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Torches [1.3.2] [torches]

by Minetestforfun » Thu Sep 18, 2014 12:43

Please, look at my screenshots, this is normal ?
I haven't the same texture like you in your first post...
I really prefer your textures ! :)

http://imgur.com/nZIOjVQ
http://imgur.com/AzqKbi5
 

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

Re: [Mod] Torches [1.3.2] [torches]

by BlockMen » Fri Sep 19, 2014 19:36

Minetestforfun wrote:Please, look at my screenshots, this is normal ?
I haven't the same texture like you in your first post...
I really prefer your textures ! :)

http://imgur.com/nZIOjVQ
http://imgur.com/AzqKbi5


Do you mean that everything looks blurred? If so, turn off the anisotropic filter, bilinear filter and trilinear filter
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Torches [1.3.2] [torches]

by Minetestforfun » Mon Sep 22, 2014 09:40

Indeed, my bad... Sorry...
 

Rochambeau
Member
 
Posts: 68
Joined: Tue Sep 23, 2014 11:37

Re: [Mod] Torches [1.3.2] [torches]

by Rochambeau » Sun Dec 07, 2014 18:03

I think i found a bug: when i right click a door while holding a torch, the torch is placed at the door.

It doesn't happen with default torches or carbones torches for example.
 

User avatar
stormchaser3000
Member
 
Posts: 407
Joined: Sun Oct 06, 2013 21:02

Re: [Mod] Torches [1.3.2] [torches]

by stormchaser3000 » Mon Dec 08, 2014 09:51

how about uinsg the mesh drawtype
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: [Mod] Torches [1.3.2] [torches]

by philipbenr » Mon Dec 08, 2014 14:52

@Stormchaser3000: There is no support for animation, I don't think.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Torches [1.3.2] [torches]

by Nathan.S » Tue Dec 09, 2014 00:59

philipbenr wrote:@Stormchaser3000: There is no support for animation, I don't think.


Not animation of the mesh, but if you use an animated texture you can have flames, or you could try using actual particles, but I have no idea how those work.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

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

Re: [Mod] Torches [2.0] [torches]

by BlockMen » Mon Feb 16, 2015 10:33

Update. Version 2.0 released

Changelog:
- Use new mesh drawtype to improve wallmounted torches
- Update particle-usage/API
- New textures; flame texture fix by Yepoleb
- Fix for doors, chests, etc (rightclick support)
 

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

by BlockMen » Tue Feb 24, 2015 09:10

Update. Version 2.1 released

Changelog:
- Fix wallmounted torch mesh
- Cleanup code, use wallmounted paramtype2
- Fix torches being placeable on ceilings (reported by kilbith)
 

guideahon
Member
 
Posts: 37
Joined: Mon Jan 26, 2015 12:49
In-game: guideahon

Re: [Mod] Torches [2.1] [torches]

by guideahon » Tue Feb 24, 2015 11:39

Great mod as always, are you planning on making it non able to be put on water? if that would be the case, this mod should be ported to default minetest game because i would consider this mod perfect
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Torches [2.1] [torches]

by Minetestforfun » Tue Feb 24, 2015 23:16

guideahon wrote:Great mod as always, are you planning on making it non able to be put on water? if that would be the case, this mod should be ported to default minetest game because i would consider this mod perfect


I agree, this mod seems to be almost perfect (beautiful meshe, bugfixs for doors now, great wallmounted, great particles), the last thing i can blame was the "put on water", but many other torches mods have the same blame...
Last edited by Minetestforfun on Sat Feb 28, 2015 17:50, edited 1 time in total.
 

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

Re: [Mod] Torches [2.1] [torches]

by BlockMen » Thu Feb 26, 2015 18:24

guideahon wrote:Great mod as always, are you planning on making it non able to be put on water? if that would be the case, this mod should be ported to default minetest game because i would consider this mod perfect


Minetestforfun wrote:I agree, this mod seems to be almost perfect (beautiful meshe, bugfixs for doors now, great wallmounted, great particles), the last thing i can blame was the "put on water", but many over torches mods have the same blame...


Nice you guys like my mod, but this mod won't be added the way it currently is. The reason is the usage of the particles, which generates a lot of server traffic.
 

guideahon
Member
 
Posts: 37
Joined: Mon Jan 26, 2015 12:49
In-game: guideahon

Re: [Mod] Torches [2.1] [torches]

by guideahon » Thu Feb 26, 2015 22:31

But what if you make another version without particles and non-able to be put on water (i honestly, really want the second thing)
 

User avatar
Napiophelios
Member
 
Posts: 752
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Torches [2.1] [torches]

by Napiophelios » Fri Feb 27, 2015 02:14

guideahon wrote:But what if you make another version without particles and non-able to be put on water (i honestly, really want the second thing)


I cant remember what game I got this from, but it works pretty good;
I use it for torches, fire ,and candles in my custom game.
Its not a perfect solution, but its not a bad one either.

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:torch"},
   interval = 1.0,
   chance = 1,
   action = function(pos, node)
   local p = {x=pos.x, y=pos.y, z=pos.z-1}
local    n = minetest.get_node(p)

local    p1 = {x=pos.x+1, y=pos.y, z=pos.z}
local    n1 = minetest.get_node(p1)

local    p2 = {x=pos.x-1, y=pos.y, z=pos.z}
local    n2 = minetest.get_node(p2)

local    p3 = {x=pos.x, y=pos.y-1, z=pos.z}
local    n3 = minetest.get_node(p3)

local    p4 = {x=pos.x, y=pos.y, z=pos.z+1}
local    n4 = minetest.get_node(p4)

local    p5 = {x=pos.x, y=pos.y, z=pos.z}
local    n5 = minetest.get_node(p5)

      if (n.name == "default:water_source") then
         minetest.add_node(p5, {name="default:water_flowing"})
         minetest.add_item(p5,{name=n5})
      return end

            if (n.name == "default:water_flowing") then
               minetest.add_node(p5, {name="default:water_flowing"})
               minetest.add_item(p5,{name=n5})
   return end

   if (n1.name == "default:water_source") then
      minetest.add_node(p5, {name="default:water_flowing"})
      minetest.add_item(p5,{name=n5})
   return end

      if (n.name == "default:water_flowing") then
               minetest.add_node(p5, {name="default:water_flowing"})
               minetest.add_item(p5,{name=n5})
   return end

   if (n2.name == "default:water_source") then
      minetest.add_node(p5, {name="default:water_flowing"})
      minetest.add_item(p5,{name=n5})

   return end
      if (n.name == "default:water_flowing") then
               minetest.add_node(p5, {name="default:water_flowing"})
               minetest.add_item(p5,{name=n5})
   return end

   if (n3.name == "default:water_source") then
      minetest.add_node(p5, {name="default:water_flowing"})
      minetest.add_item(p5,{name=n5})
   return end

      if (n.name == "default:water_flowing") then
               minetest.add_node(p5, {name="default:water_flowing"})
               minetest.add_item(p5,{name=n5})
   return end

   if (n4.name == "default:water_source") then
      minetest.add_node(p5, {name="default:water_flowing"})
      minetest.add_item(p5,{name=n5})
   return end

      if (n.name == "default:water_flowing") then
               minetest.add_node(p5, {name="default:water_flowing"})
               minetest.add_item(p5,{name=n5})
   return end
   end,
})
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Torches [2.1] [torches]

by TenPlus1 » Fri Feb 27, 2015 11:35

Was thinking of using this in Ethereal, hope it helps (any water beside or above torch drops torch):

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:torch"},
   neighbors = {"default:water_source", "default:water_flowing"},
   interval = 1, chance = 1,

   action = function(pos, node)
      local pos0 = {x=pos.x-1,y=pos.y,z=pos.z-1}
      local pos1 = {x=pos.x+1,y=pos.y+1,z=pos.z+1}
      if #minetest.find_nodes_in_area(pos0, pos1,
         {"default:water_source", "default:water_flowing"}) > 0 then
         minetest.set_node(pos, {name="default:water_flowing"})
         minetest.add_item(pos, {name="default:torch"})
      end
   end,
})
Last edited by TenPlus1 on Fri Feb 27, 2015 12:01, edited 1 time in total.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 41 guests