Open justonia opened 6 years ago
You can add some lake samples, then call MultiplyFrequency to set the frequency of the the lake tile to zero. Then it is legal to place, but WCF will never choose to place it (unless it is the only legal placement). In your case, you still want rivers to be placed, so you'll want two different tiles, one for lakes and one for rivers.
I'll have a think about if there's a neater way to do things like this. Perhaps an option on Select that lets you ignore compatibility?
I'll give MultiplyFrequency a shot with some special tiles. Being able to force Select into setting a tile might be a good quick way to accomplish this. Combined with #2, you'd end up having a lot of new controls on how content gets generated.
Ok, I've had a thought about what you want. I think you won't find adding holes alone sufficient. Holes would be totally ignored, you want a tile to influence other tiles, but not be influenced itself. I think it'll be possible to set up another bit field for that behaviour.
In this example I have created a custom constraint that uses Select() to "pin" areas (cyan regions) of my output such that it has to be present in its exact configuration in another generation:
Cyan regions remain in new output:
This works fine, because each cyan region contains tiles that do not contradict with the rules of the input model. However if I attempt to pin a region that does not follow the rules on its interior:
I get an immediate contradiction after the Select call since the pinned region has water tiles next to water tiles and that is not defined in the input model.
If I wanted to make this work I could of course add water next to water in my model. The downside is that now my output will contain lakes. I see two potential options as an enhancement that might allow for this:
2 if supported/added support - For each interior point in a pinned region, explicitly add a hole in the output. Edges of the pinned regions must not cause a contradiction still. This is perfectly reasonable IMHO.
Do any of these sound like reasonable solutions?