[Abandoned] [Mod] Stonebrick Dungeons [0.4.1] [stonebrick_dungeons]

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

[Abandoned] [Mod] Stonebrick Dungeons [0.4.1] [stonebrick_dungeons]

by Hamlet » Post

Image
Turns newly generated cobblestone dungeons into stonebrick.

Version: 0.4.1
License: EUPL v1.2 or later.
Change log: link

Dependencies: default, stairs (found in Minetest Game)

All Settings -> Mod -> stonebrick_dungeons

Downloads:
Archives: .zip .tar.gz
Source code: Codeberg


Installation
Unzip the archive, rename the folder to stonebrick_dungeons and place it in
../minetest/mods/

If you only want this to be used in a single world, place it in
../minetest/worlds/WORLD_NAME/worldmods/

GNU+Linux - If you use a system-wide installation place it in
~/.minetest/mods/

For further information or help see:
https://wiki.minetest.net/Help:Installing_Mods
Attachments
StonebrickDungeons4.png
StonebrickDungeons4.png (190.79 KiB) Viewed 1874 times
Last edited by Hamlet on Fri Oct 02, 2020 17:32, edited 23 times in total.
My repositories: Codeberg.org | My ContentDB's page

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Stonebrick Dungeons [0.1.0] [stonebrick_dungeons]

by Sokomine » Post

Does it turn all cobble into stonebrick? It might be more intresting to plug into mapgen, get informed about dungeon generation (at least partly possible) and decorate the rooms from there on.
A list of my mods can be found here.

User avatar
duane
Member
Posts: 1715
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r
Location: Oklahoma City
Contact:

Re: [Mod] Stonebrick Dungeons [0.1.0] [stonebrick_dungeons]

by duane » Post

Sokomine wrote:Does it turn all cobble into stonebrick? It might be more intresting to plug into mapgen, get informed about dungeon generation (at least partly possible) and decorate the rooms from there on.
There's code in the new dungeon_loot mod in minetest_game for finding the boundaries of dungeon rooms using gennotify.
Believe in people and you don't need to believe anything else.

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.1.0] [stonebrick_dungeons]

by Hamlet » Post

Sokomine wrote:Does it turn all cobble into stonebrick? It might be more intresting to plug into mapgen, get informed about dungeon generation (at least partly possible) and decorate the rooms from there on.
Yes, it also turns cobble stairs into stonebrick stairs; this module was born to prevent dungeons crumbling when using fallen_nodes - i.e. placing a torch or a light point from BrunoMine's hardtorch triggered the node state update making the whole structure crumble. Definitively not acceptable for my subgame.

Of course one could just use it for cosmetic purposes, tuning it to add torches and other furniture - unfortunately this is beyond my skills.
My repositories: Codeberg.org | My ContentDB's page

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.2.0] [stonebrick_dungeons]

by Hamlet » Post

Release v0.2.0

- If Castle Masonry is installed, then "pavement bricks" are used instead of "dungeon bricks".

The former were way too dark, preventing to see anything even with tons of torches.
My repositories: Codeberg.org | My ContentDB's page

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: deleted

by texmex » Post

Why delete this mod? :(

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: deleted

by Hamlet » Post

texmex wrote:Why delete this mod? :(
I'm in the process of reviewing and rewriting all of my contents, it will come back as soon as possible. :)
My repositories: Codeberg.org | My ContentDB's page

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: deleted

by texmex » Post

Hamlet wrote:I'm in the process of reviewing and rewriting all of my contents, it will come back as soon as possible. :)
It's a bit bad open source etiquette to take repos down in the meanwhile however. But it's good to hear it will be back soon.

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: deleted

by Hamlet » Post

texmex wrote:It's a bit bad open source etiquette to take repos down in the meanwhile however. But it's good to hear it will be back soon.
*removed archive link*
Last edited by Hamlet on Wed Apr 11, 2018 09:11, edited 1 time in total.
My repositories: Codeberg.org | My ContentDB's page

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Stonebrick Dungeons [0.2.0] [stonebrick_dungeons]

by texmex » Post

Thanks alot, Hamlet! <3

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.2.1] [stonebrick_dungeons]

by Hamlet » Post

Released v0.2.1
My repositories: Codeberg.org | My ContentDB's page

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.2.2] [stonebrick_dungeons]

by Hamlet » Post

Notice: git repository back online.
My repositories: Codeberg.org | My ContentDB's page

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by Hamlet » Post

Released v0.3.0

Added:
- Replacement will occur only on dungeon generation notification, and only in that area.

Changed:
- License changed to EUPL v1.2.
- Code rewritten from scratch.
My repositories: Codeberg.org | My ContentDB's page

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by Hamlet » Post

Sidenotes...

v0.2.x scanned on map generation for any cobblestone nodes.
This was fine for vanilla map generators, which only use cobblestone in dungeons but it was not fine for map generators that use cobblestone in their biomes - for example, "Dwarf Fortress Style Caverns".
Imagine a cavern's floor dotted with stonebricks...

v0.3.0 uses "dungeon notify generation", that is a notify issued by the mapgen.
This restricts the scan to a defined area, allowing for compatibility with map generators using cobblestone in their biomes; it also prevents unnecessary scans.

However, this method has its limits: the "dungeon generation notify" does not specifies, for example, the area occupied by a dungeon's room or a tunnel: it only tells you where the room's generation starts. Let's say, the room's center coordinates.

To better understand this point, an image.
The mese lamps are placed at the coordinates given by the notify.
By the way, since I forgot to remove a debug feature, you can see those coordinates in the console: "Dungeon position: (190,-102,320)"

Image

Therefore we know where the "room's center" is, nothing else.
To change its walls and stairs, the code scans the area surrounding the given coordinates - the offset in all directions is 22 nodes - and replaces the cobblestone nodes to obtain this:

Image

This method's limit is the offset: 22 nodes, which has been chosen because mapgen_v6 dungeons' "room_size_large_max" Y value (height) is 21 (others' is 16).
If between "room A" and "room B" there is a tunnel going out of the reach, it will stay as it is: cobblestone-made.

To sum up, I consider this mod good enough to achieve its goal while maintaining the widest possible compatibility; but I'm aware of its limits.

Currently the best way to completely remove cobblestone from dungeons is unregistering and re-registering the biomes, changing these values:

Code: Select all

node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
If you would like a better way to achieve this, you might be interested int this: Ability to (partially) override definitions of existing biomes after they have been registered which is a request for "overriders" that should allow to achieve what this mod does - and possibly other things - in a cleaner, more performant and safe way... last but not least, more user-friendly.
Attachments
Dungeon_MeseLamps2.png
Dungeon_MeseLamps2.png (262.61 KiB) Viewed 1874 times
Dungeon_MeseLamps.png
Dungeon_MeseLamps.png (412.01 KiB) Viewed 1874 times
My repositories: Codeberg.org | My ContentDB's page

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by paramat » Post

> Currently the best way to completely remove cobblestone from dungeons is unregistering and re-registering the biomes

Why not use this method in this mod? I recommended this in the issue and v-rob posted the simple overriding code.
That will be much simpler and not affect mapgen speed at all, whereas this mod, that uses set_node, will be slow and intensive.

kestral
Member
Posts: 95
Joined: Mon Mar 27, 2017 21:56
GitHub: kestral246

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by kestral » Post

I've been playing with v-rob's override_biome today, and it does seem to be working—changing the dungeons from cobblestone to stonebrick. (I overrode all the biomes that had node_dungeon* in them, except the floatland ones.)

However, It seems to be causing big problems with biome decorations—the grassland biome is being covered with deciduous trees, and the snowy_grassland biome is covered with coniferous trees.

I was also experimenting with this method to see if I could add a couple more dirt_with_snow nodes. With just overriding node_top for taiga or snowy_grassland, the grassland biome was also filled with deciduous trees, (but not the snowy_grassland). Copying over all the register_decoration statements and rerunning them after the biome overrides did seem to clean up all the biomes again, but that's more than I want to do.

As a side question, how do I get dungeons on the surface again? I realized I haven't seen them in a while and I had to go flying through the ground pretty deep with noclip to even be able to find a dungeon. (I'm using 5.2dev.)

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by Hamlet » Post

paramat wrote:
Hamlet wrote: Currently the best way to completely remove cobblestone from dungeons is unregistering and re-registering the biomes
Why not use this method in this mod? I recommended this in the issue and v-rob posted the simple overriding code.
That will be much simpler and not affect mapgen speed at all, whereas this mod, that uses set_node, will be slow and intensive.
I thought about doing it, but after checking DFCaverns' code I decided not to do it because of this:
Unfortunately there's no easy way to override a single biome, so do it by wiping everything and re-registering
Not only that, but the decorations also need to be wiped and re-registered - it appears they keep
track of the biome they belong to via an internal ID that gets changed when the biomes
are re-registered, resulting in them being left assigned to the wrong biomes.
Source: link

Shortly said: since I'm a total noob with mapgens and decorations related matters, I preferred not to play the "sorcerer's apprentice"; kestral's post is an example of the situation that I wanted to avoid: once that the "genie is out of the bottle" (or, "the s*it hit the fan") I would have no idea on how to put it back in. :/

Moreover and most importantly, I don't know what could happen using two mods using that method: Stonebrick Dungeons + DFCaverns = ???
In my game I could add to DFCaverns an "optional_depends = stonebrick_dungeons" to prevent precedence conflicts, but that's a single case: what if someone else uses it with similar potential conflicts (Stonebrick Dungeons + custom mapgen + another decoration mod + whatever + etc)? ?_?

Thus, I took no chance: indeed this method is slower and less efficient, but at least it won't ruin someone's map - I think that this is the most important thing: in the worst scenario there will be a weird looking dungeon, not a whole map messed up. :)
My repositories: Codeberg.org | My ContentDB's page

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by Hamlet » Post

kestral wrote: As a side question, how do I get dungeons on the surface again? I realized I haven't seen them in a while and I had to go flying through the ground pretty deep with noclip to even be able to find a dungeon. (I'm using 5.2dev.)
I can't find the setting but I'm pretty sure it's there somewhere, anyway look at this:
link
My repositories: Codeberg.org | My ContentDB's page

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by paramat » Post

> Not only that, but the decorations also need to be wiped and re-registered - it appears they keep
track of the biome they belong to via an internal ID that gets changed when the biomes
are re-registered, resulting in them being left assigned to the wrong biomes.

Ahh interesting.
So yes i can understand being careful here.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by paramat » Post

kestral wrote:As a side question, how do I get dungeons on the surface again? I realized I haven't seen them in a while and I had to go flying through the ground pretty deep with noclip to even be able to find a dungeon. (I'm using 5.2dev.)
Dungeons should always appear on the surface, unless this mod does something weird.

The 'projecting dungeons' setting has been removed as it no longer seems to have any effect. The only difference it made was allowing dungeons that occasionally appeared with complete rooms and projecting out from the terrain surface.

Dungeons should still appear on the surface but with 'cut open' rooms.

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by Linuxdirk » Post

I wonder how complicated/complex it would be having dungeons with cobblestone ground (this is what cobblestone is for, imo) and stone brick walls.

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by Hamlet » Post

Interesting.
First you write:
paramat wrote: That will be much simpler and not affect mapgen speed at all, whereas this mod, that uses set_node, will be slow and intensive.
Which of course means that you have looked at my "20 lines of code"
init.lua
I take for granted that you can understand in a blink what those "20 lines" do.

Then you write:
paramat wrote: Dungeons should always appear on the surface, unless this mod does something weird.
Which, since you are a Core Developer, means that if there is something going wrong in Minetest is due to my mod, not your Engine.

Well.
If I were you, instead of going around "blaming" other people, I would ask myself if there is actually something wrong in the Engine.

For example, the fact that floating islands are broken since at least two years; no matter how you turn them off, be it either via GUI settings or minetest.conf - the mapgen V7 will keep spawning floating pieces of land.
The fact that they might be just a pile of 3 floating nodes - instead than a full scale island - does not make the bug less noticeable.

End Note: when using this mod alongside DFCaverns, OFTEN cobble stairs don't get converted into stonebrick, or only some of them; this proves that no matter which "performant" (voxelmanipulation, biome de-registration and re-registration) method one uses: conflicts do happen, and as has already been stated and proved beyond any reasonable doubt, they can screw up a whole map.
Last edited by Hamlet on Tue Jan 07, 2020 13:43, edited 1 time in total.
My repositories: Codeberg.org | My ContentDB's page

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by Hamlet » Post

Linuxdirk wrote: I wonder how complicated/complex it would be having dungeons with cobblestone ground (this is what cobblestone is for, imo) and stone brick walls.
I thought about that shortly after releasing the latest version, then I decided not to even try implementing that feature.
I'd say that it could be enough to add another check: if there is air above that node, it means it's a floor node, then leave it made of cobblestone or turn it into paving node, e.g. dirt or stone slabs.

[sarcasm]
Spoiler
If in the next 10 or 20 years it will be possible to override a dungeon's node, I will think of it. If I will be still alive, of course.

I guess that only people living in the Old And Obsolete Continent ("Europe") like you and me, more precisely in a Nation or a City that is older than 100 years (the one I'm living in is 2068 - two thousand and sixty eight - years old), know that cobbles are for paving roads, not for building walls - even though, if one would stop 5 minutes thinking, maybe could imagine that a wall made of round shaped stones could not possibly stand - but not everyone is a mason! This is Old, Ancient, Obsolete Knowledge.

I will add that actually, real life dungeons' floors are often - if not almost always - made of bare dirt in the 99% of the cases, except some rare ones made out of bricks or stone slabs ("gneiss", to be precise).

Don't tell anyone though, it's a supersecret secret - classified informations.
[/sarcasm]

Honestly?
At the moment I believe that it would be easier to turn off vanilla dungeons and add your own dungeon generator; faster and cleaner than messing with hardcoded features.
My repositories: Codeberg.org | My ContentDB's page

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by Linuxdirk » Post

Hamlet wrote:I'd say that it could be enough to add another check: if there is air above that node, it means it's a floor node, then leave it made of cobblestone or turn it into paving node, e.g. dirt or stone slabs.
Aren't there aliases/placeholders for dungeon stones already in the code? Couldn't it be possible to just configure the generator/schematics to ue aliases for walls, ceilings, and floors and then have those configured by the biome?
Hamlet wrote:At the moment I believe that it would be easier to turn off vanilla dungeons and add your own dungeon generator; faster and cleaner than messing with hardcoded features.
Yes, after years of nagging I decided to exclusively go this route because I learned that nothing will ever really addressed and takes dozens of releases or will simply be ignored forever. Everything that annoys me and that is ignored by the devs I fix by myself using a mod.

Seems like I need to dig into dungeon generation now.

User avatar
Hamlet
Member
Posts: 766
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Stonebrick Dungeons [0.3.0] [stonebrick_dungeons]

by Hamlet » Post

Linuxdirk wrote: Aren't there aliases/placeholders for dungeon stones already in the code? Couldn't it be possible to just configure the generator/schematics to ue aliases for walls, ceilings, and floors and then have those configured by the biome?
I did not understood that you were talking about the mapgen/biome itself; that is "Black Magic" for me, I would not try to touch that code even with a 50mt pole - that is, from a safe distance.
Linuxdirk wrote: Seems like I need to dig into dungeon generation now.
I thought about that as well.

Then I thought about the most probable scenario:

1 - Learn from Rogue (https://www.coredumpcentral.org/) how a nice dungeon generator works.

2 - Implement it into LUA as a mod for Minetest.

3 - Release it as standalone mod.

Three steps that, needless to say, would require hours of planning, development, testing, bugfixing - that is, days and weeks, at least for an hobbyist programmer as me.

Then, the scenario would probably evolve into:

4 - People using such a complex mod without even writing "cool ty" (that's 7 characters, space included) in the mod's thread.

5 - Server owners would add it to the other hundreds of mods, without even giving proper credit either on the server itself or on the server's forum thread; example "This server has been possible thanks to the work of A, B, C, which actually developed X, Y, Z".

6 - People would reply to the mod's thread only to complain about this or that glitch, and to ask for this or that additional feature - as if the whole is a due thing.


End of the story: I'll gladly spare myself all of the above.

However if you are fine with the above, I would surely add such a feature in my game.
My repositories: Codeberg.org | My ContentDB's page

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests