View Issue Details

IDProjectCategoryView StatusLast Update
0007747Dwarf FortressDwarf Mode -- Jobs, Farming/Farmer's Workshoppublic2014-11-15 13:43
Reporteri2amroy Assigned ToToady One  
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
OSWindows; MacOS Version7; OSX 10.9.4 
Product Version0.40.05 
Fixed in Version0.40.17 
Summary0007747: Farm plot planting cut-off fails to work over the Winter->Spring boundary
DescriptionIn 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.
Steps To Reproduce1) 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.
Additional InformationThis 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.
Tagsbinary patch

Relationships

related to 0000747 resolvedToady One Planting of seeds allowed even if too late in the season 
has duplicate 0008404 resolveduser1294 Crops unplantable in last 45 days of final growing 

Activities

Kanddak

2014-07-30 16:26

reporter   ~0027989

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.

Quietust

2014-08-03 06:03

reporter   ~0028210

This is a long-standing issue that dates back to 40d.

i2amroy

2014-08-17 12:13

reporter   ~0029187

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.

Quietust

2014-10-30 13:00

reporter   ~0030806

Last edited: 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])".

Toady One

2014-11-15 13:43

administrator   ~0031006

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.

Issue History

Date Modified Username Field Change
2014-07-30 16:17 i2amroy New Issue
2014-07-30 16:26 Kanddak Note Added: 0027989
2014-08-03 06:03 Quietust Note Added: 0028210
2014-08-05 06:20 lethosor Assigned To => lethosor
2014-08-05 06:20 lethosor Status new => acknowledged
2014-08-05 06:21 lethosor Relationship added related to 0000747
2014-08-17 12:13 i2amroy Note Added: 0029187
2014-10-06 04:01 user1294 Relationship added has duplicate 0008404
2014-10-30 13:00 Quietust Note Added: 0030806
2014-10-30 13:00 Quietust Tag Attached: binary patch
2014-10-30 13:01 Quietust Note Edited: 0030806
2014-10-30 13:07 Quietust Note Edited: 0030806
2014-10-30 15:43 lethosor Status acknowledged => confirmed
2014-11-15 13:43 Toady One Note Added: 0031006
2014-11-15 13:43 Toady One Status confirmed => resolved
2014-11-15 13:43 Toady One Fixed in Version => Next Version
2014-11-15 13:43 Toady One Resolution open => fixed
2014-11-15 13:43 Toady One Assigned To lethosor => Toady One