Create a map without the gui (via command line options, see --help).pandaro wrote:So the question is:
I want to test a terrain generator , for example mapgenv7
I want to first of all that the world created is always the same, to do this, it is enough, when I create a world, give it a name, and select a fixed seed, such as the 1 seed.
Now the problem, I want, from file minetest. conf, the generator reads some parameters such as:
# mgv7_np_terrain = 10, 12, (350, 350, 350), 82 341, 5, 0.6
# mgv7_np_bgroup = 0.5, 0.3125, (350, 350, 350), 5923, 2, 0.6
# mgv7_np_heat = 25, 50, (500, 500, 500), 35293, 1, 0
# mgv7_np_humidity = 50, 31.25, (750, 750, 750), 12094, 2, 0.6
to do this then I compile my minetest.conf that I show it as it is:but I realize that in spite of the parameter fixed_map_seed = 1 the map is different each time.main_menu_tab = server
name = pandaro
server_dedicated = false
fixed_map_seed = 1
main_menu_last_game_idx = 4
mainmenu_last_selected_world = 2
selected_world_path = /home/p/minetest/0.49.1/bin/../worlds/sdcs
enable_shaders = false
enable_damage = false
port = 30000
server_announce = true
address = 192.168.0.2
remote_port = 30000
creative_mode = true
num_emerge_threads = 2
mg_name = v7
mgv7_np_terrain = 0, 1, (1, 1 1), 1, 1, 1
mgv7_np_bgroup = 0, 1, (1, 1, 1), 1, 1, 1
mgv7_np_heat = 0, 1, (1, 1, 1), 1, 1, 1
mgv7_np_humidity = 0, 1, (1, 1, 1), 1, 1, 1
it seems to me that having or not having completed minetest.conf the generator of the terrain refers only on what I write in the main menu.
How do I create a map by passing minetest.conf?
Post your modding questions here
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
Code: Select all
fixed_map_seed = 66768767867868789
-
- New member
- Posts: 1
- Joined: Tue Jan 21, 2014 21:42
this code here
causes error saying
full code at github
help please? I can't find the problem in the code while i stared at it for 30 minutes.
Edit: found the error. hmin <= i <= hmax was supposed to be hmin <= i and i <= hmax
Code: Select all
local function read_image(f, bmp, infoheader, hmin, hmax, wmin, wmax)
local i, line, height, dir
height = infoheader.biHeight
line = (height < 0) and 1 or height
dir = (height < 0) and 1 or -1
height = math.abs(height)
print(("[bmpmap.bmp] size=%dx%d bpp=%d"):format(
infoheader.biWidth,
infoheader.biHeight,
infoheader.biBitCount
))
bmp.pixels = { }
for i = 1, height do
local row = { }
if hmin <= i <= hmax then
bmp.pixels[line] = row
end
if infoheader.biBitCount == 24 then
read_24bit_line(infoheader.biWidth, f, row, wmin, wmax)
elseif infoheader.biBitCount == 32 then
read_32bit_line(infoheader.biWidth, f, row, wmin, wmax)
else
return false
end
line = line + dir
end
return true
end
Code: Select all
13:34:58: ERROR[main]: ServerError: /root/.minetest/mods/bmpmap/loader_bmp.lua:153: attempt to compare boolean with number
13:34:58: ERROR[main]: stack traceback:
13:34:58: ERROR[main]: /root/.minetest/mods/bmpmap/loader_bmp.lua:153: in function 'read_image'
13:34:58: ERROR[main]: /root/.minetest/mods/bmpmap/loader_bmp.lua:228: in function 'load'
13:34:58: ERROR[main]: /root/.minetest/mods/bmpmap/imageloader.lua:49: in function 'load'
13:34:58: ERROR[main]: /root/.minetest/mods/bmpmap/mapgen.lua:37: in function '?'
help please? I can't find the problem in the code while i stared at it for 30 minutes.
Edit: found the error. hmin <= i <= hmax was supposed to be hmin <= i and i <= hmax
Last edited by ch98 on Fri Jan 24, 2014 23:04, edited 1 time in total.
I have stopped playing minetest, and may not come back to it again. I would like to thank everyone that made the amazing time I had playing it. This account is not in use anymore, and the email has been linked to a unused account. If any administrator reading this has time, feel free to delete my account. Thank you very much for the great experience.
-
- Member
- Posts: 19
- Joined: Mon Jan 13, 2014 09:38
- In-game: Landrover
- Location: South luangwa , Zambia
Get a faster computer?Landrover110 wrote:How can i get my game to run faster with lots of mods
Or you could turn off shaders and the complex plant drawtypes. Maybe use the default textures as larger textures will slow the system. Change the view distance to be shorter. Decrease the amount of chunks kept in memory. Stuff like that can be found by looking at FAQs and threads in the forum and by doing some good searches. Hope this helps some.
- GunshipPenguin
- Member
- Posts: 94
- Joined: Tue Jan 28, 2014 00:38
- GitHub: GunshipPenguin
- IRC: GunshipPenguin
- In-game: GunshipPenguin
- Location: Vancouver, BC
I'm having a problem with a mod that I'm making to protect the area around the spawnpoint from being damaged. The code to stop people from digging nodes is as follows.
It works fine, but the code to stop players from placing nodes does not. I remove the node, inform the player that he cannot build near spawn and then try to add the node back to his/her inventory. For some reason though, the item isn't being added into the inventory.
Thanks in advance for any help. I'm new to Lua and Minetest modding so I apologize if this question is a bit noobish.
Code: Select all
minetest.register_on_dignode(function(pos, oldnode, digger)
if pos["x"] < safeZoneCenter["x"]+limit and pos["x"] > safeZoneCenter["x"]-limit and pos["z"] < safeZoneCenter["z"]+limit and pos["z"] > safeZoneCenter["z"]-limit then -- If a node has been dug within spawn as defined with limit
if not minetest.get_player_privs(digger:get_player_name())["safezonebuild"] then -- If the player does not have the spawnbuild privilege
minetest.chat_send_player(digger:get_player_name(), "You are attempting to dig inside the safe zone, please move out of the safe zone") -- Inform player that he/she cannot dig inside spawn
minetest.set_node(pos, oldnode)
digger:get_inventory():remove_item("main", oldnode)
end
end
end)
Code: Select all
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
if pos["x"] < safeZoneCenter["x"]+limit and pos["x"] > safeZoneCenter["x"]-limit and pos["z"] < safeZoneCenter["z"]+limit and pos["z"] > safeZoneCenter["z"]-limit then -- If a node has been placed within spawn as defined with limit
if not minetest.get_player_privs(placer:get_player_name())["safezonebuild"] then -- If the player does not have the spawnbuild privilege
minetest.chat_send_player(placer:get_player_name(), "You are attempting to build inside the safe zone, please move out of the safe zone") -- Inform player that he/she cannot build inside spawn
minetest.set_node(pos, oldnode)
placer:get_inventory():add_item("main", newnode.name)
end
end
end)
Sprint Mod -- viewtopic.php?f=11&t=9650&p=156207
Server Essentials Mod -- viewtopic.php?f=11&t=12445&p=180964
My PvE server -- viewtopic.php?f=10&t=10616
Server Essentials Mod -- viewtopic.php?f=11&t=12445&p=180964
My PvE server -- viewtopic.php?f=10&t=10616
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
You should look into minetest.is_protected() (see doc/lua_api.txt)GunshipPenguin wrote:I'm having a problem with a mod that I'm making to protect the area around the spawnpoint from being damaged. The code to stop people from digging nodes is as follows.It works fine, but the code to stop players from placing nodes does not. I remove the node, inform the player that he cannot build near spawn and then try to add the node back to his/her inventory. For some reason though, the item isn't being added into the inventory.Code: Select all
minetest.register_on_dignode(function(pos, oldnode, digger) if pos["x"] < safeZoneCenter["x"]+limit and pos["x"] > safeZoneCenter["x"]-limit and pos["z"] < safeZoneCenter["z"]+limit and pos["z"] > safeZoneCenter["z"]-limit then -- If a node has been dug within spawn as defined with limit if not minetest.get_player_privs(digger:get_player_name())["safezonebuild"] then -- If the player does not have the spawnbuild privilege minetest.chat_send_player(digger:get_player_name(), "You are attempting to dig inside the safe zone, please move out of the safe zone") -- Inform player that he/she cannot dig inside spawn minetest.set_node(pos, oldnode) digger:get_inventory():remove_item("main", oldnode) end end end)
Thanks in advance for any help. I'm new to Lua and Minetest modding so I apologize if this question is a bit noobish.Code: Select all
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing) if pos["x"] < safeZoneCenter["x"]+limit and pos["x"] > safeZoneCenter["x"]-limit and pos["z"] < safeZoneCenter["z"]+limit and pos["z"] > safeZoneCenter["z"]-limit then -- If a node has been placed within spawn as defined with limit if not minetest.get_player_privs(placer:get_player_name())["safezonebuild"] then -- If the player does not have the spawnbuild privilege minetest.chat_send_player(placer:get_player_name(), "You are attempting to build inside the safe zone, please move out of the safe zone") -- Inform player that he/she cannot build inside spawn minetest.set_node(pos, oldnode) placer:get_inventory():add_item("main", newnode.name) end end end)
- GunshipPenguin
- Member
- Posts: 94
- Joined: Tue Jan 28, 2014 00:38
- GitHub: GunshipPenguin
- IRC: GunshipPenguin
- In-game: GunshipPenguin
- Location: Vancouver, BC
Yay! using return itemstack makes it work. Thanks a lot, I really appreciate it.Hybrid Dog wrote:setting the oldnode after adding the newnode into the inventory or "return itemstack" might help
Sprint Mod -- viewtopic.php?f=11&t=9650&p=156207
Server Essentials Mod -- viewtopic.php?f=11&t=12445&p=180964
My PvE server -- viewtopic.php?f=10&t=10616
Server Essentials Mod -- viewtopic.php?f=11&t=12445&p=180964
My PvE server -- viewtopic.php?f=10&t=10616
about sneak and sneak_glitch
What changed exactly sneak and sneak_glitch in player:set_physics_override ()
I realized that if I sneak == true then the player does not come down from the block if I hold down shift.
if you sneak == false then the player goes down from the block even if I keep holding shift.
I do not understand what happens if sneak_glitch is changed from true to false.
It seems to me always the same
What changed exactly sneak and sneak_glitch in player:set_physics_override ()
I realized that if I sneak == true then the player does not come down from the block if I hold down shift.
if you sneak == false then the player goes down from the block even if I keep holding shift.
I do not understand what happens if sneak_glitch is changed from true to false.
It seems to me always the same
sorry for bad english
Linux debian 7 wheezy 64
kde
Linux debian 7 wheezy 64
kde
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
Try searching for "sneak elevator". sneak_glitch = false basically prevents that.pandaro wrote:about sneak and sneak_glitch
What changed exactly sneak and sneak_glitch in player:set_physics_override ()
I realized that if I sneak == true then the player does not come down from the block if I hold down shift.
if you sneak == false then the player goes down from the block even if I keep holding shift.
I do not understand what happens if sneak_glitch is changed from true to false.
It seems to me always the same
Where should I look? I tried google but only find discussions in irc (unclear).PilzAdam wrote:Try searching for "sneak elevator". sneak_glitch = false basically prevents that.
And I can not find anything on http://dev.minetest.net
In any case I may have figured out what you want to explain:
it is the ability to climb on a step by holding down shift?
sorry for bad english
Linux debian 7 wheezy 64
kde
Linux debian 7 wheezy 64
kde
- philipbenr
- Member
- Posts: 1897
- Joined: Fri Jun 14, 2013 01:56
- GitHub: philipbenr
- IRC: philipbenr
- In-game: robinspi
- Location: United States
When I click something with a certain itemstack, I wish it to perform a specific function. Like if you are wearing specific gloves, you can turn on something, or remove something, but only with that specific item wielded.Krock wrote:I'm not sure but
on_rightclick itemstack should be the stack, which the player used to click right onto the node.
What exactly do you want to do?
Spoiler
Basically, I want to have a certain pair of gloves, that if you are wielding them, you can rightclick a certain node and remove it, and if you leftclick the node, it plays a sound. It is for the audio/dj mod I am working toward.
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
@philipbenr, post abrove:
How about defining the gloves, instead of the diffrent nodes?
like: on_use, on_place (not sure, but you can loop up the documentation)
How about defining the gloves, instead of the diffrent nodes?
like: on_use, on_place (not sure, but you can loop up the documentation)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- philipbenr
- Member
- Posts: 1897
- Joined: Fri Jun 14, 2013 01:56
- GitHub: philipbenr
- IRC: philipbenr
- In-game: robinspi
- Location: United States
Found the answer to my problem. I have to use on_place/on_use in the craftitem callbacks and define the pointed thing as an "audio:______" and have the callback function. I'm guessing this is correct.Krock wrote:@philipbenr, post abrove:
How about defining the gloves, instead of the diffrent nodes?
like: on_use, on_place (not sure, but you can loop up the documentation)
Also, how can I define the pointed thing as one specific node? As in the example below:
Code: Select all
on_use = function(itemstack, placer, pointed_thing <-- Here? )
--Or Somewhere down here?
Spoiler
Code: Select all
on_use = function(itemstack, placer, audio:player_black )
Code: Select all
on_use = function(itemstack, placer, pointed_thing)
pointed_thing="audio:player_black"
Last edited by philipbenr on Mon Feb 03, 2014 01:56, edited 1 time in total.
- Krock
- Developer
- Posts: 4650
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
philipbenr wrote:Also, how can I define the pointed thing as one specific node?
Code: Select all
on_use = function(itemstack, placer, pointed_thing <-- Here? ) --Or Somewhere down here?
Code: Select all
minetest.register_tool("audio:gloves", {
description = "xyz",
inventory_image = "xyz.png",
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type ~="node" then
return
end
local node = minetest.get_node(pointed_thing.under)
--node equals the node you pointed to when using the "gloves"
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- philipbenr
- Member
- Posts: 1897
- Joined: Fri Jun 14, 2013 01:56
- GitHub: philipbenr
- IRC: philipbenr
- In-game: robinspi
- Location: United States
- 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:
Just stick this in the node definition:Gambit wrote:How would I make a block that hurts the player once he/she touches it either on the sides on standing on top of it?
Code: Select all
damage_per_second = amount_of_damage,
Back from the dead!
- Casimir
- Member
- Posts: 1207
- Joined: Fri Aug 03, 2012 16:59
- GitHub: CasimirKaPazi
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
You might use an abm to replace the air around your node with special air that does the damage. Or let the player live on :-)Casimir wrote: That only works when standing in the node. I haven't found any workaround.
A list of my mods can be found here.
is there an easy way to add a second recipe for crafting something?
I have multiple versions of the same block (different colors) and several of those blocks. what I have is this:
-W,-B,-G,-O are represtitive of colors. they craft like this;
A-W->B-W->C-W->D-W
A-W->A-B/A-O/A-G
B-W->B-B/B-O/B-G
C-W->C-B/C-O/C-G
D-W->D-B/D-O/D-G
I wanna add support so this can be included:
A-B->B-B->C-B->D-B
A-O->B-O->C-O->D-O
A-G->B-G->C-G->D-G
hope you can understand this, and help. my main question is whether I need to create another class (if that's what they are called in Lua) or whether it can be incorperated into the current class.
the reason why is cause I will have over 32 variations of this node, and I don't want to create that much additional code if it isn't neccesary
I have multiple versions of the same block (different colors) and several of those blocks. what I have is this:
-W,-B,-G,-O are represtitive of colors. they craft like this;
A-W->B-W->C-W->D-W
A-W->A-B/A-O/A-G
B-W->B-B/B-O/B-G
C-W->C-B/C-O/C-G
D-W->D-B/D-O/D-G
I wanna add support so this can be included:
A-B->B-B->C-B->D-B
A-O->B-O->C-O->D-O
A-G->B-G->C-G->D-G
hope you can understand this, and help. my main question is whether I need to create another class (if that's what they are called in Lua) or whether it can be incorperated into the current class.
the reason why is cause I will have over 32 variations of this node, and I don't want to create that much additional code if it isn't neccesary
Last edited by Novacain on Fri Feb 07, 2014 03:39, edited 1 time in total.
- DeepGaze
- Member
- Posts: 332
- Joined: Fri May 10, 2013 00:49
- GitHub: DeepGaze
- IRC: DeepGaze
- In-game: DeepGaze
- Location: Take your best guess
is there a way to write a code to:
player places block A and then block B
player hits block A
block A places block C
Block B turns into a teleport to Block C
Block C turns into a teleport to Block B
player hits block A
Block C is destroyed
Block B stops teleport function
any ideas (Stupid in the way of modding)
player places block A and then block B
player hits block A
block A places block C
Block B turns into a teleport to Block C
Block C turns into a teleport to Block B
player hits block A
Block C is destroyed
Block B stops teleport function
any ideas (Stupid in the way of modding)
-
- Member
- Posts: 4290
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
If you have diffrent colors, please try to stick to the naming schem wool uses (or, alternatively, unifieddyes) so that your mod may be supported by my colormachine mod. That might also help you with easier coloring.Novacain wrote: Is there an easy way to add a second recipe for crafting something?
I have multiple versions of the same block (different colors) and several of those blocks. what I have is this:
There's no direct way for that. You might create a table with all the block names (a simple list) and let a for loop iterate over it so that you basicly craft list[ i ] -> list[ i+1 ].Novacain wrote: I wanna add support so this can be included:
A-B->B-B->C-B->D-B
A-O->B-O->C-O->D-O
A-G->B-G->C-G->D-G
Depends a bit. If all your blocks are loaded - fine, could be made working. If the target isn't loaded - the new minetest.forceload_block might help you perhaps.DeepGaze wrote: is there a way to write a code to:
player places block A and then block B
player hits block A
block A places block C
A list of my mods can be found here.
-
- Member
- Posts: 26
- Joined: Sat May 11, 2013 03:20
- GitHub: i1abnrk
- IRC: i1abnrk
- In-game: mervyncoll
- Location: Wisconsin
- Contact:
Issue: lua mapgen seems to have no effect. I have tried several lua mapgen implementations (mods) but it seems the mapgen + seed in gui overrides the mod code and I'm stuck with vanilla every time. Minetest_game and the mod game both produce identical worlds. What are recommended settings or the prescribed method? I am using minetest 0.4.9 installed from deb on Ubuntu precise.
Who is online
Users browsing this forum: No registered users and 13 guests