@max99 how hard do you think it would be to have an option to save digging blueprints?
It’s a bunch of work hooking everything up, but not hard. You can get the region from the mining component, then use the same file saving mechanism as the building system to save and load it. I expect the hardest part would be the UX to place it once loaded.
Would that also cover being able to plan building (ie, build) inside said digging planned region? Because that would be gold
The best case scenario would be able to merge digging instructions Into building instructions really. But not sure if thst would make it easier or harder to code.
That’s basically the same I said
Making it clearer: one thing is to be able to define a mining region (imagine mining a block from the ground) and being able to save it, but if you try to build inside the future-to-be-dug area it just builds on the surface (and not inside the previewed future hole)
Another thing is to actually be able to build inside the digging plans, which is what we both said, and that would be amazing because then you can plan buildings like cellars, mines, etc…
But from what Max says, I think that without some harder changes it would only be able to save mining areas like “mining templates” but not really save mining areas with building templates inside or partially inside of them?
So I know digging instructions are already part of building templates in a limited fashion, in the case of sunken floors. I don’t really know how hard it would be to expand that into arbitrary regions. Again, I expect the backend work to be the easy part, but getting the UX for it would be a huge pain in the neck.
Please elaborate further. What are the big problems you see coming with UX? Is it a design question or a question of how to code whatever one might come up with into the game. Are there inherent difficulties with displaying mined regions in the way the building editor displayes buildings?
It’s both design and implementation. Example problems one would need to solve to make this feature:
- How do you designate a mining region to be part of a specific building?
- Once loaded, how do you choose where to place the building. What if the mining region extends laterally or upward?
- How do you integrate all the mining tools with the building editor UI and undo system?
There are many more, but you get the idea.
How do you designate a mining region to be part of a specific building?
-presumably have a digging tool inside of the building editor, that only start digging when you hit build.
Once loaded, how do you choose where to place the building. What if the mining region extends laterally or upward?
-top of the digging layer is ground floor, or if there is no digging, as normal. might give some edge cases in odd non-flat situations but its still better than not having it
How do you integrate all the mining tools with the building editor UI and undo system?
There are many more, but you get the idea.
-like dragging blocks…but instead of adding it subtracts from the floor…
undo undoes it.
then how to not make it destroy the world:
digging gets done in its entirety first, then it plonks down whatever had to he inside the hole. so same rules as building in a hole would still apply (dig a staircase so the game doesnt say NOPE NOPE NOPE)
That’s a case for me, I’ve reverse engineered the building editor for Archmod recently and:
- that sunken building option is absolutely not capable of being transformed into a digging tool, it’s a simplistic workaround based on translating regions,
- adding any new tool into the builder is close to impossible due to hardcoded nature of the brushes, options are gravely limited here,
- the UI is not suited well into accepting new tools and was clearly made with no intention of any modder ever touching it as the only way to extend it properly involves at least two overrides so more than one building UI mod at once is impossible,
- building inside regions designated for mining would require reworking of the whole building code (yes, that’s harsh but true) as now it is in fact self-contained,
- mining and building AIs would clash because, well, reasons.
The last one is too detailed to explain but I will explain the most obvious solution and its negative consequences. You can separate mining and building in time just like building blocks are placed before entities now. The problem is it is quite easy to plan a building which cannot be completed without interlacing mining and building phases (mine something, add blocks to reach next mining site, mine again) what may be doable with extensive AI work but the algorithms it would involve (dividing building into parts which require access then monitoring if terrain hasn’t changed) are IMHO not worth even thinking about.
A solution I’d prefer a lot more than mining templates would be adding terrain blocks to building blueprints (I was expecting that to become an option when the Geomancer arrived, we got spawn stones instead which are quite unpleasant to work with) what in contrast seems quite doable (I’m even considering adding it to Archmod) so you’d mine the whole area out then re-add needed blocks. This has a downside of mining prior to building but mining will actually yield you resources so that’s not half bad IMO.
Yeah if you put it that way digging templates won’t really be a thing, but indeed placable terrain without clunky geomancer-Ing (a shovel hearthlings, just a Shovel) would be a sweet second best