Structure placement api #2275
No reviewers
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
feature request
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#2275
Loading…
Reference in New Issue
No description provided.
Delete Branch "structure_api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a (new) mcl_structures.register_structure(name,def) command.
The old register_structure thing was renamed to structure_data - the only thing it has been used for is to store the locations of strongholds.
Also adds dynamically generated geodes and surface pools (lava pools and lakes) as a test for the placement by function option.
It supports /spawnstruct now so you can test placement by using that.
Shipwrecks and geodes are using this right now but I hope to get some or hopefully most of the legacy structures to use this. But since this is 100% compatible there's no need to rush. mcl_mapgen_core is going to be a bit of a task to untangle hehe.
Testing
Use seed "y" for testing:
they are all somewhat common right now. Might have to make them a bit rarer in the future but for now I think it's good when they're easy to find both so players actually do find them and they get some testing.
Perspective
End cities are going to be fairly easy with this as level 2 (multipart structures) - the plan is to make it so you put the structblock inside of another schematic (or just define its relative position) so it gets gradually placed by lbm and will always fit.
Level 3 is going to be nether fortresses and overworld (surface) structures which need to be more clever about terrain.
9ba3ff4ae8
to2903639459
c7d5e2a197
to3b297ce047
rebased and removed 2 debug lines lol
7ff610fff2
to3782797dec
4603c58c62
to5294bc4a37
WIP: Structure placement apito Structure placement apiStructure placement apito WIP: Structure placement apio wait i gotta figure out noise values instead of fill ratio - i noticed otherwise they get placed differently when a new structure is added rofl
WIP: Structure placement apito Structure placement apic0439a815b
to9eafee2fe0
well gotta tweak the noise values still ... sometimes theres way too many lava pools lol
9eafee2fe0
tob87723e8c0
Yeah, we don't want to set the world on fire. :P
well seems better now
I couldn't find any lava or water lakes at the listed coordinates.
Same seed with a completely reset 'minetest.conf'; so vanilla values for v7 mapgen.
But, I eventually found one of each here:
water lake: -63, 44, -75
lava lake: -729, 38, -1493
Shipwrecks, and geodes came up fine at the listed coordinates. Also, saw a lot of dungeons here, & there.
Looks good, nice work!
On the minor issue side of things.
That little wrapper around the "spawnstruct" chat command causes Minetest to label the mod it's under as "???"; when you type, 'help' in-game. Instead of the usual "mcl_structures".
So, it may eventually be better to just add the parameters for shipwrecks, & lakes to the command directly.
As right now. If you remove the wrapper; the commands to place shipwrecks/lakes still works, but they don't show up as optional parameters.
But, we can tweak this at another time if you want.
well one of the ideas of this is to not have to edit 50 places in the code if you want to add a structure (the whole mcl_mapgen_core / mcl_structures circus is quite ridiculous tbh ^^ )
It seems less than ideal if they need to be added to /spawnstruct ... but i have an idea. i suppose i could just rewrite its params field on_mods_loaded
yep looks like that works ... and yeah i changed the noise of surface pools and forgot to put in new coords
60cc55ec18
to92da429f50
Side note about dungeons:
They were not touched here at all - there's always been tons of them.
Incidentally i discovered that they can make mapgen fairly slow. A number of times i thought I made it slow but then when i measured it tsm_railcorridors came up hehe.
I'll look at it some time and see if it can be made faster.
Do we need these logged?