Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: What makes crops crops?  (Read 2214 times)

squamous

  • Bay Watcher
    • View Profile
What makes crops crops?
« on: December 07, 2021, 08:37:05 pm »

I'm experimenting with crops and for some reason every world I generate tells me I'm not placing enough of them in my worlds, even though I have a great deal of perfectly edible plants which spawn in every biome on the map. So what's the deal? I feel like there has to be some kind of particular arbitrary thing which makes the game recognize something as a crop and I don't have it on my plants for whatever reason.
« Last Edit: December 07, 2021, 09:13:14 pm by squamous »
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: What makes crops crops?
« Reply #1 on: December 08, 2021, 01:25:15 pm »

Mostly PTW, but also just to clarify, you mean this error?

Quote
FARMING CIVILIZATION PLACED WITHOUT CROPS
The world generator is having trouble placing farming civilizations. 
Civilizations use available plants in their surroundings as their initial crops. 
Make sure your parameters and raw objects have adequate vegetation. 

The game also seems to distinguish between "orchard crops" and "non-orchard crops".  Maybe you need trees with fruit?

I do not know what the game desires for these farmable crops.  My simplest functioning plant is a dye dummy that only has NAME, NAME_PLURAL, ADJ, BASIC_MAT, MILL, BIOME, FREQUENCY, the dye material, and a direct copy of the structural mat template.  Besides those, I assume the game might desire SEED, VALUE, season, PREFSTRING, or an edible material.

Do your crops spawn and function properly in Fortress mode?  Transplanting one of those raws to the basegame ones and setting the frequency to 100 should let you test it rather quickly.

squamous

  • Bay Watcher
    • View Profile
Re: What makes crops crops?
« Reply #2 on: December 08, 2021, 03:45:01 pm »

Mostly PTW, but also just to clarify, you mean this error?

Quote
FARMING CIVILIZATION PLACED WITHOUT CROPS
The world generator is having trouble placing farming civilizations. 
Civilizations use available plants in their surroundings as their initial crops. 
Make sure your parameters and raw objects have adequate vegetation. 

The game also seems to distinguish between "orchard crops" and "non-orchard crops".  Maybe you need trees with fruit?

I do not know what the game desires for these farmable crops.  My simplest functioning plant is a dye dummy that only has NAME, NAME_PLURAL, ADJ, BASIC_MAT, MILL, BIOME, FREQUENCY, the dye material, and a direct copy of the structural mat template.  Besides those, I assume the game might desire SEED, VALUE, season, PREFSTRING, or an edible material.

Do your crops spawn and function properly in Fortress mode?  Transplanting one of those raws to the basegame ones and setting the frequency to 100 should let you test it rather quickly.

Yes, that is the error in question.

All the plants I have are just reshuffled or renamed versions of the base ones, they all function in the sense that they can be found in the game world and work as intended, except for ones that exist only in dwarf fortress lore, such as bloated tubers or fisher berries. Though I can't help but wonder if I've made some error.

https://dffd.bay12games.com/file.php?id=15773
The relevant files are here, especially the ones labeled as "crops". It's not quite finished but one would think there would be enough here to keep everyone satisfied, leading me to believe the difference is one of some arbitrary qualification that I am somehow missing.

Also, all civs of note in my mod, including human ones, use orchards, so perhaps that could be causing something.
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: What makes crops crops?
« Reply #3 on: December 08, 2021, 05:24:24 pm »

All the plants I have are just reshuffled or renamed versions of the base ones, they all function in the sense that they can be found in the game world and work as intended, except for ones that exist only in dwarf fortress lore, such as bloated tubers or fisher berries. Though I can't help but wonder if I've made some error.

Using the files from the DFFD, I only managed to reproduce the error by removing the plant_standard.txt underground plants (i.e. plump helmets and stuff).

Do you have any dwarf-like civs who might depend on cave plants?

squamous

  • Bay Watcher
    • View Profile
Re: What makes crops crops?
« Reply #4 on: December 08, 2021, 05:26:44 pm »

All the plants I have are just reshuffled or renamed versions of the base ones, they all function in the sense that they can be found in the game world and work as intended, except for ones that exist only in dwarf fortress lore, such as bloated tubers or fisher berries. Though I can't help but wonder if I've made some error.

Using the files from the DFFD, I only managed to reproduce the error by removing the plant_standard.txt underground plants (i.e. plump helmets and stuff).

Do you have any dwarf-like civs who might depend on cave plants?

All the civs I have use above-ground plants only, I should have clarified. At least for the time being. My intent is to get the surface all handled before I overhaul the underground. I have a feeling the error would also happen if you restricted the vanilla civs to above-ground plants only.
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: What makes crops crops?
« Reply #5 on: December 08, 2021, 05:37:28 pm »

All the civs I have use above-ground plants only, I should have clarified. At least for the time being. My intent is to get the surface all handled before I overhaul the underground. I have a feeling the error would also happen if you restricted the vanilla civs to above-ground plants only.

By removing the INDOOR_ tokens from entities, I managed to remove all plant raws except the plant_food_ ones.  So the problem is almost certainly in the entities.  Double-check if there are any ones using cave wood.

squamous

  • Bay Watcher
    • View Profile
Re: What makes crops crops?
« Reply #6 on: December 08, 2021, 05:55:27 pm »

All the civs I have use above-ground plants only, I should have clarified. At least for the time being. My intent is to get the surface all handled before I overhaul the underground. I have a feeling the error would also happen if you restricted the vanilla civs to above-ground plants only.

By removing the INDOOR_ tokens from entities, I managed to remove all plant raws except the plant_food_ ones.  So the problem is almost certainly in the entities.  Double-check if there are any ones using cave wood.

I have, there aren't any. I've updated the dffd link to contain all the raws in the objects folder as well if you want to take a look at them. Most of it is probably not relevant to the problem so don't worry about all the extra stuff.

https://dffd.bay12games.com/file.php?id=15773
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: What makes crops crops?
« Reply #7 on: December 09, 2021, 08:04:26 am »

Given the full raws, I have found that the problem almost never occurs on smaller worlds, but almost always on medium sized worlds.  (I foolishly only used small worlds yesterday.)  I eventually managed to generate a medium world by ignoring the farmable civ error twice.  In that world, I noticed a lot of civs only have "mushrooms" in their plants tab, one only has "lettuce".  The affected civs range from polar to equatorial latitude.

Then I modified the raw to make mushrooms and apple trees ANY_LAND.  Only when both of those can appear in any biome does the error vanish completely.  This suggests we missed a biome when looking over the raws manually.

squamous

  • Bay Watcher
    • View Profile
Re: What makes crops crops?
« Reply #8 on: December 09, 2021, 01:13:27 pm »

Given the full raws, I have found that the problem almost never occurs on smaller worlds, but almost always on medium sized worlds.  (I foolishly only used small worlds yesterday.)  I eventually managed to generate a medium world by ignoring the farmable civ error twice.  In that world, I noticed a lot of civs only have "mushrooms" in their plants tab, one only has "lettuce".  The affected civs range from polar to equatorial latitude.

Then I modified the raw to make mushrooms and apple trees ANY_LAND.  Only when both of those can appear in any biome does the error vanish completely.  This suggests we missed a biome when looking over the raws manually.

That's very strange. So like mushrooms and apple trees are essential for growing things? Like, something about them means they need to be in a biome for a civ to function there. I'd like to rip out whatever qualifier those have and give them to the grain crops. I'll be running some tests of my own and will report if I find anything useful.
« Last Edit: December 09, 2021, 01:36:18 pm by squamous »
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2

Mobbstar

  • Bay Watcher
  • aka Mossbird
    • View Profile
    • my website
Re: What makes crops crops?
« Reply #9 on: December 09, 2021, 04:11:50 pm »

That's very strange. So like mushrooms and apple trees are essential for growing things? Like, something about them means they need to be in a biome for a civ to function there. I'd like to rip out whatever qualifier those have and give them to the grain crops. I'll be running some tests of my own and will report if I find anything useful.

Just to clarify, I chose mushrooms primarily because they're already available to almost all.  I chose apples completely arbitrarily as stand-in for any orchard plant.

squamous

  • Bay Watcher
    • View Profile
Re: What makes crops crops?
« Reply #10 on: December 09, 2021, 06:30:48 pm »

That's very strange. So like mushrooms and apple trees are essential for growing things? Like, something about them means they need to be in a biome for a civ to function there. I'd like to rip out whatever qualifier those have and give them to the grain crops. I'll be running some tests of my own and will report if I find anything useful.

Just to clarify, I chose mushrooms primarily because they're already available to almost all.  I chose apples completely arbitrarily as stand-in for any orchard plant.

That makes sense, though it's strange, I could have sworn all the other biomes except glaciers have edible plants and trees, so I don't see what could be causing it unless mushrooms and apple trees possess some important quality that makes the game recognize them as fitting the criteria for required foodstuffs a civilization must have.
Logged
I make huge and comprehensive overhaul mods, consider supporting me on Patreon so I can do this full-time:
https://www.patreon.com/themodsmith
Have questions? Need to report bugs? Post them in the discord:  https://discord.gg/dGzGr5svS2