dfhack icon indicating copy to clipboard operation
dfhack copied to clipboard

Prevent labors from being set on visitors

Open adiamaq opened this issue 1 year ago • 4 comments

So to explain this issue, there seems to be a bug in the game, where if you have visitors , let's say, 20, and you have a total of 30 population, in the Labor tab there will only show 10 of them (the original dwarves). However, if you go to any of those visitors and click on their own labour tab, you can assign works there. Yeah, 2 years later, those visitors will ask for citizenship, but meanwhile you're unable to see them in main labor matrix. Would it be possible to display everyone in the main Labor tab? Or maybe force the conversion of those visitors

adiamaq avatar Oct 02 '24 22:10 adiamaq

You can use makeown to force the conversion of visitors to citizens.

could the "fix" here possibly be to disallow setting of labors for visitors from their info sheets? I'm not sure that capability is intended.

myk002 avatar Oct 02 '24 23:10 myk002

Ah awesome, makeown will do! Is there a way to select all visitors at once?

adiamaq avatar Oct 02 '24 23:10 adiamaq

i am fairly certain that the ability to manipulate the labors of nonresidents is a bug

ab9rf avatar Oct 03 '24 00:10 ab9rf

Ah awesome, makeown will do! Is there a way to select all visitors at once?

This should do it:

:lua for _,unit in ipairs(world.units.active) do if dfhack.units.isActive(unit) and dfhack.units.isVisitor(unit) then print('Converting ' .. dfhack.units.getReadableName(unit)) reqscript('makeown').make_own(unit) end end

Note that this will also pick up forgotten beasts, who are classified as "visitor, unwanted"

myk002 avatar Oct 03 '24 01:10 myk002