RimWorld

RimWorld

111 ratings
Automatic Work Assignment
6
4
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5, 1.6
File Size
Posted
Updated
1.496 MB
15 Apr @ 12:08pm
23 Sep @ 12:20pm
49 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://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3453406362
AutoPriorities https://gtm.steamproxy.vip/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)
50
19 Sep @ 7:30am
Requests
Lomzie
29
18 Sep @ 12:29pm
Bug Reports
Lomzie
1
1
8 Jun @ 12:22pm
Saved Configurations
Kasa
182 Comments
Iarinu 20 hours ago 
First: Love this mod. Searched many, many years for something like this, cause micromanaging all the works with 40+ size colonies gets extremely annoying after a while.
I also do have problems with auto assignment when using Vanilla Skills expanded. After looking into it a but further, I can confirm your suspicion: A critical passion reduces the learning speed to 25% for every other skill, which leads even burning passion skills not being assigned via the "Has Passion" condition, because they tend to land far under 50% learning speed. Now I'm a bit stuck, because I still want to auto-assign such pawns to their other passions, for diversification and also the mood buff. Especially when the critical-passion-skill is meele.
Amity 11 Oct @ 5:01pm 
It seems a reload is all it needed. looks like its working now.
Lomzie  [author] 11 Oct @ 10:37am 
That's strange, it should work just fine. It does ignore passions that result in learning rate less than 100%, such as apathies or the debuff from critical passions.
Amity 11 Oct @ 5:27am 
Hello awesome mod got everything working except that passions included in Vanilla Skills Expanded mod don't work with the condition has passion.
Lomzie  [author] 9 Oct @ 4:06am 
@Vril I don't think a feature that would go against the order set by the work spec list would be a good fit. You should, however, be able to use the "Include specialists" toggle for the basic package. As to compatability with "Personal Work Categories", it depends on how that mod is implemented, but there is a decent chance that it works.

@Lessïlera I'm aware of this issue, and I do plan to add a compatibility patch. Don't know when though, as I have been busy with other projects recently.
Lessïlera 8 Oct @ 6:32pm 
Compatibility feedback : There is no way of restraining a pawn from being assigned to a hated job when using this mod with "More Than Capable (1.6-b)" (https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3237083444)
Vril 6 Oct @ 1:38am 
Oh and is your mod compatible with personal work categories?
Vril 5 Oct @ 11:39am 
@Lomzie can we get something that make a pawn specialist yet doesn't exclude it from other job? Let say i designate certain jobs as firefighting basics bed rest a basic package, and then have specialized crafting pawns for ammo making, fabricating, smithing etc. Instead of putting these high in the order list, which will affect all pawns, why not make these specialists set those jobs right after in priority after the basic package? So it would look like this 1- basic package 2 - whatever designated job 3- whatever else on the list. The order of the hierarchy of the jobs would not matter for these pawns. They would always have these assigned specialist jobs at priority 2, irrelevant of these job place in hierarchy.
Lomzie  [author] 29 Sep @ 4:14am 
Oh yeah looks like I overlooked the mod settings when I fixed this issue across the mod a while back. Thanks for letting me know, I'll see to fixing it.
Vril 28 Sep @ 6:35am 
float learnRate = skill.LearnRateFactor(true); clearly decimals should be accepted, but they currently arent in modoptions input field.