Post your modding questions here

User avatar
ArguablySane
Member
 
Posts: 116
Joined: Sun Oct 12, 2014 21:29

Re: Post your modding questions here

by ArguablySane » Thu Sep 10, 2015 19:18

Ferk wrote:minetest.luaentities only holds the entities that are currently loaded.

Is there a way I can obtain all the entities of an area? ...or force an area to be loaded, along with its entities.

Alternatively: given a particular area, how can I know if all the entities inside it are loaded? this way at least I could tell apart the entities that were removed from the ones that are simply not loaded and update my data accordingly.

I could assume that the area around an entity has been completely loaded every time I find an entity. But then if a player removed all the entities from an area I won't have a way to know if it was simply not loaded.

Thanks!

There are functions to force-load an area. I'm not sure of their range though:
minetest.forceload_block(pos)
minetest.forceload_free_block(pos)

You can check if an area is loaded by querying a node inside it and seeing if you get "ignore",
The above post and any ideas expressed therein are released to the public domain under a Creative Commons CC0 license.
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: Post your modding questions here

by Ferk » Thu Sep 10, 2015 20:16

Thanks for the reply, ArguablySane :)

ArguablySane wrote:There are functions to force-load an area. I'm not sure of their range though:
minetest.forceload_block(pos)
minetest.forceload_free_block(pos)


I didn't know about this, thanks.
However, it seems that this only loads the node in the position given and it won't load the entities around this node

You can check if an area is loaded by querying a node inside it and seeing if you get "ignore",


This would have been already good enough for my case.. but it seems entities have a much lower range than nodes. I still discover entities that get unloaded when the player walks away even though the block where they were placed is still loaded.

What is the range from the player in which the entities get loaded/unloaded? Maybe at least I can get the entities close to the player to update properly.
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Post your modding questions here

by Don » Thu Sep 10, 2015 20:38

I think that is the active_block_range in minetest.conf
https://github.com/minetest/minetest/bl ... nf.example
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

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

Re: Post your modding questions here

by Nathan.S » Fri Sep 11, 2015 21:17

I'm trying to determine what node is placed in an inventory slot. Currently I know how to check if the inventory is a certain item with if inv:contains_item('slot_name', 'item_name') then
however I'm trying to create a local value that has that item_name as it's value, so I can drop that item to the ground on a button click, or move it to the player inventory with a button.
I'm guessing this should be possible, I just can't seem to figure it out.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
Ben
Member
 
Posts: 157
Joined: Tue Mar 31, 2015 20:09

Re: Post your modding questions here

by Ben » Mon Sep 14, 2015 19:38

Nathan.S wrote:I'm trying to determine what node is placed in an inventory slot. Currently I know how to check if the inventory is a certain item with if inv:contains_item('slot_name', 'item_name') then
however I'm trying to create a local value that has that item_name as it's value, so I can drop that item to the ground on a button click, or move it to the player inventory with a button.
I'm guessing this should be possible, I just can't seem to figure it out.


The dev wiki on InvRefs should contain everything you need. But since you wrote "if the inventory is a certain item", and refer to the first parameter as "slot_name", I'm not sure you understand that each of these "slots" is in fact a list of slots. If you do, my apologies; other readers may not, so it can't hurt to mention it.

The following code should iterate over an inventory list:
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
for i=1, inv:get_size('slot_name') do
  local stack 
= inv:get_stack('slot_name', i)
  local name = stack:get_name()
  --# do stuff with name and stack
  inv:set_stack('slot_name', i, new_stack) --# write back changes
end


Does that help?
 

User avatar
Ben
Member
 
Posts: 157
Joined: Tue Mar 31, 2015 20:09

Re: Post your modding questions here

by Ben » Mon Sep 14, 2015 19:48

ArguablySane wrote:There are functions to force-load an area. I'm not sure of their range though:
minetest.forceload_block(pos)
minetest.forceload_free_block(pos)


A related question: I'm contemplating a teleportation mod with a delay of a second or two. After this time, I will most likely teleport a player to a given position, the server might as well have this position loaded by that time. I'd also like to query the nodes at the position being teleported to, but this is not strictly required.

Now I could forceload the position in question at the start of the two seconds, and free it after teleportation, but that seems very heavy-handed. Also, what if the position was already forceloaded by other means? With no way to check, I would clobber that.

Is there an alternative way to "hint" to the server that the area will become relevant? An actual method call as above, or a trick like spawning a temporary entity there?
 

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

Re: Post your modding questions here

by Nathan.S » Tue Sep 15, 2015 01:15

Ben, you are my HERO, okay that might be going overboard, but yes, that code you provided is exactly what I needed.
I hadn't realized that each of those slots are a list of slots, but I guess that makes sense as you can have them be more than one slot. Coincidentally this could also be what I need to finish my smoker, as it has multiple slots for input, and all of them with meat need to be replaced once the smoking is done. A million thank yous.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

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

Re: Post your modding questions here

by Hybrid Dog » Tue Sep 15, 2015 15:50

Ben wrote:
ArguablySane wrote:There are functions to force-load an area. I'm not sure of their range though:
minetest.forceload_block(pos)
minetest.forceload_free_block(pos)


A related question: I'm contemplating a teleportation mod with a delay of a second or two. After this time, I will most likely teleport a player to a given position, the server might as well have this position loaded by that time. I'd also like to query the nodes at the position being teleported to, but this is not strictly required.

Now I could forceload the position in question at the start of the two seconds, and free it after teleportation, but that seems very heavy-handed. Also, what if the position was already forceloaded by other means? With no way to check, I would clobber that.

Is there an alternative way to "hint" to the server that the area will become relevant? An actual method call as above, or a trick like spawning a temporary entity there?

l think voxel manipulation works in unloaded chunks
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: Post your modding questions here

by Ferk » Tue Sep 15, 2015 16:03

Hybrid Dog wrote:l think voxel manipulation works in unloaded chunks

I'm wondering how does this work for chunks that were not only unloaded but also not generated.
I mean, would the engine automatically generate the area as soon as you try to perform any manipulation in there?

If for example, I define an on_generate callback for a particular area that loads a big mts schematic that covers several chunks, will all the chunks that would be affected by my mapgen have to be generated?

This means that if I add too many areas that load mts schematics it could cause a chain of on_generate calls that could potentially lock up the server. Is that correct?

If that's the case I guess it would be faster for my mapgen to try to parse the mts files from lua and feed it every time to the mapgen algorithm within the limits of the on_generate call.
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

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

Re: Post your modding questions here

by Hybrid Dog » Wed Sep 16, 2015 08:56

Ferk wrote:
Hybrid Dog wrote:l think voxel manipulation works in unloaded chunks

I'm wondering how does this work for chunks that were not only unloaded but also not generated.
I mean, would the engine automatically generate the area as soon as you try to perform any manipulation in there?

No, but if the map gets generated there, core mapgen (should) only replaces nodes which are ignore and keeps the other ones (firstly). l thought you mean a teleporter like the one of Zeg9, so generated but unloaded (because of rejoining) chunks.

If for example, I define an on_generate callback for a particular area that loads a big mts schematic that covers several chunks, will all the chunks that would be affected by my mapgen have to be generated?

No, but if the map becomes generated there, stone walls get ores, caves appear, etc.

This means that if I add too many areas that load mts schematics it could cause a chain of on_generate calls that could potentially lock up the server. Is that correct?

no, putting nodes into not generated chunks doesn't call the mapgen functions there

If that's the case I guess it would be faster for my mapgen to try to parse the mts files from lua and feed it every time to the mapgen algorithm within the limits of the on_generate call.

lf you place schematics in not generated areas, stone walls may get ores, caves may appear, etc.
 

User avatar
swordpaint12
Member
 
Posts: 187
Joined: Sat Aug 22, 2015 00:50
In-game: [swordpaint12][Belching_Balladeer]

Re: Post your modding questions here

by swordpaint12 » Wed Sep 16, 2015 19:05

Okay, so I am working on a practice mod suggested in rubenwardy's book, and I need to know where to find the contents of the default mod so I can use it. Do any of you know where that may be?
Winter Cumicles
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.
Fruit!

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.
 

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

Re: Post your modding questions here

by Nathan.S » Wed Sep 16, 2015 20:54

swordpaint12 wrote:Okay, so I am working on a practice mod suggested in rubenwardy's book, and I need to know where to find the contents of the default mod so I can use it. Do any of you know where that may be?


If you running Linux and installed from a PPA or software center they will be in usr/share/minetest/ if you compile yourself, guessing not though, they'll be in your directory you compiled in. Not sure on Windows, but this article on the wiki should help. http://wiki.minetest.net/Installing_Mods
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
swordpaint12
Member
 
Posts: 187
Joined: Sat Aug 22, 2015 00:50
In-game: [swordpaint12][Belching_Balladeer]

Re: Post your modding questions here

by swordpaint12 » Thu Sep 17, 2015 01:37

I'm on Windows. I managed to find an edited version in one of my sub games. I just got past that. Now, I'm puzzling over

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
action = function(pos, node, active_object_count, active_object_count_wider)
      minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z}, {name = "aliens:grass"})


It isn't really making any sense to me. It's in chapter six.
Winter Cumicles
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.
Fruit!

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.
 

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

Re: Post your modding questions here

by Nathan.S » Thu Sep 17, 2015 01:43

swordpaint12 wrote:I'm on Windows. I managed to find an edited version in one of my sub games. I just got past that. Now, I'm puzzling over

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
action = function(pos, node, active_object_count, active_object_count_wider)
      minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z}, {name = "aliens:grass"})


It isn't really making any sense to me. It's in chapter six.


Well this is an action that is called when you do something, not sure what comes before the action part, I'm guessing on_dig, on_place, on_punch, on_rightclick, anyway. When this action is called Minetest sets a node, in this case aliens:grass, which will probably come up as an unknown node, unless you have an aliens mod installed. I might replace that will default:dirt or something. The location of the node is in the table {x = pos.x, y = pos.y + 1, z = pos.z} the pos, or position is passed on to the action, pos contains X, Y, and Z data, the table just adds one to the y position. When the action is called the node will be placed one node above the current node.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
swordpaint12
Member
 
Posts: 187
Joined: Sat Aug 22, 2015 00:50
In-game: [swordpaint12][Belching_Balladeer]

Re: Post your modding questions here

by swordpaint12 » Thu Sep 17, 2015 01:53

So, do I need to do anything with it? I'm practicing on the decay mod as suggested at the end of that chapter. Do I need to change anything with it, like enter in numbers? Sorry, I'm pretty new at this. Do I just copy it in to my code?
Winter Cumicles
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.
Fruit!

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.
 

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

Re: Post your modding questions here

by Nathan.S » Thu Sep 17, 2015 02:39

It should be good as is, but you could play around with the numbers just to see the difference.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your modding questions here

by paramat » Thu Sep 17, 2015 05:52

Ben wrote:A related question: I'm contemplating a teleportation mod with a delay of a second or two. After this time, I will most likely teleport a player to a given position, the server might as well have this position loaded by that time. I'd also like to query the nodes at the position being teleported to, but this is not strictly required.

As far as i know, for teleportation to an ungenerated area, you need to know what the ground level will be at that point before mapgen generates it. Then teleport the player to that point and altitude to trigger mapgen, the player will float trapped in 'ignore' nodes until the terrain is generated.
So far this can only be done by porting mgv6 mapgen into a lua mod to predict the ground level at a certain point. Possible but not easy. There are core functions that get ground level at point for each mapgen but i would have to add APIs for those, i might actually do this.
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: Post your modding questions here

by Ferk » Thu Sep 17, 2015 09:44

Hybrid Dog wrote:l thought you mean a teleporter like the one of Zeg9
paramat wrote:for teleportation to an ungenerated area [...]

Ow.. my question regarding manipulations on non-generated chunks was not really about the teleportation mod from Ben, I'm working on a different project. Though the question was related and your replies have been insightful, thank you.

I'm making a game that divides the map in rooms for an infinite dungeon maze, where each room is randomly chosen from a set of selected schematics. The idea is that people would be able to create their own "challenge rooms" and add them to the pool so the number of possibilities keeps growing.

So far I have the layout and I can generate an infinite binary-tree maze of rooms fairly fast. However, loading the (worldedit) schematics slows down the generation quite a lot. I was thinking on ways to optimize it.

Would using mts files instead of worldedit improve the performance?

How does the mapgen know how further away from the player it needs to generate? My game will be full of closed walls, so I don't really need a big radius. So far I was trying to ease the amount of rooms generated simultaneously by putting bigger gaps between the levels. But there's still a lot of generation going on.

Maybe I should decouple the schematic load from the mapgen. Something like.. have an ABM in the center of each room that loads the schematic as soon as it's at a distance from the player. This way I can control better the pace in which the schematics load. Would this be a good idea?

Also, right now I'm using singlenode. But it might be cool to consider using some mapgen in such a way that the whole underground can be the dungeon while the surface can have the standard biomes, if I figure out a way to make the mapgen not interfere with the dungeon (I guess I can disable ores, but I'm not so sure about lava, caverealms seemed to have trouble with that, maybe being a subgame helps here).
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Post your modding questions here

by Don » Thu Sep 17, 2015 10:46

@Ferk - I did something similar with mineshafts. It is a work in progress. I found that .mts files seem to load better then we files for larger schematics.
I made a node that is used as a point to place the schematic. Then i generated it with register_ore. Then I used an abm to place the schematic.
The shafts.lua has the code I am talking about if you want to see. Please let me know if you find a better way.
https://github.com/DonBatman/mymineshaft
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

DoyleChris
Member
 
Posts: 176
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Post your modding questions here

by DoyleChris » Thu Sep 17, 2015 16:39

Im wondering if there is a way that a pipe supplying a technic grinder to know if the queue in the grinder is full or different item.

Example I have a grinder being feed by a pipe, grinder already is working on iron, i want to feed iron to it till its done. Then work on another kind and not have it send copper down the pipe when its working on iron.
I have tried it and the copper just stays in the tube.
 

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

Re: Post your modding questions here

by Hybrid Dog » Thu Sep 17, 2015 16:52

DoyleChris wrote:Im wondering if there is a way that a pipe supplying a technic grinder to know if the queue in the grinder is full or different item.

Example I have a grinder being feed by a pipe, grinder already is working on iron, i want to feed iron to it till its done. Then work on another kind and not have it send copper down the pipe when its working on iron.
I have tried it and the copper just stays in the tube.

Maybe you could use mesecons sticky pistons and a node detector.
 

DoyleChris
Member
 
Posts: 176
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: Post your modding questions here

by DoyleChris » Thu Sep 17, 2015 17:16

So use the sticky piston to control power.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your modding questions here

by paramat » Fri Sep 18, 2015 00:18

Ferk, your project sounds interesting.
Best to use mts schematics since that is Minetest's native format, it's probably faster and better maintained.
There's a parameter in .conf for the distance from a player that mapgen is triggered, see minetest.conf.

It might be best to use spawner nodes to trigger ABMs that place schematics a few seconds after mapgen, this way by the time a schematic is placed all surrounding mapchunks have already been generated, so you can add your project to a core mapgen and add large schematics without them crossing into ungenerated chunks. For an example see my infinite dungeon generator https://forum.minetest.net/viewtopic.php?f=11&t=9896 This also splits the generation load into smaller units, possibly reducing lag.
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: Post your modding questions here

by Ferk » Fri Sep 18, 2015 10:14

@don @paramat thanks! I'm gonna be using mts and "spawners" now. Though I would probably need to store the metadata of the nodes in a separate file then, since mts doesn't store it.

I noticed minetest.create_schematic has a feature that allows certain nodes to have a probability for them to be placed. This would actually be interesting for my game, I might try and add a way to assign certain probability to a node from within the game.

However, I don't see an option in place_schematic to affect the probabilities, so I guess this would be one-directional, meaning that after you save the schematic there won't be a way within the game to edit it properly (the probabilities would always be already applied when you load the schematic for editing).

Btw, what is the "Slice probability"? I see that it only takes a Y coordinate. Does it mean that all nodes with that particular Y coordinate (an X-Z plane) within the schematic are affected by the probability at once?
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your modding questions here

by paramat » Fri Sep 18, 2015 15:15

Per node probability is fixed in the schematic file when you create it from a lua table (using this method https://forum.minetest.net/viewtopic.php?f=9&t=12011)
You can imagine the schematic is placed in the world in horizontal slices from the bottom up (lowest slice = slice 0), slice probs if present affect entire slices, if the slice is skipped all above slices are moved down 1 node (so no gap) it's used in saveschems and mgv5/v7 mapgen for variable height trees.

I was wrong about catacomb placing schematics, it actually uses lua routines to create each chamber. My projects mod works a similar way and uses schematics for the apartments https://forum.minetest.net/viewtopic.php?f=11&t=9577 there are times when a lua routine is better to use (more fine control) but of course can only be used for simple structures.
 

User avatar
swordpaint12
Member
 
Posts: 187
Joined: Sat Aug 22, 2015 00:50
In-game: [swordpaint12][Belching_Balladeer]

Re: Post your modding questions here

by swordpaint12 » Fri Sep 18, 2015 18:46

Okay so I launched my decay practice mod today and I got this error:

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
2015-09-18 14:40:48: ERROR[main]: Server: Failed to load and run C:\Users\top secret.Tapestry\Desktop\minetest engines\minetest-0.4.13\bin\..\mods\decay\init.lua
2015-09-18 14:40:48: ERROR[main]: ModError: ModError: Failed to load and run C:\Users\top secret.Tapestry\Desktop\minetest engines\minetest-0.4.13\bin\..\mods\decay\init.lua
2015-09-18 14:40:48: ERROR[main]: Error from Lua:
2015-09-18 14:40:48: ERROR[main]: ...etest engines\minetest-0.4.13\bin\..\mods\decay\init.lua:17: '}' expected (to close '{' at line 14) near 'interval'
2015-09-18 14:40:48: ERROR[main]: Check debug.txt for details.

It's a very simple mod, my rendition has only one node: "decay:tree". What is my problem?
Winter Cumicles
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.
Fruit!

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.
 

User avatar
Ben
Member
 
Posts: 157
Joined: Tue Mar 31, 2015 20:09

Re: Post your modding questions here

by Ben » Fri Sep 18, 2015 19:08

paramat wrote:
Ben wrote:A related question: I'm contemplating a teleportation mod with a delay of a second or two. After this time, I will most likely teleport a player to a given position, the server might as well have this position loaded by that time. I'd also like to query the nodes at the position being teleported to, but this is not strictly required.

As far as i know, for teleportation to an ungenerated area, …


Hi, sorry for the late reply, thanks for all the responses, and sorry for the confusion: I'm actually not talking about ungenerated areas. In my case, players teleport from a source node to a destination node, which some player has placed by hand beforehand. So the area is definitely generated.

The distance to the destination node may be quite high, so the server might have unloaded the block at some point, as servers do. My question is basically about reloading the block, for two reasons:

Firstly, before I do the actual teleport, I'd like to check that the destination node is present and unobstructed. If the block with this node in it is unloaded, I'll get "ignore" nodes, and then shrug and teleport anyway. But if I can improve this test a bit, I'd like to do so.

Secondly, teleporting will send the player into an unloaded block, at which point the server frantically struggles to load everything the player can see, and the client shows nothing but skybox until that's sorted out. Again, things would be a lot smoother if the server reloaded the area ahead of time.
 

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

Re: Post your modding questions here

by Hybrid Dog » Sat Sep 19, 2015 07:05

swordpaint12 wrote:Okay so I launched my decay practice mod today and I got this error:

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
2015-09-18 14:40:48: ERROR[main]: Server: Failed to load and run C:\Users\top secret.Tapestry\Desktop\minetest engines\minetest-0.4.13\bin\..\mods\decay\init.lua
2015-09-18 14:40:48: ERROR[main]: ModError: ModError: Failed to load and run C:\Users\top secret.Tapestry\Desktop\minetest engines\minetest-0.4.13\bin\..\mods\decay\init.lua
2015-09-18 14:40:48: ERROR[main]: Error from Lua:
2015-09-18 14:40:48: ERROR[main]: ...etest engines\minetest-0.4.13\bin\..\mods\decay\init.lua:17: '}' expected (to close '{' at line 14) near 'interval'
2015-09-18 14:40:48: ERROR[main]: Check debug.txt for details.

It's a very simple mod, my rendition has only one node: "decay:tree". What is my problem?

maybe you forgot a comma near 'interval' or a bracket in line 17

Ben wrote:Secondly, teleporting will send the player into an unloaded block, at which point the server frantically struggles to load everything the player can see, and the client shows nothing but skybox until that's sorted out. Again, things would be a lot smoother if the server reloaded the area ahead of time.

as far as l know the client needs to load the chunk, not the server
there's a function to forceload a chunk: [url]dev.minetest.net/minetest.forceload_block[/url]
 

User avatar
swordpaint12
Member
 
Posts: 187
Joined: Sat Aug 22, 2015 00:50
In-game: [swordpaint12][Belching_Balladeer]

Re: Post your modding questions here

by swordpaint12 » Sun Sep 20, 2015 22:00

Thanks guys, I got the code to work. But apparently my texture doesn't work. That's okay though. I'll just have to work on that. So far I haven't seen it work, but hopefully I will. Thanks!
Winter Cumicles
God's not dead; remember that!
Yay for MT! No MC here!
I am a human. I'm younger than 100 years old.
I've been playing Minetest since December 2014.
Fruit!

I'm amazed that I haven't been on here in so long! My latest minetest accomplishment was mining by hand (well, as close as you can get in a computer game) a circle 30 blocks in diameter. It took forever but it's pretty cool.
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Post your modding questions here

by Don » Sun Sep 20, 2015 23:13

swordpaint12 wrote:Thanks guys, I got the code to work. But apparently my texture doesn't work. That's okay though. I'll just have to work on that. So far I haven't seen it work, but hopefully I will. Thanks!

Post your code and we can help with the texture problem. Main things to remember is make sure you typed it right and have it like 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
tiles = {"image_name.png"},
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

PreviousNext

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 8 guests

cron