[solved] Schematic from luatable is somewhat broken

User avatar
Milan*
Member
 
Posts: 203
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant

[solved] Schematic from luatable is somewhat broken

by Milan* » Sun Mar 12, 2017 08:32

Hi there,

first of all, this is not my first schematic i wrote by hand using luatables as to find as minetest-mods/schematic_saver (i guess?).
This time i really have no clue what's wrong, i just wrote the ethereal mushroom to a table to be able to adjust the trunk.
It somewhat always results in a schematic with randomly placed nodes.

Image

Even one slice gets a different result then expected.

This is the table:

mts_save("mushroomone", {
size = {x = 8, y = 12, z = 9},
data = {
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,M,M,M,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,

_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,M,M,_,M,M,_,_,
_,_,M,M,_,M,M,_,_,
_,_,_,M,M,M,_,_,_,
_,_,_,_,_,_,_,_,_,

_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,M,M,_,_,_,M,M,_,
_,M,M,_,_,_,M,M,_,
_,_,M,P,P,P,M,_,_,
_,_,_,M,M,M,_,_,_,

_,_,_,T,T,T,_,_,_,
_,_,_,T,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_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,M,M,M,_,_,_,
_,_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,_,
}


Maybe someone has an idea - i compared it with my other schematics again and again and don't find the difference. :(
Last edited by Milan* on Sun Mar 12, 2017 08:57, edited 1 time in total.
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Schematic from luatable is somewhat broken

by sofar » Sun Mar 12, 2017 08:34

please reuse the code from `saveschems` - https://github.com/minetest-mods/saveschems to validate and save stuff.

What are _, M and T?
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Schematic from luatable is somewhat broken

by sofar » Sun Mar 12, 2017 08:37

Try setting x = 9 and z = 8

but yeah, looking at the (tiny) image, it looks like it's all shuffled, lol
 

User avatar
Milan*
Member
 
Posts: 203
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant

Re: Schematic from luatable is somewhat broken

by Milan* » Sun Mar 12, 2017 08:46

Nhaaargh! I really confused x and z! Thank you! :D
(and yes, it was really random, not just wrong sided as u would expect from confused x and z ;))
 

User avatar
sorcerykid
Member
 
Posts: 219
Joined: Fri Aug 26, 2016 15:36
In-game: Nemo

Re: [solved] Schematic from luatable is somewhat broken

by sorcerykid » Sun Mar 12, 2017 09:56

Yep, that was the first thing I noticed too. It should be set to 9, since you have 9 nodes per row.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 9 guests

cron