Page 1 of 2

[Mod] More Commands! [1.0.11] [morecommands]

PostPosted: Sat Sep 03, 2016 19:07
by bigfoot547
Hello! This is my first mod that I have made for minetest that I have posted!
This mod adds 22 new commands to minetest.
A full list of these commands can be seen here.
It is suggested that you use minetest 0.4.14 because I wrote the mod in that version.

BUGS:
You can use github or the comments to submit a bug report.
Pre 0.1.2: The game will crash when you use the /vanish command incorrectly.

Suggestions:
If you have an idea for a command, or any other development idea, feel free to post them in the comments!

+ Features

+ Planned Features


License:
Code: LGPL v2.1+
Textures & Models: CC-BY 3.0+ Unported

Mod Dependencies:
  • default
  • beds

Optional Dependencies:
rank | Forum topic - Github

Downloads:
Download
or
Or browse the code on github

+ Changelog


Credits:

/back API:
  • Add morecommands to depends.txt
  • Before your mod teleports the player, set back_pos[name] to the player's rounded position, replacing name with the player's name.

Image Image Image

Re: [Mod] More Commands! [0.1] [morecommands]

PostPosted: Sat Sep 03, 2016 19:56
by MineYoshi
Nice!
+1000!
Those commands look very useful for admins.

EDIT: I really like the "command_feedback"... Great work!

Re: [Mod] More Commands! [0.1] [morecommands]

PostPosted: Sat Sep 03, 2016 20:19
by D00Med
Nice mod!

Re: [Mod] More Commands! [0.1] [morecommands]

PostPosted: Sat Sep 03, 2016 20:34
by bigfoot547
Thank you for your support!

MineYoshi wrote:EDIT: I really like the "command_feedback"... Great work!


I also have "enable_forced_command_feedback" for the /sudo command that looks like this: [<name>: Forced target to run command "<command> <arguments>".]

EDIT: Added to 1st topic.

Re: [Mod] More Commands! [0.1] [morecommands]

PostPosted: Sun Sep 04, 2016 13:38
by azekill_DIABLO
+1

Re: [Mod] More Commands! [0.1.1] [morecommands]

PostPosted: Sun Sep 04, 2016 23:32
by bigfoot547
Updated to 0.1.2. Crash bug fixed.

Re: [Mod] More Commands! [0.1.2] [morecommands]

PostPosted: Mon Sep 05, 2016 20:43
by Wuzzy
There are some redundant commands:
Tell a player something privately using the /tell command

We already have /msg.

Say something to the whole server using the /say command

This is called “chat”. Its when you write something without a leading slash. :P

List the players on the server using the /list command

Overlaps with /status, although /status is a bit cryptic to read. Maybe Minetest's output should be improved here.

And many of the player commands like /kill have probably implemented 1000 times in other mods, so there is potential overlap (example: playertools).

It is likely there will be more “double commands” when using this mod with another chat command registering mod. Can you somehow try to avoid this situation?

But I still think this mod can be useful for testing and on servers. Not really useful fore me however, as I will simply use /lua from luacmd and I don't moderate any server.

Re: [Mod] More Commands! [0.1.2] [morecommands]

PostPosted: Thu Sep 08, 2016 03:36
by bigfoot547
Wuzzy wrote:There are some redundant commands:
Tell a player something privately using the /tell command

We already have /msg.

Say something to the whole server using the /say command

This is called “chat”. Its when you write something without a leading slash. :P


Thank you for the input. I am planning on replacing the /tell and /say commands with the /drop and /fnode command to spawn dropped items and falling nodes.

Re: [Mod] More Commands! [0.1.2] [morecommands]

PostPosted: Thu Sep 08, 2016 23:54
by MineYoshi
bigfoot547 wrote:
Wuzzy wrote:There are some redundant commands:
Tell a player something privately using the /tell command

We already have /msg.

Say something to the whole server using the /say command

This is called “chat”. Its when you write something without a leading slash. :P


Thank you for the input. I am planning on replacing the /tell and /say commands with the /drop and /fnode command to spawn dropped items and falling nodes.

Good idea.

Re: [Mod] More Commands! [0.2.0] [morecommands]

PostPosted: Mon Sep 12, 2016 03:02
by bigfoot547
Mod updated to 0.2.0.
Requesting mod be put into mod releases.

Re: [Mod] More Commands! [0.2.0] [morecommands]

PostPosted: Thu Sep 15, 2016 21:49
by orwell
Here some suggestions on what to do.
These come from my private mod in which I just hack everything I need.
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
--an easy way to try if and after what time the server is answering
core.register_chatcommand("ping", {
   params = "",
   description = "Ping",
   privs = {},
   func = function(name, param)
      return true, "Pong!"
   end,
})

core.register_chatcommand("ilist", {
   params = "[search term]",
   description = "Find item names or list all items",
   privs = {},
   func = function(name, param)
      --minetest.chat_send_player(name, "")
      local parami=""
      if param~=nil then
         parami=param
      end
      minetest.chat_send_player(name,"------------------------nodes")
      for n, i in pairs(core.registered_nodes) do
         if string.find(n, parami, 1, true) then
            minetest.chat_send_player(name, n)
         end
      end
      minetest.chat_send_player(name,"------------------------tools")
      for n, i in pairs(core.registered_tools) do
         if string.find(n, parami, 1, true) then
            minetest.chat_send_player(name, n)
         end
      end
      minetest.chat_send_player(name,"------------------------craftitems")
      for n, i in pairs(core.registered_craftitems) do
         if string.find(n, parami, 1, true) then
            minetest.chat_send_player(name, n)
         end
      end

   end,
})

--can be useful in combination with unknown items from which you want to know what they are.
core.register_chatcommand("pwii", {
   description = "print wielded item",
   params = "",
   privs = {},
   func = function(name, param)
      local player_sao=minetest.get_player_by_name(name)
      local wielditem=player_sao:get_wielded_item()
      if not wielditem then return true, "PWII: No Item" end
      return true, "PWII: "..wielditem:get_name().." "..wielditem:get_count()
   end,
})

--pure get_player_information call
core.register_chatcommand("pinfo", {
   description = "print info about player",
   params = "player_name",
   privs = {server=true},
   func = function(name, param)
      return true, param.." ->"..dump(minetest.get_player_information(param)) or "No player or serialisation failed."
   end,
})

--2 tools that make life easier
minetest.register_tool("morecmds:admintool", {
   description = "Admin tool. Left click object/node: remove without any check. Right click node: remove node ad adjacent position (useful for non-pointable nodes)",
   inventory_image = "morecmds_admintool.png",
   groups={not_in_creative_inventory=1},
   on_use = function(itemstack, user, pointed_thing)
      if not user then return end
      local has_privs, missing_privs = core.check_player_privs(user:get_player_name(), {server=true})
      if not has_privs then
         minetest.chat_send_player(user:get_player_name(), "You are a cheater!")
         return itemstack:take_item()
      end

      if pointed_thing.type == "node" then
         if pointed_thing.under then
            minetest.set_node(pointed_thing.under, {name="air"})
         end
      elseif pointed_thing.type == "object" then
         if pointed_thing.ref then
            pointed_thing.ref:remove()
         end
      end
      return itemstack
   end,
   on_place = function(itemstack, user, pointed_thing)
      if not user then return end

      local has_privs, missing_privs = core.check_player_privs(user:get_player_name(), {server=true})
      if not has_privs then
         minetest.chat_send_player(user:get_player_name(), "You are a cheater!")
         return itemstack:take_item()
      end

      if pointed_thing.type == "node" then
         if pointed_thing.above then
            minetest.set_node(pointed_thing.above, {name="air"})
         end
      end
      return itemstack
   end,
})
minetest.register_tool("morecmds:infotool", {
   description = "Info tool. Left click node to get information.",
   inventory_image = "morecmds_admintool.png",
   groups={not_in_creative_inventory=1},
   on_use = function(itemstack, user, pointed_thing)
      if not user then return end
      local has_privs, missing_privs = core.check_player_privs(user:get_player_name(), {server=true})
      if not has_privs then
         minetest.chat_send_player(user:get_player_name(), "You are a cheater!")
         return itemstack:take_item()
      end
      
      if pointed_thing.type == "node" then
         if pointed_thing.under then
            minetest.chat_send_player(user:get_player_name(), "Node at "..minetest.pos_to_string(pointed_thing.under)..": "..(dump(minetest.get_node_or_nil(pointed_thing.under))))
            return itemstack
         end
      end
      return itemstack
   end,
})

--formspec broadcaster
core.register_chatcommand("broadcast", {
   description = "open broadcasting formspec with a huge text area. have fun while typing in text.",
   params = "<text>",
   privs = {server=true},
   func = function(name, param)
      print(name.." broadcasted "..param)
      for _, objref in pairs(minetest.get_connected_players()) do
         minetest.show_formspec(objref:get_player_name(), "broadcast", "size[11,10]textarea[0.5,0.5;10.5,10;maintext;Broadcast message from "..name..";"..param.."]button_exit[4,9;4,1;end;OK]")
      end
   end,
})
--formspec broadcaster
core.register_chatcommand("showtext", {
   description = "open formspec with a huge text area at player. have fun while typing in text.",
   params = "<player> <text>",
   privs = {server=true},
   func = function(name, param)
      local key,val=string.match(param, "^([^%s]+)%s?(.*)$")
      if minetest.get_player_by_name(key) then
         minetest.show_formspec(key, "broadcast", "size[11,10]textarea[0.5,0.5;10.5,10;maintext;;"..val.."]button_exit[4,9;4,1;end;OK]")
      end
   end,
})

--get/set metadata. TODO: improve, atm they use the stand-pos of the player
core.register_chatcommand("getmeta", {
   params = "",
   description = "get meta key of underlying node",
   privs = {server=true},
   func = function(name, param)
      local posi=core.get_player_by_name(name):getpos()
      posi.x=math.floor(posi.x+0.5)
      posi.y=math.floor(posi.y+1)
      posi.z=math.floor(posi.z+0.5)
      local meta=minetest.get_meta(posi)
      if meta then
         local prev="<not set>"
         if meta:get_string(param) and meta:get_string(param)~="" then
            prev=meta:get_string(param)
         end
         return true,param.." of "..minetest.pos_to_string(posi)..": "..prev
      end
      return false,"No metadata at "..minetest.pos_to_string(posi)
   end,
})

core.register_chatcommand("setmeta", {
   params = "",
   description = "set meta of underlying node",
   privs = {server=true},
   func = function(name, param)
      local key,val=string.match(param, "^([^%s]+)%s?(.*)$")
      if not key or not val then
         return false,"invalid parameters!"
      end
      local posi=core.get_player_by_name(name):getpos()
      posi.x=math.floor(posi.x+0.5)
      posi.y=math.floor(posi.y+1)
      posi.z=math.floor(posi.z+0.5)
      local meta=minetest.get_meta(posi)
      if meta then
         local prev="<not set>"
         if meta:get_string(key) and meta:get_string(key)~="" then
            prev=meta:get_string(key)
         end
         meta:set_string(key, val or "")
         return true,"Set "..key.." of node "..minetest.pos_to_string(posi).." to "..val..". Previous value: "..prev
      end
      return false,"No metadata at "..minetest.pos_to_string(posi)
   end,
})
core.register_chatcommand("dumpmeta", {
   params = "",
   description = "dump meta of underlying node",
   privs = {server=true},
   func = function(name, param)
   local posi=core.get_player_by_name(name):getpos()
   posi.x=math.floor(posi.x+0.5)
   posi.y=math.floor(posi.y+1)
   posi.z=math.floor(posi.z+0.5)
   local meta=minetest.get_meta(posi)
   if meta then
      return true,dump(meta:to_table())
   end
   return false,"No metadata at "..minetest.pos_to_string(posi)
end,
})

--register command aliases:
--introduce some short names for commands you use often
morecmds_rca=function(name, from)
   if minetest.chatcommands[from] then
      minetest.register_chatcommand(name, minetest.chatcommands[from])
   end
end
minetest.after(0,function()
morecmds_rca("tp", "teleport")
morecmds_rca("gm", "giveme")
morecmds_rca("g", "give")
morecmds_rca("sd", "shutdown")
morecmds_rca("il", "ilist")
morecmds_rca("l", "list")
morecmds_rca("k", "kick")
morecmds_rca("b", "ban")
morecmds_rca("ub", "unban")
morecmds_rca("bc", "broadcast")
morecmds_rca("mbc", "mbbcast")
morecmds_rca("pv", "pulverize")
morecmds_rca("gt", "grant")
morecmds_rca("rv", "revoke")
end)

maybe you'll find it useful.

Re: [Mod] More Commands! [0.2.0] [morecommands]

PostPosted: Fri Sep 16, 2016 03:17
by bigfoot547
orwell wrote:Here some suggestions on what to do.
These come from my private mod in which I just hack everything I need.
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
--an easy way to try if and after what time the server is answering
core.register_chatcommand("ping", {
   params = "",
   description = "Ping",
   privs = {},
   func = function(name, param)
      return true, "Pong!"
   end,
})

core.register_chatcommand("ilist", {
   params = "[search term]",
   description = "Find item names or list all items",
   privs = {},
   func = function(name, param)
      --minetest.chat_send_player(name, "")
      local parami=""
      if param~=nil then
         parami=param
      end
      minetest.chat_send_player(name,"------------------------nodes")
      for n, i in pairs(core.registered_nodes) do
         if string.find(n, parami, 1, true) then
            minetest.chat_send_player(name, n)
         end
      end
      minetest.chat_send_player(name,"------------------------tools")
      for n, i in pairs(core.registered_tools) do
         if string.find(n, parami, 1, true) then
            minetest.chat_send_player(name, n)
         end
      end
      minetest.chat_send_player(name,"------------------------craftitems")
      for n, i in pairs(core.registered_craftitems) do
         if string.find(n, parami, 1, true) then
            minetest.chat_send_player(name, n)
         end
      end

   end,
})

--can be useful in combination with unknown items from which you want to know what they are.
core.register_chatcommand("pwii", {
   description = "print wielded item",
   params = "",
   privs = {},
   func = function(name, param)
      local player_sao=minetest.get_player_by_name(name)
      local wielditem=player_sao:get_wielded_item()
      if not wielditem then return true, "PWII: No Item" end
      return true, "PWII: "..wielditem:get_name().." "..wielditem:get_count()
   end,
})

--pure get_player_information call
core.register_chatcommand("pinfo", {
   description = "print info about player",
   params = "player_name",
   privs = {server=true},
   func = function(name, param)
      return true, param.." ->"..dump(minetest.get_player_information(param)) or "No player or serialisation failed."
   end,
})

--2 tools that make life easier
minetest.register_tool("morecmds:admintool", {
   description = "Admin tool. Left click object/node: remove without any check. Right click node: remove node ad adjacent position (useful for non-pointable nodes)",
   inventory_image = "morecmds_admintool.png",
   groups={not_in_creative_inventory=1},
   on_use = function(itemstack, user, pointed_thing)
      if not user then return end
      local has_privs, missing_privs = core.check_player_privs(user:get_player_name(), {server=true})
      if not has_privs then
         minetest.chat_send_player(user:get_player_name(), "You are a cheater!")
         return itemstack:take_item()
      end

      if pointed_thing.type == "node" then
         if pointed_thing.under then
            minetest.set_node(pointed_thing.under, {name="air"})
         end
      elseif pointed_thing.type == "object" then
         if pointed_thing.ref then
            pointed_thing.ref:remove()
         end
      end
      return itemstack
   end,
   on_place = function(itemstack, user, pointed_thing)
      if not user then return end

      local has_privs, missing_privs = core.check_player_privs(user:get_player_name(), {server=true})
      if not has_privs then
         minetest.chat_send_player(user:get_player_name(), "You are a cheater!")
         return itemstack:take_item()
      end

      if pointed_thing.type == "node" then
         if pointed_thing.above then
            minetest.set_node(pointed_thing.above, {name="air"})
         end
      end
      return itemstack
   end,
})
minetest.register_tool("morecmds:infotool", {
   description = "Info tool. Left click node to get information.",
   inventory_image = "morecmds_admintool.png",
   groups={not_in_creative_inventory=1},
   on_use = function(itemstack, user, pointed_thing)
      if not user then return end
      local has_privs, missing_privs = core.check_player_privs(user:get_player_name(), {server=true})
      if not has_privs then
         minetest.chat_send_player(user:get_player_name(), "You are a cheater!")
         return itemstack:take_item()
      end
      
      if pointed_thing.type == "node" then
         if pointed_thing.under then
            minetest.chat_send_player(user:get_player_name(), "Node at "..minetest.pos_to_string(pointed_thing.under)..": "..(dump(minetest.get_node_or_nil(pointed_thing.under))))
            return itemstack
         end
      end
      return itemstack
   end,
})

--formspec broadcaster
core.register_chatcommand("broadcast", {
   description = "open broadcasting formspec with a huge text area. have fun while typing in text.",
   params = "<text>",
   privs = {server=true},
   func = function(name, param)
      print(name.." broadcasted "..param)
      for _, objref in pairs(minetest.get_connected_players()) do
         minetest.show_formspec(objref:get_player_name(), "broadcast", "size[11,10]textarea[0.5,0.5;10.5,10;maintext;Broadcast message from "..name..";"..param.."]button_exit[4,9;4,1;end;OK]")
      end
   end,
})
--formspec broadcaster
core.register_chatcommand("showtext", {
   description = "open formspec with a huge text area at player. have fun while typing in text.",
   params = "<player> <text>",
   privs = {server=true},
   func = function(name, param)
      local key,val=string.match(param, "^([^%s]+)%s?(.*)$")
      if minetest.get_player_by_name(key) then
         minetest.show_formspec(key, "broadcast", "size[11,10]textarea[0.5,0.5;10.5,10;maintext;;"..val.."]button_exit[4,9;4,1;end;OK]")
      end
   end,
})

--get/set metadata. TODO: improve, atm they use the stand-pos of the player
core.register_chatcommand("getmeta", {
   params = "",
   description = "get meta key of underlying node",
   privs = {server=true},
   func = function(name, param)
      local posi=core.get_player_by_name(name):getpos()
      posi.x=math.floor(posi.x+0.5)
      posi.y=math.floor(posi.y+1)
      posi.z=math.floor(posi.z+0.5)
      local meta=minetest.get_meta(posi)
      if meta then
         local prev="<not set>"
         if meta:get_string(param) and meta:get_string(param)~="" then
            prev=meta:get_string(param)
         end
         return true,param.." of "..minetest.pos_to_string(posi)..": "..prev
      end
      return false,"No metadata at "..minetest.pos_to_string(posi)
   end,
})

core.register_chatcommand("setmeta", {
   params = "",
   description = "set meta of underlying node",
   privs = {server=true},
   func = function(name, param)
      local key,val=string.match(param, "^([^%s]+)%s?(.*)$")
      if not key or not val then
         return false,"invalid parameters!"
      end
      local posi=core.get_player_by_name(name):getpos()
      posi.x=math.floor(posi.x+0.5)
      posi.y=math.floor(posi.y+1)
      posi.z=math.floor(posi.z+0.5)
      local meta=minetest.get_meta(posi)
      if meta then
         local prev="<not set>"
         if meta:get_string(key) and meta:get_string(key)~="" then
            prev=meta:get_string(key)
         end
         meta:set_string(key, val or "")
         return true,"Set "..key.." of node "..minetest.pos_to_string(posi).." to "..val..". Previous value: "..prev
      end
      return false,"No metadata at "..minetest.pos_to_string(posi)
   end,
})
core.register_chatcommand("dumpmeta", {
   params = "",
   description = "dump meta of underlying node",
   privs = {server=true},
   func = function(name, param)
   local posi=core.get_player_by_name(name):getpos()
   posi.x=math.floor(posi.x+0.5)
   posi.y=math.floor(posi.y+1)
   posi.z=math.floor(posi.z+0.5)
   local meta=minetest.get_meta(posi)
   if meta then
      return true,dump(meta:to_table())
   end
   return false,"No metadata at "..minetest.pos_to_string(posi)
end,
})

--register command aliases:
--introduce some short names for commands you use often
morecmds_rca=function(name, from)
   if minetest.chatcommands[from] then
      minetest.register_chatcommand(name, minetest.chatcommands[from])
   end
end
minetest.after(0,function()
morecmds_rca("tp", "teleport")
morecmds_rca("gm", "giveme")
morecmds_rca("g", "give")
morecmds_rca("sd", "shutdown")
morecmds_rca("il", "ilist")
morecmds_rca("l", "list")
morecmds_rca("k", "kick")
morecmds_rca("b", "ban")
morecmds_rca("ub", "unban")
morecmds_rca("bc", "broadcast")
morecmds_rca("mbc", "mbbcast")
morecmds_rca("pv", "pulverize")
morecmds_rca("gt", "grant")
morecmds_rca("rv", "revoke")
end)

maybe you'll find it useful.


Thank you very much for the suggestions!
I would love to feature these!

I have a question: May I use these verbatim under the LGPL v2.1+ while giving you credits?

Re: [Mod] More Commands! [0.2.1] [morecommands]

PostPosted: Fri Sep 16, 2016 06:05
by orwell
yes, you may.

Re: [Mod] More Commands! [1.0.1] [morecommands]

PostPosted: Fri Sep 23, 2016 00:56
by bigfoot547
Warning! Please update to 1.0.1!
There have been countless bug fixes since then!

Re: [Mod] More Commands! [1.0.1] [morecommands]

PostPosted: Fri Sep 23, 2016 14:43
by azekill_DIABLO
nice:)

Re: [Mod] More Commands! [1.0.4] [morecommands]

PostPosted: Mon Oct 17, 2016 20:01
by bigfoot547
Changed version to 1.0.4.
Changelog: Add support for the rank mod with the /nick command.

Oh, yeah. *BUMP*

Re: [Mod] More Commands! [1.0.4] [morecommands]

PostPosted: Mon Oct 17, 2016 20:17
by azekill_DIABLO
/nick. sounds weird for a french people.

Re: [Mod] More Commands! [1.0.5] [morecommands]

PostPosted: Thu Oct 20, 2016 20:33
by bigfoot547
Changed to version 1.0.5

Re: [Mod] More Commands! [1.0.5] [morecommands]

PostPosted: Mon Oct 31, 2016 01:09
by bigfoot547
Changed to version 1.0.6

Re: [Mod] More Commands! [1.0.7] [morecommands]

PostPosted: Wed Nov 09, 2016 04:29
by bigfoot547
Changed to version 1.0.7

Re: [Mod] More Commands! [1.0.8] [morecommands]

PostPosted: Fri Jan 13, 2017 21:36
by bigfoot547
Changed to version 1.0.8

Re: [Mod] More Commands! [1.0.9] [morecommands]

PostPosted: Sat Jan 14, 2017 01:56
by bigfoot547
Changed to version 1.0.9

Re: [Mod] More Commands! [1.0.9] [morecommands]

PostPosted: Sun Jan 15, 2017 00:11
by ManElevation
nice!

Re: [Mod] More Commands! [1.0.10] [morecommands]

PostPosted: Tue Feb 07, 2017 04:00
by bigfoot547
Updated to version 1.0.10. Changelog:
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
Add /thru command

Enjoy!

Re: [Mod] More Commands! [1.0.10] [morecommands]

PostPosted: Tue Feb 07, 2017 19:04
by bigfoot547
Does anybody use this any more?
It doesn't seem like an imperitave mod, and no one talkes about it.
Should I continue working on it?

Re: [Mod] More Commands! [1.0.10] [morecommands]

PostPosted: Tue Feb 07, 2017 19:13
by bigfoot547
Does anybody have any suggestions?
*bump*

Re: [Mod] More Commands! [1.0.11] [morecommands]

PostPosted: Fri Feb 10, 2017 03:11
by bigfoot547
Updated to version 1.0.11.

Re: [Mod] More Commands! [1.0.10] [morecommands]

PostPosted: Fri Feb 10, 2017 10:29
by hajo
bigfoot547 wrote:Does anybody have any suggestions?

When I want a worldmap, almost everytime I find some unexplored gaps,
or an 'uneven' border. So, I have to fly/teleport there, then make a new map.

How about some commands, like
* mapgap 0,0 - find nearest unexplored mapchunk (spiraling outward from given coordinate)
* gapfill - call mapgenerator to fill in that chunk
* mapfill 500,500 - call mapgenerator to fill in the whole map to the specified size

This probably only needs to work for a layer of +/-128 to get a nice surface-map.

Also, some commands to find map-features:
* mapfind 0,0, flat50x50 - starting at center, spiral outward to find 'flat' spots
of at least size 50x50, eg. to place a village

Possible features of interest:
* flat - terrain with max. difference in height less then 5
* cliff - terrain with height-difference > 10 on a horizontal distance of 3
* mountain - terrain-height > 60
* mountainXL - terrain-height > 100
* hill - terrain higher than 20, but lower then 60
* float - floating island
* floatland - floating island at y>1280
* water, desert, sandstone, snow, ice ... - looking for types of stones, or biomes
* waterfall
* river - with river-water
* valley
* beach - water bordered by sand
* lake - enclosed water / max. depth 10
* ocean - depth > 10
* cave - space underground
* hole - opening at the surface to a cave
* dungeon - space with mossy cobble underground
* lava
* pinetree, jungletree, acadiatree, papyrus, etc. - to find biomes by plant-type
* flowers - where is the nearest red flower?
* chest, door, torch, bed - find players place

Perhaps with an extra option to call the mapgenerator
to make more terrain until such a spot is found (or some limit is reached).

Also:
* orecount 0,0,0 coal - count number of nodes with coal-ore around position,
to get an idea how suitable a spot is for starting players
* orestat - same, but look at all types of ore
Maybe name it 'nodestat', to also look at trees, clay, etc.

Re: [Mod] More Commands! [1.0.11] [morecommands]

PostPosted: Fri Feb 10, 2017 19:57
by Mehdi35
Great!!!!

Re: [Mod] More Commands! [1.0.10] [morecommands]

PostPosted: Sat Feb 11, 2017 00:34
by bigfoot547
hajo wrote:
bigfoot547 wrote:Does anybody have any suggestions?

When I want a worldmap, almost everytime I find some unexplored gaps,
or an 'uneven' border. So, I have to fly/teleport there, then make a new map.

How about some commands, like
* mapgap 0,0 - find nearest unexplored mapchunk (spiraling outward from given coordinate)
* gapfill - call mapgenerator to fill in that chunk
* mapfill 500,500 - call mapgenerator to fill in the whole map to the specified size

This probably only needs to work for a layer of +/-128 to get a nice surface-map.

Also, some commands to find map-features:
* mapfind 0,0, flat50x50 - starting at center, spiral outward to find 'flat' spots
of at least size 50x50, eg. to place a village

Possible features of interest:
* flat - terrain with max. difference in height less then 5
* cliff - terrain with height-difference > 10 on a horizontal distance of 3
* mountain - terrain-height > 60
* mountainXL - terrain-height > 100
* hill - terrain higher than 20, but lower then 60
* float - floating island
* floatland - floating island at y>1280
* water, desert, sandstone, snow, ice ... - looking for types of stones, or biomes
* waterfall
* river - with river-water
* valley
* beach - water bordered by sand
* lake - enclosed water / max. depth 10
* ocean - depth > 10
* cave - space underground
* hole - opening at the surface to a cave
* dungeon - space with mossy cobble underground
* lava
* pinetree, jungletree, acadiatree, papyrus, etc. - to find biomes by plant-type
* flowers - where is the nearest red flower?
* chest, door, torch, bed - find players place

Perhaps with an extra option to call the mapgenerator
to make more terrain until such a spot is found (or some limit is reached).

Also:
* orecount 0,0,0 coal - count number of nodes with coal-ore around position,
to get an idea how suitable a spot is for starting players
* orestat - same, but look at all types of ore
Maybe name it 'nodestat', to also look at trees, clay, etc.


I think this would be a great idea, but I have a very limited knowledge when it comes to map generation and things of the sort.

Mehdi35 wrote:Great!!!!

Thank you! I am glad you like it.