Post your modding questions here

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

Re: Post your modding questions here

by BrunoMine » Fri Aug 05, 2016 19:48

1) Fast privilege can inhibit antcheater?
I want to allow players to run on my server, but I believe that this can open a security hole. Maybe I'm wrong and anticheater works normally.

2) It is possible to check whether it is possible to add a list of items simultaneously in the inventory of a player?
 

ozkur
Member
 
Posts: 180
Joined: Wed Oct 07, 2015 20:59
In-game: ozkur or XoRoUZ

Re: Post your modding questions here

by ozkur » Fri Aug 05, 2016 23:58

minetest.register_node("rocket:pod", {
description = " Rocket Control Pod",
tiles = {"top.png", "pad.png", "pod.png"},
groups = {cracky = 1},
on_punch = function(pos,node,player,pointed_thing)
tank = minetest.get_node({pos.x, pos.y-1, pos.z})
engine = minetest.get_node({pos.x, pos.y-2, pos.z})
pad = minetest.get_node({pos.x, pos.y-3, pos.z})
if tank == "rocket:tankfull" and engine == "rocket:engine" and pad == "rocket:pad" then
--player:get_pos(p)
--player:set_pos({p.x, 25000, p.z})
--player:set_physics_override(1, 1, 0.17)
--player:set_sky({0, 0, 0}, "skybox"})
--minetest.remove_node({pos.x, pos.y-1, pos.z})
--minetest.remove_node({pos.x, pos.y-2, pos.z})
--minetest.remove_node(pos)
minetest.chat_send_all("Hello World!")
end
end
})


i'm having troubles with get_node() Please help
Biplanes! 'Nuff said

I am a native English speaker, Ich spreche kein Deuscht, mais je parle un pue français.
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Post your modding questions here

by kaeza » Sat Aug 06, 2016 17:18

ozkur wrote:[...]
i'm having troubles with get_node() Please help

You are comparing a string to a table:
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
if tank == "rocket:tankfull" and ...

Looks like you want to compare the `name` field of the node:
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
if tank.name == "rocket:tankfull" and ...


Edit: For clarification: `get_node` returns a table, which you assign to `tank` here. Same with `engine` and others in that conditional.

As another tip, you most likely want to make `tank`, `engine`, etc. local to the function. This not only yields better performance (as slight as it may be), but it will prevent obscure bugs in the future should another mod need to use globals with those names.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

zorman2000
Member
 
Posts: 19
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: Post your modding questions here

by zorman2000 » Sat Aug 06, 2016 17:32

Hello,

I would like to know how to use minetest.register_on_player_receive_fields() when it is a node's formspec.
What would be the name of that form?

I know that with:
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.show_formspec(username, formname, formspec)

you specify a "formname" which usually is the way to detect on the callback. But how to do it when the formspec is set to a node? Like the following:

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 meta = minetest.get_meta(pos)
meta:set_string("formspec", formspec)


Does this formspec has a name?

Thanks,
zorman2000
 

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: Post your modding questions here

by Byakuren » Sat Aug 06, 2016 17:48

zorman2000 wrote:Hello,

I would like to know how to use minetest.register_on_player_receive_fields() when it is a node's formspec.
What would be the name of that form?

I know that with:
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.show_formspec(username, formname, formspec)

you specify a "formname" which usually is the way to detect on the callback. But how to do it when the formspec is set to a node? Like the following:

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 meta = minetest.get_meta(pos)
meta:set_string("formspec", formspec)


Does this formspec has a name?

Thanks,
zorman2000


No, also node formspecs don't trigger the global formspec callbacks, only the node's callback.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
cx384
Member
 
Posts: 249
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: Post your modding questions here

by cx384 » Sun Aug 07, 2016 07:10

old
Last edited by cx384 on Tue Aug 16, 2016 20:07, edited 1 time in total.
Can your read this?
 

ph8jPf9M
Member
 
Posts: 70
Joined: Sat Jul 16, 2016 10:29
GitHub: 22i

Re: Post your modding questions here

by ph8jPf9M » Wed Aug 10, 2016 07:28

how can i make drop item size bigger from the atachment to this https://youtu.be/DY6yVnyquxg?t=6m59s with particles and sound emiting from it?
Attachments
wizard magic folio.png
wizard magic folio.png (241.41 KiB) Viewed 3238 times
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

Re: Post your modding questions here

by BrunoMine » Fri Aug 12, 2016 02:11

Block I said goodbye.
Two major projects will be discontinued:
I use these mods on my server, but I need to change them. What are the best options to replace?
 

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: Post your modding questions here

by Byakuren » Fri Aug 12, 2016 02:55

BrunoMine wrote:Block I said goodbye.
Two major projects will be discontinued:
I use these mods on my server, but I need to change them. What are the best options to replace?

For HUD hunger there is hbhunger, which uses hudbars.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your modding questions here

by burli » Fri Aug 12, 2016 05:26

You can fork them
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Post your modding questions here

by azekill_DIABLO » Fri Aug 12, 2016 16:29

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 start_screen =
   "size[8,7;]"..
   default.gui_bg..
   default.gui_bg_img..
   default.gui_slots..
   "field[1,1;100,100;formtext;lol;default]"..
   default.get_hotbar_bg(0,2.85)

minetest.register_on_newplayer (function(player)
   minetest.show_formspec(player:get_player_name(), "start_screen", formspec)
end)


Can someone help me? it is supposed to make a formspec pop on first join, but it makes the game crashes.
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Post your modding questions here

by kaeza » Fri Aug 12, 2016 22:07

azekill_DIABLO 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
-- ...
minetest.show_formspec(player:get_player_name(), "start_screen", formspec)
-- ...


Can someone help me? it is supposed to make a formspec pop on first join, but it makes the game crashes.

Probably because the formspec argument is nil. I'll leave you to figure that out.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Post your modding questions here

by azekill_DIABLO » Sat Aug 13, 2016 08:34

i should use 'local formspec' no?
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

by Hybrid Dog » Sat Aug 13, 2016 12:24

You could put start_screen instead of formspec.

kaeza, maybe formspec is defined somewhere before that code and the crash is caused by a missing default mod
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Post your modding questions here

by azekill_DIABLO » Sat Aug 13, 2016 12:30

Missing default mod? i have it :) it's taken from mt game (not the lastest)

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 start_screen =
   "size[8,7;]"..
   default.gui_bg..
   "field[1,1;100,100;formtext;lol;default]"

minetest.register_on_newplayer (function(player)
   minetest.show_formspec(player:get_player_name(), "start_screen", formspec)
end


seems weird. it was shown like that on the dev wiki!

EDIT: ok i understand
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_on_newplayer (function(player)
   minetest.show_formspec(name, "start_screen",
      "size[8,7;]"..
      default.gui_bg..
      "field[1,1;100,100;formtext;lol;default]")
   end
end)


now says me: missing ') 'at line 7
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re:

by kaeza » Sun Aug 14, 2016 00:18

Hybrid Dog wrote:kaeza, maybe formspec is defined somewhere before that code and the crash is caused by a missing default mod

No. The error in the code is pretty obvious. I just gave him a hint so he actually reads his code and figures what he's doing wrong. It is fine to ask for solutions to problems, but the question sounded (to me, at least) like he's just copy-pasting without actually trying to understand the thing.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Post your modding questions here

by azekill_DIABLO » Sun Aug 14, 2016 08:15

thanks :|
(i dind't copy pasted the code and look at my second post: i corrected my first error but i won't understand the thing after that.)
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

by Hybrid Dog » Sun Aug 14, 2016 16:02

If you call a function you do not need to put an "end", e.g.
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
print"hello"
or
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.show_formspec(name, "start_screen", "size[8,7;]")
and not
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
print"hello"
end

but if you put a function you need an end, e.g.
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 a = function()
print"hello"
end
or
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_on_newplayer(function(player)
print"hello"
end)


Anyway, l assume your overlooked that there's an "end" after calling minetest.show_formspec in your code.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Post your modding questions here

by azekill_DIABLO » Sun Aug 14, 2016 17:39

oh? sorry and thanks :)
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
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Post your modding questions here

by ABJ » Mon Aug 15, 2016 10:27

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 def = {
   name = "grenade:explosion",
   description = "Grenade Explosion (you hacker you!)",
   radius = 3,
   tiles = {
      side = "default_dirt.png",
      top = "default_dirt.png",
      bottom = "default_dirt.png",
      burning = "default_dirt.png"
   },
}

tnt.register_tnt(def)



minetest.register_craftitem("grenade:grenade", {
   description = "Grenade",
   inventory_image = "default_coal_lump.png",
   on_use = function(itemstack, user, pointed_thing)
      local v = user:get_look_dir()
      local pos = user:getpos()
      pos.y = pos.y + 1.2

      local obj = minetest.add_entity(pos, "grenade:grenade_flight")
      obj:setvelocity({x = v.x * 4, y = v.y * 2 + 2, z = v.z * 4})
      obj:setacceleration({x = v.x / 4, y = v.y / 2 - 4, z = v.z / 4})

      itemstack:take_item()
      return itemstack
   end,
})

minetest.register_entity("grenade:grenade_flight", {
    physical = true,
   collide_with_objects = true,
   weight = 5,
   textures = {"default_coal_lump.png"},
   on_activate = function(self, staticdata)
      self.timer = 2
   end,
   on_step = function(self, dtime)
      local acc = self.object:getacceleration()
      self.object:setacceleration({x = acc.x * 2 / 4, y = acc.y, z = acc.z * 2 / 4})

      self.timer = self.timer + dtime
      if self.timer > 4 then
         tnt.boom(self.object:getpos(), def)
      end
   end,
})

minetest.register_craft({
    output = "grenade:grenade",
   recipe = {
            {"", "group:stick", ""},
          {"group:wood", "default:coal_lump", "group:wood"},
          {"", "group:wood", ""}
                
   }





})

My attempt at helping with everamzah's coal grenade mod.
Copy the code into an init.lua and open up minetest with mod enabled, type /giveme grenade:grenade 3. The first two grenades will work perfectly, but the last one, (in each stack) doesn't. It's mysterious and beyond me. How even is such a ridiculous bug possible?
Last edited by ABJ on Wed Aug 17, 2016 09:36, edited 2 times in total.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: Post your modding questions here

by TumeniNodes » Mon Aug 15, 2016 19:42

ABJ 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
local def = {
   name = "grenade:explosion",
   description = "Grenade Explosion (you hacker you!)",
   radius = 3,
   tiles = {
      side = "default_dirt.png",
      top = "default_dirt.png",
      bottom = "default_dirt.png",
      burning = "default_dirt.png"
   },
}

tnt.register_tnt(def)



minetest.register_craftitem("grenade:grenade", {
   description = "Grenade",
   inventory_image = "default_coal_lump.png",
   on_use = function(itemstack, user, pointed_thing)
      local v = user:get_look_dir()
      local pos = user:getpos()
      pos.y = pos.y + 1.2

      local obj = minetest.add_entity(pos, "grenade:grenade_flight")
      obj:setvelocity({x = v.x * 4, y = v.y * 2 + 2, z = v.z * 4})
      obj:setacceleration({x = v.x / 4, y = v.y / 2 - 4, z = v.z / 4})

      itemstack:take_item()
      return itemstack
   end,
})

minetest.register_entity("grenade:grenade_flight", {
    physical = true,
   collide_with_objects = true,
   weight = 5,
   textures = {"default_coal_lump.png"},
   on_activate = function(self, staticdata)
      self.timer = 2
   end,
   on_step = function(self, dtime)
      local acc = self.object:getacceleration()
      self.object:setacceleration({x = acc.x * 2 / 4, y = acc.y, z = acc.z * 2 / 4})

      self.timer = self.timer + dtime
      if self.timer > 4 then
         tnt.boom(self.object:getpos(), def)
      end
   end,
})

minetest.register_craft({
    output = "grenade:grenade",
   recipe = {
            {"", "group:stick", ""},
          {"group:wood", "default:coal_lump", "group:wood"},
          {"", "group:wood", ""}
                
   }





})

My attempt at helping with everamzah's coal grenade mod.
Copy the code into an init.lua and open up minetest with mod enabled, type /giveme grenade:grenade 3. The first two grenades will work perfectly, but the last one, (in each stack) doesn't. It's mysterious and beyond me. How even is such a ridiculous bug possible?

I don't have an answer but, it could be considered a feature because it is realistic :D This actually happens in real life...
Flick?... Flick who?
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Post your modding questions here

by ABJ » Tue Aug 16, 2016 00:01

What the?
How is this realistic? Do people in real life have to "stack" grenades for them to work? LOL
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: Post your modding questions here

by DS-minetest » Tue Aug 16, 2016 14:12

is it possible to attach a particlespawner to an object (0.4.14-dev)? if yes, how?
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: Post your modding questions here

by Byakuren » Tue Aug 16, 2016 17:25

No, not yet. There is a PR (https://github.com/minetest/minetest/pull/4409) but it has not been pulled.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: Post your modding questions here

by DS-minetest » Tue Aug 16, 2016 19:24

ok, thx
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Post your modding questions here

by ABJ » Wed Aug 17, 2016 09:36

:( Why TumeniNodes?
Now I'm just gonna have to repeat my question.
ABJ 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
local def = {
   name = "grenade:explosion",
   description = "Grenade Explosion (you hacker you!)",
   radius = 3,
   tiles = {
      side = "default_dirt.png",
      top = "default_dirt.png",
      bottom = "default_dirt.png",
      burning = "default_dirt.png"
   },
}

tnt.register_tnt(def)



minetest.register_craftitem("grenade:grenade", {
   description = "Grenade",
   inventory_image = "default_coal_lump.png",
   on_use = function(itemstack, user, pointed_thing)
      local v = user:get_look_dir()
      local pos = user:getpos()
      pos.y = pos.y + 1.2

      local obj = minetest.add_entity(pos, "grenade:grenade_flight")
      obj:setvelocity({x = v.x * 4, y = v.y * 2 + 2, z = v.z * 4})
      obj:setacceleration({x = v.x / 4, y = v.y / 2 - 4, z = v.z / 4})

      itemstack:take_item()
      return itemstack
   end,
})

minetest.register_entity("grenade:grenade_flight", {
    physical = true,
   collide_with_objects = true,
   weight = 5,
   textures = {"default_coal_lump.png"},
   on_activate = function(self, staticdata)
      self.timer = 2
   end,
   on_step = function(self, dtime)
      local acc = self.object:getacceleration()
      self.object:setacceleration({x = acc.x * 2 / 4, y = acc.y, z = acc.z * 2 / 4})

      self.timer = self.timer + dtime
      if self.timer > 4 then
         tnt.boom(self.object:getpos(), def)
      end
   end,
})

minetest.register_craft({
    output = "grenade:grenade",
   recipe = {
            {"", "group:stick", ""},
          {"group:wood", "default:coal_lump", "group:wood"},
          {"", "group:wood", ""}
                
   }





})

My attempt at helping with everamzah's coal grenade mod.
Copy the code into an init.lua and open up minetest with mod enabled, type /giveme grenade:grenade 3. The first two grenades will work perfectly, but the last one, (in each stack) doesn't. It's mysterious and beyond me. How even is such a ridiculous bug possible?
 

KCoombes
Member
 
Posts: 278
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt or Rudilyn

Re: Post your modding questions here

by KCoombes » Wed Aug 17, 2016 10:59

I'm getting a strange crash to desktop after an on_punch function. Debug shows 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
2016-08-17 06:57:07: INFO[Main]: OpenALSoundManager: Creating playing sound
2016-08-17 06:57:08: INFO[Main]: Left button released (stopped digging)
2016-08-17 06:57:08: INFO[Main]: Client::addUpdateMeshTaskForNode(): (5,5,32)
2016-08-17 06:57:10: INFO[Main]: collisionMoveSimple: maximum step interval exceeded, lost movement details!


Any suggestions?
 

zorman2000
Member
 
Posts: 19
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: Post your modding questions here

by zorman2000 » Thu Aug 18, 2016 21:39

Hi all,

Anyone who knows this information will help me a lot!

Is there a limit to the "interval" property when registering an Active Block Modifier? I have registered an ABM and would like it to run every 0.2 seconds or similar with a chance of 1 (I know this could be laggy but the blocks are very limited) and replace a block and set another. However, when I test, I see that blocks are being set at an aprox. 1 second interval.

Is there an internal limit to the ABM interval?

Thanks,
zorman2000
 

User avatar
pithy
Member
 
Posts: 252
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

Re: Post your modding questions here

by pithy » Thu Aug 18, 2016 22:08

zorman2000 wrote:Hi all,

Anyone who knows this information will help me a lot!

Is there a limit to the "interval" property when registering an Active Block Modifier? I have registered an ABM and would like it to run every 0.2 seconds or similar with a chance of 1 (I know this could be laggy but the blocks are very limited) and replace a block and set another. However, when I test, I see that blocks are being set at an aprox. 1 second interval.

Is there an internal limit to the ABM interval?

Thanks,
zorman2000

Yes ABMs have a 1 second interval limit. You can use LBMs and globalsteps to get around this.
See my wireworld mod for an example.
 

zorman2000
Member
 
Posts: 19
Joined: Tue Jul 26, 2016 18:18
GitHub: hkzorman
In-game: zorman2000

Re: Post your modding questions here

by zorman2000 » Fri Aug 19, 2016 03:14

pithy wrote:Yes ABMs have a 1 second interval limit. You can use LBMs and globalsteps to get around this.
See my wireworld mod for an example.


Thanks! I have thought of doing it through globalstep... will try! Thanks for your mod as reference!
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 9 guests

cron