RimWorld

RimWorld

92 ratings
Automatic Work Assignment
4
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5, 1.6
File Size
Posted
Updated
1.309 MB
15 Apr @ 12:08pm
12 Aug @ 11:51am
38 Change Notes ( view )

Subscribe to download
Automatic Work Assignment

In 1 collection by Lomzie
Automatic Work Assignments + Addons
2 items
Description
Why hello there!

Are you someone just like me who hates doing manual work, but love spending significantly longer automating the same work? Then this might just be the mod for you!

This mod adds a new Work Manager tab, that allows you to specify a number of work specifications to be automatically assigned to your colonists. Each work specification has its own fully customizable fitness functions used to prioritize who is assigned to it, as well as the conditions that must be met for assignment. You can even choose to have certain actions performed when the work is assigned to a pawn! The ultimate goal of this, is to be able to fully automate the work assignments of all your pawns, with no need to exclude any. Though, you can still do so if you really need to. You can choose to only automate a subset of jobs, or automate them all, this mod is designed for maximum customizability.

A few examples of what you can do:
  • Automatically assign all pawns with high enough skill level to medical work.
  • Automatically assign pawns without the pyrophobia gene to firefighting.
  • With training mods, assign pawns with passions, but low skill levels, to training work.

Although the central feature of this mod is automating work assignments, the powerful fitness, conditions, and on assignment system allows you to automate a variety of other tasks as well, such as setting schedules, policies, or titles based on conditions. For example, you can automatically schedule all children to only recreation, and restrict them to safe areas.

Quick info

There shouldn't be any mod incompatibilities.
You can safely add this to a save.
You should be able to safely remove this from a save.
Let me know in the comments if you have any issues.

Source: https://github.com/Lomztein/RW-AutomaticWorkAssignment

Introduction

You'll find this tab right next to where you usually find your work tab. When you open it, you'll see a window composed of four major sections:

Work Specification List

Here you see a list of work specifications. The order of these determines which will be assigned to colonists first. You can, of course, reorder them as you please.

Reordering this list is currently a bit of a pain with large lists. I plan to look into the ability to drag the specifications, though for the moment you can hold shift while clicking the reordering buttons, and this will (sometimes, it's temperamental) move specifications all the way to the top or bottom.

At the bottom of this list there are four buttons you use to do the following:
  • Resolve pawn assignments now.
  • Automatically resolve assignments each day.
  • Exclude certain pawns from assignments.
  • Save / load configurations or import from other saves.

Basics

The top half of the middle section is where you can change the basic information of the work specification. The options are as follows.
  • Name: Just a label, doesn't have any impact other than organization.
  • Min (workers): The minimum number workers. If not enough workers that meet the condition are available to meet this threshold, then conditions will be ignored until enough workers has been assigned.
  • Target (workers): The target number of workers, or how many pawns should be assigned to this work.
  • Critical: Pawns with critical work that are downed, will immediately be substituted by someone else if the number of workers fall below the minimum.
  • Specialist: Designates that the work specification excludes pawns from assignments further down the list.
  • Commitment: Estimate of how much of time is commited to this work, used to avoid over-comitting highly talented pawns.

Priorities

The bottom half of the middle section is the priorities. Add the jobs you wish done for this work to this list, ordered by priority. The assignment algorithm will assign priorities to pawns in the order you define here.

Settings

This is where you define how your pawns should be prioritized, what conditions must be met for a pawn to be assigned, and what tasks should run on assignment. This section is composed of three subsections.

Fitness

Here you define the fitness functions to be used to prioritize which pawns will be assigned to work. This cascades, so that functions further down the list act as 'tie breakers' for functions further up the list.

For example, if you have the 'Learning rate' function at the top, and 'Skill level' below that, it will prioritize all pawns with the highest learning rate first, and of those it will prioritize those with highest skill level.

Conditions

This defines a set of conditions that must be met for a pawn to be assigned to the work, such as minimum or maximum skill levels, certain genes, passions.

If you have any mod that allows your colonists to train, this can be used to automatically assign pawns with passions, and below a set skill level, to train that skill.

Conditions are ignored if an insufficient amount of workers that meet them are ignored for the minimal amount of workers.

On Assignment

This allows you to execute certain actions when a pawn is assigned the work, such as restricting apparel, drugs, or areas.

Alternative mods

If this is all way more complicated than what you need, I can easily recommend any of these mods as alternatives.

Automated Work Assignment: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3453406362
AutoPriorities https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1598406574

I have used both of these with decent success on large colonies, and they are both excellent solutions if you're looking for something more "fire and forget".

TODO

The current library of fitness functions, conditions, and on-assignment tasks are just what I've been able to come up with during development. More can added at request, or if you're feeling up for it, by other mods. The system is designed to be easily extensible. To implement a new fitness function, you just create a new class that implements the IPawnFitness interface, create a PawnSettingDef, and provide a PawnSettingUIHandler object. Check out the source code if you're feeling brave. (Fair warning, it was written largely over a weekend binge, enter at your own risk.)

I plan to extend the library over time, including integrating features from other mods.

There is still a lot of room for improvements, in particular regarding quality-of-life features for the UI.
Popular Discussions View All (3)
32
7 Aug @ 2:48am
Requests
Lomzie
24
7 Jul @ 10:49pm
Bug Reports
Lomzie
1
1
8 Jun @ 12:22pm
Saved Configurations
Kasa
108 Comments
Vane 13 Aug @ 7:09pm 
@OrAZion write any number, they try adding a "." before the number
Lomzie  [author] 13 Aug @ 1:24pm 
@Necromenta That is not currently something you can do, no. I do however have some tentative plans for an event system that will allow something along those lines.
Necromenta 13 Aug @ 12:41pm 
absolutely lost on giving automatic job of "soldier" to my pawns when there is an enemy on map or a number of enemis, is that condition actually in game?
Lomzie  [author] 13 Aug @ 1:23am 
The text input fields are a bit finicky when entering decimals between 0 and 1, though it should be possible. Something I've been meaning to improve. I'll look into improving it soon.
OrAZion 12 Aug @ 8:44pm 
@Lomzle I cannot enter a value of 0.6 or 0.8 in the field, but I can enter a value of 60 or 80, but the filtered results will show 0.6 and false.
Lomzie  [author] 12 Aug @ 3:01am 
@OrAZion Can you elaborate on what didn't accept values between 0 and 1? Was it the "fitness in range" condition?
OrAZion 9 Aug @ 8:36pm 
I also used the mod Capture Them. However, when I tried to filter using capture efficiency (0% to 100%), it wouldn't accept values outside the 0 to 1 range, so no colonists would ever meet this criteria. However, the colonist would still be assigned the job, and the filter would show that the colonist's value was 0.6.
Excusememan 9 Aug @ 3:22am 
best mod! i've really been enjoying it.
Lomzie  [author] 1 Aug @ 8:14am 
@Tidurian There isn't, but the work type selection does put a small star behind work types already on the list, to aid in this. I could add an "add all" option if desired, though.
Tidurian 1 Aug @ 7:38am 
is there a way to configure it that it adds all jobs the pawn 'can' do as "lowest priority"? i hate idling pawns and putting ALL jobs from a huge modlist in is cumbersome.