View Issue Details

IDProjectCategoryView StatusLast Update
0011727Dwarf FortressWorld Generation -- Generalpublic2023-12-04 05:44
ReporterQuietust Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Platformamd64OSWindowsOS Version8.1
Product Version0.47.05 
Summary0011727: Worldgen positions check for permitted labors instead of permitted jobs?
DescriptionWhile analyzing the game's logic for generating entity positions during worldgen (after somebody asked about a "Royal Treasurer" role), I discovered that the "Master of Beasts", "Doctor", and "Cook" positions are checking their prerequisites incorrectly - instead of looking in the list of permitted jobs, they appear to be checking in the list of permitted labors.

As a result, the Master of Beasts requires Woodcutting (instead of Animal Trainers), the Chef requires Fish Cleaning (instead of Cooks), and the Doctor bizarrely requires Glazing (instead of Doctors).
Steps To ReproduceGenerate a world with "[PERMITTED_JOB:GLAZER]" in the PLAINS entity (as it is by default) and observe the number of Doctor-related positions - I did a default world and had 21 doctor positions after about 100 years.

Next, remove "[PERMITTED_JOB:GLAZER]" from said raws and generate another world and observe that there are no doctor positions at all.
TagsNo tags attached.

Activities

Shonai_Dweller

2021-03-23 16:59

reporter   ~0040991

Oh, wonder if this is related to the crash caused by combining fish_cleaner with no_eat in modded civs (Too many out of work cooks?). Would make sense as it started happening when these new positions were introduced.

0011458

Quietust

2021-06-17 14:27

reporter   ~0041093

Last edited: 2023-12-04 05:44

To clarify, for the case of Doctors:

1. It should be checking "entity->def->permitted_job[UNIT_DOCTOR]"
2. Instead, it's trying to check "entity->def->permitted_profession[UNIT_DOCTOR]"
3. As a result, it's actually checking "entity->def->permitted_profession[PROFESSION_GLAZING]" (since both UNIT_DOCTOR and PROFESSION_GLAZING are represented by the number 69)

Add Note

Note

Issue History

Date Modified Username Field Change
2021-03-23 16:23 Quietust New Issue
2021-03-23 16:59 Shonai_Dweller Note Added: 0040991
2021-06-17 14:27 Quietust Note Added: 0041093
2023-12-04 05:44 Quietust Note Edited: 0041093
2023-12-04 05:44 Quietust Note Edited: 0041093