-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smallmap scope for parameters #73021
Comments
I think you should start with just using smallmap, as the complication of dealing with some, but not all Z levels probably isn't worth it (and if there is a need for limited levels for performance reasons, I'd rather introduce a new type of map with a limited range of Z levels when the need becomes apparent. Porting whatever has been done with smallmap for those cases to this new map version should be straightforward.). Note that smallmap isn't a stack of tinymaps, but a full column of all Z levels in a 2 * 2 submap grid, just like map covers all Z levels over an 11 * 11 submap area. This means smallmap can be used in the same manner as map (but with the same coordinate origin and range as tinymap, and thus, from that perspective, as a tinymap), with access to all Z levels as needed. Note that if you're cargo culting the lot, it would probably be easier to copy however existing code juggles tinymaps, but going forward I think using smallmap is the better choice. If you need to align what's on different Z levels with each other I assume it has to be done either the same way mapgen currently does it for when it's actually done, or by code that looks for where the stairs are on the source level and then generates stairs (and the rest) based on that. If I understand it correctly, things like rivers and shores (and ravines, which aren't present in vanilla) are generated by code to provide variation. Generation of lower levels would need to depend on how the level above them was generated to determine their layout, with the same kind of logic (possibly with different parameters, so e.g. the steepness can decline as you go down) applied for each deeper level. If the surface is generated by JSON, I think it would be a horrendous nightmare to encode the variations in the lower levels in JSON, with nightmarish conditions (assuming it's even possible). |
Where did I say I wanted to use anything other than smallmap?
I'm not going to pretend I understand the difference you're trying to highlight here, are you just saying it's all the submaps that would be in a vertical column of tinymaps but not the actual tiny maps themselves?
Again I don't understand where I'm suggesting I don't want this based on smallmap? It's literally in the title
I don't think any of the sub level stuff should matter here as parameters aren't defined/used until they enter reality bubble
Eh?
River shores barely have variation atm but yes all are currently hardcoded, I'm unhardcoding rivers atm (to potentially be backported to 0.H) and plan to unhardcode the others when I get round to it.
Ye you'd have like a nested_mapgen_id parameter for the surface where like wibblywobblysurfaceA which would use wibblywobblyz-1A etc going down with minor randomised placement within each, tailored to suit the layer above.
I really don't think it's that bad at all, all the logic would be housed in the below surface omt (probably a new one seperate from the all water one to make it possible to distinguish for stuff spawning on the bottom) and then all the groups of nests categorised by variant and then z-level. This is already possible if I hacked lakes into placing vertical columns as specials I just don't want to do that bc ew.
I actually tried this previously and didn't get anywhere, I appreciate it's possible but I'd rather use an unhardcoded solution anyways |
A map is an 11 * 11 submap area with all Z levels, a smallmap a 2 * 2 submap area of all Z levels, and a tinymap a 2 * 2 submap area of a single submap. All are variants of the map. Thus, a smallmap contains all the data that a stack of tinymaps covering the same overmap tile but at different Z levels cover. Note, however, that a tinymap isn't a fundamental structure. The base unit is a submap. You can do most of the things you can do on a smallmap with a stack of tinymaps. The things you can't do are the ones where the code silently does nothing when trying to access other Z levels if the map doesn't support Z levels (which the single level tinymap obviously can't do).
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered. |
Is your feature request related to a problem? Please describe.
I want to make the underwater OMTs at the edge of lakes/ocean a gradual descent rather than just cubes but doing so with either C++ or JSON is currently very awkward. Ravines could also use choosing a more random edge that's mostly fixed all the way down.
Lining up road to sewer manholes with JSON without using a overmap special that I want to avoid is also awkward rn due to the sewers under the manhole not being a fixed orientation (rn they use the nonsense teleport stuff that exists primarily for old labs)
Solution you would like.
Both of these could be solved by adding a new parameter scope for the new smallmap Patrick introduced, a vertical stack of tinymaps.
This would allow OMTs placed outside of specials and even unrelated maps in the case of roads and sewers to use parameters for nest alignment.
Describe alternatives you have considered.
I'll attempt to do this myself at some point by cargo culting #50681 but if anyone who actually understands the code well wanted to add this sooner I'd be thankful
Additional context
No response
The text was updated successfully, but these errors were encountered: