Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0011727Dwarf FortressWorld Generation -- Generalpublic2021-03-23 16:232021-06-17 14:27
Quietust 
 
normalminorhave not tried
newopen 
amd64Windows8.1
0.47.05 
 
0011727: Worldgen positions check for permitted labors instead of permitted jobs?
While 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).
Generate 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.
No tags attached.
Issue History
2021-03-23 16:23QuietustNew Issue
2021-03-23 16:59Shonai_DwellerNote Added: 0040991
2021-06-17 14:27QuietustNote Added: 0041093
2021-06-28 09:51Flying_TeasetsIssue Monitored: Flying_Teasets

Notes
(0040991)
Shonai_Dweller   
2021-03-23 16:59   
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
(0041093)
Quietust   
2021-06-17 14:27   
To clarify, for the case of Doctors:

1. It should be checking "entity->raw.permitted_jobs[PROFESSION_DOCTOR]"
2. Instead, it's trying to check "entity->raw.permitted_labors[PROFESSION_DOCTOR]"
3. As a result, it's actually checking "entity->raw.permitted_labors[LABOR_GLAZING]" (since both PROFESSION_DOCTOR and LABOR_GLAZING are represented by the number 69)