Hi folks.
I have a problem with planting cattail seeds.
I upturned the earth as i do always when im planting seeds.
But for the cattail seeds, it says “This type of seed can not be planted in this location”.
The description says you have to plant them in shallow water, but i found no way to do this.
Im playing on the latest experimental version.
Anyone has an idea?
PALU
November 23, 2023, 6:57am
2
The shallow water planting mechanism was introduced recently.
As opposed to normal planting, you don’t have to prepare the ground, but planting is done directly in shallow water. I don’t know if you can do the planting manually or if it can only be done via the placement of a planting zone.
There was also a bug report recently where someone failed to plant the seeds for some reason, but I don’t know if that issue was resolved.
CleverRaven:master
← Light-Wave:soil_types
opened 12:38AM - 15 Oct 23 UTC
<!-- HOW TO USE: Under each "#### Heading" below, enter information relevant to … your pull request.
Leave the headings unless they don't apply to your PR.
Please read carefully and don't delete the comments delimited by "< !--" and "-- >"
Once a pull request is submitted, automatic stylistic and consistency checks will be performed on the PR's changes.
The results of these can be either seen under the "Files changed" section of a PR or in the check's details.
NOTE: Please grant permission for repository maintainers to edit your PR. It is EXTREMELY common for PRs to be held up due to trivial changes being requested and the author being unavailable to make them. -->
#### Summary
Content "Cattail can be planted in shallow water"
<!-- This section should consist of exactly one line, edit the one above.
1. Replace the word "Category" with one of these words: Features, Content, Interface, Mods, Balance, Bugfixes, Performance, Infrastructure, Build, I18N.
2. Replace the text inside the quotes with a brief description of your changes.
Or if you don't want a changelog entry, replace the whole line with just the word "None" (with no quotes).
For more on the meaning of each category, see:
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/CHANGELOG_GUIDELINES.md
If approved and merged, your summary will be added to the project changelog:
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/data/changelog.txt -->
#### Purpose of change
#68616 made cattail not plantable on land. This PR makes cattail farmable again. It also makes it so that different plants can have different terrain requirements for farming.
<!-- With a few sentences, describe your reasons for making this change. If it relates to an existing issue, you can link it with a # followed by the GitHub issue number, like #1234. If your pull request *fully* resolves an issue, include the word "Fix" or "Fixes" before the issue number, like: Fixes #xxxx
If there is no related issue, explain here what issue, feature, or other concern you are addressing. If this is a bugfix, include steps to reproduce the original bug, so your fix can be verified. -->
#### Describe the solution
`"seed_data"` has a new optional field, `"required_terrain_flag"`. This is set to `"PLANTABLE"` by default. In order to plant a seed somewhere, the terrain or furniture there needs to have the given flag.
If this flag is set to anything other than `"PLANTABLE"`, the terrain will not turn into dirt after the seed is planted. This is to prevent the water to turn into dirt when you plant stuff in it.
Places that previously checked for the `"PLANTABLE"` tag now instead checks for the tag specified by the `"seed_data"`.
Cattail seeds are set to have `"required_terrain_flag": "SHALLOW_WATER"`.
Documentation is updated to match.
A new hardcoded message string is added for when you're trying to plant a seed in an invalid spot; `add_msg( _( "This type of seed can not be planted in this location." ) );`. This might need translation.
#### Describe alternatives you've considered
Give shallow water `"examine_action": "dirtmound"` so that seeds can be planted. I felt this would clutter up the UI, but right now the seeds can not be planted manually, and have to instead be planted using the zone manager, which might be confusing.
Create aquatic farmland as a furniture item instead. This could be given the `"examine_action": "dirtmound"` to let players plant the crops manually. I felt like this would add extra pointless work for the player, but I'm not sure if it might be a better idea. Using a furniture instead of a terrain would also make it so I don't need a special case in order to not turn the planted terrain into dirt if we use special terrain.
Hide seeds that can't be planted from the seed selection menu. Felt like extra work, and would confuse the player. My hope is right now that they will try to plant cattail seeds in soil, get the error message that "This type of seed can not be planted in this location.", read the item description and notice that it says it must be planted in shallow water, and figure things out from there. Thus, hiding invalid seeds might be more confusing than helpful.
If this were to be used for non-seed like beehives, perhaps it would be a better idea to hide invalid seeds and change the message to "You can not plant <item_name_plural> in this location.".
Right now, if you define an area of dirt to be used to farm cattail using the zone manager, the player will still try to tilt the earth, but be unable to plant the seeds. Perhaps tilting of earth should not be done for farmlands where the seeds does not have `"required_terrain_flag": "PLANTABLE"`
Instead of always trying to tile an area, let `seed_data` define a `construction_group` it will try to use to make the area plantable. Seems like a much better solution, but also sounds like a bunch of extra work. Maybe later.
#### Testing
From my testing, it seems to work.
Here I designated an area to be a cattail farm:

Here I am after having farmed the area:

Harvesting also seems to work fine:

Asking an NPC to work the field also seems to work fine. It also still works to plant normal crops both by yourself and with NPCs:

#### Additional context
@harakka requested a ping.
Also pinging @AmarinReyny since they asked about this.
If anyone knows if any extra steps are needed to translate the hardcoded message I added, feel free to let me know. Translation is magic to me.
<!--README: Cataclysm: Dark Days Ahead is released under the Creative Commons Attribution ShareAlike 3.0 license.
The code and content of the game is free to use, modify, and redistribute for any purpose whatsoever.
By contributing to the project you agree to the term of the license and that any contribution you make will also be covered by the same license.
See http://creativecommons.org/licenses/by-sa/3.0/ for details. -->
Found it, thank you!
But for now you have to use the zone manager to plant them.