Skip to content
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

[WIP] Reduced farm spam #37429

Closed
wants to merge 3 commits into from

Conversation

wapcaplet
Copy link
Contributor

@wapcaplet wapcaplet commented Jan 27, 2020

Summary

SUMMARY: Mods "Fewer Farms mod, reducing farm density"

Purpose of change

Allow players to reduce the number of farms spawned in the world.

Describe the solution

The current solution is a rather ugly copy-and-paste of large swaths from data/json/overmap/overmap_special/specials.json. I modeled it on how "No Rail Stations" works, but this is a much larger chunk of redundancy I'd prefer to avoid.

Anyway, the only two attributes I'm interested in changing are city_distance and occurrences, to increase the minimum distance (from 5 up to 10-20), and maximum occurrences (from 5 down to only 1), so for example:

"city_distance": [ 20, -1 ],
"occurrences": [ 0, 1 ]

No farms were removed, and I left the two UNIQUE farms alone.

If there is some way to alter these two attributes without copying over the whole overmap layout definition and the rest, I would prefer to do it that way. Very open to suggestions and alternatives at this point (hence the WIP note in the PR).

Describe alternatives you've considered

I considered simply adding all FARM flagged terrains to a blacklist, and/or adding a few new flags (such as HORSE or DAIRY) to the core specials.json, so we could then whitelist some of the more interesting farms. That kind of approach would be cleaner, but I am not really looking to remove any farms completely - just mitigate their proliferation.

Testing

A few days ago with an earlier draft of the mod, I did some seat-of-pants testing by spawning 2-3 new worlds with and without the mod. I didn't count the farms, but it definitely felt like there were fewer of them.

Today I tested a little more formally by generating a few different worlds with the mod enabled, debugging a map reveal, and counting the farms in a representative screenshot. RNG makes it kind of hard to gauge without repeated testing (and world generation ain't fast), but my casual results are:

  • With no mod, in 2 worlds, I saw 10 farms per screen
  • With fewer farms mod, in 2 worlds, I saw 5 and 8 farms per screen (and I think 1 was unique in both cases, not sure yet)

Additional context

Inspired by Vormithrax and his oft-voiced objection to farm spam, with which I can't help but agree.

Based on "No Rail Stations", this mod is intended to reduce the
overall density of farms in the overmap specials generation. Briefly
tested by generating two new worlds, debugging a map reveal in each,
and seeing a significant reduction in Farm Spam.

Unfortunately, this is a pretty heavyweight approach, with a
copy/paste of a large chunk of the farm overmap JSON. I would like to
find a way to override the "occurrences" of these farms, or flag farms
with a FARM tag to allow blacklisting and the like.
Reduce 10 different farm types to max 1 occurrence per map tile, and
require them all to be further from cities.
@codemime
Copy link
Contributor

Farm spam is a thing (at least, I've encountered it myself many times in the game). I would rather adjust the core numbers straight away, instead of patching them up with a mod. Moreover, copy-pasting the existing farms doesn't look like a viable option.

@I-am-Erk
Copy link
Member

This doesn't really meet the criteria for mod inclusion, and it's a problem that should be solved by adding biomes in mainline. You're welcome to distribute this as a mod but it doesn't really belong in mainline.

Here is the inclusion criteria btw. It's newly added, sorry for catching you with the early edge of a new ruleset.

Regardless, this is something that will resolve pretty soon once we get urban/rural biomes working.

@I-am-Erk I-am-Erk closed this Jan 27, 2020
@wapcaplet wapcaplet deleted the reduced-farm-spam branch February 24, 2020 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants