Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0007747Dwarf FortressDwarf Mode -- Jobs, Farming/Farmer's Workshoppublic2014-07-30 16:172014-11-15 13:43
i2amroy 
Toady One 
highminoralways
resolvedfixed 
Windows; Mac7; OSX 10.9.4
0.40.05 
0.40.17 
0007747: Farm plot planting cut-off fails to work over the Winter->Spring boundary
In 40.05 the cut-off for farm plants that stops them from being planted to late in the season was re-enabled. This then brought back an old bug, where plants that can grow in both Winter and Spring (such as plump helmets) will not be able to be planted in late Winter, as the game fails to check if they can be planted in spring properly.

Coding wise this fix is probably as simple as adding an edge case check for the Winter/Spring boundary to properly enable the planting of said plants.
1) Start a fortress.
2) Wait until shortly before winter ends.
3) Check the farm plot planting screen, and Plump helmets will be disabled despite being able to be planted in the following season (Spring), nor will farmers plant plump helmets at that time.
This also has the effect of breaking any realistic plant growth mods that use plants that grow during Winter/Spring, which IIRC includes several of the larger and more popular mods for the game. Thus the sooner this is fixed the better, from a modders perspective.
binary patch
related to 0000747resolved Toady One Planting of seeds allowed even if too late in the season 
has duplicate 0008404resolved Knight Otu Crops unplantable in last 45 days of final growing 
Issue History
2014-07-30 16:17i2amroyNew Issue
2014-07-30 16:26KanddakNote Added: 0027989
2014-08-03 06:03QuietustNote Added: 0028210
2014-08-03 06:54KanddakIssue Monitored: Kanddak
2014-08-05 06:20lethosorAssigned To => lethosor
2014-08-05 06:20lethosorStatusnew => acknowledged
2014-08-05 06:21lethosorRelationship addedrelated to 0000747
2014-08-05 07:48samanatoIssue Monitored: samanato
2014-08-17 12:13i2amroyNote Added: 0029187
2014-10-06 04:01Knight OtuRelationship addedhas duplicate 0008404
2014-10-30 13:00QuietustNote Added: 0030806
2014-10-30 13:00QuietustTag Attached: binary patch
2014-10-30 13:01QuietustNote Edited: 0030806bug_revision_view_page.php?bugnote_id=0030806#r12178
2014-10-30 13:07QuietustNote Edited: 0030806bug_revision_view_page.php?bugnote_id=0030806#r12179
2014-10-30 15:43lethosorStatusacknowledged => confirmed
2014-11-15 13:43Toady OneNote Added: 0031006
2014-11-15 13:43Toady OneStatusconfirmed => resolved
2014-11-15 13:43Toady OneFixed in Version => Next Version
2014-11-15 13:43Toady OneResolutionopen => fixed
2014-11-15 13:43Toady OneAssigned Tolethosor => Toady One

Notes
(0027989)
Kanddak   
2014-07-30 16:26   
I can confirm this is happening to me too. Specifically, in late winter, nothing at all can be planted; everything shows as red in the farm plot menu.
(0028210)
Quietust   
2014-08-03 06:03   
This is a long-standing issue that dates back to 40d.
(0029187)
i2amroy   
2014-08-17 12:13   
Yeah, but as long as the game was bugged to not cut off planting at all the issue was "fixed". It made the planting cut-off one of those "it's not a bug, it's a feature" type things.
(0030806)
Quietust   
2014-10-30 13:00   
(edited on: 2014-10-30 13:07)
Looking at a disassembly, it appears to first check the season time, then whether your dwarves know it's dangerous to plant that crop at the end of that season, and then whether the plant is allowed to be planted during the next season. The problem is that if the current season is Winter, it entirely skips the 3rd check and returns "not safe to plant".

The following untested binary patch should fix this for version 0.40.14 Win32 SDL:
0x073D4E : 80 FB 03 7D 07 -> 45 83 E5 03 90
0x073D56 : 11 -> 10

Rather than doing "if (season < 3 && allowed_seasons[season+1])", it now does "season = (season + 1) % 4; if (allowed_seasons[season])".

(0031006)
Toady One   
2014-11-15 13:43   
I think this was an ancient holdover from when farm plots used to just disappear in winter in the old 2D version. It should work for 0.40.17.