Apollounknowndev / lithostitched

A library mod with new configurability and compatibility enhancements for worldgen
MIT License
6 stars 3 forks source link

[Feature Request] Support `limit` key for pool elements #1

Closed SettingDust closed 8 months ago

SettingDust commented 8 months ago

limit can make the elements spawn limited times instead of only weighted

I'm willing to contribute but not sure if it is out of the scope of this mod

A standalone mod that can limit any element in any pool that is data-driven may be better.

Apollounknowndev commented 8 months ago

Guaranteed elements in jigsaw structures is a part of Lithostitched 1.1, information on how it works is on the wiki here.

SettingDust commented 8 months ago

A bit confused. How can I make it work with the worldgen_modifier injected element?

Apollounknowndev commented 8 months ago

It's not a part of template pools, it's baked into the lithostitched:jigsaw structure type. It's not quite the same thing, but it was by far the easiest way to implement it.

SettingDust commented 8 months ago

Alr. I have two points.

  1. How about something like pool injection to inject elements into guaranteed elements? So that users can add conditional elements like mod structure
  2. How can I do something like only spawn 1 specific structure for the target pool? I'm not quite sure how min depth works. Does that mean the amount of Jigsaw Block between start pool and current pool?
Apollounknowndev commented 8 months ago
  1. Interesting idea, might end up allowing guaranteed elements to run modifier predicate checks in the future.
  2. min_depth controls how many jigsaw connections away the element must be from the starting element at a minimum. For example, a min_depth of 5 means that there must be at least 5 jigsaw pieces between the start piece and the guaranteed piece.
SettingDust commented 8 months ago

In my imagination. I can't limit the generated guaranteed piece amount with this option. Larger min_depth should make it less

Apollounknowndev commented 8 months ago

Ohh, do you mean to have something that says "generate this piece up to x number of times"?

SettingDust commented 8 months ago

Ohh, do you mean to have something that says "generate this piece up to x number of times"?

ya XD Just like https://modrinth.com/mod/structure-pool-api

If you are going to include it as a feature I will contribute. Or I will create a standalone mod for that

SettingDust commented 8 months ago

Since you assigned yourself. Should I contribute or wait for you?

Apollounknowndev commented 8 months ago

I've gotten it mostly implemented, just need to fix a few... minor issues. It'll be in Lithostitched 1.1.3.

2024-01-17_23 00 01

Apollounknowndev commented 8 months ago

Added in Lithostitched v1.1.3, details on the pool element type are here: https://github.com/Apollounknowndev/lithostitched/wiki/Structure-Utilities#limited

SettingDust commented 8 months ago

Awesome!