[Mod] Dwarf Fortress style caverns [dfcaverns]

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

Thanks, though I'm not sure it should be considered masterful yet if it's got performance issues that prevent it from actually being used in populous servers.

I've got vacation time coming up over Christmas that I don't have any real plans for, I was hoping to work on some other mods for a bit but if they're not gripping me or if I get through the things I had planned for them faster than expected I'll definitely keep profiling this one in mind. It's unfortunately the most boring part of mod development, but obviously it's important.

If I simply can't find ways to make this mod snappier without a significant reduction to its scope, then it should actually be pretty easy to pull the materials out of this and reuse them in another context. I designed the mod as a modpack to try compartmentalizing the "raw materials" that go into the main mapgen for exactly this sort of purpose. In the most recent release I even started doing some work to try to isolate the dependencies that these mods have on the minetest_game default mods, with the notion that I might be able to make a Mineclone2-compatible version. That would make the materials even more portable.

I've made a bunch of Minetest mods over the years and I consider this particular one to be my "baby." So it'd be a bit painful watching someone dismember it for spare parts. But I tried to put seams into it that would make it easier to break up if someone really wanted to. :)

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by ThorfinnS » Post

I think the biggest problem is all the falling liquids. If we take the time to block off all the waterfalls in a cavern, we can often "fix" the lag. Though that might also be just the mapgen catching up. It seems particularly bad with lava. I get the theme of the mod, though. Dorfs love waterfalls.And lava is part of the !!!FUN!!!

The lavafall issue we're trying to isolate with [underch] does much the same in pegging the CPU usage on the server. So does intentionally "griefing" several hundred sources to the tops of mountain ranges. There is just something about them that consumes too many cycles. Maybe there's some way to optimize that code. I have not looked. While I'm fairly competent at C and C+, I never went beyond that, apart from maintaining a financials package in C#.

Hume2 has an interesting experimental approach -- mapgen runs only when nodes are exposed to air. Not sure that's going to help you much though. Looks like your caverns are much, much larger, and mostly filled with falling liquids. On the other hand, mathematically, the surface area doesn't increase as fast as the volume, so maybe it would.

For what it's worth, the half-dozen guys who hardcore [dfcaverns] and about 80 other mods aren't outrunning the i9.

[EDIT]
Y'know, it shows what kind of players we have here that we had not run into the issue of dorf crops not growing. They not only avoid building, they avoid farming.
[/EDIT]

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

Have you got dynamic_liquids installed, then? I just did a really quick peek at the profile of my test world last night and as I expected dynamic_liquids is very costly in terms of CPU cycles. dynamic_liquid is already as optimized as I know how (I'll take another look anyway though), it's just a situation where a lot of work simply needs to be done. And although dynamic_liquids isn't technically a part of dfcaverns, I always install it along with it in worlds because it just fits so well.

I can look at ways to make the initial state of a cavern more "stable", hydrologically and lithologically speaking, so that there's less of an initial surge of water or lava settling into place right after the map chunk becomes active. dynamic_liquid already does some tricks there, perhaps I can do more on that side as well.

I also noticed a lot of cycles being spent by magma_conduits' rock-heating ABM, that might be a place I can do more optimizations. Another mod that isn't technically part of dfcaverns but that I always install along with.

User avatar
MeseCraft
Member
Posts: 47
Joined: Wed Nov 04, 2020 22:52
GitHub: MeseCraft
Contact:

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by MeseCraft » Post

Thank you for adding settingtypes.txt's! Will really help me update to the newer versions more easily without editing a bunch of variable integers. Just updated my game with the settingtypes.txt and will update to this version now.

Also, I still wanted to breakout some of the stuff in my mobs_creatures pack into a mobs_redo pack for dfcaverns. I know its been awhile since we talked about this, but I'd be happy to put them in a pack and then share them with this project (which is an excellent project of course!). However, I have to untangle some dependencies and shared audio/texture files that exist right now. I just haven't gotten to that. I had more concepts for additional creatures. But haven't progressed in this realm recently. I have a bunch of work in a spreadsheet. Some of it I got stock on (floaters for example). I WILL get this to you when I can.
🌎 Website | ⛏️ MeseCraft Game | 📰 News | 🖌️ ContentDB

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

Heh, I do rather compulsively add a lot of settings to my mods. It's my way of passing the buck on some of the balance issues, I guess. :) Let me know if there's any variables you find yourself needing to hack around with in the code, I can always add more settings.

I'd love to have a set of "stock" mobs to include with DFCaverns. My most recent update actually added a mob-like feature to the underworld, and I tried to split the code for it out to allow it to be reused in other contexts if someone desires.

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

Just tagged a new release, v2.2 "Chasms". It adds a new type of large-scale cavern structure; large vertical chasms, usually no more than a few dozen meters wide but potentially several kilometers long and deep. To simplify mapgen all of the chasms are oriented north-south. I justify this in my head by imagining that the entire world of Minetest endured some sort of tectonic stress that generated faults in that direction. The chasms are capable of slicing through all three cavern layers and down into the Sunless Sea, but I didn't have them go deeper than that to avoid mixing huge amounts of water, oil, and magma together. I also kept them short of penetrating the surface due to those pesky seas up there.

As a new thing to decorate the new spaces I also added giant spider webs. If you're lucky enough to hit one when you fall into a chasm it'll save you from falling damage. They also show up in patches in layer 3 tunnels. If anyone knows of a good giant spider mob I'd be glad to rig the webs up to cause those to spawn in their vicinity.

cuthbertdoublebarrel
Member
Posts: 348
Joined: Tue Apr 14, 2020 16:03
GitHub: cuthbert

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by cuthbertdoublebarrel » Post

FaceDeer wrote:
Mon Mar 29, 2021 00:19
If anyone knows of a good giant spider mob I'd be glad to rig the webs up to cause those to spawn in their vicinity.
how about the tarantula from not so simple monsters ?
https://github.com/NPXcoot/nssm/blob/ma ... antula.lua.
https://wiki.minetest.net/Mods:Mobs#Not ... .5Bnssm.5D
there is an actual giant spider mod that i stumbled across a few weeks back but try as i might i can not track it down agian . i was sure i followed a link from here https://wiki.minetest.net/Mods:Mobs . must be somewhere on the forum as i remember reading the comments of how it was freaking people out .
Project BrutalTest...hide your Petz

User avatar
MeseCraft
Member
Posts: 47
Joined: Wed Nov 04, 2020 22:52
GitHub: MeseCraft
Contact:

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by MeseCraft » Post

Check out the spider mob I have in my mobs_creatures source (www.mesecraft.net). It has some decent features. The webs it shoots are really good and they're really powerful. I modeled it after a description of the spiders in df but was never able to implement a nice poison function, but wanted to via player effects. Can't wait to try this update. This mod is essential. Cave variety is really necessary for diligent spelunkers.
🌎 Website | ⛏️ MeseCraft Game | 📰 News | 🖌️ ContentDB

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

After being on a sort of spontaneous modding retirement for a few years, I've released an update to dfcaverns.

It adds achievements and ambient sounds, as well as a bunch of minor fixes and polish in various places. It should also now be compatible with the latest repository version of Mineclone2, and will be compatible with Mineclone5 once a pull request I submitted to them has been accepted.

The changes I had to make for cross-game compatibility were rather extensive under the hood, but hopefully they'll make it easier in the future to add additional game compatibility as well. I collected all of the dependencies on external game mods into the "df_dependencies" mod, in theory I should only have to make changes in there to add new dependencies and the rest of the modpack will draw on them without any changes.

There's also a "get biome" function now, that might be handy for future mob support. Things can now test positions to find out what kind of cavern they're in.

alerikaisattera
Member
Posts: 62
Joined: Mon May 02, 2022 11:03
GitHub: alerikaisattera

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by alerikaisattera » Post

The new version crashes if mesecons is in use

Code: Select all

ModError: Failed to load and run script from /home/aleri/.minetest/mods/dfcaverns/df_dependencies/init.lua:
.../aleri/.minetest/mods/dfcaverns/df_dependencies/init.lua:19: Found more than one item for dependency set { ["default"] = default:mese_crystal,["mesecons"] = mesecons:wire_00000000_off,} 
stack traceback:
	[C]: in function 'assert'
	.../aleri/.minetest/mods/dfcaverns/df_dependencies/init.lua:19: in function 'select_required'
	...aleri/.minetest/mods/dfcaverns/df_dependencies/nodes.lua:9: in function 'select_required'
	...aleri/.minetest/mods/dfcaverns/df_dependencies/nodes.lua:57: in main chunk
	[C]: in function 'dofile'
	.../aleri/.minetest/mods/dfcaverns/df_dependencies/init.lua:37: in main chunk
Check debug.txt for details.

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

Just put up a fix for this. Mesecons are part of the Mineclone games so my code got a bit confused when it was also installed alongside default game.

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by Eris » Post

I found the weirdest bug ahah.
When using this mod alongside Sokomine's Windmill mod, its rotating blade nodes spawn in the cavern layers of df_caverns, unprompted. Very peculiar!
Jump in the caac

User avatar
freshreplicant
Member
Posts: 223
Joined: Sun Aug 09, 2020 10:37
In-game: freshreplicant

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by freshreplicant » Post

FaceDeer wrote:
Mon Aug 29, 2022 07:23
After being on a sort of spontaneous modding retirement for a few years, I've released an update to dfcaverns.
Glad you're back! Love your mods, dfcaverns especially so.

If you want one more suggestion for the mod...some of the item textures are very blurry/messy looking. It'd be great if somebody (not necessarily you) could come up with some neat ones that do the mod justice.

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

Ah, windmills, my old nemesis! I'll try out that mod and see if I can figure out what the heck.
some of the item textures are very blurry/messy looking.
Which ones? I know the food ones in particular may not be the best, I used images of real food from Wikimedia Commons and tried applying various filters and whatnot to "iconify" them but I'm no artist.

Edit: Also, this was my 500th post on the forum! [lights off a torch bomb in celebration]

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by Eris » Post

FaceDeer wrote:
Wed Aug 31, 2022 01:02
Ah, windmills, my old nemesis! I'll try out that mod and see if I can figure out what the heck.
I fuond them at ~Y -950, near the biome with tunnel tubes on the ground. I tried to find them again, and I don't think I was specific enough, sorry.
Edit: Also, this was my 500th post on the forum! [lights off a torch bomb in celebration]
Congrats, Don Quixote! :P
Jump in the caac

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by Eris » Post

FaceDeer wrote:
Wed Aug 31, 2022 01:02
Ah, windmills, my old nemesis! I'll try out that mod and see if I can figure out what the heck.
I found them at ~Y -950 on the ground, near the biome with tunnel tubes. I tried to find them again, and I don't think I was specific enough, sorry.
Edit: Also, this was my 500th post on the forum! [lights off a torch bomb in celebration]
Congrats, Don Quixote! :P
Jump in the caac

User avatar
freshreplicant
Member
Posts: 223
Joined: Sun Aug 09, 2020 10:37
In-game: freshreplicant

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by freshreplicant » Post

FaceDeer wrote:
Wed Aug 31, 2022 01:02
Which ones? I know the food ones in particular may not be the best, I used images of real food from Wikimedia Commons and tried applying various filters and whatnot to "iconify" them but I'm no artist.
I totally forgot the word 'food' from my post. Yes, those are the ones I mean.

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

Thought so. :) I did tidy them up a little more in the most recent update, I got rid of their fuzzy edges. Hopefully that helps.

alerikaisattera
Member
Posts: 62
Joined: Mon May 02, 2022 11:03
GitHub: alerikaisattera

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by alerikaisattera » Post

A few small problems with groups:

* Group "sugar" of Sweet Pod Sugar should be changed to "food_sugar"
* "stone" should be removed from Slade Drill

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

Fixed on Github. I'll wait a bit longer before rolling out a fix for ContentDB, in case there are other little glitches to fix as well (I also found a couple of undeclared globals).

alerikaisattera
Member
Posts: 62
Joined: Mon May 02, 2022 11:03
GitHub: alerikaisattera

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by alerikaisattera » Post

It seems that Puzzle chests are not generated

EDIT: they are in small buildings, not in the wilderness of underworld as I thought

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

Yeah, I thought it would be nice to put something in those buildings so they weren't just barren set pieces. The purpose of the puzzle chests is just to provide an extra hint regarding how the puzzle seals are to be solved, hopefully not too subtle and not too obvious.

alerikaisattera
Member
Posts: 62
Joined: Mon May 02, 2022 11:03
GitHub: alerikaisattera

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by alerikaisattera » Post

Is there any way to add stuff to bones and puzzle chests? They only contain stuff from the game and dfcaverns, and it would be great to integrate with other mods and allow mods to add things themselves

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by FaceDeer » Post

There's a way to add stuff to the bones, the "bones_loot.register_loot" public API. It uses the same table format as the dungeon_loot mod, and indeed if dungeon_loot is installed it's basically just a wrapper for that mod. The place where the existing loot gets added is in dungeon_loot.lua, the loot type the bones draw from is called "underworld_warrior". Other mods can add stuff by making a call like that with a table of additions. I don't know if there's a way to easily remove stuff, though, I'd need to do some digging. As I recall my thought process went "cool, there's already an API in the default game for doing this kind of thing, it must be good so I'll just ape that." How young and naiive I was back in those days of yore.

When it came to the puzzle chests I went "OMG I just want to *ship the game* already, for crying out loud" and created this quick-and-dirty bit of code that throws a couple of "coloured" items into it suitable for use with the puzzle seals and calls it a day. :) If you're wanting an API to fiddle with that I can add one for you, maybe tonight. Puzzle chests don't have a very large inventory, I needed a lot of space in the UI for the code dials, would you want it to be a bit bigger? I could probably double it without stretching the formspec too badly.

alerikaisattera
Member
Posts: 62
Joined: Mon May 02, 2022 11:03
GitHub: alerikaisattera

Re: [Mod] Dwarf Fortress style caverns [dfcaverns]

by alerikaisattera » Post

FaceDeer wrote:
Mon Sep 12, 2022 16:56
There's a way to add stuff to the bones, the "bones_loot.register_loot" public API. It uses the same table format as the dungeon_loot mod, and indeed if dungeon_loot is installed it's basically just a wrapper for that mod. The place where the existing loot gets added is in dungeon_loot.lua, the loot type the bones draw from is called "underworld_warrior". Other mods can add stuff by making a call like that with a table of additions. I don't know if there's a way to easily remove stuff, though, I'd need to do some digging. As I recall my thought process went "cool, there's already an API in the default game for doing this kind of thing, it must be good so I'll just ape that." How young and naiive I was back in those days of yore.

When it came to the puzzle chests I went "OMG I just want to *ship the game* already, for crying out loud" and created this quick-and-dirty bit of code that throws a couple of "coloured" items into it suitable for use with the puzzle seals and calls it a day. :) If you're wanting an API to fiddle with that I can add one for you, maybe tonight. Puzzle chests don't have a very large inventory, I needed a lot of space in the UI for the code dials, would you want it to be a bit bigger? I could probably double it without stretching the formspec too badly.
Doubling the inventory size of puzzle chest is a good idea. I think it should be possible to set the probability and stack size for the additional registered items.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests