** 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.
[0.4.8] Schematic API usage change
[0.4.8] Schematic API usage change
Last edited by hmmmm on Mon Aug 12, 2013 00:34, edited 1 time in total.
Personally, I am not a fan of ignore not being, well, ignored. It's a good node to use as a placeholder. Other than that, the changes to probability sound like they will be much more consistent, which I am totally in favor of.
Then again, my only experiences with using schematics were (ab)using them to make WorldEdit faster, since VoxelManipulators don't give access to param2 values. All in all, a good idea.
Then again, my only experiences with using schematics were (ab)using them to make WorldEdit faster, since VoxelManipulators don't give access to param2 values. All in all, a good idea.
WorldEdit 1.0 released
The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
Can you give me some solid examples of cases where you'd need to edit the param2 value?Temperest wrote: Then again, my only experiences with using schematics were (ab)using them to make WorldEdit faster, since VoxelManipulators don't give access to param2 values.
I do not want modders to add two separate versions of this call.sfan5 wrote:Seems good.
However, is there a way to detect which version the schematic api currently supports?
If not I'd suggest adding a flag to minetest.features
Since everybody who used schematic apis is actively developing their mods, I would hope everybody just changes their code. If this causes problems for an end user, simply tell them to update to the newest version of your own mod, and to upgrade from an unstable development branch of minetest to 0.4.8.
Anyway, I decided to proceed with this change.
- Johnyknowhow
- Member
- Posts: 358
- Joined: Fri Sep 21, 2012 15:17
- In-game: Minetestian
- Location: Washington, USA
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
Use one of the 0.4.7-dec versions, they are the most up to date and basically ARE 0.4.8Johnyknowhow wrote:I can't wait until MT 0.4.8 comes out,
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
- Johnyknowhow
- Member
- Posts: 358
- Joined: Fri Sep 21, 2012 15:17
- In-game: Minetestian
- Location: Washington, USA
ive always asked this,Dan Duncombe wrote:Use one of the 0.4.7-dec versions, they are the most up to date and basically ARE 0.4.8Johnyknowhow wrote:I can't wait until MT 0.4.8 comes out,
HOW ON EARTH DO I GET 0.4.7-DEC VERSIONS!??!?!!??!!?!?!?!?!?!!?!?!?!?!?!!?!?!?!?
ლ(ಠ_ಠლ)
It's weird looking back on my old posts as an adult. Miss some of the old times though. Johnyknowhow#5272