[0.4.8] Schematic API usage change
** N.B. This is of interest to anybody using raw schematic specifiers with minetest.place_schematic, or setting a -1 probability in a probability list passed to minetest.create_schematic - if you do not fix this, your mod will break! **
Hello modding community,
Those of you who have used the Schematics API probably realize that the way node probabilities work currently are unintuitive and inconsistent: 0 probability means the node is always placed, -1 means it is never placed, but you can't set a -1 probability with a raw schematic specifier, so the node name needs to be ignore instead, etc.
This, however, is going to be fixed with a new Minetest Schematic version. MTS version 1 files can still be used just fine; MTS version 2 files (schematics created as of this patch) cannot be used with older versions, though.
With the change, a value of 0 now means a 0% chance of a node occuring, and a value of 255 now means the node always occurs. -1 is not valid any longer when being passed along to the probability list in minetest.create_schematic, and "ignore" should not be used to signify that a node is never placed at that position when using raw schematic data.
This change may be somewhat inconvenient, but it is done in the modder's best interest.
Just a reminder, upstream Minetest is *unstable*, and the modding API can (and sometimes does) change within the time before an offical release is made.
Hello modding community,
Those of you who have used the Schematics API probably realize that the way node probabilities work currently are unintuitive and inconsistent: 0 probability means the node is always placed, -1 means it is never placed, but you can't set a -1 probability with a raw schematic specifier, so the node name needs to be ignore instead, etc.
This, however, is going to be fixed with a new Minetest Schematic version. MTS version 1 files can still be used just fine; MTS version 2 files (schematics created as of this patch) cannot be used with older versions, though.
With the change, a value of 0 now means a 0% chance of a node occuring, and a value of 255 now means the node always occurs. -1 is not valid any longer when being passed along to the probability list in minetest.create_schematic, and "ignore" should not be used to signify that a node is never placed at that position when using raw schematic data.
This change may be somewhat inconvenient, but it is done in the modder's best interest.
Just a reminder, upstream Minetest is *unstable*, and the modding API can (and sometimes does) change within the time before an offical release is made.