<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rimworldwiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Aelanna</id>
	<title>RimWorld Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://rimworldwiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Aelanna"/>
	<link rel="alternate" type="text/html" href="https://rimworldwiki.com/wiki/Special:Contributions/Aelanna"/>
	<updated>2026-04-05T21:19:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.8</generator>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Human_meat&amp;diff=178147</id>
		<title>Human meat</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Human_meat&amp;diff=178147"/>
		<updated>2026-03-26T20:48:53Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Gorehulks drop twisted meat, not human meat.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{See also|Meat (disambiguation)|Meat|Insect meat}}&lt;br /&gt;
{{Infobox main|food&lt;br /&gt;
| name = Human meat&lt;br /&gt;
| image = Meat human c.png&lt;br /&gt;
| description = Raw butchered flesh. Can be cooked into meals or eaten raw, although most humans dislike the idea.&lt;br /&gt;
&amp;lt;!-- Base Stats --&amp;gt;&lt;br /&gt;
| type = Food&lt;br /&gt;
| type2 = Raw food&lt;br /&gt;
| hp = 60&lt;br /&gt;
| deterioration = 6&lt;br /&gt;
| marketvalue = 0.8&lt;br /&gt;
| beauty = -4&lt;br /&gt;
| mass base = 0.03&lt;br /&gt;
| flammability = 0.5&lt;br /&gt;
&amp;lt;!-- Ingestion --&amp;gt;&lt;br /&gt;
| taste = Raw&lt;br /&gt;
| food poison chance = 0.02&lt;br /&gt;
| days to rot = 2&lt;br /&gt;
| nutrition = 0.05&lt;br /&gt;
&amp;lt;!-- Creation --&amp;gt;&lt;br /&gt;
| production facility 1 = Butcher spot&lt;br /&gt;
| production facility 2 = Butcher table&lt;br /&gt;
| work to make = 450&lt;br /&gt;
| work speed stat = Butchery Speed&lt;br /&gt;
}}&lt;br /&gt;
'''Human meat''' is [[meat]] obtained when a [[Work#Cook|cook]] butchers [[human]]s.&lt;br /&gt;
&lt;br /&gt;
== Acquisition ==&lt;br /&gt;
Human meat is obtained when a [[Work#Cook|cook]] butchers [[human]]s. The base [[Meat Amount|Meat Yield]] are described on the table below but the actual number depends on the [[Butchery Efficiency]] of the butcher, damage of the corpse, and a number of other factors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;li style=&amp;quot;display: inline-table;&amp;quot;&amp;gt;&lt;br /&gt;
{| {{STDT| sortable c_06 text-center}}&lt;br /&gt;
! Animal !! Meat Yield&lt;br /&gt;
|- &lt;br /&gt;
{{#ask: [[Meat Name::{{PAGENAME}}]] [[:+]]&lt;br /&gt;
| ?Meat Yield&lt;br /&gt;
| format = template&lt;br /&gt;
| template = Ask Table Formatter&lt;br /&gt;
| limit = 500&lt;br /&gt;
| link = none&lt;br /&gt;
| sort= From DLC, name}}&lt;br /&gt;
|}&amp;lt;/li&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without the [[Ideology DLC]], butchering a human gives {{--|6}} [[mood]] for all colonists in the colony, and an additional {{--|6}} to the butcher. The former moodlet does not stack, meaning butchering 100 corpses gives the same colony-wide mood as one (the butcher's penalty ''does'' stack). [[Psychopath]]s and pawns with [[bloodlust]] ignore either butchering penalty, as do any [[cannibal]]s.&lt;br /&gt;
&lt;br /&gt;
The mood effects of butchering humans with an [[Ideoligion]]{{IdeologyIcon}} are based on the precept of the ideoligion the pawn follows.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
{{Ingredient List|noCollapse=true}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
As a [[raw food]], human meat can be be eaten raw, with a flat {{Bad|2%}} chance of giving [[food poisoning]], or cooked into a [[meal]] with a food poisoning chance dependent on the skill of the cook and the [[cleanliness]] of the kitchen. [[Animals]] are immune to food poisoning from raw food but not from meals. When used in food recipes that require specific types of [[nutrition]], such as [[fine meal]]s, human meat are classified as meat.&lt;br /&gt;
&lt;br /&gt;
Human meat is like any other [[raw food]]. It can be used to create [[meal]]s, or combined with other ingredients to produce fine, lavish meals, pemmican and kibble. &lt;br /&gt;
&lt;br /&gt;
Most humans despise eating human meat, which is cannibalism. Raw human meat gives {{Thought|value=-20|stack=1|label=raw cannibalism|desc=I ate the meat of another human, raw, like an animal. This is a nightmare.|duration=1}}, and cooking human meat into [[meal]]s (including in [[nutrient paste meal|nutrient paste]]) gives {{Thought|value=-15|stack=1|label=cooked cannibalism|desc=I ate a meal made from the meat of another human. This is horrible.|duration=1}}. Pawns with the [[Cannibal (Trait)|Cannibal]] trait instead gain {{Thought|value=+20|stack=1|label=raw cannibalism|desc=I ate the meat of another human, raw, like an animal. It was so... succulent.|duration=1}} for raw human meat and {{Thought|value=+15|stack=1|label=cooked cannibalism|desc=I ate a meal made from the meat of another human. So pleasurable. If only I had some fava beans and a nice chianti.|duration=1}} for cooked human meat. The moodlets for raw and cooked cannibalism stack with each other, as do any moodlets from meal types.&lt;br /&gt;
&lt;br /&gt;
Depending on the [[Ideoligion#Cannibalism|canibalism precept]] {{IdeologyIcon}} colonists gain instead:&lt;br /&gt;
* Cannibalism abhorrent: {{Thought|value=-20|stack=1|label=ate human meat|desc=I had to eat human meat. This is an offense against everything I believe.|duration=1}}&lt;br /&gt;
* Cannibalism horrible: {{Thought|value=-12|stack=1|label=ate human meat|desc=I had to eat human meat. This was a horrible thing.|duration=1}}&lt;br /&gt;
* Cannibalism dissapproved: {{Thought|value=-5|stack=1|label=ate human meat|desc=I had to eat human meat. I believe such actions are wrong.|duration=1}}&lt;br /&gt;
* Cannibalism acceptable: ''none''&lt;br /&gt;
* Cannibalism preferred: {{Thought|value=+2|stack=1|label=ate human meat|desc=I ate human meat. It makes me feel noble and strong.|duration=1}}&lt;br /&gt;
* Cannibalism required (strong): {{Thought|value=+4|stack=1|label=ate human meat|desc=I ate human meat, as every real human should.|duration=1}}&lt;br /&gt;
* Cannibalism required (ravenous): {{Thought|value=+6|stack=1|label=ate human meat|desc=I ate human meat! The world is right, and I am as I should be.|duration=1}}&lt;br /&gt;
&lt;br /&gt;
Processing human meat, once it has been butchered, incurs no penalties. Human meat can be made into meals, used for animal feed, processed in [[biofuel refinery]] for [[chemfuel]], or put in a [[biosculpter pod]]{{IdeologyIcon}} or [[growth vat]]{{BiotechIcon}}, and nobody will feel bad about it unless it is eaten directly.&lt;br /&gt;
&lt;br /&gt;
When consumed by [[Hemogenic]]{{BiotechIcon}} pawns, human meat satisfies the [[Hemogen]]{{BiotechIcon}} need by {{+|3.75}} per 1 [[nutrition]], or {{Icon Small|Human meat||{{#expr:1/{{P|Nutrition}}}}}}, consumed.{{Check Tag|Rounding?|This rounds to +4 for 20 meat, exact rounding mechanics needed}}. Note that only the raw meat provides this hemogen, eating [[corpse]]s or the meat cooked into [[meals]] does not.&lt;br /&gt;
&lt;br /&gt;
Its market value is only {{Icon Small|silver||{{P|Market Value Base}}}} [[silver]], or {{%|{{P|Market Value Base}}/{{Q|Meat|Market Value Base}}|0}} of regular meat. However, processing it into meals or [[chemfuel]] will ignore its origin when considering market value.&lt;br /&gt;
&lt;br /&gt;
Human meat is also used as a building ingredient for the [[cannibal platter]]{{IdeologyIcon}}, which requires {{Required Resources|Cannibal platter|simple=1}}.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Butchering a human is already upsetting for a good majority of colonists. So in a colony not filled with cannibals, eating it should only be for absolute emergencies, in extreme [[biome]]s like sea ice, or to please a cannibal on verge of [[mental break]]. For a cannibal, both the cooked cannibalism and raw cannibalism mood buffs stack, for a total of {{+|35}} mood. However, most cannibals still get {{Thought|value=-7|stack=1|label=ate raw food|desc=I had to eat raw food. We should be cooking that kind of food before eating it. We're not animals.|duration=1}}. You can further boost mood with [[fine meal]]s, [[lavish meal]]s, or their [[carnivore fine meal|carnivore]] [[carnivore lavish meal|variant]]s. Alternatively, the massive mood debuff might make human meat situationally useful. It may force a [[tortured artist]] into a mental break, or cause a [[Crisis of belief]] in the [[Ideology DLC]]. As for [[Caravan]]s and Raiding, Human Meat is one of the most abundant food sources that can be acquired while on-site by butchering several of the corpses found from the pawns killed and in [[Gibbet cage]]s {{IdeologyIcon}}, cooking them into Meals for slower spoilage.&lt;br /&gt;
&lt;br /&gt;
Using human meat for carnivorous animals (whenever raw or [[kibble]]) isn't cannibalism, so the animals won't mind. It may be wiser to leave corpses unbutchered, as the butchering itself has a fairly large penalty to both the butcher and the colony. Note that colonists in base game or with the [[Ideoligion#Corpses|Corpses ugly]]  precept {{IdeologyIcon}} will get {{--|4}} mood from observing them.&lt;br /&gt;
&lt;br /&gt;
In the [[Ideology DLC]], a colony's [[ideoligion]] can make this a different story. With the Cannibalism meme and/or precept, [[raider]]s become a completely viable source of both food and positive moodlets. Setting the precept to Required (Ravenous) gives the greatest mood buffs, +6 per meal, but also gives a strong debuff when human meat isn't available. This is also possible in the base game, with a colony entirely composed of the cannibal trait. By adjusting the [[scenario]] (&amp;quot;Forced trait&amp;quot;), you can set all starting colonists, or every pawn in the game, to be cannibals.&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Meat human a.png|One human meat&lt;br /&gt;
Meat human b.png|Partial stack&lt;br /&gt;
Meat human c.png|Full stack&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Meat human old.png|Old texture&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Nav|Food|wide}}&lt;br /&gt;
[[Category:Food]] [[Category:Raw Food]] [[Category:Meat]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Legionary&amp;diff=177584</id>
		<title>Legionary</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Legionary&amp;diff=177584"/>
		<updated>2026-03-14T20:50:56Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Cleaning up added section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Biotech}}&lt;br /&gt;
{{See also|Centurion}}&lt;br /&gt;
{{infobox main|none|&lt;br /&gt;
| name = Legionary&lt;br /&gt;
| image = LegionaryAncient east.png&lt;br /&gt;
| description = A combat support mechanoid with a wide-range bullet shield and mid-range needle gun. Designed to support other mechanoids, the legionary is vulnerable to anyone who can get inside its shield.&lt;br /&gt;
| combatPower = 150&lt;br /&gt;
| type = Mechanoid&lt;br /&gt;
| movespeed = 4.3&lt;br /&gt;
| flammability = 0&lt;br /&gt;
| marketvalue = 1200&lt;br /&gt;
| armorblunt = 20&lt;br /&gt;
| armorsharp = 40&lt;br /&gt;
| armorheat = 200&lt;br /&gt;
| min comfortable temperature = -100&lt;br /&gt;
| max comfortable temperature = 250&lt;br /&gt;
| psychic sensitivity = 0.5&lt;br /&gt;
| toxic resistance = 1&lt;br /&gt;
| toxic environment resistance = 1&lt;br /&gt;
| bandwidth cost = 2&lt;br /&gt;
| bodysize = 1&lt;br /&gt;
| healthscale = 0.72&lt;br /&gt;
| lifespan = &lt;br /&gt;
| attack1dmg = 12&lt;br /&gt;
| attack1type = Blunt&lt;br /&gt;
| attack1cool = 2&lt;br /&gt;
| attack1part = left fist&lt;br /&gt;
| attack2dmg = 12&lt;br /&gt;
| attack2type = Blunt&lt;br /&gt;
| attack2cool = 2&lt;br /&gt;
| attack2part = right fist&lt;br /&gt;
| attack3dmg = 8.5&lt;br /&gt;
| attack3type = Blunt&lt;br /&gt;
| attack3cool = 2&lt;br /&gt;
| attack3part = head&lt;br /&gt;
| attack3chancefactor = 0.2 &lt;br /&gt;
| page verified for version = 1.4.3525&lt;br /&gt;
| weaponTags = MechanoidGunNeedleLauncher&lt;br /&gt;
&amp;lt;!-- Creation --&amp;gt;&lt;br /&gt;
| research = Ultra mechtech&lt;br /&gt;
| production facility 1 = Large mech gestator&lt;br /&gt;
| gestation cycles = 4&lt;br /&gt;
| resource 1 = Plasteel&lt;br /&gt;
| resource 1 amount = 100&lt;br /&gt;
| resource 2 = Component&lt;br /&gt;
| resource 2 amount = 6&lt;br /&gt;
| resource 3 = High subcore&lt;br /&gt;
| resource 3 amount = 1&lt;br /&gt;
}}&lt;br /&gt;
A '''legionary''' is a [[mechanoids|mechanoid]] added by the [[Biotech DLC]] that projects a shield.&lt;br /&gt;
&lt;br /&gt;
== Acquisition ==&lt;br /&gt;
{{Acquisition}}&lt;br /&gt;
&lt;br /&gt;
Dead, friendly {{lc:{{PAGENAME}}}}s can also be resurrected at the {{lc:{{P|Production Facility 1}}}} using the &amp;quot;''Resurrect medium mechanoid''&amp;quot; bill. This requires the corpse of the friendly {{PAGENAME}}, {{Icon Small|Steel||50}} [[steel]], and 1 [[gestation cycle]] taking {{ticks|1800}} to initiate.&lt;br /&gt;
&lt;br /&gt;
== Summary == &lt;br /&gt;
{{Mechanoid Summary}}&lt;br /&gt;
&lt;br /&gt;
Dead legionaries may be shredded at the [[machining table]] or [[crafting spot]] for {{Icon Small|Steel||15}} [[steel]]. However, these values are affected by [[Mechanoid Shredding Efficiency|mechanoid shredding efficiency]], as well as missing parts on the legionary.&lt;br /&gt;
&lt;br /&gt;
=== Shield ===&lt;br /&gt;
[[File:Legionary shield radius.png|thumb|left|175px|Radius of the legionary's shield with unshielded area denoted in red, partially shielded areas in gold (see Note right).&amp;lt;br&amp;gt; Note that despite the shield visually extends into the red tiles, it does not protect them.]]&lt;br /&gt;
&lt;br /&gt;
The legionary projects a shield that is 3 tiles in radius, centered on the mech and moving with it, and which is visible whenever drafted or attacked. The shield stops all incoming enemy ground-level fire from passing into the bubble. It does not prevent pawns of any faction that are inside from firing out.  Also note that this only applies to ground-level fire, i.e. fire from ranged [[weapons]] carried by all types of [[pawn]] and [[turrets]], including grenades that cross the boundary of the shield. Explosives projectiles will detonate on the shield edge. Fire from [[mortar]]s, [[orbital bombardment targeter|orbital bombardment]], or [[Titles#Permits|aerodrone strikes or salvos]] {{RoyaltyIcon}} will not be blocked by the shield, nor will explosions crossing the boundary.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Pawns on the tiles shown in [[gold tile|gold]] in the image to the left are shielded from attacks directly targeted at them, however, due to a bug, they can still be hit by attacks aimed at other nearby pawns that miss. &lt;br /&gt;
&lt;br /&gt;
The shield can absorb up to 200 damage before breaking. If an attack would be sufficient to completely deplete the shield's charge, then the rest of its damage is negated, and the shield is temporarily broken. &amp;lt;!--After the shield takes damage and a delay of {{ticks|120}} has passed,{{Check Tag|Verify|Verify delay time}}--&amp;gt; The shield regenerates charge at rate of 0.25 HP per second, so long as it has not been broken. However, once the shield's charge is completely expended, the shield will break and be totally disabled for {{ticks|5400}} after which point the shield will be restored at full health. Projectiles from [[EMP grenades]] and [[EMP launcher|launchers]] from outside hitting the shield will disable the shield for {{ticks|1500}}, after which time the shield will be restored at full health. Note that {{Hover title|Version/1.6.4630|as of the time of writing}}, projectiles [[unique weapons]] with the [[EMP rounds]]{{OdysseyIcon}} trait do not disable the shield when striking it. It is currently unknown whether this is intended or considered a bug. It is also currently unknown if striking the mechanoid itself disables the shield.{{Check Tag|Verify}} Furthermore, unlike the mechanoid itself, the shield projector will not adapt to the EMP effect. Its therefore possible to continuously disable the shield until the mechanoid can be killed. Note that an EMP area of effect overlapping with the projected shield will not disable it - a projectile must hit the shield or the EMP damage must be dealt to the structure itself&lt;br /&gt;
&lt;br /&gt;
If the [[EMP]] damage is dealt to the legionary itself, the shield is similarly disabled for {{ticks|1500}}, but will continue to regenerate as if it was not.&lt;br /&gt;
&lt;br /&gt;
A pawn does not need to be inside the shield to benefit from the effect, assuming the enemy is not inside the shield and that the shield is between them and their attacker the incoming rounds will be stopped. However, it does not prevent pawns from moving inside the shield and attacking.&lt;br /&gt;
&lt;br /&gt;
=== As an ally ===&lt;br /&gt;
Mechs under player control require power: legionaries use 10% of their power per day while active.  If set to dormant self-charging, they instead recharge for 1% power / day, without pollution. They recharge in a [[large mech recharger]] (400W), for 50% power/day, creating 10 [[wastepack]]s whenever the recharger's waste is filled up.&lt;br /&gt;
&lt;br /&gt;
=== Combat ===&lt;br /&gt;
Legionaries are always equipped with a [[needle launcher]], which they do not drop upon death. See the [[needle launcher]] page for further information.&lt;br /&gt;
&lt;br /&gt;
Legionaries have a [[shooting accuracy]] of 96%, equivalent to a pawn with a [[Shooting]] skill of 8. They have a [[melee hit chance]] of 62%, equivalent to a pawn with a [[Melee]] skill of 4.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
{{Stub|section=1|reason=Needs at least comparison to Centurion for mechanitors choosing a shield mech, but also there's strategies for using the shield, distribution on a firing line, lillboz design, and moee esoteric like square packing legionaries and letting them go wild in a walled tile to make a shield wall etc}}&lt;br /&gt;
=== As an enemy ===&lt;br /&gt;
* The launcher is weak, but don't underestimate it. It's still strong enough to destroy vulnerable organs, including the brain.&lt;br /&gt;
* EMP works well to break the shield, if you can get close enough at all. Legionaries are often surrounded by powerful mechanoids due to their advanced nature.&lt;br /&gt;
&lt;br /&gt;
===As an ally===&lt;br /&gt;
The Legionary's shield provides a safe space for your ranged pawns to attack the enemy without worrying about retaliatory fire. With 200 hitpoints, slow firing weapons like pila, sniper rifles, and charge lances will no longer trouble your pawns as their slow fire rate gives the shield a bit of time to regenerate. However, care should still be utilized when relying on its shield. Exposure to rapid-fire weapons like miniguns or heavy charge blasters (both found on Centipedes) can shred the shield extremely fast.&lt;br /&gt;
&lt;br /&gt;
As a projected momentum repulsor field, the Legionary's shield is vulnerable to EMP, so try to take out enemies who wield EMP grenades or launchers first.&lt;br /&gt;
&lt;br /&gt;
===Comparison===&lt;br /&gt;
When compared to [[centurion]]s, legionaries are cheaper to build as they do not require advanced components or powerfocus chips, only use 2 bandwidth instead of 5, but also have a smaller and weaker shield. When using a lot of higher-tier mechs such as [[centipede]]s it is more resource efficient to make one or two legionaries to defend them rather than a single centurion. However, a centurion provides higher shield coverage and lets you cram more mechs into the same shield.&lt;br /&gt;
&lt;br /&gt;
== Health == &lt;br /&gt;
=== Body parts ===&lt;br /&gt;
{{Animal Health Table|Lancer}} &lt;br /&gt;
=== Armor ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Armor&lt;br /&gt;
|-&lt;br /&gt;
| {{Apparel Protection Chart&lt;br /&gt;
| set1name= {{P|Name}} (Sharp) | set1armor1={{P|Armor - Sharp}} &lt;br /&gt;
| set2name= {{P|Name}} (Blunt) | set2armor1={{P|Armor - Blunt}} &lt;br /&gt;
| set3name= {{P|Name}} (Heat) | set3armor1={{P|Armor - Heat}} &lt;br /&gt;
| color= grey, blue, red&lt;br /&gt;
}} &lt;br /&gt;
|}&lt;br /&gt;
{{Pawn Attack Table|weapon=Needle launcher}}&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
Both shield mechanoids, the centurion and the legionary, are named after positions in the ancient Roman Army. The Roman Army famously used large shields called scuta.&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Legionary east.png| Age 0-99 Legionary facing east&lt;br /&gt;
Legionary north.png| Age 0-99 Legionary facing north&lt;br /&gt;
Legionary south.png| Age 0-99 Legionary facing south&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&amp;lt;gallery&amp;gt;&lt;br /&gt;
LegionaryAncient east.png| Age 100+ Legionary facing east&lt;br /&gt;
LegionaryAncient north.png| Age 100+ Legionary facing north&lt;br /&gt;
LegionaryAncient south.png| Age 100+ Legionary facing south&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Biotech DLC]] Release - Added.&lt;br /&gt;
* [[Version/1.4.3555|1.4.3555]] - Weapon changed from needle gun to needle launcher. &lt;br /&gt;
* ? - Description changed to reflect change from needle gun to needle launcher. ''A combat support mechanoid with a wide range bullet shield and long-range needle gun. Designed to support other mechanoids from long range, the legionary is vulnerable to anyone who can get inside its shield.'' -&amp;gt; ''A combat support mechanoid with a wide-range bullet shield and mid-range needle gun. Designed to support other mechanoids, the legionary is vulnerable to anyone who can get inside its shield''&lt;br /&gt;
* [[Version/1.4.3682|1.4.3682]] - Fix: Missing final period in legionary description.&lt;br /&gt;
&lt;br /&gt;
{{nav|mechanoid|wide}}&lt;br /&gt;
[[Category:Mechanoids]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Psychic_soothe_pulser&amp;diff=177311</id>
		<title>Psychic soothe pulser</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Psychic_soothe_pulser&amp;diff=177311"/>
		<updated>2026-03-12T15:19:54Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{infobox main|&lt;br /&gt;
| name = Psychic soothe pulser&lt;br /&gt;
| image  = Psychic_soothe_pulser.png|Psychic soothe pulser&lt;br /&gt;
| description = A one-use broad-wave psychic effector. The psychic pulse induces self-satisfying perceptual distortions, giving a temporary mood boost to everyone in the region.&lt;br /&gt;
| type = Artifact&lt;br /&gt;
| tech level = Archotech&lt;br /&gt;
| marketvalue = 600&lt;br /&gt;
| hp = 80&lt;br /&gt;
| flammability = 0&lt;br /&gt;
| mass base = 0.5&lt;br /&gt;
| page verified for version = 1.3.3326&lt;br /&gt;
| thingSetMakerTags = RewardStandardHighFreq&lt;br /&gt;
}}&lt;br /&gt;
{{Info|A '''psychic soothe pulser''' is a single-use [[artifact]] which gives a &amp;quot;Strange feeling&amp;quot; thought with a +15 [[mood]] buff and 24 hour duration to every colonist on the map when activated.}}&lt;br /&gt;
&lt;br /&gt;
== Acquisition == &lt;br /&gt;
Psychic soothe pulsers cannot be crafted. Instead they can only be obtained through [[trade]] with [[faction base]]s or exotic goods traders, as a reward from [[quests]], or by finding them in [[ancient shrine]]s.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
A psychic soothe pulser is a single-use artifact that can be activated by selecting a colonist, right-clicking the artifact, and selecting 'Activate'&lt;br /&gt;
&lt;br /&gt;
The pulser gives the &amp;quot;''Strange feeling''&amp;quot; thought with a {{+|15}} [[mood]] buff to every [[human]] pawn on the map upon activation, including prisoners and raiders. The size of the mood bonus is scaled directly proportionally to each pawn's [[Psychic Sensitivity]] - a [[Psychically hypersensitive|hypersensitive pawn]] will receive a {{+|27}} while a [[psychically deaf]] pawn will receive no buff at all. If the psychic sensitivity of the pawn changes while the thought is still present, the mood buff will change with it. &lt;br /&gt;
&lt;br /&gt;
The psychic soothe pulser's bonus can be stacked up to 3 times. The second pulse will add an additional {{+|11}} before psychic sensitivity effects, and the third will add {{+|9}}, for a total mood bonus of {{+|35}}.&lt;br /&gt;
&lt;br /&gt;
The mood buff lasts for 24 hours. Note that pawns entering the map after activation are not affected, nor are pawns in [[cryptosleep casket]]s.&lt;br /&gt;
&lt;br /&gt;
Once it has been used once, the pulser disappears completely. It cannot be reloaded, nor can any resources be salvaged from it.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Psychic soothe pulsers are useful for any situation where a large number of colonists are suffering, or are likely to suffer, from a poor mood. Perhaps the most common example is long late-game raids, where colonists are deprived of [[rest]], [[saturation|food]], and [[recreation]], in addition to seeing [[corpse]]s or [[death]] - even of loved ones. Pulsers can keep pawns from [[mental break|breaking]] at inopportune times; mental breaks are dangerous for the pawn, and at the very least leaves the colony with 1 less defender.&lt;br /&gt;
&lt;br /&gt;
Psychic soothe pulsers can be also be used to counteract [[psychic drone]]s. A single pulser can completely nullify the effects of a low psychic drone and still have a {{+|3}} net effect on mood. Higher levels of drone will be reduced in intensity as well. Whilst doing so is expensive, it's possible to turn an extreme psychic drone's {{--|40}} effect on mood into a paltry {{--|5}} by activating 3 pulsers at the same time for the maximum soothe effect. By the time a colony is being affected by such extreme psychic events, it is likely in a position where it can afford to purchase multiple pulsers in preparation for such events.&lt;br /&gt;
&lt;br /&gt;
If possible, gather/save a few soothe pulsers for the [[ship launch]] or [[endings#Royal Ascent|royal ascent]]{{RoyaltyIcon}} [[endings]]. Not only are back-to-back raids quickly damaging to mood, but pawns often need to work to repair defenses when their needs are at their lowest.&lt;br /&gt;
&lt;br /&gt;
== Lore ==&lt;br /&gt;
Psychic effectors, like the psychic soothe pulser, are mentioned in the [[Lore#Specific_archotech-invented_technologies|Lore Primer]]. They are described as archotech in origin, with a completely unknown method of operation.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.12.906|0.12.906]] - Added&lt;br /&gt;
* 1.1 - received new visual and sound effects on use.&lt;br /&gt;
&lt;br /&gt;
[[Category:Artifact]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Muscle_parasites&amp;diff=177307</id>
		<title>Muscle parasites</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Muscle_parasites&amp;diff=177307"/>
		<updated>2026-03-12T15:03:45Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: The math was correct. Cleaning the sentence structure while I'm in here.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Muscle parasites''' are a parasitic [[disease]] hampering the muscles, decreasing their effectiveness. The disease does not kill the patient.&lt;br /&gt;
&lt;br /&gt;
== Effects ==&lt;br /&gt;
* [[Pain]]: {{++|20%}}&lt;br /&gt;
* [[Sleep Fall Rate]]: {{++|100%}}&lt;br /&gt;
* [[Manipulation]]: {{--|30%}}&lt;br /&gt;
* [[Moving]]: {{--|30%}}&lt;br /&gt;
&lt;br /&gt;
== Progression ==&lt;br /&gt;
Muscle parasites do not increase in severity over time, nor are they cured over time. Direct treatment is the primary way to cure it.&lt;br /&gt;
&lt;br /&gt;
== Treatment ==&lt;br /&gt;
Muscle parasites will be cured when the tending performed on it reach a cumulative tend quality of 300%, thus it is important to maximize the [[medical tend quality]] of the doctor performing the treatment and the quality of the medicine used. Treatment can only be performed every 48 ingame hours (2 days, {{Ticks|120000}}).&lt;br /&gt;
&lt;br /&gt;
For example, the disease can be treated with 3 tends at 100% quality, 5 tends at 60%, or 1 tend at 130% quality plus 2 tends at 85%.&lt;br /&gt;
&lt;br /&gt;
=== Other Treatments ===&lt;br /&gt;
* Administer [[healer mech serum]] which instantly treats the disease&lt;br /&gt;
* Use the medic cycle of the [[Biosculpter pod]] {{IdeologyIcon}}&lt;br /&gt;
&lt;br /&gt;
== Prevention ==&lt;br /&gt;
The [[perfect immunity]] gene{{BiotechIcon}} will prevent the acquisition of this disease but will not cure pre-existing conditions present at the time of implantation.&lt;br /&gt;
&lt;br /&gt;
== Trivia ==&lt;br /&gt;
In real life, humans can become infected by eating infected pork, or wild carnivores such as fox, cat, or bear.&lt;br /&gt;
&lt;br /&gt;
Unlike in-game, muscle parasites can kill in real life.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
Prior to Beta 19, muscle parasites always required 5 treatments regardless of quality.&lt;br /&gt;
&lt;br /&gt;
{{Nav|disease|wide}}&lt;br /&gt;
[[Category:Disease]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Piloting_Ability&amp;diff=177305</id>
		<title>Piloting Ability</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Piloting_Ability&amp;diff=177305"/>
		<updated>2026-03-12T14:58:29Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Moving added text outside of base stat description, which matches the in-game &amp;lt;description&amp;gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Odyssey}}&lt;br /&gt;
{{Stub|reason=1) How it translates to grav ship outcomes 2) passenger shuttle? 3) Interlinking}}&lt;br /&gt;
{{Verified|1.6.4523}}{{Stat&lt;br /&gt;
| default base value = 1&lt;br /&gt;
| to string style = PercentZero&lt;br /&gt;
| description = How well this person can pilot a vehicle.&lt;br /&gt;
| category = PawnWork&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A colonist's Piloting Ability determines the likelihood of a negative landing outcome when moving a [[gravship]]. It is disabled for colonists incapable of [[intellectual]].&lt;br /&gt;
&lt;br /&gt;
== Stat Factors ==&lt;br /&gt;
&lt;br /&gt;
=== Base Score ===&lt;br /&gt;
* [[Intellectual]][[Skill::Intellectual| ]]: [[Skill Base Factor::0.2|20%]] plus [[Skill Bonus Factor::0.075|7.5%]] per skill level&lt;br /&gt;
&lt;br /&gt;
=== Capacities ===&lt;br /&gt;
* [[Consciousness]]: [[Consciousness Importance::1|100%]] importance, [[Consciousness Limit::-|No]] max&lt;br /&gt;
* [[Sight]]: [[Sight Importance::0.5|50%]] importance, [[Sight Limit::1|100%]] max&lt;br /&gt;
* [[Manipulation]]: [[Manipulation Importance::0.5|50%]] importance, [[Manipulation Limit::1|100%]] max&lt;br /&gt;
&lt;br /&gt;
=== Offsets ===&lt;br /&gt;
* [[Pilot assistant]]: {{+|45%}}&lt;br /&gt;
{{Stat Factors Table}}&lt;br /&gt;
&lt;br /&gt;
{{nav|stats|wide}}&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Prisoner&amp;diff=177088</id>
		<title>Prisoner</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Prisoner&amp;diff=177088"/>
		<updated>2026-03-10T01:02:15Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Slight edit as restraints are a multiplier, not a cap.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Characters_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;!-- End of Nav --&amp;gt;&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
{{imagemargin|[[File:prisoner_preview.png|right]]|18px}}'''Prisoners''' are [[people]] who have been taken captive. This usually includes [[raiders]], but colonists can be imprisoned too.{{TOCright}}&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Prisoners are ordinary pawns under restraint. They have no [[Recreation]] needs, but all other needs and most [[mood]]lets apply to them. This includes a need for [[food]] and the chance for [[mental break]]s. They are confined to their cell and will not do work. Prisoners retain their faction allegiance; imprisoned colonists who are released will immediately rejoin the colony, while other prisoners will try and leave the map. Prisoner restraints reduce their [[move speed]] by 65%.&lt;br /&gt;
&lt;br /&gt;
Prisoners cannot open doors if not undergoing a [[#Prison Break|prison break]]. While inside your colony, they will try to leave if there is an opening, such as a hole in the wall or a held open door, including if it is held open because of an item inside. A prisoner that can move will wear the most comfortable{{Check Tag|Verify/Detail}} clothing placed in their cell. They eat the food with the best mood buff that they can reach, ignoring food restrictions. Mobile prisoners can use a [[nutrient paste dispenser]] that faces into their prison. Otherwise, wardens will bring any food allowed by their [[Food restriction|food restrictions]]. A prisoner's medical settings, as well as defaults for all prisoners, can be adjusted in their Health tab. &lt;br /&gt;
&lt;br /&gt;
Colonists assigned to Warden can interact with a prisoner in multiple different ways, including delivering food and recruitment. Colonists assigned to either Warden or Doctoring can feed a prisoner in medical rest. See [[#Interaction]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Unwaveringly loyal ===&lt;br /&gt;
Unwaveringly loyal prisoners are unable to be recruited to your colony, and do not have resistance to lower. They are otherwise the same as regular prisoners, including the ability to become a [[slave]]{{IdeologyIcon}}. Unwaveringly loyal pawns without a faction will be described as &amp;quot;not recruitable&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Unwaveringly loyal prisoners can be recruited after undergoing the [[Brainwipe]] psychic ritual.{{AnomalyIcon}} Additionally, if an unwaveringly loyal pawn joins your colony through any means, they will lose their unwavering loyalty. Thus, unwaveringly loyal pawns from a temporary faction (such as the [[Factions#Refugees|refugee faction]] {{RoyaltyIcon}}) or [[Factions#Factionless_humans|no faction]] can be recruited by [[Slavery|enslaving]] {{IdeologyIcon}} them, which makes them a member of the player's faction, and then emancipating them, which makes them a normal member of the player's colony. Friendly [[shamblers]] {{AnomalyIcon}} also automatically join the player's faction, which will remove the unwavering loyalty of a prisoner, though they will have to brought back to life with a [[resurrector mech serum]] to be recruited as a normal colonist.&lt;br /&gt;
&lt;br /&gt;
Unwavering loyalty can be disabled in the [[storyteller settings]]. Note that the enabling unwaveringly loyal pawns decreases the percentage of raiders that are automatically killed on [[down]]ing to almost exactly make up for the percentage of pawns that are now unrecruitable - this means that the number of recruitable prisoners remains constant with either option, but the total number of prisoners increases with unwaveringly loyal enabled. This is pure benefit if the player only intends to recruit from the pool of randomly downed raiders, however if the player was willing to specifically target good pawns for safe-downing and recruitment, such as through [[blood loss|bleed]] kiting or [[psychic shock lance]], then some portion of those previously recruitable pawns will instead be loyal and thus unavailable.&lt;br /&gt;
&lt;br /&gt;
=== Caravans ===&lt;br /&gt;
Prisoners can be loaded into a [[caravan]]. If they can walk, they can carry 35 kg worth of items, like your colonists. When inside a caravan, the prisoner will never try and escape unless its part of a [[mental break]].&lt;br /&gt;
&lt;br /&gt;
If the caravan enters a loaded map (such as an ambush), the prisoner will wander around idly, and may walk into the crossfire. Enemies will also target prisoners if their factions are enemies.&lt;br /&gt;
&lt;br /&gt;
== Capturing prisoners ==&lt;br /&gt;
In order to capture any prisoner, you need a valid prison, which is enclosed and has an open [[bed]] or [[sleeping spot]] (See [[#Prisons]] below).&lt;br /&gt;
&lt;br /&gt;
The gameplay steps required to capture a pawn depends on their state:&lt;br /&gt;
* [[Downed]] pawns can be captured with 100% success, without drafting a pawn. Select a colonist, and right click the future prisoner.&lt;br /&gt;
** [[Raider]]s, [[berserk]] pawns, and former prisoners in a  [[prison break]] are unable to be captured directly. They must first be [[downed]].&lt;br /&gt;
** NOTE: Raiders in particular have a [[AI Storytellers#Enemy death on downed|chance to die]] whenever they are downed from [[pain]] - such as from being injured. This does not apply if the pawn is downed from other causes; some ways to get around this include:&lt;br /&gt;
*** [[Psychic shock lance]], although there is a risk of burning the brain&lt;br /&gt;
*** [[Blood loss]]&lt;br /&gt;
*** [[Tox gas]]{{BiotechIcon}}, although not all xenotypes are affected, and [[Toxic buildup]] also has risks&lt;br /&gt;
* To ''arrest'' a colonist, guest, ally, or [[slave]]{{IdeologyIcon}}, you need to [[draft]] a colonist and select the target to capture. The colonist will then walk up to the target and attempt a capture. The chance of success depends on their [[Arrest Success Chance]], and will be displayed on the prompt. Arrest success chance largely depends on [[Social]] skill, but is negatively affected by [[Manipulation]] penalties. If the arrest fails, the target will go [[berserk]]. Pawns with the [[dead calm]] gene{{BiotechIcon}} always have a 100% success chance, regardless of arrester stats, and thus will never go berserk when arrested.&lt;br /&gt;
** Colonists can be captured even during a [[mental break]], except for [[berserk]]. This immediately ends most mental breaks, without catharsis. When released, colonists will get the {{--|6}} ''Was imprisoned'' [[mood]]let for 12 days. This mood penalty will not occur if the colonist is instead re-recruited. Arrests will not end the [[Mental break#Run wild|run wild]] or [[mental break#Catatonic breakdown|catatonic breakdown]] mental breaks.&lt;br /&gt;
&lt;br /&gt;
If you attempt to capture a pawn from a neutral or allied [[faction]], the faction will immediately turn hostile. This includes [[transport pod]] crashes, if they happen to be part of an existing faction.&lt;br /&gt;
&lt;br /&gt;
If you need to capture a pawn, then [[sleeping spot]]s can be used to instantly create a prison and bed space anywhere indoors. You can also turn a colonist bedroom into a prison.&lt;br /&gt;
&lt;br /&gt;
=== Reasons to imprison ===&lt;br /&gt;
* To recruit raiders, guests, or transport pod crashes into a colony.&lt;br /&gt;
* To use raiders for their [[human resources]].&lt;br /&gt;
* To end most [[mental break]]s. Colonists can immediately be released afterwards.&lt;br /&gt;
* To keep a colonist restrained in order to overcome [[drug]] withdrawal.&lt;br /&gt;
* To convert a colonist or [[slave]] to a desired [[ideoligion]].{{IdeologyIcon}}&lt;br /&gt;
* To act as sources of [[Bloodfeeder|bloodfeeding]] or [[hemogen pack]]s.{{BiotechIcon}}&lt;br /&gt;
* To sell the prisoner.&lt;br /&gt;
* For raiders, to release them for a goodwill gain of the enemy faction (faction must not be permanently hostile and the released prisoner must exit the map healthy).&lt;br /&gt;
&lt;br /&gt;
== Prisons ==&lt;br /&gt;
[[File:Thank you Megasloth for letting my prisoners run.png|thumb|right|350px|Megasloth getting sheared at the exit of a prison door, holding it open for a prisoner to escape.]]&lt;br /&gt;
Prisons are required to hold prisoners.&lt;br /&gt;
=== Creation ===&lt;br /&gt;
A prison must be designated in a fully enclosed [[room]], closed off with [[wall]]s and other impassable objects like [[door]]s, [[cooler]]s and [[nutrient paste dispenser]]s. Prisoners cannot be captured unless the prison is enclosed, and mobile prisoners will walk out of the map if an opening exists.&lt;br /&gt;
&lt;br /&gt;
In order to actually form a prison, at least 1 [[bed]] or [[sleeping spot]] must be placed. Selecting the bed allows you to set &amp;quot;For Prisoners&amp;quot;. Colonists and [[slaves]]{{IdeologyIcon}} may not share the same room as a prisoner; when 1 bed is set to prisoners, all beds will be converted to prison beds. The beds will turn orange to signify this, and the whole room gains an orange outline when selected. In order to actually capture a prisoner, there must be an open sleeping area for them to stay.&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
A prison is called a ''prison cell'' if there is 1 bed available, or a ''prison barracks'' if there are multiple beds. A prison is otherwise treated as a bed room or barracks, including [[mood]] impacts for its Impressiveness.&lt;br /&gt;
&lt;br /&gt;
Prisoners can only use items that are in their cell. Food, beds, and [[nutrient paste dispenser]]s placed inside a prison are reserved for prisoner use. While a colonist can be ordered to eat food placed in a prison cell, they will not automatically do so. Colonists on the food binge [[mental break]], as well as [[animal]]s, will ignore a prison for this purpose.&lt;br /&gt;
&lt;br /&gt;
Unless you want your prisoners to die, make sure that it is hospitable. Regulate the [[temperature]], or give prisoners sufficiently insulating [[clothing]], such as [[tribalwear]]. Make sure that food gets to a prisoner (either via a storage zone, warden delivery, or [[nutrient paste dispenser]]). Otherwise, see [[#Mood regulation]] for how to make your prison better for the inmates... or worse.&lt;br /&gt;
&lt;br /&gt;
== Interaction ==&lt;br /&gt;
Players can assign wardens to do the following tasks:&lt;br /&gt;
* '''[[#Resistance|Recruit]]''' - Reduces the prisoner's [[#Resistance|resistance]], then attempts to recruit.&lt;br /&gt;
* '''[[#Resistance|Reduce resistance]]''' - Reduces the prisoner's [[#Resistance|resistance]], does not recruit.&lt;br /&gt;
* '''[[#Release|Release]]''' - Releases the prisoner. Imprisoned colonists will rejoin the colony, while other factions will attempt to leave the map.&lt;br /&gt;
* '''[[#Execute|Execute]]''' - Order wardens to kill the prisoner.&lt;br /&gt;
&lt;br /&gt;
The following options are added by [[DLC]]:&lt;br /&gt;
* '''[[#Will|Enslave]]'''{{IdeologyIcon}} - Reduces the prisoner's [[#Will|will]], then forces them into [[slave]]ry.&lt;br /&gt;
* '''[[#Will|Reduce will]]'''{{IdeologyIcon}} - Reduces the prisoner's [[#Will|will]], does not enslave them.&lt;br /&gt;
* '''[[#Convert|Convert]]'''{{IdeologyIcon}} - Attempts to convert the prisoner into a warden's [[ideoligion]].&lt;br /&gt;
* '''[[#Bloodfeed|Bloodfeed]]'''{{BiotechIcon}} - [[Sanguophage]]s and other pawns with the [[Bloodfeeder]] [[gene]] will drink the prisoner's blood.&lt;br /&gt;
* '''[[#Hemogen farm|Hemogen Farm]]'''{{BiotechIcon}} - Pawns assigned to the [[Work#Doctor|Doctor]] worktype will automatically extract [[hemogen pack]]s from the prisoner.&lt;br /&gt;
&lt;br /&gt;
=== Resistance ===&lt;br /&gt;
{{see also|#Recruitment{{!}}Recruitment}}&lt;br /&gt;
Prisoners start with '''resistance''', or unwillingness to join the colony. This must be lowered to 0 for recruitment attempts to begin. Unwaveringly loyal prisoners do not have a resistance stat, and can't be recruited.&lt;br /&gt;
&lt;br /&gt;
Under the ''Recruit'' or ''Reduce Resistance'' orders, wardens will attempt to lower the resistance. How much is reduced depends on a prisoner's [[mood]], the warden's [[Negotiation Ability]], and the prisoner's [[opinion]] of the warden. Wardens with more [[Social]] skill have a greater Negotiation Ability. There is a delay between each conversation.&lt;br /&gt;
&lt;br /&gt;
Once resistance hits 0, wardens will try to convince the prisoner to join the colony, with a chance to succeed, depending on each prisoner's recruitment difficulty percentage, their current mood, faction, how many colonists you currently have, as well as your [[storyteller]]. If the prisoner is assigned to ''Reduce Resistance'', then wardens will continue to converse without actually recruiting.&lt;br /&gt;
&lt;br /&gt;
For exact mechanics and chances of recruitment, see [[#Recruitment]].&lt;br /&gt;
&lt;br /&gt;
==== Will ====&lt;br /&gt;
Enslave{{IdeologyIcon}} and Reduce Will{{IdeologyIcon}} work analogously to Recruit and Reduce Resistance, except that the end result is that the prisoner becomes a [[slave]]{{IdeologyIcon}}. A prisoner starts with much less will than they do resistance.&lt;br /&gt;
&lt;br /&gt;
==== Tame ====&lt;br /&gt;
A [[wild man]] can be arrested and imprisoned. However, they must be [[tame]]d using the usual [[animal]] mechanics, rather than being recruited as a prisoner. Once tamed, they will join the colony as a colonist.&lt;br /&gt;
&lt;br /&gt;
=== Release ===&lt;br /&gt;
Wardens will take the prisoner outside your colony, and free the prisoner. &amp;quot;Outside the colony&amp;quot; means beyond your outermost line of connected walls, so it could be just out the door, or across most of the map if your defenses stretch that far. &lt;br /&gt;
&lt;br /&gt;
Releasing a prisoner of another faction will give a [[goodwill]] boost of +12. In order to count towards goodwill, the prisoner must successfully leave the map healthy, with any wounds tended to. Prisoners that can't walk can't be released. Pirates and savage tribes do not interact with goodwill, so releasing them has no effect.&lt;br /&gt;
&lt;br /&gt;
Releasing a colonist will have them rejoin your colony. [[Slave]]s retain their home faction.&lt;br /&gt;
&lt;br /&gt;
=== Execute ===&lt;br /&gt;
Wardens will cut a prisoner's neck immediately, killing them without fail. This is a different action from the ''Prisoner execution'' [[ritual]].&lt;br /&gt;
&lt;br /&gt;
Executing guilty prisoners - those who have harmed the colony in 24 hours - give a {{--|2}} [[mood]]let to non-[[Psychopath]] colonists. Executing a non-guilty prisoner increases the penalty to {{--|5}}.&lt;br /&gt;
&lt;br /&gt;
Colonists following an [[ideoligion]]{{IdeologyIcon}} with the [[Ideoligion#Execution|Execution: Respected if Guilty]] precept instead gain a {{+|3}} [[mood]]let for executing a guilty prisoner, with the executioner gaining {{+|10}} mood instead. The [[Ideoligion#Execution|Execution: Required]] precept gains the same moodlets (but shorter) for executing anyone. If the execution was desired by precept, then fluid ideoligions gain a development point.&lt;br /&gt;
&lt;br /&gt;
Executed prisoners who are then [[Resurrector mech serum|resurrected]] will have the execute toggle deselected to prevent their immediate re-execution.&lt;br /&gt;
&lt;br /&gt;
=== Convert ===&lt;br /&gt;
{{Ideology|section=1}}&lt;br /&gt;
Attempts to [[Ideoligion#Conversion|convert]] the prisoner to the warden's own [[ideoligion]]. The target ideoligion can be selected, which will only allow wardens of that ideoligion to convert.&lt;br /&gt;
&lt;br /&gt;
This is functionally the same as [[Ideoligion#Conversion|regular conversion]] that can occur randomly between colonists, except that it is done on a regular basis.&lt;br /&gt;
&lt;br /&gt;
=== Hemogen ===&lt;br /&gt;
{{Biotech|section=1}}&lt;br /&gt;
==== Bloodfeed ====&lt;br /&gt;
Pawns with the ''Bloodfeeder'' [[gene]] will automatically drink the blood from a prisoner, directly. This happens when a bloodfeeder is below their desired Hemogen and if the bloodfeeding would not kill the prisoner.&lt;br /&gt;
&lt;br /&gt;
==== Hemogen farm ====&lt;br /&gt;
Automatically orders the operation extract [[hemogen pack]] when a prisoner's [[blood loss]] level reaches 0. In addition to creating drinkable hemogen, it also trains the surgeon's Medical skill.&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Prisoners can be escorted by a warden to a prisoner bed. Prisoners can be escorted to a prisoner medical bed, if needed, without a risk of escape.&lt;br /&gt;
* Prisoners can initiate social fights with other prisoners. &lt;br /&gt;
* Prisoners can be given any number of medical [[operation]]s. This includes injecting [[drug]]s, installing [[artificial body parts]], [[organ harvesting]], and more.&lt;br /&gt;
* Prisoners are valid targets for a [[gene extractor]]{{BiotechIcon}}, [[subcore softscanner]]{{BiotechIcon}}, or [[subcore ripscanner]]{{BiotechIcon}}.&lt;br /&gt;
* Prisoners can be sold to a [[faction base]] or slaver for [[silver]], or a royal tribute collector{{RoyaltyIcon}} for [[honor]]. Colonists who do not like slavery will get a -3 moodlet, modified by [[ideoligion]]{{IdeologyIcon}}.&lt;br /&gt;
* If a prisoner dies, the mood penalty depends on their cause of death. &amp;quot;Intentional&amp;quot; means, like violent combat, count as an execution.&lt;br /&gt;
&lt;br /&gt;
== Prison break ==&lt;br /&gt;
{{Template:Prison Break}}&lt;br /&gt;
{{Clear}}&lt;br /&gt;
&lt;br /&gt;
== Recruitment ==&lt;br /&gt;
In order to start recruitment, a target pawn must first be captured, and become a prisoner.  Prisoners then must be set to &amp;quot;Recruit&amp;quot; (or &amp;quot;Reduce Resistance&amp;quot; and then &amp;quot;Recruit&amp;quot;) in the &amp;quot;Prisoner&amp;quot; tab of their personal info box (bottom left of screen when pawn is selected).&lt;br /&gt;
&lt;br /&gt;
Then colonists assigned to wardening will &amp;quot;chat&amp;quot; with the target prisoner. This can be repeated every several hours, each one reducing [[#Resistance|Resistance]] by a predictable amount (based on the Social pawn's Social skill and the target's Mood). &lt;br /&gt;
&lt;br /&gt;
=== Starting resistance ===&lt;br /&gt;
Each prisoner has their own recruitment difficulty:&lt;br /&gt;
* The maximum difficulty is 99%, while the minimum is 10%. The average is 50% with a standard deviation of 15%.&lt;br /&gt;
* For each level of technology between your faction and the enemy's, the difficulty is increased by 16%. [[New Tribe]]s have a harder time recruiting outlanders, for instance.&lt;br /&gt;
* The [[storyteller]] will change the recruitment difficulty of prisoners depending on your existing population.&lt;br /&gt;
&lt;br /&gt;
A prisoner's base resistance depends on their difficulty. At 10% difficulty, prisoners have no starting resistance. At 50%, they have 15. At 90%, they have 25. At 100%, they have 50.&lt;br /&gt;
&lt;br /&gt;
This is multiplied by the storyteller's 'population intent' factor- the greater your population, the less the storyteller will want you to have an increase in population, and hence the higher the starting resistance. At -1 intent, the resistance is multiplied by 2. At 0, the resistance is multiplied by 1.5. At 1, the resistance is multiplied by 1. At 2, the resistance is multiplied by 0.8.&lt;br /&gt;
&lt;br /&gt;
Finally, the resistance is multiplied by a random factor between 0.8 and 1.2.&lt;br /&gt;
&lt;br /&gt;
=== Resistance reduction ===&lt;br /&gt;
A warden will reduce a base of 1.0 resistance per conversation. This is multiplied by:&lt;br /&gt;
&lt;br /&gt;
'''Prisoner's [[opinion]] of the warden:'''&lt;br /&gt;
* At -100 opinion, the resistance reduction factor is 50%.&lt;br /&gt;
* At 0 opinion, the resistance reduction factor is 100%.&lt;br /&gt;
* At 100 opinion, the resistance reduction factor is 150%.&lt;br /&gt;
&lt;br /&gt;
'''Prisoner [[mood]]:'''&lt;br /&gt;
* At 0% current mood, the resistance reduction factor is 20%.&lt;br /&gt;
* At 50% mood, the resistance reduction factor is 100%.&lt;br /&gt;
* At 100% mood, the resistance reduction factor is 150%.&lt;br /&gt;
&lt;br /&gt;
'''Negotiation Ability:'''&lt;br /&gt;
* See [[Negotiation Ability]].&lt;br /&gt;
&lt;br /&gt;
==== Word of Trust ====&lt;br /&gt;
The [[Word of trust]] psycast {{RoyaltyIcon}} will reduce resistance by 20, multiplied directly by the prisoner's [[Psychic Sensitivity]] and no other factors.&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
=== Mood regulation ===&lt;br /&gt;
{{Stub|section=1|reason=Only some mental breaks are available to prisoners. Which? Expand on how that affects strategy and options}}&lt;br /&gt;
Increasing [[mood]] makes prisoners easier to recruit, and less likely to go [[berserk]]. If you want to increase prisoner mood, you can do the following:&lt;br /&gt;
* Give prisoners separate rooms, preferably one that isn't cramped.&lt;br /&gt;
* Give a prisoners a source of [[light]], a [[table]] and [[chair]], and a decent [[bed]].&lt;br /&gt;
* Increase the impressiveness of a room with [[sculpture]]s, [[stone tile]]s, etc.&lt;br /&gt;
* Give the prisoner [[fine meal]]s, [[lavish meal]]s, or even [[drug]]s.&lt;br /&gt;
&lt;br /&gt;
=== Changing ideoligion ===&lt;br /&gt;
{{Ideology|section=1}}&lt;br /&gt;
If you want to change the target's [[ideoligion]], then instead try and make the prisoner upset. Lower mood reduces [[certainty]] gain, and may cause a [[Mental break#Crisis of belief|Crisis of Belief]] extreme mental break, which reduces certainty by 50%. The following can help with decreasing mood:&lt;br /&gt;
* Keep prisoners in a confined, dark space, without a bed or furniture. Even if there's only 1 prisoner, placing 2 [[sleeping spot]]s will create a prison barracks.&lt;br /&gt;
* Feed the pawn [[human meat]], [[insect meat]], [[raw food]], or [[kibble]]. Certain ideoligions can make some of these foods more desirable, but kibble is never desirable to eat.&lt;br /&gt;
* Keep them in [[pain]]. Inflicting [[injury]] comes at the risk of scarring or permanent damage, however, and a [[mindscrew]] {{RoyaltyIcon}} cannot be removed by traditional methods once the pawn is converted. A [[torture crown]] is a risk free way of inflicting pain, but dressing prisoners has its own difficulties. &lt;br /&gt;
Keep in mind that crises of belief that would drop a pawn's certainty to or below 0%, will instead convert the pawn to a weighted randomly selected ideoligion with a new certainty. While this process might select the intended ideoligion, it may not while also requiring their certainty be reduced again. If a pawn's certainty is below 50%, consider improving their mood above their extreme [[mental break threshold]] to prevent this.&lt;br /&gt;
&lt;br /&gt;
It is also worth considering the individual pawn when deciding on an approach. The first concern are the [[traits]] - many traits affect the [[Global Certainty Loss Factor]] of a pawn, which in turn affect the efficacy of conversion attempts by wardens. For pawns with a high factor, traditional conversion will be effective, while forcing a crisis of belief may be all but necessary. For further details, including a list of traits that affect the factor, see [[Certainty]] and [[Global Certainty Loss Factor]]. &lt;br /&gt;
&lt;br /&gt;
The second concern are [[xenotypes]]{{BiotechIcon}}  with the [[Aggressive]] and [[Hyper-aggressive]] genes.{{BiotechIcon}}  Those with aggressive, including all [[yttakin]],{{BiotechIcon}}  [[wasters]],{{BiotechIcon}}  [[neanderthals]],{{BiotechIcon}}  and [[sanguophages]],{{BiotechIcon}}  are much more likely to have a berserk mental break, proportionally reducing the chances of a crisis of belief. Meanwhile those with hyper-aggressive will essentially never select the crisis, making pawns such as [[hussars]]{{BiotechIcon}}  all but impossible to convert by crisis.&lt;br /&gt;
&lt;br /&gt;
=== Prisoner suppression ===&lt;br /&gt;
Whenever they are [[berserk]], under a [[#Prison break|prison break]], or just escaping, sometimes you will need to subdue a prisoner. When berserk, prisoners will fight other prisoners, then will punch the weakest area (usually a [[door]]) to escape. When under a prisoner break, they can just open the door.&lt;br /&gt;
&lt;br /&gt;
If you need to keep the prisoner alive, it is best to use low damage weapons and attacks - even just melee attacks with a gun or bare fists. Several unskilled pawns work better than 1 skilled one. For berserkers, you can have a skilled [[Construction]] pawn constantly repair the door. This trains Construction but is labor intensive. You can also wall the prisoner in, which will cause them to stop attacking the door and just wander around in their cell instead. &lt;br /&gt;
&lt;br /&gt;
If free roaming [[animal]]s are within the prison, then [[berserk]]ing prisoners will prioritize them over breaking out. You can place [[animal sleeping spot]]s inside the prison for an automatic form of prisoner suppression. Note that animals are slightly more dangerous than humans. In addition, most animals will create a large amount of [[filth]], quickly lowering the room's quality. You may want to use [[straw matting]].&lt;br /&gt;
&lt;br /&gt;
=== Unwanted prisoners ===&lt;br /&gt;
Enemies who have fallen in battle may not always be worth capturing in the first place. For example, a hostile with a shattered spine will require a [[bionic spine]] to replace, which may not be worth it. Unwavering prisoners can't be recruited normally, so fall under the same boat.&lt;br /&gt;
&lt;br /&gt;
There are several ways to dispose of these prisoners:&lt;br /&gt;
* '''Release:''' The least upsetting way to remove a prisoner. Colonists will not become upset if an enemy prisoner is released, and it may increase [[goodwill]] by a small amount.&lt;br /&gt;
* '''Expendables:''' This is not exactly &amp;quot;getting rid of them&amp;quot;, as much as making best (and ultimately temporary) use of them. Recruit them, and send them out for a long [[caravan]] that you wouldn't expend another colonist for. You can set them on a trading expedition, or scout a base/map. Or, you can use them as a meatshield. A &amp;quot;colonist&amp;quot; dying still gives a negative moodlet (-3, same as incidental death or non-guilty euthanasia), which is affected by [[opinion]]. Cut off their tongue to prevent social interaction from happening. Of course, unwavering prisoners can't be recruited.&lt;br /&gt;
* '''Euthanasia:''' Execute in a more humane fashion by neck cut. This costs 1x [[herbal medicine]] (or better) and trains Medical experience. An 'innocent' prisoner going through euthanasia is less upsetting than an innocent execution.&lt;br /&gt;
* '''Execution:''' Execute a prisoner in a raw manner. Those with an [[ideoligion]] favoring execution will enjoy it. With a fluid ideoligion, execution is a very easy way to gain development points (so long as it is Respected if Guilty). &lt;br /&gt;
* '''[[Human resources]]:''' Use prisoners for their parts. Artificial limbs can be removed without penalty. &lt;br /&gt;
** [[Organ harvesting]]: A [[kidney]] and [[lung]] can be harvested without death, and a [[heart]], [[liver]], or second kidney/lung can be taken to kill. Unless Organ Use is acceptable by [[ideoligion]], this comes with a -6 [[mood]] penalty (stacks, but diminishing) for the colony, and even more if the prisoner was killed.&lt;br /&gt;
** Used for a [[gene extractor]]{{BiotechIcon}} or [[subcore ripscanner]]{{BiotechIcon}}, the latter of which is fatal.&lt;br /&gt;
* '''Selling:''' Prisoners can be sold for money at a [[faction base]] or slaver, or exchanged for [[honor]]{{RoyaltyIcon}} from a royal tribute collector. Each sold prisoner gives -3 [[mood]].&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.8.657|0.8.657]] - You can now release prisoners. This gains you goodwill from their faction.&lt;br /&gt;
* [[Version/0.13.1135|0.13.1135]] - Prison breaks added.&lt;br /&gt;
* 1.1 - Interface now reports the chance of a successful arrest before you try to make it.&lt;br /&gt;
* [[Version/1.1.2570|1.1.2570]] - Escaping prisoners are no longer able to equip [[Persona weapons|bladelinked]] or [[biocoded]] weapons.&lt;br /&gt;
* [[Version/1.3.3066|1.3.3066]] - Prisoner escape chance is multiplied by the number of exits the prisoner has. Escaping prisoners will attack enemies with weapons they pick up, including [[orbital bombardment targeter]]s, [[orbital power beam targeter]]s, and [[tornado generator]]s.&lt;br /&gt;
* [[Version/1.4.3523|1.4.3523]] - Unwavering prisoners added. Fix: Resurrected executed prisoners retain the execute option and usually immediately get executed after being resurrected.&lt;br /&gt;
* [[Version/1.4.3529|1.4.3529]] - Fix: Hemogen extraction can get &amp;quot;stuck&amp;quot; on. Fix exploit: Unwaveringly loyal can be bypassed by enslaving prisoners. Fix exploit: Capture&amp;gt;Enslave&amp;gt;Imprison&amp;gt;Release recruits pawns immediately.&lt;br /&gt;
* [[Version/1.4.3555|1.4.3555]] - Fix: Enslaving a pawn removes unwaveringly loyal. Fix: Unwaveringly loyal inspect pane text not appearing for slaves.&lt;br /&gt;
* [[Version/1.4.3613|1.4.3613]] - Fix: Child prisoners attempt to wear adult clothing, causing it to disappear.&lt;br /&gt;
* [[Version/1.4.3641|1.4.3641]] - Fix: Error on releasing space refugee prisoners. &lt;br /&gt;
* [[Version/1.4.3682|1.4.3682]] - Fix: [[Dead calm]] pawns go berserk when arresting fails. Fix: Captured prisoners escaping from reformed caravans.&lt;br /&gt;
* [[Version/1.5.4062|1.5.4062]] - Fix: The &amp;quot;run wild&amp;quot; mental break can occur on unwaveringly loyal pawns, causing them to be tameable. Unlisted change: Unwaveringly loyal prisoners can be converted to different ideologies. Fix: Prisoners can start social fights with non-prisoners.&lt;br /&gt;
* [[Version/1.5.4062|1.5.4062]] - Fix: Rounding shows resistance at 0.0, but recruitment isn't available yet.&lt;br /&gt;
[[Category:Characters]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Blood_rain_(ritual)&amp;diff=177084</id>
		<title>Blood rain (ritual)</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Blood_rain_(ritual)&amp;diff=177084"/>
		<updated>2026-03-10T00:57:13Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Merge edit by 47.204.19.195&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Anomaly}}&lt;br /&gt;
{{Stub|reason= General - Missing real summary and analysis. Also needs participant kinds and numbers}}&lt;br /&gt;
{{About|the [[psychic ritual]]|weather event it causes|Blood rain}}&lt;br /&gt;
{{Infobox main|psycast&lt;br /&gt;
| name = Blood rain&lt;br /&gt;
| image = Psychic ritual - Blood rain.png&lt;br /&gt;
| type = Psychic ritual&lt;br /&gt;
| description = Cast a ritual which causes blood-like psychofluid to fall from the sky. The fluid will slowly drive exposed humans and animals into a berserk frenzy. Traits and psychic sensitivity modulate the effect.&lt;br /&gt;
| research = Blood rain&lt;br /&gt;
| ritual duration = 5000&lt;br /&gt;
| ritual cooldown = 1500000&lt;br /&gt;
| resource 1 = Bioferrite&lt;br /&gt;
| resource 1 amount = 70&lt;br /&gt;
}}&lt;br /&gt;
'''Blood rain''' is a [[psychic ritual]] that causes the [[blood rain]] weather event to start, which inflicts slowly increasing [[melee damage factor]] buffs and [[mood]] penalties on those exposed to it, before finally driving them berserk.&lt;br /&gt;
&lt;br /&gt;
== Acquisition ==&lt;br /&gt;
{{Acquisition}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Effect duration ranges from 3 hours at 0% ritual quality to 16 hours at 100% quality.&lt;br /&gt;
&lt;br /&gt;
Colony [[animals]] will retreat indoors and inside their barn to avoid being exposed to blood rain.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
&lt;br /&gt;
As of 1.6 Blood Rain is bugged due to incorrectly calculating ticks, rendering it impossible to cause any pawn to reach an enraged state. It would require a minimum of six blood rain's worth of exposure at the current rate for a chance to have an effect. A temporary fix is available [https://steamcommunity.com/sharedfiles/filedetails/?id=3665183535 here.] This issue has already been patched on Unstable, and once it is pushed to the live version of the game, this note should be taken down.&lt;br /&gt;
&lt;br /&gt;
Blood rain is a dedicated anti-siege ritual. While it is the single most expensive ritual in terms of bioferrite, and it requires prolonged exposure to the elements that almost no enemy raid types will wait around for, the Siege raid type is the best case scenario for it, involving many enemies standing out for long periods in the weather. Eventually, exposed pawns will reach 100% exposure, causing them to attack all targets around them. This includes animals, causing them to turn Manhunter. Humanoid pawns will lose their bezerk status as soon as the Blood Rage effect wears off, while Manhunter animals will remain as Manhunters until the next time they fall asleep, identically to animals that turn Manhunter from being attacked. &lt;br /&gt;
&lt;br /&gt;
This purpose extends to mechanoid sieges, as well. While mechanoids are entirely unaffected by the blood rain, the ritual turning a portion, possibly even a majority, of the wild animals on your tile into Manhunters will cause them to attack any non-sleeping mechanoids present. Unlike intentionally botching a [[Draw animals]] ritual, Blood Rain is likely to turn half to three quarters of your wildlife population into Manhunters temporarily, while an intentionally failed Draw Animals draws a number of Manhunters based on a colony's total wealth and associated threat points scaling, and which will not calm down overnight, requiring five days until they die off.&lt;br /&gt;
&lt;br /&gt;
It is unwise to perform a Blood Rain against non-siege raids. Not only are they likely to be far too short for the blood rage to build to a beneficial effect, the short term effect of exposure is an increased melee damage factor. The lack of benefits in the short term for ensuring enemy raiders deal more melee damage against your colony is self explanatory. If your colony ranches animals, then it would also be prudent to ensure any pens have a roof over them, before you send your own chicken farm or horse stable into a manhunting rage.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Anomaly DLC]] Release - Added.&lt;br /&gt;
&lt;br /&gt;
{{Nav|psychic rituals|wide}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Psychic rituals]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Slavery&amp;diff=175699</id>
		<title>Slavery</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Slavery&amp;diff=175699"/>
		<updated>2026-02-22T01:35:54Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Cleaned up the recently edited sentence.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Ideology}}&lt;br /&gt;
{{Rewrite|reason=Previous major rewrite lost information re: raid points. Verify any other losses}}&lt;br /&gt;
{{For|selling prisoners, which is also considered &amp;quot;slavery&amp;quot; |Prisoners}}&lt;br /&gt;
'''Slavery''' in base game RimWorld is limited to selling [[prisoner]]s for profit, at the cost of a [[mood]] hit for anyone not a [[psychopath]]. Purchasing a slave, meanwhile, will immediately free them from slavery and join them into the colony, with a mood buff. The [[Ideology DLC]] significantly expands on the concept, allowing prisoners to be enslaved and forced to work and perform tasks.&lt;br /&gt;
&lt;br /&gt;
== Acquiring slaves ==&lt;br /&gt;
Slaves can be created by reducing the will of a [[prisoner]] to zero, or by attempting to enslave a prisoner while benefiting from a recruitment [[Mental inspiration#Inspired recruitment|inspiration]]. A prisoner's starting will is usually much lower than their resistance (which would recruit them as a colonist).&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Slaves are controllable pawns, much like a colonist. They have many functional differences but act just the same. Slaves are prone to [[#Slave rebellion|slave rebellions]].&lt;br /&gt;
&lt;br /&gt;
Slaves contribute 75% of the [[raid points]] of an equivalent colonist. &lt;br /&gt;
&lt;br /&gt;
=== Work ===&lt;br /&gt;
A slave will have 85% [[Global Work Speed]] - they have no motivation to work as hard. To compensate, they have no need for [[Recreation]], and will have increased mood through expectations.&lt;br /&gt;
&lt;br /&gt;
Slaves are unable to do the Warden, Hunt, Art, or Research tasks. They are additionally unable to:&lt;br /&gt;
* Tasks that require a minimum [[Intellectual]] skill greater than 0 such as crafting [[Medicine]] as slaves are considered to have 0 skill regardless of their actual skill level prior to enslavement. Despite [[Drug Synthesis Speed]] scaling with Intellectual they are still capable of doing tasks that use this stat for scaling, albeit slowly.&lt;br /&gt;
* Request caravans, military aid, or persona core location via [[comms console]]&lt;br /&gt;
* Call royal [[permit]]s{{RoyaltyIcon}}&lt;br /&gt;
* Be an ideoligious [[role]]&lt;br /&gt;
However, slavery overrides ''all'' other work exceptions. For example, if a colonist would be unable to do Dumb Labor, enslaving will force them to allow Dumb Labor.&lt;br /&gt;
&lt;br /&gt;
Unlike [[prisoner]]s, male slaves can fertilize [[embryo]]s.{{BiotechIcon}}&lt;br /&gt;
&lt;br /&gt;
=== Expectations ===&lt;br /&gt;
{{See also|Expectations}}&lt;br /&gt;
Slaves do not have the default [[expectations]] of colonists. Instead they have unique expectations with a generally higher mood boost. Slave expectations replace colonist expectations based on what the pawn's expectations would be if they were a colonist based on colony wealth and noble status.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &amp;lt;!-- C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Data\Ideology\Defs\Misc\ExpectationDefs\Expectation.xml --&amp;gt;&lt;br /&gt;
! Expectation !! Mood Effect !! Replaces Colonist Expectation&lt;br /&gt;
|-&lt;br /&gt;
| Destitute slave expectations || {{+|46}} || Extremely low expectations&lt;br /&gt;
|-&lt;br /&gt;
| Poor slave expectations || {{+|40}} || Very low expectations&lt;br /&gt;
|-&lt;br /&gt;
| Meager slave expectations || {{+|34}} || Low expectations&lt;br /&gt;
|-&lt;br /&gt;
| Slave expectations || {{+|28}} || All other Expectations&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Relationships ===&lt;br /&gt;
* Slaves never insult or social fight with non-slave pawns. They are half as likely to social fight with each other.&lt;br /&gt;
* Slaves cannot share a [[double bed]] with non slaves colonists, even if they are married.&lt;br /&gt;
* Slaves can share [[bed]]rooms with colonists, however the colonists will receive {{--|3}} mood for doing so (unless they are in a relationship).&lt;br /&gt;
&lt;br /&gt;
Other colonists will see slavery as either an abhorrent or honorable act, depending on the Slavery [[precept]].&lt;br /&gt;
&lt;br /&gt;
== Slave rebellion ==&lt;br /&gt;
{{Stub|section=1|reason =Reports that pawns do not revolt on underground maps}}&lt;br /&gt;
Slaves will occasionally rebel, staging something similar to a prison break. Slaves will turn hostile and uncontrollable, and will try to find weapons to attack nearby colonists. The rebellion interval is based on mood, suppression, proximity of weapons, escape route, and the presence of colonists on the map, with a base interval of 45 days. The time displayed is based on time awake - that is, if a slave sleeps 8 hours of every 24, the actual mean time between rebellions will be 50% longer. A displayed {{MTB}} of 2 years will actually be a {{MTB}} of 3 years.&lt;br /&gt;
&lt;br /&gt;
Slave rebellions come in several different types: Grand, Local, and Single. A grand escape involves every valid slave on the map rebelling, while a local escape chooses a given slave as a locus with any valid slaves within 35 tiles also rebelling. A single rebellion is, as the name implies, a rebellion by a single slave.&lt;br /&gt;
&lt;br /&gt;
Only non-downed, non-mental breaking, awake, slaves can join a rebellion. Thus, by assigning slaves different shifts, the maximum number of slaves rebelling can be limited. &lt;br /&gt;
&lt;br /&gt;
Weapons such as [[Wood]], [[EMP grenades]]/[[EMP launcher|launchers]], and [[Smoke launcher]]s will not increase rebellion chance, despite being weapons. Rebellious slaves will take ranged weapons even if equipped with [[shield belt]]s, dropping the belts in the process.&lt;br /&gt;
&lt;br /&gt;
While in [[orbit]]{{OdysseyIcon}} slaves cannot rebel at all as they cannot leave the map under normal circumstances while in space.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| '''Mean Time Between Rebellions''' = 45/(Moving Factor * Suppression Factor * Slave Count Factor * Mood Factor * Room Edge Factor * Weapon Factor * Unattended Factor)&lt;br /&gt;
|}&lt;br /&gt;
Where:&lt;br /&gt;
* Moving Factor = A curve dependent on the current [[Moving]] capacity of the slave, defined by 3 points and linearly interpolated between them. 0.01x at 0% (though note that a pawn that cannot move is not valid for a rebellion anyway), 0.5x at 50% and 1x at 100%. This very closely approximates a straight scalar based on the Moving capacity, but is slightly different. Also note that this is Moving capacity, not [[move speed]], so slowing a pawn down with [[peg leg]]s will make rebellions less frequent, but slowing them down with a [[flak vest]] will not. &lt;br /&gt;
* Suppression Factor = A curve dependent on the current suppression value of the slave, defined by 4 points and linearly interpolated between them. 5x at 0%, 1.5x at 33.3%, 1x at 50%, 0.25x at 100%.&lt;br /&gt;
* Slave Count Factor = A curve dependent on the number of slaves loaded on a map, defined by 5 points and linearly interpolated between them. 1x at 1 slave, 0.75x at 2 slaves, 0.5x at 5 slaves, 0.3x at 10 slaves. 0.2x at 20 slaves. Note that despite making each slave individually less likely to rebel, having more slaves rolling for rebellions actually increases the chance. Also note that these slaves don't need to be valid slaves for a rebellion, they must simply be alive and on the map.&lt;br /&gt;
* Mood Factor = A curve dependent on the [[mood]] of the slave, defined by three points and linearly interpolated between them. 1.5x at 0% mood, 1x at 50% mood, 0.8x at 100% mood. &lt;br /&gt;
* Room Edge Factor = 1.7 when in a room that touches the map edge including being completely outdoors. 1 otherwise.&lt;br /&gt;
* Weapon Factor = 4 when within 7 tile range of a usable weapon, or if indoors (in a room not considered outdoors) in the same room as a usable weapon. 1 otherwise. [[Body part weapons]] do not count for the purposes of this check.&lt;br /&gt;
* Unattended Factor = 20 when on a map without a colonist that is not downed, dead or a slave. 1 otherwise.&lt;br /&gt;
&lt;br /&gt;
== Wardening ==&lt;br /&gt;
Like [[prisoner]]s, slaves can be interacted with by colonists with the Warden task.&lt;br /&gt;
&lt;br /&gt;
* '''Suppress''' - Intimidate the slave, causing their suppression to rise up, which lowers the chance of rebellion.&lt;br /&gt;
* '''Imprison''' - Arrest the slave, turning them back into a [[prisoner]]. You will need to reduce their will again to enslave them again.&lt;br /&gt;
* '''Emancipate''' - Free the slave. If the slave belonged to another faction, you will gain [[goodwill]] with that faction.&lt;br /&gt;
* '''Execute''' - Kill the slave.&lt;br /&gt;
&lt;br /&gt;
== Suppression ==&lt;br /&gt;
{{Stub|section=1|reason=Children have different fall rates? }}&lt;br /&gt;
Suppression is one of the stats used to calculate the slave rebellion interval. The higher the suppression, the longer the expected interval in between rebellions. The suppression of a slave can be increased by interacting with them, melee attacking them with a colonist or executing other slaves or prisoners. Over time, the suppression level lowers depending on its current level by up to 20% per day. It will continue to tick down when the pawn is asleep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Suppression !! Suppression loss&amp;lt;br/&amp;gt;(per day)&lt;br /&gt;
|-&lt;br /&gt;
| 30% - 100% || {{--|20%}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;15% - &amp;lt;30% || {{--|10%}}&lt;br /&gt;
|-&lt;br /&gt;
| 0% - 15%   || {{--|5%}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The amount of suppression lost can be increased or decreased if the slave is wearing the following things:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Item !! Suppression loss offset&amp;lt;br/&amp;gt;(per day)&lt;br /&gt;
|- &lt;br /&gt;
| [[Slave collar]] || {{+|15%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Slave body strap]] || {{+|15%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Cowboy hat]] || {{--|5%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Bowler hat]] || {{--|5%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Tribal headdress]] || {{--|10%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Veil]] || {{--|10%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Marine helmet]] || {{--|10%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Duster]] || {{--|5%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Marine armor]] || {{--|30%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Prestige marine helmet]] {{RoyaltyIcon}} || {{--|10%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Prestige marine armor]] {{RoyaltyIcon}} || {{--|30%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Grenadier armor]] {{RoyaltyIcon}} || {{--|30%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Eltex shirt]] {{RoyaltyIcon}} || {{--|20%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Eltex vest]] {{RoyaltyIcon}} || {{--|20%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Eltex robe]] {{RoyaltyIcon}} || {{--|20%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Formal shirt]] {{RoyaltyIcon}} || {{--|10%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Corset]] {{RoyaltyIcon}} || {{--|10%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Formal vest]] {{RoyaltyIcon}} || {{--|10%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Prestige robe]] {{RoyaltyIcon}} || {{--|20%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Ladies hat]] {{RoyaltyIcon}} || {{--|5%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Top hat]] {{RoyaltyIcon}} || {{--|5%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Coronet]] {{RoyaltyIcon}} || {{--|20%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Crown]] {{RoyaltyIcon}} || {{--|30%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Stellic crown]] {{RoyaltyIcon}} || {{--|30%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Beret]] {{RoyaltyIcon}} || {{--|5%}}&lt;br /&gt;
|-&lt;br /&gt;
| [[Mechlord suit]]{{BiotechIcon}} || {{--|30%}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A suppression loss of less than 0% per day will not increase the suppression. Since the default loss is at a maximum of 20% per day, a slave collar combined with body straps is enough to keep up the suppression of a slave unless they are wearing apparel that increases suppression loss above 10%. Since a negative loss has no effect, increasing Terror while slaves wear slave collars and body straps is useless unless you also wish to outfit the slave with suppression-decreasing apparel, such as dusters in hot [[biomes]] or marine armor for combat slaves.&lt;br /&gt;
&lt;br /&gt;
=== Warden suppression ===&lt;br /&gt;
Each time a warden suppresses a slave, it increments their suppression by a value dependent on the [[Suppression Power]] of the warden and the current suppression of the slave.  &lt;br /&gt;
Namely:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''Suppression Change = Suppression Power * Suppression Curve Factor'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CurrentSuppressionFactorCurve&lt;br /&gt;
|-&lt;br /&gt;
| {{Graph:Chart|width=200|height=200|xAxisTitle=Current Suppression (%))|yAxisTitle=Suppression Multiplier|type=line|x=0, 50, 100 |y1= 2, 1, 0.5}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For example, a colonist with [[Skills#Social|Social]] skill of 10 has a Suppression Power of 28%. A slave with a current Suppression value of 0 has a suppression curve factor of 2x. Thus, that colonist suppressing that slave would result in the slave's suppression increasing by 56%. This also means that a skill 20 pawn will always fully supress a slave.&lt;br /&gt;
&lt;br /&gt;
Each suppression attempt takes {{ticks|180}} of work.&lt;br /&gt;
&lt;br /&gt;
[[Authority cap]]s improve the suppression power of the wearer. See that page for details.&lt;br /&gt;
&lt;br /&gt;
=== Melee suppression ===&lt;br /&gt;
{{Stub|section=1|reason=Exact equation depends on CurrentSuppressionFactorCurve - needs to be worked out and added}}&lt;br /&gt;
Any colonist can suppress a pawn by performing melee attacks against them. Each attack increases suppression at a rate dependent on the current suppression and the damage dealt, with more damage suppressing more&lt;br /&gt;
&lt;br /&gt;
=== Terror === &lt;br /&gt;
{{Stub|section=1|reason= A number of check tags, and even with them, theres mechanical detail missing. Terror mechanics are poorly documented and [[terror]], [[terror sculpture]], [[gibbet cage]], and [[skullspike]] all need detail.}}&lt;br /&gt;
{{Quote|''Terror is a way to keep slaves suppressed. It rises when the slave spends time near terrifying things like terror sculptures. A slave can only be affected by three terror sources at a time. While terror is high, suppression falls slower.''|Terror description}}&lt;br /&gt;
&lt;br /&gt;
Terror is stat of slaves that ranges from 0% to 100% and is raised by being in proximity to terror creating furniture. While slaves are affected by terror, the rate at which they lose suppression is reduced, depending on their current terror. &lt;br /&gt;
&lt;br /&gt;
The relationship between terror and reduction in suppression loss is as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=2 | Suppression Loss Rate Offset by Terror Percentage&lt;br /&gt;
|-&lt;br /&gt;
| {{Graph:Chart|width=200|height=200|xAxisTitle=Terror (%)|yAxisTitle=Suppression Loss Rate Offset (%) |type=line|x=0, 25, 50, 100|y1=0, 15, 25, 45}}&lt;br /&gt;
| The offset to suppression loss rate is linearly interpolated between the following points:&lt;br /&gt;
* {{+|15%}} at 25% terror&lt;br /&gt;
* {{+|25%}} at 50% terror&lt;br /&gt;
* {{+|45%}} at 100% terror&lt;br /&gt;
|}&lt;br /&gt;
For example, a pawn with a current suppression level of 80% would lose, by default, {{--|20%}} suppression per day. If they had 30% terror, this would result in an offset of {{+|18%}} to their suppression loss rate, resulting in a final loss rate of {{--|2%}}&lt;br /&gt;
&lt;br /&gt;
Note that pawns that are asleep do not experience terror but still have their suppression tick down. Also note the terror does not have &amp;quot;memory&amp;quot; or any gradual decline after leaving the radius of the sources - after a short period{{Check Tag|How long?|Reports of ~15 seconds?}} when the next check for terror sources is performed, the terror will instantly drop. &lt;br /&gt;
&lt;br /&gt;
Terror sources stack additively, up to three times structures.{{Check Tag|Which three?|Is it the best three or the most recently seen three?}} Sources of terror are as follows:&lt;br /&gt;
{| {{STDT|sortable text-center}}&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Source !! Strength !! Radius&lt;br /&gt;
|-&lt;br /&gt;
! {{Icon Small|Skullspike|24}}&lt;br /&gt;
! [[Skullspike]]&lt;br /&gt;
| {{+|25%}} &lt;br /&gt;
| ? Tiles{{Check Tag|Detail needed}}&lt;br /&gt;
|-&lt;br /&gt;
! {{Icon Small|Gibbet cage|24}}&lt;br /&gt;
! [[Gibbet cage]]&lt;br /&gt;
| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;'''0%'''/{{+|25%}}&amp;lt;br&amp;gt;&amp;lt;small&amp;gt;Empty&amp;lt;/small&amp;gt;/&amp;lt;small&amp;gt;Filled&amp;lt;/small&amp;gt;&lt;br /&gt;
| ? Tiles{{Check Tag|Detail needed}}&lt;br /&gt;
|-&lt;br /&gt;
! {{Icon Small|Terror sculpture|24}}&lt;br /&gt;
! [[Terror sculpture]]&lt;br /&gt;
| {{+|3%}}/{{+|6%}}/{{+|10%}}/{{+|15%}}/{{+|20%}}/{{+|30%}}/{{+|40%}}&lt;br /&gt;
| ? Tiles{{Check Tag|Detail needed}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Keep slaves in collars and straps. Barring that, build terrorizing furniture in the areas they spend the most time ''awake'' in, such as workshops and kitchens. Terror fixtures are of little use inside a slave's own room.&lt;br /&gt;
&lt;br /&gt;
Keep your weapons inside a room that slaves will rarely, if ever, approach; confining your slaves to a restrictive allowed [[Zone/Area#Allowed area|area]] helps, of course.&lt;br /&gt;
&lt;br /&gt;
Minimize or eliminate the time slaves have access to the map edge. Consider walling off the area that slaves live in, if your entire colony isn't walled off already (doors count as barriers for purposes of map edge access for slaves). If that isn't feasible, keep slaves near the center of your colony as much as possible, and build walls and doors blocking off the ends of alleyways (this also helps slow down raiders that get past your outer defenses or land inside your base outright). Again, confining slaves to an allowed area is critical.&lt;br /&gt;
&lt;br /&gt;
Consider keeping your slaves happy. This is much easier than it might seem, since slaves have a huge baseline mood boost compared to a typical colonist, and will never get upset about lack of recreation. Slaves also get mood bonuses from performing work they're [[Passion|passionate]] about; paradoxically, these bonuses can last longer because the slave need not take recreation breaks. Having them drink [[psychite tea]] every other day will not only boost their mood further but also slightly increase their productivity (though unfortunately the big increase to recreation is wasted). Because slaves return to their rooms by default when in need of medical care, consider making their floors [[steel tile]] for an admittedly expensive increase to both cleanliness and room beauty. Also consider sticking &amp;quot;hand-me-down&amp;quot; beautifying [[sculptures]] in their rooms instead of just selling the old art. On the other hand, [[ascetic]] slaves allow you to have a happy slave with the crummiest room possible. [[Masochist]] slaves will love having a mindscrew implant (though it will lower their sale price), and the pain will lower consciousness, reducing their movement potential and further discouraging rebellion. Or just punch them once in a while. They also like wearing the collar and straps that all slaves should wear anyway. Not only do happy slaves rebel a bit less often, joyful slaves can benefit from [[inspirations]] as other colonists do, making them even more useful as your property.&lt;br /&gt;
&lt;br /&gt;
If you have the [[Royalty]] DLC, consider giving slaves brain implants that cause [[brain shock]] so rebellions can be safely suppressed with no loss of life, even with armed and armored slaves, by using [[EMP]] weapons. Implants such as the [[circadian half-cycler]]{{RoyaltyIcon}} and the [[circadian assistant]]{{RoyaltyIcon}} also increase the total productivity of the slave, and the half-cycler reduces movement capacity by reducing consciousness; the downside is that these implants increase time awake, lowering the {{MTB}} for rebellions.&lt;br /&gt;
&lt;br /&gt;
If you have the [[Anomaly]] DLC, the Bliss Lobotomy procedure can be learned and performed to massively reduce the frequency of an individual slave's rebellion interval at the cost of no longer being able to perform skilled labor and reducing their learning speed. This makes it a very compelling option for slave whose primary role is Hauling, Cleaning, Animal Handling, and/or Doctoring. Lobotomized slaves are so compliant that even when armed their rebellion interval more closely matches that of a normal, unarmed slave. While not entirely without risk, this makes enslaved combatants a viable option especially if they are only armed when there is an active threat. It is important to note that while a lobotomized slave may almost never rebel themselves, other non-lobotomized slaves may start a group rebellion and cause lobotomized slaves to join regardless.&lt;br /&gt;
&lt;br /&gt;
=== Genes ===&lt;br /&gt;
{{Biotech|section=1}}&lt;br /&gt;
Genetically modifying slaves is overall essential for improving how efficient they are at work and countering their faults.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
Countering Rebellions&lt;br /&gt;
|-&lt;br /&gt;
! Gene !! Total Metabolic Efficiency !! Commentary&lt;br /&gt;
|-&lt;br /&gt;
| [[Extra pain]] || {{+|2}} || forces the wimp trait increasing pain shock threshold, this allows rebellions to be dealt with quicker and with less risk of killing the slave, mental breaks should they occur can be dealt with in the same way.&lt;br /&gt;
|-&lt;br /&gt;
| [[Weak melee damage]]&amp;lt;br&amp;gt;[[Nearsighted]] || {{+|1}}&amp;lt;br&amp;gt;{{+|2}} ||Should be added over [[violence disabled]] this is because pawns incapable of violence will still participate in rebellions and the gene overrides the two actually impactful genes for combat.&lt;br /&gt;
|-&lt;br /&gt;
| [[Genes#Aptitude|Awful shooting/melee&amp;lt;br&amp;gt;Poor shooting/melee]] || {{+|2}}&amp;lt;br&amp;gt;{{+|1}} || Lowers the skills that they will use for combat during rebellions in addition to being essentially free metabolic efficiency&lt;br /&gt;
|-&lt;br /&gt;
| [[Very happy]] || {{--|2}} || indirectly makes rebellions less frequent by improving their mood.&lt;br /&gt;
|-&lt;br /&gt;
| [[Superfast wound healing]]&amp;lt;br&amp;gt;[[Fast wound healing]] || {{--|3}}&amp;lt;br&amp;gt;{{--|2}} || Allows slaves to recover faster after being beaten during rebellions or mental breaks, damaging slaves in melee also raises their suppression far quicker then a warden doing it&lt;br /&gt;
|-&lt;br /&gt;
| [[Genes#Temperature|Heat/Cold super-tolerant&amp;lt;br&amp;gt;Heat/Cold tolerant]]&amp;lt;br&amp;gt;[[Furskin]]&amp;lt;br&amp;gt;[[Furry tail]] || {{--|2}}&amp;lt;br&amp;gt;{{--|1}}&amp;lt;br&amp;gt;{{--|1}}&amp;lt;br&amp;gt;{{--|1}} || Should be added if in hot or cold biomes this is because Slave body straps occupy the outer layer thus they cannot be equipped with parkas or dusters missing out on additional slave suppression offset.&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
Improving and countering their faults&lt;br /&gt;
|-&lt;br /&gt;
! Gene !! Total Metabolic Efficiency !! Commentary&lt;br /&gt;
|-&lt;br /&gt;
| [[Genes#Beauty|Very unattractive&amp;lt;br&amp;gt;Unattractive]] || {{+|2}}&amp;lt;br&amp;gt;{{+|1}} || While slaves cannot be ordered to romance other colonists, they will still do it on their own terms, these genes while being free also reduce the chance of undesirable relationships from forming, thus negating the sleeping alone and &amp;quot;My &amp;lt;relationship&amp;gt; died&amp;quot; moodlets slaves cannot share beds with colonists and cannot do loving either.&lt;br /&gt;
|-&lt;br /&gt;
| [[Genes#Aptitude|Awful intellect/artistic&amp;lt;br&amp;gt;Poor intellect/artistic]] || {{+|2}}&amp;lt;br&amp;gt;{{+|1}} || These skills cannot be used so free metabolic efficiency&lt;br /&gt;
|-&lt;br /&gt;
| [[Genes#Sleep|No sleep&amp;lt;br&amp;gt;Low sleep]] || {{--|6}}&amp;lt;br&amp;gt;{{--|4}} || can be installed to increase how long slaves are awake for and thus working combined with the lack of recreation need, Makes rebellions larger due to more slaves being awake at the same time.&lt;br /&gt;
|-&lt;br /&gt;
| [[Smooth tail]]&amp;lt;br&amp;gt;[[Elongated fingers]] || {{--|1}}&amp;lt;br&amp;gt;{{--|1}} || improves manipulation offsetting the lowered work speed.&lt;br /&gt;
|-&lt;br /&gt;
| [[Genes#Aptitude|Great aptitude&amp;lt;br&amp;gt;Good aptitude]] || {{--|3}}&amp;lt;br&amp;gt;{{--|1}} || Overall depends on what you want the slave to be specialized towards, Crafting can be installed to allow the slave to craft components far sooner, while Mining can allow them to work faster at drills or clearing areas for building, these can turn what is otherwise a garbage pawn into one specialized for certain petty tasks far quicker.&lt;br /&gt;
|}&lt;br /&gt;
=== Titles ===&lt;br /&gt;
{{Royalty|No category}}&lt;br /&gt;
{{Main|Titles}}&lt;br /&gt;
Slaves can be given honor and ascend the ranks of royalty just as every other pawn can. They function much the same as other nobles, requiring specific clothes, certain standards of bedroom and throne room, etc. with two major exceptions. First is they cannot use permits. Second is that slavery overrides the work type restrictions from conceited nobility.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* Between 1.2.2723 and [[Version/1.3.3087|1.3.3087]] - Slave sold penalty reduced from -5 to -3.&lt;br /&gt;
* [[Version/1.3.3072|1.3.3072]] - Tune slave rebellion chances a bit lower, and reduce the effects of some factors. Slave weapon noticing distance reduced from 10 to 6.9. Couples made of a slave/colonist pair no longer want to sleep together despite not being able to share a bed.&lt;br /&gt;
* [[Version/1.3.3074|1.3.3074]] - Slaves no longer slight or insult non-slaves, Slaves never start social fights with non-slaves if insulted, Meleeing a slave now increases suppression, Rebellion chance per slave now relates inversely to the number of slaves on the map, so overall rebellion chance shouldn't climb so aggressively with higher slave counts, Adjust slave rebellion base {{MTB}} 50 days back to 45 days. Ideoligion funerals are no longer expected for slaves. Slaves no longer count for Diversity of Thought. More selective in which weapons increase rebellion chance - now excludes Wood, EMP, Smoke etc.&lt;br /&gt;
* [[Version/1.3.3076|1.3.3076]] - Added Alert for likely slave rebellion.&lt;br /&gt;
* [[Version/1.3.3087|1.3.3080]] - Rebelling slaves now drop shield belt if they have a ranged weapon&lt;br /&gt;
* [[Version/1.3.3087|1.3.3087]] - Lower slave social fight chance by 50%.  Killing a slave in a slave rebellion no longer causes 'Witnessed ally's death' thought.&lt;br /&gt;
* [[Version/1.3.3117|1.3.3117]] - Fix: Wardens stop suppressing slaves if suppression &amp;gt; 50%. Fix: Selling prisoners doesn't trigger negative thoughts on selling to slavers.&lt;br /&gt;
* [[Version/1.3.3200|1.3.3200]] - Slaves are now worth 75% of colonists in terms of map wealth and population.&lt;br /&gt;
* [[Version/1.4.3541|1.4.3541]] - Fix: Emancipated slaves that are drafted stay drafted.&lt;br /&gt;
* [[Version/1.4.3555|1.4.3555]] - Fix: Enslaving a pawn removes unwaveringly loyal.&lt;br /&gt;
* [[Version/1.4.3682|1.4.3682]] - Fix: Slaves freed on exiting map.&lt;br /&gt;
&lt;br /&gt;
[[Category:Game mechanics]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=175595</id>
		<title>Modding Tutorials</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=175595"/>
		<updated>2026-02-20T21:07:46Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* C# Guides */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Mods_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the hub page for tutorials, guides, and reference materials for creating mods for RimWorld. If you are looking for instructions on how to use RimWorld, please check out the general [[Modding]] hub.&lt;br /&gt;
&lt;br /&gt;
As RimWorld does not have a formal modding API, nearly all of the information here has been gathered and maintained by the modding community.&lt;br /&gt;
&lt;br /&gt;
'''NEW: [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]]''' - A work-in-progress list of changes datamined by the modding community in the current unstable version of RimWorld 1.6. '''THERE MAY BE ODYSSEY DLC SPOILERS, YOU HAVE BEEN WARNED.'''&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
==About RimWorld==&lt;br /&gt;
RimWorld is a multi-platform game written on Unity 2022.3.35. However, the Unity Editor is not used for creating mods unless you are creating new shaders or building optional asset bundles.&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Recommended_software|Recommended Software]] - Editors and other useful software for mod development&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]] - Explore the basic folder structure of a mod&lt;br /&gt;
** [[Modding_Tutorials/About.xml|About.xml]] - About.xml identifies and describes your mod to RimWorld so that it can be loaded properly&lt;br /&gt;
&lt;br /&gt;
===Game Systems Guides===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Defs|Defs]] - XML Definitions are used to define and configure content in a way that does not require compiling code&lt;br /&gt;
** [[Modding_Tutorials/MayRequire|MayRequire]] - MayRequire and MayRequireAnyOf are used to conditionally load Defs and list entries based on whether a DLC or other mod is loaded&lt;br /&gt;
* [[Modding_Tutorials/Localization|Localization]] - Define text strings used for translations and word lists used in name and text generation&lt;br /&gt;
* [[Modding_Tutorials/PatchOperations|PatchOperations]] - PatchOperations are used to modify XML Defs without overwriting them completely&lt;br /&gt;
* [[Modding_Tutorials/Sounds|Sounds]] - (Needs Rewriting) Adding sound files for mods&lt;br /&gt;
* [[Modding_Tutorials/Textures|Textures]] - How to create and add textures to mods&lt;br /&gt;
* [[Modding Tutorials/Plant Rendering|Plant Rendering]] - An explanation of how plant textures are rendered&lt;br /&gt;
* [[Modding_Tutorials/Research_Projects|Research Projects]] - How to create and use research projects.&lt;br /&gt;
&lt;br /&gt;
===XML Tutorials===&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step tutorials for creating basic content mods.&lt;br /&gt;
&lt;br /&gt;
Basic Tutorials:&lt;br /&gt;
* [[Modding_Tutorials/Basic_Melee_Weapon|Basic Melee Weapon]] - How to create a basic melee weapon with a texture mask&lt;br /&gt;
* [[Modding_Tutorials/Basic_Ranged_Weapon|Basic Ranged Weapon]] - How to create a basic ranged weapon with custom sound effects&lt;br /&gt;
* [[Modding_Tutorials/Basic_Plant|Basic Plant]] - How to create a custom plant with both a cultivated and wild variant&lt;br /&gt;
* Custom Animal (Upcoming)&lt;br /&gt;
* Simple Building (Upcoming)&lt;br /&gt;
* Custom Workbench (Upcoming)&lt;br /&gt;
* Custom Drug (Upcoming)&lt;br /&gt;
&lt;br /&gt;
Advanced Tutorials:&lt;br /&gt;
* Custom Faction (Upcoming)&lt;br /&gt;
* Custom Culture (Upcoming)&lt;br /&gt;
* Custom Trader Type (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===C# Guides===&lt;br /&gt;
&lt;br /&gt;
C# is used to create and define custom game behaviors &lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Decompiling source code|Decompiling Source Code]] - How to set up and use a decompiler to read vanilla game code&lt;br /&gt;
* [[Modding_Tutorials/Setting up a solution|Setting up a Solution]] - How to set up a solution for compiling a custom mod assembly&lt;br /&gt;
* [[Modding_Tutorials/Application_Startup|Application Startup]] - Describes the application startup process and the order in which game data is loaded&lt;br /&gt;
* Custom Consumable (Upcoming)&lt;br /&gt;
* Custom Overlays (Upcoming)&lt;br /&gt;
* [[Modding_Tutorials/Code_FloatMenuOptionProvider|FloatMenuOptionProvider]] - How to use &amp;lt;code&amp;gt;FloatMenuOptionProvider&amp;lt;/code&amp;gt; to add right click context menu options to arbitrary targets.&lt;br /&gt;
* [[Modding_Tutorials/Code_MendingJob|Example Mending Job]] - How to use a &amp;lt;code&amp;gt;FloatMenuOptionProvider&amp;lt;/code&amp;gt; in conjunction with a &amp;lt;code&amp;gt;JobDef&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;JobDriver&amp;lt;/code&amp;gt; in order to create a simple mending function for weapons and apparel.&lt;br /&gt;
&lt;br /&gt;
===Updates and Migrations===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.5_Mod_Updates|RimWorld 1.5 Mod Updates]] - (WARNING: Anomaly Spoilers) Community notes for updating mods from 1.4 to 1.5.&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]] - (WARNING: Odyssey Spoilers) Community notes for updating mods from 1.5 to 1.6.&lt;br /&gt;
&lt;br /&gt;
===Testing and Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Testing mods|Testing Mods]] - Tips and tricks for testing mod content&lt;br /&gt;
&lt;br /&gt;
===Slightly Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Plague_Gun|Plague Gun]] - This tutorial was created for RimWorld 1.0 but updated for 1.4. While the exact content is obsolete as you can now accomplish the same result with purely vanilla XML, it is still useful as a crash course for end-to-end mod creation and is here until newer tutorials can replace it.&lt;br /&gt;
&lt;br /&gt;
===Uploading to Steam Workshop===&lt;br /&gt;
* You can upload your mod to Steam Workshop by enabling Development Mode from your game Options and then using the Upload option under the Advanced button in the vanilla mod manager.&lt;br /&gt;
* Note that in order to upload to Steam Workshop, you must own the game on Steam Workshop. Owning RimWorld on GOG or Epic will not work.&lt;br /&gt;
* Your Preview.png should be a 640x360 or 1280x720 PNG and '''must''' be under 1MB. If it is too large, then your upload will be rejected with &amp;lt;code&amp;gt;Error : Limit Exceeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you get a &amp;lt;code&amp;gt;OnItemSubmitted Fail&amp;lt;/code&amp;gt; error, make sure you close any programs that are targeting items in your mods folder. This can also mean that Steam Workshop is having some technical issues at the moment. If it keeps occurring, then the only thing to do is to wait a few hours for it to clear up.&lt;br /&gt;
* Steam mod descriptions don't use markdown, they use a variant of BBCode. Please check out the [https://steamcommunity.com/comment/Guide/formattinghelp Steam text formatting guide].&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All of the above tutorials have been cleaned up and reviewed by the #mod-development team on the [https://discord.gg/rimworld RimWorld Discord] in cooperation with RimWorld Wiki staff editors. Please let us know before creating, adding, or making any major edits to the vetted tutorials and guides section!&lt;br /&gt;
&lt;br /&gt;
==Outdated / Under Review==&lt;br /&gt;
&lt;br /&gt;
The following tutorials are either out of date or in need of a rewrite. The information in them might be useful but may not be up to standard; please be aware of any potential inaccuracies until they can be addressed.&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/First Steps|First Steps and Some Links]]&lt;br /&gt;
* [[Modding Tutorials/Essence| Essence of Modding]]&lt;br /&gt;
* [[Modding Troubleshooting Tips and Guides]]&lt;br /&gt;
* [[Modding Tutorials/Sounds|Adding and Testing Sounds]]&lt;br /&gt;
* [[Modding Tutorials/Assets|Decompiling Texture/Sound Assets]]&lt;br /&gt;
* [[Modding Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
* [[Modding_Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding_Tutorials/Modifying defs|Modifying Defs]]&lt;br /&gt;
* [[Modding_Tutorials/Troubleshooting|Troubleshooting mods]]&lt;br /&gt;
* [[Modding Tutorials/Rituals]]&lt;br /&gt;
&lt;br /&gt;
===XML tutorials===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/XML file structure|XML File Structure]]&lt;br /&gt;
* [[Modding Tutorials/XML Defs|Introduction to XML Defs]]&lt;br /&gt;
** [[Modding Tutorials/Compatibility with defs|XML Def Compatibility]]&lt;br /&gt;
** [[Modding Tutorials/ThingDef|ThingDef explained]]&lt;br /&gt;
** [[Modding Tutorials/Weapons Guns|Weapons_Guns.xml explained]]. Slightly dated.&lt;br /&gt;
&lt;br /&gt;
===C# tutorials===&lt;br /&gt;
* [[Modding_Tutorials/Hello World|Hello World]]&lt;br /&gt;
* [[Modding_Tutorials/Writing custom code|Writing Custom Code]]&lt;br /&gt;
* [[Modding Tutorials/Linking XML and C#|Linking XML and C#]]&lt;br /&gt;
* [[Modding_Tutorials/Harmony|Alter Code at Runtime with Harmony]] - this is a best practice for modifying game code, replacing C# code injection to reduce Mod Conflicts&lt;br /&gt;
* [[Modding_Tutorials/Modifying classes|Adding fields and methods to classes]]&lt;br /&gt;
* [[Modding Tutorials/ModSettings|Mod settings]] - Add settings to your mod&lt;br /&gt;
* [[Modding Tutorials/DefModExtension|Def mod extensions]] - Add (custom) fields to Defs&lt;br /&gt;
* [[Modding Tutorials/Custom Comp Classes|Custom Comp Classes]] - A quick overview of what types of Comps there are, and what they're suited for.&lt;br /&gt;
* [[Modding_Tutorials/ThingComp|ThingComp]] - Learn all there is to know about ThingComps.&lt;br /&gt;
* [[Modding Tutorials/GameComponent|Components]] - GameComponents, WorldComponents, and MapComponents&lt;br /&gt;
* [[Modding_Tutorials/Def classes|Introduction to Def Classes]]&lt;br /&gt;
* [[Modding_Tutorials/Compatibility_with_DLLs|Using Harmony to optionally patch other mods for the sake of compatibility]]&lt;br /&gt;
* [[Modding Tutorials/TweakValue|TweakValues]] - Change values on the fly (handy for quick iteration!)&lt;br /&gt;
* [[Modding Tutorials/ExposeData|ExposeData]] - Save stuff&lt;br /&gt;
* [[Modding Tutorials/BigAssListOfUsefulClasses|The big ass list of useful classes]] - A non-exhaustive list of classes you'll use most&lt;br /&gt;
* [[Modding Tutorials/GrammarResolver|Grammar Resolver]] - PAWN_objective, PAWN_possessive? Find out what it all means here.&lt;br /&gt;
* [https://github.com/Mehni/ExampleJob/wiki ExampleJob] - Mehni's top to bottom breakdown of Jobs.&lt;br /&gt;
* [[Modding_Tutorials/ConfigErrors|Config Errors]] - Provide configuration issues to the user on startup.&lt;br /&gt;
* [[Modding Tutorials/DebugActions|Debug Actions]] - Call methods from the debug menu&lt;br /&gt;
* [https://www.arp242.net/rimworld-mod-linux.html Getting started with RimWorld modding on Linux]&lt;br /&gt;
&lt;br /&gt;
===Art Tutorials===&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/artstyle Artstyle] - Officially unofficial guide to RimWorld's Artstyle&lt;br /&gt;
* Ekksu's animal texture guides: [https://imgur.com/a/how-to-make-rimworld-sprites-its-basically-x-with-y-edition-wS3Pt 1] [https://imgur.com/a/how-to-make-rimworld-sprites-theres-nothing-that-looks-like-this-animal-edition-xdDzg 2]&lt;br /&gt;
* [https://steamcommunity.com/sharedfiles/filedetails/?id=1114369188 ChickenPlucker's guide to creating apparel]&lt;br /&gt;
* [https://github.com/seraphile/rimshare/wiki/Colouring-in-Images Seraphile's guide to masks]&lt;br /&gt;
&lt;br /&gt;
===Under Construction===&lt;br /&gt;
&lt;br /&gt;
These are currently unfinished and need to be cleaned up or removed&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Quests]]&lt;br /&gt;
* [[Modding Tutorials/Troubleshooting/Finding Exceptions]]&lt;br /&gt;
&lt;br /&gt;
===Dangerously Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[RimWorld 1.3: XML Mod Creation]]&lt;br /&gt;
* [[Modding Tutorials/Assembly Modding Example|Assembly Modding]]&lt;br /&gt;
* [[Modding Tutorials/Xenotype template]] originally by Ryflamer&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Smelter]]&lt;br /&gt;
* [[Modding Tutorials/Items]]&lt;br /&gt;
* [[Modding Tutorials/Furniture]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [https://github.com/roxxploxx/RimWorldModGuide/wiki Roxxploxx's set of modding tutorials]&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/ RimWorld Modding Resources - A hub for guides, modders, practical tips]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Raider&amp;diff=175448</id>
		<title>Raider</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Raider&amp;diff=175448"/>
		<updated>2026-02-17T16:50:04Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Clarifying that only HE or incendiary shells can be received as resupply. The game code explicitly only includes shells that directly harm health and explicitly omits antigrain shells. See LordToil_Siege to verify.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Characters_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;!-- End of Nav --&amp;gt;&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
{{About|NPC enemies|the ideological meme|Ideoligion#Raider{{!}}Raider}}&lt;br /&gt;
{{imagemargin|[[File:raiders_layout_preview.png|124px|right]]|41px}}&amp;lt;/div&amp;gt;'''Raiders''' are essentially the main antagonists of ''RimWorld''. They are predatory enemies who appear in events called &amp;quot;Raids&amp;quot; and are sent by the storyteller or by player accepted quests. The group size and strength of a raiding party is determined by 'points', which will be explained in-depth further down this article.&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
{{TOCright}}&lt;br /&gt;
Raiders have several [[#Raiders' strategies|strategies]] when a raid event is spawned. Human raiders continue to attack until one of several conditions are met. Mechanoid raiders continue to attack indefinitely. Raiders who survive may return to attack again in future raids or ambushes. This includes prisoners abandoned from caravans who are in restraint, making them unable to attack properly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;250px&amp;quot; heights=&amp;quot;250px&amp;quot; class=&amp;quot;center&amp;quot; mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Ransom.png|'''Ransom'''&lt;br /&gt;
File:Raiders Mod debuff tired and hungry.png|'''Raider's negative thoughts'''&lt;br /&gt;
File:Pirates have given up and area leaving.png|'''Pirates have given up and are leaving'''&lt;br /&gt;
Prisoner return as raider.png|'''Abandoned prisoner returns to ambush a caravan.'''&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Equipment ==&lt;br /&gt;
{{Rewrite|section=1|reason=1) Convert linked spreadsheet to wiki, and update as is many versions out of date. 2) Addiction drug carrying mechanics}}&lt;br /&gt;
[https://docs.google.com/spreadsheets/d/1pEhmCnRiBKAh5C7X6kHPSE7QKTeTRjspB-sHR2-B_os/edit?usp=sharing This Google Sheets spreadsheet] shows the spawn rates of weapons and apparel across all raider kinds. Valid as of 1.0.2057. Figures are taken from a modified version of the 'Pawn Kind Gear Sampled' dev tool with a sample size of 10,000 rather than 400.&lt;br /&gt;
&lt;br /&gt;
=== Weapons ===&lt;br /&gt;
Raiders have limited equipment possibilities; dependent on their weapon and apparel budgets, and what equipment 'tags' they are allowed to equip. Usually on [[Cassandra Classic]] and [[Phoebe Chillax]] they come equipped early on with mostly [[autopistol]]s and crude melee weapons, some [[bolt-action rifle]]s and [[pump shotgun]]s later down the line. In the late game they can come equipped with things such as [[frag grenades]], [[sniper rifle]]s, [[incendiary launcher]]s and [[machine pistol]]s. Rarely some will have [[assault rifle]]s or [[LMG]]s. &lt;br /&gt;
&lt;br /&gt;
A raiding party may include members equipped with melee weapons and [[shield belt]]s. When a raiding party includes grenade throwers, the AI is intelligent enough to run way from grenades thrown by their own faction (though this does not apply to other explosives). Raiders wielding rocket launchers will attempt to avoid friendly fire.&lt;br /&gt;
&lt;br /&gt;
Counterintuitively, they can and will quite often spawn with melee weapons that result in them having a lower DPS than unarmed combat. &lt;br /&gt;
&lt;br /&gt;
Also, raiders do not always use weapons appropriate to their skills, as the weapons are randomly chosen. They are often seen equipped with ranged weapons when they are better at melee (completely disregarding the [[Trait#Brawler|Brawler]] trait), and vice versa.&lt;br /&gt;
&lt;br /&gt;
=== Armor ===&lt;br /&gt;
They come in different clothing depending on their type and the outside conditions. If it's cold at your colony, they will come wearing [[parka]]s and [[tuque]]s, but they don't usually wear [[duster]]s and [[cowboy hat]]s in the heat.&lt;br /&gt;
&lt;br /&gt;
=== Loot === &lt;br /&gt;
{{stub|section=1|reason=Is there always loot?}}&lt;br /&gt;
Raiders can spawn carrying additional items unrelated to their pawnkind and their combat role. These function as an additional reward for defeating the raid. These items spawn inside the inventories of some raiders and are dropped on their being [[downed]]. The type of loot depends on the faction the raider is from. Note that while drugs and resources do spawn as part of this loot, it is in addition to that spawned for addictions and siege construction.&lt;br /&gt;
&lt;br /&gt;
The total [[market value]] of the loot is proportional to the [[raid points]] of the raid it spawns in. The loot may spawn on one raider or it may be distributed across several individuals. Note that the value does not increase after 4000 raid points.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Loot market value by Raid points&lt;br /&gt;
|-&lt;br /&gt;
|{{Graph:Chart|width = 400&lt;br /&gt;
|height = 200&lt;br /&gt;
|type = line&lt;br /&gt;
|xAxisTitle = Raid Points&lt;br /&gt;
|xAxisMin = &lt;br /&gt;
|xAxisMax = &lt;br /&gt;
|yAxisMin = &lt;br /&gt;
|yAxisMax = &lt;br /&gt;
|yAxisTitle = Value (Silver)&lt;br /&gt;
|legend = Legend&lt;br /&gt;
|x = 35, 100, 1000, 2000, 4000, 5000&lt;br /&gt;
|y1 = 8, 60, 250, 400, 500, 500&lt;br /&gt;
|y1Title = Mechanoids&lt;br /&gt;
|y2 = 15, 120, 500, 800, 1000, 1000&lt;br /&gt;
|y2Title = All Other Factions&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The items that compose the loot vary and are themed to the faction performing the raid. The options are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! [[Mechanoid Hive]] !! [[Outlanders]] !! [[Tribals]] !! [[Pirates]] !! [[Empire]]{{RoyaltyIcon}} !! [[Traders guild]]{{OdysseyIcon}}&lt;br /&gt;
|-&lt;br /&gt;
| {{Icon List|Plasteel}}&lt;br /&gt;
{{Icon List|Component }}&lt;br /&gt;
| {{Icon List|Silver}}&lt;br /&gt;
{{Icon List|Medicine}}&lt;br /&gt;
{{Icon List|Component}}&lt;br /&gt;
{{Icon List|Packaged survival meal}}&lt;br /&gt;
{{Icon List|Neutroamine }}&lt;br /&gt;
| {{Icon List|Silver}}&lt;br /&gt;
{{Icon List|Jade}}&lt;br /&gt;
{{Icon List|Herbal medicine}}&lt;br /&gt;
{{Icon List|Pemmican}}&lt;br /&gt;
|{{Icon List|Silver}}&lt;br /&gt;
{{Icon List|Medicine}}&lt;br /&gt;
{{Icon List|Packaged survival meal}}&lt;br /&gt;
{{Icon List|Flake}}&lt;br /&gt;
{{Icon List|Yayo}}&lt;br /&gt;
{{Icon List|Go juice}}&lt;br /&gt;
{{Icon List|Wake up}}&lt;br /&gt;
{{Icon List|Smokeleaf}}&lt;br /&gt;
{{Icon List|Luciferium}}&lt;br /&gt;
| {{Icon List|Gold}}&lt;br /&gt;
{{Icon List|Glitterworld medicine}}&lt;br /&gt;
{{Icon List|Uranium}}&lt;br /&gt;
{{Icon List|Packaged survival meal}}&lt;br /&gt;
| {{Icon List|Silver}}&lt;br /&gt;
{{Icon List|Medicine}}&lt;br /&gt;
{{Icon List|Component}}&lt;br /&gt;
{{Icon List|Packaged survival meal}}&lt;br /&gt;
{{Icon List|Neutroamine}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Salvagers]]{{OdysseyIcon}} share the same loot table as [[Traders guild]], despite being referenced as pirates in-game.&lt;br /&gt;
&lt;br /&gt;
== Human ==&lt;br /&gt;
There are multiple types of raiders in RimWorld, each with their own sets of equipment and budgets which the game uses to 'buy' their equipment. Similarly, the game 'buys' raiders by deducting the raiders' Combat Power rating from the amount of raid points.&lt;br /&gt;
&lt;br /&gt;
Raider types are exclusive to their faction - mercenaries being exempt.&lt;br /&gt;
&lt;br /&gt;
This note is temporary and needs to be processed normally.&lt;br /&gt;
As a result of experiments, it was found out how many raid points some entities generate&lt;br /&gt;
Devouver-250&lt;br /&gt;
Himera- 135&lt;br /&gt;
Gorehulk- 75&lt;br /&gt;
Shambler- 50&lt;br /&gt;
Fleshbeasts sinkhole- 800&lt;br /&gt;
Sightstealer- 140&lt;br /&gt;
&lt;br /&gt;
=== Tribals ===&lt;br /&gt;
{{main|Tribes}}&lt;br /&gt;
Tribal fighters, weak but expendable. They never carry [[silver]] or [[medicine]]. They carry [[pemmican]] as food.&lt;br /&gt;
{{:Tribes/Pawns}}&lt;br /&gt;
&lt;br /&gt;
=== Pirates ===&lt;br /&gt;
{{main|Pirates}}&lt;br /&gt;
These units are encountered most frequently in the early game, but you'll see these units throughout the game. All easily dispatched once you get armor and high-grade weapons.&lt;br /&gt;
{{:Pirates/Pawns}}&lt;br /&gt;
&lt;br /&gt;
=== Outlanders ===&lt;br /&gt;
{{main|Outlanders}}&lt;br /&gt;
As friendly units, they show up in caravans or friendly reinforcements. Rough outlander unions will also send these to attack your colony in the early game.&lt;br /&gt;
{{:Outlanders/Pawns}}&lt;br /&gt;
&lt;br /&gt;
=== Mercenaries ===&lt;br /&gt;
Elite units typically encountered from mid-game onwards. Joins the Outlanders or Pirates in their ranks.&lt;br /&gt;
{{:Mercenaries/Pawns}}&lt;br /&gt;
&lt;br /&gt;
=== Spacer ===&lt;br /&gt;
{{main|Ancients}}&lt;br /&gt;
These people don't appear in normal raids but are found in [[ancient shrine]]s. This variety is always hostile to the player's faction.&lt;br /&gt;
{{:Ancients/Pawns}}&lt;br /&gt;
&lt;br /&gt;
=== Empire ===&lt;br /&gt;
{{Royalty|section=1|No Category}}&lt;br /&gt;
{{Main|Empire}}&lt;br /&gt;
{{:Empire/Pawns}}&lt;br /&gt;
&lt;br /&gt;
=== Cultist ===&lt;br /&gt;
{{Anomaly|section=1|No Category}}&lt;br /&gt;
&lt;br /&gt;
A spooky siege raid, will summon [[fleshbeasts]] if you don't take them out quickly. About half of the enemies would need to be executed twice due to [[Death refusal]], so do not leave the fight early. Mortars and mechanoid seem effective.&lt;br /&gt;
&lt;br /&gt;
The unit types are highthrall (equipped with [[Nerve spiker]]s), underthrall gunner (equipped with heavier guns) and underthrall grunt (Equipped with melee weapons).&lt;br /&gt;
&lt;br /&gt;
{{:Horax cult/Pawns}}&lt;br /&gt;
&lt;br /&gt;
== Mechanoid ==&lt;br /&gt;
{{main|Mechanoid}}&lt;br /&gt;
&lt;br /&gt;
Mechanical enemies that neither feel pain nor seek cover.&lt;br /&gt;
&lt;br /&gt;
{| {{STDT| c_01 text-center}}&lt;br /&gt;
! Pawn Type !! Image !! Combat Power !! Gear Health (%) !! Avg. Gear Quality !! Clothing Budget !! Weapon Budget !! Available Weapons !! Age Range !! Additional Info&lt;br /&gt;
|-&lt;br /&gt;
! [[Scyther]]&lt;br /&gt;
|[[{{Q|Scyther|Image}}|50px]] || 150 || 100 || - || - || - || '''Melee (Blades)''' || Any || - &amp;lt;!--Before adding anything to these sections, see its purpose on other faction pages. They are not for general analysis--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! [[Lancer]]&lt;br /&gt;
|[[{{Q|Lancer|Image}}|50px]] || 180 || 100 || Normal || - || 9999 || '''[[Charge lance]]''' || Any || - &lt;br /&gt;
|-&lt;br /&gt;
! [[Centipede]]&lt;br /&gt;
|[[{{Q|Centipede|Image}}|50px]] || 400 || 100 || Normal || - || 9999 || '''[[Heavy charge blaster]]''', '''[[Inferno cannon]]''', '''[[Minigun]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[Pikeman]]&lt;br /&gt;
|[[{{Q|Pikeman|Image}}|50px]] || 110 || 100 || Normal || - || 9999 || '''[[Needle gun]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[Termite]]&lt;br /&gt;
|[[{{Q|Termite|Image}}|50px]] || 110 || 100 || Normal || - || 9999 || '''[[Thump cannon]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[Militor]]&lt;br /&gt;
|[[{{Q|Militor|Image}}|50px]] || 45  || 100 || Normal || - || 9999 || '''[[Mini-shotgun]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[Legionary]]&lt;br /&gt;
|[[{{Q|Legionary|Image}}|50px]] || 150 || 100 || Normal || - || 9999 || '''[[Needle gun]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[Tesseron]]&lt;br /&gt;
|[[{{Q|Tesseron|Image}}|50px]] || 150 || 100 || Normal || - || 9999 || '''[[Beam graser]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[Scorcher]]&lt;br /&gt;
|[[{{Q|Scorcher|Image}}|50px]] || 110 || 100 || Normal || - || 9999 || '''[[Mini-flameblaster]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[Tunneler (Mechanoid)|Tunneler]]&lt;br /&gt;
|[[{{Q|Tunneler|Image}}|50px]] || 400 || 100 || Normal || - || 9999 || '''Melee (Power claws)''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[Centurion]]&lt;br /&gt;
|[[{{Q|Centurion|Image}}|50px]] || 250 || 100 || Normal || - || 9999 || '''[[Charge blaster turret]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[Diabolus]]&lt;br /&gt;
|[[{{Q|Diabolus|Image}}|50px]] || 600 || 100 || Normal || - || 9999 || '''[[Hellsphere cannon]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[War queen]]&lt;br /&gt;
|[[{{Q|War queen|Image}}|50px]] || 600 || 100 || Normal || - || 9999 || '''[[Charge blaster turret]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[Apocriton]]&lt;br /&gt;
|[[{{Q|Apocriton|Image}}|50px]] || 600 || 100 || Normal || - || 9999 || '''[[Toxic needle gun]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
! [[War urchin]]&lt;br /&gt;
|[[{{Q|War urchin|Image}}|50px]] || 75 || 100 || Normal || - || 9999 || '''[[Spiner]]''' || Any || -&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mechanoid cluster ===&lt;br /&gt;
{{main|Mechanoid cluster}}&lt;br /&gt;
&lt;br /&gt;
Added in Royalty was the &amp;quot;Mechanoid Cluster&amp;quot; event, which may be associated with quests or drop on their own. During this event, a fleet of drop pods will land and deploy mechanoids, walls, turrets, and assorted buildings. These mechanoids will initially be dormant. They are eventually awakened by either the player attacking, a Proximity activator being tripped, or a Count-down activator finishing its count down.&lt;br /&gt;
&lt;br /&gt;
== Raiders' strategies ==&lt;br /&gt;
The message from the event will detail how the raiders from the hostile faction will raid.&lt;br /&gt;
&lt;br /&gt;
=== General Mechanics ===&lt;br /&gt;
&lt;br /&gt;
=== Raider Targeting ===&lt;br /&gt;
&lt;br /&gt;
Standard raiders, including humans and mechanoids, attack targets based on a rough priority system with some random elements. Raiders who are able to path towards a colonist or powered turret will attempt to attack such a colonist or pathable furniture. Raiders who are only able to path towards furniture may attack that furniture or may instead attack random walls and doors. The chance raiders attack the furniture rather than random walls and doors has some random elements to it. Raiders who cannot path towards any colonist nor any furniture targets will attack random walls and doors.&lt;br /&gt;
&lt;br /&gt;
Pathable means that the raider can move to the same cell as the target. &amp;quot;Furniture&amp;quot; targets include objects like stools, tables, chairs, and even things like Wind Turbines, Geothermal Generators, Unpowered Turrets, and production benches. &lt;br /&gt;
&lt;br /&gt;
Raider targeting can change based on nearby targets, if their target is destroyed or becomes non-pathable, or if they take damage.&lt;br /&gt;
&lt;br /&gt;
Raider targeting can also be overridden by nearby targets of opportunity. Raiders may light wooden walls or crops on fire, for example.  &lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Victory&amp;quot; Conditions ===&lt;br /&gt;
&lt;br /&gt;
Human raiders continue to attack until one of several conditions are met. Mechanoid raiders attack indefinitely. Once mechanoids have destroyed every possible target they wander around in place indefinitely until a new target appears.&lt;br /&gt;
&lt;br /&gt;
Downing or killing 40% to 70% of human raiders causes the remaining alive raiders to cease their attack and attempt to flee. A random value between 40% and 70% is chosen for each raider group. If a raid attacks in multiple groups, each group has their own randomly chosen 40% to 70% flee value. Each individual raider group only counts dead or downed members of their own group. Each group attacks and flees independently. &lt;br /&gt;
&lt;br /&gt;
Human Raiders will flee after attacking for approximately 10 to 15 hours. A random value is chosen between these timers. After the time is passed the group will flee. For enemies attacking in multiple groups, each group will have its own timer and solely that group will flee when the timer is met. For sieges, the timer only begins after the siege stops attempting to siege and directly assaults the colony.&lt;br /&gt;
&lt;br /&gt;
Human enemies may attempt to kidnap downed colonists. When kidnapping, enemies may disengage from combat and attempt to flee the map.&lt;br /&gt;
&lt;br /&gt;
Human enemies may attempt to steal nearby loot. When stealing, enemies may disengage from combat and attempt to flee the map. How much nearby loot is required to cause raider theft depends on the raid points of the colony. Higher raid points requires more loot.&lt;br /&gt;
&lt;br /&gt;
{| {{STDT| c_50}}&lt;br /&gt;
! style=&amp;quot;text-align:left;&amp;quot; | Map Entry || Attack Type || Smart? || Faction Raiders || Ally use this raid?&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | Walk in Edge (45%)&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Immediate Attack&lt;br /&gt;
| No&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Tribal, Outlander, Pirate, Mechanoid&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| Yes (Breach)&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Preparation || No&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | Tribal, Outlander, Pirate&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| Sapper || No&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Siege || No&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Walk in Edge Group (15%)&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Immediate Attack&lt;br /&gt;
| No&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| Sapper || No&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;7&amp;quot; | Drop pods (30%)&lt;br /&gt;
| rowspan=&amp;quot;3&amp;quot; | Immediate Attack&lt;br /&gt;
| No&lt;br /&gt;
| rowspan=&amp;quot;5&amp;quot; | Tribal, Outlander, Pirate, Empire, Mechanoid&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| Yes (Breach)&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Preparation || No&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Yes&lt;br /&gt;
|-&lt;br /&gt;
| Sapper || No&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Tribal, Outlander, Pirate, Empire&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Siege || No&lt;br /&gt;
| rowspan=&amp;quot;2&amp;quot; | Yes&lt;br /&gt;
|-&lt;br /&gt;
| Haywired drop pods (10%) || Immediate Attack || No || Tribal, Outlander, Pirate, Empire, Mechanoid&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | Mechanoid Cluster {{RoyaltyIcon}} || No || Mechanoid || No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Immediate attack ===&lt;br /&gt;
{{Quote|They are attacking immediately.|Description}}&lt;br /&gt;
Raiders, upon either landing in their drop pods or arriving on the map sides, will proceed to instantaneously converge on your colony and attack. The best thing to do is to defend.&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Drop right on top of you&amp;quot; drop pods ===&lt;br /&gt;
Raiders will drop pod right &amp;quot;on top of you&amp;quot; circumventing all exterior defenses. &amp;quot;Drop on top of you&amp;quot; raids choose a singular colonist and all drop pods land around this target in open cells. That singular colonist cannot be under overhead mountain. The drop pods can crash through nearby overhead mountain even though the singular colonist target cannot currently be under overhead mountain. &lt;br /&gt;
&lt;br /&gt;
Only outlander, pirate and empire factions can &amp;quot;Drop right on top of you&amp;quot;. Tribal factions cannot use drop pods. Mechanoid &amp;quot;Drop right on top of you&amp;quot; raids were removed in patch 1.4.&lt;br /&gt;
&lt;br /&gt;
Rather than landing on a colonist, &amp;quot;Drop right on top of you&amp;quot; raids have a 40% chance to land on a powered, unroofed, orbital trade beacon. &lt;br /&gt;
&lt;br /&gt;
These &amp;quot;drop right on top of you&amp;quot; raids always attack immediately and follow standard enemy pathing.&lt;br /&gt;
&lt;br /&gt;
Since most raiders in this situation will use a ranged weapon, you can use the time between the last drop pod land and the first raider emerge to position melee fighter in between and prevent them from shooting.&lt;br /&gt;
&lt;br /&gt;
=== Immediate attack smart ===&lt;br /&gt;
Like Immediate Attack, but the raiders are unusually clever in their tactics because they try to avoid turret line of sight if possible. If there is no path to the raider's target around turret line of sight, or if their target is a turret, they will walk through turret line of sight.&lt;br /&gt;
&lt;br /&gt;
Despite their description, they do not avoid traps like Spike Traps nor IEDs in any way.&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
Raiders, upon either landing in their drop pods or arriving on the map sides, will proceed to stand around in a small group near-by where they spawned for a period of time and then proceed to attack. It is possible and a completely viable strategy to attack them while they are &amp;quot;preparing&amp;quot;. This preparation has no effect on their attack other than the fact that it gives you more time to prepare yourself.&lt;br /&gt;
&lt;br /&gt;
=== Sappers ===&lt;br /&gt;
{{Quote|It looks like they want to use sappers to tunnel around your defenses.|Description}}&lt;br /&gt;
Instead of attempting to kill your colonists by traditional attack, sappers will mine or blast their way inside rather than hitting your walls or doors as usual. Their ultimate goal is an assigned constructed sleeping position. Freely placed sleeping spots, and unassigned beds do not qualify. An assigned sleeping position can be a colonist bed, an animal bed, or prisoner bed with a name on it rather than it being unassigned.&lt;br /&gt;
&lt;br /&gt;
The attacker with the best mining skill is chosen to dig. If that digger is killed the next best digger continues digging, and so on.&lt;br /&gt;
&lt;br /&gt;
They can be fairly dangerous to those who tunnel into mountains as their defenses are usually concentrated at the entrances. The best thing to do is instantly assault them before they can mine too much. The other members will then carry on the normal assault. They seem to avoid digging through high-health ore veins or into the areas within the range of improvised turrets and don't mind much about other security traps (spike trap and all kind of IEDs). It's possible to create such an trap area to kill them before hand.&lt;br /&gt;
&lt;br /&gt;
However, in open bases they are even worse than regular raiders as they come in smaller numbers.&lt;br /&gt;
&lt;br /&gt;
Sappers can find one tile defenses, either natural rock or built walls. This may cause them to open ancient shrines unintentionally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery mode=&amp;quot;packed-hover&amp;quot;&amp;gt;&lt;br /&gt;
File:Sappers are good at finding one tile walls.png|1: Sappers are good at finding one tile walls.&lt;br /&gt;
File:Sappers may even open ancient structures unwisely.png|2: Sappers may even open ancient shrines unwisely.&lt;br /&gt;
File:Sappers attacking ancient structures will kill spacers you would love to recruit.png|3: Sappers attacking ancient structures will kill spacers you would love to recruit.&lt;br /&gt;
File:Sappers may cause mechanoids to function as your outer defense line.png|4: Sappers may cause mechanoids to function as your outer defense line.&lt;br /&gt;
File:Sappers demise.png|5: Sappers are defeated.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Breachers ===&lt;br /&gt;
{{Quote|These raiders intend to breach your walls. They'll determine their own path into your colony and destroy anything in their way.|Description}}&lt;br /&gt;
&lt;br /&gt;
Much like sappers, raiders will utilize their tools to easily breach past your walls. Breachers, like sappers, target assigned constructed sleeping positions. Unlike Sappers, however, breachers come equipped with tools designed to destroy walls easily regardless of their mining skill.&lt;br /&gt;
* [[Tribals]] use pawns equipped with [[breach axe]]s.&lt;br /&gt;
* [[Outlanders]], [[Pirates]], and [[Empire|Imperials]]{{RoyaltyIcon}} use [[frag grenade|frag grenadiers]].&lt;br /&gt;
* Mechanoids utilize the [[thump cannon]]-wielding [[Termite]]. &lt;br /&gt;
&lt;br /&gt;
Unlike sappers, they mostly target colony-built walls in their direct path, instead of mining the shortest route. Any raiding pawns nearby will always follow the breaching pawn in question, only attacking within range. Breachers will not attack passable player buildings, and instead only target impassable buildings like walls.&lt;br /&gt;
&lt;br /&gt;
They ignore walls that are not owned by the colonist unless there are no pathways around them, making it more difficult to trick the breachers into unintentionally opening the ancient shrines.&lt;br /&gt;
&lt;br /&gt;
There are two types of Breach Raids: Standard breach raids which ignore turrets and &amp;quot;Smart&amp;quot; breachers which attempt to avoid turret line of sight. The &amp;quot;Smart&amp;quot; Breach Raid letter will contain the phrase &amp;quot;they appear unusually clever with their tactics. They'll avoid your turrets' fields of fire and notice some of your traps&amp;quot;. Smart breachers do not actually notice any of your traps. Smart breachers only may attempt to avoid turret line of sight if possible. &lt;br /&gt;
&lt;br /&gt;
[[File:Siege base construct.png|350px|thumb|right|Siegers arriving at their chosen minibase location. The faint &amp;quot;blueprint&amp;quot; for the base is not visible until the resources are dropped.]] [[File:Siege_base_finished.png|350px|thumb|right|Siegers done constructing their minibase and questionable defenses, moving toward commencing bombardment.]]&lt;br /&gt;
&lt;br /&gt;
=== Siege ===&lt;br /&gt;
{{See also|Auto-mortar}}&lt;br /&gt;
{{Quote|It looks like they want to besiege the colony and pound you with mortars from a distance. You can try to wait it out - or go get them.|Description}}&lt;br /&gt;
&lt;br /&gt;
Raiders enter your map from an edge and head towards a point well outside your base to set up a makeshift siege base. Once there, drop pods supply them with ample resources to construct 2 [[mortar]]s ([[steel]], [[component]]s, and both [[high-explosive shell]]s and [[incendiary shell]]s). They also get some [[cloth]] to create [[sandbags]] as cover, and [[packaged survival meal]]s. Two random raiders will begin constructing the mortars (one each), and a few more will throw the sandbags down while the rest stand guard.&lt;br /&gt;
&lt;br /&gt;
You can engage them before they finish building up if timing is favorable to you. They will always attempt to construct only two mortars regardless of the number of raiders. The layout of the mortar base is somewhat random - they might decide to place a mortar where some trees need cutting first, slowing the process considerably, and the sandbags are rarely well placed. The siegers rarely use their best constructors when building (it's random), so sometimes fail the [[construction]] process and waste that mortar's resources.  As they will not get additional components, this will make any bombardment half as damaging.&lt;br /&gt;
[[File:Passive siegers.png|200px|thumb|left|Siegers not engaging friendlies while traveling to set up base.]]&lt;br /&gt;
Once a mortar is ready, they will start to bombard you, guarded by those not busy manning the mortars or still building the second one. Drop pods will continuously resupply 12 packaged survival meals and more mortar shells, as needed. When they run low on [[mortar shell]]s they will receive random resupplies of high explosive or incendiary shells only. After causing enough destruction, they will proceed as a normal raid to converge on your colony. Valid targets appear to be colonists and buildings but not player owned animals. &lt;br /&gt;
&lt;br /&gt;
The siege team will not engage friendlies while heading towards their future base until they actually start constructing or you assault them first.&lt;br /&gt;
&lt;br /&gt;
A siege will begin their direct assault of the player colony under a few conditions. The siege will begin their assault after a random amount of time between 1.5 and 3 days has past. Every time a sieger takes damage there's an 8% chance the siege assaults directly.&lt;br /&gt;
&lt;br /&gt;
=== Ambush ===&lt;br /&gt;
Raiders may choose to attack one of your caravans. In this case, they will charge right at your caravan without giving a second thought to strategy.&lt;br /&gt;
&lt;br /&gt;
=== Multiple group attacks ===&lt;br /&gt;
Enemies can split up their attacking forces, attacking using multiple groups at once. Each group attacks from a different direction, and flees on their own accord.&lt;br /&gt;
&lt;br /&gt;
=== Drop pod scatter ===&lt;br /&gt;
Enemies capable of drop pods have a chance of launching a raiding party onto the map via said pods at random points scattered around the map. Due to the fact they can drop through roofs, this type of attack can be incredibly devastating, as they can bypass all of your external defenses and immediately start setting fires, attacking colonists, and destroying furniture. The layout of your base and the room they choose to drop in can also make it very difficult to set up a sufficient defense, as they may drop into an extremely unfortunate location, such as a cramped storage room with lots of things to burn and destroy, and no good way to attack them beyond filing all of your fighting colonists into the room and hoping for the best or attempting to shoot through the door. While the raiders themselves will most likely be easy enough to kill, it is likely they will have ample opportunity to cause tons of damage before they can be stopped. Setting up ample fire defenses and having a defense plan for all potential drop points can help limit the amount of damage they can cause, although it’s almost guaranteed they will be able to cause at least some damage if they drop directly into a room.&lt;br /&gt;
&lt;br /&gt;
===Emerge from water===&lt;br /&gt;
{{Stub|section=1|reason=Added in 1.5}}&lt;br /&gt;
Mechanoids can emerge from bodies of water (shallow ocean water, shallow moving water, chest-deep moving water) to attack your colony.&lt;br /&gt;
&lt;br /&gt;
=== Weapon-specific raids ===&lt;br /&gt;
Human raiders have the ability to send raiders with a specific kind of weapon only.&lt;br /&gt;
&lt;br /&gt;
==== Melee rush ====&lt;br /&gt;
Pirate or outlander raiders have the chance to attack your base with mercenary slashers only, meaning everyone will be shielded and have a melee weapon. Tribals can do the same with their melee units, except without shields.&lt;br /&gt;
&lt;br /&gt;
Mechanoids have their own rendition of the melee rush with [[scyther]]s only.&lt;br /&gt;
&lt;br /&gt;
==== Sniper party ====&lt;br /&gt;
Pirates or outlanders have a chance to send snipers only, meaning that all attackers will have long-ranged attacks.&lt;br /&gt;
&lt;br /&gt;
==== Explosives assault ====&lt;br /&gt;
Pirates or outlanders have the chance to send a party consisting of either grenadiers or heavy mercenaries. While this makes them extremely destructive, it also makes them particularly prone to friendly fire.&lt;br /&gt;
&lt;br /&gt;
== Raid strength ==&lt;br /&gt;
{{Main|Raid points}}&lt;br /&gt;
A raid's size and strength is determined by the amount of colonists you have, your wealth, how many big threats you've had (for the early-game), how long your faction's been around for, how long it's been since one of your colonists were downed or killed, and your difficulty.&lt;br /&gt;
&lt;br /&gt;
The actual raid strength is determined by points, which is calculated by taking into account the above factors that affect raid strength.&lt;br /&gt;
&lt;br /&gt;
For a full technical breakdown; see [[Raid points]]&lt;br /&gt;
&amp;lt;!-- Formatting and style could likely benefit from this old version, so it is not being deleted as of yet &lt;br /&gt;
The below is technical information on the strength of raids, through the determination of points a raid has. All of the following information is from Alpha 17b, or 0.17.1557.&lt;br /&gt;
&lt;br /&gt;
=== Points ===&lt;br /&gt;
Your first raid will always be 35 points, regardless of the above conditions. Additionally, the first raider won't randomly die upon being downed, and they will never flee.&lt;br /&gt;
&lt;br /&gt;
The base formula for raid points could be expressed as follows:&lt;br /&gt;
&lt;br /&gt;
{{math|big=0|P {{=}} (( C &amp;amp;times; 42 ) + ( iW &amp;amp;divide; 100 ) + ( bW &amp;amp;divide; 200 )) &amp;amp;times; ( sR &amp;amp;times; lR ) &amp;amp;times; D &amp;amp;times; T &amp;amp;times; R}}&lt;br /&gt;
&lt;br /&gt;
{| {{STDT| c_01 text-left}}&lt;br /&gt;
|-&lt;br /&gt;
! Variable !! Meaning !! Value&lt;br /&gt;
|-&lt;br /&gt;
! C &lt;br /&gt;
|  number of colonists that your base has ||   Colonists are always worth 42 points, regardless of their condition&lt;br /&gt;
|-&lt;br /&gt;
! iW &lt;br /&gt;
| base's item wealth || can be checked under the 'History' tab&lt;br /&gt;
|-&lt;br /&gt;
! bW&lt;br /&gt;
| base's building wealth || can be checked under the 'History' tab&lt;br /&gt;
|-&lt;br /&gt;
! sR&lt;br /&gt;
| short-term ramp-up factor || Check below&lt;br /&gt;
|-&lt;br /&gt;
! lR&lt;br /&gt;
| long-term ramp-up factor || Check below&lt;br /&gt;
|-&lt;br /&gt;
! D&lt;br /&gt;
| difficulty's threat scale factor (i.e. points multiplier) || 0.05 on peaceful; 0.1 on base builder; 0.35 on some challenge; 0.65 on rough; 1 on intense; and 1.3 on extreme.&lt;br /&gt;
|-&lt;br /&gt;
! T &lt;br /&gt;
| the number of big threats (i.e. raids, manhunter packs, mechanoid ship parts, and psychic waves) that your faction has experienced || 0.5 for 1 big threat; 0.7 for 2; 0.8 for 3; 0.9 for 4; and 1 for 5 and greater. Simplified, '''T''''s value will be 0.5 for your faction's second-ever big threat, and so on.&lt;br /&gt;
|-&lt;br /&gt;
! R &lt;br /&gt;
| the strategy that the raiders are using || 1 for waiting and then attacking; 0.9 for immediate attacks; 0.85 for 'smart' attacks; 0.8 for sapper attacks; and 0.6 for sieges. For raids involving chased refugees it is 1.35.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Ramp-up factors====&lt;br /&gt;
Ramp-ups (i.e. '''sR''' and '''lR''') are substantially more complicated than any of the other factors involved:&lt;br /&gt;
&lt;br /&gt;
'''sR''' is always 1 until 21 days in; in which case 0.000514403335 is added to it every {{ticks|5000}} - or 1 every 162 days.&lt;br /&gt;
&lt;br /&gt;
'''lR''' is always 1 until 42 days in; in which case 0.000231481492 is added to it every 5,000 ticks - or 1 every 360 days.&lt;br /&gt;
&lt;br /&gt;
If a colonist gets downed or killed, 1 is subtracted from both '''sR''' and '''lR''' - but these aren't the new values; only part of the new values. '''sR''' and '''lR''' then get multiplied by certain values independently, based on how many colonists you have, with the table below showing all possible combinations as stated in the code (RimWorld.StoryWatcher_RampUp):&lt;br /&gt;
&lt;br /&gt;
{| {{STDT| c_01 text-center}}&lt;br /&gt;
! Colonists&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| 3&lt;br /&gt;
| 4&lt;br /&gt;
| 5&lt;br /&gt;
| 6&lt;br /&gt;
| 7&lt;br /&gt;
| 8&lt;br /&gt;
| 9&lt;br /&gt;
| 10&lt;br /&gt;
| 11&lt;br /&gt;
| 12&lt;br /&gt;
| 13&lt;br /&gt;
| 14&lt;br /&gt;
| 15&lt;br /&gt;
| 16+&lt;br /&gt;
|- &lt;br /&gt;
! sR Multiplier&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0.15&lt;br /&gt;
| 0.25&lt;br /&gt;
| 0.3&lt;br /&gt;
| 0.35&lt;br /&gt;
| 0.4&lt;br /&gt;
| 0.45&lt;br /&gt;
| 0.5&lt;br /&gt;
| 0.55&lt;br /&gt;
| 0.6&lt;br /&gt;
| 0.65&lt;br /&gt;
| 0.7&lt;br /&gt;
| 0.75&lt;br /&gt;
| 0.8&lt;br /&gt;
|- newline&lt;br /&gt;
! lR Multiplier&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0.2&lt;br /&gt;
| 0.4&lt;br /&gt;
| 0.6&lt;br /&gt;
| 0.7&lt;br /&gt;
| 0.75&lt;br /&gt;
| 0.8&lt;br /&gt;
| 0.85&lt;br /&gt;
| 0.9&lt;br /&gt;
| 0.91&lt;br /&gt;
| 0.92&lt;br /&gt;
| 0.93&lt;br /&gt;
| 0.94&lt;br /&gt;
| 0.95&lt;br /&gt;
| 0.95&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After '''sR''' and '''lR''' have been multiplied by whatever corresponding values, new '''sR''' and new '''lR''' both equal 1 + old correspondents.&lt;br /&gt;
&lt;br /&gt;
After the base amount of points have been calculated, the game then factors in diminishing returns as follows, using nested 'if' statements, in pseudo-code form:&lt;br /&gt;
&lt;br /&gt;
    IF P &amp;gt; 1000 THEN&lt;br /&gt;
        IF P &amp;gt; 2000 THEN&lt;br /&gt;
            P = 2000 + (P - 2000) * 0.5&lt;br /&gt;
        P = 1000 + (P - 1000) * 0.5&lt;br /&gt;
&lt;br /&gt;
In layman's terms: if P is above 1000, then P is the average of itself and 1,000. However, if P is above 2,000, then P will first be the average of itself and 2,000, before averaging with 1,000.&lt;br /&gt;
&lt;br /&gt;
Finally, with [[Randy Random]], a raid's points gets multiplied by anywhere from 0.5x to 1.5x, meaning that you could face more or less powerful raids than usual with this storyteller.&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
So now lets plug in some real-world numbers: your colony has 4 people, it's been 17 days, and this is the colony's third raid. Your item wealth is 11,000, your building wealth is 4,000, and you're playing on rough difficulty. The raiders are attacking immediately.&lt;br /&gt;
&lt;br /&gt;
The values in the formula will be as follows:&lt;br /&gt;
&lt;br /&gt;
'''C''' = 4&amp;lt;br&amp;gt;&lt;br /&gt;
'''iW''' = 11000&amp;lt;br&amp;gt;&lt;br /&gt;
'''bW''' = 4000&amp;lt;br&amp;gt;&lt;br /&gt;
'''sR''' = 1&amp;lt;br&amp;gt;&lt;br /&gt;
'''lR''' = 1&amp;lt;br&amp;gt;&lt;br /&gt;
'''D''' = 0.65&amp;lt;br&amp;gt;&lt;br /&gt;
'''T''' = 0.7&amp;lt;br&amp;gt;&lt;br /&gt;
'''R''' = 0.9&lt;br /&gt;
&lt;br /&gt;
Plugging these values into the formula:&lt;br /&gt;
&lt;br /&gt;
'''P = ((4 * 42) + (11000 / 100) + (4000 / 200)) * (1 * 1) * 0.65 * 0.7 * 0.9''' or&amp;lt;br&amp;gt;&lt;br /&gt;
'''P = (168 + 110 + 20) * 1 * 0.65 * 0.7 * 0.9''' or&amp;lt;br&amp;gt;&lt;br /&gt;
'''P = 298 * 0.4095''' thus&amp;lt;br&amp;gt;&lt;br /&gt;
'''P = 122.031''' or&amp;lt;br&amp;gt;&lt;br /&gt;
'''P = 122'''&lt;br /&gt;
&lt;br /&gt;
Therefore, the raid will be 122 points.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Defense strategies ==&lt;br /&gt;
{{Move|reason=Move non-raid strategy sections to their respective pages. e.g. scyther recommendations to [[scyther]]  tribal recommendations to [[Tribes]].|destination= Scyther{{!}}Scyther etc.}}&lt;br /&gt;
''For a more comprehensive list of strategies, see [[Defense tactics]].'' &amp;lt;br&amp;gt;&lt;br /&gt;
''For constructed defenses to hold against raiders, see [[Defense structures]].''&lt;br /&gt;
&lt;br /&gt;
It is recommended to keep power generation, eating areas, lighting, doors, and walls near or behind a protected entrance, as raiders tend to set fire to them, potentially causing huge damage. Raiders will prioritize firing on colonists or turrets when those colonists or turrets are firing on them, but will otherwise prioritize random objects, meaning you can put doors or walls near your defenses to temporarily distract them.&lt;br /&gt;
&lt;br /&gt;
=== Raider preparation ===&lt;br /&gt;
Raiders will sometimes start by standing around in a group where they spawned and will continue this until they see a [[colonist]] nearby or they hit a certain preparation time limit, at which point they begin the assault. Because a colonist can set them off early, you can plan out the time you want them to attack. It is generally best to set them off early if you're well-prepared, to avoid potentially troublesome scenarios such as having no power when their timer runs out. Conversely, you should not set them off early if your defense is not prepared. Note that raiders usually take less than one day to begin, meaning that if there is an eclipse and you rely on [[Buildings#Solar generator|solar generators]], you should not wait for them and should instead set them off early while you still have some power left.&lt;br /&gt;
&lt;br /&gt;
=== Siege defense ===&lt;br /&gt;
When faced with a siege, there are a few coping strategies you can use.&lt;br /&gt;
&lt;br /&gt;
You can choose to either assault the mortar base or wait it out and repair the damage as best as you can. The choice mainly depends on the surroundings of the mortar base and your base's position. If your base is located under a mountain (your base tiles will read ''Overhead Mountain'' when you hover your cursor over them), the mortar shells won't be able to hit those tiles at all! This makes deep mining a very effective strategy against heavy bombardment. If you don't build your base into a mountain, you should at least consider digging out at least one panic room for your colonists to hide within from the shells.&lt;br /&gt;
&lt;br /&gt;
If you assault their base, one possibility is sniping either the shells or the mortars, hoping an explosion kills many of the raiders. If you want to leave those intact, you can snipe the raiders themselves. Keep in mind that killing enough of them prompts them to assault your colony directly instead of continuing their siege.&lt;br /&gt;
&lt;br /&gt;
=== Mechanoid assaults ===&lt;br /&gt;
Mechanoids have much differing stats and weapons, meaning different tactics may be used.&lt;br /&gt;
&lt;br /&gt;
In most raids where they come/ drop in at the edges, the scythers will outrun the centipedes by a great margin, giving plenty of time to deal with them before the centipedes.&lt;br /&gt;
&lt;br /&gt;
==== Lancers ====&lt;br /&gt;
Lancers are capable of mid-long range high damage attacks. If fighting it from a distance, cover along with mid-long ranged weapons such as [[assault rifle]]s or [[bolt-action rifle]]s are vital.&lt;br /&gt;
&lt;br /&gt;
Due to the lancers' weak melee ability and low health, melee fighting it is always the better choice.&lt;br /&gt;
&lt;br /&gt;
==== Scyther ====&lt;br /&gt;
Scythers are dangerous melee fighters; they deal significant melee damage while forcing your gunners into melee combat. Usually, a 1v1 fight with a scyther and a gunner will result in the scyther emerging victorious.&lt;br /&gt;
&lt;br /&gt;
Melee fighters are useful in guarding against scythers, being able to 'peel' them off from more vulnerable allies. A thrumbo could beat up one easily, they are strong enough that even a calf could kill one in a 1v1.&lt;br /&gt;
&lt;br /&gt;
==== Pikemen ====&lt;br /&gt;
Pikemen can snipe your colonists from a very long distance, though their damage output is abysmal.&lt;br /&gt;
&lt;br /&gt;
Due to the pikemen's weak melee ability and low health, melee fighting it is always the better choice.&lt;br /&gt;
&lt;br /&gt;
==== Centipedes ====&lt;br /&gt;
Centipedes, on the other hand, specialize in crowd control and area denial; the [[minigun]] and [[heavy charge blaster]] can annihilate groups of colonists, while the [[inferno cannon]] sets your colonists ablaze and burns down your base if not careful. They are incredibly durable, sporting thick armor and high health, and can take many hits before they can be downed.&lt;br /&gt;
&lt;br /&gt;
The inferno cannon is not as directly destructive towards your colonists, but is dangerous due to the [[fire]] it spreads - destroying defenses and bases, causing burning pawns to run out of cover, and preventing movement. Keep watch on your colonists at all times, and remember to send them back into cover when needed. As a precaution, build your base out of non-flammable materials to prevent large-scale fires erupting all over your colony.&lt;br /&gt;
&lt;br /&gt;
Centipedes engaged in melee cannot employ their heavy weapons. Their melee is hard hitting and effective against armor, but very slow, making it easy to overwhelm them with multiple melee attackers. One of the fastest ways to eliminate one is by employing upgraded [[ghoul]]s{{AnomalyIcon}} or [[melee specialist]]s{{IdeologyIcon}} with [[monosword]]s{{RoyaltyIcon}} and [[zeushammer]]s,{{RoyaltyIcon}} but even Core-only melee pawns with [[uranium]] [[mace]]s and decent armor will be effective.&lt;br /&gt;
&lt;br /&gt;
=== Tribal raids ===&lt;br /&gt;
Tribal raiders come in large numbers, but with relatively poor equipment; as such, it may require different strategy compared to pirate or outlander raids.&lt;br /&gt;
&lt;br /&gt;
Overall, they can deal heavy damage to your colonists; they do not have good weapons, but compensate with their sheer numbers. &amp;lt;br&amp;gt;&lt;br /&gt;
However, as tribalwear does not provide protection and they do not wear any form of regular armor, they are easier to kill individually than other raiders.&lt;br /&gt;
&lt;br /&gt;
Crowd control is an important aspect in defeating tribal raids. The [[minigun]] or [[LMG]] is an effective weapon to use as it can easily mow down groups of raiders.&lt;br /&gt;
&lt;br /&gt;
Explosive weapons are also useful in crowd control.&lt;br /&gt;
&lt;br /&gt;
Explosive mortars, while inaccurate, can easily destroy a sizable group of tribals at once if they hit. &amp;lt;br&amp;gt;&lt;br /&gt;
Grenades can hit archers hiding behind cover, though you have to risk a colonist or two in order to even get close enough to throw them. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Their archers are dangerous; their bows can be fired from a somewhat long distance, their pila can easily kill or incapacitate a colonist, and they always come in a large volley. As with most defensive strategies, cover is essential when fighting them.&lt;br /&gt;
&lt;br /&gt;
Removing rock chunks also helps in dealing with tribal raiders hiding behind them, making them much easier to hit.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.0.245|0.0.245]] - Sniper squad and mercenary squad added.&lt;br /&gt;
* [[Version/0.3.410|0.3.410]] - Raiders come from specific factions and don’t always drop from orbit. Tribal raiders now spawn and attack.&lt;br /&gt;
* [[Version/0.5.492|0.5.492]] -  Sieges added.&lt;br /&gt;
* [[Version/0.11.877|0.11.877]] - Sappers added. Raiders now opportunistically ignite crops on fire. &lt;br /&gt;
** A11B - Siegers can never use melee weapons. Enemies (especially wargs) now ignore unpowered unmanned turrets and mortars.&lt;br /&gt;
* [[Version/0.12.906|0.12.906]] - Sappers now avoid mining through high-health ores and barriers.  Siegers will never be sent with only melee weapons ... again?&lt;br /&gt;
* Beta 19/ 1.0 - Heavily reworked the selection weights of raider factions, raider strategies (sappers, siege, etc) and arrival modes (walk-in, drop pods) to make the more difficult ones appear more consistently against stronger colonies.&lt;br /&gt;
* [[Version/1.3.3066|1.3.3066]] - Added new raid type: Breaching. Breaching raids will attempt to reach your colony by breaking through walls with unique weapons.&lt;br /&gt;
* [[Version/1.3.3159|1.3.3159]] - Reduce prevalence of breach raids at high points levels.&lt;br /&gt;
* [[Version/1.3.3200|1.3.3200]] - Adjusted human factions' raid strategy selection weights for slightly more variation. Breachers no longer want to attack passable player buildings. They only target impassable buildings like walls.&lt;br /&gt;
* [[Version/1.4.3524|1.4.3524]] - Fix: Breach raids not spawning.&lt;br /&gt;
* [[Version/1.4.3527|1.4.3527]] - Fix: Hostile pawns try to path to destroyed structures.&lt;br /&gt;
* [[Version/1.5.4062|1.5.4062]] - Mechanoids can now emerge from bodies of water to attack your colony.&lt;br /&gt;
&lt;br /&gt;
{{nav|factions|wide}}&lt;br /&gt;
[[Category:Characters]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Orbital_mech_cluster_targeter&amp;diff=175378</id>
		<title>Orbital mech cluster targeter</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Orbital_mech_cluster_targeter&amp;diff=175378"/>
		<updated>2026-02-15T20:22:45Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Verified that mech cluster targeters can absolutely spawn in regular ADs with only Core and Royalty active. Screenshot proof in Discord.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Royalty}} &lt;br /&gt;
{{Infobox main&lt;br /&gt;
| name = Orbital mech cluster targeter&lt;br /&gt;
| image = OrbitalMechClusterTargeter.png&lt;br /&gt;
| description =An ancient military targeting device. It signals an orbital platform to drop a mechanoid combat cluster at the targeted point. The cluster may include any mixture of mechanoids and mech defense structures.&amp;lt;Br&amp;gt;Though they may have once had some allegiance to the ancient army that created this unit, any mechs dropped now will indiscriminately attack any human they see - including the one that summoned them.&amp;lt;Br&amp;gt;The unit only contains one usage code, so it can only be used once.&lt;br /&gt;
| type = Gear&lt;br /&gt;
| type2 = Utility&lt;br /&gt;
| tech level = Spacer&lt;br /&gt;
| marketvalue = 1200&lt;br /&gt;
| hp = 100&lt;br /&gt;
| flammability = 0.5&lt;br /&gt;
| mass base = 0.2&lt;br /&gt;
| lifestage = Adult&lt;br /&gt;
| clothing for nudity = False&lt;br /&gt;
| coverage = Waist&lt;br /&gt;
| layer = Belt&lt;br /&gt;
| tradeTags = ExoticMisc&lt;br /&gt;
| thingSetMakerTags = SingleUseWeapon&lt;br /&gt;
}}&lt;br /&gt;
The '''Orbital mech cluster targeter''' is a powerful single-use [[utility]] item that calls a [[mechanoid cluster]] down on the targeted location. These [[mechanoids]] are not allied to the user in any way, and behave as normal mechanoids do.&lt;br /&gt;
&lt;br /&gt;
== Acquisition ==&lt;br /&gt;
Orbital mech cluster targeters cannot be crafted, acquired through trade, or from quests. They can only be found in [[ancient shrine]]s and [[Hermetic_crate|Odyssey ruin hermetic crates]]{{OdysseyIcon}}.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
{{Stub|section=1|reason=More detail needed inc. What point value do they use? Are they always the same size or do they scale with [[raid points]]?}}&lt;br /&gt;
When equipped, an orbital mech cluster targeter is worn in the waist [[Utility|utility slot]]. Pawns that are incapable of violence can equip, but not use, the targeter. Once the wearer is [[draft]]ed, it can be manually activated by the player to target a tile within 45 tiles and within [[line of sight]]. It can be targeted under roofs of all types but pods landing on overhead mountain will cause cave-ins and create [[collapsed rocks]], destroying the pod and its occupants in the process.&lt;br /&gt;
&lt;br /&gt;
After a 3s warm-up, a [[mechanoid cluster]] will spawn in the targeted area. The warmup time before firing is affected by the [[Aiming Time]] stat of the wearer. This cluster is identical to other clusters but will never spawn with a [[condition causer]]. The [[mechanoids]] within are not allied to the user in any way, and behave as normal mechanoids do. They will be hostile to everyone except other mechanoids.&lt;br /&gt;
&lt;br /&gt;
The targeter cannot be recharged or refueled - once its single charge is expended, the item is completely destroyed.&lt;br /&gt;
&lt;br /&gt;
{{Utility Note}}&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
{{Stub|section=1|reason=Essentially missing analysis}}&lt;br /&gt;
They are in every way a mech cluster you can summon, with all the help and hindrance that can bring. Use with caution and remember it does not help against other mechanoids.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Royalty DLC]] Release - Added.&lt;br /&gt;
* [[Version/1.2.2719|1.2.2719]] - Will no longer spawn a cluster with [[condition causer]].&lt;br /&gt;
* [[Version/1.2.2753|1.2.2753]] - New artwork for orbital targeters. Changed from a Weapon to a Utility item. Prior to this, like all ranged weapons it couldn't be used when the pawn was wearing a [[shield belt]].&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
OrbitalTargeter.png|Old generic targeter sprite&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Nav|utility|wide}}&lt;br /&gt;
[[Category:Utility]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Patchleather&amp;diff=175368</id>
		<title>Patchleather</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Patchleather&amp;diff=175368"/>
		<updated>2026-02-15T17:52:30Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Spelling, capitalization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox main|leathery&lt;br /&gt;
| name = Patchleather&lt;br /&gt;
| image = Patchleather b.png&lt;br /&gt;
| description = A weak textile created by cutting up and sewing together various types of leathers. Regardless of what kind of leather is used to create it, patchleather's irregular seams make it less tough and less insulating than any intact leather.&lt;br /&gt;
&amp;lt;!-- Base Stats --&amp;gt;&lt;br /&gt;
| type = Textile&lt;br /&gt;
| type2 = Leather&lt;br /&gt;
| stuff category = Leathery&lt;br /&gt;
| hp = 60&lt;br /&gt;
| flammability = 1&lt;br /&gt;
| marketvalue = 1.5&lt;br /&gt;
| beauty = -30&lt;br /&gt;
| mass = 0.03&lt;br /&gt;
| stack limit = 75&lt;br /&gt;
| path cost = 14&lt;br /&gt;
&amp;lt;!-- Stat Modifiers --&amp;gt;&lt;br /&gt;
| beauty factor = 1&lt;br /&gt;
| work to make factor = 1&lt;br /&gt;
| work to build factor = 1&lt;br /&gt;
| max hit points factor = 1&lt;br /&gt;
| flammability factor = 1&lt;br /&gt;
| armor - sharp factor = 0.45&lt;br /&gt;
| armor - blunt factor = 0.19&lt;br /&gt;
| armor - heat factor = 0.9&lt;br /&gt;
| insulation - cold factor = 9&lt;br /&gt;
| insulation - heat factor = 9&lt;br /&gt;
&amp;lt;!-- Creation --&amp;gt;&lt;br /&gt;
| production facility 1 = Hand tailor bench&lt;br /&gt;
| production facility 2 = Electric tailor bench&lt;br /&gt;
| work to make = 900&lt;br /&gt;
| resource 1 = Stuff&lt;br /&gt;
| resource 1 amount = 50&lt;br /&gt;
| stuff tags = Leathery&lt;br /&gt;
| product amount = 50&lt;br /&gt;
&amp;lt;!-- Technical --&amp;gt;&lt;br /&gt;
| page verified for version = 1.2.2753&lt;br /&gt;
&amp;lt;!-- Unused --&amp;gt;&lt;br /&gt;
| color = (90,75,60)&lt;br /&gt;
| commonality = 0.0025&lt;br /&gt;
| default color = (90,75,60)&lt;br /&gt;
| label = patchleather&lt;br /&gt;
}}&lt;br /&gt;
{{Info|'''Patchleather''' is a type of [[leather]] produced when a [[Skills#Crafting|tailor]] combines different types of leather at a [[electric tailor bench|tailor bench]]. Useful for combining unusably small amounts of different leathers into a single type to get a large enough quantity for use.}}&lt;br /&gt;
&lt;br /&gt;
== Acquisition ==&lt;br /&gt;
Unlike other leathers, patchleather is not procured by butchering animals, but rather by combining other leathers together at a [[electric tailor bench|tailor bench]]. 50 units of any other types of leather, except [[human leather]],{{Check Tag|Dreadleather?|Dreadleather has similar penalties - does it prevent its use? Even if no, specify that it is allowed}} will output 50 units of patchleather.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
{{PAGENAME}} can be used as a material for [[stuff]]able items with the [[Leathery]] stuff tag.&lt;br /&gt;
&lt;br /&gt;
{{PAGENAME}} can be used in the following recipes:&lt;br /&gt;
{{Ingredient List}}&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Patchleather has the worst stats of any leather in the game in both protection and insulation. The only [[textiles]] it is superior to in protection are [[cloth]] and the [[wools]], and even then, just barely. Meanwhile, patchleather is significantly inferior to both cloth and wools in terms of temperature insulation. It has the lowest insulation, market value and beauty of any textile, and tied for the 2nd lowest item hitpoints.&lt;br /&gt;
&lt;br /&gt;
The main advantage of patchleather is that it's easy to produce in bulk. Small quantities of different leathers are insufficient to make anything on their own. Converting them to patchleather will turn said unusable resource into a usable one. Keep in mind, however, that it may be more profitable to sell the other leathers directly, rather than create objects out of patchleather.&lt;br /&gt;
&lt;br /&gt;
Generally, it should only be when there is no alternative, where its stats have little effect on the utility of the resulting item or maintain lower [[wealth]] for min-maxing runs.&lt;br /&gt;
few useful uses are: &lt;br /&gt;
* Clothing production [[quests]] where material and value don't matter, only quality.&lt;br /&gt;
* [[Armchair]]s/[[couch]]s in rooms where [[beauty]] isn't important for the [[room stats|room's quality]].&lt;br /&gt;
* Prisoners and Slaves clothing for lower defense and wealth values in case of prison breaks and slave rebellion.&lt;br /&gt;
* [[Heavy bandolier]] the [[Ranged Cooldown Multiplier]] passive is not affect material while it's cheaper&lt;br /&gt;
* [[Bedroll]]s for caravans [[Rest]] and [[Comfort]] will remain the same while it's cheaper&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Patchleather a.png|One patchleather&lt;br /&gt;
Patchleather b.png|Stack of patchleathers&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.19.2009|0.19.2009]] - Added.&lt;br /&gt;
* [[Version/1.2.2753|1.2.2753]] - [[Quests|Trade requests]] will no longer request patchleather.&lt;br /&gt;
&lt;br /&gt;
{{Nav|materials|wide}}&lt;br /&gt;
[[Category:Material]] [[Category:Textile]] [[Category:Leather]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Toxic_wastepack&amp;diff=174919</id>
		<title>Toxic wastepack</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Toxic_wastepack&amp;diff=174919"/>
		<updated>2026-02-10T03:54:10Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Dug into the mechanic a bit further with some assistance from a dev.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Biotech}}&lt;br /&gt;
{{Stub|reason=1) 1.4.3555 impacts for dumping. Analysis, inc. whenever they are worth disposing at all 2) Type }}&lt;br /&gt;
{{Infobox main&lt;br /&gt;
| name = Toxic wastepack&lt;br /&gt;
| image = Wastepack_a.png&lt;br /&gt;
| type = &lt;br /&gt;
| tech level = &lt;br /&gt;
| description = A compacted package of toxic waste that will slowly dissolve if not frozen. The surface is heat-sealed for safe transport. Wastepacks will pollute the surrounding terrain if they dissolve, deteriorate, or are otherwise destroyed. Toxic wastepacks are flammable. If burned or damaged, they will release tox gas.&lt;br /&gt;
| mass base = 6&lt;br /&gt;
| stack limit = 5 &lt;br /&gt;
| hp = 100&lt;br /&gt;
| beauty = -40&lt;br /&gt;
| flammability = 1&lt;br /&gt;
| deterioration = 4&lt;br /&gt;
| marketvalue  = 0&lt;br /&gt;
| defName = Wastepack&lt;br /&gt;
| thingCategories = ItemsMisc&lt;br /&gt;
| page verified for version = &lt;br /&gt;
}}&lt;br /&gt;
'''Toxic wastepacks''' are waste products created by mech-related buildings or the cleanup of [[polluted]] tiles.&lt;br /&gt;
&lt;br /&gt;
== Acquisition ==&lt;br /&gt;
[[Pollution pump]]s and pawns manually cleaning [[pollution]] on the ground will generate wastepacks, at a rate of 1 wastepack per 6 polluted tiles. Wastepacks may also be dropped into your colony as part of a [[Quests#Wastepack_Dumping|quest]].&lt;br /&gt;
&lt;br /&gt;
===Mechanoid Recharging and Gestation===&lt;br /&gt;
Toxic wastepacks are produced when [[friendly mechanoids]] utilize [[mech recharger]]s or [[large mech recharger]]s, or whenever a [[mech gestator]] or [[large mech gestator]] finishes gestating one. The amount of wastepacks produced is proportional to the Bandwidth of the mech recharged or gestated.&lt;br /&gt;
{{Mech Bandwidth}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Up to 5 toxic wastepacks can fit into 1 tile, and they do not fit on [[shelf|shelves]]. &lt;br /&gt;
&lt;br /&gt;
===Pollution===&lt;br /&gt;
When a wastepack is destroyed in any fashion, they will [[pollution|pollute]] 6 ground tiles of a colony, per wastepack. A full stack of 5 wastepacks pollutes 30 tiles. This pollution can spread through constructed [[wall]]s, but will not bypass natural stone walls.&lt;br /&gt;
&lt;br /&gt;
When burned or damaged, wastepacks release [[tox gas]], in addition to the pollution.&lt;br /&gt;
&lt;br /&gt;
When dumped from a [[caravan]], a caravan that is carrying them is destroyed, or sent via unmanned [[transport pod]], wastepacks will lower the [[goodwill]] of whatever faction has a faction base closest to the tile the wastepacks were dumped at, regardless of how far away that base is. The goodwill loss is proportional to the amount of waste dumped and its proximity to any nearby faction bases, ranging from {{--|1}} goodwill for just a few packs nearby up to {{--|60}} or more for multiple filled pods dumped directly on a base. Wastepacks dumped on the world map immediately pollute the world tile by 0.05%, requiring 2000 wastepacks to completely pollute a hex from 0% to 100%.&lt;br /&gt;
&lt;br /&gt;
If dumped in [[Orbit]]{{OdysseyIcon}}, wastepacks use the same proximity calculations as they do on the ground except that as the [[Traders guild]] is the only faction in orbit, they will always be the faction angered. Wastepacks dumped in orbit also will not result in tile pollution or affect the planet below.&lt;br /&gt;
&lt;br /&gt;
If the angered faction is hostile (including those made hostile by the wastepack dump), they may decide to retaliate. The percentage probability of retaliation is equal to the goodwill lost by the wastepack dump. Factions (except [[tribes]]) may retaliate by dropping wastepacks back at you, and hostile factions of any kind may send a [[raid]] in response to your &amp;quot;gifts&amp;quot;. Factions will randomly select (with equal probability) between the available responses, and the response will arrive after a random delay of one to three days. Multiple wastepack pod salvos done in short succession may result in back-to-back or even simultaneous raids. Both forms of retaliation are announced upon arrival with a &amp;quot;Pollution retaliation&amp;quot; letter.&lt;br /&gt;
&lt;br /&gt;
===Dissolving===&lt;br /&gt;
1 wastepack per stack will dissolve every 8 days, with the following factors:&lt;br /&gt;
* 0.5x if indoors.&lt;br /&gt;
* 2x if in [[Weather|rain]] and outdoors, even if [[roof]]ed.&lt;br /&gt;
* 0x if {{Temperature|0}} or lower. Any temperature above freezing point will not slow the dissolving of the wastepack.&lt;br /&gt;
&lt;br /&gt;
The packs also deteriorate in the same way as all other items. As an example, 5 Toxic wastepacks left out in the rain will dissolve 1 wastepack after 4 days and deteriorate the rest over the course of the next day or so as they lose HP at a rate of 20 per day outside in the rain. This means that even if temperature is below freezing when left outside or unroofed, a wastepack will slowly lose HP and eventually be destroyed, releasing the pollution inside. Unlike most other items, deterioration leaves behind the pollution inside rather than deleting the item altogether.&lt;br /&gt;
&lt;br /&gt;
===Gravship===&lt;br /&gt;
{{Odyssey|section=1}}&lt;br /&gt;
Unique to wastepacks, [[Gravship]]s cannot land on tiles occupied by them. When a wastepack dissolves on a tile occupied by a gravship hull the pollution will remain on the underlying and not within the gravship.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
===Storage===&lt;br /&gt;
A 7x7 room holds 245 wastepacks, and can be cooled by a single [[cooler]] in a double-walled room, and is effective up to an outside temperature of {{Temperature|41}}. 245 wastepacks are enough storage:&lt;br /&gt;
* To constantly run 8 [[bandwidth]] worth of [[mechanoids]] for 1 entire year, 4 bandwidth of mechs for 2 years...&lt;br /&gt;
* To store the waste of 2 [[toxifier generator]]s for ''6 years''. A [[pollution pump]], or a pawn cleaning the pollution by hand, is required to turn ground pollution into wastepacks.&lt;br /&gt;
Depending on [[biome|climate]] and freezer setup, you can get more storage with 1 cooler. And this is 1 cooler - worth {{Required Resources|Cooler}} and {{Q|Cooler|Power Consumption}} W of [[power]] (plus the material for [[wall]]s and [[door]]s). You can easily use multiple coolers to store your waste. This gives you enough time to get a form of waste disposal ready.&lt;br /&gt;
&lt;br /&gt;
===Disposal===&lt;br /&gt;
[[File:Wastepack disposal by shuttle.jpg|thumb|400px|right|&amp;lt;small&amp;gt;An Empire shuttle full of wastepacks. credit to /u/BenightedAlizar on r/rimworld&amp;lt;/small&amp;gt;]]&lt;br /&gt;
Most means of destroying wastepacks have some sort of consequence:&lt;br /&gt;
&lt;br /&gt;
* '''Letting it pollute.''' Pollution is localized - wastepacks that deteriorate or dissolve away from your base won't have an impact, at least for a while. [[Insectoid]]s may come as wastepacks are destroyed, and [[acidic smog]] can happen at high enough pollution levels.&lt;br /&gt;
* '''Dumping it offsite.''' Dumping will always incur a goodwill loss for a single faction based on the current relationship status, distance from the nearest [[faction base]] and number of wastepacks dumped. You will receive significantly larger penalties for dumping closest to allies than for dumping closest to hostile or neutral factions (e.g 1 wastepack dumped directly on a hostile will give -1 goodwill but if dumped on an ally it will give -12 goodwill). {{Check Tag|Odyssey|What about leaving the wastepacks behind when leaving in the gravship?}}&lt;br /&gt;
&lt;br /&gt;
You will always get at least -1 goodwill for dumping wastepacks. Even if you are situated on one pole of a 100% generated world and the nearest faction base is on the opposite pole and you dump a single wastepack one tile away from your base you will still receive a -1 penalty.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Faction status !! Dumping distances in tiles !! Goodwill lost (25 wastepacks)&lt;br /&gt;
|-&lt;br /&gt;
| Allied || 0 || 31&lt;br /&gt;
|-&lt;br /&gt;
| Allied || 1 || 15&lt;br /&gt;
|-&lt;br /&gt;
| Allied || 2 - 4 || 6&lt;br /&gt;
|-&lt;br /&gt;
| Allied || 5 - 16 || 2&lt;br /&gt;
|-&lt;br /&gt;
| Allied || 17+ || 1&lt;br /&gt;
|-&lt;br /&gt;
| Neutral || 0 || 25&lt;br /&gt;
|-&lt;br /&gt;
| Neutral || 1 || 12&lt;br /&gt;
|-&lt;br /&gt;
| Neutral || 2 - 5 || 5&lt;br /&gt;
|-&lt;br /&gt;
| Neutral || 6 - 18 || 2&lt;br /&gt;
|-&lt;br /&gt;
| Neutral || 19+ || 1&lt;br /&gt;
|-&lt;br /&gt;
| Hostile || 0 || 25&lt;br /&gt;
|-&lt;br /&gt;
| Hostile || 1 || 12&lt;br /&gt;
|-&lt;br /&gt;
| Hostile || 2 - 4 || 5&lt;br /&gt;
|-&lt;br /&gt;
| Hostile || 5 - 16 || 2&lt;br /&gt;
|-&lt;br /&gt;
| Hostile || 17+ || 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Wastepacks may also be dropped back at you, and if the faction is already hostile, you may start a [[raid]]. Dumping within 4 tiles of your colony will increase the chance for acidic smog.&lt;br /&gt;
** '''[[Caravan]]s''' take time and food to set up, and have a limited carrying capacity - especially without [[pack animal]]s or [[friendly mechanoids]]. &lt;br /&gt;
** '''[[Transport pod]]s''' can dump wastepacks far away. 1 pod, which can store up to 25 wastepacks, and per launch costs {{Required Resources|Transport pod}}, and a variable amount of {{Icon Small|chemfuel}} [[chemfuel]] depending on how far you launch it.&lt;br /&gt;
** '''[[Imperial shuttle]]s''' {{RoyaltyIcon}} store up to 333 wastepacks (2000 kg) at a time, and simply transporting waste will not anger the [[Empire]] - dumping it has the usual penalties. This costs 1 permit slot, has a cooldown of 40 days, and requires a [[noble]] pawn of at least Knight/Dame rank. This permit can theoretically support up to 5 bandwidth without honor costs (although the realistic value is slightly smaller).&lt;br /&gt;
* '''[[Wastepack atomizer]]s''' have no direct consequences from their use. However, they require a precious [[nano structuring chip]] to create, a fair amount of [[power]], and aren't fast. One atomizer can support 4.8 [[bandwidth]] of mechanoids - a [[mechanitor]] is very likely to have more.&lt;br /&gt;
* '''[[Polux tree]]s''', which are another clean form of pollution removal. These trees only grow naturally if there is plenty of pollution already, though [[polux seed|seeds]] can be bought from traders. They clean only 20% as fast as a [[Wastepack atomizer]], and can only clean if there is no artificial buildings in the area, but will erase [[pollution]] directly from the ground. This is also a downside for dealing with future pollution, as these trees do not stop wastepack infestations.&lt;br /&gt;
&lt;br /&gt;
[[File:Diabolus killing drop pods.png|thumb|336px|right|Diabolus destroying wastepack pods]]&lt;br /&gt;
When a landed [[transport pod]] is destroyed, its contents are vanished, which allows you:&lt;br /&gt;
&lt;br /&gt;
* '''Bomb landed transport pods''', which exploitatively deletes wastepacks carried in them, leaving only [[steel slag chunk]]s and no pollution. Each pod can load 25 wastepacks. However this method costs a lot of [[steel]]s and [[component]]s to operate.&lt;br /&gt;
** While pods drop scattered around the target position, they always drop in the chosen, enclosed room.&lt;br /&gt;
** The most reliable way to destroy landed transport pods is the [[hellsphere cannon]] of a [[Diabolus]], which can destroy 25 pods and 625 wastepacks in one hit.&lt;br /&gt;
&lt;br /&gt;
A pawn can be ordered to carry any chosen item by forming caravans. Additionally, by exploitatively forming caravans, a pawn can carry in its inventory up to the total colony carrying capacity, allows rapidly disposing wastepacks. This enables the following methods:&lt;br /&gt;
&lt;br /&gt;
* '''[[Death acidifier]]s''', which exploitatively deletes wastepacks carried on a pawn with the implant on death. This does not cause pollution.&lt;br /&gt;
* '''[[Subcore ripscanner]]s''', which exploitatively locks wastepacks carried on a pawn on death. The pawn's corpse can then be destroyed along with any wastepacks in its inventory. This does not cause pollution.&lt;br /&gt;
* '''Pollute the [[undercave]]'''{{AnomalyIcon}}, which also helps you deal with [[fleshbeast]]s since they are not immune to [[toxic buildup]]. Pollution of the undercave does not pollute your colony in any way, and they cease to exist once its associated [[pit gate]] collapsed.&lt;br /&gt;
** Note once the polluted tiles reach the Dreadmeld's room, it will slowly die of toxic buildup, triggering the cave to collapse as normal when it does.&lt;br /&gt;
* '''Pollute the [[labyrinth]]'''{{AnomalyIcon}}, but you must destroy all wastepacks there, or the [[warped obelisk]] will teleport them back to your colony when you leave there.&lt;br /&gt;
* '''Pollute the [[metal hell]]'''{{AnomalyIcon}}, wastepacks dropped there do not come back with your pawns.&lt;br /&gt;
* '''Pollute [[Quests#Ancient_Stockpile|Ancient Stockpile]]'''{{OdysseyIcon}}, for all the advantages of polluting the undercave, indefinitely.&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Wastepack_a.png&lt;br /&gt;
File:Wastepack_b.png&lt;br /&gt;
File:Wastepack_c.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Biotech DLC]] Release - Added.&lt;br /&gt;
* [[Version/1.4.3528|1.4.3528]] - Fix: Letting a pawn die on the world map with wastepacks will not pollute terrain.&lt;br /&gt;
* [[Version/1.4.3542|1.4.3542]] - Fix: Can destroy wastepacks on temp tiles to avoid relationship penalty loss.&lt;br /&gt;
* [[Version/1.4.3555|1.4.3555]] - Added more consequences for dumping near a [[faction base]].&lt;br /&gt;
&lt;br /&gt;
{{Biotech navbox}}&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Subcore_softscanner&amp;diff=174590</id>
		<title>Subcore softscanner</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Subcore_softscanner&amp;diff=174590"/>
		<updated>2026-02-01T21:42:18Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: General cleanup, reduction of the use of the term pawn, and spelling fixes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Biotech}}&lt;br /&gt;
{{Infobox main|building&lt;br /&gt;
| name = Subcore softscanner&lt;br /&gt;
| image = SubcoreSoftscanner north.png&lt;br /&gt;
| description = A pod with thousands of tiny tissue probes and a high-energy brain scanner. Once a person is inserted, the system uses the probes and scanner to sense a neuro-psychic pattern that it can analog-transfer to a new standard-tier mechanoid subcore. The person will be left temporarily sick, but unharmed.&amp;lt;br&amp;gt;Subcores are mechanoid brains and producing any mechanoid requires one. Standard-tier subcores produced by this softscanner can only power standard-tier mechanoids.&amp;lt;br&amp;gt;Higher tier subcores can be created by building a subcore ripscanner.&lt;br /&gt;
| type = Building&lt;br /&gt;
| type2 = Biotech (Buildings)&lt;br /&gt;
| placeable = &lt;br /&gt;
| path cost = &lt;br /&gt;
| passability = pass through only&lt;br /&gt;
| blockswind = &lt;br /&gt;
| mass base = 25&lt;br /&gt;
| cover = 0.3&lt;br /&gt;
| minifiable = false&lt;br /&gt;
| size = 2x3&lt;br /&gt;
| flammability = 0.5&lt;br /&gt;
| hp = 250&lt;br /&gt;
| beauty = 0&lt;br /&gt;
| power = 150&lt;br /&gt;
| terrain affordance = Light&lt;br /&gt;
| research = Standard mechtech&lt;br /&gt;
| skill 1 = Construction&lt;br /&gt;
| skill 1 level = 5&lt;br /&gt;
| work to make = 8000&lt;br /&gt;
| resource 1 = Steel&lt;br /&gt;
| resource 1 amount = 200&lt;br /&gt;
| resource 2 = Plasteel&lt;br /&gt;
| resource 2 amount = 50&lt;br /&gt;
| resource 3 = Component&lt;br /&gt;
| resource 3 amount = 4&lt;br /&gt;
| thingCategories = &lt;br /&gt;
| room role = Laboratory&lt;br /&gt;
}}&lt;br /&gt;
The '''subcore softscanner''' is a building added by the [[Biotech DLC]] that allows for the creation of [[standard subcore]]s by scanning [[human]] minds.&lt;br /&gt;
&lt;br /&gt;
== Acquisition ==&lt;br /&gt;
{{Acquisition}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
The subcore softscanner takes 150 W of [[power]]. Its only purpose is to produce a [[standard subcore]], which is an ingredient used in the gestation of the following mechanoids:&lt;br /&gt;
{{Ingredient List|Standard subcore|noCollapse=1}}&lt;br /&gt;
&lt;br /&gt;
A standard subcore requires {{Icon Small|Steel}} 50 [[Steel]] and {{Icon Small|Component}} 4 [[Component|Components]] to produce. Any [[human]] without scanning sickness can be selected for scanning by using the &amp;quot;Insert Person&amp;quot; button when selecting the subcore softscanner building. Upon selection, colonists and slaves will walk to the scanner if able, however prisoners or downed persons must be carried to the building by someone else. The scanning process takes {{Ticks|7500}} and inflicts scanning sickness upon completion.&lt;br /&gt;
&lt;br /&gt;
=== Scanning sickness ===&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;{{quote|&amp;quot;This person was scanned by a softscanner to produce a mechanoid subcore. The high-energy scanning device has caused disturbances in their brain chemistry which will take time to resolve themselves. There won't be any long-term damage.&amp;quot;|In-game description}}&lt;br /&gt;
A person scanned in a [[subcore softscanner]] to produce a [[standard subcore]] is afflicted with scanning sickness starting with a severity of 4 and decreasing in severity by 1 per in-game day for non-mechanitor pawns and severity decreasing by 2 per day for [[mechanitor]] pawns. This has the following effects:&lt;br /&gt;
* [[Consciousness]]: {{Bad|x75%}} (Post factors)&lt;br /&gt;
* [[Manipulation]]: {{Bad|x75%}} (Post factors)&lt;br /&gt;
* [[Moving]]: {{Bad|x75%}} (Post factors)&lt;br /&gt;
* [[Vomiting]] {{MTB}}: {{Bad|1.5 days}}&lt;br /&gt;
* [[Mood]]: {{--|8}}&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Scanning sickness reduces a colonist's [[consciousness]], [[moving]], and [[manipulation]] by 25% for four in-game days, which results in a severe reduction in productivity. As such, [[prisoner]]s are ideal candidates for scanning as they cannot do work anyways.&lt;br /&gt;
&lt;br /&gt;
Standard subcores are used in the gestation of a variety of useful mech types, such as [[tunneler]]s for mining ore deposits or [[scyther]]s for general melee combat. The softscanner is not expensive to build, but if you do not need or want any of the mechs that are gestated using standard subcores, then it is safe to skip.&lt;br /&gt;
&lt;br /&gt;
Note that every mech that requires a standard subcore is created at a [[large mech gestator]] and uses the [[large mech recharger]]. These two buildings cost {{Icon Small|steel||{{#expr: {{Q|Large mech gestator|Resource 1 Amount}} + {{Q|Large mech recharger|Resource 1 Amount}} }} }} [[steel]] and {{Icon Small|component||{{#expr: {{Q|Large mech gestator|Resource 2 Amount}} + {{Q|Large mech recharger|Resource 2 Amount}} }} }} [[component]]s. This is in addition to costs of the softscanner itself and the gestation of the mechs.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Subcore encoder]] - Creates [[basic subcore]]s.&lt;br /&gt;
* [[Subcore ripscanner]] - Creates [[high subcore]]s.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Biotech DLC]] Release - Added.&lt;br /&gt;
* [[Version/1.4.3534|1.4.3534]] - Added more feedback to subcore scanners.&lt;br /&gt;
* [[Version/1.4.3541|1.4.3541]] - Fix: Softcore{{Sic}} scanner tooltip formating.&lt;br /&gt;
* [[Version/1.4.3555|1.4.3555]] - In the 'Completed scan' message sent when subcore scan is cancelled, changed 'cancel load' to 'cancel scan'.&lt;br /&gt;
&lt;br /&gt;
{{Nav|biotech|wide}}&lt;br /&gt;
[[Category:Biotech (Buildings)]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Pollution&amp;diff=174587</id>
		<title>Pollution</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Pollution&amp;diff=174587"/>
		<updated>2026-02-01T17:06:59Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Rephrasing intro.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Biotech}}&lt;br /&gt;
{{Stub|reason=Mechanics (Pollution spread / acidic smog % chance / wastepack cocoons), detailed analysis}}&lt;br /&gt;
'''Pollution''' refers specifically to map pollution caused by the spread of ''toxic'' pollution, which generally results from the use of [[toxifier generator]]s or the decay of [[toxic wastepack]]s, which are generally produced via the recharging of [[allied mechanoid|friendly mechanoid]]s. Using [[wood-fired generator]]s or [[chemfuel generator]]s does not produce pollution.&lt;br /&gt;
&lt;br /&gt;
== Creation and spread ==&lt;br /&gt;
==== Within colonies ====&lt;br /&gt;
[[File:pollution_spread.png|400px|thumb|right|Ground pollution generated by a toxifier generator, visualized by the pollution overlay. The tiles under the player-built walls are polluted, though this does not show on the overlay.]]&lt;br /&gt;
Each [[toxic wastepack]] that is destroyed or disintegrates creates 6 tiles of pollution. Any means of destroying wastepacks creates pollution, except for the [[wastepack atomizer]].&lt;br /&gt;
&lt;br /&gt;
A [[toxifier generator]] creates 6 tiles of pollution every 3 days. &lt;br /&gt;
&lt;br /&gt;
[[Defoliator ship]]s will pollute an expanding circle of tiles when landing, centered on the ship. This is in addition to the actual defoliation; the pollution is separate and spreads much slower.&lt;br /&gt;
&lt;br /&gt;
Pollution created again in the same area will spread in an expanding circle. Natural rock walls block the pollution spread, but player-made walls and other structures do not (including smoothed walls).&lt;br /&gt;
&lt;br /&gt;
Pawns lingering in polluted tiles will accumulate [[Toxic buildup]] at a rate of 40% per day, assuming no [[Toxic Environment Resistance]] or [[Toxic Resistance]]. Unlike [[Toxic fallout]] or other map conditions, this is not mitigated by roofing the tile.&lt;br /&gt;
&lt;br /&gt;
==== On the World Map ====&lt;br /&gt;
Hexes on the world map can be polluted on world generation or by player action.&lt;br /&gt;
&lt;br /&gt;
Initial pollution coverage can be configured on world generation, with 5% as a default. Pollution will be distributed in  splotches around the world map, with heavily polluted hexes surrounded by less polluted hexes.&lt;br /&gt;
&lt;br /&gt;
Dumping wastepacks on a hex utilizing [[caravan]]s or [[transport pod]]s will increase the pollution percentage of the hex by 0.05% per Wastepack dumped, or 1.3% per full transport pod. Once a world map hex reaches 100% pollution, any additional pollution gain will instead happen to one of its 6 possible neighboring tiles- this can spread pollution to the player's colony if one is not careful. &lt;br /&gt;
&lt;br /&gt;
Caravans walking through polluted terrain will accumulate [[Toxic buildup]] based on their [[Toxic Environment Resistance]] and [[Toxic Resistance]] stats. The unmitigated rate will be at 20%/day for Moderately Polluted tiles (50-75% pollution) and 40% per day for Extremely Polluted tiles (75~100% pollution).&lt;br /&gt;
&lt;br /&gt;
Dumping wastepacks within 15 tiles of another faction settlement will cause the player to take a relationship penalty, scaling up with the number of wastepacks dumped and proximity to the settlement('''relationship penalty'''='''Number of wastepacks''' * '''distance coefficient'''|The distance coefficient represents the impact of the distance from the waste pod drop location to the faction position on the relationship penalty. The coefficients are as follows: 100% for 0 tiles, 50% for 1 tile, 20% for 2-4 tiles, 10% for 5-7 tiles, and 6.67% for 8-16 tiles ). Outlander and pirate factions may send a [[drop pod]] of waste back at you, while hostile factions can [[raid]] you(Probability = '''relationship penalty'''%).&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
{{Stub|section=1|reason = numbers and world tile and map tile effects, missing plants that can occur}}&lt;br /&gt;
Pollution takes the form of polluted tiles. Polluted soil has a fertility of 50%, as long as the soil's original fertility is greater than 0%. Polluted soil can only grow a limited number of plants, namely: &lt;br /&gt;
* [[Toxipotato plant]]s;&lt;br /&gt;
* [[Devilstrand]];&lt;br /&gt;
* [[Psychoid plant]]s; and&lt;br /&gt;
* [[Gray pine tree]]s&lt;br /&gt;
&lt;br /&gt;
Having polluted tiles increases the map's overall pollution, which causes a number of effects.&lt;br /&gt;
&lt;br /&gt;
Colonists will receive [[toxic buildup]] while standing or walking on these tiles at a rate of 40% severity per day.&lt;br /&gt;
&lt;br /&gt;
Pollution on the ground can be turned back into toxic wastepacks with a [[pollution pump]], or by ordering colonists to clean it up.&lt;br /&gt;
&lt;br /&gt;
=== Acidic smog ===&lt;br /&gt;
If there is enough pollution present within 4 tiles of your world tile, a weather effect known as Acidic smog will occur. How often depends on the level of pollution present. Tiles 2-4 spaces away have a 0.5x multiplier to pollution.&lt;br /&gt;
&lt;br /&gt;
Acidic smog covers the outdoor area with a greenish haze, reduces light levels by {{--|28%}}, slows plant growth by {{Bad|x50%}} (stacking with reduced light for a total of {{bad|22%}} growth), gives non-immune colonists the {{--|5}} ''Acidic Smog'' [[mood]]let, and [[deteriorate]]s items at 300% speed. Items and pawns indoors are not affected by acidic smog in any way. Having the [[Total antitoxic lungs]], [[Tox immunity]] or [[Breathless]]{{OdysseyIcon}} genes, having any installed [[Detoxifier lung|Detoxifier]] or [[Fleshmass lung]]s or having 100% [[Toxic Environment Resistance]] / [[Toxic Resistance]] renders immunity to the acidic smog moodlet. [[Partial antitoxic lungs]] / [[Tox resistance]] genes do not resist the acidic smog moodlet.&lt;br /&gt;
&lt;br /&gt;
Despite what players may expect, acidic smog itself does not have any negative health effects. The smog will affect pollution-friendly plants such as [[toxipotato plant|toxipotatoes]] the same as it does other plants. It does not provide or maintain [[Pollution stimulus (gene)|Pollution stimulus]]'s effects.&lt;br /&gt;
&lt;br /&gt;
=== Insectoids ===&lt;br /&gt;
Originally engineered as anti-mechanoid bioweapons, Giant [[insectoid|insects]] are drawn to pollution. When a toxic wastepack is destroyed, there's a chance for insectoid cocoons to emerge from the ground. These cocoons will hatch if a pawn comes within a small radius of them.&lt;br /&gt;
&lt;br /&gt;
=== Pollution stimulus ===&lt;br /&gt;
{{Main|Pollution stimulus}}&lt;br /&gt;
Insects and humans with the [[Pollution stimulus (gene)|Pollution stimulus]] gene are stimulated by the toxic fumes of polluted terrain, making them faster and deadlier.&lt;br /&gt;
* Pollution stimulus (minor): &lt;br /&gt;
** Moving x110%&lt;br /&gt;
** Consciousness +5%&lt;br /&gt;
* Pollution stimulus (moderate): &lt;br /&gt;
** Moving x115%&lt;br /&gt;
** Consciousness +5%&lt;br /&gt;
* Pollution stimulus (maximum): &lt;br /&gt;
** Moving x120%&lt;br /&gt;
** Consciousness +5%&lt;br /&gt;
&lt;br /&gt;
== Pollution mitigation ==&lt;br /&gt;
{{For|dealing with [[wastepack]]s themselves|Toxic wastepack#Disposal}}&lt;br /&gt;
&lt;br /&gt;
=== Cleaning polluted tiles ===&lt;br /&gt;
* Having colonists manually clean pollution via the Zoning tab. This exposes them to toxic buildup.&lt;br /&gt;
* [[Pollution pump]]s automatically pick up pollution in the area when [[power]]ed.&lt;br /&gt;
* Letting [[polux tree]]s cleanly consume pollution. However, they only grow in sufficiently polluted areas, and seeds are difficult to come across.&lt;br /&gt;
Note that the former two ways of cleaning pollution up only turn it into [[toxic wastepack]]s, which then need to be [[Toxic_wastepack#Disposal|dealt with]] somehow.&lt;br /&gt;
&lt;br /&gt;
=== Living with pollution ===&lt;br /&gt;
* '''[[Apparel]] items'''. [[Face mask]]s ({{+|50}}%), [[gas mask]]s ({{+|80}}%) and the [[Prestige robe]] ({{+|20}}%) give [[Toxic Environment Resistance]]. This protects the user from accumulating [[toxic buildup]] as quickly.&lt;br /&gt;
* '''[[Artificial body parts|Artificial parts]]'''. The [[detoxifier kidney]] ({{+|50}}% [[toxic resistance]]) and [[detoxifier lung]] ({{+|60}}% environmental resistance) will slow the effects of pollution. Two organs of the same type will stop toxic effects of pollution.&lt;br /&gt;
* '''[[Gene]]s'''. Tox resistance gives {{+|50}}% toxic resistance. Partial antitoxic lungs give {{+|50}}% environmental resistance. Tox immunity or Total antitoxic lungs render full immunity to pollution and acidic smog.&lt;br /&gt;
&lt;br /&gt;
Toxic resistance stacks additively with other sources of ''Toxic Resistance'', but stacks multiplicatively with Toxic ''Environment'' resistance. For example, a face mask and detoxifier lung, or face mask and partial antitoxic lungs, offers 100% resistance to pollution. A face mask and detoxifier kidney only provides 75% resistance to pollution.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Biotech DLC]] Release - Introduced.&lt;br /&gt;
* [[Version/1.4.3682|1.4.3682]] - Fix: Pollution overlay grid not updating after cell-filling buildings are destroyed.&lt;br /&gt;
* [[Version/1.5.4062|1.5.4062]] - Fix: Several issues with pollution clearing.&lt;br /&gt;
* [[Version/1.6.4566|1.6.4566]] - Gravships no longer clear pollution when landing.&lt;br /&gt;
&lt;br /&gt;
{{Biotech navbox}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Game mechanics]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Metalhorror&amp;diff=174585</id>
		<title>Metalhorror</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Metalhorror&amp;diff=174585"/>
		<updated>2026-02-01T17:03:10Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Removing check tag, adding kibble to list of non-infectable foods.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Anomaly}}&lt;br /&gt;
{{Spoiler}}&lt;br /&gt;
{{Rewrite|reason=General - Page needs overhaul, needs cleanup and redistribution of info into correct sections. Also missing important content e.g. detection mechanics}}&lt;br /&gt;
{{Infobox main|entity&lt;br /&gt;
| name = Metalhorror&lt;br /&gt;
| image = Metalhorror.png&lt;br /&gt;
| description = A horrific shifting mass of metal filaments, blades, and instruments. This metal is maintained and regenerated by a circulating dark fluid.&amp;lt;br/&amp;gt;While dormant, fluid metalhorrors are hidden in a host body. They use their host to infect others, creating more metalhorrors. If detected or endangered, the metalhorror will form a jagged exoskeleton and cut its way out of the host's flesh.&amp;lt;br/&amp;gt;An emerged metalhorror will eventually enter a low-energy hibernating state if left undisturbed.&lt;br /&gt;
&amp;lt;!-- Base Stats --&amp;gt;&lt;br /&gt;
| type = Entity&lt;br /&gt;
| type2 = Advanced&lt;br /&gt;
| flammability = 2&lt;br /&gt;
&amp;lt;!-- Containment --&amp;gt;&lt;br /&gt;
| minimum containment strength = 110&lt;br /&gt;
| anomaly knowledge = 4&lt;br /&gt;
| knowledge category = Advanced&lt;br /&gt;
| study interval = 120000&lt;br /&gt;
| bioferrite density = 4&lt;br /&gt;
| requires holding platform = true&lt;br /&gt;
| min monolith level for study = 1&lt;br /&gt;
| base escape interval MTB days = 60&lt;br /&gt;
&amp;lt;!-- Apparel --&amp;gt;&lt;br /&gt;
| armorsharp = 50&lt;br /&gt;
| armorblunt = 50&lt;br /&gt;
| armorheat = 0&lt;br /&gt;
&amp;lt;!-- Pawn Stats --&amp;gt;&lt;br /&gt;
| combatPower = 300&lt;br /&gt;
| movespeed = 5.5&lt;br /&gt;
| healthscale = 0.6&lt;br /&gt;
| bodysize = 1&lt;br /&gt;
| diet = none&lt;br /&gt;
| lifespan = 250&lt;br /&gt;
| trainable = None&lt;br /&gt;
| juvenileage = 0.016667&lt;br /&gt;
| maturityage = 0.05&lt;br /&gt;
| psychic sensitivity = 1.5&lt;br /&gt;
| toxic resistance = 1&lt;br /&gt;
| vacuum resistance = 1&lt;br /&gt;
| min comfortable temperature = -100&lt;br /&gt;
| max comfortable temperature = 250&lt;br /&gt;
&amp;lt;!-- Production --&amp;gt;&lt;br /&gt;
| gestation = 10&lt;br /&gt;
| meatyield = 0&lt;br /&gt;
| destroyyield = {{Icon Small|Bioferrite}} 10 - 20 + {{Icon Small|Shard}} 0 - 1&lt;br /&gt;
&amp;lt;!-- Melee Combat --&amp;gt;&lt;br /&gt;
| attack1dmg = 20&lt;br /&gt;
| attack1type = Cut&lt;br /&gt;
| attack1cool = 2&lt;br /&gt;
| attack1part = left blade&lt;br /&gt;
| attack2dmg = 20&lt;br /&gt;
| attack2type = Stab&lt;br /&gt;
| attack2cool = 2&lt;br /&gt;
| attack2part = left blade&lt;br /&gt;
| attack3dmg = 20&lt;br /&gt;
| attack3type = Cut&lt;br /&gt;
| attack3cool = 2&lt;br /&gt;
| attack3part = right blade&lt;br /&gt;
| attack4dmg = 20&lt;br /&gt;
| attack4type = Stab&lt;br /&gt;
| attack4cool = 2&lt;br /&gt;
| attack4part = right blade&lt;br /&gt;
| attack5dmg = 9&lt;br /&gt;
| attack5type = Blunt&lt;br /&gt;
| attack5cool = 2&lt;br /&gt;
| attack5part = head&lt;br /&gt;
| attack5chancefactor = 0.2&lt;br /&gt;
&amp;lt;!-- Technical --&amp;gt;&lt;br /&gt;
| defName = Metalhorror&lt;br /&gt;
| label = metalhorror&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The '''Metalhorror''' is an [[entity]] that can threaten your colony. It will infect your colonists one by one and burst out of them when it is ready to attack. &lt;br /&gt;
&lt;br /&gt;
== Occurrence ==&lt;br /&gt;
A metalhorror infection generally begins as a hidden illness suffered by a single pawn, which is initiated by a storyteller event that targets a pawn with a valid infection pathway. [[Creepjoiner]]s often come with drawbacks - one of which can be a metalhorror infection. Pre-infected pawns may arrive as [[guest]]s or [[raiders]].&lt;br /&gt;
&lt;br /&gt;
During the [[monolith]] awakening, several mature metalhorrors will be spawned to defend each [[void structure]]. Additionally, once all void structures are defeated, a final group of metalhorrors will spawn around the [[void monolith]].&lt;br /&gt;
&lt;br /&gt;
=== Infection === &lt;br /&gt;
{{Stub|section =1 |reason=Comprehensive list of transmission vectors. Attacks by entities, operations of all kinds by an infected doctor, tending by infected, food cooked by infected, food fed by infected doctor, and sleeping in the same bed with infected all reported. These, others, and existing vectors need verification and specifics. detection process - gray flesh, does the number to detect scale with researcher stats, what is the cooldown between gray flesh drops, more specific values for randomness on interrogation and undetected emerges, etc. Social interactions have a small chance to detect a MH infection - questions to be answered: Chance? Reports of 0.1% but verify. Which interactions can trigger?  Is it always honest (no false +ves, do two infected force a false -ve)?, Reports of animal interactions triggering it?&lt;br /&gt;
&lt;br /&gt;
do interrogator stats affect detection rate, do they affect safe detections vs release triggering detections?&lt;br /&gt;
&lt;br /&gt;
A non-colony, infected pawn of the map (e.g. released prisoner), triggers metalhorror release. transport pods excluded.  your own colonists excluded.}}&lt;br /&gt;
&lt;br /&gt;
Metalhorrors are entities that infect humans through their hosts, creating more of themselves as they do. It is possible to test or interrogate pawns in order to find out who is hosting a metalhorror. Upon detection through surgical inspection, and a random chance from being detected by interrogation (an option in the prisoner tab) or going undetected for too long, all metalhorrors will emerge out of their hosts and inflicting [[Damage_Types#Cut|cuts]]. The death of any host will also cause them to emerge, even if they have not been detected first. When emerging, metalhorrors will deal enough damage to down most hosts:&lt;br /&gt;
* They will never leave scars or kill their host when emerging.&lt;br /&gt;
* Ghouls and painless pawns can still be downed through damage to their legs. If they are not downed, they will have received enough damage to nearly kill them.&lt;br /&gt;
* Unconscious and incapacitated pawns will still receive damage albeit to a lesser extent.&lt;br /&gt;
&lt;br /&gt;
Metalhorrors can spread between colonists in various ways.&lt;br /&gt;
&lt;br /&gt;
The initial infection is activated by a miscellaneous storyteller event that chooses a random pawn under the player's control on the map (colonists, slaves, and prisoners) with a valid infection pathway:&lt;br /&gt;
* Implantation before arrival. This applies to any pawn upon first spawning, except for the initial colonists, babies, and duplicates from the [[corrupted obelisk]]. Additionally, use of a [[resurrector mech serum]] or a charge of [[death refusal]] will apply the pre-arrival infection pathway again, except to the aforementioned pawns. This will be listed as &amp;quot;implanter insectoid&amp;quot; for creepjoiners despite insectoids not being a valid infection pathway.&lt;br /&gt;
* During [[revenant]] hypnosis.&lt;br /&gt;
* The melee attack of a [[shambler]], [[fleshbeast]], [[noctol]], or [[sightstealer]].&lt;br /&gt;
&lt;br /&gt;
Metalhorror implantation events do not cause any letter to appear, however gray flesh appearing does.&lt;br /&gt;
&lt;br /&gt;
Note that an infection pathway is not by any means guaranteed to become a full-fledged metalhorror infection. Pawns with infection pathways are not considered metalhorror hosts and will not spread the infection or generate gray flesh until and unless the metalhorror event triggers on them. An infection pathway expires after 30 days, and a pawn can have up to 100 infection pathways at a time before old ones are deleted to make room for new ones. Metalhorror emergence does not remove infection pathways. If a metalhorror event triggers when no suitable target pawn possesses a valid infection pathway, the game will spawn a creepjoiner with a hidden metalhorror infection.  It's highly recommended for players to quarantine new creepjoiners until they have been cleared for hidden infections. This is especially true if the creepjoiner spawned immediately after conducting a void provocation ritual.  &lt;br /&gt;
&lt;br /&gt;
Once a metalhorror infection is active, its host can secretly spread it to other pawns. Pawns infected this way gain the metalhorror infection immediately, rather than using the infection pathway system, and as such can start infecting other pawns from the moment they're infected. The following activities, when performed by an infectee, can spread a metalhorror infection:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Infection event !! Details !! Infection chance per event&lt;br /&gt;
|-&lt;br /&gt;
! Sharing a bed&lt;br /&gt;
| &lt;br /&gt;
* An infected pawn sharing any two-person bed or sleeping spot spreads the infection to any bedmates. &lt;br /&gt;
* The pawns do not need to be in a relationship or participate in [[lovin]]' for the implantation to occur. &lt;br /&gt;
* Pawns sharing the same barracks but not the same two-person beds or sleeping spots will '''not''' spread the infection.&lt;br /&gt;
| 100%&lt;br /&gt;
|-&lt;br /&gt;
! Performing surgery  &lt;br /&gt;
| &lt;br /&gt;
* Any medical bill performed on a pawn by an infected pawn can spread the infection.&lt;br /&gt;
** This includes minor operations that might not be obvious as vectors, such as anesthetization, administration of drugs, [[xenogerm]] implantation,{{BiotechIcon}} and [[Hemogen pack|blood transfusions]].{{BiotechIcon}} &lt;br /&gt;
* Tending '''does not''' spread metalhorror infections.&lt;br /&gt;
| 50%&lt;br /&gt;
|-&lt;br /&gt;
! Cooking a meal&lt;br /&gt;
| &lt;br /&gt;
* Each meal cooked by an infected pawn has a chance to infect a pawn that eats it.&lt;br /&gt;
** This chance is rolled upon consumption, not upon creation of the meal.&lt;br /&gt;
** Unlike food poisoning, there is no averaging of infection rates when a tainted meal is added to a meal stack - the number of tainted meals in the stack is kept constant, and pawns will prioritize consuming tainted meals.&lt;br /&gt;
** Pemmican, baby food, and kibble cannot be infected.&lt;br /&gt;
* '''After the infection is revealed, it is possible to have your colony reinfected by tainted meals.'''Even after the event has ended, the meals will retain their Metal Horror infectious properties and will not be neutralized. Unless you can guarantee that the cooks are not infected, you will need to discard all of the meals.{{Check Tag|Detail needed|Do you need to do the flesh research again or is it considered the same?}}&lt;br /&gt;
| 4%&lt;br /&gt;
|-&lt;br /&gt;
! [[Unnatural healing]]&lt;br /&gt;
| &lt;br /&gt;
* Use of the ability by an infected pawn on an uninfected pawn spreads the infection.&lt;br /&gt;
| 100%&lt;br /&gt;
|- &lt;br /&gt;
! Feeding patients&lt;br /&gt;
| &lt;br /&gt;
* An infected pawn feeding anything to a patient can infect the patient. This includes [[hemogen pack]]s{{BiotechIcon}} being fed to [[Hemogen|hemogenic]]{{BiotechIcon}} prisoners and patients.&lt;br /&gt;
| 30%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Detailed Information to be cleaned up ===&lt;br /&gt;
{{Rewrite|section=1|reason=Move this info into the correct  sections of this page}}&lt;br /&gt;
There are two separate metalhorror incidents. Both fire as Minor Threats.&lt;br /&gt;
&lt;br /&gt;
Metalhorror implantation fires on a random colonist that meets specific criteria such as recently joined colony or damaged by [[entities]]. &lt;br /&gt;
* Requires monolith level 1. &lt;br /&gt;
* Can trigger on day 30 at the earliest. &lt;br /&gt;
* 45 day cooldown&lt;br /&gt;
* Requires a colonist count of 4 and 300 [[raid points]].&lt;br /&gt;
&lt;br /&gt;
Creepjoiner infected with Metalhorrors:&lt;br /&gt;
* Requires monolith level 2. &lt;br /&gt;
* Can trigger on day 10 at the earliest.&lt;br /&gt;
* 60 day cooldown. &lt;br /&gt;
* No raid point nor a Colonist count requirement.&lt;br /&gt;
&lt;br /&gt;
The first gray flesh appears 1.5 to 2.5 days after infection. When a gray flesh is to be dropped, there is an additional 1 to 12 hour delay. One gray flesh can drop every 3 to 10 days.&lt;br /&gt;
&lt;br /&gt;
If half of your colonists are infected, the chance for metalhorrors to emerge will approach 100% after a few hours.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Contrary to other non-human entities, they have three different life stages. They need 1 day to grow from larva to juvenile, and another two days to grow from a juvenile to a mature metalhorror.{{Check Tag|Counts time inside?|When does this growth start? From exiting the pawn or from infection?}}&lt;br /&gt;
&lt;br /&gt;
Metalhorrors do not leave behind [[corpse]]s when killed, instead breaking down into a pile of {{Icon Small|Bioferrite||10-20}} [[bioferrite]], and occasionally {{Icon Small|shard||1}} [[shard]].{{Check Tag|Chance?}}&lt;br /&gt;
&lt;br /&gt;
=== Containment ===&lt;br /&gt;
The metalhorror yields 2.0 to 4.4 [[bioferrite]] and 160W to 220W per day.&lt;br /&gt;
&lt;br /&gt;
=== Combat ===&lt;br /&gt;
When attacked, metalhorrors only receive 25% of damage.{{Check Tag|Stat?|Incoming Damage Multiplier?}} They can be stunned by EMP, but never adapt to it. They also have 200% [[flammability]].&lt;br /&gt;
&lt;br /&gt;
A metalhorror's attacks are identical to those of a [[scyther]]. Metalhorrors attack with a blade attached to each arm, dealing a massive 20 damage per blade. While they technically have a blunt Head attack, they will never use it unless their arms are destroyed. Even for brawlers with high melee skill, metalhorrors are extremely dangerous.{{Check Tag|Maturity?|How do larval and juvenile metalhorrors compare to mature ones?}} Larval and juvenile metalhorrors deal less damage.&lt;br /&gt;
&lt;br /&gt;
Metalhorrors' legs have a total of 36% chance to be targeted by damage, almost twice that of human legs, while having only 60% as much health. This makes them more likely to have both legs destroyed in combat.&lt;br /&gt;
&lt;br /&gt;
Metalhorrors have a [[psychic sensitivity]] of 150%, making certain [[psycast]]s{{RoyaltyIcon}} more effective on them.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Metalhorrors are easy to fight if you have EMP weapons. Because they don't adapt to EMP, they can be stunned indefinitely&lt;br /&gt;
&lt;br /&gt;
=== Metalhorror infection ===&lt;br /&gt;
Once gray flesh is discovered, it is important to consider the pawns most likely to spread infections - Cooks, Doctors, and Wardens. &lt;br /&gt;
* Tracing infections from an infected cook is nigh-impossible. Consider switching the entire colony to eating [[Nutrient paste meal|nutrient paste]] which will prevent meals from being an infection vector until the metalhorrors have been rooted out. &lt;br /&gt;
* Doctors only spread infections while operating or feeding patients, which allows some estimation as to who an infection might have been passed to. Do not schedule surgeries while a metalhorror infection is confirmed unless absolutely necessary. Pawns that have been downed and fed by doctors are susceptible to infection.&lt;br /&gt;
* Permanently downed prisoners (e.g those with legs removed), and recently acquired prisoners recovering from being downed in combat, are highly likely to be infected by an infected warden. Thankfully prisoners can be interrogated and their infections uncovered- even by infected wardens.&lt;br /&gt;
* Once a pawn has been confirmed as having an infection, if they share a bed or sleeping spot with another pawn, that other pawn will be infected.&lt;br /&gt;
&lt;br /&gt;
==== Detection ====&lt;br /&gt;
After discovering gray flesh, colonists can occasionally notice &amp;quot;some combination of unusual behavior&amp;quot; in another colonist while chatting. The name of the infected colonist (as well as the suspicious one) will be revealed in a letter. This can give the player some hints about who is infected, and how the infection may be spreading throughout the colony. However, confirming metalhorror infection still requires a surgical inspection after gray flesh has been sufficiently studied.&lt;br /&gt;
&lt;br /&gt;
[[Paramedic]]s{{BiotechIcon}} can never become infected or lie about test results, so they can be used to test for Metalhorror infections safely.&lt;br /&gt;
&lt;br /&gt;
If you don't have a paramedic, the following procedure can be done after studying 2 pieces of gray flesh:&lt;br /&gt;
&lt;br /&gt;
# Have 2 doctors&lt;br /&gt;
# The instant you become aware of a Metalhorror infection, have doctor 1 check someone other than doctor 2&lt;br /&gt;
# If they find an infection, doctor 1 is clear.&lt;br /&gt;
# If they do not, have doctor 2 check the patient&lt;br /&gt;
# if they find an infection, doctor 1 is infected&lt;br /&gt;
# If they do not, have doctor 1 check again&lt;br /&gt;
# if doctor 1 finds an infection, doctor 2 is infected&lt;br /&gt;
# if doctor 1 does not, then either both doctors are clear or both are infected.&lt;br /&gt;
&lt;br /&gt;
Alternately, the player can systematically order every colonist to repeatedly conduct surgical inspections on a sacrificial pawn such as a prisoner.  Eventually, the sacrificial pawn will be infected with a metalhorror which will be detected with a subsequent examination.&lt;br /&gt;
&lt;br /&gt;
In the event of total infection, a sufficient number of [[Mechanoids]] can safely clear out the revealed Metalhorrors, as long as the [[Mechanitor]]s {{BiotechIcon}} they are linked to are still alive.&lt;br /&gt;
&lt;br /&gt;
==== Force emergence by bed sharing ====&lt;br /&gt;
Since metalhorrors always emerge when they have infected half of your colony, and infection occurs as soon as two pawns share the same bed, you can trigger metalhorror emergence by letting your pawns share beds.&lt;br /&gt;
&lt;br /&gt;
Some pawns must stay outside to fight the metalhorrors though. Since they may also be infected, each of them should stay in a different room to contain the potential metalhorror. These pawns should have good melee and doctor skills to tend your downed pawns afterward.&lt;br /&gt;
&lt;br /&gt;
The number of participating pawns should be at least half of your colony to guarantee that the threshold is reached. Create a double sleeping spot in a separate room for every 2 participating pawns. Then create anethetize bills for each pawns and assign them to rest on the same spot (the game will say that the spot has been reserved, but just prioritize it anyway). You should assign pawns to sleep with someone who is not their lover or spouse, since lovers should already have infected eachother when they share the same bed before. If the threshold has been reached, metalhorrors should emerge after a few seconds. If not, swap the partners around until they emerge.&lt;br /&gt;
&lt;br /&gt;
You can prepare for the emergence by armoring the pawns who have to stay outside and setting spiketraps in the bedrooms for the metalhorrors to trigger.&lt;br /&gt;
&lt;br /&gt;
==== Prevention ====&lt;br /&gt;
Now as for preventing Metalhorrors from spreading premptively for the event of a infection, you can do the following&lt;br /&gt;
* Set a zone forbidding pawns from accessing prisons, kitchens and hospitals, and set that zone onto any pawn who has less then 30 days in their record, especially creepjoiners, or pawns who were attacked by revenants or any of the entities described in the summary, and keep note of the days in their record and set the zone off once the pathway has expired.&lt;br /&gt;
** Cooks can still butcher and cook pemmican safely and doctors can be left to treat animals if you separate those into different rooms.&lt;br /&gt;
** Slaves do not have a record for time spent as a colonist so stats like time spent under a roof can be used as a rough estimate.&lt;br /&gt;
** Colonists that were in the colony for over a year have their record set as #.# making keep track of them more difficult, the combat log can be used instead albeit those are prone to being wiped. {{Check Tag|When?|When do combat logs expire, if its less then 30 days then this might not be as effective}}&lt;br /&gt;
* If a gray flesh event sets off then you can check any pawns who were assigned that zone.&lt;br /&gt;
* For lovers you can place another bed in their room and assign the suspect to it, preventing the sleeping alone moodlet. a bedroll may be used instead to prevent the room's space stat from being reduced.&lt;br /&gt;
* For combat encounters with entities you should ideally avoid having humans do melee combat, and let mechanoids and animals tank the hits instead.&lt;br /&gt;
&lt;br /&gt;
Imprisoning suspects such as creepjoiners runs the risk of [[prison break]]s and thus the possibility of outright losing them due to casualities or escaping so assigning a &amp;quot;Quarantine&amp;quot; zone to them until their drawback is identified can be a better alternative.&lt;br /&gt;
&lt;br /&gt;
=== Mature metalhorror ===&lt;br /&gt;
You will fight groups of mature metalhorrors during the [[monolith]] awakening, they can do serious damage to your colony, but do not cause metalhorror infection.&lt;br /&gt;
&lt;br /&gt;
Fighting metalhorrors is much like fighting [[scyther]]s, due to their identical melee attacks and fighter role in combat. The same tactics that apply to scythers largely also apply to them, as they also vulnerable to EMP and can similarly be lured into [[spike trap]]s. However, Metalhorrors are much faster and more resistant to damage than scythers.&lt;br /&gt;
&lt;br /&gt;
One disadvantage they have compared to scythers is that Metalhorrors are highly flammable. They can be ignited very easily and will disengage from combat while on fire. A pawn armed with an [[incendiary launcher]], [[molotov cocktails]], or [[incinerator]] can easily cripple a pack of metalhorrors.&lt;br /&gt;
&lt;br /&gt;
=== Containment ===&lt;br /&gt;
Due to the high containment requirements of metalhorrors and their sharp attacks, healthy ones are dangerous to maintain. However, legless metalhorrors can be captured with no risk of escape. They yield a decent 2.0 - 4.4 bioferrite/day{{Check Tag|Verify|How is this number derived and then verify the range}} depending on body size. If you find downed metalhorrors with damaged legs, continue to punch them with bare hands until both their legs are shattered, or death. Metalhorrors' high armor makes the first case more likely to happen than other entities.&lt;br /&gt;
&lt;br /&gt;
== Health == &lt;br /&gt;
=== Body parts === &lt;br /&gt;
{{Recode|section=1|reason=&amp;quot;Metalhorror&amp;quot; body type not supported.}}&lt;br /&gt;
{{Animal Health Table|Metalhorror}}&lt;br /&gt;
=== Armor ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Armor&lt;br /&gt;
|-&lt;br /&gt;
| {{Apparel Protection Chart&lt;br /&gt;
| set1name= {{P|Name}} (Sharp) | set1armor1={{P|Armor - Sharp}} &lt;br /&gt;
| set2name= {{P|Name}} (Blunt) | set2armor1={{P|Armor - Blunt}} &lt;br /&gt;
| set3name= {{P|Name}} (Heat) | set3armor1={{P|Armor - Heat}} &lt;br /&gt;
| color= grey, blue, red&lt;br /&gt;
}} &lt;br /&gt;
|}&lt;br /&gt;
{{Pawn Attack Table}}&lt;br /&gt;
&lt;br /&gt;
== Gallery ==&lt;br /&gt;
=== Larva ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Metalhorror Larva east.png|East&lt;br /&gt;
Metalhorror Larva north.png|North&lt;br /&gt;
Metalhorror Larva south.png|South&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Juvenile ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Metalhorror Juvenile east.png|East&lt;br /&gt;
Metalhorror Juvenile north.png|North&lt;br /&gt;
Metalhorror Juvenile south.png|South&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mature ===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Metalhorror Mature east.png|East&lt;br /&gt;
Metalhorror Mature north.png|North&lt;br /&gt;
Metalhorror Mature south.png|South&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Infection Vectors===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Metal_Horror_Cooking.PNG|Cooking&lt;br /&gt;
Metal_Horror_Fingerspike_Attack.PNG|Fingerspike Attack&lt;br /&gt;
Metal_Horror_Meal_and_Surgery1.PNG|Feeding Meals and Surgery&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version history == &lt;br /&gt;
* [[Anomaly DLC]] Release - Added.&lt;br /&gt;
* [[Version/1.6.4518|1.6.4518]] - Fix: Added eyes to metalhorrors. Previously a metalhorror's mind core functioned as both its eyes and brain, allowing the &amp;quot;[[Hediffs#Dirt|kick dirt in eyes]]&amp;quot; melee effect when fighting on appropriate terrain to instantly incapacitate them until the effect wore off.&lt;br /&gt;
* [[Version/1.6.4566|1.6.4566]] - Fix: Metalhorror filth not spawning if previous map was abandoned with specific timing.&lt;br /&gt;
&lt;br /&gt;
{{Nav|entity|wide}}&lt;br /&gt;
[[Category: Entities]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Rooms&amp;diff=174582</id>
		<title>Rooms</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Rooms&amp;diff=174582"/>
		<updated>2026-02-01T16:54:02Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Rephrasing edited outdoor temperature explanation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- This is a hidden reference because I couldn't figure out how to hide it any other way 😭 --&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;ref name=&amp;quot;penalty&amp;quot;&amp;gt;Work speed penalty of 80% if not placed in the room with the correct role.&amp;lt;/ref&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| align=center | {{Gameplay Nav}} |}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
A '''room''' is a space fully enclosed by impassable objects such as [[wall]]s, [[door]]s (open or closed), [[vent]]s, natural rock, or [[cooler]]s. Corners do not need to be filled in order to enclose a room.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
A room that's at least 75% [[roof]]ed is considered [[indoors]]. This distinction affects [[temperature]], [[Deterioration Rate]], [[Work Speed Factor]], and pawns' [[outdoors]] and indoors needs. {{Check Tag|Verify|Does it really affect all these stats, and how specifically?}}&lt;br /&gt;
&lt;br /&gt;
An indoor room will remain an indoor room when its doors are open — even when they're held open permanently. [[Vac barrier]]s also enclose a room despite not being impassable. If a door is destroyed and the room is no longer enclosed, the room will instantly be considered outdoors.&lt;br /&gt;
&lt;br /&gt;
The maximum size of a room is 36 [[#Map regions|map regions]]. The equivalent size in tiles varies based on the position and shape of the room, but as reference:&lt;br /&gt;
* The maximum area possible per room is 5,184 tiles (72x72).&lt;br /&gt;
* An empty 50x50 square room is the largest room that won't have issues with map regions.&lt;br /&gt;
* The more complex the shape of a room, the more likely it is to run into problems with map regions.&lt;br /&gt;
* Above this size, the area in question will be treated as a non-room indoors space.&lt;br /&gt;
&lt;br /&gt;
=== Temperature ===&lt;br /&gt;
Indoor rooms can have a different temperature than the outside. Open [[door]]s, open [[vent]]s, or missing roof tiles will increase the rate at which heat is exchanged with the outdoors. For further information, see the [[temperature]] page.&lt;br /&gt;
&lt;br /&gt;
If 25% or more of a room is unroofed, if it is open to the map edge, or is otherwise not fully enclosed (missing a wall), then it is considered outdoors and it will instantly equalize with the outdoor temperature.&lt;br /&gt;
&lt;br /&gt;
== Roles ==&lt;br /&gt;
'''Room roles''' are assigned to a room based on the buildings they contain, such as a ''kitchen'' when containing an [[electric stove]] or a [[fueled stove]]. They determine whether a colonist is affected by all, some, or none of the room stats.&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
Certain room roles grant [[mood]]lets based on their [[Impressiveness]], which is affected by all four substats. To gain the moodlet, the room must be used by a pawn for the role's associated purpose (i.e., eating at a table for the dining room role or playing billiards for the rec room role). Despite the game displaying only one role, rooms can grant moodlets from multiple roles when used for that role. The moodlets are typically {{Check Tag|When not?}} applied when a colonist ''begins'' said activity in the room, and they last for 24 hours. {{Check Tag |Verify| What about deathresting? It uses a separate thought.}}&lt;br /&gt;
&lt;br /&gt;
Buildings associated with hospitals, laboratories, and kitchens make direct use of the [[Cleanliness]] stat for their [[Work Speed Factor]].&lt;br /&gt;
&lt;br /&gt;
Some room roles cannot have certain buildings inside without inflicting a mood penalty (i.e., [[Titles#Thrones and Bedrooms|throne rooms]] {{RoyaltyIcon}} and temples {{IdeologyIcon}} with [[Production|workstations]]).&lt;br /&gt;
&lt;br /&gt;
Pawns also have separate needs for [[Beauty]] and [[Space]], which every room can fulfill. Unlike the room stats of the same name, these needs are checked within a certain radius from the pawn, as opposed to anywhere in the room. See those pages for further details.&lt;br /&gt;
&lt;br /&gt;
=== Score calculation ===&lt;br /&gt;
For each room, every room role is given a score based on the buildings inside, and the role with the highest score is the one displayed. In the case of a tie, the earlier roles on the following table take priority.&lt;br /&gt;
&lt;br /&gt;
For the purposes of room role scoring, the following are considered non-baby human beds: {{RoomRolesBuildingList|Bed-associated rooms}}.&lt;br /&gt;
&lt;br /&gt;
=== List of roles ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Label&lt;br /&gt;
! Mood impact&lt;br /&gt;
! Related stats&lt;br /&gt;
! Score calculation logic&lt;br /&gt;
|-&lt;br /&gt;
| Room&lt;br /&gt;
| None&lt;br /&gt;
| None ||&lt;br /&gt;
* Returns a score of 0.99.&lt;br /&gt;
|-&lt;br /&gt;
| Bedroom &amp;lt;ref name=&amp;quot;owner name&amp;quot;&amp;gt;This role will have its owners' name added to its name.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There are no human beds.&lt;br /&gt;
** There is at least 1 medical human bed or at least 1 prisoner human bed.&lt;br /&gt;
** There is more than 1 non-assigned human bed.&lt;br /&gt;
** There is at least 1 adult assigned and there are other pawns assigned that are not in its love cluster.&amp;lt;ref&amp;gt;A pawn's love cluster is all the other pawns that can be linked to the pawn through a chain of romantic relationships.&amp;lt;/ref&amp;gt;&lt;br /&gt;
** There is at least 1 child assigned and there aren't any adults assigned that are a parent of the child.&lt;br /&gt;
* Returns 100,000 score otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Prison cell &amp;lt;ref name=&amp;quot;owner name&amp;quot; /&amp;gt;&lt;br /&gt;
| [[Mood#Situational RoomStats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 non-prisoner humanlike bed.&lt;br /&gt;
** There is more than 1 humanlike bed.&lt;br /&gt;
* Returns 170,000 score for a non-medical prisoner humanlike bed.&lt;br /&gt;
* Returns 100,000 score for a medical prisoner humanlike bed.&lt;br /&gt;
|-&lt;br /&gt;
| Dining room&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 12 score per each one of the following: {{RoomRolesBuildingList|Dining room}}.&lt;br /&gt;
|-&lt;br /&gt;
| Rec room&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 7 score per each one of the following: {{RoomRolesBuildingList|Rec room}}.&lt;br /&gt;
|-&lt;br /&gt;
| Hospital&lt;br /&gt;
| [[Mood#Situation RoomStats|Yes]]&lt;br /&gt;
| [[Impressiveness]], [[Room stats|Cleanliness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 prisoner humanlike bed.&lt;br /&gt;
** There are no medical humanlike beds.&lt;br /&gt;
* Returns 100,000 score otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Laboratory&lt;br /&gt;
| No&lt;br /&gt;
| [[Room stats|Cleanliness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 60 score per each one of the following: {{RoomRolesBuildingList|Laboratory}}.&lt;br /&gt;
|-&lt;br /&gt;
| Workshop&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 27 score per each one of the following: {{RoomRolesBuildingList|Workshop}}. The [[crafting spot]] does ''not'' count.&lt;br /&gt;
|-&lt;br /&gt;
| Storeroom&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 1 score per each one of the following: {{RoomRolesBuildingList|Storeroom}}.&lt;br /&gt;
|-&lt;br /&gt;
| Barracks &amp;lt;ref name=&amp;quot;owner name&amp;quot; /&amp;gt;&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 prisoner humanlike bed.&lt;br /&gt;
** The room is a valid bedroom.&lt;br /&gt;
* Returns 100,100 score for every non-medical humanlike bed otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Prison barracks &amp;lt;ref name=&amp;quot;owner name&amp;quot; /&amp;gt;&lt;br /&gt;
| [[Mood#Situation RoomStats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 non-prisoner humanlike bed.&lt;br /&gt;
** There are less than 2 prisoner beds.&lt;br /&gt;
* Returns 100,100 score per non-medical prisoner bed and 50,001 per medical prisoner bed.&lt;br /&gt;
|-&lt;br /&gt;
| Kitchen&lt;br /&gt;
| No&lt;br /&gt;
| [[Room stats|Cleanliness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 28 score per production building that has at least 1 recipe that produces an edible result. The following fulfill the requirement: {{RoomRolesBuildingList|Kitchen}}. The [[brewery]], [[butcher spot]], and [[butcher table]] do ''not'' fulfill the requirement.&lt;br /&gt;
|-&lt;br /&gt;
| Tomb&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 50 score per each one of the following: {{RoomRolesBuildingList|Tomb}}.&lt;br /&gt;
|-&lt;br /&gt;
| Barn&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 7.6 score per non-humanlike bed, which are the following: {{RoomRolesBuildingList|Barn}}.&lt;br /&gt;
|-&lt;br /&gt;
| [[Throne room]] {{RoyaltyIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 10,000 score if there is any one of the following: {{RoomRolesBuildingList|Throne room}}.&lt;br /&gt;
* Returns 0 score otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Temple {{IdeologyIcon}} &amp;lt;ref&amp;gt;This role changes to the ideoligion's set temple name.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns -1 score if the [[Ideology DLC]] is not active.&lt;br /&gt;
* Returns 0 score if there are no altars with the colony's ideology.&lt;br /&gt;
* Returns 75 score per altar with the colony's ideology, with a minimum of 2,000 score. The following are considered altars: {{RoomRolesBuildingList|Temple}}.&lt;br /&gt;
|-&lt;br /&gt;
| Nursery {{BiotechIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** The [[Biotech DLC]] is not active.&lt;br /&gt;
** There is at least 1 non-medical prisoner bed or at least 1 non-baby bed.&lt;br /&gt;
** There are less than 2 baby beds.&lt;br /&gt;
* Returns 100,200 score per baby bed. The following are considered baby beds: {{RoomRolesBuildingList|Nursery}}.&lt;br /&gt;
|-&lt;br /&gt;
| Playroom {{BiotechIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** The [[Biotech DLC]] is not active.&lt;br /&gt;
** There is at least 1 humanlike bed in the room.&lt;br /&gt;
* Returns 8 score per each one of the following: {{RoomRolesBuildingList|Playroom}}.&lt;br /&gt;
|-&lt;br /&gt;
| Classroom {{BiotechIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** The [[Biotech DLC]] is not active.&lt;br /&gt;
** There is at least 1 human bed in the room.&lt;br /&gt;
* Returns 8 score per each one of the following: {{RoomRolesBuildingList|Classroom}}.&lt;br /&gt;
|-&lt;br /&gt;
| Deathrest chamber {{BiotechIcon}}&lt;br /&gt;
| Yes&lt;br /&gt;
| [[Room stats|Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 100 score per [[deathrest casket]] {{BiotechIcon}} and 50 score per [[deathrest accelerator]] {{BiotechIcon}}, [[glucosoid pump]] {{BiotechIcon}}, [[hemogen amplifier]] {{BiotechIcon}}, [[hemopump]] {{BiotechIcon}}, or [[psychofluid pump]] {{BiotechIcon}}.&lt;br /&gt;
|-&lt;br /&gt;
| Containment cell {{AnomalyIcon}}&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 100 score per [[holding platform]] {{AnomalyIcon}} or [[holding spot]] {{AnomalyIcon}} and 50 score per [[bioferrite harvester]] {{AnomalyIcon}}, [[electric inhibitor]] {{AnomalyIcon}}, or [[electroharvester]] {{AnomalyIcon}}.&lt;br /&gt;
|-&lt;br /&gt;
| Ceremonial chamber {{AnomalyIcon}}&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 200 score per each one of the following: {{RoomRolesBuildingList|Ceremonial chamber}}.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Other pieces of [[furniture]] not mentioned, such as [[chair|chairs]], are not considered for score calculation.&lt;br /&gt;
&lt;br /&gt;
== Stats ==&lt;br /&gt;
[[File:quality preview.png|300px|right]]&lt;br /&gt;
'''Room stats''' are values of a room that passively affect both [[thought]]s about the room itself and some events and activities that take place within. These include [[Impressiveness]], which is calculated from four composite stats: [[Wealth]], [[Beauty]], [[Space]], and [[Cleanliness]]. These base stats are automatically calculated from [[buildings]], [[floor]]ing, [[filth]], the room's perimeter, and items within the room.&lt;br /&gt;
&lt;br /&gt;
Room stats can be inspected with the room stats display, which can be toggled with a button in the lower right corner of the screen or a hotkey (''G'' by default). Additional information can also be viewed by holding down the ''Alt'' key.&lt;br /&gt;
&lt;br /&gt;
Room stats affect the following:&lt;br /&gt;
* Medical treatment quality (Cleanliness)&lt;br /&gt;
* Research speed (Cleanliness)&lt;br /&gt;
* [[Food poisoning]] chance in prepared meals (Cleanliness)&lt;br /&gt;
* [[Mood#Room_stats|Mood]] of the people using them (Impressiveness)&lt;br /&gt;
&lt;br /&gt;
The following traits are affected by room stats:&lt;br /&gt;
* [[Greedy]] - Decrease without sufficiently Impressive bedroom.&lt;br /&gt;
* [[Jealous]] - Decrease if anyone has a noticeably better bedroom. {{Check Tag|How much?}}&lt;br /&gt;
* [[Ascetic]] - Decrease if room is too Impressive. Increase if bedroom is dull or worse.&lt;br /&gt;
&lt;br /&gt;
=== Impressiveness ===&lt;br /&gt;
The value for '''Impressiveness''' is based on the four other room stats ('''Wealth''', '''Beauty''', '''Space''', and '''Cleanliness''').&lt;br /&gt;
&lt;br /&gt;
The mood effects from the room depend on the Impressiveness level, and not on the precise value. That value is rounded ''down'' to the nearest whole number, and a label (or &amp;quot;level&amp;quot;) of Impressiveness will be given to the room, according to the table below. This level is used to apply the relevant thought, positive or negative. &lt;br /&gt;
&lt;br /&gt;
The exact mood effects depend on the [[Room#Roles|room role]], with different rooms having different values at each level. For more information, see [[Mood#Room stats|this section of the Mood page]]{{Check Tag|Outdated link}} For bedrooms, dining rooms, and rec rooms, the effects are as follows:{{Check Tag|Verify table|Add values for other room types}}&lt;br /&gt;
&lt;br /&gt;
::{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
! Mood impact&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt; 20&lt;br /&gt;
| awful&lt;br /&gt;
| {{Bad|-2}} (bedrooms only)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 20 and &amp;lt; 30&lt;br /&gt;
| dull&lt;br /&gt;
| ''none''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 30 and &amp;lt; 40&lt;br /&gt;
| mediocre&lt;br /&gt;
| ''none''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 40 and &amp;lt; 50&lt;br /&gt;
| decent&lt;br /&gt;
| {{Good|+2}}&lt;br /&gt;
|- &lt;br /&gt;
| &amp;gt;= 50 and &amp;lt; 65&lt;br /&gt;
| slightly impressive&lt;br /&gt;
| {{Good|+3}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 65 and &amp;lt; 85&lt;br /&gt;
| somewhat impressive&lt;br /&gt;
| {{Good|+4}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 85 and &amp;lt; 120&lt;br /&gt;
| very impressive&lt;br /&gt;
| {{Good|+5}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 120 and &amp;lt; 170&lt;br /&gt;
| extremely impressive&lt;br /&gt;
| {{Good|+6}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 170 and &amp;lt; 240&lt;br /&gt;
| unbelievably impressive&lt;br /&gt;
| {{Good|+7}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 240&lt;br /&gt;
| wondrously impressive&lt;br /&gt;
| {{Good|+8}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Guidelines ====&lt;br /&gt;
&lt;br /&gt;
Since the impressiveness calculation (explained below) is fairly involved, it is not practical to predict impressiveness levels in an actual game. However, the following rules of thumb can be applied:&lt;br /&gt;
&lt;br /&gt;
* '''Keep all four room stats equally in mind.''' There is a heavy weighting towards whichever stat is weakest, which is counted as much as all three other stats combined. For example, having a masterpiece work of art in a large room (high ''wealth'', ''space'' and ''beauty'') is not very effective if the floor is covered in vomit and animal filth (low ''cleanliness''). It is quite difficult to compensate for one low stat by raising the other three.&lt;br /&gt;
&lt;br /&gt;
* '''Making a particularly small room ''impressive'' is difficult.''' Room size is a limiting factor for Impressiveness. If you want to make the room &amp;quot;very impressive&amp;quot;, it should have a space of at least around 25 (which still counts as &amp;quot;rather tight&amp;quot; in the game). E.g. a furnished bedroom with a 5x5 or 4×6 footprint would be fine, and a little smaller could still work, but it would be a challenge to get there with a 4x4 room. Note that any naturally &amp;quot;large&amp;quot; rooms like hallways, lobbies, recreation halls etc. will never run into this limitation at all.&lt;br /&gt;
&lt;br /&gt;
* '''Cleanliness matters'''. Since the level of impressiveness is what counts, and there are sharp thresholds separating the levels, even a minute change of any of the values can have a strong effect. This is usually due to ''cleanliness'' changing (because the other factors are pretty much fixed); even a single speck of dirt on the floor can result in major [[mood]] changes. Make sure that the room is not too close to a level threshold, and keep it clean.&lt;br /&gt;
&lt;br /&gt;
* '''Do not go overboard'''. There are sharply diminishing returns from increasing any room stat. Increasing any of the stats has dramatically diminishing returns with regards to impressiveness. It is not worth putting a lot of resources into any of the stats beyond a point.*&lt;br /&gt;
:: (* Not unless you care about the stat for other reasons; &amp;quot;room impressiveness&amp;quot; is not the only stat that can affect [[mood]]. Beauty, among others, has its own value.)&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
The actual formula for calculating impressiveness involves multiple steps, starting with the four room statistics (wealth, beauty, space and cleanliness) and resulting in a single integer value ''impressiveness''.&lt;br /&gt;
&lt;br /&gt;
The calculation is done in several steps:&lt;br /&gt;
# Convert each stat into natural units, so that typical in-game stats end up in a range of comparable single digit values.&lt;br /&gt;
# Curve values beyond (-1, 1) using a natural logarithm.&lt;br /&gt;
# Average the four stats into an impressiveness score, weighted towards the lowest one&lt;br /&gt;
# Soft-cap the result according to the space of the room.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-customtoggle-EXImpressivness&amp;quot; style=&amp;quot;display:inline-block;background:rgba(128,128,128,0.5);color:white;padding:5px;border-radius:5px;outline:none;user-select:none&amp;quot;&amp;gt;Detailed formula:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-EXImpressivness&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;background:rgba(255,255,255,.5);margin-top:10px;padding:10px;border-radius:5px&amp;quot;&amp;gt;&lt;br /&gt;
===== Base values =====&lt;br /&gt;
Firstly, all four raw stats are scaled individually by applying a factor, deriving the ''base contribution'' for each stat:&lt;br /&gt;
&lt;br /&gt;
: '''W'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''wealth'' ÷ 1500&lt;br /&gt;
: '''B'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''beauty'' ÷ 3&lt;br /&gt;
: '''S'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''space'' ÷ 125&lt;br /&gt;
: '''C'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = 1 + (''cleanliness'' ÷ 2.5)&lt;br /&gt;
&lt;br /&gt;
===== Modified values =====&lt;br /&gt;
These base values are now modified if they lie outside the range (−1, 1), by applying the ''natural logarithm'' as follows: {{Check Tag|Add image|An image would be quite useful because the modified values are actually very visually intuitive despite the formula's complexity}}&lt;br /&gt;
 m =  1 + ln(b)          (if b &amp;gt;= 1)&lt;br /&gt;
 m = [1 + ln(−b)] × −1   (if b &amp;lt;= −1)&lt;br /&gt;
(This is symmetrical for positive and negative values).&lt;br /&gt;
&lt;br /&gt;
===== Impressiveness score =====&lt;br /&gt;
These modified values are then combined to give the ''impressiveness'' score as follows.&lt;br /&gt;
&lt;br /&gt;
Take a weighted sum of the average of the values and the smallest of the values:&lt;br /&gt;
 I = (65 × ('''W'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; + '''B'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; + '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; + '''C'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;) ÷ 4) + (35 × min('''W'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;, '''B'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;, '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;, '''C'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;))&lt;br /&gt;
This means that the smallest of the values contributes 51.25%, just over half, while the other three values each contribute 16.25%, or 48.75% combined.&lt;br /&gt;
&lt;br /&gt;
As a final step we compare this impressiveness value to the ''spaciousness'' of the room:&lt;br /&gt;
 S' = 500 × S&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;&lt;br /&gt;
 If I &amp;gt; S', then&lt;br /&gt;
   I' = 0.25 × I + 0.75 × S'&lt;br /&gt;
 else&lt;br /&gt;
   I' = I (no change)&lt;br /&gt;
&lt;br /&gt;
This means a room's max impressiveness is soft-capped to 500% of their space score. However, this specific step is only relevant for very small, disproportionately luxurious rooms. Even a 60-space room (S = 0.5) will incur no penalty up to 240 impressiveness, enough to clear the highest bracket (&amp;quot;wondrously impressive&amp;quot;), and a 30-space room (S = 0.24) already reaches &amp;quot;extremely impressive&amp;quot; with no penalty.&lt;br /&gt;
&lt;br /&gt;
===== Takeaways =====&lt;br /&gt;
It can be useful to think of impressiveness as a percentage value composed of four categories; a score of 1 in each category corresponds to 100 impressiveness, while values above 1 stop giving &amp;quot;fair&amp;quot; (ie. linear) returns. One unit of each stat is equivalent to each the following:&lt;br /&gt;
* ''Wealth'' of 1,500&lt;br /&gt;
* ''Beauty'' of 3&lt;br /&gt;
* ''Cleanliness'' of 0 (i.e. when using any cleanliness enhancers)&lt;br /&gt;
* ''Space'' of 125&lt;br /&gt;
Above these values, it begins to become more economical to invest attention in other stats. A &amp;quot;standard bedroom&amp;quot; of size 4×6, carpeted and containing bed, dresser, end table, lamp and plant pot will still have plenty of leeway in all categories (except cleanliness, which is at a natural 0 for a cleaned room); in this case, you will usually proceed by putting a sculpture or high quality armchair in the room, increasing beauty and wealth.&lt;br /&gt;
&lt;br /&gt;
Furthermore, observe that the factors (i.e., modified values) for ''wealth'' and ''beauty'' will often be well above 1, but ''cleanliness'' and ''space'' usually lower than 1. Unless the room is &amp;quot;very spacious&amp;quot;, or close to it, the decisive factor will thus be ''space'', then ''cleanliness''. In fact, even a well-cleaned room can never have a value over C = 1 (0 cleanliness; perfectly clean) or C = 1.215 (0.6 cleanliness; sterile), meaning rooms above ~100-120 impressiveness will ''always'' be bottlenecked by their cleanliness score. This makes &amp;quot;very impressive&amp;quot; (85-120 impressiveness) a natural set point for many rooms. &lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
Start with a room with a ''wealth'' of 3000, ''space'' of 25, ''cleanliness'' of 0, beauty of 3.&lt;br /&gt;
: '''W'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''3000'' ÷ 1500 = 2, but this is curved to 1 + ln(2) = '''1.69'''&lt;br /&gt;
: '''B'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''3'' ÷ 3 = 1&lt;br /&gt;
: '''S'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''25'' ÷ 125 = 0.2&lt;br /&gt;
: '''C'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = 1 + (''0'' ÷ 2.5) = 1&lt;br /&gt;
&lt;br /&gt;
This makes the average score (1.69 + 1 + 0.2 + 1) ÷ 4) = 0.97 and the lowest score 0.2 (space).&lt;br /&gt;
&lt;br /&gt;
From the above numbers, we can calculate the base Impressiveness&lt;br /&gt;
: I = (65 × 0.97) + (35 × 0.2)&lt;br /&gt;
: I = 63 + 7&lt;br /&gt;
: I = 70 (70.21 unrounded)&lt;br /&gt;
Now, I &amp;lt; 500 × '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; (70 &amp;lt; 100), so there is no space penalty. Therefore, the reported Impressiveness of the room is 70 or &amp;quot;somewhat impressive&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If we were to increase the ''wealth'' of the above room by 6000 (4 units), our W&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; would become 6 -&amp;gt; 1 + ln(6) = 2.79 (+1.1 increase). Wealth wasn't the lowest stat, so this would only improve impressiveness by 1.1*16.25% = 17.9%, resulting in a score of 88 or &amp;quot;very impressive&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If we were to increase the original room's space by 10 units instead, '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; becomes 0.28 (0.08 increase). Increasing the bottleneck stat results in a change of 0.08*51.25% = 4.1%, or 74 total impressiveness or &amp;quot;somewhat impressive&amp;quot;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wealth ===&lt;br /&gt;
This is the sum of the [[Market Value]] of all items in the room and all walls and doors surrounding the room. Walls, doors, columns and animal flaps in the outer corner count as well. The value of [[power conduit]]s in walls ''is'' also included, however, for some reason building or deconstructing a conduit doesn't immediately update room wealth. Only if wealth is recalculated for some other reason, is the value of the conduits included. The same is true when building a column in the outer corner of the wall.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 500&lt;br /&gt;
| impoverished&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 500 and &amp;lt; 700&lt;br /&gt;
| somewhat poor&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 700 and &amp;lt; 2000&lt;br /&gt;
| mediocre&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 2000 and &amp;lt; 4000&lt;br /&gt;
| somewhat rich&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 4000 and &amp;lt; 10000&lt;br /&gt;
| rich&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 10000 and &amp;lt; 40000&lt;br /&gt;
| luxurious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 40000 and &amp;lt; 100000&lt;br /&gt;
| very luxurious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 100000 and &amp;lt; 1000000&lt;br /&gt;
| extremely luxurious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 1000000&lt;br /&gt;
| unbelievably luxurious&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Beauty ===&lt;br /&gt;
This is the average environmental beauty of the room including its walls and doors with a penalty for small rooms. Walls, doors and columns in the outer corner count as well. Building or deconstructing a column in the outer corner doesn't trigger a recalculation however. Floor tiles underneath walls and doors have no influence. &lt;br /&gt;
&lt;br /&gt;
Room beauty is calculated as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;TotalBeauty = sum(beauty for each internal cell) + sum(beauty for each adjacent cell)&lt;br /&gt;
WeightedSize = size if (size &amp;gt; 40) else (20 + size / 2)&lt;br /&gt;
RoomBeauty = TotalBeauty / WeightedSize&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This means that all rooms with less than 40 internal space will have their beauty penalised.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt; -3.5&lt;br /&gt;
| hideous&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -3.5 and &amp;lt; 0&lt;br /&gt;
| ugly&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 0 and &amp;lt; 2.4&lt;br /&gt;
| neutral&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 2.4 and &amp;lt; 5&lt;br /&gt;
| pretty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 5 and &amp;lt; 15&lt;br /&gt;
| beautiful&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 15 and &amp;lt; 50&lt;br /&gt;
| very beautiful&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 50 and &amp;lt; 100&lt;br /&gt;
| extremely beautiful&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 100&lt;br /&gt;
| unbelievably beautiful&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space ===&lt;br /&gt;
Indicates how much free space is available in the room. A room's Space score is 1.4 times the number of tiles in the room. Objects that prevent a pawn from standing in a space will decrease the available space in the room by 0.9 per tile the object covers. Thus, an occupied tile contributes a total of 0.5 to space. Objects that reduce space include beds, tables, workbenches, lamps, and heaters. Stools and chairs do not reduce space.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
! typical size*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 12.5&lt;br /&gt;
| cramped&lt;br /&gt;
| 3x4 or smaller*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 12.5 and &amp;lt; 29&lt;br /&gt;
| rather tight&lt;br /&gt;
| 3x6, 4x5*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 29 and &amp;lt; 55&lt;br /&gt;
| average-sized&lt;br /&gt;
| 4x7, 5x6*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 55 and &amp;lt; 70&lt;br /&gt;
| somewhat spacious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 70 and &amp;lt; 130&lt;br /&gt;
| quite spacious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 130 and &amp;lt; 349.5&lt;br /&gt;
| very spacious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 349.5&lt;br /&gt;
| extremely spacious&lt;br /&gt;
|}&lt;br /&gt;
: (* These are &amp;quot;safe&amp;quot; approximations; as described, the items placed &amp;lt;u&amp;gt;in&amp;lt;/u&amp;gt; the room can greatly reduce the effective size. For example, an empty 5x5 room has space (25 x 1.4 =) 35, easily &amp;quot;average&amp;quot; - when empty. However, placing just one bed (2 tiles), one table (2 tiles), a light, a heater, a plant pot and one artwork (1 tile each, a chair is &amp;quot;free&amp;quot;) in that room reduces the effective space by -7.2 (= 8 tiles x .9), and the effective space is now 27.8, &amp;quot;rather tight&amp;quot;.)&lt;br /&gt;
: (* Due to floating point inaccuracies, sometimes a room that is right on a threshold may randomly count for one category or the other. For example, a room with 5 standable tiles and 11 walkable but non-standable tiles should come out to exactly 12.5 score, but may result in either &amp;quot;cramped&amp;quot; or &amp;quot;rather tight&amp;quot;. It's safest to not rely on exact values.)&lt;br /&gt;
&lt;br /&gt;
Note, that space of the room affects only its impressiveness. Careful to not confuse with Pawn's [[space]] need.&lt;br /&gt;
&lt;br /&gt;
=== Cleanliness ===&lt;br /&gt;
This stat affects [[Surgery_Success_Chance_Factor#Room_Cleanliness_Multiplier|Surgery Success Chance]], [[Research#Research speed|research speed]], the chance that cooked meals will cause [[food poisoning]], and gene [[Assembly Speed Factor]].{{BiotechIcon}} A room's cleanliness is the average cleanliness score of all tiles in the room. It is determined by the type of [[floor]]ing, the presence of any [[filth]], and the cleanliness value of some furniture such as the [[butcher table]] and the [[stonecutter's table]]. Note that the type of [[floor]] under a door doesn't count for Cleanliness, but filth under a door does count.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=display:inline-grid&amp;gt;&lt;br /&gt;
:::{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Room Cleanliness&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; -1.1&lt;br /&gt;
| very dirty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -1.1 and &amp;lt; -0.4&lt;br /&gt;
| dirty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -0.4 and &amp;lt; -0.05&lt;br /&gt;
| slightly dirty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -0.05 and &amp;lt; 0.4&lt;br /&gt;
| clean&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 0.4&lt;br /&gt;
| sterile&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=display:inline-grid&amp;gt;&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Surface&lt;br /&gt;
! Cleanliness&amp;lt;br/&amp;gt;Value&lt;br /&gt;
|-&lt;br /&gt;
|[[Void metal ]]{{AnomalyIcon}} || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Sterile tile]] floor || 0.6&lt;br /&gt;
|-&lt;br /&gt;
| [[Steel tile|Steel]], [[Silver tile|Silver]] or [[Gold tile|Gold]] floor || 0.2&lt;br /&gt;
|-&lt;br /&gt;
|[[Bioferrite plate]]{{AnomalyIcon}} || 0.2&lt;br /&gt;
|-&lt;br /&gt;
| all other constructed [[floor]]ing&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt; [[Bridge]]s || 0&lt;br /&gt;
|-&lt;br /&gt;
| Natural stone ([[Rough stone|rough]] or [[Smooth stone|smoothed]]) || 0&lt;br /&gt;
|- &lt;br /&gt;
| [[Straw matting]] || -0.1&lt;br /&gt;
|-&lt;br /&gt;
| all other [[Environment#Terrain|natural surfaces]] (soil, gravel, etc.) || -1&lt;br /&gt;
|-&lt;br /&gt;
| [[Marsh]], [[Marshy soil]], [[Mud]], [[Broken asphalt]] || -2&lt;br /&gt;
|-&lt;br /&gt;
| [[Chunk]]s || -2&lt;br /&gt;
|-&lt;br /&gt;
|[[Flesh]]{{AnomalyIcon}} || -3&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Dirt, rubble, all other filth]] || -5&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Blood]] || -10&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Insect blood, vomit, fuel puddle]] || -15&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Corpsebile]] || -20&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using &amp;quot;Toggle the beauty display&amp;quot; can help locate filth in a given room, which typically stands out due to its negative beauty.&lt;br /&gt;
&lt;br /&gt;
== Map regions ==&lt;br /&gt;
Upon map generation, the map is divided into chunks of 12x12 squares called map regions. Each region requires a contiguous area and will be subdivided otherwise. Under no circumstance will a region extend beyond the initial 12x12 grid. Impassable buildings (both natural and artificial) are not considered as part of any map region for this purpose and will subdivide existing map regions accordingly. Regions will fuse when possible. Map regions are used for several calculations and can be seen in game via the debug option &amp;quot;Draw Regions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-customtoggle-myDivision&amp;quot; style=&amp;quot;display:inline-block;background:rgba(128,128,128,0.5);color:white;padding:5px;border-radius:5px;outline:none;user-select:none&amp;quot;&amp;gt;Some additional notes:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-myDivision&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;background:rgba(255,255,255,.5);margin-top:10px;padding:10px;border-radius:5px&amp;quot;&amp;gt;&lt;br /&gt;
* Impassable buildings are never part of any map region.&lt;br /&gt;
** Impassable non-walls (ex: [[Ship engine]]) may create a &amp;quot;red&amp;quot; temporal map region on construction that will be removed once anything else is build/destroyed.&lt;br /&gt;
* Impassable terrain creates map regions confined to its extension.&lt;br /&gt;
** These regions don't interact with the regular ones, but otherwise follow the stated rules.&lt;br /&gt;
* Passable buildings, such as [[fence]]s and [[barricade]]s, create map regions along their extension.&lt;br /&gt;
** These &amp;quot;fence&amp;quot; regions won't interact with other kinds, but otherwise follow the stated rules.&lt;br /&gt;
* Doors have unique behavior&lt;br /&gt;
** Single tile doors create a 3 tile map region centered on the doors' tile, following the door's orientation, that overlaps with other map regions.&lt;br /&gt;
*** Impassable objects will delete the overlapping section, no interaction otherwise.&lt;br /&gt;
** Double tile doors create 2 map regions, 1 for each of its tiles.&lt;br /&gt;
** The map regions created by doors don't interact with any other, not even each other.&lt;br /&gt;
* The grid defining regions is drawn from the bottom-left of the map row by row. &lt;br /&gt;
	&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.12.906|0.12.906]] - Added.&lt;br /&gt;
* 1.1 - Added room stats gizmo, which displays the stats of the room containing a selected building, at a glance.&lt;br /&gt;
* [[Royalty DLC]] release - Throne room role added.&lt;br /&gt;
* [[Ideology DLC]] release - Temple room role added.&lt;br /&gt;
* [[Version/1.3.3072|1.3.3072]] - Fix: Checking all beds instead of just humanlike ones for room owner.&lt;br /&gt;
* [[Version/1.4.3523|1.4.3523]] - Added the storeroom role for rooms with lots of shelves.&lt;br /&gt;
* [[Biotech DLC]] release - Nursery, playroom, classroom, and deathrest chamber roles added.&lt;br /&gt;
* [[Anomaly DLC]] release - Containment cell and ceremonial chamber roles added.&lt;br /&gt;
* [[Version/1.6.4518|1.6.4518]] - Some production buildings now have a work speed penalty if they are not in the correct room.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Game mechanics]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Rooms&amp;diff=174557</id>
		<title>Rooms</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Rooms&amp;diff=174557"/>
		<updated>2026-01-29T18:53:54Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Added note about floating point inaccuracies in space calculations determined via testing. This is a resolution for the request to change the &amp;quot;rather right&amp;quot; threshold to 12.6.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- This is a hidden reference because I couldn't figure out how to hide it any other way 😭 --&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;ref name=&amp;quot;penalty&amp;quot;&amp;gt;Work speed penalty of 80% if not placed in the room with the correct role.&amp;lt;/ref&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| align=center | {{Gameplay Nav}} |}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
A '''room''' is a space fully enclosed by impassable objects such as [[wall]]s, [[door]]s (open or closed), [[vent]]s, natural rock, or [[cooler]]s. Corners do not need to be filled in order to enclose a room.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
A room that's at least 75% [[roof]]ed is considered [[indoors]]. This distinction affects [[temperature]], [[Deterioration Rate]], [[Work Speed Factor]], and pawns' [[outdoors]] and indoors needs. {{Check Tag|Verify|Does it really affect all these stats, and how specifically?}}&lt;br /&gt;
&lt;br /&gt;
An indoor room will remain an indoor room when its doors are open — even when they're held open permanently. [[Vac barrier]]s also enclose a room despite not being impassable. If a door is destroyed and the room is no longer enclosed, the room will instantly be considered outdoors.&lt;br /&gt;
&lt;br /&gt;
The maximum size of a room is 36 [[#Map regions|map regions]]. The equivalent size in tiles varies based on the position and shape of the room, but as reference:&lt;br /&gt;
* The maximum area possible per room is 5,184 tiles (72x72).&lt;br /&gt;
* An empty 50x50 square room is the largest room that won't have issues with map regions.&lt;br /&gt;
* The more complex the shape of a room, the more likely it is to run into problems with map regions.&lt;br /&gt;
* Above this size, the area in question will be treated as a non-room indoors space.&lt;br /&gt;
&lt;br /&gt;
=== Temperature ===&lt;br /&gt;
Indoor rooms can have a different temperature than the outside. Open [[door]]s, open [[vent]]s, or missing roof tiles will increase the rate at which heat is exchanged with the outdoors. For further information, see the [[temperature]] page.&lt;br /&gt;
&lt;br /&gt;
The temperature of an outdoor room will always be identical to the outdoor temperature. If an indoor room has enough roof removed{{Check Tag|How much?}}, or stops being enclosed, it will ''instantly'' adopt the outdoor temperature.&lt;br /&gt;
&lt;br /&gt;
== Roles ==&lt;br /&gt;
'''Room roles''' are assigned to a room based on the buildings they contain, such as a ''kitchen'' when containing an [[electric stove]] or a [[fueled stove]]. They determine whether a colonist is affected by all, some, or none of the room stats.&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
Certain room roles grant [[mood]]lets based on their [[Impressiveness]], which is affected by all four substats. To gain the moodlet, the room must be used by a pawn for the role's associated purpose (i.e., eating at a table for the dining room role or playing billiards for the rec room role). Despite the game displaying only one role, rooms can grant moodlets from multiple roles when used for that role. The moodlets are typically {{Check Tag|When not?}} applied when a colonist ''begins'' said activity in the room, and they last for 24 hours. {{Check Tag |Verify| What about deathresting? It uses a separate thought.}}&lt;br /&gt;
&lt;br /&gt;
Buildings associated with hospitals, laboratories, and kitchens make direct use of the [[Cleanliness]] stat for their [[Work Speed Factor]].&lt;br /&gt;
&lt;br /&gt;
Some room roles cannot have certain buildings inside without inflicting a mood penalty (i.e., [[Titles#Thrones and Bedrooms|throne rooms]] {{RoyaltyIcon}} and temples {{IdeologyIcon}} with [[Production|workstations]]).&lt;br /&gt;
&lt;br /&gt;
Pawns also have separate needs for [[Beauty]] and [[Space]], which every room can fulfill. Unlike the room stats of the same name, these needs are checked within a certain radius from the pawn, as opposed to anywhere in the room. See those pages for further details.&lt;br /&gt;
&lt;br /&gt;
=== Score calculation ===&lt;br /&gt;
For each room, every room role is given a score based on the buildings inside, and the role with the highest score is the one displayed. In the case of a tie, the earlier roles on the following table take priority.&lt;br /&gt;
&lt;br /&gt;
For the purposes of room role scoring, the following are considered non-baby human beds: {{RoomRolesBuildingList|Bed-associated rooms}}.&lt;br /&gt;
&lt;br /&gt;
=== List of roles ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Label&lt;br /&gt;
! Mood impact&lt;br /&gt;
! Related stats&lt;br /&gt;
! Score calculation logic&lt;br /&gt;
|-&lt;br /&gt;
| Room&lt;br /&gt;
| None&lt;br /&gt;
| None ||&lt;br /&gt;
* Returns a score of 0.99.&lt;br /&gt;
|-&lt;br /&gt;
| Bedroom &amp;lt;ref name=&amp;quot;owner name&amp;quot;&amp;gt;This role will have its owners' name added to its name.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There are no human beds.&lt;br /&gt;
** There is at least 1 medical human bed or at least 1 prisoner human bed.&lt;br /&gt;
** There is more than 1 non-assigned human bed.&lt;br /&gt;
** There is at least 1 adult assigned and there are other pawns assigned that are not in its love cluster.&amp;lt;ref&amp;gt;A pawn's love cluster is all the other pawns that can be linked to the pawn through a chain of romantic relationships.&amp;lt;/ref&amp;gt;&lt;br /&gt;
** There is at least 1 child assigned and there aren't any adults assigned that are a parent of the child.&lt;br /&gt;
* Returns 100,000 score otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Prison cell &amp;lt;ref name=&amp;quot;owner name&amp;quot; /&amp;gt;&lt;br /&gt;
| [[Mood#Situational RoomStats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 non-prisoner humanlike bed.&lt;br /&gt;
** There is more than 1 humanlike bed.&lt;br /&gt;
* Returns 170,000 score for a non-medical prisoner humanlike bed.&lt;br /&gt;
* Returns 100,000 score for a medical prisoner humanlike bed.&lt;br /&gt;
|-&lt;br /&gt;
| Dining room&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 12 score per each one of the following: {{RoomRolesBuildingList|Dining room}}.&lt;br /&gt;
|-&lt;br /&gt;
| Rec room&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 7 score per each one of the following: {{RoomRolesBuildingList|Rec room}}.&lt;br /&gt;
|-&lt;br /&gt;
| Hospital&lt;br /&gt;
| [[Mood#Situation RoomStats|Yes]]&lt;br /&gt;
| [[Impressiveness]], [[Room stats|Cleanliness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 prisoner humanlike bed.&lt;br /&gt;
** There are no medical humanlike beds.&lt;br /&gt;
* Returns 100,000 score otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Laboratory&lt;br /&gt;
| No&lt;br /&gt;
| [[Room stats|Cleanliness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 60 score per each one of the following: {{RoomRolesBuildingList|Laboratory}}.&lt;br /&gt;
|-&lt;br /&gt;
| Workshop&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 27 score per each one of the following: {{RoomRolesBuildingList|Workshop}}. The [[crafting spot]] does ''not'' count.&lt;br /&gt;
|-&lt;br /&gt;
| Storeroom&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 1 score per each one of the following: {{RoomRolesBuildingList|Storeroom}}.&lt;br /&gt;
|-&lt;br /&gt;
| Barracks &amp;lt;ref name=&amp;quot;owner name&amp;quot; /&amp;gt;&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 prisoner humanlike bed.&lt;br /&gt;
** The room is a valid bedroom.&lt;br /&gt;
* Returns 100,100 score for every non-medical humanlike bed otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Prison barracks &amp;lt;ref name=&amp;quot;owner name&amp;quot; /&amp;gt;&lt;br /&gt;
| [[Mood#Situation RoomStats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 non-prisoner humanlike bed.&lt;br /&gt;
** There are less than 2 prisoner beds.&lt;br /&gt;
* Returns 100,100 score per non-medical prisoner bed and 50,001 per medical prisoner bed.&lt;br /&gt;
|-&lt;br /&gt;
| Kitchen&lt;br /&gt;
| No&lt;br /&gt;
| [[Room stats|Cleanliness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 28 score per production building that has at least 1 recipe that produces an edible result. The following fulfill the requirement: {{RoomRolesBuildingList|Kitchen}}. The [[brewery]], [[butcher spot]], and [[butcher table]] do ''not'' fulfill the requirement.&lt;br /&gt;
|-&lt;br /&gt;
| Tomb&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 50 score per each one of the following: {{RoomRolesBuildingList|Tomb}}.&lt;br /&gt;
|-&lt;br /&gt;
| Barn&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 7.6 score per non-humanlike bed, which are the following: {{RoomRolesBuildingList|Barn}}.&lt;br /&gt;
|-&lt;br /&gt;
| [[Throne room]] {{RoyaltyIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 10,000 score if there is any one of the following: {{RoomRolesBuildingList|Throne room}}.&lt;br /&gt;
* Returns 0 score otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Temple {{IdeologyIcon}} &amp;lt;ref&amp;gt;This role changes to the ideoligion's set temple name.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns -1 score if the [[Ideology DLC]] is not active.&lt;br /&gt;
* Returns 0 score if there are no altars with the colony's ideology.&lt;br /&gt;
* Returns 75 score per altar with the colony's ideology, with a minimum of 2,000 score. The following are considered altars: {{RoomRolesBuildingList|Temple}}.&lt;br /&gt;
|-&lt;br /&gt;
| Nursery {{BiotechIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** The [[Biotech DLC]] is not active.&lt;br /&gt;
** There is at least 1 non-medical prisoner bed or at least 1 non-baby bed.&lt;br /&gt;
** There are less than 2 baby beds.&lt;br /&gt;
* Returns 100,200 score per baby bed. The following are considered baby beds: {{RoomRolesBuildingList|Nursery}}.&lt;br /&gt;
|-&lt;br /&gt;
| Playroom {{BiotechIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** The [[Biotech DLC]] is not active.&lt;br /&gt;
** There is at least 1 humanlike bed in the room.&lt;br /&gt;
* Returns 8 score per each one of the following: {{RoomRolesBuildingList|Playroom}}.&lt;br /&gt;
|-&lt;br /&gt;
| Classroom {{BiotechIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** The [[Biotech DLC]] is not active.&lt;br /&gt;
** There is at least 1 human bed in the room.&lt;br /&gt;
* Returns 8 score per each one of the following: {{RoomRolesBuildingList|Classroom}}.&lt;br /&gt;
|-&lt;br /&gt;
| Deathrest chamber {{BiotechIcon}}&lt;br /&gt;
| Yes&lt;br /&gt;
| [[Room stats|Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 100 score per [[deathrest casket]] {{BiotechIcon}} and 50 score per [[deathrest accelerator]] {{BiotechIcon}}, [[glucosoid pump]] {{BiotechIcon}}, [[hemogen amplifier]] {{BiotechIcon}}, [[hemopump]] {{BiotechIcon}}, or [[psychofluid pump]] {{BiotechIcon}}.&lt;br /&gt;
|-&lt;br /&gt;
| Containment cell {{AnomalyIcon}}&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 100 score per [[holding platform]] {{AnomalyIcon}} or [[holding spot]] {{AnomalyIcon}} and 50 score per [[bioferrite harvester]] {{AnomalyIcon}}, [[electric inhibitor]] {{AnomalyIcon}}, or [[electroharvester]] {{AnomalyIcon}}.&lt;br /&gt;
|-&lt;br /&gt;
| Ceremonial chamber {{AnomalyIcon}}&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 200 score per each one of the following: {{RoomRolesBuildingList|Ceremonial chamber}}.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Other pieces of [[furniture]] not mentioned, such as [[chair|chairs]], are not considered for score calculation.&lt;br /&gt;
&lt;br /&gt;
== Stats ==&lt;br /&gt;
[[File:quality preview.png|300px|right]]&lt;br /&gt;
'''Room stats''' are values of a room that passively affect both [[thought]]s about the room itself and some events and activities that take place within. These include [[Impressiveness]], which is calculated from four composite stats: [[Wealth]], [[Beauty]], [[Space]], and [[Cleanliness]]. These base stats are automatically calculated from [[buildings]], [[floor]]ing, [[filth]], the room's perimeter, and items within the room.&lt;br /&gt;
&lt;br /&gt;
Room stats can be inspected with the room stats display, which can be toggled with a button in the lower right corner of the screen or a hotkey (''G'' by default). Additional information can also be viewed by holding down the ''Alt'' key.&lt;br /&gt;
&lt;br /&gt;
Room stats affect the following:&lt;br /&gt;
* Medical treatment quality (Cleanliness)&lt;br /&gt;
* Research speed (Cleanliness)&lt;br /&gt;
* [[Food poisoning]] chance in prepared meals (Cleanliness)&lt;br /&gt;
* [[Mood#Room_stats|Mood]] of the people using them (Impressiveness)&lt;br /&gt;
&lt;br /&gt;
The following traits are affected by room stats:&lt;br /&gt;
* [[Greedy]] - Decrease without sufficiently Impressive bedroom.&lt;br /&gt;
* [[Jealous]] - Decrease if anyone has a noticeably better bedroom. {{Check Tag|How much?}}&lt;br /&gt;
* [[Ascetic]] - Decrease if room is too Impressive. Increase if bedroom is dull or worse.&lt;br /&gt;
&lt;br /&gt;
=== Impressiveness ===&lt;br /&gt;
The value for '''Impressiveness''' is based on the four other room stats ('''Wealth''', '''Beauty''', '''Space''', and '''Cleanliness''').&lt;br /&gt;
&lt;br /&gt;
The mood effects from the room depend on the Impressiveness level, and not on the precise value. That value is rounded ''down'' to the nearest whole number, and a label (or &amp;quot;level&amp;quot;) of Impressiveness will be given to the room, according to the table below. This level is used to apply the relevant thought, positive or negative. &lt;br /&gt;
&lt;br /&gt;
The exact mood effects depend on the [[Room#Roles|room role]], with different rooms having different values at each level. For more information, see [[Mood#Room stats|this section of the Mood page]]{{Check Tag|Outdated link}} For bedrooms, dining rooms, and rec rooms, the effects are as follows:{{Check Tag|Verify table|Add values for other room types}}&lt;br /&gt;
&lt;br /&gt;
::{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
! Mood impact&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt; 20&lt;br /&gt;
| awful&lt;br /&gt;
| {{Bad|-2}} (bedrooms only)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 20 and &amp;lt; 30&lt;br /&gt;
| dull&lt;br /&gt;
| ''none''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 30 and &amp;lt; 40&lt;br /&gt;
| mediocre&lt;br /&gt;
| ''none''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 40 and &amp;lt; 50&lt;br /&gt;
| decent&lt;br /&gt;
| {{Good|+2}}&lt;br /&gt;
|- &lt;br /&gt;
| &amp;gt;= 50 and &amp;lt; 65&lt;br /&gt;
| slightly impressive&lt;br /&gt;
| {{Good|+3}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 65 and &amp;lt; 85&lt;br /&gt;
| somewhat impressive&lt;br /&gt;
| {{Good|+4}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 85 and &amp;lt; 120&lt;br /&gt;
| very impressive&lt;br /&gt;
| {{Good|+5}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 120 and &amp;lt; 170&lt;br /&gt;
| extremely impressive&lt;br /&gt;
| {{Good|+6}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 170 and &amp;lt; 240&lt;br /&gt;
| unbelievably impressive&lt;br /&gt;
| {{Good|+7}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 240&lt;br /&gt;
| wondrously impressive&lt;br /&gt;
| {{Good|+8}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Guidelines ====&lt;br /&gt;
&lt;br /&gt;
Since the impressiveness calculation (explained below) is fairly involved, it is not practical to predict impressiveness levels in an actual game. However, the following rules of thumb can be applied:&lt;br /&gt;
&lt;br /&gt;
* '''Keep all four room stats equally in mind.''' There is a heavy weighting towards whichever stat is weakest, which is counted as much as all three other stats combined. For example, having a masterpiece work of art in a large room (high ''wealth'', ''space'' and ''beauty'') is not very effective if the floor is covered in vomit and animal filth (low ''cleanliness''). It is quite difficult to compensate for one low stat by raising the other three.&lt;br /&gt;
&lt;br /&gt;
* '''Making a particularly small room ''impressive'' is difficult.''' Room size is a limiting factor for Impressiveness. If you want to make the room &amp;quot;very impressive&amp;quot;, it should have a space of at least around 25 (which still counts as &amp;quot;rather tight&amp;quot; in the game). E.g. a furnished bedroom with a 5x5 or 4×6 footprint would be fine, and a little smaller could still work, but it would be a challenge to get there with a 4x4 room. Note that any naturally &amp;quot;large&amp;quot; rooms like hallways, lobbies, recreation halls etc. will never run into this limitation at all.&lt;br /&gt;
&lt;br /&gt;
* '''Cleanliness matters'''. Since the level of impressiveness is what counts, and there are sharp thresholds separating the levels, even a minute change of any of the values can have a strong effect. This is usually due to ''cleanliness'' changing (because the other factors are pretty much fixed); even a single speck of dirt on the floor can result in major [[mood]] changes. Make sure that the room is not too close to a level threshold, and keep it clean.&lt;br /&gt;
&lt;br /&gt;
* '''Do not go overboard'''. There are sharply diminishing returns from increasing any room stat. Increasing any of the stats has dramatically diminishing returns with regards to impressiveness. It is not worth putting a lot of resources into any of the stats beyond a point.*&lt;br /&gt;
:: (* Not unless you care about the stat for other reasons; &amp;quot;room impressiveness&amp;quot; is not the only stat that can affect [[mood]]. Beauty, among others, has its own value.)&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
The actual formula for calculating impressiveness involves multiple steps, starting with the four room statistics (wealth, beauty, space and cleanliness) and resulting in a single integer value ''impressiveness''.&lt;br /&gt;
&lt;br /&gt;
The calculation is done in several steps:&lt;br /&gt;
# Convert each stat into natural units, so that typical in-game stats end up in a range of comparable single digit values.&lt;br /&gt;
# Curve values beyond (-1, 1) using a natural logarithm.&lt;br /&gt;
# Average the four stats into an impressiveness score, weighted towards the lowest one&lt;br /&gt;
# Soft-cap the result according to the space of the room.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-customtoggle-EXImpressivness&amp;quot; style=&amp;quot;display:inline-block;background:rgba(128,128,128,0.5);color:white;padding:5px;border-radius:5px;outline:none;user-select:none&amp;quot;&amp;gt;Detailed formula:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-EXImpressivness&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;background:rgba(255,255,255,.5);margin-top:10px;padding:10px;border-radius:5px&amp;quot;&amp;gt;&lt;br /&gt;
===== Base values =====&lt;br /&gt;
Firstly, all four raw stats are scaled individually by applying a factor, deriving the ''base contribution'' for each stat:&lt;br /&gt;
&lt;br /&gt;
: '''W'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''wealth'' ÷ 1500&lt;br /&gt;
: '''B'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''beauty'' ÷ 3&lt;br /&gt;
: '''S'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''space'' ÷ 125&lt;br /&gt;
: '''C'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = 1 + (''cleanliness'' ÷ 2.5)&lt;br /&gt;
&lt;br /&gt;
===== Modified values =====&lt;br /&gt;
These base values are now modified if they lie outside the range (−1, 1), by applying the ''natural logarithm'' as follows: {{Check Tag|Add image|An image would be quite useful because the modified values are actually very visually intuitive despite the formula's complexity}}&lt;br /&gt;
 m =  1 + ln(b)          (if b &amp;gt;= 1)&lt;br /&gt;
 m = [1 + ln(−b)] × −1   (if b &amp;lt;= −1)&lt;br /&gt;
(This is symmetrical for positive and negative values).&lt;br /&gt;
&lt;br /&gt;
===== Impressiveness score =====&lt;br /&gt;
These modified values are then combined to give the ''impressiveness'' score as follows.&lt;br /&gt;
&lt;br /&gt;
Take a weighted sum of the average of the values and the smallest of the values:&lt;br /&gt;
 I = (65 × ('''W'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; + '''B'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; + '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; + '''C'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;) ÷ 4) + (35 × min('''W'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;, '''B'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;, '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;, '''C'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;))&lt;br /&gt;
This means that the smallest of the values contributes 51.25%, just over half, while the other three values each contribute 16.25%, or 48.75% combined.&lt;br /&gt;
&lt;br /&gt;
As a final step we compare this impressiveness value to the ''spaciousness'' of the room:&lt;br /&gt;
 S' = 500 × S&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;&lt;br /&gt;
 If I &amp;gt; S', then&lt;br /&gt;
   I' = 0.25 × I + 0.75 × S'&lt;br /&gt;
 else&lt;br /&gt;
   I' = I (no change)&lt;br /&gt;
&lt;br /&gt;
This means a room's max impressiveness is soft-capped to 500% of their space score. However, this specific step is only relevant for very small, disproportionately luxurious rooms. Even a 60-space room (S = 0.5) will incur no penalty up to 240 impressiveness, enough to clear the highest bracket (&amp;quot;wondrously impressive&amp;quot;), and a 30-space room (S = 0.24) already reaches &amp;quot;extremely impressive&amp;quot; with no penalty.&lt;br /&gt;
&lt;br /&gt;
===== Takeaways =====&lt;br /&gt;
It can be useful to think of impressiveness as a percentage value composed of four categories; a score of 1 in each category corresponds to 100 impressiveness, while values above 1 stop giving &amp;quot;fair&amp;quot; (ie. linear) returns. One unit of each stat is equivalent to each the following:&lt;br /&gt;
* ''Wealth'' of 1,500&lt;br /&gt;
* ''Beauty'' of 3&lt;br /&gt;
* ''Cleanliness'' of 0 (i.e. when using any cleanliness enhancers)&lt;br /&gt;
* ''Space'' of 125&lt;br /&gt;
Above these values, it begins to become more economical to invest attention in other stats. A &amp;quot;standard bedroom&amp;quot; of size 4×6, carpeted and containing bed, dresser, end table, lamp and plant pot will still have plenty of leeway in all categories (except cleanliness, which is at a natural 0 for a cleaned room); in this case, you will usually proceed by putting a sculpture or high quality armchair in the room, increasing beauty and wealth.&lt;br /&gt;
&lt;br /&gt;
Furthermore, observe that the factors (i.e., modified values) for ''wealth'' and ''beauty'' will often be well above 1, but ''cleanliness'' and ''space'' usually lower than 1. Unless the room is &amp;quot;very spacious&amp;quot;, or close to it, the decisive factor will thus be ''space'', then ''cleanliness''. In fact, even a well-cleaned room can never have a value over C = 1 (0 cleanliness; perfectly clean) or C = 1.215 (0.6 cleanliness; sterile), meaning rooms above ~100-120 impressiveness will ''always'' be bottlenecked by their cleanliness score. This makes &amp;quot;very impressive&amp;quot; (85-120 impressiveness) a natural set point for many rooms. &lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
Start with a room with a ''wealth'' of 3000, ''space'' of 25, ''cleanliness'' of 0, beauty of 3.&lt;br /&gt;
: '''W'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''3000'' ÷ 1500 = 2, but this is curved to 1 + ln(2) = '''1.69'''&lt;br /&gt;
: '''B'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''3'' ÷ 3 = 1&lt;br /&gt;
: '''S'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''25'' ÷ 125 = 0.2&lt;br /&gt;
: '''C'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = 1 + (''0'' ÷ 2.5) = 1&lt;br /&gt;
&lt;br /&gt;
This makes the average score (1.69 + 1 + 0.2 + 1) ÷ 4) = 0.97 and the lowest score 0.2 (space).&lt;br /&gt;
&lt;br /&gt;
From the above numbers, we can calculate the base Impressiveness&lt;br /&gt;
: I = (65 × 0.97) + (35 × 0.2)&lt;br /&gt;
: I = 63 + 7&lt;br /&gt;
: I = 70 (70.21 unrounded)&lt;br /&gt;
Now, I &amp;lt; 500 × '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; (70 &amp;lt; 100), so there is no space penalty. Therefore, the reported Impressiveness of the room is 70 or &amp;quot;somewhat impressive&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If we were to increase the ''wealth'' of the above room by 6000 (4 units), our W&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; would become 6 -&amp;gt; 1 + ln(6) = 2.79 (+1.1 increase). Wealth wasn't the lowest stat, so this would only improve impressiveness by 1.1*16.25% = 17.9%, resulting in a score of 88 or &amp;quot;very impressive&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If we were to increase the original room's space by 10 units instead, '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; becomes 0.28 (0.08 increase). Increasing the bottleneck stat results in a change of 0.08*51.25% = 4.1%, or 74 total impressiveness or &amp;quot;somewhat impressive&amp;quot;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wealth ===&lt;br /&gt;
This is the sum of the [[Market Value]] of all items in the room and all walls and doors surrounding the room. Walls, doors, columns and animal flaps in the outer corner count as well. The value of [[power conduit]]s in walls ''is'' also included, however, for some reason building or deconstructing a conduit doesn't immediately update room wealth. Only if wealth is recalculated for some other reason, is the value of the conduits included. The same is true when building a column in the outer corner of the wall.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 500&lt;br /&gt;
| impoverished&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 500 and &amp;lt; 700&lt;br /&gt;
| somewhat poor&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 700 and &amp;lt; 2000&lt;br /&gt;
| mediocre&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 2000 and &amp;lt; 4000&lt;br /&gt;
| somewhat rich&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 4000 and &amp;lt; 10000&lt;br /&gt;
| rich&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 10000 and &amp;lt; 40000&lt;br /&gt;
| luxurious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 40000 and &amp;lt; 100000&lt;br /&gt;
| very luxurious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 100000 and &amp;lt; 1000000&lt;br /&gt;
| extremely luxurious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 1000000&lt;br /&gt;
| unbelievably luxurious&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Beauty ===&lt;br /&gt;
This is the average environmental beauty of the room including its walls and doors with a penalty for small rooms. Walls, doors and columns in the outer corner count as well. Building or deconstructing a column in the outer corner doesn't trigger a recalculation however. Floor tiles underneath walls and doors have no influence. &lt;br /&gt;
&lt;br /&gt;
Room beauty is calculated as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;TotalBeauty = sum(beauty for each internal cell) + sum(beauty for each adjacent cell)&lt;br /&gt;
WeightedSize = size if (size &amp;gt; 40) else (20 + size / 2)&lt;br /&gt;
RoomBeauty = TotalBeauty / WeightedSize&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This means that all rooms with less than 40 internal space will have their beauty penalised.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt; -3.5&lt;br /&gt;
| hideous&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -3.5 and &amp;lt; 0&lt;br /&gt;
| ugly&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 0 and &amp;lt; 2.4&lt;br /&gt;
| neutral&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 2.4 and &amp;lt; 5&lt;br /&gt;
| pretty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 5 and &amp;lt; 15&lt;br /&gt;
| beautiful&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 15 and &amp;lt; 50&lt;br /&gt;
| very beautiful&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 50 and &amp;lt; 100&lt;br /&gt;
| extremely beautiful&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 100&lt;br /&gt;
| unbelievably beautiful&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space ===&lt;br /&gt;
Indicates how much free space is available in the room. A room's Space score is 1.4 times the number of tiles in the room. Objects that prevent a pawn from standing in a space will decrease the available space in the room by 0.9 per tile the object covers. Thus, an occupied tile contributes a total of 0.5 to space. Objects that reduce space include beds, tables, workbenches, lamps, and heaters. Stools and chairs do not reduce space.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
! typical size*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 12.5&lt;br /&gt;
| cramped&lt;br /&gt;
| 3x4 or smaller*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 12.5 and &amp;lt; 29&lt;br /&gt;
| rather tight&lt;br /&gt;
| 3x6, 4x5*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 29 and &amp;lt; 55&lt;br /&gt;
| average-sized&lt;br /&gt;
| 4x7, 5x6*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 55 and &amp;lt; 70&lt;br /&gt;
| somewhat spacious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 70 and &amp;lt; 130&lt;br /&gt;
| quite spacious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 130 and &amp;lt; 349.5&lt;br /&gt;
| very spacious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 349.5&lt;br /&gt;
| extremely spacious&lt;br /&gt;
|}&lt;br /&gt;
: (* These are &amp;quot;safe&amp;quot; approximations; as described, the items placed &amp;lt;u&amp;gt;in&amp;lt;/u&amp;gt; the room can greatly reduce the effective size. For example, an empty 5x5 room has space (25 x 1.4 =) 35, easily &amp;quot;average&amp;quot; - when empty. However, placing just one bed (2 tiles), one table (2 tiles), a light, a heater, a plant pot and one artwork (1 tile each, a chair is &amp;quot;free&amp;quot;) in that room reduces the effective space by -7.2 (= 8 tiles x .9), and the effective space is now 27.8, &amp;quot;rather tight&amp;quot;.)&lt;br /&gt;
: (* Due to floating point inaccuracies, sometimes a room that is right on a threshold may randomly count for one category or the other. For example, a room with 5 standable tiles and 11 walkable but non-standable tiles should come out to exactly 12.5 score, but may result in either &amp;quot;cramped&amp;quot; or &amp;quot;rather tight&amp;quot;. It's safest to not rely on exact values.)&lt;br /&gt;
&lt;br /&gt;
Note, that space of the room affects only its impressiveness. Careful to not confuse with Pawn's [[space]] need.&lt;br /&gt;
&lt;br /&gt;
=== Cleanliness ===&lt;br /&gt;
This stat affects [[Surgery_Success_Chance_Factor#Room_Cleanliness_Multiplier|Surgery Success Chance]], [[Research#Research speed|research speed]], the chance that cooked meals will cause [[food poisoning]], and gene [[Assembly Speed Factor]].{{BiotechIcon}} A room's cleanliness is the average cleanliness score of all tiles in the room. It is determined by the type of [[floor]]ing, the presence of any [[filth]], and the cleanliness value of some furniture such as the [[butcher table]] and the [[stonecutter's table]]. Note that the type of [[floor]] under a door doesn't count for Cleanliness, but filth under a door does count.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=display:inline-grid&amp;gt;&lt;br /&gt;
:::{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Room Cleanliness&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; -1.1&lt;br /&gt;
| very dirty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -1.1 and &amp;lt; -0.4&lt;br /&gt;
| dirty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -0.4 and &amp;lt; -0.05&lt;br /&gt;
| slightly dirty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -0.05 and &amp;lt; 0.4&lt;br /&gt;
| clean&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 0.4&lt;br /&gt;
| sterile&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=display:inline-grid&amp;gt;&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Surface&lt;br /&gt;
! Cleanliness&amp;lt;br/&amp;gt;Value&lt;br /&gt;
|-&lt;br /&gt;
|[[Void metal ]]{{AnomalyIcon}} || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Sterile tile]] floor || 0.6&lt;br /&gt;
|-&lt;br /&gt;
| [[Steel tile|Steel]], [[Silver tile|Silver]] or [[Gold tile|Gold]] floor || 0.2&lt;br /&gt;
|-&lt;br /&gt;
|[[Bioferrite plate]]{{AnomalyIcon}} || 0.2&lt;br /&gt;
|-&lt;br /&gt;
| all other constructed [[floor]]ing&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt; [[Bridge]]s || 0&lt;br /&gt;
|-&lt;br /&gt;
| Natural stone ([[Rough stone|rough]] or [[Smooth stone|smoothed]]) || 0&lt;br /&gt;
|- &lt;br /&gt;
| [[Straw matting]] || -0.1&lt;br /&gt;
|-&lt;br /&gt;
| all other [[Environment#Terrain|natural surfaces]] (soil, gravel, etc.) || -1&lt;br /&gt;
|-&lt;br /&gt;
| [[Marsh]], [[Marshy soil]], [[Mud]], [[Broken asphalt]] || -2&lt;br /&gt;
|-&lt;br /&gt;
| [[Chunk]]s || -2&lt;br /&gt;
|-&lt;br /&gt;
|[[Flesh]]{{AnomalyIcon}} || -3&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Dirt, rubble, all other filth]] || -5&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Blood]] || -10&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Insect blood, vomit, fuel puddle]] || -15&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Corpsebile]] || -20&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using &amp;quot;Toggle the beauty display&amp;quot; can help locate filth in a given room, which typically stands out due to its negative beauty.&lt;br /&gt;
&lt;br /&gt;
== Map regions ==&lt;br /&gt;
Upon map generation, the map is divided into chunks of 12x12 squares called map regions. Each region requires a contiguous area and will be subdivided otherwise. Under no circumstance will a region extend beyond the initial 12x12 grid. Impassable buildings (both natural and artificial) are not considered as part of any map region for this purpose and will subdivide existing map regions accordingly. Regions will fuse when possible. Map regions are used for several calculations and can be seen in game via the debug option &amp;quot;Draw Regions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-customtoggle-myDivision&amp;quot; style=&amp;quot;display:inline-block;background:rgba(128,128,128,0.5);color:white;padding:5px;border-radius:5px;outline:none;user-select:none&amp;quot;&amp;gt;Some additional notes:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-myDivision&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;background:rgba(255,255,255,.5);margin-top:10px;padding:10px;border-radius:5px&amp;quot;&amp;gt;&lt;br /&gt;
* Impassable buildings are never part of any map region.&lt;br /&gt;
** Impassable non-walls (ex: [[Ship engine]]) may create a &amp;quot;red&amp;quot; temporal map region on construction that will be removed once anything else is build/destroyed.&lt;br /&gt;
* Impassable terrain creates map regions confined to its extension.&lt;br /&gt;
** These regions don't interact with the regular ones, but otherwise follow the stated rules.&lt;br /&gt;
* Passable buildings, such as [[fence]]s and [[barricade]]s, create map regions along their extension.&lt;br /&gt;
** These &amp;quot;fence&amp;quot; regions won't interact with other kinds, but otherwise follow the stated rules.&lt;br /&gt;
* Doors have unique behavior&lt;br /&gt;
** Single tile doors create a 3 tile map region centered on the doors' tile, following the door's orientation, that overlaps with other map regions.&lt;br /&gt;
*** Impassable objects will delete the overlapping section, no interaction otherwise.&lt;br /&gt;
** Double tile doors create 2 map regions, 1 for each of its tiles.&lt;br /&gt;
** The map regions created by doors don't interact with any other, not even each other.&lt;br /&gt;
* The grid defining regions is drawn from the bottom-left of the map row by row. &lt;br /&gt;
	&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.12.906|0.12.906]] - Added.&lt;br /&gt;
* 1.1 - Added room stats gizmo, which displays the stats of the room containing a selected building, at a glance.&lt;br /&gt;
* [[Royalty DLC]] release - Throne room role added.&lt;br /&gt;
* [[Ideology DLC]] release - Temple room role added.&lt;br /&gt;
* [[Version/1.3.3072|1.3.3072]] - Fix: Checking all beds instead of just humanlike ones for room owner.&lt;br /&gt;
* [[Version/1.4.3523|1.4.3523]] - Added the storeroom role for rooms with lots of shelves.&lt;br /&gt;
* [[Biotech DLC]] release - Nursery, playroom, classroom, and deathrest chamber roles added.&lt;br /&gt;
* [[Anomaly DLC]] release - Containment cell and ceremonial chamber roles added.&lt;br /&gt;
* [[Version/1.6.4518|1.6.4518]] - Some production buildings now have a work speed penalty if they are not in the correct room.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Game mechanics]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Rooms&amp;diff=174433</id>
		<title>Rooms</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Rooms&amp;diff=174433"/>
		<updated>2026-01-27T19:30:57Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: I rejected your edit because it is straight-up incorrect and doesn't match the game's code. If you have evidence to the contrary, please come talk to me on Discord.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- This is a hidden reference because I couldn't figure out how to hide it any other way 😭 --&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;ref name=&amp;quot;penalty&amp;quot;&amp;gt;Work speed penalty of 80% if not placed in the room with the correct role.&amp;lt;/ref&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| align=center | {{Gameplay Nav}} |}&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
A '''room''' is a space fully enclosed by impassable objects such as [[wall]]s, [[door]]s (open or closed), [[vent]]s, natural rock, or [[cooler]]s. Corners do not need to be filled in order to enclose a room.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
A room that's at least 75% [[roof]]ed is considered [[indoors]]. This distinction affects [[temperature]], [[Deterioration Rate]], [[Work Speed Factor]], and pawns' [[outdoors]] and indoors needs. {{Check Tag|Verify|Does it really affect all these stats, and how specifically?}}&lt;br /&gt;
&lt;br /&gt;
An indoor room will remain an indoor room when its doors are open — even when they're held open permanently. [[Vac barrier]]s also enclose a room despite not being impassable. If a door is destroyed and the room is no longer enclosed, the room will instantly be considered outdoors.&lt;br /&gt;
&lt;br /&gt;
The maximum size of a room is 36 [[#Map regions|map regions]]. The equivalent size in tiles varies based on the position and shape of the room, but as reference:&lt;br /&gt;
* The maximum area possible per room is 5,184 tiles (72x72).&lt;br /&gt;
* An empty 50x50 square room is the largest room that won't have issues with map regions.&lt;br /&gt;
* The more complex the shape of a room, the more likely it is to run into problems with map regions.&lt;br /&gt;
* Above this size, the area in question will be treated as a non-room indoors space.&lt;br /&gt;
&lt;br /&gt;
=== Temperature ===&lt;br /&gt;
Indoor rooms can have a different temperature than the outside. Open [[door]]s, open [[vent]]s, or missing roof tiles will increase the rate at which heat is exchanged with the outdoors. For further information, see the [[temperature]] page.&lt;br /&gt;
&lt;br /&gt;
The temperature of an outdoor room will always be identical to the outdoor temperature. If an indoor room has enough roof removed{{Check Tag|How much?}}, or stops being enclosed, it will ''instantly'' adopt the outdoor temperature.&lt;br /&gt;
&lt;br /&gt;
== Roles ==&lt;br /&gt;
'''Room roles''' are assigned to a room based on the buildings they contain, such as a ''kitchen'' when containing an [[electric stove]] or a [[fueled stove]]. They determine whether a colonist is affected by all, some, or none of the room stats.&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
Certain room roles grant [[mood]]lets based on their [[Impressiveness]], which is affected by all four substats. To gain the moodlet, the room must be used by a pawn for the role's associated purpose (i.e., eating at a table for the dining room role or playing billiards for the rec room role). Despite the game displaying only one role, rooms can grant moodlets from multiple roles when used for that role. The moodlets are typically {{Check Tag|When not?}} applied when a colonist ''begins'' said activity in the room, and they last for 24 hours. {{Check Tag |Verify| What about deathresting? It uses a separate thought.}}&lt;br /&gt;
&lt;br /&gt;
Buildings associated with hospitals, laboratories, and kitchens make direct use of the [[Cleanliness]] stat for their [[Work Speed Factor]].&lt;br /&gt;
&lt;br /&gt;
Some room roles cannot have certain buildings inside without inflicting a mood penalty (i.e., [[Titles#Thrones and Bedrooms|throne rooms]] {{RoyaltyIcon}} and temples {{IdeologyIcon}} with [[Production|workstations]]).&lt;br /&gt;
&lt;br /&gt;
Pawns also have separate needs for [[Beauty]] and [[Space]], which every room can fulfill. Unlike the room stats of the same name, these needs are checked within a certain radius from the pawn, as opposed to anywhere in the room. See those pages for further details.&lt;br /&gt;
&lt;br /&gt;
=== Score calculation ===&lt;br /&gt;
For each room, every room role is given a score based on the buildings inside, and the role with the highest score is the one displayed. In the case of a tie, the earlier roles on the following table take priority.&lt;br /&gt;
&lt;br /&gt;
For the purposes of room role scoring, the following are considered non-baby humanlike beds: {{RoomRolesBuildingList|Bed-associated rooms}}.&lt;br /&gt;
&lt;br /&gt;
=== List of roles ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Label&lt;br /&gt;
! Mood impact&lt;br /&gt;
! Related stats&lt;br /&gt;
! Score calculation logic&lt;br /&gt;
|-&lt;br /&gt;
| Room&lt;br /&gt;
| None&lt;br /&gt;
| None ||&lt;br /&gt;
* Returns a score of 0.99.&lt;br /&gt;
|-&lt;br /&gt;
| Bedroom &amp;lt;ref name=&amp;quot;owner name&amp;quot;&amp;gt;This role will have its owners' name added to its name.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There are no humanlike beds.&lt;br /&gt;
** There is at least 1 medical humanlike bed or at least 1 prisoner humanlike bed.&lt;br /&gt;
** There is more than 1 non-assigned humanlike bed.&lt;br /&gt;
** There is at least 1 adult assigned and there are other pawns assigned that are not in its love cluster.&amp;lt;ref&amp;gt;A pawn's love cluster is all the other pawns that can be linked to the pawn through a chain of romantic relationships.&amp;lt;/ref&amp;gt;&lt;br /&gt;
** There is at least 1 child assigned and there aren't any adults assigned that are a parent of the child.&lt;br /&gt;
* Returns 100,000 score otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Prison cell &amp;lt;ref name=&amp;quot;owner name&amp;quot; /&amp;gt;&lt;br /&gt;
| [[Mood#Situational RoomStats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 non-prisoner humanlike bed.&lt;br /&gt;
** There is more than 1 humanlike bed.&lt;br /&gt;
* Returns 170,000 score for a non-medical prisoner humanlike bed.&lt;br /&gt;
* Returns 100,000 score for a medical prisoner humanlike bed.&lt;br /&gt;
|-&lt;br /&gt;
| Dining room&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 12 score per each one of the following: {{RoomRolesBuildingList|Dining room}}.&lt;br /&gt;
|-&lt;br /&gt;
| Rec room&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 7 score per each one of the following: {{RoomRolesBuildingList|Rec room}}.&lt;br /&gt;
|-&lt;br /&gt;
| Hospital&lt;br /&gt;
| [[Mood#Situation RoomStats|Yes]]&lt;br /&gt;
| [[Impressiveness]], [[Room stats|Cleanliness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 prisoner humanlike bed.&lt;br /&gt;
** There are no medical humanlike beds.&lt;br /&gt;
* Returns 100,000 score otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Laboratory&lt;br /&gt;
| No&lt;br /&gt;
| [[Room stats|Cleanliness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 60 score per each one of the following: {{RoomRolesBuildingList|Laboratory}}.&lt;br /&gt;
|-&lt;br /&gt;
| Workshop&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 27 score per each one of the following: {{RoomRolesBuildingList|Workshop}}. The [[crafting spot]] does ''not'' count.&lt;br /&gt;
|-&lt;br /&gt;
| Storeroom&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 1 score per each one of the following: {{RoomRolesBuildingList|Storeroom}}.&lt;br /&gt;
|-&lt;br /&gt;
| Barracks &amp;lt;ref name=&amp;quot;owner name&amp;quot; /&amp;gt;&lt;br /&gt;
| [[Mood#Room Stats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 prisoner humanlike bed.&lt;br /&gt;
** The room is a valid bedroom.&lt;br /&gt;
* Returns 100,100 score for every non-medical humanlike bed otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Prison barracks &amp;lt;ref name=&amp;quot;owner name&amp;quot; /&amp;gt;&lt;br /&gt;
| [[Mood#Situation RoomStats|Yes]]&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** There is at least 1 non-prisoner humanlike bed.&lt;br /&gt;
** There are less than 2 prisoner beds.&lt;br /&gt;
* Returns 100,100 score per non-medical prisoner bed and 50,001 per medical prisoner bed.&lt;br /&gt;
|-&lt;br /&gt;
| Kitchen&lt;br /&gt;
| No&lt;br /&gt;
| [[Room stats|Cleanliness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 28 score per production building that has at least 1 recipe that produces an edible result. The following fulfill the requirement: {{RoomRolesBuildingList|Kitchen}}. The [[brewery]], [[butcher spot]], and [[butcher table]] do ''not'' fulfill the requirement.&lt;br /&gt;
|-&lt;br /&gt;
| Tomb&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 50 score per each one of the following: {{RoomRolesBuildingList|Tomb}}.&lt;br /&gt;
|-&lt;br /&gt;
| Barn&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 7.6 score per non-humanlike bed, which are the following: {{RoomRolesBuildingList|Barn}}.&lt;br /&gt;
|-&lt;br /&gt;
| [[Throne room]] {{RoyaltyIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| [[Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 10,000 score if there is any one of the following: {{RoomRolesBuildingList|Throne room}}.&lt;br /&gt;
* Returns 0 score otherwise.&lt;br /&gt;
|-&lt;br /&gt;
| Temple {{IdeologyIcon}} &amp;lt;ref&amp;gt;This role changes to the ideoligion's set temple name.&amp;lt;/ref&amp;gt;&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns -1 score if the [[Ideology DLC]] is not active.&lt;br /&gt;
* Returns 0 score if there are no altars with the colony's ideology.&lt;br /&gt;
* Returns 75 score per altar with the colony's ideology, with a minimum of 2,000 score. The following are considered altars: {{RoomRolesBuildingList|Temple}}.&lt;br /&gt;
|-&lt;br /&gt;
| Nursery {{BiotechIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** The [[Biotech DLC]] is not active.&lt;br /&gt;
** There is at least 1 non-medical prisoner bed or at least 1 non-baby bed.&lt;br /&gt;
** There are less than 2 baby beds.&lt;br /&gt;
* Returns 100,200 score per baby bed. The following are considered baby beds: {{RoomRolesBuildingList|Nursery}}.&lt;br /&gt;
|-&lt;br /&gt;
| Playroom {{BiotechIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** The [[Biotech DLC]] is not active.&lt;br /&gt;
** There is at least 1 humanlike bed in the room.&lt;br /&gt;
* Returns 8 score per each one of the following: {{RoomRolesBuildingList|Playroom}}.&lt;br /&gt;
|-&lt;br /&gt;
| Classroom {{BiotechIcon}}&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 0 score if any of the following is true:&lt;br /&gt;
** The [[Biotech DLC]] is not active.&lt;br /&gt;
** There is at least 1 human bed in the room.&lt;br /&gt;
* Returns 8 score per each one of the following: {{RoomRolesBuildingList|Classroom}}.&lt;br /&gt;
|-&lt;br /&gt;
| Deathrest chamber {{BiotechIcon}}&lt;br /&gt;
| Yes&lt;br /&gt;
| [[Room stats|Impressiveness]]&lt;br /&gt;
|&lt;br /&gt;
* Returns 100 score per [[deathrest casket]] {{BiotechIcon}} and 50 score per [[deathrest accelerator]] {{BiotechIcon}}, [[glucosoid pump]] {{BiotechIcon}}, [[hemogen amplifier]] {{BiotechIcon}}, [[hemopump]] {{BiotechIcon}}, or [[psychofluid pump]] {{BiotechIcon}}.&lt;br /&gt;
|-&lt;br /&gt;
| Containment cell {{AnomalyIcon}}&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 100 score per [[holding platform]] {{AnomalyIcon}} or [[holding spot]] {{AnomalyIcon}} and 50 score per [[bioferrite harvester]] {{AnomalyIcon}}, [[electric inhibitor]] {{AnomalyIcon}}, or [[electroharvester]] {{AnomalyIcon}}.&lt;br /&gt;
|-&lt;br /&gt;
| Ceremonial chamber {{AnomalyIcon}}&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
* Returns 200 score per each one of the following: {{RoomRolesBuildingList|Ceremonial chamber}}.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Other pieces of [[furniture]] not mentioned, such as [[chair|chairs]], are not considered for score calculation.&lt;br /&gt;
&lt;br /&gt;
== Stats ==&lt;br /&gt;
[[File:quality preview.png|300px|right]]&lt;br /&gt;
'''Room stats''' are values of a room that passively affect both [[thought]]s about the room itself and some events and activities that take place within. These include [[Impressiveness]], which is calculated from four composite stats: [[Wealth]], [[Beauty]], [[Space]], and [[Cleanliness]]. These base stats are automatically calculated from [[buildings]], [[floor]]ing, [[filth]], the room's perimeter, and items within the room.&lt;br /&gt;
&lt;br /&gt;
Room stats can be inspected with the room stats display, which can be toggled with a button in the lower right corner of the screen or a hotkey (''G'' by default). Additional information can also be viewed by holding down the ''Alt'' key.&lt;br /&gt;
&lt;br /&gt;
Room stats affect the following:&lt;br /&gt;
* Medical treatment quality (Cleanliness)&lt;br /&gt;
* Research speed (Cleanliness)&lt;br /&gt;
* [[Food poisoning]] chance in prepared meals (Cleanliness)&lt;br /&gt;
* [[Mood#Room_stats|Mood]] of the people using them (Impressiveness)&lt;br /&gt;
&lt;br /&gt;
The following traits are affected by room stats:&lt;br /&gt;
* [[Greedy]] - Decrease without sufficiently Impressive bedroom.&lt;br /&gt;
* [[Jealous]] - Decrease if anyone has a noticeably better bedroom. {{Check Tag|How much?}}&lt;br /&gt;
* [[Ascetic]] - Decrease if room is too Impressive. Increase if bedroom is dull or worse.&lt;br /&gt;
&lt;br /&gt;
=== Impressiveness ===&lt;br /&gt;
The value for '''Impressiveness''' is based on the four other room stats ('''Wealth''', '''Beauty''', '''Space''', and '''Cleanliness''').&lt;br /&gt;
&lt;br /&gt;
The mood effects from the room depend on the Impressiveness level, and not on the precise value. That value is rounded ''down'' to the nearest whole number, and a label (or &amp;quot;level&amp;quot;) of Impressiveness will be given to the room, according to the table below. This level is used to apply the relevant thought, positive or negative. &lt;br /&gt;
&lt;br /&gt;
The exact mood effects depend on the [[Room#Roles|room role]], with different rooms having different values at each level. For more information, see [[Mood#Room stats|this section of the Mood page]]{{Check Tag|Outdated link}} For bedrooms, dining rooms, and rec rooms, the effects are as follows:{{Check Tag|Verify table|Add values for other room types}}&lt;br /&gt;
&lt;br /&gt;
::{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
! Mood impact&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt; 20&lt;br /&gt;
| awful&lt;br /&gt;
| {{Bad|-2}} (bedrooms only)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 20 and &amp;lt; 30&lt;br /&gt;
| dull&lt;br /&gt;
| ''none''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 30 and &amp;lt; 40&lt;br /&gt;
| mediocre&lt;br /&gt;
| ''none''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 40 and &amp;lt; 50&lt;br /&gt;
| decent&lt;br /&gt;
| {{Good|+2}}&lt;br /&gt;
|- &lt;br /&gt;
| &amp;gt;= 50 and &amp;lt; 65&lt;br /&gt;
| slightly impressive&lt;br /&gt;
| {{Good|+3}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 65 and &amp;lt; 85&lt;br /&gt;
| somewhat impressive&lt;br /&gt;
| {{Good|+4}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 85 and &amp;lt; 120&lt;br /&gt;
| very impressive&lt;br /&gt;
| {{Good|+5}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 120 and &amp;lt; 170&lt;br /&gt;
| extremely impressive&lt;br /&gt;
| {{Good|+6}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 170 and &amp;lt; 240&lt;br /&gt;
| unbelievably impressive&lt;br /&gt;
| {{Good|+7}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 240&lt;br /&gt;
| wondrously impressive&lt;br /&gt;
| {{Good|+8}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Guidelines ====&lt;br /&gt;
&lt;br /&gt;
Since the impressiveness calculation (explained below) is fairly involved, it is not practical to predict impressiveness levels in an actual game. However, the following rules of thumb can be applied:&lt;br /&gt;
&lt;br /&gt;
* '''Keep all four room stats equally in mind.''' There is a heavy weighting towards whichever stat is weakest, which is counted as much as all three other stats combined. For example, having a masterpiece work of art in a large room (high ''wealth'', ''space'' and ''beauty'') is not very effective if the floor is covered in vomit and animal filth (low ''cleanliness''). It is quite difficult to compensate for one low stat by raising the other three.&lt;br /&gt;
&lt;br /&gt;
* '''Making a particularly small room ''impressive'' is difficult.''' Room size is a limiting factor for Impressiveness. If you want to make the room &amp;quot;very impressive&amp;quot;, it should have a space of at least around 25 (which still counts as &amp;quot;rather tight&amp;quot; in the game). E.g. a furnished bedroom with a 5x5 or 4×6 footprint would be fine, and a little smaller could still work, but it would be a challenge to get there with a 4x4 room. Note that any naturally &amp;quot;large&amp;quot; rooms like hallways, lobbies, recreation halls etc. will never run into this limitation at all.&lt;br /&gt;
&lt;br /&gt;
* '''Cleanliness matters'''. Since the level of impressiveness is what counts, and there are sharp thresholds separating the levels, even a minute change of any of the values can have a strong effect. This is usually due to ''cleanliness'' changing (because the other factors are pretty much fixed); even a single speck of dirt on the floor can result in major [[mood]] changes. Make sure that the room is not too close to a level threshold, and keep it clean.&lt;br /&gt;
&lt;br /&gt;
* '''Do not go overboard'''. There are sharply diminishing returns from increasing any room stat. Increasing any of the stats has dramatically diminishing returns with regards to impressiveness. It is not worth putting a lot of resources into any of the stats beyond a point.*&lt;br /&gt;
:: (* Not unless you care about the stat for other reasons; &amp;quot;room impressiveness&amp;quot; is not the only stat that can affect [[mood]]. Beauty, among others, has its own value.)&lt;br /&gt;
&lt;br /&gt;
==== Formula ====&lt;br /&gt;
The actual formula for calculating impressiveness involves multiple steps, starting with the four room statistics (wealth, beauty, space and cleanliness) and resulting in a single integer value ''impressiveness''.&lt;br /&gt;
&lt;br /&gt;
The calculation is done in several steps:&lt;br /&gt;
# Convert each stat into natural units, so that typical in-game stats end up in a range of comparable single digit values.&lt;br /&gt;
# Curve values beyond (-1, 1) using a natural logarithm.&lt;br /&gt;
# Average the four stats into an impressiveness score, weighted towards the lowest one&lt;br /&gt;
# Soft-cap the result according to the space of the room.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-customtoggle-EXImpressivness&amp;quot; style=&amp;quot;display:inline-block;background:rgba(128,128,128,0.5);color:white;padding:5px;border-radius:5px;outline:none;user-select:none&amp;quot;&amp;gt;Detailed formula:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-EXImpressivness&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;background:rgba(255,255,255,.5);margin-top:10px;padding:10px;border-radius:5px&amp;quot;&amp;gt;&lt;br /&gt;
===== Base values =====&lt;br /&gt;
Firstly, all four raw stats are scaled individually by applying a factor, deriving the ''base contribution'' for each stat:&lt;br /&gt;
&lt;br /&gt;
: '''W'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''wealth'' ÷ 1500&lt;br /&gt;
: '''B'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''beauty'' ÷ 3&lt;br /&gt;
: '''S'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''space'' ÷ 125&lt;br /&gt;
: '''C'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = 1 + (''cleanliness'' ÷ 2.5)&lt;br /&gt;
&lt;br /&gt;
===== Modified values =====&lt;br /&gt;
These base values are now modified if they lie outside the range (−1, 1), by applying the ''natural logarithm'' as follows: {{Check Tag|Add image|An image would be quite useful because the modified values are actually very visually intuitive despite the formula's complexity}}&lt;br /&gt;
 m =  1 + ln(b)          (if b &amp;gt;= 1)&lt;br /&gt;
 m = [1 + ln(−b)] × −1   (if b &amp;lt;= −1)&lt;br /&gt;
(This is symmetrical for positive and negative values).&lt;br /&gt;
&lt;br /&gt;
===== Impressiveness score =====&lt;br /&gt;
These modified values are then combined to give the ''impressiveness'' score as follows.&lt;br /&gt;
&lt;br /&gt;
Take a weighted sum of the average of the values and the smallest of the values:&lt;br /&gt;
 I = (65 × ('''W'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; + '''B'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; + '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; + '''C'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;) ÷ 4) + (35 × min('''W'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;, '''B'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;, '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;, '''C'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;))&lt;br /&gt;
This means that the smallest of the values contributes 51.25%, just over half, while the other three values each contribute 16.25%, or 48.75% combined.&lt;br /&gt;
&lt;br /&gt;
As a final step we compare this impressiveness value to the ''spaciousness'' of the room:&lt;br /&gt;
 S' = 500 × S&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt;&lt;br /&gt;
 If I &amp;gt; S', then&lt;br /&gt;
   I' = 0.25 × I + 0.75 × S'&lt;br /&gt;
 else&lt;br /&gt;
   I' = I (no change)&lt;br /&gt;
&lt;br /&gt;
This means a room's max impressiveness is soft-capped to 500% of their space score. However, this specific step is only relevant for very small, disproportionately luxurious rooms. Even a 60-space room (S = 0.5) will incur no penalty up to 240 impressiveness, enough to clear the highest bracket (&amp;quot;wondrously impressive&amp;quot;), and a 30-space room (S = 0.24) already reaches &amp;quot;extremely impressive&amp;quot; with no penalty.&lt;br /&gt;
&lt;br /&gt;
===== Takeaways =====&lt;br /&gt;
It can be useful to think of impressiveness as a percentage value composed of four categories; a score of 1 in each category corresponds to 100 impressiveness, while values above 1 stop giving &amp;quot;fair&amp;quot; (ie. linear) returns. One unit of each stat is equivalent to each the following:&lt;br /&gt;
* ''Wealth'' of 1,500&lt;br /&gt;
* ''Beauty'' of 3&lt;br /&gt;
* ''Cleanliness'' of 0 (i.e. when using any cleanliness enhancers)&lt;br /&gt;
* ''Space'' of 125&lt;br /&gt;
Above these values, it begins to become more economical to invest attention in other stats. A &amp;quot;standard bedroom&amp;quot; of size 4×6, carpeted and containing bed, dresser, end table, lamp and plant pot will still have plenty of leeway in all categories (except cleanliness, which is at a natural 0 for a cleaned room); in this case, you will usually proceed by putting a sculpture or high quality armchair in the room, increasing beauty and wealth.&lt;br /&gt;
&lt;br /&gt;
Furthermore, observe that the factors (i.e., modified values) for ''wealth'' and ''beauty'' will often be well above 1, but ''cleanliness'' and ''space'' usually lower than 1. Unless the room is &amp;quot;very spacious&amp;quot;, or close to it, the decisive factor will thus be ''space'', then ''cleanliness''. In fact, even a well-cleaned room can never have a value over C = 1 (0 cleanliness; perfectly clean) or C = 1.215 (0.6 cleanliness; sterile), meaning rooms above ~100-120 impressiveness will ''always'' be bottlenecked by their cleanliness score. This makes &amp;quot;very impressive&amp;quot; (85-120 impressiveness) a natural set point for many rooms. &lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
Start with a room with a ''wealth'' of 3000, ''space'' of 25, ''cleanliness'' of 0, beauty of 3.&lt;br /&gt;
: '''W'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''3000'' ÷ 1500 = 2, but this is curved to 1 + ln(2) = '''1.69'''&lt;br /&gt;
: '''B'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''3'' ÷ 3 = 1&lt;br /&gt;
: '''S'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = ''25'' ÷ 125 = 0.2&lt;br /&gt;
: '''C'''&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt; = 1 + (''0'' ÷ 2.5) = 1&lt;br /&gt;
&lt;br /&gt;
This makes the average score (1.69 + 1 + 0.2 + 1) ÷ 4) = 0.97 and the lowest score 0.2 (space).&lt;br /&gt;
&lt;br /&gt;
From the above numbers, we can calculate the base Impressiveness&lt;br /&gt;
: I = (65 × 0.97) + (35 × 0.2)&lt;br /&gt;
: I = 63 + 7&lt;br /&gt;
: I = 70 (70.21 unrounded)&lt;br /&gt;
Now, I &amp;lt; 500 × '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; (70 &amp;lt; 100), so there is no space penalty. Therefore, the reported Impressiveness of the room is 70 or &amp;quot;somewhat impressive&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If we were to increase the ''wealth'' of the above room by 6000 (4 units), our W&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; would become 6 -&amp;gt; 1 + ln(6) = 2.79 (+1.1 increase). Wealth wasn't the lowest stat, so this would only improve impressiveness by 1.1*16.25% = 17.9%, resulting in a score of 88 or &amp;quot;very impressive&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If we were to increase the original room's space by 10 units instead, '''S'''&amp;lt;sub&amp;gt;m&amp;lt;/sub&amp;gt; becomes 0.28 (0.08 increase). Increasing the bottleneck stat results in a change of 0.08*51.25% = 4.1%, or 74 total impressiveness or &amp;quot;somewhat impressive&amp;quot;&lt;br /&gt;
	&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wealth ===&lt;br /&gt;
This is the sum of the [[Market Value]] of all items in the room and all walls and doors surrounding the room. Walls, doors, columns and animal flaps in the outer corner count as well. The value of [[power conduit]]s in walls ''is'' also included, however, for some reason building or deconstructing a conduit doesn't immediately update room wealth. Only if wealth is recalculated for some other reason, is the value of the conduits included. The same is true when building a column in the outer corner of the wall.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 500&lt;br /&gt;
| impoverished&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 500 and &amp;lt; 700&lt;br /&gt;
| somewhat poor&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 700 and &amp;lt; 2000&lt;br /&gt;
| mediocre&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 2000 and &amp;lt; 4000&lt;br /&gt;
| somewhat rich&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 4000 and &amp;lt; 10000&lt;br /&gt;
| rich&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 10000 and &amp;lt; 40000&lt;br /&gt;
| luxurious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 40000 and &amp;lt; 100000&lt;br /&gt;
| very luxurious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 100000 and &amp;lt; 1000000&lt;br /&gt;
| extremely luxurious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 1000000&lt;br /&gt;
| unbelievably luxurious&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Beauty ===&lt;br /&gt;
This is the average environmental beauty of the room including its walls and doors with a penalty for small rooms. Walls, doors and columns in the outer corner count as well. Building or deconstructing a column in the outer corner doesn't trigger a recalculation however. Floor tiles underneath walls and doors have no influence. &lt;br /&gt;
&lt;br /&gt;
Room beauty is calculated as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;TotalBeauty = sum(beauty for each internal cell) + sum(beauty for each adjacent cell)&lt;br /&gt;
WeightedSize = size if (size &amp;gt; 40) else (20 + size / 2)&lt;br /&gt;
RoomBeauty = TotalBeauty / WeightedSize&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This means that all rooms with less than 40 internal space will have their beauty penalised.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt; -3.5&lt;br /&gt;
| hideous&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -3.5 and &amp;lt; 0&lt;br /&gt;
| ugly&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 0 and &amp;lt; 2.4&lt;br /&gt;
| neutral&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 2.4 and &amp;lt; 5&lt;br /&gt;
| pretty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 5 and &amp;lt; 15&lt;br /&gt;
| beautiful&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 15 and &amp;lt; 50&lt;br /&gt;
| very beautiful&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 50 and &amp;lt; 100&lt;br /&gt;
| extremely beautiful&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 100&lt;br /&gt;
| unbelievably beautiful&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Space ===&lt;br /&gt;
Indicates how much free space is available in the room. A room's Space score is 1.4 times the number of tiles in the room. Objects that prevent a pawn from standing in a space will decrease the available space in the room by 0.9 per tile the object covers. Thus, an occupied tile contributes a total of 0.5 to space. Objects that reduce space include beds, tables, workbenches, lamps, and heaters. Stools and chairs do not reduce space.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin-left: auto; margin-right: auto; border: none;&amp;quot;&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
! typical size*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; 12.5&lt;br /&gt;
| cramped&lt;br /&gt;
| 3x4 or smaller*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 12.5 and &amp;lt; 29&lt;br /&gt;
| rather tight&lt;br /&gt;
| 3x6, 4x5*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 29 and &amp;lt; 55&lt;br /&gt;
| average-sized&lt;br /&gt;
| 4x7, 5x6*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 55 and &amp;lt; 70&lt;br /&gt;
| somewhat spacious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 70 and &amp;lt; 130&lt;br /&gt;
| quite spacious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 130 and &amp;lt; 349.5&lt;br /&gt;
| very spacious&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 349.5&lt;br /&gt;
| extremely spacious&lt;br /&gt;
|}&lt;br /&gt;
: (* These are &amp;quot;safe&amp;quot; approximations; as described, the items placed &amp;lt;u&amp;gt;in&amp;lt;/u&amp;gt; the room can greatly reduce the effective size. For example, an empty 5x5 room has space (25 x 1.4 =) 35, easily &amp;quot;average&amp;quot; - when empty. However, placing just one bed (2 tiles), one table (2 tiles), a light, a heater, a plant pot and one artwork (1 tile each, a chair is &amp;quot;free&amp;quot;) in that room reduces the effective space by -7.2 (= 8 tiles x .9), and the effective space is now 27.8, &amp;quot;rather tight&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
Note, that space of the room affects only its impressiveness. Careful to not confuse with Pawn's [[space]] need. &lt;br /&gt;
&lt;br /&gt;
=== Cleanliness ===&lt;br /&gt;
This stat affects [[Surgery_Success_Chance_Factor#Room_Cleanliness_Multiplier|Surgery Success Chance]], [[Research#Research speed|research speed]], the chance that cooked meals will cause [[food poisoning]], and gene [[Assembly Speed Factor]].{{BiotechIcon}} A room's cleanliness is the average cleanliness score of all tiles in the room. It is determined by the type of [[floor]]ing, the presence of any [[filth]], and the cleanliness value of some furniture such as the [[butcher table]] and the [[stonecutter's table]]. Note that the type of [[floor]] under a door doesn't count for Cleanliness, but filth under a door does count.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=display:inline-grid&amp;gt;&lt;br /&gt;
:::{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Room Cleanliness&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt; -1.1&lt;br /&gt;
| very dirty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -1.1 and &amp;lt; -0.4&lt;br /&gt;
| dirty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -0.4 and &amp;lt; -0.05&lt;br /&gt;
| slightly dirty&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= -0.05 and &amp;lt; 0.4&lt;br /&gt;
| clean&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;= 0.4&lt;br /&gt;
| sterile&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=display:inline-grid&amp;gt;&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Surface&lt;br /&gt;
! Cleanliness&amp;lt;br/&amp;gt;Value&lt;br /&gt;
|-&lt;br /&gt;
|[[Void metal ]]{{AnomalyIcon}} || 1&lt;br /&gt;
|-&lt;br /&gt;
| [[Sterile tile]] floor || 0.6&lt;br /&gt;
|-&lt;br /&gt;
| [[Steel tile|Steel]], [[Silver tile|Silver]] or [[Gold tile|Gold]] floor || 0.2&lt;br /&gt;
|-&lt;br /&gt;
|[[Bioferrite plate]]{{AnomalyIcon}} || 0.2&lt;br /&gt;
|-&lt;br /&gt;
| all other constructed [[floor]]ing&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt; [[Bridge]]s || 0&lt;br /&gt;
|-&lt;br /&gt;
| Natural stone ([[Rough stone|rough]] or [[Smooth stone|smoothed]]) || 0&lt;br /&gt;
|- &lt;br /&gt;
| [[Straw matting]] || -0.1&lt;br /&gt;
|-&lt;br /&gt;
| all other [[Environment#Terrain|natural surfaces]] (soil, gravel, etc.) || -1&lt;br /&gt;
|-&lt;br /&gt;
| [[Marsh]], [[Marshy soil]], [[Mud]], [[Broken asphalt]] || -2&lt;br /&gt;
|-&lt;br /&gt;
| [[Chunk]]s || -2&lt;br /&gt;
|-&lt;br /&gt;
|[[Flesh]]{{AnomalyIcon}} || -3&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Dirt, rubble, all other filth]] || -5&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Blood]] || -10&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Insect blood, vomit, fuel puddle]] || -15&lt;br /&gt;
|-&lt;br /&gt;
| [[Filth|Corpsebile]] || -20&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using &amp;quot;Toggle the beauty display&amp;quot; can help locate filth in a given room, which typically stands out due to its negative beauty.&lt;br /&gt;
&lt;br /&gt;
== Map regions ==&lt;br /&gt;
Upon map generation, the map is divided into chunks of 12x12 squares called map regions. Each region requires a contiguous area and will be subdivided otherwise. Under no circumstance will a region extend beyond the initial 12x12 grid. Impassable buildings (both natural and artificial) are not considered as part of any map region for this purpose and will subdivide existing map regions accordingly. Regions will fuse when possible. Map regions are used for several calculations and can be seen in game via the debug option &amp;quot;Draw Regions&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-customtoggle-myDivision&amp;quot; style=&amp;quot;display:inline-block;background:rgba(128,128,128,0.5);color:white;padding:5px;border-radius:5px;outline:none;user-select:none&amp;quot;&amp;gt;Some additional notes:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-myDivision&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot; style=&amp;quot;background:rgba(255,255,255,.5);margin-top:10px;padding:10px;border-radius:5px&amp;quot;&amp;gt;&lt;br /&gt;
* Impassable buildings are never part of any map region.&lt;br /&gt;
** Impassable non-walls (ex: [[Ship engine]]) may create a &amp;quot;red&amp;quot; temporal map region on construction that will be removed once anything else is build/destroyed.&lt;br /&gt;
* Impassable terrain creates map regions confined to its extension.&lt;br /&gt;
** These regions don't interact with the regular ones, but otherwise follow the stated rules.&lt;br /&gt;
* Passable buildings, such as [[fence]]s and [[barricade]]s, create map regions along their extension.&lt;br /&gt;
** These &amp;quot;fence&amp;quot; regions won't interact with other kinds, but otherwise follow the stated rules.&lt;br /&gt;
* Doors have unique behavior&lt;br /&gt;
** Single tile doors create a 3 tile map region centered on the doors' tile, following the door's orientation, that overlaps with other map regions.&lt;br /&gt;
*** Impassable objects will delete the overlapping section, no interaction otherwise.&lt;br /&gt;
** Double tile doors create 2 map regions, 1 for each of its tiles.&lt;br /&gt;
** The map regions created by doors don't interact with any other, not even each other.&lt;br /&gt;
* The grid defining regions is drawn from the bottom-left of the map row by row. &lt;br /&gt;
	&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.12.906|0.12.906]] - Added.&lt;br /&gt;
* 1.1 - Added room stats gizmo, which displays the stats of the room containing a selected building, at a glance.&lt;br /&gt;
* [[Royalty DLC]] release - Throne room role added.&lt;br /&gt;
* [[Ideology DLC]] release - Temple room role added.&lt;br /&gt;
* [[Version/1.3.3072|1.3.3072]] - Fix: Checking all beds instead of just humanlike ones for room owner.&lt;br /&gt;
* [[Version/1.4.3523|1.4.3523]] - Added the storeroom role for rooms with lots of shelves.&lt;br /&gt;
* [[Biotech DLC]] release - Nursery, playroom, classroom, and deathrest chamber roles added.&lt;br /&gt;
* [[Anomaly DLC]] release - Containment cell and ceremonial chamber roles added.&lt;br /&gt;
* [[Version/1.6.4518|1.6.4518]] - Some production buildings now have a work speed penalty if they are not in the correct room.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Game mechanics]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Immunity_Gain_Speed&amp;diff=174375</id>
		<title>Immunity Gain Speed</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Immunity_Gain_Speed&amp;diff=174375"/>
		<updated>2026-01-25T19:45:56Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Neither &amp;quot;gradual&amp;quot; nor &amp;quot;rapid&amp;quot; are appropriate descriptors.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub|reason= order of operations. also add Medical Specialist Immunity Drive ability}}{{Stat&lt;br /&gt;
| default base value = 1.0&lt;br /&gt;
| to string style = PercentZero&lt;br /&gt;
| description = The speed at which this character gains immunity to [[disease]]s. If this is too slow, the character will [[Death|die]] from the disease before developing immunity.&lt;br /&gt;
| category = BasicsPawn&lt;br /&gt;
}} The value shown in-game is rounded to the nearest whole percent, while exact value is used in calculations.&lt;br /&gt;
&lt;br /&gt;
While this stat can be seen in-game, the '''actual immunity gain speed''', measured in percentage per [[Time|day]], is hidden but can be deduced from thorough observations. It is calculated as a product of:&lt;br /&gt;
* Base immunity gain speed for the particular disease. For example, 23.88% per day for [[Flu#Humans|human Flu]].&lt;br /&gt;
* InfectionLuck, a pseudorandom factor ranging from 80% (Bad luck) to 120% (Good luck). It is set independently for each disease instance (when multiple pawns are affected by a disease outbreak, each of them gets their own disease instance). Wound infections in different organs of the same pawn are different instances, but only InfectionLuck of the oldest active infection comes into play (and only one infection immunity develops in organism, opposing all infection instances).&lt;br /&gt;
: ''Technical details. InfectionLuck is not stored in save file. Instead, it is calculated as a pseudorandom value depending on the world's seed (seedString) and disease's hediff ID (loadID). For example, it is ≈81.7511% for seed &amp;quot;InfectionLuck&amp;quot; and ID of 1947.''&lt;br /&gt;
* Immunity Gain Speed stat.&lt;br /&gt;
&lt;br /&gt;
Immunity gain speed is '''not''' affected by medical tend quality.&lt;br /&gt;
&lt;br /&gt;
==Stat factors==&lt;br /&gt;
Immunity Gain Speed stat is determined by many factors multiplicatively.&lt;br /&gt;
&lt;br /&gt;
===Capacities===&lt;br /&gt;
[[Blood Filtration]]: [[Blood Filtration Importance::0.5|50%]] importance. No allowed defect. [[Blood Filtration Limit::-|No]] Max. So,&lt;br /&gt;
: {{math|Blood filtration factor {{=}} Blood Filtration &amp;amp;divide; 2 + 50%}}&lt;br /&gt;
Notable facts:&lt;br /&gt;
* [[Malaria]] progressively reduces Blood Filtration.&lt;br /&gt;
* A missing [[Kidney]] reduces Blood Filtration by 50%. This alone results in a Blood filtration factor of 75%.&lt;br /&gt;
* [[Cancer]] progressively reduces efficiency in the body part affected, potentially reducing Blood Filtration if it is in the Kidneys or [[Liver]].&lt;br /&gt;
* [[Luciferium]] adds 70% to Blood Filtration. This alone results in a Blood filtration factor of 135%.&lt;br /&gt;
* [[Detoxifier kidney]]s each add 5% Blood Filtration each compared to a healthy kidney. This alone results in a blood filtration factor of 102.5% (105% with two).&lt;br /&gt;
** This is mutually exclusive with [[Immunoenhancer]]s&lt;br /&gt;
&lt;br /&gt;
===Saturation===&lt;br /&gt;
[[Saturation|Hunger/Food]]:&lt;br /&gt;
* 100%: Fed or Hungry&lt;br /&gt;
* 90%: Urgently Hungry (corresponds to Ravenously Hungry)&lt;br /&gt;
* 70%: Starving (corresponds to Malnourished)&lt;br /&gt;
&lt;br /&gt;
===Rest===&lt;br /&gt;
[[Rest]] need:&lt;br /&gt;
* 100%: Rested&lt;br /&gt;
* 96%: Tired (corresponds to [[Thoughts#Exhaustion|Drowsy]] thought)&lt;br /&gt;
* 92%: Very tired (corresponds to [[Thoughts#Exhaustion|Tired]] thought)&lt;br /&gt;
* 80%: Exhausted (corresponds to [[Thoughts#Exhaustion|Exhausted]] thought)&lt;br /&gt;
&lt;br /&gt;
In Bed:{{Check Tag|Crib?}}&lt;br /&gt;
* 95%: When resting/sleeping in an [[ancient bed]] {{IdeologyIcon}}.&lt;br /&gt;
* 100%: When not resting/sleeping or when resting/sleeping on the floor, ground or ([[animal sleeping spot|animal]] / [[double sleeping spot|double]] / [[baby sleeping spot|baby]] {{BiotechIcon}}) [[sleeping spot]].&lt;br /&gt;
* 105%: When resting/sleeping in a ([[double bedroll|double]]) [[bedroll]] or [[animal sleeping box]].&lt;br /&gt;
* 107%: When resting/sleeping in an [[animal bed]], ([[double bed|double]]) [[bed]], [[royal bed]], ([[slab double bed|double]]) [[slab bed]] {{IdeologyIcon}} or [[deathrest casket]] {{BiotechIcon}}.&lt;br /&gt;
* 111%: When resting/sleeping in a [[hospital bed]].&lt;br /&gt;
* 113%: When resting/sleeping in a hospital bed with attached [[vitals monitor]].&lt;br /&gt;
''Note that quality of the bed only influences the [[Rest Effectiveness|rest effectiveness]], not the immunity gain speed.''&lt;br /&gt;
&lt;br /&gt;
Resting:&lt;br /&gt;
* 100%: Not resting. Also, when [[downed]], despite visually lying.&lt;br /&gt;
* 110%: Resting, sleeping or [[Recreation#Activities_table|skygazing]] (cloudwatching, stargazing, etc).&lt;br /&gt;
&lt;br /&gt;
=== Age ===&lt;br /&gt;
{{Stub|section=1|reason=Verify the effect of things that affect life span, such as the [[Mild cell instability|cell instability]] gene, then provide examples for the resulting lifespans in the Age/IGS table - if verified, also verify on [[Disease]]}}&lt;br /&gt;
Generally, the multiplier for age follows a curve defined by 5 points.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Age !! Multiplier&lt;br /&gt;
|-&lt;br /&gt;
| 0.65 * Life Expectancy || 100%&lt;br /&gt;
|-&lt;br /&gt;
| 0.80 * Life Expectancy || 95%&lt;br /&gt;
|-&lt;br /&gt;
| 1.00 * Life Expectancy || 90%&lt;br /&gt;
|-&lt;br /&gt;
| 1.20 * Life Expectancy || 80%&lt;br /&gt;
|-&lt;br /&gt;
| 1.50 * Life Expectancy || 50%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As the life expectancy for [[Human]]s is 80, the following are approximate values for them:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Age !! Immunity Gain Speed &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;54 || 100%&lt;br /&gt;
|-&lt;br /&gt;
| 54 || 99%&lt;br /&gt;
|-&lt;br /&gt;
| 56 || 98%&lt;br /&gt;
|-&lt;br /&gt;
| 59 || 97%&lt;br /&gt;
|-&lt;br /&gt;
| 61 || 96%&lt;br /&gt;
|-&lt;br /&gt;
| 63 || 95%&lt;br /&gt;
|-&lt;br /&gt;
| 66 || 94%&lt;br /&gt;
|-&lt;br /&gt;
| 69 || 93%&lt;br /&gt;
|-&lt;br /&gt;
| 72 || 92%&lt;br /&gt;
|-&lt;br /&gt;
| 76 || 91%&lt;br /&gt;
|-&lt;br /&gt;
| 79 || 90%&lt;br /&gt;
|-&lt;br /&gt;
| 81 || 89%&lt;br /&gt;
|-&lt;br /&gt;
| 83 || 88%&lt;br /&gt;
|-&lt;br /&gt;
| 85 || 87%&lt;br /&gt;
|-&lt;br /&gt;
| 86 || 86%&lt;br /&gt;
|-&lt;br /&gt;
| 88 || 85%&lt;br /&gt;
|-&lt;br /&gt;
| 89 || 84%&lt;br /&gt;
|-&lt;br /&gt;
| 91 || 83%&lt;br /&gt;
|-&lt;br /&gt;
| 93 || 82%&lt;br /&gt;
|-&lt;br /&gt;
| 94 || 81%&lt;br /&gt;
|-&lt;br /&gt;
| 96 || 80%&lt;br /&gt;
|-&lt;br /&gt;
| 97 || 79%&lt;br /&gt;
|-&lt;br /&gt;
| 98 || 78%&lt;br /&gt;
|-&lt;br /&gt;
| 99 || 76%&lt;br /&gt;
|-&lt;br /&gt;
| 100 || 75%&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
After age 100, immunity linearly decreases to 50% at age 120 and remains there.&lt;br /&gt;
&lt;br /&gt;
=== Misc ===&lt;br /&gt;
* [[Immunoenhancer]] {{RoyaltyIcon}}: {{+|8%}} per, {{+|16%}} max&lt;br /&gt;
** This is mutually exclusive with [[Detoxifier kidney]]s {{BiotechIcon}}&lt;br /&gt;
* [[Super-immune]] trait: {{+|30%}}&lt;br /&gt;
* [[Moral guide]]'s Preach Health ability {{IdeologyIcon}}: {{+|25%}}&lt;br /&gt;
* [[Strong immunity]] gene {{BiotechIcon}}: {{Good|x110%}}&lt;br /&gt;
* [[Super immunity]] gene {{BiotechIcon}}: {{Good|x150%}}&lt;br /&gt;
* [[Perfect immunity]] gene {{BiotechIcon}}: No effect, prevents most common disease but does not cure existing disease&lt;br /&gt;
* [[Weak immunity]] gene {{BiotechIcon}}: {{Bad|x90%}}&lt;br /&gt;
* [[Inbred]] gene {{BiotechIcon}}: {{Bad|x85%}}&lt;br /&gt;
* [[Mild cell instability]] gene {{BiotechIcon}}: {{Bad|x96%}}, Lifespan factor {{Bad|x80%}}, {{Bad|x300%}} [[Cancer]] rate&lt;br /&gt;
* [[Major cell instability]] gene {{BiotechIcon}}: {{Bad|x92%}}, Lifespan factor {{Bad|x60%}}, {{Bad|x500%}} Cancer rate&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.12.906|0.12.906]] - Now affected by [[room stats]]&lt;br /&gt;
&lt;br /&gt;
{{nav|stats|wide}}&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Environment&amp;diff=174033</id>
		<title>Environment</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Environment&amp;diff=174033"/>
		<updated>2026-01-12T02:02:12Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Removed previous addition as there appears to be no evidence in the code to support this claim and a quick test in a pure vanilla game shows no such mechanic: https://i.imgur.com/ZxcnIQ7.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Gameplay_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;!-- End of Nav --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Stub|reason= Missing new Odyssey terrain and weather mechanics}}&lt;br /&gt;
{{TOCright}}&lt;br /&gt;
&lt;br /&gt;
The map '''environment''' are all aspects of the map that often can not be directly influenced by the player, such as terrain, weather conditions and lighting.&lt;br /&gt;
&lt;br /&gt;
== Beauty ==&lt;br /&gt;
{{Main|Beauty}}&lt;br /&gt;
Terrain, flooring, objects, and plants attribute to a tile's beauty, which in turn can affect a colonist's mood.&lt;br /&gt;
The contents of a tile have a cumulative effect on its beauty; i.e. a granite chunk (beauty of -10) on a carpeted floor (beauty of +2) gives the tile a net beauty of -8.&lt;br /&gt;
Certain unsightly objects, i.e. vomit, have one value when under a roof and a lower value when unroofed. This simulates the general disgust of seeing eyesores indoors versus encountering them outside.&lt;br /&gt;
&lt;br /&gt;
== Space ==&lt;br /&gt;
Environment space (as opposed to the [[Space|Need for Space]]) is the count of how much space there is to freely move around in a room. This is all the floor tiles that are either empty or have objects that can be passed through at full speed, such as chairs, building materials, and the various &amp;quot;spots&amp;quot;. All objects that either slow down or prevent movement through are not counted towards Environment Space. The &amp;quot;Space&amp;quot; number shown in the Environment display is this count x 1.4. This number is a measure of the entire room, and does not change depending on where a pawn is standing.&lt;br /&gt;
&lt;br /&gt;
== Flora ==&lt;br /&gt;
{{Main|Plants}}&lt;br /&gt;
Certain plants and trees have beauty, and may also provide [[cover]] to colonists.&lt;br /&gt;
&lt;br /&gt;
== Light ==&lt;br /&gt;
{{Stub|section=1|reason=1) Relationship between light % and plant growth speed e.g. Tinctoria grows so slow in normal soil under torch light that it rots before it grows enough to harvest 2) Effects of [[Dark vision]] and [[Ideoligion#Lighting|Lighting:Darkness preferred]] on mentioned stat and mood penalties}}&lt;br /&gt;
{{For|the furniture item|standing lamp}}&lt;br /&gt;
&lt;br /&gt;
Light can be generated artificially or naturally. Artificial light is produced by appliances in a limited range. Natural light is generated throughout the map on unroofed tiles. Roofed tiles will be dark unless lit artificially.&lt;br /&gt;
&lt;br /&gt;
Occasionally an [[Events#Eclipse|eclipse]] befalls the planet. Natural daytime light is no longer generated until it ends.&lt;br /&gt;
&lt;br /&gt;
Light's importance lies in the following effects:&lt;br /&gt;
* Plant growth - Most plants have light requirements to grow.&lt;br /&gt;
:*  0% only: {{DLC Icons|Nutrifungus}}&lt;br /&gt;
:*  0%+: {{#Ask: [[Min Grow Light::0]] [[Name::!Nutrifungus]]| format = template | template = DLC Icons | link = none | sort = From DLC, Name | sep = ,&amp;amp;nbsp;}}&lt;br /&gt;
:* 30%+: {{#Ask: [[Min Grow Light::0.3]]| format = template | template = DLC Icons | link = none | sort = From DLC, Name | sep = ,&amp;amp;nbsp;}}&lt;br /&gt;
:* 51%+: ''All other plants''&lt;br /&gt;
* Power - Solar generators only produce power when naturally lit.&lt;br /&gt;
* Colonists want 30% light or better. This affects:&lt;br /&gt;
:* Colonists' mood - Colonists in sustained darkness will have the [[Thoughts list#In darkness|'In darkness']] thought. Sleeping colonists will not have this thought. Therefore, lighting is not needed in areas only used for sleeping.&lt;br /&gt;
:* Colonists' movement speed - Colonists in darkness will have a reduced [[move speed]], scaling to 80% at a light level of 0%. Due to this, combat at night or under unlit roofed areas can lead to a disadvantage against non-human opponents, such as insects, manhunter animals, or mechanoids. Pawns that are [[Sight|Blind]], have the [[Ideoligion#Lighting|Lighting: Darklight preferred]] precept,{{IdeologyIcon}} or have the [[Dark vision]] gene{{BiotechIcon}} are unaffected by this factor.&lt;br /&gt;
:* Colonists' global work speed - Similarly to their movement speed, colonists will have a work speed penalty when working in darkness, scaling to 80% at a light level of 0%. Pawns that are [[Sight|Blind]], have the [[Ideoligion#Lighting|Lighting: Darklight preferred]] precept,{{IdeologyIcon}} or have the [[Dark vision]] gene{{BiotechIcon}} are unaffected by this factor.&lt;br /&gt;
* [[Surgery success chance factor]] is optimized at 50% light or better.&lt;br /&gt;
&lt;br /&gt;
There are three light levels: ''Dark'' (0-29%), ''Lit'' (30-89%), and ''Brightly lit'' (90-100%). Each tile on the map has one of these light levels. The light level of a tile is listed in the tile's information area located above the Architect menu (when the menu is minimized). The light level is immediately followed by the brightness given in a percentage (%).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style = &amp;quot;text-align:center; border-width=10;&amp;quot; width=&amp;quot;260&amp;quot;&lt;br /&gt;
| colspan = 4 | '''Light levels according to Light (%)'''&lt;br /&gt;
|-&lt;br /&gt;
| style = &amp;quot;text-align:left;&amp;quot; | Light (%) &lt;br /&gt;
| style=&amp;quot;background-color:#B8C0B8&amp;quot; | 0-29 &lt;br /&gt;
| style=&amp;quot;background-color:#FFFFF0&amp;quot; | 30-89 &lt;br /&gt;
| style=&amp;quot;background-color:#FFFFD8&amp;quot; | 90-100&lt;br /&gt;
|-&lt;br /&gt;
| style = &amp;quot;text-align:left;&amp;quot; | Light level &lt;br /&gt;
| style=&amp;quot;background-color:#B8C0B8&amp;quot; | Dark &lt;br /&gt;
| style=&amp;quot;background-color:#FFFFF0&amp;quot; | Lit &lt;br /&gt;
| style=&amp;quot;background-color:#FFFFD8&amp;quot; | Brightly lit &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Darklight ===&lt;br /&gt;
{{Ideology|section=1}}&lt;br /&gt;
{{Stub|section=1|reason=General also two way links}}&lt;br /&gt;
&lt;br /&gt;
Based on a specific colour.&lt;br /&gt;
It pleases [[ideoligion]]s with the [[Ideoligion#Lighting|Lighting: Darklights Preferred]] precept, giving those with the precept a {{Thought| desc=This dim light is perfect. I feel focused and energized.| label=darklight| value=+4| stack=1}}, &lt;br /&gt;
&lt;br /&gt;
* [[Darktorch]]&lt;br /&gt;
* [[Fungus darktorch]]&lt;br /&gt;
* [[Standing lamp]] (configured correctly)&lt;br /&gt;
* [[Darklight brazier]]{{RoyaltyIcon}}&lt;br /&gt;
&lt;br /&gt;
=== Artificial light sources ===&lt;br /&gt;
Light in roofed areas is provided by the following appliances:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;li style=&amp;quot;display: inline-table;&amp;quot;&amp;gt;&lt;br /&gt;
{| {{STDT| sortable c_11 text-center}}&lt;br /&gt;
! Name !! &amp;lt;abbr title=&amp;quot;The furthest away a tile can be before it falls below 30% light&amp;quot;&amp;gt;Light Radius&amp;lt;/abbr&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
{{#ask: [[Light Radius::+]]&lt;br /&gt;
  | format = template&lt;br /&gt;
  | template = Ask Table Formatter&lt;br /&gt;
  | ?Light Radius&lt;br /&gt;
  | sort = From DLC, Name&lt;br /&gt;
  | link = none&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Daylight timing and latitude ===&lt;br /&gt;
Daylight, or natural light, is the light generated on unroofed tiles throughout the map. The timing and strength of daylight is affected by latitude, time of year, and time of day, due to the planet's apparent axial tilt.&lt;br /&gt;
&lt;br /&gt;
This effect is more pronounced at extreme northern and southern latitudes, which can result in light levels not reaching 0% at night or 100% at daytime.&lt;br /&gt;
&lt;br /&gt;
Near the central latitude, light level change throughout the day as follows:&lt;br /&gt;
{| class = &amp;quot;wikitable&amp;quot; width=&amp;quot;180&amp;quot;&lt;br /&gt;
! Start time&lt;br /&gt;
! Light level&lt;br /&gt;
|- style=&amp;quot;background-color:#FFFFF0&amp;quot;&lt;br /&gt;
| 4h || Lit&lt;br /&gt;
|- style=&amp;quot;background-color:#FFFFD8&amp;quot;&lt;br /&gt;
| 7h || Brightly lit&lt;br /&gt;
|- style=&amp;quot;background-color:#FFFFF0&amp;quot;&lt;br /&gt;
| 17h || Lit&lt;br /&gt;
|- style=&amp;quot;background-color:#B8C0B8&amp;quot;&lt;br /&gt;
| 20h || Dark&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Day Length Table ====&lt;br /&gt;
Note that the below values represent the number of hours that the light level is above 30%, meaning there is no guarantee that it will reach 100%.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Latitude !! Aprimay 1 !! Aprimay 6 !! Aprimay 11 !! Jugust 1 !! Jugust 6 !! Jugust 11 !! Septober 1 !! Septober 6 !! Septober 11 !! Decembary 1 !! Decembary 6 !! Decembary 11&lt;br /&gt;
|- &lt;br /&gt;
| '''90° N''' || 0 || 0 || 0 || 24 || 24 || 24 || 24 || 24 || 24 || 0 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| '''75° N''' || 0 || 0 || 0 || 10.7 || 24 || 24 || 24 || 24 || 24 || 0 || 0 || 0 &lt;br /&gt;
|-&lt;br /&gt;
| '''60° N''' || 11.2 || 11.7 || 12.8 || 14.1 || 15.5 || 16.5 || 16.8 || 16.2 || 15.0 || 13.6 || 12.3 || 11.4&lt;br /&gt;
|-&lt;br /&gt;
| '''45° N''' || 12.6 || 12.9 || 13.5 || 14.3 || 15.1 || 15.6 || 15.8 || 15.5 || 14.8 || 13.9 || 13.2 || 12.7&lt;br /&gt;
|-&lt;br /&gt;
| '''30° N''' || 13.5 || 13.7 || 14.0 || 14.5 || 14.9 || 15.3 || 15.4 || 15.2 || 14.8 || 14.3 || 13.9 || 13.6&lt;br /&gt;
|-&lt;br /&gt;
| '''15° N''' || 14.3 || 14.4 || 14.5 || 14.8 || 15.0 || 15.2 || 15.2 || 15.1 || 14.9 || 14.7 || 14.5 || 14.4&lt;br /&gt;
|-&lt;br /&gt;
| '''0°''' || 15.2 || 15.2 || 15.2 || 15.2 || 15.2 || 15.2 || 15.2 || 15.2 || 15.2 || 15.2 || 15.2 || 15.2&lt;br /&gt;
|-&lt;br /&gt;
| '''15° S''' || 15.2 || 15.1 || 14.9 || 14.7 || 14.5 || 14.4 || 14.3 || 14.4 || 14.5 || 14.8 || 15.0 || 15.2&lt;br /&gt;
|-&lt;br /&gt;
| '''30° S''' || 15.4 || 15.2 || 14.8 || 14.3 || 13.9 || 13.6 || 13.5 || 13.7 || 14.0 || 14.5 || 14.9 || 15.3&lt;br /&gt;
|-&lt;br /&gt;
| '''45° S''' || 15.8 || 15.5 || 14.8 || 13.9 || 13.2 || 12.7 || 12.6 || 12.9 || 13.5 || 14.3 || 15.1 || 15.6&lt;br /&gt;
|-&lt;br /&gt;
| '''60° S''' || 16.8 || 16.2 || 15.0 || 13.6 || 12.3 || 11.4 || 11.2 || 11.7 || 12.8 || 14.1 || 15.5 || 16.5&lt;br /&gt;
|-&lt;br /&gt;
| '''75° S''' || 24 || 24 || 18.7 || 15.0 || 12.2 || 10.4 || 9.9 || 11.0 || 13.2 || 16.4 || 20.6 || 24&lt;br /&gt;
|-&lt;br /&gt;
| '''90° S''' || 24 || 24 || 24 || 24 || 24 || 0 || 0 || 0 || 24 || 24 || 24 || 24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Plant growth time table ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Latitude !! Aprimay 1 !! Aprimay 6 !! Aprimay 11 !! Jugust 1 !! Jugust 6 !! Jugust 11 !! Septober 1 !! Septober 6 !! Septober 11 !! Decembary 1 !! Decembary 6 !! Decembary 11&lt;br /&gt;
|- &lt;br /&gt;
| '''90° N''' || 0 || 0 || 0 || 0 || 24 || 24 || 24 || 24 || 24 || 0 || 0 || 0&lt;br /&gt;
|-&lt;br /&gt;
| '''75° N''' || 0 || 0 || 0 || 5.8 || 24 || 24 || 24 || 24 || 18.6 || 0 || 0 || 0 &lt;br /&gt;
|-&lt;br /&gt;
| '''60° N''' || 8.9 || 9.4 || 10.5 || 11.9 || 13.2 || 14.0 || 14.3 || 13.8 || 12.7 || 11.3 || 10.0 || 9.1&lt;br /&gt;
|-&lt;br /&gt;
| '''45° N''' || 11.0 || 11.3 || 11.9 || 12.7 || 13.4 || 13.9 || 14.1 || 13.8 || 13.1 || 12.4 || 11.6 || 11.1&lt;br /&gt;
|-&lt;br /&gt;
| '''30° N''' || 12.2 || 12.4 || 12.7 || 13.2 || 13.6 || 13.9 || 14.0 || 13.8 || 13.4 || 13.0 || 12.6 || 12.3&lt;br /&gt;
|-&lt;br /&gt;
| '''15° N''' || 13.2 || 13.2 || 13.4 || 13.6 || 13.8 || 14.0 || 14.0 || 13.9 || 13.7 || 13.5 || 13.3 || 13.2&lt;br /&gt;
|-&lt;br /&gt;
| '''0°''' || 14.1 || 14.1 || 14.1 || 14.1 || 14.1 || 14.1 || 14.1 || 14.1 || 14.1 || 14.1 || 14.1 || 14.1&lt;br /&gt;
|-&lt;br /&gt;
| '''15° S''' || 14.0 || 13.9 || 13.7 || 13.5 || 13.3 || 13.2 || 13.2 || 13.2 || 13.4 || 13.6 || 13.8 || 14.0&lt;br /&gt;
|-&lt;br /&gt;
| '''30° S''' || 14.0 || 13.8 || 13.4 || 13.0 || 12.6 || 12.3 || 12.2 || 12.4 || 12.7 || 13.2 || 13.6 || 13.9&lt;br /&gt;
|-&lt;br /&gt;
| '''45° S''' || 14.1 || 13.8 || 13.1 || 12.4 || 11.6 || 11.1 || 11.0 || 11.3 || 11.9 || 12.7 || 13.4 || 13.9&lt;br /&gt;
|-&lt;br /&gt;
| '''60° S''' || 14.3 || 13.8 || 12.7 || 11.3 || 10.0 || 9.1 || 8.9 || 9.4 || 10.5 || 11.9 || 13.2 || 14.0&lt;br /&gt;
|-&lt;br /&gt;
| '''75° S''' || 17.3 || 16.0 || 13.6 || 10.6 || 7.6 || 5.1 || 4.3 || 6.0 || 8.8 || 11.8 || 14.6 || 16.7&lt;br /&gt;
|-&lt;br /&gt;
| '''90° S''' || 24 || 24 || 24 || 0 || 0 || 0 || 0 || 0 || 0 || 0 || 24 || 24&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Daylight math details ====&lt;br /&gt;
{{rwbox&lt;br /&gt;
| nocat=true&lt;br /&gt;
| type  = warning&lt;br /&gt;
| text  = &amp;lt;span style=&amp;quot;color:#FF3333&amp;quot;;&amp;gt;'''Warning!''' Trigonometry ahead!&amp;lt;/span&amp;gt;'''&amp;lt;br&amp;gt;This section gets into complicated mathematical detail. Proceed at own risk&lt;br /&gt;
}}&lt;br /&gt;
The calculation of sunlight is surprisingly involved. On a nutshell: the formula obtains the angle between the vectors Latitude and Sun Position, subtracts an angle θ from it (determined by Latitude), obtains the cosine of the difference, and divides this number by 0.7. Finally, this result is capped between 0 (no light) and 100% (full light).&lt;br /&gt;
&lt;br /&gt;
If you only care about the final formula, go to &amp;quot;Final formula&amp;quot; below. Otherwise, carry on.&lt;br /&gt;
&lt;br /&gt;
The amount of sunlight a given cell receives depends on its Latitude, Day of the year, and Hour of the day. The simplified steps to reach the final value are:&lt;br /&gt;
&lt;br /&gt;
:1. Obtain the factor &amp;quot;u&amp;quot; for the given latitude&lt;br /&gt;
::{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Latitude !! Value of u&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;= 70 || 0.2&lt;br /&gt;
|-&lt;br /&gt;
| [70, 75] || Latitude * 13/50-18&lt;br /&gt;
|-&lt;br /&gt;
| =&amp;gt;75|| 1.5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:2. Obtain Sun Position Vector SP = &amp;lt;code&amp;gt;{SPx, SPy, SPz}&amp;lt;/code&amp;gt;. Do note these formulas are not in degrees, but radians.&lt;br /&gt;
:* SPx = -cos(Hour * π / 12)&lt;br /&gt;
:* SPy = -cos(π * Day/30)  * u&lt;br /&gt;
:* SPz = -sin(Hour * π / 12) [NOT ACTUALLY USED, BUT PART OF THE VECTOR]&lt;br /&gt;
&lt;br /&gt;
:3. Calculate angle θ. Do note that the values of this table are in degrees. To convert to radians, multiply result by π / 180&lt;br /&gt;
::{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Latitud !! Value of θ&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;= -60 || 19&lt;br /&gt;
|-&lt;br /&gt;
| [-60, 60] || 36 - abs(x) * 17/60 &amp;lt;!-- |x|. Math has issues with inline comments, for some reason. It may be a style issue --&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [60, 70] || 19&lt;br /&gt;
|-&lt;br /&gt;
| [70, 75] || 299 - 4x&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;75 || -1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:4. Calculate the angle (Δ) between the vector Latitude (L) y SP.&lt;br /&gt;
:*   Δ = arc cos [ ( cos(Latitude) * SPx  + sen(Latitude) * SPy ) /  &amp;lt;span style=&amp;quot;white-space: nowrap&amp;quot;&amp;gt;&amp;amp;radic;&amp;lt;span style=&amp;quot;text-decoration:overline;&amp;quot;&amp;gt;&amp;amp;nbsp;1 + SPy&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; ] &amp;lt;!-- I would prefer a math method, but I got a headache trying to make it work right.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:5. '''Sunlight''' = cos(Δ - θ)/0.7; Capped between 0 and 1 (100%).&lt;br /&gt;
&lt;br /&gt;
Do note that the creation of the vector Latitude : &amp;lt;code&amp;gt;{cos(''latitude''), sin(''latitude''), 0}&amp;lt;/code&amp;gt; was omitted for simplicity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-customtoggle-MathDetails&amp;quot; style=&amp;quot;display:inline-block;background:rgba(128,128,128,0.5);color:white;padding:5px;border-radius:5px;outline:none;user-select:none&amp;quot;&amp;gt;Final Formula:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div  id=&amp;quot;mw-customcollapsible-MathDetails&amp;quot; class=&amp;quot;mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Sunlight formula 5.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- I would like to put this outside a image, but there are formatting issues with {{Math}}. Also, there is no template for roots (square or otherwise) and I had issues creating one.&lt;br /&gt;
cos (arccos [ - ( cos(Latitude) * cos(Hour*PI/12)  + sen(Latitude) * cos(PI * Day/30) * u ) /  root( 1 + (cos(PI * Day/30) * u)^2 ) ] - θ ) / 0.7 --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;div style=display:inline-grid&amp;gt;&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Latitude !! Value of u&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;= 70 || 0.2&lt;br /&gt;
|-&lt;br /&gt;
| [70, 75] || Latitude * 13/50-18&lt;br /&gt;
|-&lt;br /&gt;
| =&amp;gt;75 || 1.5&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=display:inline-grid&amp;gt;&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Latitud !! Value of θ&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;= -60 || 19&lt;br /&gt;
|-&lt;br /&gt;
| [-60, 60] || 36 - abs(x) * 17/60 &amp;lt;!-- |x|. Math has issues with inline comments, for some reason. It may be a style issue --&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [60, 70] || 19&lt;br /&gt;
|-&lt;br /&gt;
| [70, 75] || 299-4x&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;75 || -1&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Interestingly, while some effects are applied differently above latitude &amp;lt;code&amp;gt;70&amp;lt;/code&amp;gt; (70° N), these do not seem to apply below &amp;lt;code&amp;gt;-70&amp;lt;/code&amp;gt; (70° S). This has some odd effects on extreme Latitudes, such as the south pole having neither full darkness nor full light.&lt;br /&gt;
&lt;br /&gt;
Getting useful data from this formula is inconvenient. You can use [https://docs.google.com/spreadsheets/d/1dI8CoR9OMk679Gyvr8lXrKUNtfNdCQPp/edit?usp=sharing&amp;amp;ouid=114344865191558455918&amp;amp;rtpof=true&amp;amp;sd=true this google doc] to get a better idea of how many hours of daylight a given tile (based on Latitude) will have through the year.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Based on &amp;lt;code&amp;gt;Assembly-CSharp/RimWorld/GenCelestial&amp;lt;/code&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;!-- https://www.desmos.com/calculator/zhnk6yd7nv this can be played with --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Openness ==&lt;br /&gt;
{{stub|section=1|reason=Large enough enclosed spaces seem to blur these boundaries}} &lt;br /&gt;
Openness refers to the often critical aspect of structures being open to the outside. It affects many things such as temperature, item deterioration, light, exposure to weather, and certain events.&lt;br /&gt;
&lt;br /&gt;
Every tile on the map falls into one of three categories:&lt;br /&gt;
* Outdoors - not enclosed by any structure, even if there is a roof. &lt;br /&gt;
* Indoors - completely enclosed structure, completely roofed.&lt;br /&gt;
* Unroofed - completely enclosed structure, but with one or more unroofed tiles.&lt;br /&gt;
&lt;br /&gt;
Sufficiently large unroofed rooms, approximately 300 tiles, are considered outdoors.{{Check Tag|Detail Needed}}&lt;br /&gt;
&lt;br /&gt;
== Temperature ==&lt;br /&gt;
{{Main|Temperature}}&lt;br /&gt;
Environmental temperature is affected outdoors mainly by the map's biome and by the current season. Temperature affects a plant's ability to grow. Temperature affects a human's comfort, and health in extreme temperatures.&lt;br /&gt;
&lt;br /&gt;
== Terrain ==&lt;br /&gt;
Terrain consists of the map's walking surface, terrain features, and mountain areas. Terrain affects things including walking speed, where plants can grow, and may prohibit construction.&lt;br /&gt;
&lt;br /&gt;
'''Natural surface terrain''' includes soil, rich soil, marshy soil, marsh, mud, sand, lichen-covered dirt, gravel, rough stone (granite, marble, etc.), rough-hewn stone, shallow water, and deep water.&lt;br /&gt;
&lt;br /&gt;
'''Terrain features''' include steam geysers and mountains. The steam from a geyser produces heat and an enclosed area around it will heat up unless unroofed. A mountain cannot be destroyed, even if all of its stone and ore has been mined out. What remains are terrain tiles listed as 'overhead mountain'.&lt;br /&gt;
&lt;br /&gt;
=== Naturally generated surfaces ===&lt;br /&gt;
{{stub|section=1|reason=Anomaly terrains - Flesh and Gray surface, odyssey terrains}}&lt;br /&gt;
{{Split|section=1|reason=Individual pages for each terrain. Then make and distribute nav template}}&lt;br /&gt;
{{Recode|section=1|reason=Automate table once all pages created}}&lt;br /&gt;
{{For|the artificial flooring|Floors#Comparison table{{!}}Floors}}&lt;br /&gt;
While most terrain properties are self-explanatory, some require special attention.&lt;br /&gt;
* '''Path cost''' determines how difficult is to travers a given terrain. &lt;br /&gt;
* '''Move Speed Modifier''' is the net effect of said cost, and is obtained with the formula &amp;lt;code&amp;gt;13/(13 + Path cost)&amp;lt;/code&amp;gt; rounded.&lt;br /&gt;
* '''Terrain Support''' determines what kind of structures can be build on a given terrain. If a given structure has a '''Terrain Affordance''' not listed for a given terrain, then said terrain is not a valid construction site. The types used are:&lt;br /&gt;
**'''Light''': Supports light structure.&amp;lt;br/&amp;gt;&lt;br /&gt;
**'''Medium''': Supports medium structures.&amp;lt;br/&amp;gt;&lt;br /&gt;
**'''Heavy''': Supports heavy structures.&amp;lt;br/&amp;gt;&lt;br /&gt;
**'''ShallowWater''': Can be built on with things that are waterproof.&amp;lt;br/&amp;gt;&lt;br /&gt;
**'''MovingFluid''' (moving water): Contains power usable for hydroelectrics.&amp;lt;br/&amp;gt;&lt;br /&gt;
**'''Bridgeable''': [[Bridge]] can be built over this terrain.&amp;lt;br/&amp;gt;&lt;br /&gt;
**'''GrowSoil''' (growable): Things can grow here. Unsure if is does anything or if merely indicative.&amp;lt;br/&amp;gt;&lt;br /&gt;
**'''Diggable''': Able to build [[grave]]s.&amp;lt;br/&amp;gt;&lt;br /&gt;
**'''SmoothableStone''' (smoothable): Can be ground and smoothed into smooth stone.&amp;lt;br/&amp;gt;&lt;br /&gt;
*'''Filth Mask''' determines what kind of [[filth]] can be applied on this terrain. Most natural floors only accept '''Unnatural''' filth, if any at all, but there are exceptions. &lt;br /&gt;
*'''Tag''' use is unclear. It may be used on map generation.&lt;br /&gt;
&lt;br /&gt;
As of [[Version/1.5.4104]], all terrains with Heavy '''Terrain Support''' also support both Medium and Light. To help the readability of this table, only the '''Heavy''' tag will be used in those cases.&lt;br /&gt;
&lt;br /&gt;
{| {{STDT| sortable c_25 text-center mw-collapsible}}&lt;br /&gt;
! Type !! Move Speed &amp;lt;br/&amp;gt;Modifier !! [[Plants#Fertility|Fertility]] !! Terrain&amp;lt;br/&amp;gt;Support !! [[Bridge]]able !! [[Grave|Diggable]] !! Terrain&amp;lt;br/&amp;gt;Type !! Beauty&amp;lt;br&amp;gt;Indoors/&amp;lt;br/&amp;gt;Outdoors !! [[Cleanliness]] !! Filth&amp;lt;br/&amp;gt;mask{{ref label|Fmask|1}} !! Dries&amp;lt;br/&amp;gt; To{{ref label|DriesTo|2}} !! Tags !! [[Path cost|Path&amp;lt;br/&amp;gt;cost]] !! [[Filth#Generation|Generates&amp;lt;br/&amp;gt;Filth]] !! Allows&amp;lt;br/&amp;gt;Special&amp;lt;br/&amp;gt;Attack{{ref label|ASA|3}} !! Others&lt;br /&gt;
|- id=&amp;quot;Broken asphalt&amp;quot;&lt;br /&gt;
! [[Broken asphalt]]&lt;br /&gt;
| 100% || 0% || Heavy || {{Cross}} || {{Cross}} || - || -1 || -2 || {{Check}} || - || Road || 0 || {{Cross}} || {{Cross}} || 0{{Icon Small|silver}}. Removable&lt;br /&gt;
|- id=&amp;quot;Packed dirt&amp;quot;&lt;br /&gt;
! [[Packed dirt]]&lt;br /&gt;
| 93% || 0% || Heavy || {{Cross}} || {{Check}} || Soil || -1 || -1 || {{Check}} || - || Road || 1 || [[Filth#Dirt|Dirt]] || {{Cross}} ||&lt;br /&gt;
&lt;br /&gt;
|- id=&amp;quot;Chest-deep moving water&amp;quot;&lt;br /&gt;
! [[Chest-deep moving water]]&lt;br /&gt;
| 24% || 0% || - || {{Check}} || {{Cross}} || - || 0 || 0 || {{Cross}} || - || Water{{ref label|water|4|1}} || 42 || {{Cross}} || [[Hediffs#Water|Water]] || Extinguishes Fire&amp;lt;br/&amp;gt;Traversing generates thought [[Mood#Soaking wet|Soaking wet]] &lt;br /&gt;
|- id=&amp;quot;Deep ocean water&amp;quot;&lt;br /&gt;
! [[Deep ocean water]]&lt;br /&gt;
| 0% || 0% || - || {{Cross}} || {{Cross}} || - || 0 || 0 || {{Cross}} || - || Water{{ref label|water|4|2}}&amp;lt;br/&amp;gt; ocean || 300{{ref label|Impassable|5|1}} || {{Cross}} || [[Hediffs#Water|Water]] || Impassable&amp;lt;br/&amp;gt;Extinguishes Fire&lt;br /&gt;
|- id=&amp;quot;Deep water&amp;quot;&lt;br /&gt;
! [[Deep water]]&lt;br /&gt;
| 0% || 0% || - || {{Cross}} || {{Cross}} || - || 0 || 0 || {{Cross}} || - || Water{{ref label|water|4|3}} || 300{{ref label|Impassable|5|2}} || {{Cross}} || [[Hediffs#Water|Water]] || Impassable&amp;lt;br/&amp;gt;Extinguishes Fire &lt;br /&gt;
&lt;br /&gt;
|- id=&amp;quot;Shallow ocean water&amp;quot;&lt;br /&gt;
! [[Shallow ocean water]]&lt;br /&gt;
| 30% || 0% || ShallowWater || {{Check}} || {{Cross}} || - || 0 || 0 || {{Cross}} || [[#Gravel|Stony soil]] || Water{{ref label|water|4|4}}&amp;lt;br/&amp;gt; ocean || 30 || {{Cross}} || [[Hediffs#Water|Water]] || Extinguishes Fire&amp;lt;br/&amp;gt;Traversing generates thought [[Mood#Soaking wet|Soaking wet]] &lt;br /&gt;
|- id=&amp;quot;Shallow moving water&amp;quot;&lt;br /&gt;
! [[Shallow moving water]]&lt;br /&gt;
| 30% || 0% || ShallowWater&amp;lt;br/&amp;gt; MovingFluid || {{Check}} || {{Cross}} || - || 0 || 0 || {{Cross}} || - || Water{{ref label|water|4|5}}&amp;lt;br/&amp;gt; River || 30 || {{Cross}} || [[Hediffs#Water|Water]] || Extinguishes Fire&amp;lt;br/&amp;gt;Traversing generates thought [[Mood#Soaking wet|Soaking wet]]&lt;br /&gt;
|- id=&amp;quot;Shallow water&amp;quot;&lt;br /&gt;
! [[Shallow water]]&lt;br /&gt;
| 30% || 0% || ShallowWater || {{Check}} || {{Cross}} || - || 0 || 0 || {{Cross}} || [[#Gravel|Stony soil]] || Water{{ref label|water|4|6}} || 30 || {{Cross}} || [[Hediffs#Water|Water]] || Extinguishes Fire&amp;lt;br/&amp;gt;Traversing generates thought [[Mood#Soaking wet|Soaking wet]]&lt;br /&gt;
|- id=&amp;quot;Marsh&amp;quot;&lt;br /&gt;
! [[Marsh]]&lt;br /&gt;
| 30% || 0% || ShallowWater || {{Check}} || {{Cross}} || - || -3/0 || -2 || {{Cross}} || [[#Soil|Soil]] || - || 30 || [[Filth#Dirt|Dirt]] || [[Hediffs#Mud|Mud]] || Extinguishes Fire&amp;lt;br/&amp;gt;Traversing generates thought [[Mood#Soaking wet|Soaking wet]] &lt;br /&gt;
&lt;br /&gt;
|- id=&amp;quot;Soil&amp;quot;&lt;br /&gt;
! [[Soil]]&lt;br /&gt;
| 87% || 100% || Heavy&amp;lt;br/&amp;gt; GrowSoil || {{Cross}} || {{Check}} || Soil || -3/0 || -1 || {{Check}} || - || Soil || 2 || [[Filth#Dirt|Dirt]] || [[Hediffs#Dirt|Dirt]] ||&lt;br /&gt;
|- id=&amp;quot;Lichen-covered soil&amp;quot;&lt;br /&gt;
! [[Lichen-covered soil]]&lt;br /&gt;
| 81% || 100% || Heavy&amp;lt;br/&amp;gt; GrowSoil || {{Cross}} || {{Check}} || Soil || -3/0 || -1 || {{Check}} || - || Soil || 3 || [[Filth#Dirt|Dirt]] || [[Hediffs#Dirt|Dirt]] ||&lt;br /&gt;
|- id=&amp;quot;Marshy soil&amp;quot;&lt;br /&gt;
! [[Marshy soil]]&lt;br /&gt;
| 48% || 100% || Light&amp;lt;br/&amp;gt; GrowSoil || {{Check}} || {{Check}} || Soil || -3/0 || -2 || {{Check}} || [[#Soil|Soil]] || Soil || 14 || [[Filth#Dirt|Dirt]] || [[Hediffs#Dirt|Dirt]] ||&lt;br /&gt;
|- id=&amp;quot;Rich soil&amp;quot;&lt;br /&gt;
! [[Rich soil]]&lt;br /&gt;
| 87% || 140% || Heavy&amp;lt;br/&amp;gt; GrowSoil || {{Check}} || {{Check}} || Soil || -3/0 || -1 || {{Check}} || [[#Soil|Soil]] || Soil || 2 || [[Filth#Dirt|Dirt]] || [[Hediffs#Dirt|Dirt]] ||&lt;br /&gt;
&lt;br /&gt;
|- id=&amp;quot;Stony soil&amp;quot;&lt;br /&gt;
! [[Stony soil]]&lt;br /&gt;
| 87% || 70% || Heavy&amp;lt;br/&amp;gt; GrowSoil || {{Check}} || {{Check}} || - || -3/0 || -1 || {{Check}} || - || Soil || 2 || [[Filth#Dirt|Dirt]] || [[Hediffs#Gravel|Gravel]] ||&lt;br /&gt;
&lt;br /&gt;
|- id=&amp;quot;Sand&amp;quot;&lt;br /&gt;
! [[Sand]]&lt;br /&gt;
| 76% || 10% || Heavy || {{Cross}} || {{Check}} || Sand || -3/0 || -1 || {{Check}} || - || Sand || 4 || [[Filth#Sand|Sand]] || [[Hediffs#Sand|Sand]] ||&lt;br /&gt;
|- id=&amp;quot;Soft sand&amp;quot;&lt;br /&gt;
! [[Soft sand]]&lt;br /&gt;
| 48% || 0% || Light || {{Cross}} || {{Check}} || Sand || -3/0 || -1 || {{Check}} || [[#Sand|Sand]] || Sand || 14 || [[Filth#Sand|Sand]] || [[Hediffs#Sand|Sand]] ||&lt;br /&gt;
&lt;br /&gt;
|- id=&amp;quot;Mud&amp;quot;&lt;br /&gt;
! [[Mud]]&lt;br /&gt;
| 48% || 0% || - || {{Check}} || {{Cross}} || Soil || -3/0 || -2 || {{Check}} || [[#Soil|Soil]] || - || 14 || [[Filth#Dirt|Dirt]] ||  [[Hediffs#Mud|Mud]] ||&lt;br /&gt;
|- id=&amp;quot;Ice&amp;quot;&lt;br /&gt;
! [[Ice]]&lt;br /&gt;
| 48% || 0% || Heavy || {{Cross}} || {{Check}} || - || -3/0 || 0 || {{Check}} || - || - || 14 || [[Filth#Dirt|Dirt]] || {{Cross}} || -&lt;br /&gt;
&lt;br /&gt;
|- id=&amp;quot;Polluted&amp;quot;&lt;br /&gt;
! [[Pollution|Polluted terrain]]{{BiotechIcon}}&lt;br /&gt;
| - || 0-50%{{ref label|Polluted_F|6}} || - || - || - || - || -1 || - || - || - || - || - || - || - || Overlay: Applies stats over existing terrain (additive)&amp;lt;br/&amp;gt;Overlay: Changes graphics of affected terrain.&amp;lt;br/&amp;gt;Can be removed.&amp;lt;br/&amp;gt;Allows growth of [[Toxipotato plant|Toxipotato]], [[Gray pine tree|Gray pine]], [[Pebble cactus]], [[Rat palm tree|Rat palm]]&amp;lt;br/&amp;gt;Prevents growth of most other plants.&amp;lt;br/&amp;gt;Colonist receive [[toxic buildup]] from waking here.&lt;br /&gt;
|- id=&amp;quot;Rough stone&amp;quot;&lt;br /&gt;
! [[Rough stone]]&lt;br /&gt;
| {{%|{{Q|Rough stone|Move Speed Factor}} }} || 0% || Heavy || {{Cross}} || {{Cross}}  || Stone || -1 || 0 || {{Check}}{{ref label|RStone|7}} || - || - || 2 || {{Cross}} || {{Cross}} || [[#Smooth stone|Smooothable]]&amp;lt;br/&amp;gt;Hardcoded{{ref label|Hardcode|8}}&lt;br /&gt;
|- id=&amp;quot;Rough-hewn stone&amp;quot;&lt;br /&gt;
! [[Rough-hewn stone]]&lt;br /&gt;
| {{%|{{Q|Rough-hewn stone|Move Speed Factor}} }}|| 0% || Heavy || {{Cross}} || {{Cross}} || Stone || -1 || 0 || All || - || - || 1 || {{Cross}} || {{Cross}} || [[#Smooth stone|Smooothable]]&amp;lt;br/&amp;gt;Hardcoded{{ref label|Hardcode|8}}&lt;br /&gt;
|- id=&amp;quot;Smooth stone&amp;quot;&lt;br /&gt;
! [[Smooth stone]]&lt;br /&gt;
| {{%|{{Q|Smooth stone|Move Speed Factor}} }}|| 0% || Heavy || {{Cross}} || {{Cross}} || Stone || 2 || 0 || All  || - || - || 0 || {{Cross}} || {{Cross}} || 5{{Icon Small|silver}}.&amp;lt;br/&amp;gt;Natural, non-generated floor/terrain hybrid.&amp;lt;br/&amp;gt;Paintable&amp;lt;br/&amp;gt;Hardcoded{{ref label|Hardcode|8}}&lt;br /&gt;
&amp;lt;!--|- id=&amp;quot;Fungal Gravel&amp;quot;&lt;br /&gt;
! [[Fungal gravel]]{{IdeologyIcon}}&lt;br /&gt;
| 87% || 70% || Floor base || {{Cross}} || {{Cross}} || - || -1 || -1 || All? || - || - || 2 || || {{Cross}} || WorkToBuild 1000.&amp;lt;br/&amp;gt;Requires [[overhead mountain]]&amp;lt;br/&amp;gt;Only generated for colonies with the [[Ideoligion#Tunneler|Tunneler]] meme.--&amp;gt;&lt;br /&gt;
|- id=&amp;quot;Gray Surface&amp;quot;&lt;br /&gt;
! [[Gray surface]]{{AnomalyIcon}}&lt;br /&gt;
| 87% || 0% || Heavy || {{Cross}} || {{Cross}} || - || 0 || 0 || {{Check}}?  || - || Floor || 2 || {{Cross}} || {{Cross}} || Only present on the Labyrinth. &lt;br /&gt;
|- id=&amp;quot;Flesh Floor&amp;quot;&lt;br /&gt;
! [[Flesh]]{{AnomalyIcon}}&lt;br /&gt;
| 87% || 0% || Heavy || {{Cross}} || {{Check}} || - || -10/-5 || -3 || {{Check}}? || - || Floor || 2 || ? || {{Cross}} || Behaves like a natural Floor.&amp;lt;br/&amp;gt;Cleaning time Mult 150%&amp;lt;br/&amp;gt;Removable.&amp;lt;br/&amp;gt;Inflammable 32%&lt;br /&gt;
|}&lt;br /&gt;
:{{note label|Fmask|1}}The kind of Filth accepted by this terrain. {{Check}} denotes terrains that accept '''Unnatural''' filth, {{Cross}} those that accept none. Special cases are denoted as such.&lt;br /&gt;
:{{note label|DriesTo|2}}As Stony soil doesn't exist in [[Sea ice]] nor [[Ice sheet]], it dries to Ice instead.&lt;br /&gt;
:{{note label|ASA|3}}All of these attacks have a cooldown of 1.5 seconds, require the '''KickMaterialInEyes''' capacity, and apply a Hediff of the same name.&lt;br /&gt;
:4{{note label|water||1}}{{note label|water||2}}{{note label|water||3}}{{note label|water||4}}{{note label|water||5}}{{note label|water||6}} All water tiles triple the deterioration rate. Additionally, these have a perceived path cost of 180 if undrafted and of 18 when [[draft]]ed&lt;br /&gt;
:5{{note label|Impossible||1}}{{note label|Impossible||2}}Redundant due to being Impassable. It would result in a 4.2% '''Move Speed Modifier''' otherwise.&lt;br /&gt;
:{{note label|Polluted_F|6}}The fertility is capped at 50%, but will not affect the value of the original terrain if it was equal or lower than that.&lt;br /&gt;
:{{note label|RStone|7}}Plus any defined on NaturalTerrainBase. In vanilla, this in just '''Unnatural''' filth.&lt;br /&gt;
:{{note label|Hardcode|8}}Not on the xml files but rather defined programmatically for all stone types.&lt;br /&gt;
&lt;br /&gt;
=== Steam geyser ===&lt;br /&gt;
{{stub|section=1|reason=Specific numbers on heat needed}}&lt;br /&gt;
[[File:Steam geyser.png|frameless|64px]] Steam geysers are terrain features that allow the placement of a [[geothermal generator]] on them and also output a significant amount of [[temperature|heat]] when sealed in a roofed room. &lt;br /&gt;
&lt;br /&gt;
The steam geyser sprays after a random delay between {{Ticks|500}} and {{Ticks|2000}}. It will then spray for between {{Ticks|200}} and {{Ticks|500}}. While spraying, it will output 40 heat every {{ticks|20}}. Thus, it averages {{#expr: (60*40*((500+200)/2)/20)/((2000+500/2) + (200+500)/2) round 2}} heat per second, with no maximum temperature. &lt;br /&gt;
&lt;br /&gt;
Besides their use in power generation, they can also be used to heat bases and greenhouses without the need for electricity or fuel by sealing them in. Like any means of [[temperature]] regulation, geysers require an enclosed and [[roof|roofed]] [[room]] to actually cause a change in heat. If you don't want heat, keep the geothermal room without a roof.&lt;br /&gt;
&lt;br /&gt;
== Weather ==&lt;br /&gt;
{{stub|section=1|reason=Exact details of how large fires on the map cause rain needed. Rain details should be split from the rain weather type (because its not the only weather type that includes raining) and details discussed including short circuiting, increasing fuel consumption of torch, campfire and brazier variants, which weather types include rain, whether snow counts as rain for all mechanics etc, similarly Snow and its unique effects including [[Snow]] being merged into here.  [[Odyssey DLC]] weathers need notes as they have additioonal effects, e.g. torrential rain causing flooding.}}&lt;br /&gt;
&amp;lt;!--When a number of fires are detected on a map, the &amp;quot;firewatcher&amp;quot; process will increment progress to rainy weather. Exact mechanics are unknown --&amp;gt;&lt;br /&gt;
Weather events occur from time to time depending on the biome and time of year, with the current weather listed at the right edge of the screen. When a weather event ends the weather returns to Clear. Each weather event has a general effect on wind speed. &lt;br /&gt;
&lt;br /&gt;
Wind speed continually varies between 0% to 150% but it is not displayed onscreen. Wind speed is a direct multiplier of a [[wind turbine]]'s nominal power output of {{Q|Wind turbine|Power Consumption #}}W. At 50% wind speed a wind turbine produces {{#expr:0.5*{{Q|Wind turbine|Power Consumption #}}}}W up to a maximum of {{#expr:1.5*{{Q|Wind turbine|Power Consumption #}}}}W at 150%. Note that the &amp;quot;max power output&amp;quot; listed in the infobox claims that {{Q|Wind turbine|Power Consumption #}}W is the maximum under &amp;quot;ideal conditions&amp;quot; - this is incorrect. &lt;br /&gt;
&lt;br /&gt;
The [[Weather controller]]s {{RoyaltyIcon}} can force a single type of weather to constantly appear, and will only allow natural changes in weather once it is destroyed. &lt;br /&gt;
[[Fire#Rain event|Large fires]] can also influence the weather cycle, and can encourage rainy weather to arrive faster than it would otherwise for the duration of the fire.&lt;br /&gt;
&lt;br /&gt;
{| class = &amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|+ style = &amp;quot;text-align: left; font-size:120%;&amp;quot; | Weather types&lt;br /&gt;
|-&lt;br /&gt;
! Label&lt;br /&gt;
! Time of year&lt;br /&gt;
! Temperature range &amp;lt;ref&amp;gt;Can continue even if the temperature exits the appropriate range, once started.&amp;lt;/ref&amp;gt;&lt;br /&gt;
! [[Weapons#Accuracy|Accuracy modifier]]&lt;br /&gt;
! Movement speed modifier&lt;br /&gt;
! Wind speed&lt;br /&gt;
! Wind speed modifier&lt;br /&gt;
! Can put out fires&lt;br /&gt;
! Snowing rate&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Clear&lt;br /&gt;
| Any&lt;br /&gt;
| Any&lt;br /&gt;
| 100%&lt;br /&gt;
| 100%&lt;br /&gt;
| None to Moderate&lt;br /&gt;
| 100%&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Fog&lt;br /&gt;
| Any&lt;br /&gt;
|Any&lt;br /&gt;
| 50%&lt;br /&gt;
| 100%&lt;br /&gt;
| None to Calm&lt;br /&gt;
| 50%&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
| Suppresses firewatcher if forced {{RoyaltyIcon}}&lt;br /&gt;
|-&lt;br /&gt;
| Rain&lt;br /&gt;
| Any&lt;br /&gt;
| {{Temperature|0|100}}&lt;br /&gt;
| 80%&lt;br /&gt;
| 90%&lt;br /&gt;
| Calm to Moderate&lt;br /&gt;
| 80%&lt;br /&gt;
| Yes&lt;br /&gt;
| None&lt;br /&gt;
| Rain intensity can vary. Rain will put out any outdoor fires on the map. Rain can cause electronic objects to short circuit.&lt;br /&gt;
|-&lt;br /&gt;
| Dry Thunderstorm&lt;br /&gt;
| Any&lt;br /&gt;
| Any&lt;br /&gt;
| 100%&lt;br /&gt;
| 100%&lt;br /&gt;
| Moderate to Extreme&lt;br /&gt;
| 150%&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
| [[Lightning]] strikes from thunderstorms can ignite flammable objects, including flora. If accompanied by rain the fires should be extinguished without becoming a threat.&lt;br /&gt;
|-&lt;br /&gt;
| Rainy Thunderstorm&lt;br /&gt;
| Any&lt;br /&gt;
| Any&lt;br /&gt;
| 80%&lt;br /&gt;
| 80%&lt;br /&gt;
| Moderate to Extreme&lt;br /&gt;
| 150%&lt;br /&gt;
| Yes&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Foggy rain&lt;br /&gt;
| Any&lt;br /&gt;
| Any&lt;br /&gt;
| 50%&lt;br /&gt;
| 90%&lt;br /&gt;
| None to Calm&lt;br /&gt;
| 150%&lt;br /&gt;
| Yes&lt;br /&gt;
| None&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Hard snow&lt;br /&gt;
| Mainly Winter&lt;br /&gt;
| {{Temperature|-270|-0.5}}&lt;br /&gt;
| 80%&lt;br /&gt;
| 80%&lt;br /&gt;
| None to Moderate&lt;br /&gt;
| 150%&lt;br /&gt;
| Yes&lt;br /&gt;
| 120%&lt;br /&gt;
| Weather event that can distribute [[Snow]] onto the terrain.&lt;br /&gt;
|-&lt;br /&gt;
| Soft snow&lt;br /&gt;
| Mainly Winter&lt;br /&gt;
| {{Temperature|-270|-0.5}}&lt;br /&gt;
| 80%&lt;br /&gt;
| 100%&lt;br /&gt;
| None to Moderate&lt;br /&gt;
| 150%&lt;br /&gt;
| Yes&lt;br /&gt;
| 80%&lt;br /&gt;
| Weather event that can distribute [[Snow]] onto the terrain.&lt;br /&gt;
|-&lt;br /&gt;
|[[Events#Flashstorm|Flashstorm]]&lt;br /&gt;
| Any&lt;br /&gt;
| Any&lt;br /&gt;
| 100%&lt;br /&gt;
| 100%&lt;br /&gt;
| None to moderate&lt;br /&gt;
| 100%&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
| An extreme version of the dry thunderstorm, and an event of its own (rather than normal weather changes). [[Lightning]] strike many times in a row in a small area, igniting anything flammable and causing giant wildfires which can spread to your base easily. It also disables rain for a short time.&lt;br /&gt;
|-&lt;br /&gt;
| Gray Pall{{AnomalyIcon}}&lt;br /&gt;
| Any&lt;br /&gt;
| Any&lt;br /&gt;
| 80%&lt;br /&gt;
| 100%&lt;br /&gt;
| None to Calm&lt;br /&gt;
| 50%&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
| Weather event that can occur occasionally after the [[Void monolith|Monolith]]{{AnomalyIcon}} has been activated. Colonists inside during gray pall will receive {{Thought| desc=It feels like the world is sick and dying.| label=Gray pall| value=-3| stack=1}} while pawns outside will receive {{Thought| desc=It feels like the world is sick and dying. The putrid air makes me want to vomit.| label=Gray pall exposure| value=-6| stack=1}}.&lt;br /&gt;
|-&lt;br /&gt;
| Windy{{OdysseyIcon}}&lt;br /&gt;
| Any&lt;br /&gt;
| Any&lt;br /&gt;
| 100%&lt;br /&gt;
| 90%&lt;br /&gt;
| 150-300%&lt;br /&gt;
| 150%&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Tox rain{{OdysseyIcon}}&lt;br /&gt;
| Any&lt;br /&gt;
| {{Temperature|0|100}}&lt;br /&gt;
| 80%&lt;br /&gt;
| 90%&lt;br /&gt;
| None to Extreme&lt;br /&gt;
| 150%&lt;br /&gt;
| Yes&lt;br /&gt;
| None&lt;br /&gt;
| Creates Toxic Buildup on pawns exposed to rain, and -8 thought &amp;quot;Toxic Water&amp;quot;. Does not kill plants like Toxic Fallout.&lt;br /&gt;
|-&lt;br /&gt;
| Sandstorm{{OdysseyIcon}}&lt;br /&gt;
| Any&lt;br /&gt;
| {{Temperature|10|100}}&lt;br /&gt;
| 80%&lt;br /&gt;
| 80%&lt;br /&gt;
| Moderate to Extreme&lt;br /&gt;
| 150%&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
| Shuttles can not launch during a sandstorm.&lt;br /&gt;
|-&lt;br /&gt;
| Blind fog{{OdysseyIcon}}&lt;br /&gt;
| Any&lt;br /&gt;
| Any&lt;br /&gt;
| 50%&lt;br /&gt;
| 100%&lt;br /&gt;
| None to Calm&lt;br /&gt;
| 50%&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
| Reduces maximum range of ALL weapons to 23, everywhere on the map, except for [[Unique weapons]] with the Aim Assistance trait. Also applies to many line-of-sight abilities like [[jump pack]]s and skip [[psycast]]s{{RoyaltyIcon}}. Shuttles can not launch during blind fog.&lt;br /&gt;
|-&lt;br /&gt;
| Overcast{{OdysseyIcon}}&lt;br /&gt;
| Any&lt;br /&gt;
| Any&lt;br /&gt;
| 100%&lt;br /&gt;
| 100%&lt;br /&gt;
| None to Moderate&lt;br /&gt;
| 100%&lt;br /&gt;
| No&lt;br /&gt;
| None&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Blizzard{{OdysseyIcon}}&lt;br /&gt;
| Any&lt;br /&gt;
| {{Temperature|-270|-0.5}}&lt;br /&gt;
| 70%&lt;br /&gt;
| 70%&lt;br /&gt;
| Moderate to Extreme&lt;br /&gt;
| 150%&lt;br /&gt;
| Yes&lt;br /&gt;
| 150%&lt;br /&gt;
| Shuttles can not launch during blizzard. &lt;br /&gt;
|-&lt;br /&gt;
| Torrential rain{{OdysseyIcon}}&lt;br /&gt;
| Any&lt;br /&gt;
| {{Temperature|0|100}}&lt;br /&gt;
| 75%&lt;br /&gt;
| 80%&lt;br /&gt;
| None to Extreme&lt;br /&gt;
| 150%&lt;br /&gt;
| Yes&lt;br /&gt;
| None&lt;br /&gt;
| Weather event that causes flooding in already wet areas ie. rivers, marches, etc. flooding can be contained by placing walls or bridges along wet areas.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Lightning ==&lt;br /&gt;
[[File:Dry Thunderstorm.png|400px|thumb|right|Lightning in a [[Environment#Weather|Dry thunderstorm]] ]]&lt;br /&gt;
'''Lightning''' is created either naturally through thunder and flashstorms, or artificially with the [[Flashstorm (psycast)|flashstorm]] psycast{{RoyaltyIcon}}. These do 10 [[Damage types#Flame|Flame]] damage in a 3x3 area (1.9 block radius) and start [[fire]]s to objects in the area of effect that are not under a roof. Dry thunderstorms can be especially dangerous, starting fires around the map without rain to put them out. The flashstorm psycast should be used with caution, preferably in areas without vegetation or during rain. Lightning can also be spawned in with a debug command in [[development mode]].&lt;br /&gt;
&lt;br /&gt;
Lightning is bright enough to momentarily power [[solar generator]]s and grow [[plants]].&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.0.245|0.0.245]] - Weather (rain/fog) now affects chances of hitting a target&lt;br /&gt;
* [[Version/0.3.410|0.3.410]] - Rain now slowly washes away [[Filth|blood]]. Added rich dirt patches.&lt;br /&gt;
* Beta 19/ 1.0 - Changed deep moving water to chest-deep moving water: walkable but slower than shallow water. Shallow water movement cost 12 -&amp;gt; 22. Sand fertility 6% -&amp;gt; 10%.&lt;br /&gt;
* [[Version/1.1.0|1.1.0]] - Fix: Wind turbines register no wind during windy storm.&lt;br /&gt;
* [[Version/1.4.3523|1.4.3523]] - Fix: Geysers have a deconstruct gizmo in god mode which causes and error when clicked.&lt;br /&gt;
&lt;br /&gt;
[[Category:RimWorld game]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Lung_rot&amp;diff=173758</id>
		<title>Lung rot</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Lung_rot&amp;diff=173758"/>
		<updated>2026-01-07T16:07:27Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Verified incorrect, nothing other than the lung implants or Perfect Immunity makes a pawn immune to further lung rot infections.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub|reason=Treatment, causes, general. Numbers on MTB cases for severity would be very useful.}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
'''Lung rot''' is a long-lasting [[disease]] that can be fatal if untreated.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
Lung rot appears after prolonged exposure to [[rot stink]], and affects both of a person's lungs. It can't be acquired from an [[event]].&lt;br /&gt;
&lt;br /&gt;
The higher the [[rot stink|&amp;quot;rot stink&amp;quot; hediff]] severity, the more likely common the disease is. At 0.5 severity, there is an {{MTB}} of 8 days at 0.5 severity to get this disease. This goes up to a {{MTB}} of 0.5 days at 1.0 severity.{{Check Tag|Mechanics?|How does this scale? Linear or a curve?}}&lt;br /&gt;
&lt;br /&gt;
Lung rot is not fatal if well-treated (some combination of good doctor, medicine, or facilities.)  Each lung must be treated separately.  As long as every treatment is 30% or higher, the disease will not progress. After 3-4 treatments over 6-8 days the disease will disappear.&lt;br /&gt;
&lt;br /&gt;
===Prevention===&lt;br /&gt;
Preventing colonists from inhaling rot stink gas, which is done by avoiding rotten [[corpse]]s; a rot stink severity of at least 0.5 is required to contact lung rot. Try to avoid being in melee with [[scaria]]-infested [[animal]]s, as they will immediately rot on death. Otherwise, haul, [[grave|bury]], [[fire|burn]], or [[electric crematorium|cremate]] corpses in a timely manner, or wait for them to finish rotting.&lt;br /&gt;
&lt;br /&gt;
In the [[Biotech DLC]]{{BiotechIcon}}, [[face mask]]s, [[gas mask]]s, and other sources of [[Toxic Environment Resistance]] all reduce the severity of rot stink.&lt;br /&gt;
&lt;br /&gt;
[[Detoxifier lung]]s{{BiotechIcon}} are immune to rot stink. Each detoxifier lung also increases Toxic Environment Resistance, so if a pawn only has 1 artificial lung, the other one will be partially protected.&lt;br /&gt;
&lt;br /&gt;
The [[perfect immunity]] gene{{BiotechIcon}} will prevent the acquisition of this disease but will not cure pre-existing conditions present at the time of implantation.&lt;br /&gt;
&lt;br /&gt;
== Stages ==&lt;br /&gt;
These are the following stages in which lung rot will progress through, and the effects it has on the victim. Note that the effects are generally doubled as lung rot usually occurs in both lungs at the same time.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Stage !! Begins at !! Symptoms&lt;br /&gt;
|-&lt;br /&gt;
| '''Lung rot (minor)''' || 0 - 0.59 severity ||&lt;br /&gt;
* {{++|5%}} [[Pain]]&lt;br /&gt;
* {{--|5%}} [[Breathing]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Lung rot (major)''' || 0.6 - 0.84 severity ||&lt;br /&gt;
* {{++|5%}} Pain&lt;br /&gt;
* {{--|10%}} Breathing&lt;br /&gt;
|-&lt;br /&gt;
| '''Lung rot (Extreme)''' || 0.85 - 0.99 severity ||&lt;br /&gt;
* {{++|10%}} Pain&lt;br /&gt;
* {{--|15%}} Breathing&lt;br /&gt;
* {{--|10%}} [[Consciousness]]&lt;br /&gt;
|-&lt;br /&gt;
| '''Lung rot (Extreme)''' || 1.00 severity ||&lt;br /&gt;
* [[Death]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Progression ===&lt;br /&gt;
*Severity increases by 0.300 per day.&lt;br /&gt;
*Treatment slows progression by a maximum of 1.000 per day.&lt;br /&gt;
**This means the disease will regress by 0.700 per day at 100% tend quality.&lt;br /&gt;
**Progression will pause at 30% tend quality or higher.&lt;br /&gt;
**Note that good treatment will not cause the disease to go away on its own.&lt;br /&gt;
&lt;br /&gt;
The disease resolves after 4-8 days, independent of the patient's immune functioning. &amp;lt;!--The XML for lung rot specifies disappearsAfterTicks, same as a mechanite disease--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Treatment ==&lt;br /&gt;
Treatment can be done using medicine which suppresses the disease, preventing it from reaching fatal stages. Pawns do not need to rest, as no immunity is gained.&lt;br /&gt;
&lt;br /&gt;
As long as it is tended by a decent doctor, lung rot isn't particularly threatening to a pawn's life. The real downside is the time and medicine consumed for treatment, especially if many pawns get lung rot at the same time. It is possible to reach &amp;gt;30% tend quality even without medicine, if you have a great doctor and hospital setup.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/1.4.3523|1.4.3523]] - Added.&lt;br /&gt;
* [[Version/1.5.4062|1.5.4062]] - Rotstink exposure now causes lung rot in Core. Previously the effects were defined in Core, and the [https://store.steampowered.com/news/app/294100?emclan=103582791454681671&amp;amp;emgid=3294970071159733465 Steam announcement] for Update 1.4 mentioned it as a Core feature, however rot stink exposure and lung rot would not be applied without the [[Biotech DLC]].&lt;br /&gt;
&lt;br /&gt;
{{Nav|disease|wide}}&lt;br /&gt;
[[Category:Disease]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Skills&amp;diff=173748</id>
		<title>Skills</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Skills&amp;diff=173748"/>
		<updated>2026-01-07T15:58:57Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Removing the unnecessary mining yield explanation as there's a link to the dedicated page for Mining Yield literally right below it.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Character_Properties_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;!-- End Nav --&amp;gt;&lt;br /&gt;
{{Rewrite|reason=Verbose and circumspect. Needs cleanup, better layout and general tightening up. Over used of italics and bold.}}&lt;br /&gt;
{{TOCright}}&lt;br /&gt;
[[File:skills_preview.png|right]][[File:skill_increase_anim.gif|268px|right|Increasing skills of a colonist that's currently building something.]]&lt;br /&gt;
Every pawn in RimWorld has a set of '''skills''' which govern their speed and success in the various types of [[work]]. &lt;br /&gt;
&lt;br /&gt;
Performing certain jobs will award '''experience points''' (XP) towards improving a pawn's skill, reflected by their skill '''level'''. A pawn's skill levels can be viewed by selecting the pawn with the cursor, then navigating to the Bio tab in the pawn inspect pane.&lt;br /&gt;
Pawns may have a '''Passion''' for a skill which increases the rate of XP gain and [[mood]], represented by an adjacent fire symbol in the pawn's Bio menu. Conversely, a skill may be entirely prevented by a pawn's [[backstory]] or [[trait]]s, which is represented by &amp;quot; -- &amp;quot; dashes in place of the level number. &lt;br /&gt;
&lt;br /&gt;
A high skill level will grant improved speed and success in relevant jobs, up to Level 20. A low skill level will result in slow, poor performance at a related job, including Construction failure, wild animal revenge, surgery failure, low harvest yields, or poor [[quality]] crafting products. &lt;br /&gt;
&lt;br /&gt;
Possible pawn skills are Shooting, Melee, Construction, Mining, Cooking, Plants, Animals, Crafting, Artistic, Medical, Social, and Intellectual.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
{{see also|Training}}&lt;br /&gt;
Skills are improved by performing certain associated jobs, although some few related tasks do not provide skill experience.  Performing these tasks will earn the character experience points either per task completed or per second they are pursuing that task, both of which will eventually level up the skill. The resulting higher skill level then improves the performance in all associated tasks and types of work.  Skills are leveled up individually, and there is no single &amp;quot;character level&amp;quot; as in many role playing games.&lt;br /&gt;
&lt;br /&gt;
In some cases, special management tactics can be employed to more effectively or specifically steer the skill training in the colony, especially during periods of low work in colony development.  See the [[Training|main article on skill training]] for more information.&lt;br /&gt;
&lt;br /&gt;
=== Skills vs work types ===&lt;br /&gt;
Skills and work types (or &amp;quot;tasks&amp;quot;) are two different, but related, concepts.  In some cases, like &amp;quot;mine&amp;quot; (work type) and &amp;quot;mining&amp;quot; (skill), there is an almost perfect correspondence, but in many other cases there is not: the ''work types'' &amp;quot;tailor&amp;quot; and &amp;quot;smith&amp;quot;, for example, are associated with the ''crafting skill''.  Some tasks listed on the work tab do not even have an associated ''skill'' (eg. &amp;quot;haul&amp;quot;, &amp;quot;clean&amp;quot; and &amp;quot;firefight&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
The ''Work'' tab, where you assign tasks to colonists, indicates which skills are relevant for a given task (by mousing over a tick box).  It also shows you if the colonist has a ''passion'' for those skills (with an icon in the tick box), and if a significant proficiency has already been acquired (by emphasizing the tick box border).  Lower skill pawns have their work box darker, and higher skill pawns have it lighter. Extremely proficient pawns have a golden box. When assigning work to a pawn with low skill in a certain job, the box will have a red outline. Passions appear as extremely small flames at the bottom-right hand side of the work box. All these aspects are important for deciding how to assign tasks and types of work.&lt;br /&gt;
&lt;br /&gt;
In general, you want colonists to perform tasks they are ''good at'' (it is productive for your colony), as well as tasks they are ''passionate for'' (improves the associated skill faster and also keep them happy while working).&lt;br /&gt;
&lt;br /&gt;
=== Improving skills ===&lt;br /&gt;
{{Rewrite|section=1|reason=1) Other things affect GLF now, and table no longer accounts for every possible combination of GLF and passion 2) [[Ideoligion#Ranching]] precept inc effect and order of operations}}&lt;br /&gt;
Skill leveling in ''RimWorld'' is very similar to many role playing games: ''experience points'' are constantly earned, and the skill is ''leveled up'' when certain thresholds are reached. Importantly, the effect of a skill improves ''by level'', but it costs more and more XP to gain another level in a skill.  This means that '''skill training is more effective the lower the skill level is.'''&lt;br /&gt;
&lt;br /&gt;
When a player pawn gains a new level in a skill, a text mote will be displayed.&lt;br /&gt;
&lt;br /&gt;
Experience points are generally gained at consistent rate per unit [[time]] - that is, while the rate may vary from one task to another, when performing a given task the only other factor is the time spent doing it.  As higher skill levels often increase the speed a pawn performs tasks, this means that more tasks must be performed to spend the same amount of time working and thus gain the same amount of XP. This is not true for all tasks however, and some will simply give a lump sum of experience for each task completed.&lt;br /&gt;
&lt;br /&gt;
Regardless of how XP is gained, it is multiplied by Passion and [[Global Learning Factor]] in the following way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Real XP gained = Global Learning Factor x [[#Passion|Passion Multiplier]] x Base XP gained &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally, there is a soft cap of 4000 '''net''' XP gained per day per skill. Any XP gains past this point are multiplied by 20%.{{Check Tag|Clarify|How does this work for chunks of experience? If some action were assigned to give a lump sum of 5000 experience, would a pawn gain the full 5000, or would the pawn gain 4200?}} This cap resets a few seconds after midnight. Any XP losses will apply against the net gain (e.g. if a pawn were to gain 4500 XP, but lose 1000, they would still remain 500 XP under the cap). Experience from [[Skilltrainer]]s does not apply to this cap, nor is it affected by the 20% multiplier.&lt;br /&gt;
&lt;br /&gt;
==== Passion ====&lt;br /&gt;
Passion for a given skill is indicated by the presence of flame icons next to the skill experience bar on the character's [[Bio]] tab. These passions increases the rate at which a pawn learns specific skills, and may provide them a [[mood]] boost when performing activities related to the skill. Skill gains from using a [[skilltrainer]] are influenced by ''passion'', making the item more valuable when used by characters with a passion for the associated skill. Typically, passion cannot be gained or lost in an adult pawn's lifetime, however [[children]]{{BiotechIcon}} may gain passions at [[Children#Growth moments|growth moments]] and the addition or removal of [[Genes#Aptitudes|Skill Aptitude xenogenes]]{{BiotechIcon}} can also affect passions.{{Check Tag|Incapable of?|What happens to passions on a suppressed skill when a pawns becomes incapable? Some tasks that use that skill can still be performed, despite the incapability and its effects are needed}}&lt;br /&gt;
&lt;br /&gt;
The three levels of passion are:&lt;br /&gt;
{| &lt;br /&gt;
|-&lt;br /&gt;
| || '''''None: ''''' || &amp;amp;nbsp;No flames. 35% multiplier on experience gain. This is the most common passion level.&lt;br /&gt;
|-&lt;br /&gt;
| [[File:PassionMinor.png|24px|left]] || '''Interested: ''' || &amp;amp;nbsp;One flame. 100% multiplier on experience gain and +8 mood (&amp;quot;Minor passion for my work&amp;quot;) while performing related tasks.&lt;br /&gt;
|-&lt;br /&gt;
| [[File:PassionMajor.png|24px|left]]  || '''Burning: ''' || &amp;amp;nbsp;Two flames. 150% multiplier on experience gain and +14 mood (&amp;quot;Burning passion for my work&amp;quot;) while performing related tasks.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Global Learning Factor ====&lt;br /&gt;
{{See also|Global Learning Factor}}&lt;br /&gt;
&lt;br /&gt;
A pawn has a default Global Learning Factor of 100%. Some traits, implants, Genes, and Hediffs can effect Global Learning Factor as an Offset, or a factor. Offsets are added to the base value of 100%. Then, the sum is multiplied by any applicable factors. For example, a pawn with the Fast Learner trait and a Learning Assistant implant has a final Global Learning Factor of 195%.&lt;br /&gt;
&lt;br /&gt;
'''Offsets'''&lt;br /&gt;
* [[Too smart|Too Smart]] trait: {{+|75%}}, while also inflicting a penalty to [[Mental Break Threshold|mental break threshold]].&lt;br /&gt;
* [[Fast learner|Fast Learner]] trait: {{+|75%}}&lt;br /&gt;
* [[Slow learner|Slow Learner]] trait: {{--|75%}}&lt;br /&gt;
* [[Learning assistant]] implant {{RoyaltyIcon}}: {{+|20%}}&lt;br /&gt;
* [[Neural supercharger]] building {{IdeologyIcon}}: {{+|25%}}&lt;br /&gt;
* [[Gene#Quick study|Quick study]] gene {{BiotechIcon}}: {{+|50%}}&lt;br /&gt;
&lt;br /&gt;
'''Factors'''&lt;br /&gt;
* [[Gene#Slow study|Slow study]] gene {{BiotechIcon}}: {{Bad|×50%}}&lt;br /&gt;
&lt;br /&gt;
==== Experience multiplier table ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Global Learning Factor !! 25% !! 45% !! 50% !! 70% !! 100% !! 120% !! 125% !! 145% !! 175% !! 195% !! 200% !! 220% !! 250% !! 270% !! 275% !! 295% !! 300% !! 305% !! 320% !! 325% !! 345% &lt;br /&gt;
|-&lt;br /&gt;
! ''None'' &lt;br /&gt;
| {{#expr: 0.35* 25}}% || {{#expr: 0.35* 45}}% || {{#expr: 0.35* 50}}% || {{#expr: 0.35* 70}}% || {{#expr: 0.35* 100}}% || {{#expr: 0.35* 120}}% || {{#expr: 0.35* 125}}% || {{#expr: 0.35* 145}}% || {{#expr: 0.35* 175}}% || {{#expr: 0.35* 195}}% || {{#expr: 0.35* 200}}% || {{#expr: 0.35* 220}}% || {{#expr: 0.35* 250}}% || {{#expr: 0.35* 270}}% || {{#expr: 0.35* 275}}% || {{#expr: 0.35* 295}}% || {{#expr: 0.35* 300}}% || {{#expr: 0.35* 305}}% || {{#expr: 0.35* 320}}% || {{#expr: 0.35* 325}}% || {{#expr: 0.35* 345}}% &lt;br /&gt;
|-&lt;br /&gt;
! [[File:PassionMinor.png|frameless]] &lt;br /&gt;
| 25% || 45% || 50% || 70% || 100% || 120% || 125% || 145% || 175% || 195% || 200% || 220% || 250% || 270% || 275% || 295% || 300% || 305% || 320% || 325% || 345% &lt;br /&gt;
|-&lt;br /&gt;
! [[File:PassionMajor.png|frameless]]  &lt;br /&gt;
| {{#expr: 1.5* 25}}% || {{#expr: 1.5* 45}}% || {{#expr: 1.5* 50}}% || {{#expr: 1.5* 70}}% || {{#expr: 1.5* 100}}% || {{#expr: 1.5* 120}}% || {{#expr: 1.5* 125}}% || {{#expr: 1.5* 145}}% || {{#expr: 1.5* 175}}% || {{#expr: 1.5* 195}}% || {{#expr: 1.5* 200}}% || {{#expr: 1.5* 220}}% || {{#expr: 1.5* 250}}% || {{#expr: 1.5* 270}}% || {{#expr: 1.5* 275}}% || {{#expr: 1.5* 295}}% || {{#expr: 1.5* 300}}% || {{#expr: 1.5* 305}}% || {{#expr: 1.5* 320}}% || {{#expr: 1.5* 325}}% || {{#expr: 1.5* 345}}% &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Decay ===&lt;br /&gt;
Beyond skill level 10, XP points are continuously drained away. A skill level is lost only after falling to 0 XP points, and then losing a further 1000 points, preventing repeated level loss and gain right around a level threshold. Experience decay is strictly calculated based on the current skill level and is not directly affected by skill use; Instead, gained XP simply cancels out loss, and vice versa.&lt;br /&gt;
&lt;br /&gt;
XP decays at an accelerated rate with higher skill levels.  This means that all XP earned after 55,000 total XP (level 10) effectively has less value, especially for skills that a colonist does not use frequently, because it will disappear. In most cases, XP is gained by ''time spent'' on a skill, and not by effective work performed: Working faster does not make it easier or faster to gain XP, or compensate the decay loss. Level 20 (max level) is very difficult to acquire, usually only achievable by colonists solely dedicated to a single profession. &lt;br /&gt;
&lt;br /&gt;
The [[Great memory]] trait halves the skill decay rate for a pawn. The [[Perfect memory]] trait, which is only found on some [[Creepjoiner]]s,{{AnomalyIcon}} will entirely prevent all skill decay.&lt;br /&gt;
&lt;br /&gt;
=== Skill point acquisition strategy ===&lt;br /&gt;
{{Stub|section=1|reason=Need at least simple introduction on which jobs and skills benefit from experts vs more hands and why - e.g. cooks beyond skill 9 = More hands, plant harvesting and crafting = experts.}}&lt;br /&gt;
The above implies that on average it is better to spread out the skill training over several colonists instead of having only one &amp;quot;expert&amp;quot;, except for the artisan professions where it is usually good to have true experts in the colony.&lt;br /&gt;
&lt;br /&gt;
For example, you need to acquire about 150,000 XP to make one colonist a &amp;quot;region-known master&amp;quot; (level 16); the same amount of XP would be enough to have ''three'' colonists at level 9 (&amp;quot;solid professional&amp;quot;).  This avoids the risk of losing the only pawn that is capable of the task, and in most cases three level-9 workers are better than a single level-16 expert. Creating anything [[quality]] is a notable exception to this.&lt;br /&gt;
&lt;br /&gt;
=== Experience table ===&lt;br /&gt;
Level 20 is the highest skill level achievable for a pawn.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Level&lt;br /&gt;
! Name&lt;br /&gt;
! Total experience required&lt;br /&gt;
! Experience till next level&lt;br /&gt;
! Experience decay rate (exp/day)&lt;br /&gt;
|-&lt;br /&gt;
| -&lt;br /&gt;
| Incapable&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Barely heard of it&lt;br /&gt;
| 0&lt;br /&gt;
| 1000&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Utter Beginner&lt;br /&gt;
| 1000&lt;br /&gt;
| 2000&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Beginner&lt;br /&gt;
| 3000&lt;br /&gt;
| 3000&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Basic Familiarity&lt;br /&gt;
| 6000&lt;br /&gt;
| 4000&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Some Familiarity&lt;br /&gt;
| 10000&lt;br /&gt;
| 5000&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Significant Familiarity&lt;br /&gt;
| 15000&lt;br /&gt;
| 6000&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Capable Amateur&lt;br /&gt;
| 21000&lt;br /&gt;
| 7000&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Weak Professional&lt;br /&gt;
| 28000&lt;br /&gt;
| 8000&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Employable Professional&lt;br /&gt;
| 36000&lt;br /&gt;
| 9000&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Solid Professional&lt;br /&gt;
| 45000&lt;br /&gt;
| 10000&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Skilled Professional&lt;br /&gt;
| 55000&lt;br /&gt;
| 12000&lt;br /&gt;
| 30&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Very skilled Professional&lt;br /&gt;
| 67000&lt;br /&gt;
| 14000&lt;br /&gt;
| 60&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| Expert&lt;br /&gt;
| 81000&lt;br /&gt;
| 16000&lt;br /&gt;
| 120&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| Strong Expert&lt;br /&gt;
| 97000&lt;br /&gt;
| 18000&lt;br /&gt;
| 180&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| Master&lt;br /&gt;
| 115000&lt;br /&gt;
| 20000&lt;br /&gt;
| 300&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Strong Master&lt;br /&gt;
| 135000&lt;br /&gt;
| 22000&lt;br /&gt;
| 540&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Region-Known Master&lt;br /&gt;
| 157000&lt;br /&gt;
| 24000&lt;br /&gt;
| 840&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| Region-Leading Master&lt;br /&gt;
| 181000&lt;br /&gt;
| 26000&lt;br /&gt;
| 1200&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| Planet-Known Master&lt;br /&gt;
| 207000&lt;br /&gt;
| 28000&lt;br /&gt;
| 1800&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Planet-Leading Master&lt;br /&gt;
| 235000&lt;br /&gt;
| 30000&lt;br /&gt;
| 2400&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| Legendary Master&lt;br /&gt;
| 265000&lt;br /&gt;
| 32000&lt;br /&gt;
| 3600&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that these values are considered before genes that affect skills. For example, a pawn with good social would only need 1000 experience points to get from level 4 to 5.&lt;br /&gt;
&lt;br /&gt;
== List of skills ==&lt;br /&gt;
{{Split|section=1|reason=Split into individual skill pages and leave short summaries and links here. will allow better explanations of what trains each skill and how, and allow training considerations to be added}}&lt;br /&gt;
Using or applying skills will give ''experience'' in the skill, and improve the character's proficiency.  How much experience is gained depends on the ''passion'' for the skill.  See [[#Passion|passion]] below.&lt;br /&gt;
&lt;br /&gt;
On this page, where experience gains are listed, an &amp;quot;Interested&amp;quot; passion with 100% skill gain is assumed.  Note that this is not the &amp;quot;default&amp;quot; passion; &amp;quot;no passion&amp;quot; at 35% gain is far more common.&lt;br /&gt;
&lt;br /&gt;
=== Animals ===&lt;br /&gt;
{{For|a list of skills that animals can learn|Animals#Training}}&lt;br /&gt;
The ''animals'' skill determines how well a character handles wild and domesticated animals, and increases the chance to go undetected while ''hunting'' wild animals.&lt;br /&gt;
&lt;br /&gt;
Higher ''animals'' skill has the following benefits:&lt;br /&gt;
* Chance to tame a wild animal increases.  Some animals can not even be attempted to be tamed if the ''animals'' skill is too low.&lt;br /&gt;
* Chance to successfully train a domesticated animal increases.&lt;br /&gt;
* Animal handling, such as ''milking'' and ''shearing'' certain livestock, becomes more efficient, with a lower chance of wasting products.&lt;br /&gt;
* Mastering an animal, as in having it follow you and obey your commands, becomes possible for more animal races.  The more ''wild'' a race is, the higher the ''animals'' skill required to be assigned its master.&lt;br /&gt;
* It becomes less likely for a colonist hunting an animal to be detected by the animal, and the animal retaliating.  It still requires ''shooting'' skill for the colonist to be able to kill the animal.&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Animals]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Artistic ===&lt;br /&gt;
The ''artistic'' skill is the proficiency to create [[beauty|beautiful]] works of art at an [[art bench]].  &lt;br /&gt;
&lt;br /&gt;
Higher skill increases the chance for a higher quality, in this case more beautiful, sculpture. Note that higher skill levels do not increase the speed of creating sculptures.&lt;br /&gt;
&lt;br /&gt;
The beauty and market value of sculptures increases tremendously at the highest quality levels.  Combined with the fact that trade partners pay more for works of art compared to other items, this makes ''artistic'' a useful skill outside of decorating the home base.&lt;br /&gt;
&lt;br /&gt;
Not very useful in the early game, but once you have a well-established colony, having a permanent artist would be beneficial to it.&lt;br /&gt;
&lt;br /&gt;
=== Construction ===&lt;br /&gt;
The ''construction'' skill governs a wide variety of colonist tasks, centered around creating structures in the game world; it is an essential skill in any colony:&lt;br /&gt;
* Making all kinds of structures, like furniture, walls, power lines and spaceship parts.  If a structure can be placed on the ground in form of a blueprint, its construction is usually facilitated by this skill.  Many structures require a minimum skill to make.&lt;br /&gt;
* Deconstructing existing structures back into raw materials.&lt;br /&gt;
* Building and tearing down roofs.&lt;br /&gt;
* Laying and removing flooring, like carpet, concrete and stone tiles.&lt;br /&gt;
* Smoothing rock walls and stone floors.&lt;br /&gt;
&lt;br /&gt;
Higher ''construction'' skill will&lt;br /&gt;
* allow the construction of more difficult to build structures.&lt;br /&gt;
* increase construction speed; the base speed at 0 construction skill is 50%, this is increased additively by 15% for every skill level.&lt;br /&gt;
* reduce the chance of a construction effort to be &amp;quot;botched&amp;quot;, which will result in some resources going to waste, and require the construction effort to be restarted (ie. all work is wasted).  The base chance of success is 75%, increasing by about 3% per skill level to 100% at skill level 8.&lt;br /&gt;
* increase the chance to make higher quality items, for items that have a quality rating, such as furniture.&lt;br /&gt;
&lt;br /&gt;
Construction outcomes are influenced by the [[manipulation]] and [[sight]] capacities of the colonist.&lt;br /&gt;
&lt;br /&gt;
Experience is gained continuously while working on a construction project. At 100% work speed this seems to translate to roughly 82 experience per point of work required.&lt;br /&gt;
&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Construction]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;li style=&amp;quot;display: inline-table;&amp;quot;&amp;gt;&lt;br /&gt;
{| {{STDT| sortable text-center mw-collapsible mw-collapsed}}&lt;br /&gt;
|+ style=&amp;quot;white-space: nowrap;&amp;quot; |'''Items with a required Construction skill level:'''&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Level&lt;br /&gt;
|-&lt;br /&gt;
{{#ask: [[Skill 1::Construction]]&lt;br /&gt;
| ?Skill 1 Level=&lt;br /&gt;
| format = template&lt;br /&gt;
| template = Ask Table Formatter&lt;br /&gt;
| limit = 999&lt;br /&gt;
| link = none&lt;br /&gt;
| sort = From DLC, Skill 1 Level, Name}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cooking ===&lt;br /&gt;
The cooking skill affects how long it takes to cook [[meals]] and butcher dead creatures, as well as the [[Food Poison Chance]] for the person who eats the meal. It also affects [[Butchery Speed]] and [[Butchery Efficiency]], how much meat is produced when butchering.&lt;br /&gt;
&lt;br /&gt;
Cooking and butchering increase cooking skill.  It is also trained by making [[smokeleaf joint]]s at a drug lab and cooking [[psychite tea]] at a campfire or stove.&lt;br /&gt;
&lt;br /&gt;
A Cooking skill of {{Q|Lavish meal|Skill 1 Level}} is required to be able to cook every item, a skill of 9 achieves the minimum [[Food Poison Chance]], and a skill of 10 gives maximum [[Butchery Efficiency]] - assuming a healthy but otherwise unaugmented pawn. Levels above this only increase the speed of tasks. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Project&lt;br /&gt;
! Experience Given Per Task&lt;br /&gt;
|-&lt;br /&gt;
| Simple Meal&lt;br /&gt;
| 60&lt;br /&gt;
|-&lt;br /&gt;
| Fine Meal&lt;br /&gt;
| 110&lt;br /&gt;
|-&lt;br /&gt;
| Lavish meal&lt;br /&gt;
| 160&lt;br /&gt;
|-&lt;br /&gt;
| Pemmican&lt;br /&gt;
| 80&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Cooking]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;li style=&amp;quot;display: inline-table;&amp;quot;&amp;gt;&lt;br /&gt;
{| {{STDT| sortable text-center mw-collapsible mw-collapsed}}&lt;br /&gt;
|+ style=&amp;quot;white-space: nowrap;&amp;quot; |'''Items with a required Cooking skill level:'''&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Level&lt;br /&gt;
|-&lt;br /&gt;
{{#ask: [[Skill 1::Cooking]]&lt;br /&gt;
| ?Skill 1 Level=&lt;br /&gt;
| format = template&lt;br /&gt;
| template = Ask Table Formatter&lt;br /&gt;
| limit = 999&lt;br /&gt;
| link = none&lt;br /&gt;
| sort = From DLC, Skill 1 Level, Name}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Crafting ===&lt;br /&gt;
The crafting skill affects the creation of many of the items under the [[Work#Smith|smith]], [[Work#Tailor|tailor]] and [[Work#Craft|craft]] work types. It does so in two ways; crafting quality and minimum crafting levels.&lt;br /&gt;
&lt;br /&gt;
A pawn's Crafting skill is a driving factor in the [[Quality]] of produced [[Clothing]], [[Armor]], and [[Weapons]]. The quality of things such as [[Sculptures]] and [[Buildings]] are instead controlled by the [[#Artistic|Artistic]] and [[#Construction|Construction]] skills respectively.&lt;br /&gt;
&lt;br /&gt;
The speed of production for these tasks is unrelated to Crafting level, however, and is instead completely dependent on a pawn's [[General Labor Speed]] and the amount of labor required in the bill. &lt;br /&gt;
&lt;br /&gt;
Many work [[bill|bills]] of the [[Work#Smith|Smith]], [[Work#Tailor|Tailor]] and [[Work#Craft|Craft]] work types have a required minimum Crafting skill level. This restricts the creation of some items to skilled crafters regardless of their possible quality.&lt;br /&gt;
&lt;br /&gt;
The Crafting skill also determines the time required to shred [[mechanoid]]s, and the amount of resources produced from doing so.&lt;br /&gt;
&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Crafting]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;li style=&amp;quot;display: inline-table;&amp;quot;&amp;gt;&lt;br /&gt;
{| {{STDT| sortable text-center mw-collapsible mw-collapsed}}&lt;br /&gt;
|+ style=&amp;quot;white-space: nowrap;&amp;quot; | '''Items with a required Crafting skill level:'''&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Level&lt;br /&gt;
|-&lt;br /&gt;
{{#ask: [[Skill 1::Crafting]]&lt;br /&gt;
| ?Skill 1 Level=&lt;br /&gt;
| format = template&lt;br /&gt;
| template = Ask Table Formatter&lt;br /&gt;
| limit = 999&lt;br /&gt;
| link = none&lt;br /&gt;
| sort = From DLC, Skill 1 Level, Name}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Medical ===&lt;br /&gt;
{{Main|Doctoring}}&lt;br /&gt;
&lt;br /&gt;
The ''Medical'' skill level is the main factor for medical treatment quality and speed, surgery speed and surgery success chance. &lt;br /&gt;
&lt;br /&gt;
Low quality treatment will increase the chance of [[infection]], and the likelihood of permanent health conditions such as ''scars'', in turn leading to chronic pain.  Certain scars cause more than 10% pain, permanently weakening the ''consciousness'' of the patient, which reduces their work performance.&lt;br /&gt;
&lt;br /&gt;
Medical ''surgery'', if not successful, can fail in minor or major ways, even causing the death of the patient.  The success rate is not only determined by the ''medical'' skill, but also other character stats like ''manipulation'', ''eye sight'' and ''consciousness''.  It is not advisable to let an impaired doctor perform surgery.&lt;br /&gt;
&lt;br /&gt;
Higher grade [[medicine]] and medical equipment like [[hospital bed]]s and a [[sterile tile|sterile]] environment significantly boost the effectiveness of all medical treatments, independent of the skill level of the doctor.&lt;br /&gt;
&lt;br /&gt;
Medical skill can be trained very quickly by performing euthanasia on fast-breeding animals such as chickens.  This costs 1 medicine per procedure, but only requires [[herbal medicine]].  The procedure can be scheduled in the respective animal's ''health'' tab, and an animal sleeping spot must be available to perform the euthanasia.&lt;br /&gt;
&lt;br /&gt;
Performing ''surgery'' trains the ''medical'' skill.  The amount of XP that is awarded only depends on the duration of the procedure (varying by procedure and ''medical operation speed'' of the surgeon).&lt;br /&gt;
&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Medical]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Melee ===&lt;br /&gt;
The melee skill determines a characters' effectiveness with [[melee weapons]] namely, their chance to:&lt;br /&gt;
* Land a hit in melee (''see [[Melee Hit Chance]]'')&lt;br /&gt;
* Dodge a melee attack, when not aiming or firing a ranged weapon (''see [[Melee Dodge Chance]]'')&lt;br /&gt;
The tables below are post-processed chances for a healthy pawn.&lt;br /&gt;
{{col-begin|width=60}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width:auto; margin-left:auto; margin-right:auto;&amp;quot;&amp;gt;'''Chance to hit'''&amp;lt;/div&amp;gt;&lt;br /&gt;
{| {{STDT| c_12 text-center}}&lt;br /&gt;
!Skill Level&lt;br /&gt;
!Standard&lt;br /&gt;
!Brawler&lt;br /&gt;
!Skill Level&lt;br /&gt;
!Standard&lt;br /&gt;
!Brawler&lt;br /&gt;
|-&lt;br /&gt;
!0&lt;br /&gt;
|50%&lt;br /&gt;
|62%&lt;br /&gt;
! -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!1&lt;br /&gt;
|53%&lt;br /&gt;
|65%&lt;br /&gt;
!11&lt;br /&gt;
|81%&lt;br /&gt;
|85%&lt;br /&gt;
|-&lt;br /&gt;
!2&lt;br /&gt;
|56%&lt;br /&gt;
|68%&lt;br /&gt;
!12&lt;br /&gt;
|82%&lt;br /&gt;
|86%&lt;br /&gt;
|-&lt;br /&gt;
!3&lt;br /&gt;
|59%&lt;br /&gt;
|71%&lt;br /&gt;
!13&lt;br /&gt;
|83%&lt;br /&gt;
|87%&lt;br /&gt;
|-&lt;br /&gt;
!4&lt;br /&gt;
|62%&lt;br /&gt;
|74%&lt;br /&gt;
!14&lt;br /&gt;
|84%&lt;br /&gt;
|88%&lt;br /&gt;
|-&lt;br /&gt;
!5&lt;br /&gt;
|65%&lt;br /&gt;
|77%&lt;br /&gt;
!15&lt;br /&gt;
|85%&lt;br /&gt;
|89%&lt;br /&gt;
|-&lt;br /&gt;
!6&lt;br /&gt;
|68%&lt;br /&gt;
|80%&lt;br /&gt;
!16&lt;br /&gt;
|86%&lt;br /&gt;
|90%&lt;br /&gt;
|-&lt;br /&gt;
!7&lt;br /&gt;
|71%&lt;br /&gt;
|81%&lt;br /&gt;
!17&lt;br /&gt;
|87%&lt;br /&gt;
|90.3%&lt;br /&gt;
|-&lt;br /&gt;
!8&lt;br /&gt;
|74%&lt;br /&gt;
|82%&lt;br /&gt;
!18&lt;br /&gt;
|88%&lt;br /&gt;
|90.6%&lt;br /&gt;
|-&lt;br /&gt;
!9&lt;br /&gt;
|77%&lt;br /&gt;
|83%&lt;br /&gt;
!19&lt;br /&gt;
|89%&lt;br /&gt;
|90.9%&lt;br /&gt;
|-&lt;br /&gt;
!10&lt;br /&gt;
|80%&lt;br /&gt;
|84%&lt;br /&gt;
!20&lt;br /&gt;
|90%&lt;br /&gt;
|91.2%&lt;br /&gt;
|}&lt;br /&gt;
{{col-2|width=60}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width:auto; margin-left:auto; margin-right:auto;&amp;quot;&amp;gt;'''Chance to dodge'''&amp;lt;/div&amp;gt;&lt;br /&gt;
{| {{STDT| c_12 text-center}}&lt;br /&gt;
!Skill Level&lt;br /&gt;
!Standard&lt;br /&gt;
!Nimble&lt;br /&gt;
!Skill Level&lt;br /&gt;
!Standard&lt;br /&gt;
!Nimble&lt;br /&gt;
|-&lt;br /&gt;
!0&lt;br /&gt;
|0%&lt;br /&gt;
|20%&lt;br /&gt;
! -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!1&lt;br /&gt;
|0%&lt;br /&gt;
|22%&lt;br /&gt;
!11&lt;br /&gt;
|12%&lt;br /&gt;
|33%&lt;br /&gt;
|-&lt;br /&gt;
!2&lt;br /&gt;
|0%&lt;br /&gt;
|24%&lt;br /&gt;
!12&lt;br /&gt;
|14%&lt;br /&gt;
|33.5%&lt;br /&gt;
|-&lt;br /&gt;
!3&lt;br /&gt;
|0%&lt;br /&gt;
|26%&lt;br /&gt;
!13&lt;br /&gt;
|16%&lt;br /&gt;
|34%&lt;br /&gt;
|-&lt;br /&gt;
!4&lt;br /&gt;
|0%&lt;br /&gt;
|28%&lt;br /&gt;
!14&lt;br /&gt;
|18%&lt;br /&gt;
|34.5%&lt;br /&gt;
|-&lt;br /&gt;
!5&lt;br /&gt;
|0%&lt;br /&gt;
|30%&lt;br /&gt;
!15&lt;br /&gt;
|20%&lt;br /&gt;
|35%&lt;br /&gt;
|-&lt;br /&gt;
!6&lt;br /&gt;
|2%&lt;br /&gt;
|30.5%&lt;br /&gt;
!16&lt;br /&gt;
|22%&lt;br /&gt;
|35.5%&lt;br /&gt;
|-&lt;br /&gt;
!7&lt;br /&gt;
|4%&lt;br /&gt;
|31%&lt;br /&gt;
!17&lt;br /&gt;
|24%&lt;br /&gt;
|36%&lt;br /&gt;
|-&lt;br /&gt;
!8&lt;br /&gt;
|6%&lt;br /&gt;
|31.5%&lt;br /&gt;
!18&lt;br /&gt;
|26%&lt;br /&gt;
|36.5%&lt;br /&gt;
|-&lt;br /&gt;
!9&lt;br /&gt;
|8%&lt;br /&gt;
|32%&lt;br /&gt;
!19&lt;br /&gt;
|28%&lt;br /&gt;
|37%&lt;br /&gt;
|-&lt;br /&gt;
!10&lt;br /&gt;
|10%&lt;br /&gt;
|32.5%&lt;br /&gt;
!20&lt;br /&gt;
|30%&lt;br /&gt;
|37.5%&lt;br /&gt;
|}&lt;br /&gt;
{{col-end}}&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Melee]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Mining ===&lt;br /&gt;
The mining skill determines how long it takes for a colonist to mine out each rock, and how much they can obtain from each mineral vein mined.&lt;br /&gt;
&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Mining]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Intellectual ===&lt;br /&gt;
This skill affects the speed at which [[research]] is completed.&lt;br /&gt;
&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Intellectual]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Plants ===&lt;br /&gt;
The plants skill affects how fast a colonist sows and harvests growing zones, hydroponics and flower pots, and how fast trees and other vegetation is cut down. It also influences how much a colonist [[Caravan#Foraging| forages]] while in a caravan. Some plants require a minimum plants skill in order to plant them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Plants]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;li style=&amp;quot;display: inline-table;&amp;quot;&amp;gt;&lt;br /&gt;
{| {{STDT| sortable text-center mw-collapsible mw-collapsed}}&lt;br /&gt;
|+ style=&amp;quot;white-space: nowrap;&amp;quot; | '''Plants with a minimum Plants skill level to sow:'''&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Level&lt;br /&gt;
|-&lt;br /&gt;
{{#ask: [[Category:Plants]] [[Minimum Required Growing Skill::&amp;gt;1]]&lt;br /&gt;
| ?Minimum Required Growing Skill=&lt;br /&gt;
| format = template&lt;br /&gt;
| template = Ask Table Formatter&lt;br /&gt;
| limit = 999&lt;br /&gt;
| link = none&lt;br /&gt;
| sort = From DLC, Minimum Required Growing Skill, Name}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shooting ===&lt;br /&gt;
The shooting skill affects a character's [[Shooting Accuracy|accuracy]] with [[ranged weapons]].&lt;br /&gt;
&lt;br /&gt;
The table below shows post-processed shooting accuracy per tile of distance for each skill level and trait combination, assuming the pawn is healthy:&lt;br /&gt;
&lt;br /&gt;
{| {{STDT| c_12 text-center}}&lt;br /&gt;
!Skill Level&lt;br /&gt;
!Standard&lt;br /&gt;
!Careful Shooter&lt;br /&gt;
!Trigger-Happy&lt;br /&gt;
!Skill Level&lt;br /&gt;
!Standard&lt;br /&gt;
!Careful Shooter&lt;br /&gt;
!Trigger-Happy&lt;br /&gt;
|-&lt;br /&gt;
!0&lt;br /&gt;
|89%&lt;br /&gt;
|94.5%&lt;br /&gt;
|84%&lt;br /&gt;
! -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
!1&lt;br /&gt;
|91%&lt;br /&gt;
|95%&lt;br /&gt;
|85%&lt;br /&gt;
!11&lt;br /&gt;
|97.25%&lt;br /&gt;
|98.333%&lt;br /&gt;
|95%&lt;br /&gt;
|-&lt;br /&gt;
!2&lt;br /&gt;
|93%&lt;br /&gt;
|95.5%&lt;br /&gt;
|86%&lt;br /&gt;
!12&lt;br /&gt;
|97.5%&lt;br /&gt;
|98.5%&lt;br /&gt;
|95.5%&lt;br /&gt;
|-&lt;br /&gt;
!3&lt;br /&gt;
|93.5%&lt;br /&gt;
|96%&lt;br /&gt;
|87%&lt;br /&gt;
!13&lt;br /&gt;
|97.75%&lt;br /&gt;
|98.666%&lt;br /&gt;
|96%&lt;br /&gt;
|-&lt;br /&gt;
!4&lt;br /&gt;
|94%&lt;br /&gt;
|96.5%&lt;br /&gt;
|88%&lt;br /&gt;
!14&lt;br /&gt;
|98%&lt;br /&gt;
|98.833%&lt;br /&gt;
|96.5%&lt;br /&gt;
|-&lt;br /&gt;
!5&lt;br /&gt;
|94.5%&lt;br /&gt;
|97%&lt;br /&gt;
|89%&lt;br /&gt;
!15&lt;br /&gt;
|98.167%&lt;br /&gt;
|99%&lt;br /&gt;
|97%&lt;br /&gt;
|-&lt;br /&gt;
!6&lt;br /&gt;
|95%&lt;br /&gt;
|97.25%&lt;br /&gt;
|91%&lt;br /&gt;
!16&lt;br /&gt;
|98.333%&lt;br /&gt;
|99.125%&lt;br /&gt;
|97.25%&lt;br /&gt;
|-&lt;br /&gt;
!7&lt;br /&gt;
|95.5%&lt;br /&gt;
|97.5%&lt;br /&gt;
|93%&lt;br /&gt;
!17&lt;br /&gt;
|98.5%&lt;br /&gt;
|99.25%&lt;br /&gt;
|97.5%&lt;br /&gt;
|-&lt;br /&gt;
!8&lt;br /&gt;
|96%&lt;br /&gt;
|97.75%&lt;br /&gt;
|93.5%&lt;br /&gt;
!18&lt;br /&gt;
|98.666%&lt;br /&gt;
|99.313%&lt;br /&gt;
|97.75%&lt;br /&gt;
|-&lt;br /&gt;
!9&lt;br /&gt;
|96.5%&lt;br /&gt;
|98%&lt;br /&gt;
|94%&lt;br /&gt;
!19&lt;br /&gt;
|98.833%&lt;br /&gt;
|99.375%&lt;br /&gt;
|98%&lt;br /&gt;
|-&lt;br /&gt;
!10&lt;br /&gt;
|97%&lt;br /&gt;
|98.167%&lt;br /&gt;
|94.5%&lt;br /&gt;
!20&lt;br /&gt;
|99%&lt;br /&gt;
|99.438%&lt;br /&gt;
|98.167%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that shooting accuracy for the pawn is calculated '''per tile''', meaning that while a trivial increase (like 1% or so) in shooting accuracy may not matter up close, it can make a huge difference in long distances.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
*A colonist with shooting accuracy of 99% has a base accuracy of 72.5% against a target 32 tiles away.&lt;br /&gt;
*With 98% accuracy, the base accuracy against the same target becomes only 52.4%.&lt;br /&gt;
&lt;br /&gt;
The base accuracy at various distances are listed when you check the information of a pawn. This can show the actual shooting performance of a pawn, especially at long ranges.&lt;br /&gt;
&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Shooting]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Social ===&lt;br /&gt;
The social skill affects the impact of social interactions on other characters' mood, the impact of gifts on faction relations, the recruitment chance for prisoners and trader prices.&lt;br /&gt;
A small amount of experience is gained every time two colonists have a social interaction with each other. Characters have a [[talking]] stat that somehow interacts with this skill&lt;br /&gt;
&lt;br /&gt;
{{#ask:  [[Category:Stat]] [[Skill::Social]]&lt;br /&gt;
| ?Description&lt;br /&gt;
| ?Skill Base Factor=Base Factor&lt;br /&gt;
| ?Skill Bonus Factor=Bonus Factor&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.0.245|0.0.245]] - Skills now cap at 20. Added cooking, medicine, artistic, crafting but currently do nothing. Rebalanced shooting and melee to make skill more important. Shooting accuracy split into misses due to equipment and misses due to skill.&lt;br /&gt;
* [[Version/0.2.363|0.2.363]] - High level skills now decay. Passions system added. &lt;br /&gt;
* [[Version/0.9.722|0.9.722]] - Old pawns now tend to spawn with higher skills. Low skill cooks can now cause food poisoning.&lt;br /&gt;
* [[Version/0.10.785|0.10.785]] - Passion flames are now displayed subtly on the work overview screen. Reduced skill degradation rate. Reworked how skills generate so there will be more initial skill variation and age affect starting skills more.&lt;br /&gt;
* [[Version/0.12.906|0.12.906]] - Animals skill added.&lt;br /&gt;
* B19/1.0 - Doing passionate work now affects mood instead of recreation. Adjusted balance of learning rates for various skills. Easier: Melee, shooting, social. Harder: Intellectual, growing, mining.&lt;br /&gt;
* [[Version/1.2.2753|1.2.2753]] - Pawns will now not lose their skill levels until they fall 1000 XP under zero. This stops pawns from quickly leveling up and down around a threshold.  We now display a text mote when a player pawn gains a new level in a skill.&lt;br /&gt;
* [[Version/1.4.3527|1.4.3527]] - Fix: Can train shooting and melee on colony mechanoids.&lt;br /&gt;
&lt;br /&gt;
[[Category:Characters]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Molotov_cocktails&amp;diff=173746</id>
		<title>Molotov cocktails</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Molotov_cocktails&amp;diff=173746"/>
		<updated>2026-01-07T15:47:22Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Corrected explosion from damage threshold. Verified via decompiler -- this is the default value for CompExplosive as molotovs do not override the default.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox main|weapon&lt;br /&gt;
| name = Molotov cocktails&lt;br /&gt;
| image = Molotov.png&lt;br /&gt;
| description = Glass bottles filled with flammable liquid, with a burning cloth in the neck. A favorite weapon for hooligans and desperate warriors from rim to rim.&lt;br /&gt;
| type = Equipment&lt;br /&gt;
| type2 = Weapons&lt;br /&gt;
| tech level = Industrial&lt;br /&gt;
| class = Industrial&lt;br /&gt;
| damage = 10&lt;br /&gt;
| damage type = Flame&lt;br /&gt;
| mode = Single Thrown&lt;br /&gt;
| warmup = 90&lt;br /&gt;
| cooldown = 160&lt;br /&gt;
| burst = 1&lt;br /&gt;
| aimSub = 3.8&lt;br /&gt;
| range = 12.9&lt;br /&gt;
| accuracy = -&lt;br /&gt;
| DPS = DPS&lt;br /&gt;
| velocity = 12&lt;br /&gt;
| missRadius = 1.9&lt;br /&gt;
| blastRadius = 1.1&lt;br /&gt;
| production facility 1 = Machining table&lt;br /&gt;
| research = Machining&lt;br /&gt;
| resource 1 = Cloth&lt;br /&gt;
| resource 1 amount = 25&lt;br /&gt;
| resource 2 = Chemfuel&lt;br /&gt;
| resource 2 amount = 80&lt;br /&gt;
| marketvalue = 245&lt;br /&gt;
| work to make = 6000&lt;br /&gt;
| work speed stat = General Labor Speed&lt;br /&gt;
| mass base = 1.0&lt;br /&gt;
| has quality = False&lt;br /&gt;
| weaponTags = GrenadeDestructive, GrenadeFlame&lt;br /&gt;
| tradeTags = WeaponRanged&lt;br /&gt;
}}&lt;br /&gt;
'''Molotov cocktails''' are short ranged, thrown [[weapons]] that have a forced miss radius but deal flame damage and set a 3x3 &amp;quot;plus-shaped&amp;quot; ('''+''') area on fire where they land. They are not consumed on use and do not use any ammo.&lt;br /&gt;
&lt;br /&gt;
== Acquisition ==&lt;br /&gt;
{{Acquisition}}&lt;br /&gt;
&lt;br /&gt;
They can also be [[Trade|purchased]] from orbital pirate merchants and orbital combat suppliers, [[outlander]] [[faction base]]s, or obtained from the following [[raider]] kinds:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Raider is linked instead of a faction because its a Mercenary used by both Outlanders and Pirates--&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! Raider Kind !! Chance !! Average Quality !! Health&lt;br /&gt;
|-&lt;br /&gt;
| [[Raider#Grenadier|Grenadier]] || 50% || Normal || 70-230%&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
[[File:Molotov cocktails.png|thumb|left|200px|Molotov cocktails range and AoE]]&lt;br /&gt;
&lt;br /&gt;
=== Weapon ===&lt;br /&gt;
Molotov cocktails are weapons. They take up the weapon slot and will not run out of ammo. They are blocked by walls, but the blast ignores [[cover]]. When choosing a target, a circular zone will generate to indicate range, then another 3x3 indicator with a circular center will become the aiming spot.&lt;br /&gt;
&lt;br /&gt;
Molotovs deal {{P|Damage Base}} [[Damage types#{{P|Damage Type}}|{{P|Damage Type}}]]  damage in a {{P|Blast Radius}} tile radius. They are thrown from a very short range of {{P|Range}} tiles and have moderate aiming time; they explode immediately on landing. With a forced miss radius of 1.9 tiles, an unobstructed molotov always lands within 1 grid tile (including diagonals) of the target. This means [[Shooting]] skill, [[shooting accuracy]], and health of the grenadier is irrelevant. [[Aiming time]] effects still apply, however.&lt;br /&gt;
&lt;br /&gt;
Flame damage will possibly ignite pawns. The impact will create [[Filth#Chemfuel puddle|chemfuel puddles]], which will then ignite and burn, causing general [[fire]]s.{{Check Tag|Puddle behavior?|Are there always 5 puddles, do they always ignite etc.}} Pawns on fire will run wildly and are unable to attack.&lt;br /&gt;
&lt;br /&gt;
{{Pyromaniac Weapon Note}}&lt;br /&gt;
=== Item ===&lt;br /&gt;
When damaged with [[Damage Types#Flame|Flame]] damage below 20% of its health, the cocktails will spark and emit a hissing sound shortly before exploding some time later. The explosion deals 10 Flame damage in a 2.66 tile radius around itself, without leaving chemfuel puddles. They cannot be smelted in an [[electric smelter]].&lt;br /&gt;
&lt;br /&gt;
Molotov cocktails have no [[quality]] - every set of molotovs will have the same stats, regardless of the skill of the crafter.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
=== Combat ===&lt;br /&gt;
Molotovs are dubious in raw combat. Molotovs are better in a supporting role, being one of the few weapons that start fires. Pawns that are on fire will stop attacking and run wildly, making them easy targets. But fire on its own isn't very strong, molotovs have a short range, and fire can lead to collateral damage. Without manual oversight, grenades are inefficient against moving targets. However, due to the forced miss, they can be a viable alternative weapon for pawns with low shooting skill or health issues.&lt;br /&gt;
&lt;br /&gt;
When throwing a cocktail down an 1-tile wide alley, a pawn can consistently throw a cocktail 4 tiles, not including the tile the pawn is standing on, without intersecting the two side walls. Beyond 4 tiles, there is a risk of hitting the wall and dropping short. This can be relevant to prevent friendly fire or damaging defenses during combat. Watch out when using these in place of [[frag grenades]] when melee blocking, as the fire can allow enemies to clip past your blockers, allowing them to surround the blockers or attack your backline. &lt;br /&gt;
&lt;br /&gt;
Because it relies on fires, [[rain]] significantly diminishes its outdoor utility. Note that the game has a &amp;quot;firewatcher&amp;quot;, and will automatically start rain if fires get too out of control.&lt;br /&gt;
&lt;br /&gt;
=== Fire traps ===&lt;br /&gt;
Molotovs become much more useful as a general firestarter. Burning down flammable structures is a very powerful tactic, though it can be costly.&lt;br /&gt;
&lt;br /&gt;
Place fuel like wooden [[barricade]]s or [[straw matting]] where you want things to burn. Then, lure and trap [[raider]]s (or other enemies) inside. &lt;br /&gt;
* In a mountain, you can use fire to burn any [[infestation]]s that spawn inside your pawn's bedrooms.&lt;br /&gt;
* You can use wooden [[column]]s/walls as fuel, and use them to support [[roof]]s. In the absence of other support, burning the wall will cause a [[Roof#Roof_collapse|roof collapse]].&lt;br /&gt;
&lt;br /&gt;
In a dedicated &amp;quot;oven&amp;quot; or &amp;quot;burn tunnel&amp;quot;, fire can kill infinitely many human pawns. So long as a place is [[roof]]ed and &amp;quot;Indoors&amp;quot;, temperatures will rapidly rise. As [[heatstroke]] is the way most pawns are [[downed]], no amount of heat protection will save an organic pawn. Note that [[mechanoid]]s are completely immune to both fire and heatstroke. Heatstroke ignores the usual [[AI Storytellers#Enemy death on downed|death on downed]] chance with combat, allowing you to easily capture pawns and recover untainted [[armor]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;400px&amp;quot; heights=&amp;quot;400px&amp;quot; class=&amp;quot;left&amp;quot; mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
File:Ancient danger fire.png|'''Fire being used to handle an [[ancient shrine]]'s cryptosleep caskets, once the initial threats are cleared.&amp;lt;br&amp;gt;Place some fuel, toss molotovs from outside until the room reaches ~ {{Temperature|400}}, then shoot the caskets to open them. '''&lt;br /&gt;
File:Ancient danger fire2.png|'''Even with [[firefoam pop pack]]s: it isn't the fire that kills, its the heatstroke (usually).&amp;lt;br&amp;gt;Deconstructing 1 wall will make the room &amp;quot;Outside&amp;quot;, turning it from 800°C to 23°C. This allows you to easily capture pawns, untainted armor, and the rest of their gear.'''&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Utility ===&lt;br /&gt;
Fire is very useful to dispose of flammable items, like [[corpse]]s. Simply gather all unwanted items in a fireproof room (like using stone for walls and floor), draft a pawn, and throw the cocktail. Make sure to remove the Home Area around the room, so that pawns don't try and extinguish the fire. Molotovs throw faster and are significantly cheaper to produce than [[incendiary launcher]]s, so are better for this purpose. For [[corpse]]s, watch out for [[rot stink]]; haul corpses quickly and wait for the rot to wear before burning.&lt;br /&gt;
&lt;br /&gt;
In extremely cold temperatures, fire can be a last resort in order to create [[temperature|heat]]. Use with extreme caution - fire can quickly go out of control, and temperatures easily get too hot. Typically, colonies with access to molotovs also have access to [[heater]]s.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
&amp;lt;!--Added in or prior to Version/0.1.334--&amp;gt;&lt;br /&gt;
* 1.0 - Received a crafting recipe.&lt;br /&gt;
* [[Version/1.3.3066|1.3.3066]] - Grenade throws are rendered in an arc.&lt;br /&gt;
&lt;br /&gt;
{{Nav|weapon|wide}}&lt;br /&gt;
[[Category:Equipment]] [[Category:Weapons]] [[Category:Industrial Weapons]] [[Category:Flame Weapons]]&lt;br /&gt;
[[Category:Ranged Weapons]] [[Category:Single Thrown Weapons]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Golden_cube&amp;diff=173743</id>
		<title>Golden cube</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Golden_cube&amp;diff=173743"/>
		<updated>2026-01-07T15:32:41Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Correcting the gold drop amount - verified via decompiler.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Anomaly}}&lt;br /&gt;
{{Spoiler}}&lt;br /&gt;
{{Stub|reason=Requires confirmation on effects, compilation of disposal methods, information on anomaly study, etc.}}&lt;br /&gt;
{{About|the miscellaneous object added by the [[Anomaly DLC]]|the object used in an [[Ideoligion]]'s [[Reliquary]]|Relic}}&lt;br /&gt;
{{Infobox main|entity&lt;br /&gt;
| name = Golden cube&lt;br /&gt;
| image = Golden cube.png&lt;br /&gt;
| description = A cube that fits snugly in the hand. Golden in color, it is always invitingly warm to the touch, like a trusted pet or a hug from a good friend. Those that look closely are rewarded for their attention by the delightful way light plays across its welcoming surface.&amp;lt;br /&amp;gt;The cube seems impervious to most damage.&lt;br /&gt;
&amp;lt;!-- Base Stats --&amp;gt;&lt;br /&gt;
| type = Entity&lt;br /&gt;
| type2 = Advanced&lt;br /&gt;
| market value = 1200&lt;br /&gt;
| mass base = 1&lt;br /&gt;
| beauty = 400&lt;br /&gt;
| flammability = 0&lt;br /&gt;
| rotatable = false&lt;br /&gt;
| path cost = 14&lt;br /&gt;
&amp;lt;!-- Containment - Studiable --&amp;gt;&lt;br /&gt;
| anomaly knowledge = 2&lt;br /&gt;
| knowledge category = Advanced&lt;br /&gt;
| study interval = 120000&lt;br /&gt;
| min monolith level for study = 1&lt;br /&gt;
| show toggle gizmo = true&lt;br /&gt;
&amp;lt;!-- Technical --&amp;gt;&lt;br /&gt;
| defName = GoldenCube&lt;br /&gt;
| label = golden cube&lt;br /&gt;
| category = Item&lt;br /&gt;
}}&lt;br /&gt;
The '''golden cube''' is an inanimate [[entity]] item added in the [[Anomaly DLC]].&lt;br /&gt;
&lt;br /&gt;
== Acquisition ==&lt;br /&gt;
There are two ways to acquire the golden cube:&lt;br /&gt;
* The [[Mysterious cargo]] quest involves either a neutral/allied planetary [[faction]] or an anonymous AI asking you to take an unspecified item off their hands, along with a sizable payment. One of the =randomly selected options for the cargo is the golden cube. For further information about the quest, see that page. The golden cube appears with a blue &amp;quot;Mysterious Cargo&amp;quot; letter when it lands on your map. &lt;br /&gt;
* Performing the [[Void provocation]] ritual can result in the appearance of a golden cube on your map. The monolith must be at least at Level 2 for the Golden Cube to appear after a Void Provocation. The golden cube appears with an orange &amp;quot;Golden Cube&amp;quot; letter when it appears on your map via Void Provocation.&lt;br /&gt;
* Note that these events can stack in order to acquire multiple cubes at the same time, posing a bigger hindrance than &amp;quot;only&amp;quot; one cube.&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
At first glance, the golden cube is a harmless - if useless - item, which can be [[haul]]ed, [[stockpile]]d, carried, and [[caravan]]ed with no apparent effect. However, its presence on the map will gradually produce a powerful, deleterious influence on your colonists. This influence will only stop once the cube has been [[#Deactivation|deactivated]], though not without further consequences. The cube cannot be destroyed until it has been deactivated, and despite its significant market value, it cannot be sold under any circumstances.&lt;br /&gt;
&lt;br /&gt;
=== Containment ===&lt;br /&gt;
Unlike most anomalous [[entities]], the cube does not need to be contained or suppressed. It can simply be kept in storage until pawns move to study or play with it. Each study session produces a total of 2 advanced knowledge, and it can be studied every 2 days. You can, however, prevent pawns from interacting with it by forbidding it. This prevents obsession from worsening, but will not stop the cube from choosing new victims.&lt;br /&gt;
{{Check Tag|Detail Needed|If the cube is placed in a caravan, will it affect the caravaneers? If so, will it affect them, or colonists on a map, as well? Will it affect pawns if placed in an Odyssey DLC shuttle?}}&lt;br /&gt;
&lt;br /&gt;
=== Cube interest ===&lt;br /&gt;
{{Quote| &amp;quot;This person is drawn to the golden cube. If separated from the cube for too long, they'll start to experience negative effects.&amp;quot;}}&lt;br /&gt;
When the cube spawns on the map, one [[colonist]] will immediately gain the cube interest health effect. Over time, other colonists will become afflicted as well. On average, another colonist becomes cube interested every 12 days. Once a pawn becomes interested, however, they will experience a series of buffs and debuffs that get more severe as the affliction progresses, and severe negative [[thought]]s if they don't interact with the cube regularly. &lt;br /&gt;
&lt;br /&gt;
Initially, the effects are fairly benign; a cube-curious pawn will begin at 10% interest, and will stop work to play with the cube roughly once a day. This takes one in-game hour and cannot be interrupted once it begins except by drafting them. Additionally, all social interactions they engage in will now involve talking about the cube, &amp;quot;Wandering&amp;quot; activity wil now be called &amp;quot;Wandering and thinking about the cube.&amp;quot; and psyfocus meditation will be changed to &amp;quot;Meditating on the cube.&amp;quot; but all three are purely cosmetic changes. In exchange, the pawn experiences the {{Thought|label= Cube Joy|desc= My wonderful cube. My precious cube. I love it. It's so beautiful.|value=+15|stack=1|duration=1}}. Each interaction with the cube increases a pawn's interest level by around 6 to 9 percent, progressing the pawn to more disruptive behaviors. You will receive a notification each time a pawn's obsession worsens.&lt;br /&gt;
&lt;br /&gt;
At any interest level over 10%, your affected pawns will occasionally stop work to build [[cube sculpture]]s, curious artistic objects that provide a small amount of beauty but require no resources. Although the sculptures are marginally useful, these mental breaks can occur at any time, including in the middle of combat. Frequency of these events is tied to the interest level, occurring rarely at first but multiple times a day as a pawn's interest reaches its later stages. Also, be aware that destruction of these sculptures can result in severe mood penalties and berserker mental breaks.&lt;br /&gt;
&lt;br /&gt;
Interest over 33% is considered &amp;quot;Fascinated.&amp;quot; Along with the previous effects, these pawns now have a small chance{{Check Tag|Frequency?}} of suffering random mental breaks during which they wander in a daze, thinking about the cube. They are also distracted from their tasks the rest of the time, working at only 90% normal speed. This is balanced out slightly by the fact that their Sleep level falls at 80% its normal rate.&lt;br /&gt;
&lt;br /&gt;
The final stage - &amp;quot;Obsessed&amp;quot; - sets in once interest level reaches 66%. At this stage, the sculpture and daze events occur more frequently,{{Check Tag|Frequency?}} and the modifiers your pawns experience are doubled: 60% Sleep fall rate and 80% work speed. On top of that, your pawns suffer a +4% penalty to their mental break threshold. Given how much time your pawns spend doing cube-related activities - none of which have any impact on Recreation - your pawns will soon find themselves either miserable and Recreation-deprived or unable to find time to do actual work.&lt;br /&gt;
&lt;br /&gt;
The alternative to allowing your pawns to progress their interest is to forbid the cube. So long as the item is forbidden, your pawns will be unable to worsen their interest, instead going into cube withdrawal.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:right;&amp;quot;&lt;br /&gt;
! Level&lt;br /&gt;
! Severity&lt;br /&gt;
! [[Sleep|Sleep Fall Rate]]&lt;br /&gt;
! [[Work|Global Work Speed]]&lt;br /&gt;
! Other effects&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Curious (Initial)&lt;br /&gt;
| 0-10%&lt;br /&gt;
| x100%&lt;br /&gt;
| x100%&lt;br /&gt;
| Occasionally play with cube or suffer withdrawal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Curious &lt;br /&gt;
| &amp;gt;10%&lt;br /&gt;
| x100%&lt;br /&gt;
| x100%&lt;br /&gt;
| Same as above, plus chance of cube sculpture mental break.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Fascinated&lt;br /&gt;
| &amp;gt;33%&lt;br /&gt;
| {{Good|x80%}}&lt;br /&gt;
| {{Bad|x90%}}&lt;br /&gt;
| Same as above, plus chance of cube daze mental break.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Obsessed&lt;br /&gt;
| &amp;gt;66%&lt;br /&gt;
| {{Good|x60%}}&lt;br /&gt;
| {{Bad|x80%}}&lt;br /&gt;
| Same as above with greater frequency,  plus {{Bad|+4% Mental Break Threshold}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Cube sculptures ====&lt;br /&gt;
{{Split|section=1|destination=Cube sculpture|reason=Would be easier to do stats atc. - leave brief summary here, with link to that page }}&lt;br /&gt;
{{Main|Cube sculpture}}&lt;br /&gt;
Cube-Fascinated colonists will go on periodic mental breaks {{Check Tag|MTB?|How often?}} during which they will build a [[sculpture]] related to the cube. The building speed and quality of the sculpture is affected by construction skill. The quality can be of any value, starting at awful for a 0 beauty score. 2 for poor, 4 for normal, 8 for good, 12 for excellent, and 20 for masterwork.  Be aware that this sculpture will use up a [[Inspired creativity]] inspiration, if the colonist has one. &lt;br /&gt;
&lt;br /&gt;
The type of sculpture generated depends on the [[terrain]] or [[floor]]ing the colonist is standing on or by - no material is actually consumed to create the sculptures. The sculpture types and the related terrains are listed in the table below:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable collapsible&amp;quot;&lt;br /&gt;
|+ &lt;br /&gt;
|-&lt;br /&gt;
! Sculpture type !! Terrains&lt;br /&gt;
|-&lt;br /&gt;
| Dirt cube sculpture ||&lt;br /&gt;
* Marshy soil&lt;br /&gt;
* Mud&lt;br /&gt;
* Packed dirt&lt;br /&gt;
* Rich soil&lt;br /&gt;
* Lichen-covered soil&lt;br /&gt;
* Soil&lt;br /&gt;
|-&lt;br /&gt;
| Sand cube sculpture || &lt;br /&gt;
* Sand&lt;br /&gt;
* Soft sand&lt;br /&gt;
|-&lt;br /&gt;
|| Stone cube sculpture ||&lt;br /&gt;
* Rough stone&lt;br /&gt;
* Rough-hewn stone&lt;br /&gt;
* Smooth stone&lt;br /&gt;
|-&lt;br /&gt;
| Scrap cube sculpture || ''All other terrains and floors''&lt;br /&gt;
|}&lt;br /&gt;
The different types of cube sculpture vary in name and texture but are otherwise statistically identical. The sole exception to this is that scrap cube sculptures have 40% flammability while all other have 0%.&lt;br /&gt;
&lt;br /&gt;
The sculpture, once complete, can be freely minified and moved, but it cannot be deconstructed. It must be destroyed with attacks.&lt;br /&gt;
&lt;br /&gt;
While the cube statue exists its sculptor gets {{Thought|label=Cube Sculpture|desc= My sculpture... My beautiful Sculpture!|value= +1}}. This stacks with each cube sculpture they've created, without an apparent limit. If the sculpture is destroyed, the sculptor will get {{Thought|label= My Cube Sculpture Destroyed|desc=My sculpture... My beautiful sculpture...  |value= -5| stack=10 | multi= 0.75|duration=5}} and an increase in severity to a hidden &amp;quot;Cube anger&amp;quot; hediff. Each destroyed sculpture yields an increase in Cube Anger severity that scales with the current cube interest of the pawn. This hediff is hidden, and so its progress cannot be normally tracked.&lt;br /&gt;
&lt;br /&gt;
The increase in severity is controlled by the following relationship:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &lt;br /&gt;
{{Graph:Chart&lt;br /&gt;
|width=400&lt;br /&gt;
|height=100&lt;br /&gt;
|type=area&lt;br /&gt;
|xAxisTitle=Cube interest (%)&lt;br /&gt;
|yAxisTitle=Cube anger per sculpture destroyed (%)&lt;br /&gt;
|xAxisMin=0&lt;br /&gt;
|yAxisMax=100&lt;br /&gt;
|x= 10, 50, 100&lt;br /&gt;
|y= 10, 20, 40&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Once the Cube Anger hediff reaches 100% severity, the pawn will go into a [[Berserk]] mental state with an {{MTB}} of {{Ticks|60000*0.04}} along with a custom [[letter]] detailing the cause. Once the pawn has gone into the rage, the Cube Anger hediff is reduced to 0% and removed. The only other way to remove the accrued Cube Anger besides an eventual berserk state, is for the affected pawn to die. The hediff will no longer be present upon resurrection.&lt;br /&gt;
&lt;br /&gt;
==== Cube withdrawal and coma ====&lt;br /&gt;
{{Quote| &amp;quot;This person obsessively wants to find their golden cube. Their skin itches and their mind races, thinking of ways to get closer to the cube. Their symptoms will get worse until they play with the cube.&amp;quot;}}&lt;br /&gt;
{{Quote| &amp;quot;This person was connected to a golden cube and then separated from it. Severing the link this way has put them in a coma.&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
If an obsessed colonist is prevented from playing with the cube for an extended period of time, they start going through withdrawal. When they do, they get the &amp;quot;Cube Withdrawal&amp;quot; health condition. Cube withdrawal worsens more quickly for colonists with advanced cube obsession{{Check Tag|Detail needed| How much per day by obsession level?}}. Cube withdrawal inflicts a gradually increasing penalty to consciousness, accompanied by a potent {{Thought| label= Cube Withdrawal | desc= I need to see the golden cube. Just once more. Please. / Where's that cube? I miss it. I need it! / Where is my cube? Where is it? | value=-15 | value2=-20| value3=-30| stack = 1}} debuff. If cube withdrawal is allowed to progress to 100%, the colonist will fall into a cube coma, multiplying their consciousness level by 10%. The coma can last anywhere from 3 to 24 days, depending on the colonist's obsession level. Upon waking up from the coma, the colonist will no longer be obsessed with the cube. However, nothing prevents the recently woken colonist from becoming obsessed with the cube again.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:right;&amp;quot;&lt;br /&gt;
! Level&lt;br /&gt;
! Severity&lt;br /&gt;
! [[Consciousness]]&lt;br /&gt;
! [[Mood]]&lt;br /&gt;
! Notification&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Initial&lt;br /&gt;
| &amp;gt;10%&lt;br /&gt;
| {{Bad|-10%}}&lt;br /&gt;
| {{Bad|-15}}&lt;br /&gt;
| [Name] is experiencing cube withdrawal.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Moderate&lt;br /&gt;
| &amp;gt;35%&lt;br /&gt;
| {{Bad|-15%}}&lt;br /&gt;
| {{Bad|-20}}&lt;br /&gt;
| [Name]'s cube withdrawal has worsened.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! Extreme&lt;br /&gt;
| &amp;gt;65%&lt;br /&gt;
| {{Bad|-20%}}&lt;br /&gt;
| {{Bad|-30}}&lt;br /&gt;
| [Name]'s cube withdrawal has worsened.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Deactivation and destruction === &lt;br /&gt;
Once at least 4 research has been gained from the cube, you will receive a letter hinting at the cube's addictive impact on your pawns. It further states that the cube can be destroyed, but more research is needed to determine how. Although the letter says that the pawn studying it needs to study it to learn more, any pawn may perform research to further the investigation. Studying the cube has no risk of addiction. &lt;br /&gt;
&lt;br /&gt;
{{Quote| &amp;quot;{PAWN_nameDef}'s investigation of the golden cube has revealed more. It is able to psychically influence anyone who interacts with it. Those under the cube's influence will experience extreme withdrawal if they're separated from it.\n\n{PAWN_nameDef} thinks that there may be a way to deactivate the cube, but {PAWN_pronoun} will need to study it further.&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
Once a total of 24-40 research has been gained from the cube, an option to permanently deactivate it becomes available. Doing so requires 1 [[Archotech]] [[Shard]] and can only be done by a pawn not currently suffering from cube obsession, destroying the cube and breaking its hold over your colony. However, this event will send any colonists under the cube's influence who are not already in a cube coma into [[Berserk]] Mental Breaks, even if on other map tiles. Pawns in [[caravan]]s at the time of this deactivation instead leave your colony permanently, so be sure to avoid deactivation while addicts are travelling. If you intend to destroy the cube with conscious addicts present, expect to lose pawns and keep your doctors safe so they can treat the injured.&lt;br /&gt;
&lt;br /&gt;
To find exact info on how much you have and how much you need to research the GoldenCube you can open your save file with an editor, such as notepad++, to find code entry:&lt;br /&gt;
&amp;lt;anomalyKnowledgeGained&amp;gt;##&amp;lt;/anomalyKnowledgeGained&amp;gt; and &amp;lt;studyThresholds&amp;gt;##,##&amp;lt;/studyThresholds&amp;gt; under &amp;lt;def&amp;gt;GoldenCube&amp;lt;/def&amp;gt;&lt;br /&gt;
The first entry is to find you total research on the cube the second entry is to identify exactly what the research needed is to get event completion the first threshold is always 4 as mentioned above.&lt;br /&gt;
&lt;br /&gt;
There are simple measures you can take to avoid these violent mental breaks. Colonists already in a cube coma will simply wake up, cured of their addiction. Any obsessed colonist that is anesthetized when deactivation occurs will ignore the event and be free of cubic influence when the anesthesia wears off. It is not yet confirmed if [[mind-numb serum]] can prevent these mental breaks{{Check Tag|Mindnumb?|Mindnumb serums appeared to mostly work, but one of my 9 obsessed colonists, who had been mindnumbed, still berserked. It could be that only currently awake pawns can berserk? Seems to be tied to onlyTargetControlledPawns, from my rudimentary examination of the defs}}.&lt;br /&gt;
&lt;br /&gt;
Be aware that colonists in [[cryptosleep casket]]s are ''not'' protected. They will immediately wake up, escape, and begin rampaging. One unorthodox but cheap and effective method to keep your colony safe from cube berserkers is to draft the afflicted pawns and trap them in isolated 3x3 wall prisons. When they go berserk, they will be unable to inflict any damage before the state wears off. Afterwards, simply deconstruct the walls to release them. Although time-consuming to set up, this approach only costs a small amount of wood.&lt;br /&gt;
&lt;br /&gt;
If your entire colony is afflicted, deactivation of the cube is still possible with the help of temporary pawns from quests. Note that there is a small, but not insignificant, chance that new temporary pawns may become obsessed with time. Therefore, if you are relying on a newly joined pawn to deactivate the cube it should be done as soon as possible.{{Check Tag|Detail needed|Confirmed for desperate refugees and pawns accepted for hospitality, can other temporary pawns become obsessed? Do clones from the Warped Obelisk also have cube obsession?}}. Children (ages 3-12), since they cannot do research yet, cannot be enthralled by the cube, and so a child can be used to manually deactivate the cube while your adults are isolated, anesthetized, or otherwise rendered inoperable.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can dispose of the cube via caravan dumping or [[transport pod]], but doing so does not remove your colonists' obsession. Unless the cube is deactivated and destroyed, your colonists will have to go through withdrawal, coma, and recovery.&lt;br /&gt;
&lt;br /&gt;
Upon deactivation the golden cube drops 125-175 [[Gold]]. The exact amount dropped is completely random and is not affected by how many colonists were affected by it nor by any skill value.&lt;br /&gt;
&lt;br /&gt;
[[Deathrest]] and [[Anesthetic|Anesthesize]] prevents a pawn to becoming berserk when the cube is deactivated.&lt;br /&gt;
&lt;br /&gt;
=== Multiple cubes in one colony === &lt;br /&gt;
While multiple cubes in the same colony result in a much higher rate of addiction the deactivation of one cube cures ALL colonists. So there is no separate addiction for the two cubes.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
As with any anomalous object, care should be taken when a cube arrives. It is one of the safest advanced entities you can encounter, but can still prove frustrating as it drops productivity to a crawl. This is especially true for colonies with low populations: the loss of two or three pawns to low productivity is much easier to bear when you have others to handle their burden. So long as you have your researchers aggressively studying the cube every two days, you should be able to deactivate it before it influences many of your colonists. Dosing your best researcher with [[voidsight serum]] or making use of an occultist [[creepjoiner]] can speed up research dramatically. Once you unlock the option to destroy the cube, simply anesthetize the cube's victims before deactivation and the threat will be safely dealt with.&lt;br /&gt;
&lt;br /&gt;
However, if you decide you wish to roleplay as a cube cult and keep it around, this is not entirely impossible. The introduction of the cube will gradually cut into your overall productivity, but will also grant a substantial mood bonus to any colonist allowed to consistently interact with it. Colonies with many pawns who are constantly in danger of mental breaking may find this useful, as the sizable mood buffs will change potentially dangerous mental breaks into smaller sculpture creation breaks. However, constant sculpting can prove troublesome as it not only wastes a pawn's time, but also takes up space with relatively low value sculptures which cannot be broken without a mood penalty.&lt;br /&gt;
&lt;br /&gt;
The cube itself has a considerably high [[beauty]] value (about on par with a Good quality golden statue) which can even increase the mood of pawns who are not obsessed but simply share the same room as the cube. This can quickly increase the beauty value within a room colonists frequent, such as a rec room or dining room. Keeping the cube on display may prove difficult, though, as your pawns will attempt to play with it constantly. This may limit the display time and relocate the golden cube afterwards. Placing a dedicated 1x1 [[Stockpile zone]] for the cube can ensure that it always returns to a specific viewing point. Using a [[shelf]] instead will negate its beauty entirely.&lt;br /&gt;
&lt;br /&gt;
Caravans are made substantially more difficult to form and maintain as any affected colonists will eventually be plagued with constant mood penalties and even a coma due to undergoing cube withdrawal{{Check Tag|Verify|Does carrying the cube within a caravan change this?}}. Often, you may be restricted to keeping any obsessed colonists at home while unaffected pawns can safely do quests on the world map.&lt;br /&gt;
&lt;br /&gt;
It is desirable for pawns with [[tortured artist]] trait to be obsessed with the cube, as the frequent but harmless mental break will still give them creativity inspiration. If you suspect the mysterious cargo is the cube, you can give a pawn interest by knocking out everyone else or moving them off the map with a caravan before accepting it.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Anomaly DLC]] Release - Added.&lt;br /&gt;
&lt;br /&gt;
{{Nav|entity|wide}}&lt;br /&gt;
[[Category: Entities]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=173676</id>
		<title>Modding Tutorials</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=173676"/>
		<updated>2026-01-05T04:56:25Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* Art Tutorials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Mods_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the hub page for tutorials, guides, and reference materials for creating mods for RimWorld. If you are looking for instructions on how to use RimWorld, please check out the general [[Modding]] hub.&lt;br /&gt;
&lt;br /&gt;
As RimWorld does not have a formal modding API, nearly all of the information here has been gathered and maintained by the modding community.&lt;br /&gt;
&lt;br /&gt;
'''NEW: [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]]''' - A work-in-progress list of changes datamined by the modding community in the current unstable version of RimWorld 1.6. '''THERE MAY BE ODYSSEY DLC SPOILERS, YOU HAVE BEEN WARNED.'''&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
==About RimWorld==&lt;br /&gt;
RimWorld is a multi-platform game written on Unity 2022.3.35. However, the Unity Editor is not used for creating mods unless you are creating new shaders or building optional asset bundles.&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Recommended_software|Recommended Software]] - Editors and other useful software for mod development&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]] - Explore the basic folder structure of a mod&lt;br /&gt;
** [[Modding_Tutorials/About.xml|About.xml]] - About.xml identifies and describes your mod to RimWorld so that it can be loaded properly&lt;br /&gt;
&lt;br /&gt;
===Game Systems Guides===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Defs|Defs]] - XML Definitions are used to define and configure content in a way that does not require compiling code&lt;br /&gt;
** [[Modding_Tutorials/MayRequire|MayRequire]] - MayRequire and MayRequireAnyOf are used to conditionally load Defs and list entries based on whether a DLC or other mod is loaded&lt;br /&gt;
* [[Modding_Tutorials/Localization|Localization]] - Define text strings used for translations and word lists used in name and text generation&lt;br /&gt;
* [[Modding_Tutorials/PatchOperations|PatchOperations]] - PatchOperations are used to modify XML Defs without overwriting them completely&lt;br /&gt;
* [[Modding_Tutorials/Sounds|Sounds]] - (Needs Rewriting) Adding sound files for mods&lt;br /&gt;
* [[Modding_Tutorials/Textures|Textures]] - How to create and add textures to mods&lt;br /&gt;
* [[Modding Tutorials/Plant Rendering|Plant Rendering]] - An explanation of how plant textures are rendered&lt;br /&gt;
* [[Modding_Tutorials/Research_Projects|Research Projects]] - How to create and use research projects.&lt;br /&gt;
&lt;br /&gt;
===XML Tutorials===&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step tutorials for creating basic content mods.&lt;br /&gt;
&lt;br /&gt;
Basic Tutorials:&lt;br /&gt;
* [[Modding_Tutorials/Basic_Melee_Weapon|Basic Melee Weapon]] - How to create a basic melee weapon with a texture mask&lt;br /&gt;
* [[Modding_Tutorials/Basic_Ranged_Weapon|Basic Ranged Weapon]] - How to create a basic ranged weapon with custom sound effects&lt;br /&gt;
* [[Modding_Tutorials/Basic_Plant|Basic Plant]] - How to create a custom plant with both a cultivated and wild variant&lt;br /&gt;
* Custom Animal (Upcoming)&lt;br /&gt;
* Simple Building (Upcoming)&lt;br /&gt;
* Custom Workbench (Upcoming)&lt;br /&gt;
* Custom Drug (Upcoming)&lt;br /&gt;
&lt;br /&gt;
Advanced Tutorials:&lt;br /&gt;
* Custom Faction (Upcoming)&lt;br /&gt;
* Custom Culture (Upcoming)&lt;br /&gt;
* Custom Trader Type (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===C# Guides===&lt;br /&gt;
&lt;br /&gt;
C# is used to create and define custom game behaviors &lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Decompiling source code|Decompiling Source Code]] - How to set up and use a decompiler to read vanilla game code&lt;br /&gt;
* [[Modding_Tutorials/Setting up a solution|Setting up a Solution]] - How to set up a solution for compiling a custom mod assembly&lt;br /&gt;
* [[Modding_Tutorials/Application_Startup|Application Startup]] - Describes the application startup process and the order in which game data is loaded&lt;br /&gt;
* Custom Consumable (Upcoming)&lt;br /&gt;
* Custom Overlays (Upcoming)&lt;br /&gt;
* [[Modding_Tutorials/Code_FloatMenuOptionProvider|FloatMenuOptionProvider]] - How to use &amp;lt;code&amp;gt;FloatMenuOptionProvider&amp;lt;/code&amp;gt; to add right click context menu options to arbitrary targets.&lt;br /&gt;
&lt;br /&gt;
===Updates and Migrations===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.5_Mod_Updates|RimWorld 1.5 Mod Updates]] - (WARNING: Anomaly Spoilers) Community notes for updating mods from 1.4 to 1.5.&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]] - (WARNING: Odyssey Spoilers) Community notes for updating mods from 1.5 to 1.6.&lt;br /&gt;
&lt;br /&gt;
===Testing and Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Testing mods|Testing Mods]] - Tips and tricks for testing mod content&lt;br /&gt;
&lt;br /&gt;
===Slightly Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Plague_Gun|Plague Gun]] - This tutorial was created for RimWorld 1.0 but updated for 1.4. While the exact content is obsolete as you can now accomplish the same result with purely vanilla XML, it is still useful as a crash course for end-to-end mod creation and is here until newer tutorials can replace it.&lt;br /&gt;
&lt;br /&gt;
===Uploading to Steam Workshop===&lt;br /&gt;
* You can upload your mod to Steam Workshop by enabling Development Mode from your game Options and then using the Upload option under the Advanced button in the vanilla mod manager.&lt;br /&gt;
* Note that in order to upload to Steam Workshop, you must own the game on Steam Workshop. Owning RimWorld on GOG or Epic will not work.&lt;br /&gt;
* Your Preview.png should be a 640x360 or 1280x720 PNG and '''must''' be under 1MB. If it is too large, then your upload will be rejected with &amp;lt;code&amp;gt;Error : Limit Exceeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you get a &amp;lt;code&amp;gt;OnItemSubmitted Fail&amp;lt;/code&amp;gt; error, make sure you close any programs that are targeting items in your mods folder. This can also mean that Steam Workshop is having some technical issues at the moment. If it keeps occurring, then the only thing to do is to wait a few hours for it to clear up.&lt;br /&gt;
* Steam mod descriptions don't use markdown, they use a variant of BBCode. Please check out the [https://steamcommunity.com/comment/Guide/formattinghelp Steam text formatting guide].&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All of the above tutorials have been cleaned up and reviewed by the #mod-development team on the [https://discord.gg/rimworld RimWorld Discord] in cooperation with RimWorld Wiki staff editors. Please let us know before creating, adding, or making any major edits to the vetted tutorials and guides section!&lt;br /&gt;
&lt;br /&gt;
==Outdated / Under Review==&lt;br /&gt;
&lt;br /&gt;
The following tutorials are either out of date or in need of a rewrite. The information in them might be useful but may not be up to standard; please be aware of any potential inaccuracies until they can be addressed.&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/First Steps|First Steps and Some Links]]&lt;br /&gt;
* [[Modding Tutorials/Essence| Essence of Modding]]&lt;br /&gt;
* [[Modding Troubleshooting Tips and Guides]]&lt;br /&gt;
* [[Modding Tutorials/Sounds|Adding and Testing Sounds]]&lt;br /&gt;
* [[Modding Tutorials/Assets|Decompiling Texture/Sound Assets]]&lt;br /&gt;
* [[Modding Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
* [[Modding_Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding_Tutorials/Modifying defs|Modifying Defs]]&lt;br /&gt;
* [[Modding_Tutorials/Troubleshooting|Troubleshooting mods]]&lt;br /&gt;
* [[Modding Tutorials/Rituals]]&lt;br /&gt;
&lt;br /&gt;
===XML tutorials===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/XML file structure|XML File Structure]]&lt;br /&gt;
* [[Modding Tutorials/XML Defs|Introduction to XML Defs]]&lt;br /&gt;
** [[Modding Tutorials/Compatibility with defs|XML Def Compatibility]]&lt;br /&gt;
** [[Modding Tutorials/ThingDef|ThingDef explained]]&lt;br /&gt;
** [[Modding Tutorials/Weapons Guns|Weapons_Guns.xml explained]]. Slightly dated.&lt;br /&gt;
&lt;br /&gt;
===C# tutorials===&lt;br /&gt;
* [[Modding_Tutorials/Hello World|Hello World]]&lt;br /&gt;
* [[Modding_Tutorials/Writing custom code|Writing Custom Code]]&lt;br /&gt;
* [[Modding Tutorials/Linking XML and C#|Linking XML and C#]]&lt;br /&gt;
* [[Modding_Tutorials/Harmony|Alter Code at Runtime with Harmony]] - this is a best practice for modifying game code, replacing C# code injection to reduce Mod Conflicts&lt;br /&gt;
* [[Modding_Tutorials/Modifying classes|Adding fields and methods to classes]]&lt;br /&gt;
* [[Modding Tutorials/ModSettings|Mod settings]] - Add settings to your mod&lt;br /&gt;
* [[Modding Tutorials/DefModExtension|Def mod extensions]] - Add (custom) fields to Defs&lt;br /&gt;
* [[Modding Tutorials/Custom Comp Classes|Custom Comp Classes]] - A quick overview of what types of Comps there are, and what they're suited for.&lt;br /&gt;
* [[Modding_Tutorials/ThingComp|ThingComp]] - Learn all there is to know about ThingComps.&lt;br /&gt;
* [[Modding Tutorials/GameComponent|Components]] - GameComponents, WorldComponents, and MapComponents&lt;br /&gt;
* [[Modding_Tutorials/Def classes|Introduction to Def Classes]]&lt;br /&gt;
* [[Modding_Tutorials/Compatibility_with_DLLs|Using Harmony to optionally patch other mods for the sake of compatibility]]&lt;br /&gt;
* [[Modding Tutorials/TweakValue|TweakValues]] - Change values on the fly (handy for quick iteration!)&lt;br /&gt;
* [[Modding Tutorials/ExposeData|ExposeData]] - Save stuff&lt;br /&gt;
* [[Modding Tutorials/BigAssListOfUsefulClasses|The big ass list of useful classes]] - A non-exhaustive list of classes you'll use most&lt;br /&gt;
* [[Modding Tutorials/GrammarResolver|Grammar Resolver]] - PAWN_objective, PAWN_possessive? Find out what it all means here.&lt;br /&gt;
* [https://github.com/Mehni/ExampleJob/wiki ExampleJob] - Mehni's top to bottom breakdown of Jobs.&lt;br /&gt;
* [[Modding_Tutorials/ConfigErrors|Config Errors]] - Provide configuration issues to the user on startup.&lt;br /&gt;
* [[Modding Tutorials/DebugActions|Debug Actions]] - Call methods from the debug menu&lt;br /&gt;
* [https://www.arp242.net/rimworld-mod-linux.html Getting started with RimWorld modding on Linux]&lt;br /&gt;
&lt;br /&gt;
===Art Tutorials===&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/artstyle Artstyle] - Officially unofficial guide to RimWorld's Artstyle&lt;br /&gt;
* Ekksu's animal texture guides: [https://imgur.com/a/how-to-make-rimworld-sprites-its-basically-x-with-y-edition-wS3Pt 1] [https://imgur.com/a/how-to-make-rimworld-sprites-theres-nothing-that-looks-like-this-animal-edition-xdDzg 2]&lt;br /&gt;
* [https://steamcommunity.com/sharedfiles/filedetails/?id=1114369188 ChickenPlucker's guide to creating apparel]&lt;br /&gt;
* [https://github.com/seraphile/rimshare/wiki/Colouring-in-Images Seraphile's guide to masks]&lt;br /&gt;
&lt;br /&gt;
===Under Construction===&lt;br /&gt;
&lt;br /&gt;
These are currently unfinished and need to be cleaned up or removed&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Quests]]&lt;br /&gt;
* [[Modding Tutorials/Troubleshooting/Finding Exceptions]]&lt;br /&gt;
&lt;br /&gt;
===Dangerously Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[RimWorld 1.3: XML Mod Creation]]&lt;br /&gt;
* [[Modding Tutorials/Assembly Modding Example|Assembly Modding]]&lt;br /&gt;
* [[Modding Tutorials/Xenotype template]] originally by Ryflamer&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Smelter]]&lt;br /&gt;
* [[Modding Tutorials/Items]]&lt;br /&gt;
* [[Modding Tutorials/Furniture]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [https://github.com/roxxploxx/RimWorldModGuide/wiki Roxxploxx's set of modding tutorials]&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/ RimWorld Modding Resources - A hub for guides, modders, practical tips]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=173675</id>
		<title>Modding Tutorials</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=173675"/>
		<updated>2026-01-05T03:30:58Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Removing Ekksu's guide as it's now a dead link.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Mods_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the hub page for tutorials, guides, and reference materials for creating mods for RimWorld. If you are looking for instructions on how to use RimWorld, please check out the general [[Modding]] hub.&lt;br /&gt;
&lt;br /&gt;
As RimWorld does not have a formal modding API, nearly all of the information here has been gathered and maintained by the modding community.&lt;br /&gt;
&lt;br /&gt;
'''NEW: [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]]''' - A work-in-progress list of changes datamined by the modding community in the current unstable version of RimWorld 1.6. '''THERE MAY BE ODYSSEY DLC SPOILERS, YOU HAVE BEEN WARNED.'''&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
==About RimWorld==&lt;br /&gt;
RimWorld is a multi-platform game written on Unity 2022.3.35. However, the Unity Editor is not used for creating mods unless you are creating new shaders or building optional asset bundles.&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Recommended_software|Recommended Software]] - Editors and other useful software for mod development&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]] - Explore the basic folder structure of a mod&lt;br /&gt;
** [[Modding_Tutorials/About.xml|About.xml]] - About.xml identifies and describes your mod to RimWorld so that it can be loaded properly&lt;br /&gt;
&lt;br /&gt;
===Game Systems Guides===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Defs|Defs]] - XML Definitions are used to define and configure content in a way that does not require compiling code&lt;br /&gt;
** [[Modding_Tutorials/MayRequire|MayRequire]] - MayRequire and MayRequireAnyOf are used to conditionally load Defs and list entries based on whether a DLC or other mod is loaded&lt;br /&gt;
* [[Modding_Tutorials/Localization|Localization]] - Define text strings used for translations and word lists used in name and text generation&lt;br /&gt;
* [[Modding_Tutorials/PatchOperations|PatchOperations]] - PatchOperations are used to modify XML Defs without overwriting them completely&lt;br /&gt;
* [[Modding_Tutorials/Sounds|Sounds]] - (Needs Rewriting) Adding sound files for mods&lt;br /&gt;
* [[Modding_Tutorials/Textures|Textures]] - How to create and add textures to mods&lt;br /&gt;
* [[Modding Tutorials/Plant Rendering|Plant Rendering]] - An explanation of how plant textures are rendered&lt;br /&gt;
* [[Modding_Tutorials/Research_Projects|Research Projects]] - How to create and use research projects.&lt;br /&gt;
&lt;br /&gt;
===XML Tutorials===&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step tutorials for creating basic content mods.&lt;br /&gt;
&lt;br /&gt;
Basic Tutorials:&lt;br /&gt;
* [[Modding_Tutorials/Basic_Melee_Weapon|Basic Melee Weapon]] - How to create a basic melee weapon with a texture mask&lt;br /&gt;
* [[Modding_Tutorials/Basic_Ranged_Weapon|Basic Ranged Weapon]] - How to create a basic ranged weapon with custom sound effects&lt;br /&gt;
* [[Modding_Tutorials/Basic_Plant|Basic Plant]] - How to create a custom plant with both a cultivated and wild variant&lt;br /&gt;
* Custom Animal (Upcoming)&lt;br /&gt;
* Simple Building (Upcoming)&lt;br /&gt;
* Custom Workbench (Upcoming)&lt;br /&gt;
* Custom Drug (Upcoming)&lt;br /&gt;
&lt;br /&gt;
Advanced Tutorials:&lt;br /&gt;
* Custom Faction (Upcoming)&lt;br /&gt;
* Custom Culture (Upcoming)&lt;br /&gt;
* Custom Trader Type (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===C# Guides===&lt;br /&gt;
&lt;br /&gt;
C# is used to create and define custom game behaviors &lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Decompiling source code|Decompiling Source Code]] - How to set up and use a decompiler to read vanilla game code&lt;br /&gt;
* [[Modding_Tutorials/Setting up a solution|Setting up a Solution]] - How to set up a solution for compiling a custom mod assembly&lt;br /&gt;
* [[Modding_Tutorials/Application_Startup|Application Startup]] - Describes the application startup process and the order in which game data is loaded&lt;br /&gt;
* Custom Consumable (Upcoming)&lt;br /&gt;
* Custom Overlays (Upcoming)&lt;br /&gt;
* [[Modding_Tutorials/Code_FloatMenuOptionProvider|FloatMenuOptionProvider]] - How to use &amp;lt;code&amp;gt;FloatMenuOptionProvider&amp;lt;/code&amp;gt; to add right click context menu options to arbitrary targets.&lt;br /&gt;
&lt;br /&gt;
===Updates and Migrations===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.5_Mod_Updates|RimWorld 1.5 Mod Updates]] - (WARNING: Anomaly Spoilers) Community notes for updating mods from 1.4 to 1.5.&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]] - (WARNING: Odyssey Spoilers) Community notes for updating mods from 1.5 to 1.6.&lt;br /&gt;
&lt;br /&gt;
===Testing and Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Testing mods|Testing Mods]] - Tips and tricks for testing mod content&lt;br /&gt;
&lt;br /&gt;
===Slightly Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Plague_Gun|Plague Gun]] - This tutorial was created for RimWorld 1.0 but updated for 1.4. While the exact content is obsolete as you can now accomplish the same result with purely vanilla XML, it is still useful as a crash course for end-to-end mod creation and is here until newer tutorials can replace it.&lt;br /&gt;
&lt;br /&gt;
===Uploading to Steam Workshop===&lt;br /&gt;
* You can upload your mod to Steam Workshop by enabling Development Mode from your game Options and then using the Upload option under the Advanced button in the vanilla mod manager.&lt;br /&gt;
* Note that in order to upload to Steam Workshop, you must own the game on Steam Workshop. Owning RimWorld on GOG or Epic will not work.&lt;br /&gt;
* Your Preview.png should be a 640x360 or 1280x720 PNG and '''must''' be under 1MB. If it is too large, then your upload will be rejected with &amp;lt;code&amp;gt;Error : Limit Exceeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you get a &amp;lt;code&amp;gt;OnItemSubmitted Fail&amp;lt;/code&amp;gt; error, make sure you close any programs that are targeting items in your mods folder. This can also mean that Steam Workshop is having some technical issues at the moment. If it keeps occurring, then the only thing to do is to wait a few hours for it to clear up.&lt;br /&gt;
* Steam mod descriptions don't use markdown, they use a variant of BBCode. Please check out the [https://steamcommunity.com/comment/Guide/formattinghelp Steam text formatting guide].&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All of the above tutorials have been cleaned up and reviewed by the #mod-development team on the [https://discord.gg/rimworld RimWorld Discord] in cooperation with RimWorld Wiki staff editors. Please let us know before creating, adding, or making any major edits to the vetted tutorials and guides section!&lt;br /&gt;
&lt;br /&gt;
==Outdated / Under Review==&lt;br /&gt;
&lt;br /&gt;
The following tutorials are either out of date or in need of a rewrite. The information in them might be useful but may not be up to standard; please be aware of any potential inaccuracies until they can be addressed.&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/First Steps|First Steps and Some Links]]&lt;br /&gt;
* [[Modding Tutorials/Essence| Essence of Modding]]&lt;br /&gt;
* [[Modding Troubleshooting Tips and Guides]]&lt;br /&gt;
* [[Modding Tutorials/Sounds|Adding and Testing Sounds]]&lt;br /&gt;
* [[Modding Tutorials/Assets|Decompiling Texture/Sound Assets]]&lt;br /&gt;
* [[Modding Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
* [[Modding_Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding_Tutorials/Modifying defs|Modifying Defs]]&lt;br /&gt;
* [[Modding_Tutorials/Troubleshooting|Troubleshooting mods]]&lt;br /&gt;
* [[Modding Tutorials/Rituals]]&lt;br /&gt;
&lt;br /&gt;
===XML tutorials===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/XML file structure|XML File Structure]]&lt;br /&gt;
* [[Modding Tutorials/XML Defs|Introduction to XML Defs]]&lt;br /&gt;
** [[Modding Tutorials/Compatibility with defs|XML Def Compatibility]]&lt;br /&gt;
** [[Modding Tutorials/ThingDef|ThingDef explained]]&lt;br /&gt;
** [[Modding Tutorials/Weapons Guns|Weapons_Guns.xml explained]]. Slightly dated.&lt;br /&gt;
&lt;br /&gt;
===C# tutorials===&lt;br /&gt;
* [[Modding_Tutorials/Hello World|Hello World]]&lt;br /&gt;
* [[Modding_Tutorials/Writing custom code|Writing Custom Code]]&lt;br /&gt;
* [[Modding Tutorials/Linking XML and C#|Linking XML and C#]]&lt;br /&gt;
* [[Modding_Tutorials/Harmony|Alter Code at Runtime with Harmony]] - this is a best practice for modifying game code, replacing C# code injection to reduce Mod Conflicts&lt;br /&gt;
* [[Modding_Tutorials/Modifying classes|Adding fields and methods to classes]]&lt;br /&gt;
* [[Modding Tutorials/ModSettings|Mod settings]] - Add settings to your mod&lt;br /&gt;
* [[Modding Tutorials/DefModExtension|Def mod extensions]] - Add (custom) fields to Defs&lt;br /&gt;
* [[Modding Tutorials/Custom Comp Classes|Custom Comp Classes]] - A quick overview of what types of Comps there are, and what they're suited for.&lt;br /&gt;
* [[Modding_Tutorials/ThingComp|ThingComp]] - Learn all there is to know about ThingComps.&lt;br /&gt;
* [[Modding Tutorials/GameComponent|Components]] - GameComponents, WorldComponents, and MapComponents&lt;br /&gt;
* [[Modding_Tutorials/Def classes|Introduction to Def Classes]]&lt;br /&gt;
* [[Modding_Tutorials/Compatibility_with_DLLs|Using Harmony to optionally patch other mods for the sake of compatibility]]&lt;br /&gt;
* [[Modding Tutorials/TweakValue|TweakValues]] - Change values on the fly (handy for quick iteration!)&lt;br /&gt;
* [[Modding Tutorials/ExposeData|ExposeData]] - Save stuff&lt;br /&gt;
* [[Modding Tutorials/BigAssListOfUsefulClasses|The big ass list of useful classes]] - A non-exhaustive list of classes you'll use most&lt;br /&gt;
* [[Modding Tutorials/GrammarResolver|Grammar Resolver]] - PAWN_objective, PAWN_possessive? Find out what it all means here.&lt;br /&gt;
* [https://github.com/Mehni/ExampleJob/wiki ExampleJob] - Mehni's top to bottom breakdown of Jobs.&lt;br /&gt;
* [[Modding_Tutorials/ConfigErrors|Config Errors]] - Provide configuration issues to the user on startup.&lt;br /&gt;
* [[Modding Tutorials/DebugActions|Debug Actions]] - Call methods from the debug menu&lt;br /&gt;
* [https://www.arp242.net/rimworld-mod-linux.html Getting started with RimWorld modding on Linux]&lt;br /&gt;
&lt;br /&gt;
===Art Tutorials===&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/artstyle Artstyle] - Officially unofficial guide to RimWorld's Artstyle&lt;br /&gt;
* [https://steamcommunity.com/sharedfiles/filedetails/?id=1114369188 ChickenPlucker's guide to creating apparel]&lt;br /&gt;
* [https://github.com/seraphile/rimshare/wiki/Colouring-in-Images Seraphile's guide to masks]&lt;br /&gt;
&lt;br /&gt;
===Under Construction===&lt;br /&gt;
&lt;br /&gt;
These are currently unfinished and need to be cleaned up or removed&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Quests]]&lt;br /&gt;
* [[Modding Tutorials/Troubleshooting/Finding Exceptions]]&lt;br /&gt;
&lt;br /&gt;
===Dangerously Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[RimWorld 1.3: XML Mod Creation]]&lt;br /&gt;
* [[Modding Tutorials/Assembly Modding Example|Assembly Modding]]&lt;br /&gt;
* [[Modding Tutorials/Xenotype template]] originally by Ryflamer&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Smelter]]&lt;br /&gt;
* [[Modding Tutorials/Items]]&lt;br /&gt;
* [[Modding Tutorials/Furniture]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [https://github.com/roxxploxx/RimWorldModGuide/wiki Roxxploxx's set of modding tutorials]&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/ RimWorld Modding Resources - A hub for guides, modders, practical tips]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=173674</id>
		<title>Modding Tutorials</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=173674"/>
		<updated>2026-01-05T03:25:04Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Removed Plague Gun from the dangerously outdated section as it's actually in the approved list.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Mods_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the hub page for tutorials, guides, and reference materials for creating mods for RimWorld. If you are looking for instructions on how to use RimWorld, please check out the general [[Modding]] hub.&lt;br /&gt;
&lt;br /&gt;
As RimWorld does not have a formal modding API, nearly all of the information here has been gathered and maintained by the modding community.&lt;br /&gt;
&lt;br /&gt;
'''NEW: [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]]''' - A work-in-progress list of changes datamined by the modding community in the current unstable version of RimWorld 1.6. '''THERE MAY BE ODYSSEY DLC SPOILERS, YOU HAVE BEEN WARNED.'''&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
==About RimWorld==&lt;br /&gt;
RimWorld is a multi-platform game written on Unity 2022.3.35. However, the Unity Editor is not used for creating mods unless you are creating new shaders or building optional asset bundles.&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Recommended_software|Recommended Software]] - Editors and other useful software for mod development&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]] - Explore the basic folder structure of a mod&lt;br /&gt;
** [[Modding_Tutorials/About.xml|About.xml]] - About.xml identifies and describes your mod to RimWorld so that it can be loaded properly&lt;br /&gt;
&lt;br /&gt;
===Game Systems Guides===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Defs|Defs]] - XML Definitions are used to define and configure content in a way that does not require compiling code&lt;br /&gt;
** [[Modding_Tutorials/MayRequire|MayRequire]] - MayRequire and MayRequireAnyOf are used to conditionally load Defs and list entries based on whether a DLC or other mod is loaded&lt;br /&gt;
* [[Modding_Tutorials/Localization|Localization]] - Define text strings used for translations and word lists used in name and text generation&lt;br /&gt;
* [[Modding_Tutorials/PatchOperations|PatchOperations]] - PatchOperations are used to modify XML Defs without overwriting them completely&lt;br /&gt;
* [[Modding_Tutorials/Sounds|Sounds]] - (Needs Rewriting) Adding sound files for mods&lt;br /&gt;
* [[Modding_Tutorials/Textures|Textures]] - How to create and add textures to mods&lt;br /&gt;
* [[Modding Tutorials/Plant Rendering|Plant Rendering]] - An explanation of how plant textures are rendered&lt;br /&gt;
* [[Modding_Tutorials/Research_Projects|Research Projects]] - How to create and use research projects.&lt;br /&gt;
&lt;br /&gt;
===XML Tutorials===&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step tutorials for creating basic content mods.&lt;br /&gt;
&lt;br /&gt;
Basic Tutorials:&lt;br /&gt;
* [[Modding_Tutorials/Basic_Melee_Weapon|Basic Melee Weapon]] - How to create a basic melee weapon with a texture mask&lt;br /&gt;
* [[Modding_Tutorials/Basic_Ranged_Weapon|Basic Ranged Weapon]] - How to create a basic ranged weapon with custom sound effects&lt;br /&gt;
* [[Modding_Tutorials/Basic_Plant|Basic Plant]] - How to create a custom plant with both a cultivated and wild variant&lt;br /&gt;
* Custom Animal (Upcoming)&lt;br /&gt;
* Simple Building (Upcoming)&lt;br /&gt;
* Custom Workbench (Upcoming)&lt;br /&gt;
* Custom Drug (Upcoming)&lt;br /&gt;
&lt;br /&gt;
Advanced Tutorials:&lt;br /&gt;
* Custom Faction (Upcoming)&lt;br /&gt;
* Custom Culture (Upcoming)&lt;br /&gt;
* Custom Trader Type (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===C# Guides===&lt;br /&gt;
&lt;br /&gt;
C# is used to create and define custom game behaviors &lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Decompiling source code|Decompiling Source Code]] - How to set up and use a decompiler to read vanilla game code&lt;br /&gt;
* [[Modding_Tutorials/Setting up a solution|Setting up a Solution]] - How to set up a solution for compiling a custom mod assembly&lt;br /&gt;
* [[Modding_Tutorials/Application_Startup|Application Startup]] - Describes the application startup process and the order in which game data is loaded&lt;br /&gt;
* Custom Consumable (Upcoming)&lt;br /&gt;
* Custom Overlays (Upcoming)&lt;br /&gt;
* [[Modding_Tutorials/Code_FloatMenuOptionProvider|FloatMenuOptionProvider]] - How to use &amp;lt;code&amp;gt;FloatMenuOptionProvider&amp;lt;/code&amp;gt; to add right click context menu options to arbitrary targets.&lt;br /&gt;
&lt;br /&gt;
===Updates and Migrations===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.5_Mod_Updates|RimWorld 1.5 Mod Updates]] - (WARNING: Anomaly Spoilers) Community notes for updating mods from 1.4 to 1.5.&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]] - (WARNING: Odyssey Spoilers) Community notes for updating mods from 1.5 to 1.6.&lt;br /&gt;
&lt;br /&gt;
===Testing and Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Testing mods|Testing Mods]] - Tips and tricks for testing mod content&lt;br /&gt;
&lt;br /&gt;
===Slightly Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Plague_Gun|Plague Gun]] - This tutorial was created for RimWorld 1.0 but updated for 1.4. While the exact content is obsolete as you can now accomplish the same result with purely vanilla XML, it is still useful as a crash course for end-to-end mod creation and is here until newer tutorials can replace it.&lt;br /&gt;
&lt;br /&gt;
===Uploading to Steam Workshop===&lt;br /&gt;
* You can upload your mod to Steam Workshop by enabling Development Mode from your game Options and then using the Upload option under the Advanced button in the vanilla mod manager.&lt;br /&gt;
* Note that in order to upload to Steam Workshop, you must own the game on Steam Workshop. Owning RimWorld on GOG or Epic will not work.&lt;br /&gt;
* Your Preview.png should be a 640x360 or 1280x720 PNG and '''must''' be under 1MB. If it is too large, then your upload will be rejected with &amp;lt;code&amp;gt;Error : Limit Exceeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you get a &amp;lt;code&amp;gt;OnItemSubmitted Fail&amp;lt;/code&amp;gt; error, make sure you close any programs that are targeting items in your mods folder. This can also mean that Steam Workshop is having some technical issues at the moment. If it keeps occurring, then the only thing to do is to wait a few hours for it to clear up.&lt;br /&gt;
* Steam mod descriptions don't use markdown, they use a variant of BBCode. Please check out the [https://steamcommunity.com/comment/Guide/formattinghelp Steam text formatting guide].&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All of the above tutorials have been cleaned up and reviewed by the #mod-development team on the [https://discord.gg/rimworld RimWorld Discord] in cooperation with RimWorld Wiki staff editors. Please let us know before creating, adding, or making any major edits to the vetted tutorials and guides section!&lt;br /&gt;
&lt;br /&gt;
==Outdated / Under Review==&lt;br /&gt;
&lt;br /&gt;
The following tutorials are either out of date or in need of a rewrite. The information in them might be useful but may not be up to standard; please be aware of any potential inaccuracies until they can be addressed.&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/First Steps|First Steps and Some Links]]&lt;br /&gt;
* [[Modding Tutorials/Essence| Essence of Modding]]&lt;br /&gt;
* [[Modding Troubleshooting Tips and Guides]]&lt;br /&gt;
* [[Modding Tutorials/Sounds|Adding and Testing Sounds]]&lt;br /&gt;
* [[Modding Tutorials/Assets|Decompiling Texture/Sound Assets]]&lt;br /&gt;
* [[Modding Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
* [[Modding_Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding_Tutorials/Modifying defs|Modifying Defs]]&lt;br /&gt;
* [[Modding_Tutorials/Troubleshooting|Troubleshooting mods]]&lt;br /&gt;
* [[Modding Tutorials/Rituals]]&lt;br /&gt;
&lt;br /&gt;
===XML tutorials===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/XML file structure|XML File Structure]]&lt;br /&gt;
* [[Modding Tutorials/XML Defs|Introduction to XML Defs]]&lt;br /&gt;
** [[Modding Tutorials/Compatibility with defs|XML Def Compatibility]]&lt;br /&gt;
** [[Modding Tutorials/ThingDef|ThingDef explained]]&lt;br /&gt;
** [[Modding Tutorials/Weapons Guns|Weapons_Guns.xml explained]]. Slightly dated.&lt;br /&gt;
&lt;br /&gt;
===C# tutorials===&lt;br /&gt;
* [[Modding_Tutorials/Hello World|Hello World]]&lt;br /&gt;
* [[Modding_Tutorials/Writing custom code|Writing Custom Code]]&lt;br /&gt;
* [[Modding Tutorials/Linking XML and C#|Linking XML and C#]]&lt;br /&gt;
* [[Modding_Tutorials/Harmony|Alter Code at Runtime with Harmony]] - this is a best practice for modifying game code, replacing C# code injection to reduce Mod Conflicts&lt;br /&gt;
* [[Modding_Tutorials/Modifying classes|Adding fields and methods to classes]]&lt;br /&gt;
* [[Modding Tutorials/ModSettings|Mod settings]] - Add settings to your mod&lt;br /&gt;
* [[Modding Tutorials/DefModExtension|Def mod extensions]] - Add (custom) fields to Defs&lt;br /&gt;
* [[Modding Tutorials/Custom Comp Classes|Custom Comp Classes]] - A quick overview of what types of Comps there are, and what they're suited for.&lt;br /&gt;
* [[Modding_Tutorials/ThingComp|ThingComp]] - Learn all there is to know about ThingComps.&lt;br /&gt;
* [[Modding Tutorials/GameComponent|Components]] - GameComponents, WorldComponents, and MapComponents&lt;br /&gt;
* [[Modding_Tutorials/Def classes|Introduction to Def Classes]]&lt;br /&gt;
* [[Modding_Tutorials/Compatibility_with_DLLs|Using Harmony to optionally patch other mods for the sake of compatibility]]&lt;br /&gt;
* [[Modding Tutorials/TweakValue|TweakValues]] - Change values on the fly (handy for quick iteration!)&lt;br /&gt;
* [[Modding Tutorials/ExposeData|ExposeData]] - Save stuff&lt;br /&gt;
* [[Modding Tutorials/BigAssListOfUsefulClasses|The big ass list of useful classes]] - A non-exhaustive list of classes you'll use most&lt;br /&gt;
* [[Modding Tutorials/GrammarResolver|Grammar Resolver]] - PAWN_objective, PAWN_possessive? Find out what it all means here.&lt;br /&gt;
* [https://github.com/Mehni/ExampleJob/wiki ExampleJob] - Mehni's top to bottom breakdown of Jobs.&lt;br /&gt;
* [[Modding_Tutorials/ConfigErrors|Config Errors]] - Provide configuration issues to the user on startup.&lt;br /&gt;
* [[Modding Tutorials/DebugActions|Debug Actions]] - Call methods from the debug menu&lt;br /&gt;
* [https://www.arp242.net/rimworld-mod-linux.html Getting started with RimWorld modding on Linux]&lt;br /&gt;
&lt;br /&gt;
===Art Tutorials===&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/artstyle Artstyle] - Officially unofficial guide to RimWorld's Artstyle&lt;br /&gt;
* [https://www.reddit.com/r/RimWorld/comments/5tn1pi/rimworldstyle_sprite_tutorials/ Ekksu's guide to creating RimWorld animals]&lt;br /&gt;
* [https://steamcommunity.com/sharedfiles/filedetails/?id=1114369188 ChickenPlucker's guide to creating apparel]&lt;br /&gt;
* [https://github.com/seraphile/rimshare/wiki/Colouring-in-Images Seraphile's guide to masks]&lt;br /&gt;
&lt;br /&gt;
===Under Construction===&lt;br /&gt;
&lt;br /&gt;
These are currently unfinished and need to be cleaned up or removed&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Quests]]&lt;br /&gt;
* [[Modding Tutorials/Troubleshooting/Finding Exceptions]]&lt;br /&gt;
&lt;br /&gt;
===Dangerously Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[RimWorld 1.3: XML Mod Creation]]&lt;br /&gt;
* [[Modding Tutorials/Assembly Modding Example|Assembly Modding]]&lt;br /&gt;
* [[Modding Tutorials/Xenotype template]] originally by Ryflamer&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Smelter]]&lt;br /&gt;
* [[Modding Tutorials/Items]]&lt;br /&gt;
* [[Modding Tutorials/Furniture]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [https://github.com/roxxploxx/RimWorldModGuide/wiki Roxxploxx's set of modding tutorials]&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/ RimWorld Modding Resources - A hub for guides, modders, practical tips]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Plague_Gun&amp;diff=173673</id>
		<title>Modding Tutorials/Plague Gun</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Plague_Gun&amp;diff=173673"/>
		<updated>2026-01-05T03:21:57Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Plague Gun}}&lt;br /&gt;
&lt;br /&gt;
{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
This is a tutorial for taking an item [[mod]] from conception all the way to completion, touching on most systems involved in RimWorld modding and explaining each step.&lt;br /&gt;
&lt;br /&gt;
'''Editor Note:''' This tutorial is somewhat obsolete as custom C# code is no longer necessary to apply additional hediffs to the target of a ranged attack, however it has been kept here as it still serves as a useful end-to-end tutorial on how to set up a custom code assembly for a RimWorld mod. This particular version was first written for RimWorld v1.1, but has been updated and should still work in v1.6, if you run into any issues please let us know in in the #mod-development channel of the [https://discord.gg/UTaMDWc RimWorld Discord].&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will be using most of the tools available to a Rimworld [[Modding|modder]] to create a custom weapon, known as the Plague Gun.&lt;br /&gt;
&lt;br /&gt;
This weapon will, when its shots hit a living target, have a chance to apply the [[Plague]] hediff (&amp;quot;health difference&amp;quot;) to that target.&lt;br /&gt;
&lt;br /&gt;
To do this, we will create XML ThingDefs for the gun and projectile, create a C# assembly which determines what happens when the projectile hits a target, and link that behavior back to the XML.&lt;br /&gt;
&lt;br /&gt;
This tutorial will assume a basic familiarity with XML and C# syntax. It should be simple enough to follow if you're only a beginner. &lt;br /&gt;
&lt;br /&gt;
If you have no XML or C# experience, there are good tutorials for XML [https://www.w3schools.com/xml/ here] and C# [https://www.learncs.org/ here].&lt;br /&gt;
&lt;br /&gt;
=== The Completed Mod ===&lt;br /&gt;
For a working example, check out [https://github.com/dninemfive/PlagueGun this GitHub repo].&lt;br /&gt;
&lt;br /&gt;
== Required Items ==&lt;br /&gt;
&lt;br /&gt;
Make sure to have the following installed, at least one per row:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [https://code.visualstudio.com/ VSCode] || A text editor that allows you to edit XML files and use &amp;quot;Find in Files&amp;quot; for referencing.&lt;br /&gt;
|-&lt;br /&gt;
| [https://visualstudio.microsoft.com/vs/community/ Visual Studio Community] || Use this or any other C# compiler to turn scripts into .dll files that RimWorld can use.&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/icsharpcode/ILSpy/releases ILSpy]|| This is for referencing the game's decompiled C# scripts.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more detailed recommendations, see [[Modding Tutorials/Recommended software|here]].&lt;br /&gt;
&lt;br /&gt;
== XML Stage ==&lt;br /&gt;
&lt;br /&gt;
In this stage we will set up the mod and create XML files which add our things to the database.&lt;br /&gt;
&lt;br /&gt;
# Locate your RimWorld folder.&lt;br /&gt;
#* On Steam, you can find it by right-clicking the game in your games list &amp;gt; Properties &amp;gt; Local Files &amp;gt; Browse Local Files...&lt;br /&gt;
#** By default, it will be located at &amp;lt;code&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\RimWorld&amp;lt;/code&amp;gt; if you bought it through Steam on Windows.&lt;br /&gt;
#* If you bought the DRM-free version, it will be located wherever you unzipped it.&lt;br /&gt;
#* On GOG, you can find it by right-clicking the game in your games list &amp;gt; Manage Installation &amp;gt; Show Folder&lt;br /&gt;
#** By default it will be located at &amp;lt;code&amp;gt;C:\Program Files (x86)\GOG Galaxy\Games\RimWorld&amp;lt;/code&amp;gt; if you bought it through GOG on Windows.&lt;br /&gt;
# Create a &amp;lt;code&amp;gt;Mods&amp;lt;/code&amp;gt; folder (if it doesn't already exist).&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;lt;/small&amp;gt;&lt;br /&gt;
#* Go into the Mods folder.&lt;br /&gt;
#* Make a new folder with our mod's title: '''PlagueGun'''&lt;br /&gt;
# Inside '''PlagueGun''', make an '''About''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;lt;/small&amp;gt;&lt;br /&gt;
# Inside the '''About''' folder, make a new text file and rename it About.xml.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;gt;About.xml&amp;lt;/small&amp;gt;&lt;br /&gt;
#* You will need a good text editor to make a proper XML file -- see [[#Required Items|required items]]. I always make a .txt file first and change it to .xml. If you can't rename your file's type, make sure you have filetypes visible in your operating system's file view settings.&lt;br /&gt;
#* [[About.xml]] is the file that shows your mod in the mod list inside the RimWorld game. It is also used when creating a Workshop upload for Steam.&lt;br /&gt;
#* At the top of an XML file, always include this for RimWorld. It basically just gives the game some info about how to read the file. &amp;lt;source lang = &amp;quot;xml&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;/source&amp;gt; ''Note: the'' version '' tag should always be &amp;quot;1.0&amp;quot;. It has no relation with the current RimWorld version.''&lt;br /&gt;
#* Then add the MetaData tags for the Workshop and in-game Mod list.&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;ModMetaData&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Test Mod - Plague Gun&amp;lt;/name&amp;gt; &amp;lt;!-- The name of your mod in the mod list --&amp;gt;&lt;br /&gt;
  &amp;lt;author&amp;gt;YourNameHere&amp;lt;/author&amp;gt;&lt;br /&gt;
  &amp;lt;packageId&amp;gt;YourNameHere.PlagueGun&amp;lt;/packageId&amp;gt; &amp;lt;!-- a unique identifier for your mod. Must contain only a-z and periods, no spaces. --&amp;gt;&lt;br /&gt;
  &amp;lt;supportedVersions&amp;gt; &amp;lt;!-- the version(s) your mod supports --&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1.1&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/supportedVersions&amp;gt;&lt;br /&gt;
  &amp;lt;description&amp;gt;This mod adds a plague gun, a weapon that has a chance to give your enemies the plague.\n\nFor version 1.1.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/ModMetaData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* Save the file.&lt;br /&gt;
# Add a Preview.png or Preview.jpeg to your '''About''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;gt;Preview.png&amp;lt;/small&amp;gt;&lt;br /&gt;
#* This lets users see what your mod looks like in the RimWorld mod list or on the Steam Workshop.&lt;br /&gt;
#* The conventional dimensions to fit the preview image on Steam are 640x360. The image must be smaller than 1mb. &lt;br /&gt;
#* Example: [[File:Preview.png]]&lt;br /&gt;
# Make a '''Defs''' folder in your Mod's directory.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;lt;/small&amp;gt;&lt;br /&gt;
#* RimWorld will read your XML files in any subdirectory of '''Defs'''. You can name your directories however you like under that folder. Defs&amp;gt;StrangeNewAlienGuns&amp;gt;MyGuns.xml will work. For the purposes of this tutorial, however, we will use the RimWorld standard structure.&lt;br /&gt;
#* What are Defs? Main article: [[Modding Tutorials/XML Defs|Defs]]&lt;br /&gt;
#** RimWorld uses things called Defs (short for &amp;quot;definitions&amp;quot;) like blueprints for in-game objects. Instead of using hidden C# code, RimWorld will look up an XML Def and copy it to the game world. This makes things easier for us, the modders. Everything from characters, animals, floors, damages, buildings, and even diseases in RimWorld use Defs. We're going to make Defs for our Plague Gun and Plague Bullet.&lt;br /&gt;
# Make a new '''ThingDefs''' folder in your '''Defs''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;gt;ThingDefs&amp;lt;/small&amp;gt;&lt;br /&gt;
# Make a new text file in your '''ThingDefs''' folder, and change it to RangedWeapon_PlagueGun.xml.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;gt;ThingDefs&amp;gt;RangedWeapon_PlagueGun.xml&amp;lt;/small&amp;gt;&lt;br /&gt;
#* This file will contain the blueprints (ThingDefs) for our new gun and bullets.&lt;br /&gt;
#* Next we will fill out our XML file by copying an existing revolver's ThingDef and a revolver bullet ThingDef.&lt;br /&gt;
#* In RimWorld, it is often best to use the XML attribute &amp;lt;code&amp;gt;ParentName=&amp;quot;BaseBullet&amp;quot;&amp;lt;/code&amp;gt; when making a bullet, because it will copy XML code from a pre-existing BaseBullet ThingDef, which can save us time and key taps. Main article: [[Modding Tutorials/XML file structure#Inheritance|Inheritance]]&lt;br /&gt;
# First, add our favourite line to the top.&amp;lt;source lang = &amp;quot;xml&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
# Add the &amp;lt;code&amp;gt;&amp;lt;Defs&amp;gt;&amp;lt;/code&amp;gt; opening and closing tags to the XML to hold our new code.&amp;lt;source lang = &amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Use your text editor. Use its &amp;quot;Find in Files&amp;quot; function to reference and copy Bullet_Revolver to your XML file.&lt;br /&gt;
#* Find in Files is one of my most-used functions. In Notepad++, if you press CTRL+SHIFT+F, you can go to the Find in Files screen. From there, you can enter a phrase to search for, and then you can enter the file path to search through. This makes it wildly easier to search for examples in RimWorld's Core. RimWorld holds copies of all of its weapons, items, buildings, etc. inside the Mods/Core directory.&lt;br /&gt;
#* So, start by using Find in Files... and find this: &amp;lt;code&amp;gt;defName&amp;gt;Bullet_Revolver&amp;lt;/code&amp;gt;&lt;br /&gt;
#* When you find Bullet_Revolver, copy from its beginning &amp;lt;code&amp;gt;&amp;lt;ThingDef&amp;gt;&amp;lt;/code&amp;gt; all the way until its closing &amp;lt;code&amp;gt;&amp;lt;/ThingDef&amp;gt;&amp;lt;/code&amp;gt; tag into your XML File.&lt;br /&gt;
# Use your text editor's &amp;quot;Find in Files&amp;quot; function to reference and copy Gun_Revolver to your XML file.&lt;br /&gt;
#* Typically, Gun_Revolver is right below Bullet_Revolver in XML, so hopefully this will be easy to find and copy.&lt;br /&gt;
#* Again, copy the ThingDef block to your new XML file.&lt;br /&gt;
# Change the defName, labels, and other stats of Bullet_Revolver and Revolver in your XML file to make them unique.&lt;br /&gt;
#* '''A word on defNames:''' &amp;lt;code&amp;gt;defName&amp;lt;/code&amp;gt;s are how the game references defs anywhere they're used in XML, since they're unique. When telling your plague gun to fire plague bullets, for instance, set its &amp;lt;code&amp;gt;defaultProjectile&amp;lt;/code&amp;gt; to your projectile's defName, like so:&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;defaultProjectile&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defaultProjectile&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''TIP:''' Use prefixes to avoid conflicting with other mods. RimWorld will overwrite any def with &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt;, for instance, if it finds another with the same defName. If two modders use different prefixes, however, e.g. &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;VGP_Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;ROM_Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt;, no conflict will occur, and both mods can co-exist. This tutorial uses TST_ for its example prefix. Main article: [[Modding_Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
#* By contrast, labels, descriptions, and other non-defName tags can generally be non-unique without a risk of conflicts, except perhaps confusion for the end user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''If all you were interested in is making a gun mod, you are done.'''&amp;lt;/big&amp;gt; You'll of course want to edit values like the damage it does, and [[Modding_Tutorials/Testing_mods|test your mod]]. You'll also want to change the &amp;lt;code&amp;gt;texturePath&amp;lt;/code&amp;gt; to your unique art, and whatever else.&lt;br /&gt;
&lt;br /&gt;
=== Completed Example ===&lt;br /&gt;
&lt;br /&gt;
''Note'': The example is up-to-date for [[Version|1.3]] and will likely be outdated in the future. The above steps should always be relevant.&lt;br /&gt;
&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;BaseBullet&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;defName&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defName&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;plague bullet&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;graphicData&amp;gt;&lt;br /&gt;
      &amp;lt;texPath&amp;gt;Things/Projectile/Bullet_Small&amp;lt;/texPath&amp;gt;&lt;br /&gt;
      &amp;lt;graphicClass&amp;gt;Graphic_Single&amp;lt;/graphicClass&amp;gt;&lt;br /&gt;
    &amp;lt;/graphicData&amp;gt;&lt;br /&gt;
    &amp;lt;projectile&amp;gt;&lt;br /&gt;
      &amp;lt;damageDef&amp;gt;Bullet&amp;lt;/damageDef&amp;gt;&lt;br /&gt;
      &amp;lt;damageAmountBase&amp;gt;12&amp;lt;/damageAmountBase&amp;gt;&lt;br /&gt;
      &amp;lt;stoppingPower&amp;gt;1&amp;lt;/stoppingPower&amp;gt;&lt;br /&gt;
      &amp;lt;speed&amp;gt;55&amp;lt;/speed&amp;gt;&lt;br /&gt;
    &amp;lt;/projectile&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;BaseHumanMakeableGun&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;defName&amp;gt;TST_Gun_PlagueGun&amp;lt;/defName&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;plague gun&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;A curious weapon notable for its horrible health effects.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;graphicData&amp;gt;&lt;br /&gt;
      &amp;lt;texPath&amp;gt;Things/Item/Equipment/WeaponRanged/Revolver&amp;lt;/texPath&amp;gt;&lt;br /&gt;
      &amp;lt;graphicClass&amp;gt;Graphic_Single&amp;lt;/graphicClass&amp;gt;&lt;br /&gt;
    &amp;lt;/graphicData&amp;gt;&lt;br /&gt;
    &amp;lt;uiIconScale&amp;gt;1.4&amp;lt;/uiIconScale&amp;gt;&lt;br /&gt;
    &amp;lt;soundInteract&amp;gt;Interact_Revolver&amp;lt;/soundInteract&amp;gt;&lt;br /&gt;
    &amp;lt;thingSetMakerTags&amp;gt;&amp;lt;li&amp;gt;RewardStandardQualitySuper&amp;lt;/li&amp;gt;&amp;lt;/thingSetMakerTags&amp;gt;&lt;br /&gt;
    &amp;lt;statBases&amp;gt;&lt;br /&gt;
      &amp;lt;WorkToMake&amp;gt;4000&amp;lt;/WorkToMake&amp;gt;&lt;br /&gt;
      &amp;lt;Mass&amp;gt;1.4&amp;lt;/Mass&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyTouch&amp;gt;0.80&amp;lt;/AccuracyTouch&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyShort&amp;gt;0.75&amp;lt;/AccuracyShort&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyMedium&amp;gt;0.45&amp;lt;/AccuracyMedium&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyLong&amp;gt;0.35&amp;lt;/AccuracyLong&amp;gt;&lt;br /&gt;
      &amp;lt;RangedWeapon_Cooldown&amp;gt;1.6&amp;lt;/RangedWeapon_Cooldown&amp;gt;&lt;br /&gt;
    &amp;lt;/statBases&amp;gt;&lt;br /&gt;
    &amp;lt;weaponTags&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;SimpleGun&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Revolver&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/weaponTags&amp;gt;&lt;br /&gt;
    &amp;lt;weaponClasses&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;RangedLight&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/weaponClasses&amp;gt;&lt;br /&gt;
    &amp;lt;costList&amp;gt;&lt;br /&gt;
      &amp;lt;Steel&amp;gt;30&amp;lt;/Steel&amp;gt;&lt;br /&gt;
      &amp;lt;ComponentIndustrial&amp;gt;2&amp;lt;/ComponentIndustrial&amp;gt;&lt;br /&gt;
    &amp;lt;/costList&amp;gt;&lt;br /&gt;
    &amp;lt;recipeMaker&amp;gt;&lt;br /&gt;
      &amp;lt;skillRequirements&amp;gt;&lt;br /&gt;
        &amp;lt;Crafting&amp;gt;3&amp;lt;/Crafting&amp;gt;&lt;br /&gt;
      &amp;lt;/skillRequirements&amp;gt;&lt;br /&gt;
    &amp;lt;/recipeMaker&amp;gt;&lt;br /&gt;
    &amp;lt;verbs&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;verbClass&amp;gt;Verb_Shoot&amp;lt;/verbClass&amp;gt;&lt;br /&gt;
        &amp;lt;hasStandardCommand&amp;gt;true&amp;lt;/hasStandardCommand&amp;gt;&lt;br /&gt;
        &amp;lt;defaultProjectile&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defaultProjectile&amp;gt;&lt;br /&gt;
        &amp;lt;warmupTime&amp;gt;0.3&amp;lt;/warmupTime&amp;gt;&lt;br /&gt;
        &amp;lt;range&amp;gt;25.9&amp;lt;/range&amp;gt;&lt;br /&gt;
        &amp;lt;soundCast&amp;gt;Shot_Revolver&amp;lt;/soundCast&amp;gt;&lt;br /&gt;
        &amp;lt;soundCastTail&amp;gt;GunTail_Light&amp;lt;/soundCastTail&amp;gt;&lt;br /&gt;
        &amp;lt;muzzleFlashScale&amp;gt;9&amp;lt;/muzzleFlashScale&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/verbs&amp;gt;&lt;br /&gt;
    &amp;lt;tools&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;label&amp;gt;grip&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;capacities&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Blunt&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;/capacities&amp;gt;&lt;br /&gt;
        &amp;lt;power&amp;gt;9&amp;lt;/power&amp;gt;&lt;br /&gt;
        &amp;lt;cooldownTime&amp;gt;2&amp;lt;/cooldownTime&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;label&amp;gt;barrel&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;capacities&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Blunt&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Poke&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;/capacities&amp;gt;&lt;br /&gt;
        &amp;lt;power&amp;gt;9&amp;lt;/power&amp;gt;&lt;br /&gt;
        &amp;lt;cooldownTime&amp;gt;2&amp;lt;/cooldownTime&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/tools&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C# Workspace Setup ==&lt;br /&gt;
{{Main|Modding Tutorials/Setting up a solution}}&lt;br /&gt;
&lt;br /&gt;
Next, we will set up a workspace to write C# code, which is a little bit more involved than just using a text editor.&lt;br /&gt;
&lt;br /&gt;
# Open your compiler of choice for C#.&lt;br /&gt;
#* This tutorial will assume you're using Visual Studio Community Edition, a free Windows-based compiler for C# code.&lt;br /&gt;
# Make a new Visual C# Class Library .NET Framework project. Name it PlagueGun. Make its directory RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Source&lt;br /&gt;
#* File → New → Project → Class Library (.NET Framework).&lt;br /&gt;
#* Don't get this confused with &amp;quot;Class Library (.NET Standard)&amp;quot; or &amp;quot;Class Library (.NET Core)&amp;quot;!&lt;br /&gt;
# Go into the project properties. &lt;br /&gt;
#* Project → PlagueGun Properties.&lt;br /&gt;
# In that window, change the Target Framework version to .NET Framework 4.7.2&lt;br /&gt;
#* Forgetting to do this will cause lots of errors.&lt;br /&gt;
#* Select Yes when it asks you if you're sure to change the framework.&lt;br /&gt;
# While still in Properties, go to the '''Build''' tab.&lt;br /&gt;
# Change the output path to be RimWorld\Mods\PlagueGun\Assemblies&lt;br /&gt;
#* All .dll files will go into this directory when we &amp;quot;build&amp;quot; our code library.&lt;br /&gt;
# In Solution Explorer. Go into Properties and edit AssemblyInfo.cs. Change the name of your assembly and assembly file version number as you like.&lt;br /&gt;
#* This doesn't have to all be the same as your namespace, but it doesn't hurt to be consistent.&lt;br /&gt;
# In the main option bar at the top of the visual studio (File, Edit, View...), click Project, and click Add Reference.&lt;br /&gt;
# Click Browse at the bottom right corner of the window and go to RimWorld\RimWorldWin64_Data\Managed&lt;br /&gt;
# Add references to Assembly-CSharp.dll, UnityEngine.dll, and UnityEngine.CoreModule.dll.&lt;br /&gt;
#* In 1.1 the Unity DLLs were split up and are no longer all contained in the same module.&lt;br /&gt;
#* For our purposes we only need UnityEngine.CoreModule.dll, as it contains some code we will use later.&lt;br /&gt;
#* In general, it's also a good idea to add UnityEngine.dll, which allows Visual Studio to tell you which modules you're missing if you get related errors.&lt;br /&gt;
# In the Solution Explorer (typically on the right side of the application), look at the references drop down list.&lt;br /&gt;
# Select Assembly-CSharp. Check the Properties section (usually under Solution Explorer). Make sure the properties section has Copy Local set to FALSE.&lt;br /&gt;
# Do this (Copy Local to FALSE) for UnityEngine and UnityEngine.CoreModule as well.&lt;br /&gt;
#* By doing this, we prevent the project from causing one million hash conflicts by copying the entire game's code twice!&lt;br /&gt;
&lt;br /&gt;
Now the workspace setup is complete and we can add C# code to RimWorld.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Exact folder names might differ between installs. The naming scheme differs slightly between the DRM-free and Steam version of the mod.&lt;br /&gt;
&lt;br /&gt;
== C# Coding ==&lt;br /&gt;
&lt;br /&gt;
Now let's start writing the code we'll need to add custom behavior to our projectiles.&lt;br /&gt;
&lt;br /&gt;
=== Getting Started ===&lt;br /&gt;
# Open Class1.cs in the sidebar, usually on the right in Visual Studio.&lt;br /&gt;
# Right-click and rename the .cs file to your liking.&lt;br /&gt;
# Add these lines to the top this file (and every .cs file you make from now on for modding RimWorld).&amp;lt;source lang =&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
using Verse;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* These tell the code you're working with RimWorld. Without these, our code will not be able to understand references to RimWorld code.&lt;br /&gt;
# Add a namespace line. By default, this is your project name. Take note - you will need this to connect to XML later.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' ''Using a prefix on the namespace is not required, but it's good for consistency and in the rare case they may overlap - such as when multiple people follow the same tutorial to learn how to mod.''&lt;br /&gt;
&lt;br /&gt;
=== Connecting XML and C#, Part 1 ===&lt;br /&gt;
{{Main|Modding Tutorials/DefModExtension}}&lt;br /&gt;
&lt;br /&gt;
# First, let's add a way to read XML data into your assembly.&lt;br /&gt;
# Rename public class Class1 to ModExtension_PlagueBullet and make it inherit DefModExtension. As a reminder, inheritance looks like this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public class ModExtension_PlagueBullet : DefModExtension&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Renaming things in an IDE like Visual Studio is best done by pressing F2 or right-clicking the item/name. Doing it like that will change all occurrences of that thing, so everything that references your namespace or Class1 will now use the new name.&lt;br /&gt;
# Add the following fields in ModExtension_PlagueBullet:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public float addHediffChance = 0.05f;&lt;br /&gt;
public HediffDef hediffToAdd;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* Here, we're giving the field addHediffChance a default value, which means it doesn't need to be set explicitly in XML.&lt;br /&gt;
#* '''Note:''' Standard modding practice is to give fields exposed to XML camelCase names, for consistency with vanilla XML.&lt;br /&gt;
# Now let's add the XML which connects to this ModExtension. In your TST_Bullet_PlagueGun def, add the following lines: &amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;modExtensions&amp;gt;&lt;br /&gt;
    &amp;lt;li Class=&amp;quot;TST_PlagueGun.ModExtension_PlagueBullet&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;addHediffChance&amp;gt;0.05&amp;lt;/addHediffChance&amp;gt;&lt;br /&gt;
        &amp;lt;hediffToAdd&amp;gt;Plague&amp;lt;/hediffToAdd&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/modExtensions&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Note the XML tags match the names of the fields in the C# class. This allows the XML to provide data to the program.  When the mod is loaded, the XML will be read, and used to fill in the corresponding fields.&lt;br /&gt;
#* Additionally, take care to note you can set the value of addHediffChance to any valid floating point number and it will be reflected in-game. The value given in C# is only the default value if unset.&lt;br /&gt;
&lt;br /&gt;
=== Writing the Projectile === &lt;br /&gt;
# Let's make the actual projectile. For this tutorial, we're going to make a new projectile that checks for impact and adds a Hediff (health differential - poison, toxins, implants, anything).&lt;br /&gt;
# First, create a new .cs file by right-clicking the PlagueGun part of the Solution Explorer and selecting Add &amp;gt; New Item.&lt;br /&gt;
#* '''Note:''' in C#, you can have multiple class definitions in a single file. We're just making a new file for organizational purposes.&lt;br /&gt;
# Make your new class inherit the Bullet class (a child of the Projectile class), so the game will treat your new projectile like a bullet and not throw (fun) errors. &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# First, let's connect our new projectile to the relevant ModExtension: &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public ModExtension_PlagueBullet Props =&amp;gt; def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* This line is a Property, basically a method which doesn't take any arguments, and can generally speaking be treated as a variable. See [https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties this article] for more details.&lt;br /&gt;
# Now, let's start the actual core code of this mod. Let's begin by overriding the Impact method on the base Bullet class, like so: &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* The &amp;lt;code&amp;gt;override&amp;lt;/code&amp;gt; keyword tells the compiler that we're replacing the functionality of the &amp;lt;code&amp;gt;Impact&amp;lt;/code&amp;gt; method from the &amp;lt;code&amp;gt;Bullet&amp;lt;/code&amp;gt; class we're inheriting from.&lt;br /&gt;
# First, let's call the base version of this method so we don't need to rewrite all the logic about damaging a pawn - we only care about adding the hediff ''after'' damage occurs. &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
base.Impact(hitThing, blockedByShield);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Next, we check to make sure the ModExtension was properly loaded, that we hit something, and that what we hit was a [[Pawns|Pawn]].&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Null checking is a very important skill, especially for Rimworld modding. If you ever get a &amp;lt;code&amp;gt;NullReferenceException&amp;lt;/code&amp;gt;, check to make sure you're correctly handling null values.&lt;br /&gt;
#* Also, note that we initialize a &amp;lt;code&amp;gt;Pawn&amp;lt;/code&amp;gt; version of the &amp;lt;code&amp;gt;hitThing&amp;lt;/code&amp;gt; while checking its type; we'll use this later. This statement ''also'' null-checks this new variable, in case you were wondering.&lt;br /&gt;
# Now that we know we hit a pawn, we generate a random number to see whether to apply the hediff.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
float rand = Rand.Value;&lt;br /&gt;
if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* &amp;lt;code&amp;gt;Rand&amp;lt;/code&amp;gt; is the base game's randomness generation class. &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt; grabs the next random number between 0 and 1 and updates the class.&lt;br /&gt;
# If a hediff is applied, we want to alert the player, so we create a message in the top-left of the screen.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
	this.launcher.Label, hitPawn.Label&lt;br /&gt;
), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Before adding the hediff, we need to check if the pawn already has it, so we get the hediff from the pawn, if it exists.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' The &amp;lt;code&amp;gt;?.&amp;lt;/code&amp;gt; is called the [https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators#null-conditional-operators--and- null conditional operator]. It's basically an in-line null check; if the hit pawn's health tracker (&amp;lt;code&amp;gt;health&amp;lt;/code&amp;gt;) or hediff set (&amp;lt;code&amp;gt;hediffSet&amp;lt;/code&amp;gt;) are null it sets &amp;lt;code&amp;gt;plagueOnPawn&amp;lt;/code&amp;gt; to null instead of throwing an error.&lt;br /&gt;
# Now we finally add the hediff. If the pawn already has the plague we just increase its severity; otherwise, we create and add a new hediff with a random severity.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
if (plagueOnPawn != null)&lt;br /&gt;
{&lt;br /&gt;
	plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
	hediff.Severity = randomSeverity;&lt;br /&gt;
	hitPawn.health.AddHediff(hediff);&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Whew. ====&lt;br /&gt;
Let's take a break and recap for a second. If you've followed the projectile section so far, this is the code you should have in your new .cs file:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using Verse;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
    public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
    {&lt;br /&gt;
        public ModExtension_PlagueBullet Props =&amp;gt; base.def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
        {&lt;br /&gt;
            base.Impact(hitThing, blockedByShield);&lt;br /&gt;
            if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
            {&lt;br /&gt;
                float rand = Rand.Value;&lt;br /&gt;
                if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
                {&lt;br /&gt;
                    Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
                        this.launcher.Label, hitPawn.Label&lt;br /&gt;
                    ), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
                    Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
                    float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
                    if (plagueOnPawn != null)&lt;br /&gt;
                    {&lt;br /&gt;
                        plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
                    }&lt;br /&gt;
                    else&lt;br /&gt;
                    {&lt;br /&gt;
                        Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
                        hediff.Severity = randomSeverity;&lt;br /&gt;
                        hitPawn.health.AddHediff(hediff);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Don't worry, we're almost finished. In fact, if you compile right now the gun ''will'' work - there just won't be any feedback if the shooter misses. This might be desirable, but let's add some feedback anyway.&lt;br /&gt;
&lt;br /&gt;
Well, that's a little bit of a lie. You'd also need to add the &amp;lt;code&amp;gt;&amp;lt;thingClass&amp;gt;&amp;lt;/code&amp;gt; node to the XML, given below.&lt;br /&gt;
&lt;br /&gt;
We want to add an &amp;lt;code&amp;gt;else&amp;lt;/code&amp;gt; block to our &amp;lt;code&amp;gt;if (rand &amp;lt;= Props.addHediffChance))&amp;lt;/code&amp;gt; statement. This is where keeping track of curly braces comes in; Visual Studio should draw vertical lines between the correct curlies. Add this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
    MoteMaker.ThrowText(hitThing.PositionHeld.ToVector3(), hitThing.MapHeld, &amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance), 12f);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* This throws a mote (particle effect, essentially), with text stating that the plague was not applied, at the target's position.&lt;br /&gt;
* Fun fact: the &amp;lt;code&amp;gt;.ToVector3()&amp;lt;/code&amp;gt; call is the entire reason we needed to reference UnityEngine and UnityEngine.CoreModule.&lt;br /&gt;
&lt;br /&gt;
=== Connecting XML and C#, Part 2 ===&lt;br /&gt;
Finally, we need to make sure our projectile's def tells the game to use our new Projectile_PlagueBullet class instead of Bullet.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;thingClass&amp;gt;TST_PlagueGun.Projectile_PlagueBullet&amp;lt;/thingClass&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We're done! Your final Projectile_PlagueBullet class should look like this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using Verse;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
    public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
    {&lt;br /&gt;
        public ModExtension_PlagueBullet Props =&amp;gt; base.def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
        {&lt;br /&gt;
            base.Impact(hitThing, blockedByShield);&lt;br /&gt;
            if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
            {&lt;br /&gt;
                float rand = Rand.Value;&lt;br /&gt;
                if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
                {&lt;br /&gt;
                    Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
                        this.launcher.Label, hitPawn.Label&lt;br /&gt;
                    ), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
                    Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
                    float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
                    if (plagueOnPawn != null)&lt;br /&gt;
                    {&lt;br /&gt;
                        plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
                    }&lt;br /&gt;
                    else&lt;br /&gt;
                    {&lt;br /&gt;
                        Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
                        hediff.Severity = randomSeverity;&lt;br /&gt;
                        hitPawn.health.AddHediff(hediff);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                else&lt;br /&gt;
                {&lt;br /&gt;
                    MoteMaker.ThrowText(hitThing.PositionHeld.ToVector3(), hitThing.MapHeld, &amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance), 12f);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Just compile and test your work; the plague will be properly applied and everything.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Code you write on your own should not look like this - for one thing, it should be well-commented so that others (even if it's just you in the future) know exactly what you're trying to do and how you're doing it. The code [https://github.com/dninemfive/PlagueGun/blob/master/PlagueGun/Projectile_PlagueBullet.cs in the repo] is probably over-commented and designed for a general audience but I recommend reviewing it.&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
...well, almost. If you did test the gun just now, you'll have seen that the text was all distorted, using special characters which looked like the normal ones instead of text you expected. This is because of the use of &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; on keys which do not have translations in the language database. We just need to add those, and we'll be all set!&lt;br /&gt;
&lt;br /&gt;
# First, create a bunch of folders, starting in the root of your mod folder:&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;Languages&amp;gt;English&amp;gt;Keyed&amp;lt;/small&amp;gt;&lt;br /&gt;
# Next, create a new file called PlagueGun_Keys.xml, with our favorite header.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# This will be really quick. Add the opening and closing &amp;lt;code&amp;gt;&amp;lt;LanguageData&amp;gt;&amp;lt;/code&amp;gt; tags:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# And, finally, add translations for the two keys used in the projectile class.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TST_PlagueBullet_FailureMote&amp;gt;Failure: {0} chance&amp;lt;/TST_PlagueBullet_FailureMote&amp;gt;&lt;br /&gt;
&amp;lt;TST_PlagueBullet_SuccessMessage&amp;gt;{0} infected {1} with the plague!&amp;lt;/TST_PlagueBullet_SuccessMessage&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* The &amp;lt;code&amp;gt;{0}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;{1}&amp;lt;/code&amp;gt; in these keys will be replaced with the first and second arguments, respectively, of the &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; calls. For reference:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
// successful hit message&lt;br /&gt;
&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(this.launcher.Label, hitPawn.Label)&lt;br /&gt;
// unsuccessful hit mote&lt;br /&gt;
&amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* If you give &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; more arguments, you can use &amp;lt;code&amp;gt;{2}&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{3}&amp;lt;/code&amp;gt;, &amp;amp;c.&lt;br /&gt;
#* Note that, since you only passed one argument to the failure message, &amp;lt;code&amp;gt;{1}&amp;lt;/code&amp;gt; would not be replaced with anything.&lt;br /&gt;
# Your PlagueGun_Keys.xml file should look like this:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;LanguageData&amp;gt;&lt;br /&gt;
	&amp;lt;TST_PlagueBullet_FailureMote&amp;gt;Failure: {0} chance&amp;lt;/TST_PlagueBullet_FailureMote&amp;gt;&lt;br /&gt;
	&amp;lt;TST_PlagueBullet_SuccessMessage&amp;gt;{0} infected {1} with the plague!&amp;lt;/TST_PlagueBullet_SuccessMessage&amp;gt;&lt;br /&gt;
&amp;lt;/LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Next Steps ==&lt;br /&gt;
This concludes this tutorial. Congratulations on making it this far; you now have a solid understanding of XML and C# modding, and of connecting these two. There's a lot more to learn, especially on the C# end, so make sure to practice. If you have any questions don't hesitate to hit up the [https://discord.gg/UTaMDWc Discord]#mod-development or the [https://ludeon.com/forums/index.php?board=14.0 forums] for help.&lt;br /&gt;
&lt;br /&gt;
As for this mod, you might want to add custom textures or sounds. For your next, you might want to try messing around with [[Modding Tutorials/Harmony|Harmony]] or see other [[Modding Tutorials|tutorials]] for inspiration.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Modding Tutorials/Setting up a solution|Setting up a solution]]&lt;br /&gt;
* [[Modding Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding Tutorials/Harmony|Harmony]]&lt;br /&gt;
* [[Modding_Tutorials/Mod_folder_structure#The_Languages_folder|Language support]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
* This tutorial is a rewrite of the original by Jecrell (see also original forum {{LudeonThread|33219}})&lt;br /&gt;
&lt;br /&gt;
[[Category: Modding tutorials]]&lt;br /&gt;
[[Category: Modding]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Plague_Gun&amp;diff=173672</id>
		<title>Modding Tutorials/Plague Gun</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Plague_Gun&amp;diff=173672"/>
		<updated>2026-01-05T03:21:23Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Added editor note.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Plague Gun}}&lt;br /&gt;
&lt;br /&gt;
This is a tutorial for taking an item [[mod]] from conception all the way to completion, touching on most systems involved in RimWorld modding and explaining each step.&lt;br /&gt;
&lt;br /&gt;
'''Editor Note:''' This tutorial is somewhat obsolete as custom C# code is no longer necessary to apply additional hediffs to the target of a ranged attack, however it has been kept here as it still serves as a useful end-to-end tutorial on how to set up a custom code assembly for a RimWorld mod. This particular version was first written for RimWorld v1.1, but has been updated and should still work in v1.6, if you run into any issues please let us know in in the #mod-development channel of the [https://discord.gg/UTaMDWc RimWorld Discord].&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will be using most of the tools available to a Rimworld [[Modding|modder]] to create a custom weapon, known as the Plague Gun.&lt;br /&gt;
&lt;br /&gt;
This weapon will, when its shots hit a living target, have a chance to apply the [[Plague]] hediff (&amp;quot;health difference&amp;quot;) to that target.&lt;br /&gt;
&lt;br /&gt;
To do this, we will create XML ThingDefs for the gun and projectile, create a C# assembly which determines what happens when the projectile hits a target, and link that behavior back to the XML.&lt;br /&gt;
&lt;br /&gt;
This tutorial will assume a basic familiarity with XML and C# syntax. It should be simple enough to follow if you're only a beginner. &lt;br /&gt;
&lt;br /&gt;
If you have no XML or C# experience, there are good tutorials for XML [https://www.w3schools.com/xml/ here] and C# [https://www.learncs.org/ here].&lt;br /&gt;
&lt;br /&gt;
=== The Completed Mod ===&lt;br /&gt;
For a working example, check out [https://github.com/dninemfive/PlagueGun this GitHub repo].&lt;br /&gt;
&lt;br /&gt;
== Required Items ==&lt;br /&gt;
&lt;br /&gt;
Make sure to have the following installed, at least one per row:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [https://code.visualstudio.com/ VSCode] || A text editor that allows you to edit XML files and use &amp;quot;Find in Files&amp;quot; for referencing.&lt;br /&gt;
|-&lt;br /&gt;
| [https://visualstudio.microsoft.com/vs/community/ Visual Studio Community] || Use this or any other C# compiler to turn scripts into .dll files that RimWorld can use.&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/icsharpcode/ILSpy/releases ILSpy]|| This is for referencing the game's decompiled C# scripts.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more detailed recommendations, see [[Modding Tutorials/Recommended software|here]].&lt;br /&gt;
&lt;br /&gt;
== XML Stage ==&lt;br /&gt;
&lt;br /&gt;
In this stage we will set up the mod and create XML files which add our things to the database.&lt;br /&gt;
&lt;br /&gt;
# Locate your RimWorld folder.&lt;br /&gt;
#* On Steam, you can find it by right-clicking the game in your games list &amp;gt; Properties &amp;gt; Local Files &amp;gt; Browse Local Files...&lt;br /&gt;
#** By default, it will be located at &amp;lt;code&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\RimWorld&amp;lt;/code&amp;gt; if you bought it through Steam on Windows.&lt;br /&gt;
#* If you bought the DRM-free version, it will be located wherever you unzipped it.&lt;br /&gt;
#* On GOG, you can find it by right-clicking the game in your games list &amp;gt; Manage Installation &amp;gt; Show Folder&lt;br /&gt;
#** By default it will be located at &amp;lt;code&amp;gt;C:\Program Files (x86)\GOG Galaxy\Games\RimWorld&amp;lt;/code&amp;gt; if you bought it through GOG on Windows.&lt;br /&gt;
# Create a &amp;lt;code&amp;gt;Mods&amp;lt;/code&amp;gt; folder (if it doesn't already exist).&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;lt;/small&amp;gt;&lt;br /&gt;
#* Go into the Mods folder.&lt;br /&gt;
#* Make a new folder with our mod's title: '''PlagueGun'''&lt;br /&gt;
# Inside '''PlagueGun''', make an '''About''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;lt;/small&amp;gt;&lt;br /&gt;
# Inside the '''About''' folder, make a new text file and rename it About.xml.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;gt;About.xml&amp;lt;/small&amp;gt;&lt;br /&gt;
#* You will need a good text editor to make a proper XML file -- see [[#Required Items|required items]]. I always make a .txt file first and change it to .xml. If you can't rename your file's type, make sure you have filetypes visible in your operating system's file view settings.&lt;br /&gt;
#* [[About.xml]] is the file that shows your mod in the mod list inside the RimWorld game. It is also used when creating a Workshop upload for Steam.&lt;br /&gt;
#* At the top of an XML file, always include this for RimWorld. It basically just gives the game some info about how to read the file. &amp;lt;source lang = &amp;quot;xml&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;/source&amp;gt; ''Note: the'' version '' tag should always be &amp;quot;1.0&amp;quot;. It has no relation with the current RimWorld version.''&lt;br /&gt;
#* Then add the MetaData tags for the Workshop and in-game Mod list.&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;ModMetaData&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Test Mod - Plague Gun&amp;lt;/name&amp;gt; &amp;lt;!-- The name of your mod in the mod list --&amp;gt;&lt;br /&gt;
  &amp;lt;author&amp;gt;YourNameHere&amp;lt;/author&amp;gt;&lt;br /&gt;
  &amp;lt;packageId&amp;gt;YourNameHere.PlagueGun&amp;lt;/packageId&amp;gt; &amp;lt;!-- a unique identifier for your mod. Must contain only a-z and periods, no spaces. --&amp;gt;&lt;br /&gt;
  &amp;lt;supportedVersions&amp;gt; &amp;lt;!-- the version(s) your mod supports --&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1.1&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/supportedVersions&amp;gt;&lt;br /&gt;
  &amp;lt;description&amp;gt;This mod adds a plague gun, a weapon that has a chance to give your enemies the plague.\n\nFor version 1.1.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/ModMetaData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* Save the file.&lt;br /&gt;
# Add a Preview.png or Preview.jpeg to your '''About''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;gt;Preview.png&amp;lt;/small&amp;gt;&lt;br /&gt;
#* This lets users see what your mod looks like in the RimWorld mod list or on the Steam Workshop.&lt;br /&gt;
#* The conventional dimensions to fit the preview image on Steam are 640x360. The image must be smaller than 1mb. &lt;br /&gt;
#* Example: [[File:Preview.png]]&lt;br /&gt;
# Make a '''Defs''' folder in your Mod's directory.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;lt;/small&amp;gt;&lt;br /&gt;
#* RimWorld will read your XML files in any subdirectory of '''Defs'''. You can name your directories however you like under that folder. Defs&amp;gt;StrangeNewAlienGuns&amp;gt;MyGuns.xml will work. For the purposes of this tutorial, however, we will use the RimWorld standard structure.&lt;br /&gt;
#* What are Defs? Main article: [[Modding Tutorials/XML Defs|Defs]]&lt;br /&gt;
#** RimWorld uses things called Defs (short for &amp;quot;definitions&amp;quot;) like blueprints for in-game objects. Instead of using hidden C# code, RimWorld will look up an XML Def and copy it to the game world. This makes things easier for us, the modders. Everything from characters, animals, floors, damages, buildings, and even diseases in RimWorld use Defs. We're going to make Defs for our Plague Gun and Plague Bullet.&lt;br /&gt;
# Make a new '''ThingDefs''' folder in your '''Defs''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;gt;ThingDefs&amp;lt;/small&amp;gt;&lt;br /&gt;
# Make a new text file in your '''ThingDefs''' folder, and change it to RangedWeapon_PlagueGun.xml.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;gt;ThingDefs&amp;gt;RangedWeapon_PlagueGun.xml&amp;lt;/small&amp;gt;&lt;br /&gt;
#* This file will contain the blueprints (ThingDefs) for our new gun and bullets.&lt;br /&gt;
#* Next we will fill out our XML file by copying an existing revolver's ThingDef and a revolver bullet ThingDef.&lt;br /&gt;
#* In RimWorld, it is often best to use the XML attribute &amp;lt;code&amp;gt;ParentName=&amp;quot;BaseBullet&amp;quot;&amp;lt;/code&amp;gt; when making a bullet, because it will copy XML code from a pre-existing BaseBullet ThingDef, which can save us time and key taps. Main article: [[Modding Tutorials/XML file structure#Inheritance|Inheritance]]&lt;br /&gt;
# First, add our favourite line to the top.&amp;lt;source lang = &amp;quot;xml&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
# Add the &amp;lt;code&amp;gt;&amp;lt;Defs&amp;gt;&amp;lt;/code&amp;gt; opening and closing tags to the XML to hold our new code.&amp;lt;source lang = &amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Use your text editor. Use its &amp;quot;Find in Files&amp;quot; function to reference and copy Bullet_Revolver to your XML file.&lt;br /&gt;
#* Find in Files is one of my most-used functions. In Notepad++, if you press CTRL+SHIFT+F, you can go to the Find in Files screen. From there, you can enter a phrase to search for, and then you can enter the file path to search through. This makes it wildly easier to search for examples in RimWorld's Core. RimWorld holds copies of all of its weapons, items, buildings, etc. inside the Mods/Core directory.&lt;br /&gt;
#* So, start by using Find in Files... and find this: &amp;lt;code&amp;gt;defName&amp;gt;Bullet_Revolver&amp;lt;/code&amp;gt;&lt;br /&gt;
#* When you find Bullet_Revolver, copy from its beginning &amp;lt;code&amp;gt;&amp;lt;ThingDef&amp;gt;&amp;lt;/code&amp;gt; all the way until its closing &amp;lt;code&amp;gt;&amp;lt;/ThingDef&amp;gt;&amp;lt;/code&amp;gt; tag into your XML File.&lt;br /&gt;
# Use your text editor's &amp;quot;Find in Files&amp;quot; function to reference and copy Gun_Revolver to your XML file.&lt;br /&gt;
#* Typically, Gun_Revolver is right below Bullet_Revolver in XML, so hopefully this will be easy to find and copy.&lt;br /&gt;
#* Again, copy the ThingDef block to your new XML file.&lt;br /&gt;
# Change the defName, labels, and other stats of Bullet_Revolver and Revolver in your XML file to make them unique.&lt;br /&gt;
#* '''A word on defNames:''' &amp;lt;code&amp;gt;defName&amp;lt;/code&amp;gt;s are how the game references defs anywhere they're used in XML, since they're unique. When telling your plague gun to fire plague bullets, for instance, set its &amp;lt;code&amp;gt;defaultProjectile&amp;lt;/code&amp;gt; to your projectile's defName, like so:&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;defaultProjectile&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defaultProjectile&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''TIP:''' Use prefixes to avoid conflicting with other mods. RimWorld will overwrite any def with &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt;, for instance, if it finds another with the same defName. If two modders use different prefixes, however, e.g. &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;VGP_Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;ROM_Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt;, no conflict will occur, and both mods can co-exist. This tutorial uses TST_ for its example prefix. Main article: [[Modding_Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
#* By contrast, labels, descriptions, and other non-defName tags can generally be non-unique without a risk of conflicts, except perhaps confusion for the end user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''If all you were interested in is making a gun mod, you are done.'''&amp;lt;/big&amp;gt; You'll of course want to edit values like the damage it does, and [[Modding_Tutorials/Testing_mods|test your mod]]. You'll also want to change the &amp;lt;code&amp;gt;texturePath&amp;lt;/code&amp;gt; to your unique art, and whatever else.&lt;br /&gt;
&lt;br /&gt;
=== Completed Example ===&lt;br /&gt;
&lt;br /&gt;
''Note'': The example is up-to-date for [[Version|1.3]] and will likely be outdated in the future. The above steps should always be relevant.&lt;br /&gt;
&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;BaseBullet&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;defName&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defName&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;plague bullet&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;graphicData&amp;gt;&lt;br /&gt;
      &amp;lt;texPath&amp;gt;Things/Projectile/Bullet_Small&amp;lt;/texPath&amp;gt;&lt;br /&gt;
      &amp;lt;graphicClass&amp;gt;Graphic_Single&amp;lt;/graphicClass&amp;gt;&lt;br /&gt;
    &amp;lt;/graphicData&amp;gt;&lt;br /&gt;
    &amp;lt;projectile&amp;gt;&lt;br /&gt;
      &amp;lt;damageDef&amp;gt;Bullet&amp;lt;/damageDef&amp;gt;&lt;br /&gt;
      &amp;lt;damageAmountBase&amp;gt;12&amp;lt;/damageAmountBase&amp;gt;&lt;br /&gt;
      &amp;lt;stoppingPower&amp;gt;1&amp;lt;/stoppingPower&amp;gt;&lt;br /&gt;
      &amp;lt;speed&amp;gt;55&amp;lt;/speed&amp;gt;&lt;br /&gt;
    &amp;lt;/projectile&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;BaseHumanMakeableGun&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;defName&amp;gt;TST_Gun_PlagueGun&amp;lt;/defName&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;plague gun&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;A curious weapon notable for its horrible health effects.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;graphicData&amp;gt;&lt;br /&gt;
      &amp;lt;texPath&amp;gt;Things/Item/Equipment/WeaponRanged/Revolver&amp;lt;/texPath&amp;gt;&lt;br /&gt;
      &amp;lt;graphicClass&amp;gt;Graphic_Single&amp;lt;/graphicClass&amp;gt;&lt;br /&gt;
    &amp;lt;/graphicData&amp;gt;&lt;br /&gt;
    &amp;lt;uiIconScale&amp;gt;1.4&amp;lt;/uiIconScale&amp;gt;&lt;br /&gt;
    &amp;lt;soundInteract&amp;gt;Interact_Revolver&amp;lt;/soundInteract&amp;gt;&lt;br /&gt;
    &amp;lt;thingSetMakerTags&amp;gt;&amp;lt;li&amp;gt;RewardStandardQualitySuper&amp;lt;/li&amp;gt;&amp;lt;/thingSetMakerTags&amp;gt;&lt;br /&gt;
    &amp;lt;statBases&amp;gt;&lt;br /&gt;
      &amp;lt;WorkToMake&amp;gt;4000&amp;lt;/WorkToMake&amp;gt;&lt;br /&gt;
      &amp;lt;Mass&amp;gt;1.4&amp;lt;/Mass&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyTouch&amp;gt;0.80&amp;lt;/AccuracyTouch&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyShort&amp;gt;0.75&amp;lt;/AccuracyShort&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyMedium&amp;gt;0.45&amp;lt;/AccuracyMedium&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyLong&amp;gt;0.35&amp;lt;/AccuracyLong&amp;gt;&lt;br /&gt;
      &amp;lt;RangedWeapon_Cooldown&amp;gt;1.6&amp;lt;/RangedWeapon_Cooldown&amp;gt;&lt;br /&gt;
    &amp;lt;/statBases&amp;gt;&lt;br /&gt;
    &amp;lt;weaponTags&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;SimpleGun&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Revolver&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/weaponTags&amp;gt;&lt;br /&gt;
    &amp;lt;weaponClasses&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;RangedLight&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/weaponClasses&amp;gt;&lt;br /&gt;
    &amp;lt;costList&amp;gt;&lt;br /&gt;
      &amp;lt;Steel&amp;gt;30&amp;lt;/Steel&amp;gt;&lt;br /&gt;
      &amp;lt;ComponentIndustrial&amp;gt;2&amp;lt;/ComponentIndustrial&amp;gt;&lt;br /&gt;
    &amp;lt;/costList&amp;gt;&lt;br /&gt;
    &amp;lt;recipeMaker&amp;gt;&lt;br /&gt;
      &amp;lt;skillRequirements&amp;gt;&lt;br /&gt;
        &amp;lt;Crafting&amp;gt;3&amp;lt;/Crafting&amp;gt;&lt;br /&gt;
      &amp;lt;/skillRequirements&amp;gt;&lt;br /&gt;
    &amp;lt;/recipeMaker&amp;gt;&lt;br /&gt;
    &amp;lt;verbs&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;verbClass&amp;gt;Verb_Shoot&amp;lt;/verbClass&amp;gt;&lt;br /&gt;
        &amp;lt;hasStandardCommand&amp;gt;true&amp;lt;/hasStandardCommand&amp;gt;&lt;br /&gt;
        &amp;lt;defaultProjectile&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defaultProjectile&amp;gt;&lt;br /&gt;
        &amp;lt;warmupTime&amp;gt;0.3&amp;lt;/warmupTime&amp;gt;&lt;br /&gt;
        &amp;lt;range&amp;gt;25.9&amp;lt;/range&amp;gt;&lt;br /&gt;
        &amp;lt;soundCast&amp;gt;Shot_Revolver&amp;lt;/soundCast&amp;gt;&lt;br /&gt;
        &amp;lt;soundCastTail&amp;gt;GunTail_Light&amp;lt;/soundCastTail&amp;gt;&lt;br /&gt;
        &amp;lt;muzzleFlashScale&amp;gt;9&amp;lt;/muzzleFlashScale&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/verbs&amp;gt;&lt;br /&gt;
    &amp;lt;tools&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;label&amp;gt;grip&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;capacities&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Blunt&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;/capacities&amp;gt;&lt;br /&gt;
        &amp;lt;power&amp;gt;9&amp;lt;/power&amp;gt;&lt;br /&gt;
        &amp;lt;cooldownTime&amp;gt;2&amp;lt;/cooldownTime&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;label&amp;gt;barrel&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;capacities&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Blunt&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Poke&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;/capacities&amp;gt;&lt;br /&gt;
        &amp;lt;power&amp;gt;9&amp;lt;/power&amp;gt;&lt;br /&gt;
        &amp;lt;cooldownTime&amp;gt;2&amp;lt;/cooldownTime&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/tools&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C# Workspace Setup ==&lt;br /&gt;
{{Main|Modding Tutorials/Setting up a solution}}&lt;br /&gt;
&lt;br /&gt;
Next, we will set up a workspace to write C# code, which is a little bit more involved than just using a text editor.&lt;br /&gt;
&lt;br /&gt;
# Open your compiler of choice for C#.&lt;br /&gt;
#* This tutorial will assume you're using Visual Studio Community Edition, a free Windows-based compiler for C# code.&lt;br /&gt;
# Make a new Visual C# Class Library .NET Framework project. Name it PlagueGun. Make its directory RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Source&lt;br /&gt;
#* File → New → Project → Class Library (.NET Framework).&lt;br /&gt;
#* Don't get this confused with &amp;quot;Class Library (.NET Standard)&amp;quot; or &amp;quot;Class Library (.NET Core)&amp;quot;!&lt;br /&gt;
# Go into the project properties. &lt;br /&gt;
#* Project → PlagueGun Properties.&lt;br /&gt;
# In that window, change the Target Framework version to .NET Framework 4.7.2&lt;br /&gt;
#* Forgetting to do this will cause lots of errors.&lt;br /&gt;
#* Select Yes when it asks you if you're sure to change the framework.&lt;br /&gt;
# While still in Properties, go to the '''Build''' tab.&lt;br /&gt;
# Change the output path to be RimWorld\Mods\PlagueGun\Assemblies&lt;br /&gt;
#* All .dll files will go into this directory when we &amp;quot;build&amp;quot; our code library.&lt;br /&gt;
# In Solution Explorer. Go into Properties and edit AssemblyInfo.cs. Change the name of your assembly and assembly file version number as you like.&lt;br /&gt;
#* This doesn't have to all be the same as your namespace, but it doesn't hurt to be consistent.&lt;br /&gt;
# In the main option bar at the top of the visual studio (File, Edit, View...), click Project, and click Add Reference.&lt;br /&gt;
# Click Browse at the bottom right corner of the window and go to RimWorld\RimWorldWin64_Data\Managed&lt;br /&gt;
# Add references to Assembly-CSharp.dll, UnityEngine.dll, and UnityEngine.CoreModule.dll.&lt;br /&gt;
#* In 1.1 the Unity DLLs were split up and are no longer all contained in the same module.&lt;br /&gt;
#* For our purposes we only need UnityEngine.CoreModule.dll, as it contains some code we will use later.&lt;br /&gt;
#* In general, it's also a good idea to add UnityEngine.dll, which allows Visual Studio to tell you which modules you're missing if you get related errors.&lt;br /&gt;
# In the Solution Explorer (typically on the right side of the application), look at the references drop down list.&lt;br /&gt;
# Select Assembly-CSharp. Check the Properties section (usually under Solution Explorer). Make sure the properties section has Copy Local set to FALSE.&lt;br /&gt;
# Do this (Copy Local to FALSE) for UnityEngine and UnityEngine.CoreModule as well.&lt;br /&gt;
#* By doing this, we prevent the project from causing one million hash conflicts by copying the entire game's code twice!&lt;br /&gt;
&lt;br /&gt;
Now the workspace setup is complete and we can add C# code to RimWorld.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Exact folder names might differ between installs. The naming scheme differs slightly between the DRM-free and Steam version of the mod.&lt;br /&gt;
&lt;br /&gt;
== C# Coding ==&lt;br /&gt;
&lt;br /&gt;
Now let's start writing the code we'll need to add custom behavior to our projectiles.&lt;br /&gt;
&lt;br /&gt;
=== Getting Started ===&lt;br /&gt;
# Open Class1.cs in the sidebar, usually on the right in Visual Studio.&lt;br /&gt;
# Right-click and rename the .cs file to your liking.&lt;br /&gt;
# Add these lines to the top this file (and every .cs file you make from now on for modding RimWorld).&amp;lt;source lang =&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
using Verse;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* These tell the code you're working with RimWorld. Without these, our code will not be able to understand references to RimWorld code.&lt;br /&gt;
# Add a namespace line. By default, this is your project name. Take note - you will need this to connect to XML later.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' ''Using a prefix on the namespace is not required, but it's good for consistency and in the rare case they may overlap - such as when multiple people follow the same tutorial to learn how to mod.''&lt;br /&gt;
&lt;br /&gt;
=== Connecting XML and C#, Part 1 ===&lt;br /&gt;
{{Main|Modding Tutorials/DefModExtension}}&lt;br /&gt;
&lt;br /&gt;
# First, let's add a way to read XML data into your assembly.&lt;br /&gt;
# Rename public class Class1 to ModExtension_PlagueBullet and make it inherit DefModExtension. As a reminder, inheritance looks like this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public class ModExtension_PlagueBullet : DefModExtension&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Renaming things in an IDE like Visual Studio is best done by pressing F2 or right-clicking the item/name. Doing it like that will change all occurrences of that thing, so everything that references your namespace or Class1 will now use the new name.&lt;br /&gt;
# Add the following fields in ModExtension_PlagueBullet:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public float addHediffChance = 0.05f;&lt;br /&gt;
public HediffDef hediffToAdd;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* Here, we're giving the field addHediffChance a default value, which means it doesn't need to be set explicitly in XML.&lt;br /&gt;
#* '''Note:''' Standard modding practice is to give fields exposed to XML camelCase names, for consistency with vanilla XML.&lt;br /&gt;
# Now let's add the XML which connects to this ModExtension. In your TST_Bullet_PlagueGun def, add the following lines: &amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;modExtensions&amp;gt;&lt;br /&gt;
    &amp;lt;li Class=&amp;quot;TST_PlagueGun.ModExtension_PlagueBullet&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;addHediffChance&amp;gt;0.05&amp;lt;/addHediffChance&amp;gt;&lt;br /&gt;
        &amp;lt;hediffToAdd&amp;gt;Plague&amp;lt;/hediffToAdd&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/modExtensions&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Note the XML tags match the names of the fields in the C# class. This allows the XML to provide data to the program.  When the mod is loaded, the XML will be read, and used to fill in the corresponding fields.&lt;br /&gt;
#* Additionally, take care to note you can set the value of addHediffChance to any valid floating point number and it will be reflected in-game. The value given in C# is only the default value if unset.&lt;br /&gt;
&lt;br /&gt;
=== Writing the Projectile === &lt;br /&gt;
# Let's make the actual projectile. For this tutorial, we're going to make a new projectile that checks for impact and adds a Hediff (health differential - poison, toxins, implants, anything).&lt;br /&gt;
# First, create a new .cs file by right-clicking the PlagueGun part of the Solution Explorer and selecting Add &amp;gt; New Item.&lt;br /&gt;
#* '''Note:''' in C#, you can have multiple class definitions in a single file. We're just making a new file for organizational purposes.&lt;br /&gt;
# Make your new class inherit the Bullet class (a child of the Projectile class), so the game will treat your new projectile like a bullet and not throw (fun) errors. &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# First, let's connect our new projectile to the relevant ModExtension: &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public ModExtension_PlagueBullet Props =&amp;gt; def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* This line is a Property, basically a method which doesn't take any arguments, and can generally speaking be treated as a variable. See [https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties this article] for more details.&lt;br /&gt;
# Now, let's start the actual core code of this mod. Let's begin by overriding the Impact method on the base Bullet class, like so: &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* The &amp;lt;code&amp;gt;override&amp;lt;/code&amp;gt; keyword tells the compiler that we're replacing the functionality of the &amp;lt;code&amp;gt;Impact&amp;lt;/code&amp;gt; method from the &amp;lt;code&amp;gt;Bullet&amp;lt;/code&amp;gt; class we're inheriting from.&lt;br /&gt;
# First, let's call the base version of this method so we don't need to rewrite all the logic about damaging a pawn - we only care about adding the hediff ''after'' damage occurs. &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
base.Impact(hitThing, blockedByShield);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Next, we check to make sure the ModExtension was properly loaded, that we hit something, and that what we hit was a [[Pawns|Pawn]].&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Null checking is a very important skill, especially for Rimworld modding. If you ever get a &amp;lt;code&amp;gt;NullReferenceException&amp;lt;/code&amp;gt;, check to make sure you're correctly handling null values.&lt;br /&gt;
#* Also, note that we initialize a &amp;lt;code&amp;gt;Pawn&amp;lt;/code&amp;gt; version of the &amp;lt;code&amp;gt;hitThing&amp;lt;/code&amp;gt; while checking its type; we'll use this later. This statement ''also'' null-checks this new variable, in case you were wondering.&lt;br /&gt;
# Now that we know we hit a pawn, we generate a random number to see whether to apply the hediff.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
float rand = Rand.Value;&lt;br /&gt;
if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* &amp;lt;code&amp;gt;Rand&amp;lt;/code&amp;gt; is the base game's randomness generation class. &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt; grabs the next random number between 0 and 1 and updates the class.&lt;br /&gt;
# If a hediff is applied, we want to alert the player, so we create a message in the top-left of the screen.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
	this.launcher.Label, hitPawn.Label&lt;br /&gt;
), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Before adding the hediff, we need to check if the pawn already has it, so we get the hediff from the pawn, if it exists.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' The &amp;lt;code&amp;gt;?.&amp;lt;/code&amp;gt; is called the [https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators#null-conditional-operators--and- null conditional operator]. It's basically an in-line null check; if the hit pawn's health tracker (&amp;lt;code&amp;gt;health&amp;lt;/code&amp;gt;) or hediff set (&amp;lt;code&amp;gt;hediffSet&amp;lt;/code&amp;gt;) are null it sets &amp;lt;code&amp;gt;plagueOnPawn&amp;lt;/code&amp;gt; to null instead of throwing an error.&lt;br /&gt;
# Now we finally add the hediff. If the pawn already has the plague we just increase its severity; otherwise, we create and add a new hediff with a random severity.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
if (plagueOnPawn != null)&lt;br /&gt;
{&lt;br /&gt;
	plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
	hediff.Severity = randomSeverity;&lt;br /&gt;
	hitPawn.health.AddHediff(hediff);&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Whew. ====&lt;br /&gt;
Let's take a break and recap for a second. If you've followed the projectile section so far, this is the code you should have in your new .cs file:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using Verse;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
    public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
    {&lt;br /&gt;
        public ModExtension_PlagueBullet Props =&amp;gt; base.def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
        {&lt;br /&gt;
            base.Impact(hitThing, blockedByShield);&lt;br /&gt;
            if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
            {&lt;br /&gt;
                float rand = Rand.Value;&lt;br /&gt;
                if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
                {&lt;br /&gt;
                    Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
                        this.launcher.Label, hitPawn.Label&lt;br /&gt;
                    ), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
                    Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
                    float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
                    if (plagueOnPawn != null)&lt;br /&gt;
                    {&lt;br /&gt;
                        plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
                    }&lt;br /&gt;
                    else&lt;br /&gt;
                    {&lt;br /&gt;
                        Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
                        hediff.Severity = randomSeverity;&lt;br /&gt;
                        hitPawn.health.AddHediff(hediff);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Don't worry, we're almost finished. In fact, if you compile right now the gun ''will'' work - there just won't be any feedback if the shooter misses. This might be desirable, but let's add some feedback anyway.&lt;br /&gt;
&lt;br /&gt;
Well, that's a little bit of a lie. You'd also need to add the &amp;lt;code&amp;gt;&amp;lt;thingClass&amp;gt;&amp;lt;/code&amp;gt; node to the XML, given below.&lt;br /&gt;
&lt;br /&gt;
We want to add an &amp;lt;code&amp;gt;else&amp;lt;/code&amp;gt; block to our &amp;lt;code&amp;gt;if (rand &amp;lt;= Props.addHediffChance))&amp;lt;/code&amp;gt; statement. This is where keeping track of curly braces comes in; Visual Studio should draw vertical lines between the correct curlies. Add this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
    MoteMaker.ThrowText(hitThing.PositionHeld.ToVector3(), hitThing.MapHeld, &amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance), 12f);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* This throws a mote (particle effect, essentially), with text stating that the plague was not applied, at the target's position.&lt;br /&gt;
* Fun fact: the &amp;lt;code&amp;gt;.ToVector3()&amp;lt;/code&amp;gt; call is the entire reason we needed to reference UnityEngine and UnityEngine.CoreModule.&lt;br /&gt;
&lt;br /&gt;
=== Connecting XML and C#, Part 2 ===&lt;br /&gt;
Finally, we need to make sure our projectile's def tells the game to use our new Projectile_PlagueBullet class instead of Bullet.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;thingClass&amp;gt;TST_PlagueGun.Projectile_PlagueBullet&amp;lt;/thingClass&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We're done! Your final Projectile_PlagueBullet class should look like this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using Verse;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
    public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
    {&lt;br /&gt;
        public ModExtension_PlagueBullet Props =&amp;gt; base.def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
        {&lt;br /&gt;
            base.Impact(hitThing, blockedByShield);&lt;br /&gt;
            if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
            {&lt;br /&gt;
                float rand = Rand.Value;&lt;br /&gt;
                if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
                {&lt;br /&gt;
                    Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
                        this.launcher.Label, hitPawn.Label&lt;br /&gt;
                    ), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
                    Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
                    float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
                    if (plagueOnPawn != null)&lt;br /&gt;
                    {&lt;br /&gt;
                        plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
                    }&lt;br /&gt;
                    else&lt;br /&gt;
                    {&lt;br /&gt;
                        Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
                        hediff.Severity = randomSeverity;&lt;br /&gt;
                        hitPawn.health.AddHediff(hediff);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                else&lt;br /&gt;
                {&lt;br /&gt;
                    MoteMaker.ThrowText(hitThing.PositionHeld.ToVector3(), hitThing.MapHeld, &amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance), 12f);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Just compile and test your work; the plague will be properly applied and everything.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Code you write on your own should not look like this - for one thing, it should be well-commented so that others (even if it's just you in the future) know exactly what you're trying to do and how you're doing it. The code [https://github.com/dninemfive/PlagueGun/blob/master/PlagueGun/Projectile_PlagueBullet.cs in the repo] is probably over-commented and designed for a general audience but I recommend reviewing it.&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
...well, almost. If you did test the gun just now, you'll have seen that the text was all distorted, using special characters which looked like the normal ones instead of text you expected. This is because of the use of &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; on keys which do not have translations in the language database. We just need to add those, and we'll be all set!&lt;br /&gt;
&lt;br /&gt;
# First, create a bunch of folders, starting in the root of your mod folder:&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;Languages&amp;gt;English&amp;gt;Keyed&amp;lt;/small&amp;gt;&lt;br /&gt;
# Next, create a new file called PlagueGun_Keys.xml, with our favorite header.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# This will be really quick. Add the opening and closing &amp;lt;code&amp;gt;&amp;lt;LanguageData&amp;gt;&amp;lt;/code&amp;gt; tags:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# And, finally, add translations for the two keys used in the projectile class.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TST_PlagueBullet_FailureMote&amp;gt;Failure: {0} chance&amp;lt;/TST_PlagueBullet_FailureMote&amp;gt;&lt;br /&gt;
&amp;lt;TST_PlagueBullet_SuccessMessage&amp;gt;{0} infected {1} with the plague!&amp;lt;/TST_PlagueBullet_SuccessMessage&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* The &amp;lt;code&amp;gt;{0}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;{1}&amp;lt;/code&amp;gt; in these keys will be replaced with the first and second arguments, respectively, of the &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; calls. For reference:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
// successful hit message&lt;br /&gt;
&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(this.launcher.Label, hitPawn.Label)&lt;br /&gt;
// unsuccessful hit mote&lt;br /&gt;
&amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* If you give &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; more arguments, you can use &amp;lt;code&amp;gt;{2}&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{3}&amp;lt;/code&amp;gt;, &amp;amp;c.&lt;br /&gt;
#* Note that, since you only passed one argument to the failure message, &amp;lt;code&amp;gt;{1}&amp;lt;/code&amp;gt; would not be replaced with anything.&lt;br /&gt;
# Your PlagueGun_Keys.xml file should look like this:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;LanguageData&amp;gt;&lt;br /&gt;
	&amp;lt;TST_PlagueBullet_FailureMote&amp;gt;Failure: {0} chance&amp;lt;/TST_PlagueBullet_FailureMote&amp;gt;&lt;br /&gt;
	&amp;lt;TST_PlagueBullet_SuccessMessage&amp;gt;{0} infected {1} with the plague!&amp;lt;/TST_PlagueBullet_SuccessMessage&amp;gt;&lt;br /&gt;
&amp;lt;/LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Next Steps ==&lt;br /&gt;
This concludes this tutorial. Congratulations on making it this far; you now have a solid understanding of XML and C# modding, and of connecting these two. There's a lot more to learn, especially on the C# end, so make sure to practice. If you have any questions don't hesitate to hit up the [https://discord.gg/UTaMDWc Discord]#mod-development or the [https://ludeon.com/forums/index.php?board=14.0 forums] for help.&lt;br /&gt;
&lt;br /&gt;
As for this mod, you might want to add custom textures or sounds. For your next, you might want to try messing around with [[Modding Tutorials/Harmony|Harmony]] or see other [[Modding Tutorials|tutorials]] for inspiration.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Modding Tutorials/Setting up a solution|Setting up a solution]]&lt;br /&gt;
* [[Modding Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding Tutorials/Harmony|Harmony]]&lt;br /&gt;
* [[Modding_Tutorials/Mod_folder_structure#The_Languages_folder|Language support]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
* This tutorial is a rewrite of the original by Jecrell (see also original forum {{LudeonThread|33219}})&lt;br /&gt;
&lt;br /&gt;
[[Category: Modding tutorials]]&lt;br /&gt;
[[Category: Modding]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/ModSettings&amp;diff=173579</id>
		<title>Modding Tutorials/ModSettings</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/ModSettings&amp;diff=173579"/>
		<updated>2026-01-01T18:43:40Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Outdated}} &lt;br /&gt;
&lt;br /&gt;
Mod settings allow you to offer customisation options to your users.&lt;br /&gt;
=Requirements=&lt;br /&gt;
* If you still haven't [[Modding Tutorials/Setting up a solution|set up a solution]], what the hell man?&lt;br /&gt;
* You need to know [[Modding Tutorials/Writing custom code|how to write custom code]], as that's the entire point of this article.&lt;br /&gt;
&lt;br /&gt;
=What you'll learn=&lt;br /&gt;
You'll learn how to write, save and use mod settings.&lt;br /&gt;
&lt;br /&gt;
=Setting up=&lt;br /&gt;
Adding mod settings requires two classes, one that inherits from Mod and one that inherits from ModSettings.&lt;br /&gt;
&lt;br /&gt;
=The code=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C#&amp;quot;&amp;gt;&lt;br /&gt;
//inspired by https://gist.github.com/erdelf/84dce0c0a1f00b5836a9d729f845298a&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using Verse;&lt;br /&gt;
using UnityEngine;&lt;br /&gt;
&lt;br /&gt;
namespace MyExampleMod&lt;br /&gt;
{&lt;br /&gt;
    public class ExampleSettings : ModSettings&lt;br /&gt;
    {&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// The three settings our mod has.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        public bool exampleBool;&lt;br /&gt;
        public float exampleFloat = 200f;&lt;br /&gt;
        public List&amp;lt;Pawn&amp;gt; exampleListOfPawns = new List&amp;lt;Pawn&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// The part that writes our settings to file. Note that saving is by ref.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        public override void ExposeData()&lt;br /&gt;
        {&lt;br /&gt;
            Scribe_Values.Look(ref exampleBool, &amp;quot;exampleBool&amp;quot;);&lt;br /&gt;
            Scribe_Values.Look(ref exampleFloat, &amp;quot;exampleFloat&amp;quot;, 200f);&lt;br /&gt;
            Scribe_Collections.Look(ref exampleListOfPawns, &amp;quot;exampleListOfPawns&amp;quot;, LookMode.Reference);&lt;br /&gt;
            base.ExposeData();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public class ExampleMod : Mod&lt;br /&gt;
    {&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// A reference to our settings.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        ExampleSettings settings;&lt;br /&gt;
&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// A mandatory constructor which resolves the reference to our settings.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        /// &amp;lt;param name=&amp;quot;content&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;
        public ExampleMod(ModContentPack content) : base(content)&lt;br /&gt;
        {&lt;br /&gt;
            this.settings = GetSettings&amp;lt;ExampleSettings&amp;gt;();&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// The (optional) GUI part to set your settings.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        /// &amp;lt;param name=&amp;quot;inRect&amp;quot;&amp;gt;A Unity Rect with the size of the settings window.&amp;lt;/param&amp;gt;&lt;br /&gt;
        public override void DoSettingsWindowContents(Rect inRect)&lt;br /&gt;
        {&lt;br /&gt;
            Listing_Standard listingStandard = new Listing_Standard();&lt;br /&gt;
            listingStandard.Begin(inRect);&lt;br /&gt;
            listingStandard.CheckboxLabeled(&amp;quot;exampleBoolExplanation&amp;quot;, ref settings.exampleBool, &amp;quot;exampleBoolToolTip&amp;quot;);&lt;br /&gt;
            listingStandard.Label(&amp;quot;exampleFloatExplanation&amp;quot;);&lt;br /&gt;
            settings.exampleFloat = listingStandard.Slider(settings.exampleFloat, 100f, 300f);&lt;br /&gt;
            listingStandard.End();&lt;br /&gt;
            base.DoSettingsWindowContents(inRect);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        /// &amp;lt;summary&amp;gt;&lt;br /&gt;
        /// Override SettingsCategory to show up in the list of settings.&lt;br /&gt;
        /// Using .Translate() is optional, but does allow for localisation.&lt;br /&gt;
        /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
        /// &amp;lt;returns&amp;gt;The (translated) mod name.&amp;lt;/returns&amp;gt;&lt;br /&gt;
        public override string SettingsCategory()&lt;br /&gt;
        {&lt;br /&gt;
            return &amp;quot;MyExampleModName&amp;quot;.Translate();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ExampleSettings==&lt;br /&gt;
===ExposeData===&lt;br /&gt;
Writes settings to disk. For more info on saving, see [[Modding Tutorials/ExposeData|ExposeData]].&lt;br /&gt;
&lt;br /&gt;
==ExampleMod==&lt;br /&gt;
Refer to the source above for practical information; snippets here are supplemental.&lt;br /&gt;
===ExampleSettings===&lt;br /&gt;
An easy reference to our settings.&lt;br /&gt;
===ExampleMod===&lt;br /&gt;
A mandatory constructor.&lt;br /&gt;
===DoSettingsWindowContent===&lt;br /&gt;
It's not mandatory to implement, but since the point of most settings is the provide customisation to the end user, it makes sense to make them available somehow.&lt;br /&gt;
====The GUI====&lt;br /&gt;
Listing_Standard is a barebones but useful class for making a GUI, and it does most of the positioning for you. Listing_Standard.Begin and Listing_Standard.End is required: every GUIGroup in Unity you start has to end. If you want more options to Listing_Standard, there's a good [https://github.com/RimWorld-CCL-Reborn/SettingsHelper/wiki SettingsHelper] available.&lt;br /&gt;
&lt;br /&gt;
The Widgets class is a powerful alternative to Listing_Standard that gives you more fine-grained control, at the cost of more effort. You'll have to set the size and position of each Rect manually. You can use [[Modding Tutorials/TweakValue|TweakValues]] to do this more easily.&lt;br /&gt;
&lt;br /&gt;
====Saving====&lt;br /&gt;
Saving (altered) settings is done automatically by closing the window. You can optionally override WriteSettings() to add additional functionality to writing settings.&lt;br /&gt;
===SettingsCategory===&lt;br /&gt;
RimWorld will only make your settings accessible if SettingsCategory returns a string that isn't null or empty.&lt;br /&gt;
&lt;br /&gt;
=Using your settings=&lt;br /&gt;
* One easy way to call settings is to make them all static and load their values with ExampleSettings.exampleBool. In certain cases, this is not practical.&lt;br /&gt;
* If you can't (or don't want to) make your settings static, you can obtain your settings through the LoadedModManager like so:&lt;br /&gt;
  LoadedModManager.GetMod&amp;lt;ExampleMod&amp;gt;().GetSettings&amp;lt;ExampleSettings&amp;gt;().exampleBool&lt;br /&gt;
* As the above is a lot of code, you can simple add a reference to your settings and resolve it once in a constructor or otherwise.&lt;br /&gt;
&lt;br /&gt;
=On the necessity of HugsLib=&lt;br /&gt;
Some people think HugsLib is a necessity for implementing mod settings. This is not true; the above is 100% supported by vanilla, since A17. HugsLib offers an alternative way of using settings.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
[https://github.com/RimWorld-CCL-Reborn/SettingsHelper/wiki SettingsHelper] - A lightweight MIT-licensed dll with various extension methods for Listing_Standard.&amp;lt;br/&amp;gt;&lt;br /&gt;
[https://github.com/UnlimitedHugs/RimworldHugsLib/wiki/Adding-mod-settings HugsLib] - HugsLib is a popular dependency that aims to ease using settings.&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=173571</id>
		<title>Modding Tutorials</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=173571"/>
		<updated>2025-12-31T16:27:47Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* About RimWorld */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Mods_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the hub page for tutorials, guides, and reference materials for creating mods for RimWorld. If you are looking for instructions on how to use RimWorld, please check out the general [[Modding]] hub.&lt;br /&gt;
&lt;br /&gt;
As RimWorld does not have a formal modding API, nearly all of the information here has been gathered and maintained by the modding community.&lt;br /&gt;
&lt;br /&gt;
'''NEW: [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]]''' - A work-in-progress list of changes datamined by the modding community in the current unstable version of RimWorld 1.6. '''THERE MAY BE ODYSSEY DLC SPOILERS, YOU HAVE BEEN WARNED.'''&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
==About RimWorld==&lt;br /&gt;
RimWorld is a multi-platform game written on Unity 2022.3.35. However, the Unity Editor is not used for creating mods unless you are creating new shaders or building optional asset bundles.&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Recommended_software|Recommended Software]] - Editors and other useful software for mod development&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]] - Explore the basic folder structure of a mod&lt;br /&gt;
** [[Modding_Tutorials/About.xml|About.xml]] - About.xml identifies and describes your mod to RimWorld so that it can be loaded properly&lt;br /&gt;
&lt;br /&gt;
===Game Systems Guides===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Defs|Defs]] - XML Definitions are used to define and configure content in a way that does not require compiling code&lt;br /&gt;
** [[Modding_Tutorials/MayRequire|MayRequire]] - MayRequire and MayRequireAnyOf are used to conditionally load Defs and list entries based on whether a DLC or other mod is loaded&lt;br /&gt;
* [[Modding_Tutorials/Localization|Localization]] - Define text strings used for translations and word lists used in name and text generation&lt;br /&gt;
* [[Modding_Tutorials/PatchOperations|PatchOperations]] - PatchOperations are used to modify XML Defs without overwriting them completely&lt;br /&gt;
* [[Modding_Tutorials/Sounds|Sounds]] - (Needs Rewriting) Adding sound files for mods&lt;br /&gt;
* [[Modding_Tutorials/Textures|Textures]] - How to create and add textures to mods&lt;br /&gt;
* [[Modding Tutorials/Plant Rendering|Plant Rendering]] - An explanation of how plant textures are rendered&lt;br /&gt;
* [[Modding_Tutorials/Research_Projects|Research Projects]] - How to create and use research projects.&lt;br /&gt;
&lt;br /&gt;
===XML Tutorials===&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step tutorials for creating basic content mods.&lt;br /&gt;
&lt;br /&gt;
Basic Tutorials:&lt;br /&gt;
* [[Modding_Tutorials/Basic_Melee_Weapon|Basic Melee Weapon]] - How to create a basic melee weapon with a texture mask&lt;br /&gt;
* [[Modding_Tutorials/Basic_Ranged_Weapon|Basic Ranged Weapon]] - How to create a basic ranged weapon with custom sound effects&lt;br /&gt;
* [[Modding_Tutorials/Basic_Plant|Basic Plant]] - How to create a custom plant with both a cultivated and wild variant&lt;br /&gt;
* Custom Animal (Upcoming)&lt;br /&gt;
* Simple Building (Upcoming)&lt;br /&gt;
* Custom Workbench (Upcoming)&lt;br /&gt;
* Custom Drug (Upcoming)&lt;br /&gt;
&lt;br /&gt;
Advanced Tutorials:&lt;br /&gt;
* Custom Faction (Upcoming)&lt;br /&gt;
* Custom Culture (Upcoming)&lt;br /&gt;
* Custom Trader Type (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===C# Guides===&lt;br /&gt;
&lt;br /&gt;
C# is used to create and define custom game behaviors &lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Decompiling source code|Decompiling Source Code]] - How to set up and use a decompiler to read vanilla game code&lt;br /&gt;
* [[Modding_Tutorials/Setting up a solution|Setting up a Solution]] - How to set up a solution for compiling a custom mod assembly&lt;br /&gt;
* [[Modding_Tutorials/Application_Startup|Application Startup]] - Describes the application startup process and the order in which game data is loaded&lt;br /&gt;
* Custom Consumable (Upcoming)&lt;br /&gt;
* Custom Overlays (Upcoming)&lt;br /&gt;
* [[Modding_Tutorials/Code_FloatMenuOptionProvider|FloatMenuOptionProvider]] - How to use &amp;lt;code&amp;gt;FloatMenuOptionProvider&amp;lt;/code&amp;gt; to add right click context menu options to arbitrary targets.&lt;br /&gt;
&lt;br /&gt;
===Updates and Migrations===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.5_Mod_Updates|RimWorld 1.5 Mod Updates]] - (WARNING: Anomaly Spoilers) Community notes for updating mods from 1.4 to 1.5.&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]] - (WARNING: Odyssey Spoilers) Community notes for updating mods from 1.5 to 1.6.&lt;br /&gt;
&lt;br /&gt;
===Testing and Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Testing mods|Testing Mods]] - Tips and tricks for testing mod content&lt;br /&gt;
&lt;br /&gt;
===Slightly Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Plague_Gun_(1.1)|Plague Gun]] - This tutorial was created for RimWorld 1.0 but updated for 1.4. While the exact content is obsolete as you can now accomplish the same result with purely vanilla XML, it is still useful as a crash course for end-to-end mod creation and is here until newer tutorials can replace it.&lt;br /&gt;
&lt;br /&gt;
===Uploading to Steam Workshop===&lt;br /&gt;
* You can upload your mod to Steam Workshop by enabling Development Mode from your game Options and then using the Upload option under the Advanced button in the vanilla mod manager.&lt;br /&gt;
* Note that in order to upload to Steam Workshop, you must own the game on Steam Workshop. Owning RimWorld on GOG or Epic will not work.&lt;br /&gt;
* Your Preview.png should be a 640x360 or 1280x720 PNG and '''must''' be under 1MB. If it is too large, then your upload will be rejected with &amp;lt;code&amp;gt;Error : Limit Exceeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you get a &amp;lt;code&amp;gt;OnItemSubmitted Fail&amp;lt;/code&amp;gt; error, make sure you close any programs that are targeting items in your mods folder. This can also mean that Steam Workshop is having some technical issues at the moment. If it keeps occurring, then the only thing to do is to wait a few hours for it to clear up.&lt;br /&gt;
* Steam mod descriptions don't use markdown, they use a variant of BBCode. Please check out the [https://steamcommunity.com/comment/Guide/formattinghelp Steam text formatting guide].&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All of the above tutorials have been cleaned up and reviewed by the #mod-development team on the [https://discord.gg/rimworld RimWorld Discord] in cooperation with RimWorld Wiki staff editors. Please let us know before creating, adding, or making any major edits to the vetted tutorials and guides section!&lt;br /&gt;
&lt;br /&gt;
==Outdated / Under Review==&lt;br /&gt;
&lt;br /&gt;
The following tutorials are either out of date or in need of a rewrite. The information in them might be useful but may not be up to standard; please be aware of any potential inaccuracies until they can be addressed.&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/First Steps|First Steps and Some Links]]&lt;br /&gt;
* [[Modding Tutorials/Essence| Essence of Modding]]&lt;br /&gt;
* [[Modding Troubleshooting Tips and Guides]]&lt;br /&gt;
* [[Modding Tutorials/Sounds|Adding and Testing Sounds]]&lt;br /&gt;
* [[Modding Tutorials/Assets|Decompiling Texture/Sound Assets]]&lt;br /&gt;
* [[Modding Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
* [[Modding_Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding_Tutorials/Modifying defs|Modifying Defs]]&lt;br /&gt;
* [[Modding_Tutorials/Troubleshooting|Troubleshooting mods]]&lt;br /&gt;
* [[Modding Tutorials/Rituals]]&lt;br /&gt;
&lt;br /&gt;
===XML tutorials===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/XML file structure|XML File Structure]]&lt;br /&gt;
* [[Modding Tutorials/XML Defs|Introduction to XML Defs]]&lt;br /&gt;
** [[Modding Tutorials/Compatibility with defs|XML Def Compatibility]]&lt;br /&gt;
** [[Modding Tutorials/ThingDef|ThingDef explained]]&lt;br /&gt;
** [[Modding Tutorials/Weapons Guns|Weapons_Guns.xml explained]]. Slightly dated.&lt;br /&gt;
&lt;br /&gt;
===C# tutorials===&lt;br /&gt;
* [[Modding_Tutorials/Hello World|Hello World]]&lt;br /&gt;
* [[Modding_Tutorials/Writing custom code|Writing Custom Code]]&lt;br /&gt;
* [[Modding Tutorials/Linking XML and C#|Linking XML and C#]]&lt;br /&gt;
* [[Modding_Tutorials/Harmony|Alter Code at Runtime with Harmony]] - this is a best practice for modifying game code, replacing C# code injection to reduce Mod Conflicts&lt;br /&gt;
* [[Modding_Tutorials/Modifying classes|Adding fields and methods to classes]]&lt;br /&gt;
* [[Modding Tutorials/ModSettings|Mod settings]] - Add settings to your mod&lt;br /&gt;
* [[Modding Tutorials/DefModExtension|Def mod extensions]] - Add (custom) fields to Defs&lt;br /&gt;
* [[Modding Tutorials/Custom Comp Classes|Custom Comp Classes]] - A quick overview of what types of Comps there are, and what they're suited for.&lt;br /&gt;
* [[Modding_Tutorials/ThingComp|ThingComp]] - Learn all there is to know about ThingComps.&lt;br /&gt;
* [[Modding Tutorials/GameComponent|Components]] - GameComponents, WorldComponents, and MapComponents&lt;br /&gt;
* [[Modding_Tutorials/Def classes|Introduction to Def Classes]]&lt;br /&gt;
* [[Modding_Tutorials/Compatibility_with_DLLs|Using Harmony to optionally patch other mods for the sake of compatibility]]&lt;br /&gt;
* [[Modding Tutorials/TweakValue|TweakValues]] - Change values on the fly (handy for quick iteration!)&lt;br /&gt;
* [[Modding Tutorials/ExposeData|ExposeData]] - Save stuff&lt;br /&gt;
* [[Modding Tutorials/BigAssListOfUsefulClasses|The big ass list of useful classes]] - A non-exhaustive list of classes you'll use most&lt;br /&gt;
* [[Modding Tutorials/GrammarResolver|Grammar Resolver]] - PAWN_objective, PAWN_possessive? Find out what it all means here.&lt;br /&gt;
* [https://github.com/Mehni/ExampleJob/wiki ExampleJob] - Mehni's top to bottom breakdown of Jobs.&lt;br /&gt;
* [[Modding_Tutorials/ConfigErrors|Config Errors]] - Provide configuration issues to the user on startup.&lt;br /&gt;
* [[Modding Tutorials/DebugActions|Debug Actions]] - Call methods from the debug menu&lt;br /&gt;
* [https://www.arp242.net/rimworld-mod-linux.html Getting started with RimWorld modding on Linux]&lt;br /&gt;
&lt;br /&gt;
===Art Tutorials===&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/artstyle Artstyle] - Officially unofficial guide to RimWorld's Artstyle&lt;br /&gt;
* [https://www.reddit.com/r/RimWorld/comments/5tn1pi/rimworldstyle_sprite_tutorials/ Ekksu's guide to creating RimWorld animals]&lt;br /&gt;
* [https://steamcommunity.com/sharedfiles/filedetails/?id=1114369188 ChickenPlucker's guide to creating apparel]&lt;br /&gt;
* [https://github.com/seraphile/rimshare/wiki/Colouring-in-Images Seraphile's guide to masks]&lt;br /&gt;
&lt;br /&gt;
===Under Construction===&lt;br /&gt;
&lt;br /&gt;
These are currently unfinished and need to be cleaned up or removed&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Quests]]&lt;br /&gt;
* [[Modding Tutorials/Troubleshooting/Finding Exceptions]]&lt;br /&gt;
&lt;br /&gt;
===Dangerously Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[RimWorld 1.3: XML Mod Creation]]&lt;br /&gt;
* [[Modding Tutorials/Assembly Modding Example|Assembly Modding]]&lt;br /&gt;
* [[Plague Gun (1.1)|The Plague Gun]] tutorial originally by Jecrell, updated to 1.1+. &lt;br /&gt;
* [[Modding Tutorials/Xenotype template]] originally by Ryflamer&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Smelter]]&lt;br /&gt;
* [[Modding Tutorials/Items]]&lt;br /&gt;
* [[Modding Tutorials/Furniture]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [https://github.com/roxxploxx/RimWorldModGuide/wiki Roxxploxx's set of modding tutorials]&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/ RimWorld Modding Resources - A hub for guides, modders, practical tips]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Topic:Z4sysmoakgjo1mpw&amp;topic_postId=z5n123kuncojdhl0&amp;topic_revId=z5n123kuncojdhl0&amp;action=single-view</id>
		<title>Topic:Z4sysmoakgjo1mpw</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Topic:Z4sysmoakgjo1mpw&amp;topic_postId=z5n123kuncojdhl0&amp;topic_revId=z5n123kuncojdhl0&amp;action=single-view"/>
		<updated>2025-12-31T16:24:55Z</updated>

		<summary type="html">&lt;span class=&quot;plainlinks&quot;&gt;&lt;a href=&quot;/wiki/User:Aelanna&quot; class=&quot;mw-userlink&quot; title=&quot;User:Aelanna&quot;&gt;&lt;bdi&gt;Aelanna&lt;/bdi&gt;&lt;/a&gt; &lt;span class=&quot;mw-usertoollinks&quot;&gt;(&lt;a href=&quot;/wiki/User_talk:Aelanna&quot; class=&quot;mw-usertoollinks-talk&quot; title=&quot;User talk:Aelanna&quot;&gt;talk&lt;/a&gt; | &lt;a href=&quot;/wiki/Special:Contributions/Aelanna&quot; class=&quot;mw-usertoollinks-contribs&quot; title=&quot;Special:Contributions/Aelanna&quot;&gt;contribs&lt;/a&gt;)&lt;/span&gt; &lt;a rel=&quot;nofollow&quot; class=&quot;external text&quot; href=&quot;https://rimworldwiki.com/index.php?title=Topic:Z4sysmoakgjo1mpw&amp;amp;topic_showPostId=z5n123kuncojdhl0#flow-post-z5n123kuncojdhl0&quot;&gt;commented&lt;/a&gt; on &quot;C# Documentation&quot; (&lt;em&gt;Discussing documentation over Mediawiki chat is a bit of a hassle, I rarely look at my messages here, and quite frankly I&amp;#039;m a little conf...&lt;/em&gt;)&lt;/span&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Setting_up_a_solution&amp;diff=172894</id>
		<title>Modding Tutorials/Setting up a solution</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Setting_up_a_solution&amp;diff=172894"/>
		<updated>2025-12-07T21:30:13Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* .NET Framework via Commmandline */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Setting Up a Solution}}&lt;br /&gt;
&lt;br /&gt;
{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
In this tutorial you will learn how to set up a solution, along with instructions on setting the output directory and files for more convenient building right into the Assemblies folder.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
* The manual option in this tutorial requires you to have [[Modding_Tutorials/Mod_folder_structure#The Source and Assemblies folders|set up a Source and Assemblies folder]] (the Visual Studio automatic option sets this up for you).&lt;br /&gt;
* You will want to have an IDE installed: [[Modding Tutorials/Recommended software#IDE's|Recommended IDE's]].&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Setting up a solution=&lt;br /&gt;
Setting up can be different for different IDE's. Feel free to add '''''complete''''' instructions for your IDE of choice.&lt;br /&gt;
&lt;br /&gt;
===Visual Studio Community 2022===&lt;br /&gt;
''NOTE: Visual Studio 2022 is a rather heavy application (2-3 GB for basic functionality) but works out of the box. It is strongly recommended if you are on Windows and have a PC that can handle it. This tutorial is similar for other versions of Visual Studio.''&lt;br /&gt;
&lt;br /&gt;
First, ensure that you have the .NET desktop development workload feature installed. If you didn't select it during installation or if you aren't sure, you can click on Get Tools and Features under the Tools menu to check:&lt;br /&gt;
&lt;br /&gt;
[[File:Get Tools and Feature (VS2022).png|border|To verify that you have the proper module installed, click here.]]&lt;br /&gt;
&lt;br /&gt;
[[File:Workload Selection (VS2022).png|border|Make sure you have the &amp;quot;.NET desktop development&amp;quot; workload installed.]]&lt;br /&gt;
&lt;br /&gt;
==== Option 1 (Manual Method):====&lt;br /&gt;
# Create a new class library project&lt;br /&gt;
## Once loaded, go to File -&amp;gt; New -&amp;gt; Project...&lt;br /&gt;
## Type &amp;quot;Class Library (.NET Framework)&amp;quot; in the search bar, and select the C# option. [[File:ClassLibrary.png|200px|thumb|right|Installing the .NET framework]]&lt;br /&gt;
## Enter your project name.&lt;br /&gt;
## Choose a location, preferably:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;(RimWorldInstallFolder)/Mods/(YourModName)/Source&amp;lt;/pre&amp;gt;&lt;br /&gt;
## Enter a solution name (optionally, tick &amp;quot;Place solution and project in the same directory&amp;quot;)&lt;br /&gt;
## Make sure Framework is &amp;quot;.NET Framework 4.7.2&amp;quot;&lt;br /&gt;
# In your project, set target framework and various other properties&lt;br /&gt;
## In your Solution Explorer (the panel usually located on the right), right click your project -&amp;gt; Properties (or expand your project and double click &amp;quot;Properties&amp;quot; with the wrench icon)&lt;br /&gt;
## ''Optional'': Under Application, change your Assembly and Namespace names to anything of your choice&lt;br /&gt;
## ''Optional'': You can go to Build -&amp;gt; Advanced... and set &amp;quot;Debugging information&amp;quot; to &amp;quot;Embedded&amp;quot; or &amp;quot;Portable&amp;quot; to remove the extraneous PDB file while also retaining full debug information. You can also set it to &amp;quot;None&amp;quot; to make your DLL smaller, but error stacktraces will have less useful information.&lt;br /&gt;
## Leave Advanced..., and set the Output Path to &amp;quot;..\..\Assemblies\&amp;quot; (Or wherever the Assemblies folder is)&lt;br /&gt;
# Add references to RimWorld code&lt;br /&gt;
## Expand your project in Solution Explorer. Then right click &amp;quot;References&amp;quot; -&amp;gt; Add Reference...&lt;br /&gt;
## Click Browse...&lt;br /&gt;
## Navigate towards &amp;lt;pre&amp;gt;RimWorldInstallPath/RimWorld******_Data/Managed&amp;lt;/pre&amp;gt; and select files: &amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;Assembly-CSharp.dll&amp;amp;#10;UnityEngine.CoreModule.dll&amp;lt;/pre&amp;gt;&lt;br /&gt;
## Click &amp;quot;Add&amp;quot;&lt;br /&gt;
## Click &amp;quot;OK&amp;quot; to close the Reference Manager.&lt;br /&gt;
## Right-click on both Assembly-CSharp.dll and UnityEngine.dll and set Copy Local to False (Properties pane).&lt;br /&gt;
&lt;br /&gt;
====Option 2 (Using Nuget):====&lt;br /&gt;
This option uses [https://www.nuget.org/packages/Krafs.Rimworld.Ref Krafs Rimworld Reference Package] it is less involved than using reference assemblies and is the recommended method.&amp;lt;/br&amp;gt;&lt;br /&gt;
#Follow the above up till ''Add references to RimWorld code''&lt;br /&gt;
#From the Tools menu, select NuGet Package Manager -&amp;gt; Package Manager Settings.&lt;br /&gt;
##In the Settings dialog, under Package Management, change the ''Default package management format'' to '''PackageReference'''.&lt;br /&gt;
##Click OK to close the dialog.&lt;br /&gt;
#Open Nuget Manager and type ''Rimworld''&lt;br /&gt;
#Add Krafs Rimworld Reference&lt;br /&gt;
You can now continue as if you added the assemblies. Doing this makes your project portable, because RimRef can be downloaded by anyone and used from anywhere, unlike Rimworld's assemblies which can't be distributed.&lt;br /&gt;
&lt;br /&gt;
====Option 3 (Using Rimworld Dotnet Template):====&lt;br /&gt;
This option uses [https://github.com/Zeta-of-the-rim/Rimwold-Dotnet-Template Rimworld Dotnet Template] it allows faster creation of mod files including Xml folders&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After installing the template.&lt;br /&gt;
#Open your mod folder&lt;br /&gt;
#create a new folder for your mod (It is best to use the name you want for your mod)&lt;br /&gt;
#Open a command prompt in that folder&lt;br /&gt;
#type ''dotnet new  RimMod'' (This will create a new mod with the name you specified)&lt;br /&gt;
#Open the About folder and edit the About.xml file&lt;br /&gt;
#Open the .sln file in your preferred IDE&lt;br /&gt;
#Add the rimworld assemblies using your preferred method&lt;br /&gt;
&lt;br /&gt;
While this method is faster, it is still good to know how to do it manually.&lt;br /&gt;
&lt;br /&gt;
====Option 4 (Using Cookiecutter):====&lt;br /&gt;
This option uses the [https://ludeon.com/forums/index.php?topic=39038.0 Rimworld Mod Development Cookiecutter] tool.&amp;lt;/br&amp;gt;&lt;br /&gt;
'''Note: despite being automatic and potentially taking away some of the tedium away, the environment it sets up is very particular and this tool is currently not recommended for newcomers.'''&amp;lt;/br&amp;gt;&lt;br /&gt;
''As of Jan 2019, the cookiecutter is set up for Windows development.  Linux/Mac people can still use it, but they will have a few errors to clean up.''&amp;lt;/br&amp;gt;&lt;br /&gt;
# Open Visual Studio&lt;br /&gt;
# Once loaded, go to File -&amp;gt; New -&amp;gt; From Cookiecutter...&lt;br /&gt;
# Search for ''rimworld''&lt;br /&gt;
# Double-click ''cookiecutter-rimworld-mod-development''&lt;br /&gt;
# Change the Template Options:&lt;br /&gt;
## ''Create To'' =&amp;gt; ''Your/Rimworld/Mod/Directory''&lt;br /&gt;
## ''mod_name''&lt;br /&gt;
## ''namespace_name'' (don't change if unsure)&lt;br /&gt;
## ''author'' =&amp;gt; ''your steam username''&lt;br /&gt;
## ''target_version'' =&amp;gt; current RW version (can leave blank for most up-to-date)&lt;br /&gt;
## ''in_game_description'' (not required, can change later in About-Release.xml)&lt;br /&gt;
## ''url'' (can leave blank for link to your Steam Workshop profile)&lt;br /&gt;
# Click &amp;quot;Create and Open Folder&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Sharpdevelop===&lt;br /&gt;
'''Caution:''' Sharpdevelop (or #develop) does NOT CURRENTLY allow for C# 6.0+ syntax without plugins and does NOT ALLOW for C# 7.0+ syntax at all. For your average project this does not matter, however some existing projects are already built entirely upon C# 6.0+ syntax which can not be compiled anymore in Sharpdevelop. Visual Studio does not have these issues and should be your go-to for compiling large projects such as Combat Extended.&lt;br /&gt;
&lt;br /&gt;
# Create a new class library project in your [[Modding Tutorials/Recommended software#IDE.27s|IDE of choice]];&lt;br /&gt;
## Go to File -&amp;gt; New -&amp;gt; Solution;&lt;br /&gt;
## Go to C# or .NET -&amp;gt; Library or Class Library (NOT portable);&lt;br /&gt;
## Enter a project name (solution name automatically updated);&lt;br /&gt;
## Choose a location, preferably:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;(RimWorldInstallFolder)/Mods/(YourModName)/Source&amp;lt;/pre&amp;gt;&lt;br /&gt;
## ''Optional'': Untick &amp;quot;Create a directory for solution&amp;quot;/&amp;quot;Create a project within the solution directory&amp;quot;,&lt;br /&gt;
# In your project, add references to Assembly-CSharp.dll and UnityEngine.dll:&lt;br /&gt;
## In your IDE project file browser, right-click the &amp;quot;References&amp;quot; folder and &amp;quot;Add reference&amp;quot;;&lt;br /&gt;
## Choose the &amp;quot;.NET Assembly Browser&amp;quot; tab and &amp;quot;Browse...&amp;quot;;&lt;br /&gt;
## Navigate towards &amp;lt;pre&amp;gt;RimWorld******/RimWorld******_Data/Managed&amp;lt;/pre&amp;gt; and select files: &amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;Assembly-CSharp.dll&amp;amp;#10;UnityEngine.CoreModule.dll&amp;lt;/pre&amp;gt;&lt;br /&gt;
## Click &amp;quot;Open&amp;quot; then &amp;quot;OK&amp;quot;;&lt;br /&gt;
## In the References folder, right-click Assembly-CSharp -&amp;gt; Properties and change &amp;quot;Local copy&amp;quot; to False. Do the same for UnityEngine,&lt;br /&gt;
# In your project properties, change the target framework to .NET 4.7.2:&lt;br /&gt;
## In your IDE project file browser, right-click &amp;quot;(YourSolutionName)&amp;quot;;&lt;br /&gt;
## Choose Properties;&lt;br /&gt;
## Go to the &amp;quot;Compiling&amp;quot; tab, &amp;quot;Output&amp;quot;, &amp;quot;Target framework&amp;quot;, &amp;quot;Change&amp;quot; and choose &amp;quot;.NET Framework 4.7.2&amp;quot;,&lt;br /&gt;
# In your project properties, change the build events so only a single file is built:&lt;br /&gt;
## Go to the &amp;quot;Compiling&amp;quot; tab, &amp;quot;Output&amp;quot;, &amp;quot;Debug info&amp;quot; and choose &amp;quot;No debug information&amp;quot;;&lt;br /&gt;
## Right-click your .cs files -&amp;gt; Properties and change &amp;quot;Copy to output&amp;quot; (If you haven't resized the properties bar, this will be truncated to &amp;quot;Copy to out&amp;quot;) to Never,&lt;br /&gt;
# In your project properties, fix the output location to put the DLL in the Assemblies folder:&lt;br /&gt;
## Go to the &amp;quot;Compiling&amp;quot; tab, &amp;quot;Output&amp;quot;, &amp;quot;Output path&amp;quot; and change the output path to &amp;quot;..\..\Assemblies\&amp;quot;.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
&lt;br /&gt;
On Linux it is possible to develop using .NET packages provided by Microsoft:&lt;br /&gt;
# [https://dotnet.microsoft.com/download Install .NET by following the provided instructions.]&lt;br /&gt;
# If you use IDE, use it to build (no further details, not tested).&lt;br /&gt;
# It is possible to build from CLI using a .csproj file. Find a mod that has description pointing to its GitHub sources and copy from there ([https://github.com/llunak/rimworld-dietfiltersinstorage/blob/master/Source/DietFiltersInStorage.csproj example here]), or use another way to create a .csproj file.&lt;br /&gt;
# For building use a command like the following (substitute the proper .csproj file, change Release to Debug for a debug build):&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;dotnet build &amp;lt;project file&amp;gt;.csproj /property:Configuration=Release&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you get errors, possibly the .csproj is Windows-specific and needs to be edited:&lt;br /&gt;
## You may need to fix paths (point them to .dll files in RimWorld/RimWorld*_Data/Managed, but it is generally better to use NuGet as described above in Option 2, as that is platform-independent).&lt;br /&gt;
## See other setups above for other settings (those IDEs write those settings to the .csproj files).&lt;br /&gt;
&lt;br /&gt;
Note that .NET Framework from Microsoft is Windows-only, and some .csproj files do not build without it. Generally it seems those using Windows-specific paths are affected, while those platform-independent work fine. Either use Mono (see below), or use one that works. The example .csproj file linked above can usually be used as a drop-in replacement, with only properties in the first PropertyGroup needing adjustment. If you really want or need it, you can get .NET Framework from Mono, by additionally doing these steps:&lt;br /&gt;
# Install Mono (refer to your distribution's instructions);&lt;br /&gt;
# Change the build command to the following (4.7.2 is the .NET version from the .csproj file):&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.7.2-api/ dotnet build &amp;lt;project file&amp;gt;.csproj /property:Configuration=Release&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Xamarin/MonoDevelop===&lt;br /&gt;
The setup is similar as the one above. A few special points to address:&lt;br /&gt;
# Mono 4.X isn't backward compatible so you may need to install an older 3.X version of Mono in order to compile against .NET4.7.2 dlls.&lt;br /&gt;
# Make sure you uncheck &amp;quot;Use MSBuild build engine (recommended for this project type)&amp;quot; under project &amp;gt; options &amp;gt; build &amp;gt; general   (You might find this by right-clicking on your project - not solution - name and selecting options)&lt;br /&gt;
# Changing the framework to 4.7.2 can be found (for Linux anyway) in the same place.&lt;br /&gt;
&lt;br /&gt;
More detailed installation instructions for Linux can be found [https://blog.rubenwardy.com/2016/07/21/rimworld-setup-monodevelop/ here] and [https://spdskatr.github.io/RWModdingResources/mono-arch here]. Note that as of now (2021) these may be outdated, so if it doesn't work, you can try the steps described in the Mono section.&lt;br /&gt;
&lt;br /&gt;
===Rider (good for Mac)===&lt;br /&gt;
JetBrains Rider is a great cross-platform C# IDE. Previously a paid product (with exceptions), it now offers a community license, making it free for non-commercial use.&lt;br /&gt;
&lt;br /&gt;
# Open Rider and click New Solution in the welcome dialog.&lt;br /&gt;
## Click Class Library under .NET on the left. The option may take a second to show up.&lt;br /&gt;
## Under Solution Name (and Project Name), enter the name of your mod.&lt;br /&gt;
## Set the Solution Directory to [your mod folder]/Source.&lt;br /&gt;
## Optionally check &amp;quot;put solution and project in the same directory.&amp;quot; This is probably a good idea.&lt;br /&gt;
## Change Framework to .Net Framework 4.7.2. &lt;br /&gt;
### If you're on Windows and 4.7.2 does not show up as an option, you will have to install the &amp;quot;4.7.2 Dev Pack&amp;quot; from [https://dotnet.microsoft.com/en-us/download/visual-studio-sdks Microsoft].&lt;br /&gt;
### If you're on MacOS, you may see an error &amp;quot;mono is not found&amp;quot;; install mono from [https://www.mono-project.com/docs/getting-started/install/mac/ here]. Additionally, if you do not have the option to choose .NET 4.7.2, you can create a project with the available NET option(s) and then manually edit the .csproj file to contain &amp;quot;&amp;lt;TargetFramework&amp;gt;net472&amp;lt;/TargetFramework&amp;gt;&amp;quot; later.&lt;br /&gt;
## Click Create.&lt;br /&gt;
# In the left side bar, expand your solution, right click your project (mod name with &amp;quot;C#&amp;quot; icon) and click Properties.&lt;br /&gt;
## In the Properties window, select Configurations &amp;gt; Debug on the left and uncheck Debug Symbols.&lt;br /&gt;
## For both configurations, change the Output Path to ../../Assemblies.&lt;br /&gt;
## Click OK.&lt;br /&gt;
# Expand your project, right click References and click Add Reference.&lt;br /&gt;
## Click Add From.&lt;br /&gt;
## Browse to the folder with the RimWorld DLLs&lt;br /&gt;
### DLL Location for Mac: &amp;quot;/Users/[username]/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed&lt;br /&gt;
### For Win10: &amp;quot;\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed&amp;quot;&lt;br /&gt;
## Select both Assembly-CSharp.dll and UnityEngine.dll and click OK.&lt;br /&gt;
## Expand Assemblies under References. For both of the assemblies that you just added:&lt;br /&gt;
### Right click the assembly and click Properties.&lt;br /&gt;
### Uncheck &amp;quot;Copy Local&amp;quot; (you may need to scroll down) and click OK.&lt;br /&gt;
&lt;br /&gt;
You're done! Note that Rider has a built-in decompiler—to view the source of a RimWorld class or method, just right-click its name and click Go To &amp;gt; Definition.&lt;br /&gt;
&lt;br /&gt;
===.NET Framework via Command Line===&lt;br /&gt;
If you are on Windows and for some reason you don't want to use Visual Studio, you can also use the C# compiler that comes with the .NET Framework from within the terminal.&lt;br /&gt;
&lt;br /&gt;
# Install the [https://dotnet.microsoft.com .NET Framework].&lt;br /&gt;
# (Optional) Adding the compiler to PATH.&lt;br /&gt;
## Search for &amp;quot;env&amp;quot; -&amp;gt; Edit system environment variables -&amp;gt; click on &amp;quot;Environment Variables&amp;quot; -&amp;gt; Edit the Path of the user variables -&amp;gt; Add the folder of csc.exe (Usually C:\Windows\Microsoft.NET\Framework\vX.X.XXXXX).&lt;br /&gt;
# Find &amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;Assembly-CSharp.dll&amp;amp;#10;UnityEngine.CoreModule.dll&amp;lt;/pre&amp;gt; in your game files(Usualy at: C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\).&lt;br /&gt;
# Open a terminal and cd to the location of your .cs file.&lt;br /&gt;
# Compile your .cs file (If you skipped adding csc.exe to path, replace it with its full filepath in the following command).&lt;br /&gt;
## It should look something like this:&amp;lt;pre&amp;gt;csc.exe /t:library /r:&amp;quot;C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll&amp;quot;,&amp;quot;C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll&amp;quot; MyMod.cs&amp;lt;/pre&amp;gt;&lt;br /&gt;
## The command is structured where:&amp;lt;pre&amp;gt;csc.exe&amp;lt;/pre&amp;gt; is the compiler(or the whole filepath), and:&amp;lt;pre&amp;gt;/r:&amp;quot;...&amp;quot;,&amp;quot;...&amp;quot;&amp;lt;/pre&amp;gt; is the filepath of both gamefiles from step 3, and:&amp;lt;pre&amp;gt;MyMod.cs&amp;lt;/pre&amp;gt; is your C# source code.&lt;br /&gt;
# Explanation:&lt;br /&gt;
## the /t flag sets it to be a .dll file.&lt;br /&gt;
## the /r flag references the game files(Not the decompiled source code, the game files).&lt;br /&gt;
&lt;br /&gt;
===Visual Studio Code via Dev Container===&lt;br /&gt;
{{Recode|section=1|reason=Section commented out due to unknown, unvalidated source. Ideally a full guide for VCS needs to be written}}&lt;br /&gt;
&amp;lt;!-- VS Code provides with Dev Containers a very simple way to set up an working development environment. To make use of Dev Containers you need VS Code with the Dev Containers Extension and docker installed on your machine.&lt;br /&gt;
&lt;br /&gt;
====Quick Start====&lt;br /&gt;
For a quick start either clone the repository inside your mods folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone https://github.com/N3fastus/RainingGoo&amp;lt;/pre&amp;gt;&lt;br /&gt;
or download a zip archive by visiting the [https://github.com/N3fastus/RainingGoo Repository]. Click &amp;quot;Code&amp;quot;, then &amp;quot;Download ZIP&amp;quot; and unzip the code in your mods folder.&lt;br /&gt;
The Mod has a dependency to [https://github.com/pardeike/HarmonyRimWorld/releases Harmony], this one needs also to be in the &amp;quot;Mods&amp;quot; directory. Download the zip and extract it to the &amp;quot;Mods&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
Now open the folder with VS Code. If you are not on Linux you need to adjust the path in '''.devcontainer/docker-compose.yml''' to your platform. &lt;br /&gt;
To start up the container you need to press '''CTRL + Shift + P''' and type '''&amp;quot;Dev Container: Reopen in Container&amp;quot;'''. This might take a few minutes.&lt;br /&gt;
When the container is up and running, switch to the terminal inside VS Code and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;dotnet build&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the Assemblies folder should now be a &amp;quot;RainingGoo.dll&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Starting a new Project====&lt;br /&gt;
To start over with a complete new solution, copy the &amp;quot;.devcontainer&amp;quot; folder to your own project and open it in VS Code. &lt;br /&gt;
&lt;br /&gt;
To create a new solution file in the actual location:&lt;br /&gt;
&amp;lt;pre&amp;gt;dotnet new sln&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create a new project (here a library) in the actual location:&lt;br /&gt;
&amp;lt;pre&amp;gt;dotnet new classlib -n MyNewProject -o .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add the created project to the solution file:&lt;br /&gt;
&amp;lt;pre&amp;gt;dotnet sln add Path/to/MyNewProject.csproj&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the configuration of the csproj files compare against the example project above.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Common issues=&lt;br /&gt;
* Can't find the option to target .NET Framework 4.7.2? It may require additional installation steps. In Visual Studio, Tools =&amp;gt; Get Tools and features =&amp;gt; Individual Components =&amp;gt; Select ''.NET Framework 4.7.2 development tools'' (or google installation instructions). Also make sure your project is a ''Class Library (.NET '''Framework''')''. Not .NET Core or .NET Standard.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[Modding Tutorials/Writing custom code|Writing custom code]] continues on setting up your solution.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=172856</id>
		<title>Modding Tutorials</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=172856"/>
		<updated>2025-12-05T17:59:23Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Moved &amp;quot;testing mods&amp;quot; guide out of purgatory.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Mods_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the hub page for tutorials, guides, and reference materials for creating mods for RimWorld. If you are looking for instructions on how to use RimWorld, please check out the general [[Modding]] hub.&lt;br /&gt;
&lt;br /&gt;
As RimWorld does not have a formal modding API, nearly all of the information here has been gathered and maintained by the modding community.&lt;br /&gt;
&lt;br /&gt;
'''NEW: [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]]''' - A work-in-progress list of changes datamined by the modding community in the current unstable version of RimWorld 1.6. '''THERE MAY BE ODYSSEY DLC SPOILERS, YOU HAVE BEEN WARNED.'''&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
==About RimWorld==&lt;br /&gt;
{{Stub|section=1|reason= Where does [[Modding Tutorials/Rituals]] fit in the below categories?}}&lt;br /&gt;
RimWorld is a multi-platform game written on Unity 2022.3.35. However, the Unity Editor is not used for creating mods unless you are creating new shaders or building optional asset bundles.&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Recommended_software|Recommended Software]] - Editors and other useful software for mod development&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]] - Explore the basic folder structure of a mod&lt;br /&gt;
** [[Modding_Tutorials/About.xml|About.xml]] - About.xml identifies and describes your mod to RimWorld so that it can be loaded properly&lt;br /&gt;
&lt;br /&gt;
===Game Systems Guides===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Defs|Defs]] - XML Definitions are used to define and configure content in a way that does not require compiling code&lt;br /&gt;
** [[Modding_Tutorials/MayRequire|MayRequire]] - MayRequire and MayRequireAnyOf are used to conditionally load Defs and list entries based on whether a DLC or other mod is loaded&lt;br /&gt;
* [[Modding_Tutorials/Localization|Localization]] - Define text strings used for translations and word lists used in name and text generation&lt;br /&gt;
* [[Modding_Tutorials/PatchOperations|PatchOperations]] - PatchOperations are used to modify XML Defs without overwriting them completely&lt;br /&gt;
* [[Modding_Tutorials/Sounds|Sounds]] - (Needs Rewriting) Adding sound files for mods&lt;br /&gt;
* [[Modding_Tutorials/Textures|Textures]] - How to create and add textures to mods&lt;br /&gt;
* [[Modding Tutorials/Plant Rendering|Plant Rendering]] - An explanation of how plant textures are rendered&lt;br /&gt;
* [[Modding_Tutorials/Research_Projects|Research Projects]] - How to create and use research projects.&lt;br /&gt;
&lt;br /&gt;
===XML Tutorials===&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step tutorials for creating basic content mods.&lt;br /&gt;
&lt;br /&gt;
Basic Tutorials:&lt;br /&gt;
* [[Modding_Tutorials/Basic_Melee_Weapon|Basic Melee Weapon]] - How to create a basic melee weapon with a texture mask&lt;br /&gt;
* [[Modding_Tutorials/Basic_Ranged_Weapon|Basic Ranged Weapon]] - How to create a basic ranged weapon with custom sound effects&lt;br /&gt;
* [[Modding_Tutorials/Basic_Plant|Basic Plant]] - How to create a custom plant with both a cultivated and wild variant&lt;br /&gt;
* Custom Animal (Upcoming)&lt;br /&gt;
* Simple Building (Upcoming)&lt;br /&gt;
* Custom Workbench (Upcoming)&lt;br /&gt;
* Custom Drug (Upcoming)&lt;br /&gt;
&lt;br /&gt;
Advanced Tutorials:&lt;br /&gt;
* Custom Faction (Upcoming)&lt;br /&gt;
* Custom Culture (Upcoming)&lt;br /&gt;
* Custom Trader Type (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===C# Guides===&lt;br /&gt;
&lt;br /&gt;
C# is used to create and define custom game behaviors &lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Decompiling source code|Decompiling Source Code]] - How to set up and use a decompiler to read vanilla game code&lt;br /&gt;
* [[Modding_Tutorials/Setting up a solution|Setting up a Solution]] - How to set up a solution for compiling a custom mod assembly&lt;br /&gt;
* [[Modding_Tutorials/Application_Startup|Application Startup]] - Describes the application startup process and the order in which game data is loaded&lt;br /&gt;
* Custom Consumable (Upcoming)&lt;br /&gt;
* Custom Overlays (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===Updates and Migrations===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.5_Mod_Updates|RimWorld 1.5 Mod Updates]] - (WARNING: Anomaly Spoilers) Community notes for updating mods from 1.4 to 1.5.&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]] - (WARNING: Odyssey Spoilers) Community notes for updating mods from 1.5 to 1.6.&lt;br /&gt;
&lt;br /&gt;
===Testing and Troubleshooting===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Testing mods|Testing Mods]] - Tips and tricks for testing mod content&lt;br /&gt;
&lt;br /&gt;
===Slightly Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Plague_Gun_(1.1)|Plague Gun]] - This tutorial was created for RimWorld 1.0 but updated for 1.4. While the exact content is obsolete as you can now accomplish the same result with purely vanilla XML, it is still useful as a crash course for end-to-end mod creation and is here until newer tutorials can replace it.&lt;br /&gt;
&lt;br /&gt;
===Uploading to Steam Workshop===&lt;br /&gt;
* You can upload your mod to Steam Workshop by enabling Development Mode from your game Options and then using the Upload option under the Advanced button in the vanilla mod manager.&lt;br /&gt;
* Note that in order to upload to Steam Workshop, you must own the game on Steam Workshop. Owning RimWorld on GOG or Epic will not work.&lt;br /&gt;
* Your Preview.png should be a 640x360 or 1280x720 PNG and '''must''' be under 1MB. If it is too large, then your upload will be rejected with &amp;lt;code&amp;gt;Error : Limit Exceeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you get a &amp;lt;code&amp;gt;OnItemSubmitted Fail&amp;lt;/code&amp;gt; error, make sure you close any programs that are targeting items in your mods folder. This can also mean that Steam Workshop is having some technical issues at the moment. If it keeps occurring, then the only thing to do is to wait a few hours for it to clear up.&lt;br /&gt;
* Steam mod descriptions don't use markdown, they use a variant of BBCode. Please check out the [https://steamcommunity.com/comment/Guide/formattinghelp Steam text formatting guide].&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All of the above tutorials have been cleaned up and reviewed by the #mod-development team on the [https://discord.gg/rimworld RimWorld Discord] in cooperation with RimWorld Wiki staff editors. Please let us know before creating, adding, or making any major edits to the vetted tutorials and guides section!&lt;br /&gt;
&lt;br /&gt;
==Outdated / Under Review==&lt;br /&gt;
&lt;br /&gt;
The following tutorials are either out of date or in need of a rewrite. The information in them might be useful but may not be up to standard; please be aware of any potential inaccuracies until they can be addressed.&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/First Steps|First Steps and Some Links]]&lt;br /&gt;
* [[Modding Tutorials/Essence| Essence of Modding]]&lt;br /&gt;
* [[Modding Troubleshooting Tips and Guides]]&lt;br /&gt;
* [[Modding Tutorials/Sounds|Adding and Testing Sounds]]&lt;br /&gt;
* [[Modding Tutorials/Assets|Decompiling Texture/Sound Assets]]&lt;br /&gt;
* [[Modding Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
* [[Modding_Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding_Tutorials/Modifying defs|Modifying Defs]]&lt;br /&gt;
* [[Modding_Tutorials/Troubleshooting|Troubleshooting mods]]&lt;br /&gt;
&lt;br /&gt;
===XML tutorials===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/XML file structure|XML File Structure]]&lt;br /&gt;
* [[Modding Tutorials/XML Defs|Introduction to XML Defs]]&lt;br /&gt;
** [[Modding Tutorials/Compatibility with defs|XML Def Compatibility]]&lt;br /&gt;
** [[Modding Tutorials/ThingDef|ThingDef explained]]&lt;br /&gt;
** [[Modding Tutorials/Weapons Guns|Weapons_Guns.xml explained]]. Slightly dated.&lt;br /&gt;
&lt;br /&gt;
===C# tutorials===&lt;br /&gt;
* [[Modding_Tutorials/Hello World|Hello World]]&lt;br /&gt;
* [[Modding_Tutorials/Writing custom code|Writing Custom Code]]&lt;br /&gt;
* [[Modding Tutorials/Linking XML and C#|Linking XML and C#]]&lt;br /&gt;
* [[Modding_Tutorials/Harmony|Alter Code at Runtime with Harmony]] - this is a best practice for modifying game code, replacing C# code injection to reduce Mod Conflicts&lt;br /&gt;
* [[Modding_Tutorials/Modifying classes|Adding fields and methods to classes]]&lt;br /&gt;
* [[Modding Tutorials/ModSettings|Mod settings]] - Add settings to your mod&lt;br /&gt;
* [[Modding Tutorials/DefModExtension|Def mod extensions]] - Add (custom) fields to Defs&lt;br /&gt;
* [[Modding Tutorials/Custom Comp Classes|Custom Comp Classes]] - A quick overview of what types of Comps there are, and what they're suited for.&lt;br /&gt;
* [[Modding_Tutorials/ThingComp|ThingComp]] - Learn all there is to know about ThingComps.&lt;br /&gt;
* [[Modding Tutorials/GameComponent|Components]] - GameComponents, WorldComponents, and MapComponents&lt;br /&gt;
* [[Modding_Tutorials/Def classes|Introduction to Def Classes]]&lt;br /&gt;
* [[Modding_Tutorials/Compatibility_with_DLLs|Using Harmony to optionally patch other mods for the sake of compatibility]]&lt;br /&gt;
* [[Modding Tutorials/TweakValue|TweakValues]] - Change values on the fly (handy for quick iteration!)&lt;br /&gt;
* [[Modding Tutorials/ExposeData|ExposeData]] - Save stuff&lt;br /&gt;
* [[Modding Tutorials/BigAssListOfUsefulClasses|The big ass list of useful classes]] - A non-exhaustive list of classes you'll use most&lt;br /&gt;
* [[Modding Tutorials/GrammarResolver|Grammar Resolver]] - PAWN_objective, PAWN_possessive? Find out what it all means here.&lt;br /&gt;
* [https://github.com/Mehni/ExampleJob/wiki ExampleJob] - Mehni's top to bottom breakdown of Jobs.&lt;br /&gt;
* [[Modding_Tutorials/ConfigErrors|Config Errors]] - Provide configuration issues to the user on startup.&lt;br /&gt;
* [[Modding Tutorials/DebugActions|Debug Actions]] - Call methods from the debug menu&lt;br /&gt;
* [https://www.arp242.net/rimworld-mod-linux.html Getting started with RimWorld modding on Linux]&lt;br /&gt;
&lt;br /&gt;
===Art Tutorials===&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/artstyle Artstyle] - Officially unofficial guide to RimWorld's Artstyle&lt;br /&gt;
* [https://www.reddit.com/r/RimWorld/comments/5tn1pi/rimworldstyle_sprite_tutorials/ Ekksu's guide to creating RimWorld animals]&lt;br /&gt;
* [https://steamcommunity.com/sharedfiles/filedetails/?id=1114369188 ChickenPlucker's guide to creating apparel]&lt;br /&gt;
* [https://github.com/seraphile/rimshare/wiki/Colouring-in-Images Seraphile's guide to masks]&lt;br /&gt;
&lt;br /&gt;
===Under Construction===&lt;br /&gt;
&lt;br /&gt;
These are currently unfinished and need to be cleaned up or removed&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Quests]]&lt;br /&gt;
* [[Modding Tutorials/Troubleshooting/Finding Exceptions]]&lt;br /&gt;
&lt;br /&gt;
===Dangerously Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[RimWorld 1.3: XML Mod Creation]]&lt;br /&gt;
* [[Modding Tutorials/Assembly Modding Example|Assembly Modding]]&lt;br /&gt;
* [[Plague Gun (1.1)|The Plague Gun]] tutorial originally by Jecrell, updated to 1.1+. &lt;br /&gt;
* [[Modding Tutorials/Xenotype template]] originally by Ryflamer&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Smelter]]&lt;br /&gt;
* [[Modding Tutorials/Items]]&lt;br /&gt;
* [[Modding Tutorials/Furniture]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [https://github.com/roxxploxx/RimWorldModGuide/wiki Roxxploxx's set of modding tutorials]&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/ RimWorld Modding Resources - A hub for guides, modders, practical tips]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Testing_mods&amp;diff=172855</id>
		<title>Modding Tutorials/Testing mods</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Testing_mods&amp;diff=172855"/>
		<updated>2025-12-05T17:56:59Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Complete rewrite.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Testing Mods}}&lt;br /&gt;
{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Under_Review}} &lt;br /&gt;
&lt;br /&gt;
This page contains tips and tricks for debugging and testing mod content.&lt;br /&gt;
&lt;br /&gt;
=Development Mode=&lt;br /&gt;
&lt;br /&gt;
''Main Article: [[Development mode]]&lt;br /&gt;
&lt;br /&gt;
Usually referred to as just &amp;quot;dev mode&amp;quot;, enabling this option gives you a large number of tools to help test both the vanilla game as well as mod content.&lt;br /&gt;
&lt;br /&gt;
To enable dev mode:&lt;br /&gt;
&lt;br /&gt;
# Start RimWorld&lt;br /&gt;
# Go to Options in the Main Menu&lt;br /&gt;
# Under Gameplay, check the &amp;quot;Development Mode&amp;quot; box&lt;br /&gt;
&lt;br /&gt;
Development mode will remain on until explicitly turned off, even if you close and reopen the game.&lt;br /&gt;
&lt;br /&gt;
=Debugging=&lt;br /&gt;
&lt;br /&gt;
RimWorld runs on Unity, which uses a modified fork of the Mono runtime. As of RimWorld 1.6 (Odyssey), the current versions are:&lt;br /&gt;
&lt;br /&gt;
* Unity 2022.3.35 (https://unity.com/releases/editor/whats-new/2022.3.35f1)&lt;br /&gt;
* Mono (https://github.com/Unity-Technologies/mono/tree/unity-2022.3-mbe)&lt;br /&gt;
&lt;br /&gt;
If you are using [[Modding_Tutorials/Recommended_software|Rider]], the easiest way to set up debugging for custom assemblies is to use Gareth's RimWorld plugin: https://plugins.jetbrains.com/plugin/21583-rimworld-development-environment&lt;br /&gt;
&lt;br /&gt;
If you are not using Rider or do not want to use the plugin, there are instructions for setting up Doorstop manually here: https://github.com/pardeike/Rimworld-Doorstop&lt;br /&gt;
&lt;br /&gt;
=Tips=&lt;br /&gt;
&lt;br /&gt;
The following are specific tips for testing various types of mod content:&lt;br /&gt;
&lt;br /&gt;
==Weapons and Apparel==&lt;br /&gt;
&lt;br /&gt;
You can spawn weapons and apparel by using the &amp;quot;Spawn weapon&amp;quot; and &amp;quot;Spawn apparel&amp;quot; dev mode debug commands, respectively.&lt;br /&gt;
&lt;br /&gt;
There are also debug output commands for showing the chance of spawning any given weapon or apparel piece, to help diagnose whether your tags are correctly configured.&lt;br /&gt;
&lt;br /&gt;
==Pawns==&lt;br /&gt;
&lt;br /&gt;
You can test custom pawns by using the &amp;quot;Spawn pawn&amp;quot; dev mode command. This will list out all PawnKindDefs in the game.&lt;br /&gt;
&lt;br /&gt;
==Incidents==&lt;br /&gt;
&lt;br /&gt;
You can use the Incident dev mode commands to test various incidents, including raids.&lt;br /&gt;
&lt;br /&gt;
==Jobs==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Toggle job logging&amp;quot; and &amp;quot;Draw pawn debug&amp;quot; can be helpful for diagnosing pawn AI.&lt;br /&gt;
&lt;br /&gt;
==Lords==&lt;br /&gt;
&lt;br /&gt;
Lords are group AI controllers used by everything from trade caravans to raiding parties.&lt;br /&gt;
&lt;br /&gt;
* View settings -&amp;gt; Draw Duties (for seeing what each pawn does)&lt;br /&gt;
* View settings -&amp;gt; Draw Lords (for seeing what the Lord does)&lt;br /&gt;
* View settings -&amp;gt; Log Lord Toil Transitions (for reading what transitions happen)&lt;br /&gt;
&lt;br /&gt;
=Quicktest=&lt;br /&gt;
&lt;br /&gt;
When dev mode is enabled, there will be a Quicktest option on the Main Menu that instantly loads into a Crashlanded map with all default options.&lt;br /&gt;
&lt;br /&gt;
You can also have the game load instantly into a Quicktest map on load by using the &amp;lt;code&amp;gt;-quicktest&amp;lt;/code&amp;gt; command line argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
C:/Path/To/Game/RimWorld.exe -quicktest&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Mac:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
/Users/Username/Library/Application\ Support/Steam/SteamApps/common/RimWorld/RimWorldMac.app/Contents/MacOS/RimWorldMac -quicktest&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can make a shortcut to the game with this command line argument.&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you have a save file named &amp;lt;code&amp;gt;autostart.rws&amp;lt;/code&amp;gt;, then game will load that on start.&lt;br /&gt;
&lt;br /&gt;
=Save Data=&lt;br /&gt;
&lt;br /&gt;
You can override the save data folder using the &amp;lt;code&amp;gt;-savedatafolder&amp;lt;/code&amp;gt; command line argument. This is useful if you want to install the game on a USB drive so you can plug and play it from anywhere:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
C:/Path/To/Game/RimWorld.exe -savedatafolder=C:/Path/To/The/Folder&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use relative file paths:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
-savedatafolder=SaveData&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be sure the game is running with permission to modify the folder; it may not work properly if you run the game under default permissions on its own install folder.&lt;br /&gt;
&lt;br /&gt;
You can combine the -savedatafolder with the -quicktest argument for a clean modding environment.&lt;br /&gt;
&lt;br /&gt;
=Mod Tools=&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/Jaxe-Dev/PublisherPlus Publisher Plus by Jaxe] ([https://steamcommunity.com/sharedfiles/filedetails/?id=1510554297 Steam Workshop]) - Gives you more options when uploading a mod to Steam Workshop, including excluding files or folders from the upload.&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Plague_Gun&amp;diff=172179</id>
		<title>Modding Tutorials/Plague Gun</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Plague_Gun&amp;diff=172179"/>
		<updated>2025-11-22T16:59:37Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* C# Workspace Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a tutorial for taking an item [[mod]] from conception all the way to completion, touching on most systems involved in RimWorld modding and explaining each step.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will be using most of the tools available to a Rimworld [[Modding|modder]] to create a custom weapon, known as the Plague Gun.&lt;br /&gt;
&lt;br /&gt;
This weapon will, when its shots hit a living target, have a chance to apply the [[Plague]] hediff (&amp;quot;health difference&amp;quot;) to that target.&lt;br /&gt;
&lt;br /&gt;
To do this, we will create XML ThingDefs for the gun and projectile, create a C# assembly which determines what happens when the projectile hits a target, and link that behavior back to the XML.&lt;br /&gt;
&lt;br /&gt;
This tutorial will assume a basic familiarity with XML and C# syntax. It should be simple enough to follow if you're only a beginner. &lt;br /&gt;
&lt;br /&gt;
If you have no XML or C# experience, there are good tutorials for XML [https://www.w3schools.com/xml/ here] and C# [https://www.learncs.org/ here].&lt;br /&gt;
&lt;br /&gt;
=== The Completed Mod ===&lt;br /&gt;
For a working example, check out [https://github.com/dninemfive/PlagueGun this GitHub repo].&lt;br /&gt;
&lt;br /&gt;
== Required Items ==&lt;br /&gt;
&lt;br /&gt;
Make sure to have the following installed, at least one per row:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [https://code.visualstudio.com/ VSCode] || A text editor that allows you to edit XML files and use &amp;quot;Find in Files&amp;quot; for referencing.&lt;br /&gt;
|-&lt;br /&gt;
| [https://visualstudio.microsoft.com/vs/community/ Visual Studio Community] || Use this or any other C# compiler to turn scripts into .dll files that RimWorld can use.&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/icsharpcode/ILSpy/releases ILSpy]|| This is for referencing the game's decompiled C# scripts.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more detailed recommendations, see [[Modding Tutorials/Recommended software|here]].&lt;br /&gt;
&lt;br /&gt;
== XML Stage ==&lt;br /&gt;
&lt;br /&gt;
In this stage we will set up the mod and create XML files which add our things to the database.&lt;br /&gt;
&lt;br /&gt;
# Locate your RimWorld folder.&lt;br /&gt;
#* On Steam, you can find it by right-clicking the game in your games list &amp;gt; Properties &amp;gt; Local Files &amp;gt; Browse Local Files...&lt;br /&gt;
#** By default, it will be located at &amp;lt;code&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\RimWorld&amp;lt;/code&amp;gt; if you bought it through Steam on Windows.&lt;br /&gt;
#* If you bought the DRM-free version, it will be located wherever you unzipped it.&lt;br /&gt;
#* On GOG, you can find it by right-clicking the game in your games list &amp;gt; Manage Installation &amp;gt; Show Folder&lt;br /&gt;
#** By default it will be located at &amp;lt;code&amp;gt;C:\Program Files (x86)\GOG Galaxy\Games\RimWorld&amp;lt;/code&amp;gt; if you bought it through GOG on Windows.&lt;br /&gt;
# Create a &amp;lt;code&amp;gt;Mods&amp;lt;/code&amp;gt; folder (if it doesn't already exist).&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;lt;/small&amp;gt;&lt;br /&gt;
#* Go into the Mods folder.&lt;br /&gt;
#* Make a new folder with our mod's title: '''PlagueGun'''&lt;br /&gt;
# Inside '''PlagueGun''', make an '''About''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;lt;/small&amp;gt;&lt;br /&gt;
# Inside the '''About''' folder, make a new text file and rename it About.xml.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;gt;About.xml&amp;lt;/small&amp;gt;&lt;br /&gt;
#* You will need a good text editor to make a proper XML file -- see [[#Required Items|required items]]. I always make a .txt file first and change it to .xml. If you can't rename your file's type, make sure you have filetypes visible in your operating system's file view settings.&lt;br /&gt;
#* [[About.xml]] is the file that shows your mod in the mod list inside the RimWorld game. It is also used when creating a Workshop upload for Steam.&lt;br /&gt;
#* At the top of an XML file, always include this for RimWorld. It basically just gives the game some info about how to read the file. &amp;lt;source lang = &amp;quot;xml&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;/source&amp;gt; ''Note: the'' version '' tag should always be &amp;quot;1.0&amp;quot;. It has no relation with the current RimWorld version.''&lt;br /&gt;
#* Then add the MetaData tags for the Workshop and in-game Mod list.&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;ModMetaData&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Test Mod - Plague Gun&amp;lt;/name&amp;gt; &amp;lt;!-- The name of your mod in the mod list --&amp;gt;&lt;br /&gt;
  &amp;lt;author&amp;gt;YourNameHere&amp;lt;/author&amp;gt;&lt;br /&gt;
  &amp;lt;packageId&amp;gt;YourNameHere.PlagueGun&amp;lt;/packageId&amp;gt; &amp;lt;!-- a unique identifier for your mod. Must contain only a-z and periods, no spaces. --&amp;gt;&lt;br /&gt;
  &amp;lt;supportedVersions&amp;gt; &amp;lt;!-- the version(s) your mod supports --&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1.1&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/supportedVersions&amp;gt;&lt;br /&gt;
  &amp;lt;description&amp;gt;This mod adds a plague gun, a weapon that has a chance to give your enemies the plague.\n\nFor version 1.1.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/ModMetaData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* Save the file.&lt;br /&gt;
# Add a Preview.png or Preview.jpeg to your '''About''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;gt;Preview.png&amp;lt;/small&amp;gt;&lt;br /&gt;
#* This lets users see what your mod looks like in the RimWorld mod list or on the Steam Workshop.&lt;br /&gt;
#* The conventional dimensions to fit the preview image on Steam are 640x360. The image must be smaller than 1mb. &lt;br /&gt;
#* Example: [[File:Preview.png]]&lt;br /&gt;
# Make a '''Defs''' folder in your Mod's directory.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;lt;/small&amp;gt;&lt;br /&gt;
#* RimWorld will read your XML files in any subdirectory of '''Defs'''. You can name your directories however you like under that folder. Defs&amp;gt;StrangeNewAlienGuns&amp;gt;MyGuns.xml will work. For the purposes of this tutorial, however, we will use the RimWorld standard structure.&lt;br /&gt;
#* What are Defs? Main article: [[Modding Tutorials/XML Defs|Defs]]&lt;br /&gt;
#** RimWorld uses things called Defs (short for &amp;quot;definitions&amp;quot;) like blueprints for in-game objects. Instead of using hidden C# code, RimWorld will look up an XML Def and copy it to the game world. This makes things easier for us, the modders. Everything from characters, animals, floors, damages, buildings, and even diseases in RimWorld use Defs. We're going to make Defs for our Plague Gun and Plague Bullet.&lt;br /&gt;
# Make a new '''ThingDefs''' folder in your '''Defs''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;gt;ThingDefs&amp;lt;/small&amp;gt;&lt;br /&gt;
# Make a new text file in your '''ThingDefs''' folder, and change it to RangedWeapon_PlagueGun.xml.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;gt;ThingDefs&amp;gt;RangedWeapon_PlagueGun.xml&amp;lt;/small&amp;gt;&lt;br /&gt;
#* This file will contain the blueprints (ThingDefs) for our new gun and bullets.&lt;br /&gt;
#* Next we will fill out our XML file by copying an existing revolver's ThingDef and a revolver bullet ThingDef.&lt;br /&gt;
#* In RimWorld, it is often best to use the XML attribute &amp;lt;code&amp;gt;ParentName=&amp;quot;BaseBullet&amp;quot;&amp;lt;/code&amp;gt; when making a bullet, because it will copy XML code from a pre-existing BaseBullet ThingDef, which can save us time and key taps. Main article: [[Modding Tutorials/XML file structure#Inheritance|Inheritance]]&lt;br /&gt;
# First, add our favourite line to the top.&amp;lt;source lang = &amp;quot;xml&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
# Add the &amp;lt;code&amp;gt;&amp;lt;Defs&amp;gt;&amp;lt;/code&amp;gt; opening and closing tags to the XML to hold our new code.&amp;lt;source lang = &amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Use your text editor. Use its &amp;quot;Find in Files&amp;quot; function to reference and copy Bullet_Revolver to your XML file.&lt;br /&gt;
#* Find in Files is one of my most-used functions. In Notepad++, if you press CTRL+SHIFT+F, you can go to the Find in Files screen. From there, you can enter a phrase to search for, and then you can enter the file path to search through. This makes it wildly easier to search for examples in RimWorld's Core. RimWorld holds copies of all of its weapons, items, buildings, etc. inside the Mods/Core directory.&lt;br /&gt;
#* So, start by using Find in Files... and find this: &amp;lt;code&amp;gt;defName&amp;gt;Bullet_Revolver&amp;lt;/code&amp;gt;&lt;br /&gt;
#* When you find Bullet_Revolver, copy from its beginning &amp;lt;code&amp;gt;&amp;lt;ThingDef&amp;gt;&amp;lt;/code&amp;gt; all the way until its closing &amp;lt;code&amp;gt;&amp;lt;/ThingDef&amp;gt;&amp;lt;/code&amp;gt; tag into your XML File.&lt;br /&gt;
# Use your text editor's &amp;quot;Find in Files&amp;quot; function to reference and copy Gun_Revolver to your XML file.&lt;br /&gt;
#* Typically, Gun_Revolver is right below Bullet_Revolver in XML, so hopefully this will be easy to find and copy.&lt;br /&gt;
#* Again, copy the ThingDef block to your new XML file.&lt;br /&gt;
# Change the defName, labels, and other stats of Bullet_Revolver and Revolver in your XML file to make them unique.&lt;br /&gt;
#* '''A word on defNames:''' &amp;lt;code&amp;gt;defName&amp;lt;/code&amp;gt;s are how the game references defs anywhere they're used in XML, since they're unique. When telling your plague gun to fire plague bullets, for instance, set its &amp;lt;code&amp;gt;defaultProjectile&amp;lt;/code&amp;gt; to your projectile's defName, like so:&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;defaultProjectile&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defaultProjectile&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''TIP:''' Use prefixes to avoid conflicting with other mods. RimWorld will overwrite any def with &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt;, for instance, if it finds another with the same defName. If two modders use different prefixes, however, e.g. &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;VGP_Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;ROM_Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt;, no conflict will occur, and both mods can co-exist. This tutorial uses TST_ for its example prefix. Main article: [[Modding_Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
#* By contrast, labels, descriptions, and other non-defName tags can generally be non-unique without a risk of conflicts, except perhaps confusion for the end user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''If all you were interested in is making a gun mod, you are done.'''&amp;lt;/big&amp;gt; You'll of course want to edit values like the damage it does, and [[Modding_Tutorials/Testing_mods|test your mod]]. You'll also want to change the &amp;lt;code&amp;gt;texturePath&amp;lt;/code&amp;gt; to your unique art, and whatever else.&lt;br /&gt;
&lt;br /&gt;
=== Completed Example ===&lt;br /&gt;
&lt;br /&gt;
''Note'': The example is up-to-date for [[Version|1.3]] and will likely be outdated in the future. The above steps should always be relevant.&lt;br /&gt;
&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;BaseBullet&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;defName&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defName&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;plague bullet&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;graphicData&amp;gt;&lt;br /&gt;
      &amp;lt;texPath&amp;gt;Things/Projectile/Bullet_Small&amp;lt;/texPath&amp;gt;&lt;br /&gt;
      &amp;lt;graphicClass&amp;gt;Graphic_Single&amp;lt;/graphicClass&amp;gt;&lt;br /&gt;
    &amp;lt;/graphicData&amp;gt;&lt;br /&gt;
    &amp;lt;projectile&amp;gt;&lt;br /&gt;
      &amp;lt;damageDef&amp;gt;Bullet&amp;lt;/damageDef&amp;gt;&lt;br /&gt;
      &amp;lt;damageAmountBase&amp;gt;12&amp;lt;/damageAmountBase&amp;gt;&lt;br /&gt;
      &amp;lt;stoppingPower&amp;gt;1&amp;lt;/stoppingPower&amp;gt;&lt;br /&gt;
      &amp;lt;speed&amp;gt;55&amp;lt;/speed&amp;gt;&lt;br /&gt;
    &amp;lt;/projectile&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;BaseHumanMakeableGun&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;defName&amp;gt;TST_Gun_PlagueGun&amp;lt;/defName&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;plague gun&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;A curious weapon notable for its horrible health effects.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;graphicData&amp;gt;&lt;br /&gt;
      &amp;lt;texPath&amp;gt;Things/Item/Equipment/WeaponRanged/Revolver&amp;lt;/texPath&amp;gt;&lt;br /&gt;
      &amp;lt;graphicClass&amp;gt;Graphic_Single&amp;lt;/graphicClass&amp;gt;&lt;br /&gt;
    &amp;lt;/graphicData&amp;gt;&lt;br /&gt;
    &amp;lt;uiIconScale&amp;gt;1.4&amp;lt;/uiIconScale&amp;gt;&lt;br /&gt;
    &amp;lt;soundInteract&amp;gt;Interact_Revolver&amp;lt;/soundInteract&amp;gt;&lt;br /&gt;
    &amp;lt;thingSetMakerTags&amp;gt;&amp;lt;li&amp;gt;RewardStandardQualitySuper&amp;lt;/li&amp;gt;&amp;lt;/thingSetMakerTags&amp;gt;&lt;br /&gt;
    &amp;lt;statBases&amp;gt;&lt;br /&gt;
      &amp;lt;WorkToMake&amp;gt;4000&amp;lt;/WorkToMake&amp;gt;&lt;br /&gt;
      &amp;lt;Mass&amp;gt;1.4&amp;lt;/Mass&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyTouch&amp;gt;0.80&amp;lt;/AccuracyTouch&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyShort&amp;gt;0.75&amp;lt;/AccuracyShort&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyMedium&amp;gt;0.45&amp;lt;/AccuracyMedium&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyLong&amp;gt;0.35&amp;lt;/AccuracyLong&amp;gt;&lt;br /&gt;
      &amp;lt;RangedWeapon_Cooldown&amp;gt;1.6&amp;lt;/RangedWeapon_Cooldown&amp;gt;&lt;br /&gt;
    &amp;lt;/statBases&amp;gt;&lt;br /&gt;
    &amp;lt;weaponTags&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;SimpleGun&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Revolver&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/weaponTags&amp;gt;&lt;br /&gt;
    &amp;lt;weaponClasses&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;RangedLight&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/weaponClasses&amp;gt;&lt;br /&gt;
    &amp;lt;costList&amp;gt;&lt;br /&gt;
      &amp;lt;Steel&amp;gt;30&amp;lt;/Steel&amp;gt;&lt;br /&gt;
      &amp;lt;ComponentIndustrial&amp;gt;2&amp;lt;/ComponentIndustrial&amp;gt;&lt;br /&gt;
    &amp;lt;/costList&amp;gt;&lt;br /&gt;
    &amp;lt;recipeMaker&amp;gt;&lt;br /&gt;
      &amp;lt;skillRequirements&amp;gt;&lt;br /&gt;
        &amp;lt;Crafting&amp;gt;3&amp;lt;/Crafting&amp;gt;&lt;br /&gt;
      &amp;lt;/skillRequirements&amp;gt;&lt;br /&gt;
    &amp;lt;/recipeMaker&amp;gt;&lt;br /&gt;
    &amp;lt;verbs&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;verbClass&amp;gt;Verb_Shoot&amp;lt;/verbClass&amp;gt;&lt;br /&gt;
        &amp;lt;hasStandardCommand&amp;gt;true&amp;lt;/hasStandardCommand&amp;gt;&lt;br /&gt;
        &amp;lt;defaultProjectile&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defaultProjectile&amp;gt;&lt;br /&gt;
        &amp;lt;warmupTime&amp;gt;0.3&amp;lt;/warmupTime&amp;gt;&lt;br /&gt;
        &amp;lt;range&amp;gt;25.9&amp;lt;/range&amp;gt;&lt;br /&gt;
        &amp;lt;soundCast&amp;gt;Shot_Revolver&amp;lt;/soundCast&amp;gt;&lt;br /&gt;
        &amp;lt;soundCastTail&amp;gt;GunTail_Light&amp;lt;/soundCastTail&amp;gt;&lt;br /&gt;
        &amp;lt;muzzleFlashScale&amp;gt;9&amp;lt;/muzzleFlashScale&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/verbs&amp;gt;&lt;br /&gt;
    &amp;lt;tools&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;label&amp;gt;grip&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;capacities&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Blunt&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;/capacities&amp;gt;&lt;br /&gt;
        &amp;lt;power&amp;gt;9&amp;lt;/power&amp;gt;&lt;br /&gt;
        &amp;lt;cooldownTime&amp;gt;2&amp;lt;/cooldownTime&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;label&amp;gt;barrel&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;capacities&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Blunt&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Poke&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;/capacities&amp;gt;&lt;br /&gt;
        &amp;lt;power&amp;gt;9&amp;lt;/power&amp;gt;&lt;br /&gt;
        &amp;lt;cooldownTime&amp;gt;2&amp;lt;/cooldownTime&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/tools&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C# Workspace Setup ==&lt;br /&gt;
{{Main|Modding Tutorials/Setting up a solution}}&lt;br /&gt;
&lt;br /&gt;
Next, we will set up a workspace to write C# code, which is a little bit more involved than just using a text editor.&lt;br /&gt;
&lt;br /&gt;
# Open your compiler of choice for C#.&lt;br /&gt;
#* This tutorial will assume you're using Visual Studio Community Edition, a free Windows-based compiler for C# code.&lt;br /&gt;
# Make a new Visual C# Class Library .NET Framework project. Name it PlagueGun. Make its directory RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Source&lt;br /&gt;
#* File → New → Project → Class Library (.NET Framework).&lt;br /&gt;
#* Don't get this confused with &amp;quot;Class Library (.NET Standard)&amp;quot; or &amp;quot;Class Library (.NET Core)&amp;quot;!&lt;br /&gt;
# Go into the project properties. &lt;br /&gt;
#* Project → PlagueGun Properties.&lt;br /&gt;
# In that window, change the Target Framework version to .NET Framework 4.7.2&lt;br /&gt;
#* Forgetting to do this will cause lots of errors.&lt;br /&gt;
#* Select Yes when it asks you if you're sure to change the framework.&lt;br /&gt;
# While still in Properties, go to the '''Build''' tab.&lt;br /&gt;
# Change the output path to be RimWorld\Mods\PlagueGun\Assemblies&lt;br /&gt;
#* All .dll files will go into this directory when we &amp;quot;build&amp;quot; our code library.&lt;br /&gt;
# In Solution Explorer. Go into Properties and edit AssemblyInfo.cs. Change the name of your assembly and assembly file version number as you like.&lt;br /&gt;
#* This doesn't have to all be the same as your namespace, but it doesn't hurt to be consistent.&lt;br /&gt;
# In the main option bar at the top of the visual studio (File, Edit, View...), click Project, and click Add Reference.&lt;br /&gt;
# Click Browse at the bottom right corner of the window and go to RimWorld\RimWorldWin64_Data\Managed&lt;br /&gt;
# Add references to Assembly-CSharp.dll, UnityEngine.dll, and UnityEngine.CoreModule.dll.&lt;br /&gt;
#* In 1.1 the Unity DLLs were split up and are no longer all contained in the same module.&lt;br /&gt;
#* For our purposes we only need UnityEngine.CoreModule.dll, as it contains some code we will use later.&lt;br /&gt;
#* In general, it's also a good idea to add UnityEngine.dll, which allows Visual Studio to tell you which modules you're missing if you get related errors.&lt;br /&gt;
# In the Solution Explorer (typically on the right side of the application), look at the references drop down list.&lt;br /&gt;
# Select Assembly-CSharp. Check the Properties section (usually under Solution Explorer). Make sure the properties section has Copy Local set to FALSE.&lt;br /&gt;
# Do this (Copy Local to FALSE) for UnityEngine and UnityEngine.CoreModule as well.&lt;br /&gt;
#* By doing this, we prevent the project from causing one million hash conflicts by copying the entire game's code twice!&lt;br /&gt;
&lt;br /&gt;
Now the workspace setup is complete and we can add C# code to RimWorld.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Exact folder names might differ between installs. The naming scheme differs slightly between the DRM-free and Steam version of the mod.&lt;br /&gt;
&lt;br /&gt;
== C# Coding ==&lt;br /&gt;
&lt;br /&gt;
Now let's start writing the code we'll need to add custom behavior to our projectiles.&lt;br /&gt;
&lt;br /&gt;
=== Getting Started ===&lt;br /&gt;
# Open Class1.cs in the sidebar, usually on the right in Visual Studio.&lt;br /&gt;
# Right-click and rename the .cs file to your liking.&lt;br /&gt;
# Add these lines to the top this file (and every .cs file you make from now on for modding RimWorld).&amp;lt;source lang =&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
using Verse;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* These tell the code you're working with RimWorld. Without these, our code will not be able to understand references to RimWorld code.&lt;br /&gt;
# Add a namespace line. By default, this is your project name. Take note - you will need this to connect to XML later.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' ''Using a prefix on the namespace is not required, but it's good for consistency and in the rare case they may overlap - such as when multiple people follow the same tutorial to learn how to mod.''&lt;br /&gt;
&lt;br /&gt;
=== Connecting XML and C#, Part 1 ===&lt;br /&gt;
{{Main|Modding Tutorials/DefModExtension}}&lt;br /&gt;
&lt;br /&gt;
# First, let's add a way to read XML data into your assembly.&lt;br /&gt;
# Rename public class Class1 to ModExtension_PlagueBullet and make it inherit DefModExtension. As a reminder, inheritance looks like this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public class ModExtension_PlagueBullet : DefModExtension&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Renaming things in an IDE like Visual Studio is best done by pressing F2 or right-clicking the item/name. Doing it like that will change all occurrences of that thing, so everything that references your namespace or Class1 will now use the new name.&lt;br /&gt;
# Add the following fields in ModExtension_PlagueBullet:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public float addHediffChance = 0.05f;&lt;br /&gt;
public HediffDef hediffToAdd;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* Here, we're giving the field addHediffChance a default value, which means it doesn't need to be set explicitly in XML.&lt;br /&gt;
#* '''Note:''' Standard modding practice is to give fields exposed to XML camelCase names, for consistency with vanilla XML.&lt;br /&gt;
# Now let's add the XML which connects to this ModExtension. In your TST_Bullet_PlagueGun def, add the following lines: &amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;modExtensions&amp;gt;&lt;br /&gt;
    &amp;lt;li Class=&amp;quot;TST_PlagueGun.ModExtension_PlagueBullet&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;addHediffChance&amp;gt;0.05&amp;lt;/addHediffChance&amp;gt;&lt;br /&gt;
        &amp;lt;hediffToAdd&amp;gt;Plague&amp;lt;/hediffToAdd&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/modExtensions&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Note the XML tags match the names of the fields in the C# class. This allows the XML to provide data to the program.  When the mod is loaded, the XML will be read, and used to fill in the corresponding fields.&lt;br /&gt;
#* Additionally, take care to note you can set the value of addHediffChance to any valid floating point number and it will be reflected in-game. The value given in C# is only the default value if unset.&lt;br /&gt;
&lt;br /&gt;
=== Writing the Projectile === &lt;br /&gt;
# Let's make the actual projectile. For this tutorial, we're going to make a new projectile that checks for impact and adds a Hediff (health differential - poison, toxins, implants, anything).&lt;br /&gt;
# First, create a new .cs file by right-clicking the PlagueGun part of the Solution Explorer and selecting Add &amp;gt; New Item.&lt;br /&gt;
#* '''Note:''' in C#, you can have multiple class definitions in a single file. We're just making a new file for organizational purposes.&lt;br /&gt;
# Make your new class inherit the Bullet class (a child of the Projectile class), so the game will treat your new projectile like a bullet and not throw (fun) errors. &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# First, let's connect our new projectile to the relevant ModExtension: &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public ModExtension_PlagueBullet Props =&amp;gt; def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* This line is a Property, basically a method which doesn't take any arguments, and can generally speaking be treated as a variable. See [https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties this article] for more details.&lt;br /&gt;
# Now, let's start the actual core code of this mod. Let's begin by overriding the Impact method on the base Bullet class, like so: &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* The &amp;lt;code&amp;gt;override&amp;lt;/code&amp;gt; keyword tells the compiler that we're replacing the functionality of the &amp;lt;code&amp;gt;Impact&amp;lt;/code&amp;gt; method from the &amp;lt;code&amp;gt;Bullet&amp;lt;/code&amp;gt; class we're inheriting from.&lt;br /&gt;
# First, let's call the base version of this method so we don't need to rewrite all the logic about damaging a pawn - we only care about adding the hediff ''after'' damage occurs. &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
base.Impact(hitThing, blockedByShield);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Next, we check to make sure the ModExtension was properly loaded, that we hit something, and that what we hit was a [[Pawns|Pawn]].&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Null checking is a very important skill, especially for Rimworld modding. If you ever get a &amp;lt;code&amp;gt;NullReferenceException&amp;lt;/code&amp;gt;, check to make sure you're correctly handling null values.&lt;br /&gt;
#* Also, note that we initialize a &amp;lt;code&amp;gt;Pawn&amp;lt;/code&amp;gt; version of the &amp;lt;code&amp;gt;hitThing&amp;lt;/code&amp;gt; while checking its type; we'll use this later. This statement ''also'' null-checks this new variable, in case you were wondering.&lt;br /&gt;
# Now that we know we hit a pawn, we generate a random number to see whether to apply the hediff.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
float rand = Rand.Value;&lt;br /&gt;
if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* &amp;lt;code&amp;gt;Rand&amp;lt;/code&amp;gt; is the base game's randomness generation class. &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt; grabs the next random number between 0 and 1 and updates the class.&lt;br /&gt;
# If a hediff is applied, we want to alert the player, so we create a message in the top-left of the screen.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
	this.launcher.Label, hitPawn.Label&lt;br /&gt;
), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Before adding the hediff, we need to check if the pawn already has it, so we get the hediff from the pawn, if it exists.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' The &amp;lt;code&amp;gt;?.&amp;lt;/code&amp;gt; is called the [https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators#null-conditional-operators--and- null conditional operator]. It's basically an in-line null check; if the hit pawn's health tracker (&amp;lt;code&amp;gt;health&amp;lt;/code&amp;gt;) or hediff set (&amp;lt;code&amp;gt;hediffSet&amp;lt;/code&amp;gt;) are null it sets &amp;lt;code&amp;gt;plagueOnPawn&amp;lt;/code&amp;gt; to null instead of throwing an error.&lt;br /&gt;
# Now we finally add the hediff. If the pawn already has the plague we just increase its severity; otherwise, we create and add a new hediff with a random severity.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
if (plagueOnPawn != null)&lt;br /&gt;
{&lt;br /&gt;
	plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
	hediff.Severity = randomSeverity;&lt;br /&gt;
	hitPawn.health.AddHediff(hediff);&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Whew. ====&lt;br /&gt;
Let's take a break and recap for a second. If you've followed the projectile section so far, this is the code you should have in your new .cs file:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using Verse;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
    public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
    {&lt;br /&gt;
        public ModExtension_PlagueBullet Props =&amp;gt; base.def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
        {&lt;br /&gt;
            base.Impact(hitThing, blockedByShield);&lt;br /&gt;
            if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
            {&lt;br /&gt;
                float rand = Rand.Value;&lt;br /&gt;
                if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
                {&lt;br /&gt;
                    Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
                        this.launcher.Label, hitPawn.Label&lt;br /&gt;
                    ), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
                    Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
                    float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
                    if (plagueOnPawn != null)&lt;br /&gt;
                    {&lt;br /&gt;
                        plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
                    }&lt;br /&gt;
                    else&lt;br /&gt;
                    {&lt;br /&gt;
                        Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
                        hediff.Severity = randomSeverity;&lt;br /&gt;
                        hitPawn.health.AddHediff(hediff);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Don't worry, we're almost finished. In fact, if you compile right now the gun ''will'' work - there just won't be any feedback if the shooter misses. This might be desirable, but let's add some feedback anyway.&lt;br /&gt;
&lt;br /&gt;
Well, that's a little bit of a lie. You'd also need to add the &amp;lt;code&amp;gt;&amp;lt;thingClass&amp;gt;&amp;lt;/code&amp;gt; node to the XML, given below.&lt;br /&gt;
&lt;br /&gt;
We want to add an &amp;lt;code&amp;gt;else&amp;lt;/code&amp;gt; block to our &amp;lt;code&amp;gt;if (rand &amp;lt;= Props.addHediffChance))&amp;lt;/code&amp;gt; statement. This is where keeping track of curly braces comes in; Visual Studio should draw vertical lines between the correct curlies. Add this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
    MoteMaker.ThrowText(hitThing.PositionHeld.ToVector3(), hitThing.MapHeld, &amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance), 12f);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* This throws a mote (particle effect, essentially), with text stating that the plague was not applied, at the target's position.&lt;br /&gt;
* Fun fact: the &amp;lt;code&amp;gt;.ToVector3()&amp;lt;/code&amp;gt; call is the entire reason we needed to reference UnityEngine and UnityEngine.CoreModule.&lt;br /&gt;
&lt;br /&gt;
=== Connecting XML and C#, Part 2 ===&lt;br /&gt;
Finally, we need to make sure our projectile's def tells the game to use our new Projectile_PlagueBullet class instead of Bullet.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;thingClass&amp;gt;TST_PlagueGun.Projectile_PlagueBullet&amp;lt;/thingClass&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We're done! Your final Projectile_PlagueBullet class should look like this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using Verse;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
    public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
    {&lt;br /&gt;
        public ModExtension_PlagueBullet Props =&amp;gt; base.def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
        {&lt;br /&gt;
            base.Impact(hitThing, blockedByShield);&lt;br /&gt;
            if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
            {&lt;br /&gt;
                float rand = Rand.Value;&lt;br /&gt;
                if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
                {&lt;br /&gt;
                    Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
                        this.launcher.Label, hitPawn.Label&lt;br /&gt;
                    ), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
                    Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
                    float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
                    if (plagueOnPawn != null)&lt;br /&gt;
                    {&lt;br /&gt;
                        plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
                    }&lt;br /&gt;
                    else&lt;br /&gt;
                    {&lt;br /&gt;
                        Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
                        hediff.Severity = randomSeverity;&lt;br /&gt;
                        hitPawn.health.AddHediff(hediff);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                else&lt;br /&gt;
                {&lt;br /&gt;
                    MoteMaker.ThrowText(hitThing.PositionHeld.ToVector3(), hitThing.MapHeld, &amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance), 12f);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Just compile and test your work; the plague will be properly applied and everything.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Code you write on your own should not look like this - for one thing, it should be well-commented so that others (even if it's just you in the future) know exactly what you're trying to do and how you're doing it. The code [https://github.com/dninemfive/PlagueGun/blob/master/PlagueGun/Projectile_PlagueBullet.cs in the repo] is probably over-commented and designed for a general audience but I recommend reviewing it.&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
...well, almost. If you did test the gun just now, you'll have seen that the text was all distorted, using special characters which looked like the normal ones instead of text you expected. This is because of the use of &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; on keys which do not have translations in the language database. We just need to add those, and we'll be all set!&lt;br /&gt;
&lt;br /&gt;
# First, create a bunch of folders, starting in the root of your mod folder:&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;Languages&amp;gt;English&amp;gt;Keyed&amp;lt;/small&amp;gt;&lt;br /&gt;
# Next, create a new file called PlagueGun_Keys.xml, with our favorite header.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# This will be really quick. Add the opening and closing &amp;lt;code&amp;gt;&amp;lt;LanguageData&amp;gt;&amp;lt;/code&amp;gt; tags:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# And, finally, add translations for the two keys used in the projectile class.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TST_PlagueBullet_FailureMote&amp;gt;Failure: {0} chance&amp;lt;/TST_PlagueBullet_FailureMote&amp;gt;&lt;br /&gt;
&amp;lt;TST_PlagueBullet_SuccessMessage&amp;gt;{0} infected {1} with the plague!&amp;lt;/TST_PlagueBullet_SuccessMessage&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* The &amp;lt;code&amp;gt;{0}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;{1}&amp;lt;/code&amp;gt; in these keys will be replaced with the first and second arguments, respectively, of the &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; calls. For reference:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
// successful hit message&lt;br /&gt;
&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(this.launcher.Label, hitPawn.Label)&lt;br /&gt;
// unsuccessful hit mote&lt;br /&gt;
&amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* If you give &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; more arguments, you can use &amp;lt;code&amp;gt;{2}&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{3}&amp;lt;/code&amp;gt;, &amp;amp;c.&lt;br /&gt;
#* Note that, since you only passed one argument to the failure message, &amp;lt;code&amp;gt;{1}&amp;lt;/code&amp;gt; would not be replaced with anything.&lt;br /&gt;
# Your PlagueGun_Keys.xml file should look like this:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;LanguageData&amp;gt;&lt;br /&gt;
	&amp;lt;TST_PlagueBullet_FailureMote&amp;gt;Failure: {0} chance&amp;lt;/TST_PlagueBullet_FailureMote&amp;gt;&lt;br /&gt;
	&amp;lt;TST_PlagueBullet_SuccessMessage&amp;gt;{0} infected {1} with the plague!&amp;lt;/TST_PlagueBullet_SuccessMessage&amp;gt;&lt;br /&gt;
&amp;lt;/LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Next Steps ==&lt;br /&gt;
This concludes this tutorial. Congratulations on making it this far; you now have a solid understanding of XML and C# modding, and of connecting these two. There's a lot more to learn, especially on the C# end, so make sure to practice. If you have any questions don't hesitate to hit up the [https://discord.gg/UTaMDWc Discord]#mod-development or the [https://ludeon.com/forums/index.php?board=14.0 forums] for help.&lt;br /&gt;
&lt;br /&gt;
As for this mod, you might want to add custom textures or sounds. For your next, you might want to try messing around with [[Modding Tutorials/Harmony|Harmony]] or see other [[Modding Tutorials|tutorials]] for inspiration.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Modding Tutorials/Setting up a solution|Setting up a solution]]&lt;br /&gt;
* [[Modding Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding Tutorials/Harmony|Harmony]]&lt;br /&gt;
* [[Modding_Tutorials/Mod_folder_structure#The_Languages_folder|Language support]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
* This tutorial is a rewrite of the original by Jecrell (see also original forum {{LudeonThread|33219}})&lt;br /&gt;
&lt;br /&gt;
[[Category: Modding tutorials]]&lt;br /&gt;
[[Category: Modding]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Plague_Gun&amp;diff=172178</id>
		<title>Modding Tutorials/Plague Gun</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Plague_Gun&amp;diff=172178"/>
		<updated>2025-11-22T16:58:32Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* C# Workspace Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a tutorial for taking an item [[mod]] from conception all the way to completion, touching on most systems involved in RimWorld modding and explaining each step.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will be using most of the tools available to a Rimworld [[Modding|modder]] to create a custom weapon, known as the Plague Gun.&lt;br /&gt;
&lt;br /&gt;
This weapon will, when its shots hit a living target, have a chance to apply the [[Plague]] hediff (&amp;quot;health difference&amp;quot;) to that target.&lt;br /&gt;
&lt;br /&gt;
To do this, we will create XML ThingDefs for the gun and projectile, create a C# assembly which determines what happens when the projectile hits a target, and link that behavior back to the XML.&lt;br /&gt;
&lt;br /&gt;
This tutorial will assume a basic familiarity with XML and C# syntax. It should be simple enough to follow if you're only a beginner. &lt;br /&gt;
&lt;br /&gt;
If you have no XML or C# experience, there are good tutorials for XML [https://www.w3schools.com/xml/ here] and C# [https://www.learncs.org/ here].&lt;br /&gt;
&lt;br /&gt;
=== The Completed Mod ===&lt;br /&gt;
For a working example, check out [https://github.com/dninemfive/PlagueGun this GitHub repo].&lt;br /&gt;
&lt;br /&gt;
== Required Items ==&lt;br /&gt;
&lt;br /&gt;
Make sure to have the following installed, at least one per row:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [https://code.visualstudio.com/ VSCode] || A text editor that allows you to edit XML files and use &amp;quot;Find in Files&amp;quot; for referencing.&lt;br /&gt;
|-&lt;br /&gt;
| [https://visualstudio.microsoft.com/vs/community/ Visual Studio Community] || Use this or any other C# compiler to turn scripts into .dll files that RimWorld can use.&lt;br /&gt;
|-&lt;br /&gt;
| [https://github.com/icsharpcode/ILSpy/releases ILSpy]|| This is for referencing the game's decompiled C# scripts.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more detailed recommendations, see [[Modding Tutorials/Recommended software|here]].&lt;br /&gt;
&lt;br /&gt;
== XML Stage ==&lt;br /&gt;
&lt;br /&gt;
In this stage we will set up the mod and create XML files which add our things to the database.&lt;br /&gt;
&lt;br /&gt;
# Locate your RimWorld folder.&lt;br /&gt;
#* On Steam, you can find it by right-clicking the game in your games list &amp;gt; Properties &amp;gt; Local Files &amp;gt; Browse Local Files...&lt;br /&gt;
#** By default, it will be located at &amp;lt;code&amp;gt;C:\Program Files (x86)\Steam\steamapps\common\RimWorld&amp;lt;/code&amp;gt; if you bought it through Steam on Windows.&lt;br /&gt;
#* If you bought the DRM-free version, it will be located wherever you unzipped it.&lt;br /&gt;
#* On GOG, you can find it by right-clicking the game in your games list &amp;gt; Manage Installation &amp;gt; Show Folder&lt;br /&gt;
#** By default it will be located at &amp;lt;code&amp;gt;C:\Program Files (x86)\GOG Galaxy\Games\RimWorld&amp;lt;/code&amp;gt; if you bought it through GOG on Windows.&lt;br /&gt;
# Create a &amp;lt;code&amp;gt;Mods&amp;lt;/code&amp;gt; folder (if it doesn't already exist).&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;lt;/small&amp;gt;&lt;br /&gt;
#* Go into the Mods folder.&lt;br /&gt;
#* Make a new folder with our mod's title: '''PlagueGun'''&lt;br /&gt;
# Inside '''PlagueGun''', make an '''About''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;lt;/small&amp;gt;&lt;br /&gt;
# Inside the '''About''' folder, make a new text file and rename it About.xml.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;gt;About.xml&amp;lt;/small&amp;gt;&lt;br /&gt;
#* You will need a good text editor to make a proper XML file -- see [[#Required Items|required items]]. I always make a .txt file first and change it to .xml. If you can't rename your file's type, make sure you have filetypes visible in your operating system's file view settings.&lt;br /&gt;
#* [[About.xml]] is the file that shows your mod in the mod list inside the RimWorld game. It is also used when creating a Workshop upload for Steam.&lt;br /&gt;
#* At the top of an XML file, always include this for RimWorld. It basically just gives the game some info about how to read the file. &amp;lt;source lang = &amp;quot;xml&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;/source&amp;gt; ''Note: the'' version '' tag should always be &amp;quot;1.0&amp;quot;. It has no relation with the current RimWorld version.''&lt;br /&gt;
#* Then add the MetaData tags for the Workshop and in-game Mod list.&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;ModMetaData&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;Test Mod - Plague Gun&amp;lt;/name&amp;gt; &amp;lt;!-- The name of your mod in the mod list --&amp;gt;&lt;br /&gt;
  &amp;lt;author&amp;gt;YourNameHere&amp;lt;/author&amp;gt;&lt;br /&gt;
  &amp;lt;packageId&amp;gt;YourNameHere.PlagueGun&amp;lt;/packageId&amp;gt; &amp;lt;!-- a unique identifier for your mod. Must contain only a-z and periods, no spaces. --&amp;gt;&lt;br /&gt;
  &amp;lt;supportedVersions&amp;gt; &amp;lt;!-- the version(s) your mod supports --&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1.1&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/supportedVersions&amp;gt;&lt;br /&gt;
  &amp;lt;description&amp;gt;This mod adds a plague gun, a weapon that has a chance to give your enemies the plague.\n\nFor version 1.1.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/ModMetaData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* Save the file.&lt;br /&gt;
# Add a Preview.png or Preview.jpeg to your '''About''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;About&amp;gt;Preview.png&amp;lt;/small&amp;gt;&lt;br /&gt;
#* This lets users see what your mod looks like in the RimWorld mod list or on the Steam Workshop.&lt;br /&gt;
#* The conventional dimensions to fit the preview image on Steam are 640x360. The image must be smaller than 1mb. &lt;br /&gt;
#* Example: [[File:Preview.png]]&lt;br /&gt;
# Make a '''Defs''' folder in your Mod's directory.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;lt;/small&amp;gt;&lt;br /&gt;
#* RimWorld will read your XML files in any subdirectory of '''Defs'''. You can name your directories however you like under that folder. Defs&amp;gt;StrangeNewAlienGuns&amp;gt;MyGuns.xml will work. For the purposes of this tutorial, however, we will use the RimWorld standard structure.&lt;br /&gt;
#* What are Defs? Main article: [[Modding Tutorials/XML Defs|Defs]]&lt;br /&gt;
#** RimWorld uses things called Defs (short for &amp;quot;definitions&amp;quot;) like blueprints for in-game objects. Instead of using hidden C# code, RimWorld will look up an XML Def and copy it to the game world. This makes things easier for us, the modders. Everything from characters, animals, floors, damages, buildings, and even diseases in RimWorld use Defs. We're going to make Defs for our Plague Gun and Plague Bullet.&lt;br /&gt;
# Make a new '''ThingDefs''' folder in your '''Defs''' folder.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;gt;ThingDefs&amp;lt;/small&amp;gt;&lt;br /&gt;
# Make a new text file in your '''ThingDefs''' folder, and change it to RangedWeapon_PlagueGun.xml.&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Defs&amp;gt;ThingDefs&amp;gt;RangedWeapon_PlagueGun.xml&amp;lt;/small&amp;gt;&lt;br /&gt;
#* This file will contain the blueprints (ThingDefs) for our new gun and bullets.&lt;br /&gt;
#* Next we will fill out our XML file by copying an existing revolver's ThingDef and a revolver bullet ThingDef.&lt;br /&gt;
#* In RimWorld, it is often best to use the XML attribute &amp;lt;code&amp;gt;ParentName=&amp;quot;BaseBullet&amp;quot;&amp;lt;/code&amp;gt; when making a bullet, because it will copy XML code from a pre-existing BaseBullet ThingDef, which can save us time and key taps. Main article: [[Modding Tutorials/XML file structure#Inheritance|Inheritance]]&lt;br /&gt;
# First, add our favourite line to the top.&amp;lt;source lang = &amp;quot;xml&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
# Add the &amp;lt;code&amp;gt;&amp;lt;Defs&amp;gt;&amp;lt;/code&amp;gt; opening and closing tags to the XML to hold our new code.&amp;lt;source lang = &amp;quot;xml&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Use your text editor. Use its &amp;quot;Find in Files&amp;quot; function to reference and copy Bullet_Revolver to your XML file.&lt;br /&gt;
#* Find in Files is one of my most-used functions. In Notepad++, if you press CTRL+SHIFT+F, you can go to the Find in Files screen. From there, you can enter a phrase to search for, and then you can enter the file path to search through. This makes it wildly easier to search for examples in RimWorld's Core. RimWorld holds copies of all of its weapons, items, buildings, etc. inside the Mods/Core directory.&lt;br /&gt;
#* So, start by using Find in Files... and find this: &amp;lt;code&amp;gt;defName&amp;gt;Bullet_Revolver&amp;lt;/code&amp;gt;&lt;br /&gt;
#* When you find Bullet_Revolver, copy from its beginning &amp;lt;code&amp;gt;&amp;lt;ThingDef&amp;gt;&amp;lt;/code&amp;gt; all the way until its closing &amp;lt;code&amp;gt;&amp;lt;/ThingDef&amp;gt;&amp;lt;/code&amp;gt; tag into your XML File.&lt;br /&gt;
# Use your text editor's &amp;quot;Find in Files&amp;quot; function to reference and copy Gun_Revolver to your XML file.&lt;br /&gt;
#* Typically, Gun_Revolver is right below Bullet_Revolver in XML, so hopefully this will be easy to find and copy.&lt;br /&gt;
#* Again, copy the ThingDef block to your new XML file.&lt;br /&gt;
# Change the defName, labels, and other stats of Bullet_Revolver and Revolver in your XML file to make them unique.&lt;br /&gt;
#* '''A word on defNames:''' &amp;lt;code&amp;gt;defName&amp;lt;/code&amp;gt;s are how the game references defs anywhere they're used in XML, since they're unique. When telling your plague gun to fire plague bullets, for instance, set its &amp;lt;code&amp;gt;defaultProjectile&amp;lt;/code&amp;gt; to your projectile's defName, like so:&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;defaultProjectile&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defaultProjectile&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''TIP:''' Use prefixes to avoid conflicting with other mods. RimWorld will overwrite any def with &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt;, for instance, if it finds another with the same defName. If two modders use different prefixes, however, e.g. &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;VGP_Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;defName&amp;gt;ROM_Tobacco&amp;lt;/defName&amp;gt;&amp;lt;/code&amp;gt;, no conflict will occur, and both mods can co-exist. This tutorial uses TST_ for its example prefix. Main article: [[Modding_Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
#* By contrast, labels, descriptions, and other non-defName tags can generally be non-unique without a risk of conflicts, except perhaps confusion for the end user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;'''If all you were interested in is making a gun mod, you are done.'''&amp;lt;/big&amp;gt; You'll of course want to edit values like the damage it does, and [[Modding_Tutorials/Testing_mods|test your mod]]. You'll also want to change the &amp;lt;code&amp;gt;texturePath&amp;lt;/code&amp;gt; to your unique art, and whatever else.&lt;br /&gt;
&lt;br /&gt;
=== Completed Example ===&lt;br /&gt;
&lt;br /&gt;
''Note'': The example is up-to-date for [[Version|1.3]] and will likely be outdated in the future. The above steps should always be relevant.&lt;br /&gt;
&amp;lt;source lang =&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;Defs&amp;gt;&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;BaseBullet&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;defName&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defName&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;plague bullet&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;graphicData&amp;gt;&lt;br /&gt;
      &amp;lt;texPath&amp;gt;Things/Projectile/Bullet_Small&amp;lt;/texPath&amp;gt;&lt;br /&gt;
      &amp;lt;graphicClass&amp;gt;Graphic_Single&amp;lt;/graphicClass&amp;gt;&lt;br /&gt;
    &amp;lt;/graphicData&amp;gt;&lt;br /&gt;
    &amp;lt;projectile&amp;gt;&lt;br /&gt;
      &amp;lt;damageDef&amp;gt;Bullet&amp;lt;/damageDef&amp;gt;&lt;br /&gt;
      &amp;lt;damageAmountBase&amp;gt;12&amp;lt;/damageAmountBase&amp;gt;&lt;br /&gt;
      &amp;lt;stoppingPower&amp;gt;1&amp;lt;/stoppingPower&amp;gt;&lt;br /&gt;
      &amp;lt;speed&amp;gt;55&amp;lt;/speed&amp;gt;&lt;br /&gt;
    &amp;lt;/projectile&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;ThingDef ParentName=&amp;quot;BaseHumanMakeableGun&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;defName&amp;gt;TST_Gun_PlagueGun&amp;lt;/defName&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;plague gun&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;A curious weapon notable for its horrible health effects.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;graphicData&amp;gt;&lt;br /&gt;
      &amp;lt;texPath&amp;gt;Things/Item/Equipment/WeaponRanged/Revolver&amp;lt;/texPath&amp;gt;&lt;br /&gt;
      &amp;lt;graphicClass&amp;gt;Graphic_Single&amp;lt;/graphicClass&amp;gt;&lt;br /&gt;
    &amp;lt;/graphicData&amp;gt;&lt;br /&gt;
    &amp;lt;uiIconScale&amp;gt;1.4&amp;lt;/uiIconScale&amp;gt;&lt;br /&gt;
    &amp;lt;soundInteract&amp;gt;Interact_Revolver&amp;lt;/soundInteract&amp;gt;&lt;br /&gt;
    &amp;lt;thingSetMakerTags&amp;gt;&amp;lt;li&amp;gt;RewardStandardQualitySuper&amp;lt;/li&amp;gt;&amp;lt;/thingSetMakerTags&amp;gt;&lt;br /&gt;
    &amp;lt;statBases&amp;gt;&lt;br /&gt;
      &amp;lt;WorkToMake&amp;gt;4000&amp;lt;/WorkToMake&amp;gt;&lt;br /&gt;
      &amp;lt;Mass&amp;gt;1.4&amp;lt;/Mass&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyTouch&amp;gt;0.80&amp;lt;/AccuracyTouch&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyShort&amp;gt;0.75&amp;lt;/AccuracyShort&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyMedium&amp;gt;0.45&amp;lt;/AccuracyMedium&amp;gt;&lt;br /&gt;
      &amp;lt;AccuracyLong&amp;gt;0.35&amp;lt;/AccuracyLong&amp;gt;&lt;br /&gt;
      &amp;lt;RangedWeapon_Cooldown&amp;gt;1.6&amp;lt;/RangedWeapon_Cooldown&amp;gt;&lt;br /&gt;
    &amp;lt;/statBases&amp;gt;&lt;br /&gt;
    &amp;lt;weaponTags&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;SimpleGun&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Revolver&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/weaponTags&amp;gt;&lt;br /&gt;
    &amp;lt;weaponClasses&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;RangedLight&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/weaponClasses&amp;gt;&lt;br /&gt;
    &amp;lt;costList&amp;gt;&lt;br /&gt;
      &amp;lt;Steel&amp;gt;30&amp;lt;/Steel&amp;gt;&lt;br /&gt;
      &amp;lt;ComponentIndustrial&amp;gt;2&amp;lt;/ComponentIndustrial&amp;gt;&lt;br /&gt;
    &amp;lt;/costList&amp;gt;&lt;br /&gt;
    &amp;lt;recipeMaker&amp;gt;&lt;br /&gt;
      &amp;lt;skillRequirements&amp;gt;&lt;br /&gt;
        &amp;lt;Crafting&amp;gt;3&amp;lt;/Crafting&amp;gt;&lt;br /&gt;
      &amp;lt;/skillRequirements&amp;gt;&lt;br /&gt;
    &amp;lt;/recipeMaker&amp;gt;&lt;br /&gt;
    &amp;lt;verbs&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;verbClass&amp;gt;Verb_Shoot&amp;lt;/verbClass&amp;gt;&lt;br /&gt;
        &amp;lt;hasStandardCommand&amp;gt;true&amp;lt;/hasStandardCommand&amp;gt;&lt;br /&gt;
        &amp;lt;defaultProjectile&amp;gt;TST_Bullet_PlagueGun&amp;lt;/defaultProjectile&amp;gt;&lt;br /&gt;
        &amp;lt;warmupTime&amp;gt;0.3&amp;lt;/warmupTime&amp;gt;&lt;br /&gt;
        &amp;lt;range&amp;gt;25.9&amp;lt;/range&amp;gt;&lt;br /&gt;
        &amp;lt;soundCast&amp;gt;Shot_Revolver&amp;lt;/soundCast&amp;gt;&lt;br /&gt;
        &amp;lt;soundCastTail&amp;gt;GunTail_Light&amp;lt;/soundCastTail&amp;gt;&lt;br /&gt;
        &amp;lt;muzzleFlashScale&amp;gt;9&amp;lt;/muzzleFlashScale&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/verbs&amp;gt;&lt;br /&gt;
    &amp;lt;tools&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;label&amp;gt;grip&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;capacities&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Blunt&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;/capacities&amp;gt;&lt;br /&gt;
        &amp;lt;power&amp;gt;9&amp;lt;/power&amp;gt;&lt;br /&gt;
        &amp;lt;cooldownTime&amp;gt;2&amp;lt;/cooldownTime&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&lt;br /&gt;
        &amp;lt;label&amp;gt;barrel&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;capacities&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Blunt&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Poke&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;/capacities&amp;gt;&lt;br /&gt;
        &amp;lt;power&amp;gt;9&amp;lt;/power&amp;gt;&lt;br /&gt;
        &amp;lt;cooldownTime&amp;gt;2&amp;lt;/cooldownTime&amp;gt;&lt;br /&gt;
      &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/tools&amp;gt;&lt;br /&gt;
  &amp;lt;/ThingDef&amp;gt;&lt;br /&gt;
&amp;lt;/Defs&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C# Workspace Setup ==&lt;br /&gt;
{{Main|Modding Tutorials/Setting up a solution}}&lt;br /&gt;
&lt;br /&gt;
Next, we will set up a workspace to write C# code, which is a little bit more involved than just using a text editor.&lt;br /&gt;
&lt;br /&gt;
# Open your compiler of choice for C#.&lt;br /&gt;
#* This tutorial will assume you're using Visual Studio Community Edition, a free Windows-based compiler for C# code.&lt;br /&gt;
# Make a new Visual C# Class Library .NET Framework project. Name it PlagueGun. Make its directory RimWorld&amp;gt;Mods&amp;gt;PlagueGun&amp;gt;Source&lt;br /&gt;
#* File → New → Project → Class Library (.NET Framework).&lt;br /&gt;
#* Don't get this confused with &amp;quot;Class Library (.NET Standard)&amp;quot; or &amp;quot;Class Library (.NET Core)&amp;quot;!&lt;br /&gt;
# Go into the project properties. &lt;br /&gt;
#* Project → PlagueGun Properties.&lt;br /&gt;
# In that window, change the Target Framework version to .NET Framework 4.7.2&lt;br /&gt;
#* Forgetting to do this will cause lots of errors.&lt;br /&gt;
#* Select Yes when it asks you if you're sure to change the framework.&lt;br /&gt;
# While still in Properties, go to the '''Build''' tab.&lt;br /&gt;
# Change the output path to be RimWorld\Mods\PlagueGun\Assemblies&lt;br /&gt;
#* All .dll files will go into this directory when we &amp;quot;build&amp;quot; our code library.&lt;br /&gt;
# In that same window, click the Advanced... button.&lt;br /&gt;
# In Solution Explorer. Go into Properties and edit AssemblyInfo.cs. Change the name of your assembly and assembly file version number as you like.&lt;br /&gt;
#* This doesn't have to all be the same as your namespace, but it doesn't hurt to be consistent.&lt;br /&gt;
# In the main option bar at the top of the visual studio (File, Edit, View...), click Project, and click Add Reference.&lt;br /&gt;
# Click Browse at the bottom right corner of the window and go to RimWorld\RimWorldWin64_Data\Managed&lt;br /&gt;
# Add references to Assembly-CSharp.dll, UnityEngine.dll, and UnityEngine.CoreModule.dll.&lt;br /&gt;
#* In 1.1 the Unity DLLs were split up and are no longer all contained in the same module.&lt;br /&gt;
#* For our purposes we only need UnityEngine.CoreModule.dll, as it contains some code we will use later.&lt;br /&gt;
#* In general, it's also a good idea to add UnityEngine.dll, which allows Visual Studio to tell you which modules you're missing if you get related errors.&lt;br /&gt;
# In the Solution Explorer (typically on the right side of the application), look at the references drop down list.&lt;br /&gt;
# Select Assembly-CSharp. Check the Properties section (usually under Solution Explorer). Make sure the properties section has Copy Local set to FALSE.&lt;br /&gt;
# Do this (Copy Local to FALSE) for UnityEngine and UnityEngine.CoreModule as well.&lt;br /&gt;
#* By doing this, we prevent the project from causing one million hash conflicts by copying the entire game's code twice!&lt;br /&gt;
&lt;br /&gt;
Now the workspace setup is complete and we can add C# code to RimWorld.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Exact folder names might differ between installs. The naming scheme differs slightly between the DRM-free and Steam version of the mod.&lt;br /&gt;
&lt;br /&gt;
== C# Coding ==&lt;br /&gt;
&lt;br /&gt;
Now let's start writing the code we'll need to add custom behavior to our projectiles.&lt;br /&gt;
&lt;br /&gt;
=== Getting Started ===&lt;br /&gt;
# Open Class1.cs in the sidebar, usually on the right in Visual Studio.&lt;br /&gt;
# Right-click and rename the .cs file to your liking.&lt;br /&gt;
# Add these lines to the top this file (and every .cs file you make from now on for modding RimWorld).&amp;lt;source lang =&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
using Verse;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* These tell the code you're working with RimWorld. Without these, our code will not be able to understand references to RimWorld code.&lt;br /&gt;
# Add a namespace line. By default, this is your project name. Take note - you will need this to connect to XML later.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' ''Using a prefix on the namespace is not required, but it's good for consistency and in the rare case they may overlap - such as when multiple people follow the same tutorial to learn how to mod.''&lt;br /&gt;
&lt;br /&gt;
=== Connecting XML and C#, Part 1 ===&lt;br /&gt;
{{Main|Modding Tutorials/DefModExtension}}&lt;br /&gt;
&lt;br /&gt;
# First, let's add a way to read XML data into your assembly.&lt;br /&gt;
# Rename public class Class1 to ModExtension_PlagueBullet and make it inherit DefModExtension. As a reminder, inheritance looks like this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public class ModExtension_PlagueBullet : DefModExtension&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Renaming things in an IDE like Visual Studio is best done by pressing F2 or right-clicking the item/name. Doing it like that will change all occurrences of that thing, so everything that references your namespace or Class1 will now use the new name.&lt;br /&gt;
# Add the following fields in ModExtension_PlagueBullet:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public float addHediffChance = 0.05f;&lt;br /&gt;
public HediffDef hediffToAdd;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* Here, we're giving the field addHediffChance a default value, which means it doesn't need to be set explicitly in XML.&lt;br /&gt;
#* '''Note:''' Standard modding practice is to give fields exposed to XML camelCase names, for consistency with vanilla XML.&lt;br /&gt;
# Now let's add the XML which connects to this ModExtension. In your TST_Bullet_PlagueGun def, add the following lines: &amp;lt;source lang=&amp;quot;XML&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;modExtensions&amp;gt;&lt;br /&gt;
    &amp;lt;li Class=&amp;quot;TST_PlagueGun.ModExtension_PlagueBullet&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;addHediffChance&amp;gt;0.05&amp;lt;/addHediffChance&amp;gt;&lt;br /&gt;
        &amp;lt;hediffToAdd&amp;gt;Plague&amp;lt;/hediffToAdd&amp;gt;&lt;br /&gt;
    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/modExtensions&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Note the XML tags match the names of the fields in the C# class. This allows the XML to provide data to the program.  When the mod is loaded, the XML will be read, and used to fill in the corresponding fields.&lt;br /&gt;
#* Additionally, take care to note you can set the value of addHediffChance to any valid floating point number and it will be reflected in-game. The value given in C# is only the default value if unset.&lt;br /&gt;
&lt;br /&gt;
=== Writing the Projectile === &lt;br /&gt;
# Let's make the actual projectile. For this tutorial, we're going to make a new projectile that checks for impact and adds a Hediff (health differential - poison, toxins, implants, anything).&lt;br /&gt;
# First, create a new .cs file by right-clicking the PlagueGun part of the Solution Explorer and selecting Add &amp;gt; New Item.&lt;br /&gt;
#* '''Note:''' in C#, you can have multiple class definitions in a single file. We're just making a new file for organizational purposes.&lt;br /&gt;
# Make your new class inherit the Bullet class (a child of the Projectile class), so the game will treat your new projectile like a bullet and not throw (fun) errors. &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# First, let's connect our new projectile to the relevant ModExtension: &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public ModExtension_PlagueBullet Props =&amp;gt; def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* This line is a Property, basically a method which doesn't take any arguments, and can generally speaking be treated as a variable. See [https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties this article] for more details.&lt;br /&gt;
# Now, let's start the actual core code of this mod. Let's begin by overriding the Impact method on the base Bullet class, like so: &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* The &amp;lt;code&amp;gt;override&amp;lt;/code&amp;gt; keyword tells the compiler that we're replacing the functionality of the &amp;lt;code&amp;gt;Impact&amp;lt;/code&amp;gt; method from the &amp;lt;code&amp;gt;Bullet&amp;lt;/code&amp;gt; class we're inheriting from.&lt;br /&gt;
# First, let's call the base version of this method so we don't need to rewrite all the logic about damaging a pawn - we only care about adding the hediff ''after'' damage occurs. &amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
base.Impact(hitThing, blockedByShield);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Next, we check to make sure the ModExtension was properly loaded, that we hit something, and that what we hit was a [[Pawns|Pawn]].&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' Null checking is a very important skill, especially for Rimworld modding. If you ever get a &amp;lt;code&amp;gt;NullReferenceException&amp;lt;/code&amp;gt;, check to make sure you're correctly handling null values.&lt;br /&gt;
#* Also, note that we initialize a &amp;lt;code&amp;gt;Pawn&amp;lt;/code&amp;gt; version of the &amp;lt;code&amp;gt;hitThing&amp;lt;/code&amp;gt; while checking its type; we'll use this later. This statement ''also'' null-checks this new variable, in case you were wondering.&lt;br /&gt;
# Now that we know we hit a pawn, we generate a random number to see whether to apply the hediff.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
float rand = Rand.Value;&lt;br /&gt;
if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* &amp;lt;code&amp;gt;Rand&amp;lt;/code&amp;gt; is the base game's randomness generation class. &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt; grabs the next random number between 0 and 1 and updates the class.&lt;br /&gt;
# If a hediff is applied, we want to alert the player, so we create a message in the top-left of the screen.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
	this.launcher.Label, hitPawn.Label&lt;br /&gt;
), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# Before adding the hediff, we need to check if the pawn already has it, so we get the hediff from the pawn, if it exists.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* '''Note:''' The &amp;lt;code&amp;gt;?.&amp;lt;/code&amp;gt; is called the [https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators#null-conditional-operators--and- null conditional operator]. It's basically an in-line null check; if the hit pawn's health tracker (&amp;lt;code&amp;gt;health&amp;lt;/code&amp;gt;) or hediff set (&amp;lt;code&amp;gt;hediffSet&amp;lt;/code&amp;gt;) are null it sets &amp;lt;code&amp;gt;plagueOnPawn&amp;lt;/code&amp;gt; to null instead of throwing an error.&lt;br /&gt;
# Now we finally add the hediff. If the pawn already has the plague we just increase its severity; otherwise, we create and add a new hediff with a random severity.&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
if (plagueOnPawn != null)&lt;br /&gt;
{&lt;br /&gt;
	plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
	Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
	hediff.Severity = randomSeverity;&lt;br /&gt;
	hitPawn.health.AddHediff(hediff);&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Whew. ====&lt;br /&gt;
Let's take a break and recap for a second. If you've followed the projectile section so far, this is the code you should have in your new .cs file:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using Verse;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
    public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
    {&lt;br /&gt;
        public ModExtension_PlagueBullet Props =&amp;gt; base.def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
        {&lt;br /&gt;
            base.Impact(hitThing, blockedByShield);&lt;br /&gt;
            if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
            {&lt;br /&gt;
                float rand = Rand.Value;&lt;br /&gt;
                if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
                {&lt;br /&gt;
                    Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
                        this.launcher.Label, hitPawn.Label&lt;br /&gt;
                    ), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
                    Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
                    float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
                    if (plagueOnPawn != null)&lt;br /&gt;
                    {&lt;br /&gt;
                        plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
                    }&lt;br /&gt;
                    else&lt;br /&gt;
                    {&lt;br /&gt;
                        Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
                        hediff.Severity = randomSeverity;&lt;br /&gt;
                        hitPawn.health.AddHediff(hediff);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Don't worry, we're almost finished. In fact, if you compile right now the gun ''will'' work - there just won't be any feedback if the shooter misses. This might be desirable, but let's add some feedback anyway.&lt;br /&gt;
&lt;br /&gt;
Well, that's a little bit of a lie. You'd also need to add the &amp;lt;code&amp;gt;&amp;lt;thingClass&amp;gt;&amp;lt;/code&amp;gt; node to the XML, given below.&lt;br /&gt;
&lt;br /&gt;
We want to add an &amp;lt;code&amp;gt;else&amp;lt;/code&amp;gt; block to our &amp;lt;code&amp;gt;if (rand &amp;lt;= Props.addHediffChance))&amp;lt;/code&amp;gt; statement. This is where keeping track of curly braces comes in; Visual Studio should draw vertical lines between the correct curlies. Add this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
    MoteMaker.ThrowText(hitThing.PositionHeld.ToVector3(), hitThing.MapHeld, &amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance), 12f);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* This throws a mote (particle effect, essentially), with text stating that the plague was not applied, at the target's position.&lt;br /&gt;
* Fun fact: the &amp;lt;code&amp;gt;.ToVector3()&amp;lt;/code&amp;gt; call is the entire reason we needed to reference UnityEngine and UnityEngine.CoreModule.&lt;br /&gt;
&lt;br /&gt;
=== Connecting XML and C#, Part 2 ===&lt;br /&gt;
Finally, we need to make sure our projectile's def tells the game to use our new Projectile_PlagueBullet class instead of Bullet.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;thingClass&amp;gt;TST_PlagueGun.Projectile_PlagueBullet&amp;lt;/thingClass&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We're done! Your final Projectile_PlagueBullet class should look like this:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using Verse;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
&lt;br /&gt;
namespace TST_PlagueGun&lt;br /&gt;
{&lt;br /&gt;
    public class Projectile_PlagueBullet : Bullet&lt;br /&gt;
    {&lt;br /&gt;
        public ModExtension_PlagueBullet Props =&amp;gt; base.def.GetModExtension&amp;lt;ModExtension_PlagueBullet&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        protected override void Impact(Thing hitThing, bool blockedByShield = false)&lt;br /&gt;
        {&lt;br /&gt;
            base.Impact(hitThing, blockedByShield);&lt;br /&gt;
            if (Props != null &amp;amp;&amp;amp; hitThing != null &amp;amp;&amp;amp; hitThing is Pawn hitPawn)&lt;br /&gt;
            {&lt;br /&gt;
                float rand = Rand.Value;&lt;br /&gt;
                if (rand &amp;lt;= Props.addHediffChance)&lt;br /&gt;
                {&lt;br /&gt;
                    Messages.Message(&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(&lt;br /&gt;
                        this.launcher.Label, hitPawn.Label&lt;br /&gt;
                    ), MessageTypeDefOf.NeutralEvent);&lt;br /&gt;
                    Hediff plagueOnPawn = hitPawn.health?.hediffSet?.GetFirstHediffOfDef(Props.hediffToAdd);&lt;br /&gt;
                    float randomSeverity = Rand.Range(0.15f, 0.30f);&lt;br /&gt;
                    if (plagueOnPawn != null)&lt;br /&gt;
                    {&lt;br /&gt;
                        plagueOnPawn.Severity += randomSeverity;&lt;br /&gt;
                    }&lt;br /&gt;
                    else&lt;br /&gt;
                    {&lt;br /&gt;
                        Hediff hediff = HediffMaker.MakeHediff(Props.hediffToAdd, hitPawn);&lt;br /&gt;
                        hediff.Severity = randomSeverity;&lt;br /&gt;
                        hitPawn.health.AddHediff(hediff);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
                else&lt;br /&gt;
                {&lt;br /&gt;
                    MoteMaker.ThrowText(hitThing.PositionHeld.ToVector3(), hitThing.MapHeld, &amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance), 12f);&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Just compile and test your work; the plague will be properly applied and everything.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Code you write on your own should not look like this - for one thing, it should be well-commented so that others (even if it's just you in the future) know exactly what you're trying to do and how you're doing it. The code [https://github.com/dninemfive/PlagueGun/blob/master/PlagueGun/Projectile_PlagueBullet.cs in the repo] is probably over-commented and designed for a general audience but I recommend reviewing it.&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
...well, almost. If you did test the gun just now, you'll have seen that the text was all distorted, using special characters which looked like the normal ones instead of text you expected. This is because of the use of &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; on keys which do not have translations in the language database. We just need to add those, and we'll be all set!&lt;br /&gt;
&lt;br /&gt;
# First, create a bunch of folders, starting in the root of your mod folder:&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;nowiki /&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;small&amp;gt;Languages&amp;gt;English&amp;gt;Keyed&amp;lt;/small&amp;gt;&lt;br /&gt;
# Next, create a new file called PlagueGun_Keys.xml, with our favorite header.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# This will be really quick. Add the opening and closing &amp;lt;code&amp;gt;&amp;lt;LanguageData&amp;gt;&amp;lt;/code&amp;gt; tags:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
# And, finally, add translations for the two keys used in the projectile class.&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TST_PlagueBullet_FailureMote&amp;gt;Failure: {0} chance&amp;lt;/TST_PlagueBullet_FailureMote&amp;gt;&lt;br /&gt;
&amp;lt;TST_PlagueBullet_SuccessMessage&amp;gt;{0} infected {1} with the plague!&amp;lt;/TST_PlagueBullet_SuccessMessage&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* The &amp;lt;code&amp;gt;{0}&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;{1}&amp;lt;/code&amp;gt; in these keys will be replaced with the first and second arguments, respectively, of the &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; calls. For reference:&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
// successful hit message&lt;br /&gt;
&amp;quot;TST_PlagueBullet_SuccessMessage&amp;quot;.Translate(this.launcher.Label, hitPawn.Label)&lt;br /&gt;
// unsuccessful hit mote&lt;br /&gt;
&amp;quot;TST_PlagueBullet_FailureMote&amp;quot;.Translate(Props.addHediffChance)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
#* If you give &amp;lt;code&amp;gt;.Translate()&amp;lt;/code&amp;gt; more arguments, you can use &amp;lt;code&amp;gt;{2}&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;{3}&amp;lt;/code&amp;gt;, &amp;amp;c.&lt;br /&gt;
#* Note that, since you only passed one argument to the failure message, &amp;lt;code&amp;gt;{1}&amp;lt;/code&amp;gt; would not be replaced with anything.&lt;br /&gt;
# Your PlagueGun_Keys.xml file should look like this:&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
&amp;lt;LanguageData&amp;gt;&lt;br /&gt;
	&amp;lt;TST_PlagueBullet_FailureMote&amp;gt;Failure: {0} chance&amp;lt;/TST_PlagueBullet_FailureMote&amp;gt;&lt;br /&gt;
	&amp;lt;TST_PlagueBullet_SuccessMessage&amp;gt;{0} infected {1} with the plague!&amp;lt;/TST_PlagueBullet_SuccessMessage&amp;gt;&lt;br /&gt;
&amp;lt;/LanguageData&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Next Steps ==&lt;br /&gt;
This concludes this tutorial. Congratulations on making it this far; you now have a solid understanding of XML and C# modding, and of connecting these two. There's a lot more to learn, especially on the C# end, so make sure to practice. If you have any questions don't hesitate to hit up the [https://discord.gg/UTaMDWc Discord]#mod-development or the [https://ludeon.com/forums/index.php?board=14.0 forums] for help.&lt;br /&gt;
&lt;br /&gt;
As for this mod, you might want to add custom textures or sounds. For your next, you might want to try messing around with [[Modding Tutorials/Harmony|Harmony]] or see other [[Modding Tutorials|tutorials]] for inspiration.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Modding Tutorials/Setting up a solution|Setting up a solution]]&lt;br /&gt;
* [[Modding Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding Tutorials/Harmony|Harmony]]&lt;br /&gt;
* [[Modding_Tutorials/Mod_folder_structure#The_Languages_folder|Language support]]&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
* This tutorial is a rewrite of the original by Jecrell (see also original forum {{LudeonThread|33219}})&lt;br /&gt;
&lt;br /&gt;
[[Category: Modding tutorials]]&lt;br /&gt;
[[Category: Modding]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Setting_up_a_solution&amp;diff=172177</id>
		<title>Modding Tutorials/Setting up a solution</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Setting_up_a_solution&amp;diff=172177"/>
		<updated>2025-11-22T16:47:18Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* Option 1 (Manual Method): */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Setting Up a Solution}}&lt;br /&gt;
&lt;br /&gt;
{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
In this tutorial you will learn how to set up a solution, along with instructions on setting the output directory and files for more convenient building right into the Assemblies folder.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
&lt;br /&gt;
* The manual option in this tutorial requires you to have [[Modding_Tutorials/Mod_folder_structure#The Source and Assemblies folders|set up a Source and Assemblies folder]] (the Visual Studio automatic option sets this up for you).&lt;br /&gt;
* You will want to have an IDE installed: [[Modding Tutorials/Recommended software#IDE's|Recommended IDE's]].&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Setting up a solution=&lt;br /&gt;
Setting up can be different for different IDE's. Feel free to add '''''complete''''' instructions for your IDE of choice.&lt;br /&gt;
&lt;br /&gt;
===Visual Studio Community 2022===&lt;br /&gt;
''NOTE: Visual Studio 2022 is a rather heavy application (2-3 GB for basic functionality) but works out of the box. It is strongly recommended if you are on Windows and have a PC that can handle it. This tutorial is similar for other versions of Visual Studio.''&lt;br /&gt;
&lt;br /&gt;
First, ensure that you have the .NET desktop development workload feature installed. If you didn't select it during installation or if you aren't sure, you can click on Get Tools and Features under the Tools menu to check:&lt;br /&gt;
&lt;br /&gt;
[[File:Get Tools and Feature (VS2022).png|border|To verify that you have the proper module installed, click here.]]&lt;br /&gt;
&lt;br /&gt;
[[File:Workload Selection (VS2022).png|border|Make sure you have the &amp;quot;.NET desktop development&amp;quot; workload installed.]]&lt;br /&gt;
&lt;br /&gt;
==== Option 1 (Manual Method):====&lt;br /&gt;
# Create a new class library project&lt;br /&gt;
## Once loaded, go to File -&amp;gt; New -&amp;gt; Project...&lt;br /&gt;
## Type &amp;quot;Class Library (.NET Framework)&amp;quot; in the search bar, and select the C# option. [[File:ClassLibrary.png|200px|thumb|right|Installing the .NET framework]]&lt;br /&gt;
## Enter your project name.&lt;br /&gt;
## Choose a location, preferably:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;(RimWorldInstallFolder)/Mods/(YourModName)/Source&amp;lt;/pre&amp;gt;&lt;br /&gt;
## Enter a solution name (optionally, tick &amp;quot;Place solution and project in the same directory&amp;quot;)&lt;br /&gt;
## Make sure Framework is &amp;quot;.NET Framework 4.7.2&amp;quot;&lt;br /&gt;
# In your project, set target framework and various other properties&lt;br /&gt;
## In your Solution Explorer (the panel usually located on the right), right click your project -&amp;gt; Properties (or expand your project and double click &amp;quot;Properties&amp;quot; with the wrench icon)&lt;br /&gt;
## ''Optional'': Under Application, change your Assembly and Namespace names to anything of your choice&lt;br /&gt;
## ''Optional'': You can go to Build -&amp;gt; Advanced... and set &amp;quot;Debugging information&amp;quot; to &amp;quot;Embedded&amp;quot; or &amp;quot;Portable&amp;quot; to remove the extraneous PDB file while also retaining full debug information. You can also set it to &amp;quot;None&amp;quot; to make your DLL smaller, but error stacktraces will have less useful information.&lt;br /&gt;
## Leave Advanced..., and set the Output Path to &amp;quot;..\..\Assemblies\&amp;quot; (Or wherever the Assemblies folder is)&lt;br /&gt;
# Add references to RimWorld code&lt;br /&gt;
## Expand your project in Solution Explorer. Then right click &amp;quot;References&amp;quot; -&amp;gt; Add Reference...&lt;br /&gt;
## Click Browse...&lt;br /&gt;
## Navigate towards &amp;lt;pre&amp;gt;RimWorldInstallPath/RimWorld******_Data/Managed&amp;lt;/pre&amp;gt; and select files: &amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;Assembly-CSharp.dll&amp;amp;#10;UnityEngine.CoreModule.dll&amp;lt;/pre&amp;gt;&lt;br /&gt;
## Click &amp;quot;Add&amp;quot;&lt;br /&gt;
## Click &amp;quot;OK&amp;quot; to close the Reference Manager.&lt;br /&gt;
## Right-click on both Assembly-CSharp.dll and UnityEngine.dll and set Copy Local to False (Properties pane).&lt;br /&gt;
&lt;br /&gt;
====Option 2 (Using Nuget):====&lt;br /&gt;
This option uses [https://www.nuget.org/packages/Krafs.Rimworld.Ref Krafs Rimworld Reference Package] it is less involved than using reference assemblies and is the recommended method.&amp;lt;/br&amp;gt;&lt;br /&gt;
#Follow the above up till ''Add references to RimWorld code''&lt;br /&gt;
#From the Tools menu, select NuGet Package Manager -&amp;gt; Package Manager Settings.&lt;br /&gt;
##In the Settings dialog, under Package Management, change the ''Default package management format'' to '''PackageReference'''.&lt;br /&gt;
##Click OK to close the dialog.&lt;br /&gt;
#Open Nuget Manager and type ''Rimworld''&lt;br /&gt;
#Add Krafs Rimworld Reference&lt;br /&gt;
You can now continue as if you added the assemblies. Doing this makes your project portable, because RimRef can be downloaded by anyone and used from anywhere, unlike Rimworld's assemblies which can't be distributed.&lt;br /&gt;
&lt;br /&gt;
====Option 3 (Using Rimworld Dotnet Template):====&lt;br /&gt;
This option uses [https://github.com/Zeta-of-the-rim/Rimwold-Dotnet-Template Rimworld Dotnet Template] it allows faster creation of mod files including Xml folders&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After installing the template.&lt;br /&gt;
#Open your mod folder&lt;br /&gt;
#create a new folder for your mod (It is best to use the name you want for your mod)&lt;br /&gt;
#Open a command prompt in that folder&lt;br /&gt;
#type ''dotnet new  RimMod'' (This will create a new mod with the name you specified)&lt;br /&gt;
#Open the About folder and edit the About.xml file&lt;br /&gt;
#Open the .sln file in your preferred IDE&lt;br /&gt;
#Add the rimworld assemblies using your preferred method&lt;br /&gt;
&lt;br /&gt;
While this method is faster, it is still good to know how to do it manually.&lt;br /&gt;
&lt;br /&gt;
====Option 4 (Using Cookiecutter):====&lt;br /&gt;
This option uses the [https://ludeon.com/forums/index.php?topic=39038.0 Rimworld Mod Development Cookiecutter] tool.&amp;lt;/br&amp;gt;&lt;br /&gt;
'''Note: despite being automatic and potentially taking away some of the tedium away, the environment it sets up is very particular and this tool is currently not recommended for newcomers.'''&amp;lt;/br&amp;gt;&lt;br /&gt;
''As of Jan 2019, the cookiecutter is set up for Windows development.  Linux/Mac people can still use it, but they will have a few errors to clean up.''&amp;lt;/br&amp;gt;&lt;br /&gt;
# Open Visual Studio&lt;br /&gt;
# Once loaded, go to File -&amp;gt; New -&amp;gt; From Cookiecutter...&lt;br /&gt;
# Search for ''rimworld''&lt;br /&gt;
# Double-click ''cookiecutter-rimworld-mod-development''&lt;br /&gt;
# Change the Template Options:&lt;br /&gt;
## ''Create To'' =&amp;gt; ''Your/Rimworld/Mod/Directory''&lt;br /&gt;
## ''mod_name''&lt;br /&gt;
## ''namespace_name'' (don't change if unsure)&lt;br /&gt;
## ''author'' =&amp;gt; ''your steam username''&lt;br /&gt;
## ''target_version'' =&amp;gt; current RW version (can leave blank for most up-to-date)&lt;br /&gt;
## ''in_game_description'' (not required, can change later in About-Release.xml)&lt;br /&gt;
## ''url'' (can leave blank for link to your Steam Workshop profile)&lt;br /&gt;
# Click &amp;quot;Create and Open Folder&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Sharpdevelop===&lt;br /&gt;
'''Caution:''' Sharpdevelop (or #develop) does NOT CURRENTLY allow for C# 6.0+ syntax without plugins and does NOT ALLOW for C# 7.0+ syntax at all. For your average project this does not matter, however some existing projects are already built entirely upon C# 6.0+ syntax which can not be compiled anymore in Sharpdevelop. Visual Studio does not have these issues and should be your go-to for compiling large projects such as Combat Extended.&lt;br /&gt;
&lt;br /&gt;
# Create a new class library project in your [[Modding Tutorials/Recommended software#IDE.27s|IDE of choice]];&lt;br /&gt;
## Go to File -&amp;gt; New -&amp;gt; Solution;&lt;br /&gt;
## Go to C# or .NET -&amp;gt; Library or Class Library (NOT portable);&lt;br /&gt;
## Enter a project name (solution name automatically updated);&lt;br /&gt;
## Choose a location, preferably:&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;(RimWorldInstallFolder)/Mods/(YourModName)/Source&amp;lt;/pre&amp;gt;&lt;br /&gt;
## ''Optional'': Untick &amp;quot;Create a directory for solution&amp;quot;/&amp;quot;Create a project within the solution directory&amp;quot;,&lt;br /&gt;
# In your project, add references to Assembly-CSharp.dll and UnityEngine.dll:&lt;br /&gt;
## In your IDE project file browser, right-click the &amp;quot;References&amp;quot; folder and &amp;quot;Add reference&amp;quot;;&lt;br /&gt;
## Choose the &amp;quot;.NET Assembly Browser&amp;quot; tab and &amp;quot;Browse...&amp;quot;;&lt;br /&gt;
## Navigate towards &amp;lt;pre&amp;gt;RimWorld******/RimWorld******_Data/Managed&amp;lt;/pre&amp;gt; and select files: &amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;Assembly-CSharp.dll&amp;amp;#10;UnityEngine.CoreModule.dll&amp;lt;/pre&amp;gt;&lt;br /&gt;
## Click &amp;quot;Open&amp;quot; then &amp;quot;OK&amp;quot;;&lt;br /&gt;
## In the References folder, right-click Assembly-CSharp -&amp;gt; Properties and change &amp;quot;Local copy&amp;quot; to False. Do the same for UnityEngine,&lt;br /&gt;
# In your project properties, change the target framework to .NET 4.7.2:&lt;br /&gt;
## In your IDE project file browser, right-click &amp;quot;(YourSolutionName)&amp;quot;;&lt;br /&gt;
## Choose Properties;&lt;br /&gt;
## Go to the &amp;quot;Compiling&amp;quot; tab, &amp;quot;Output&amp;quot;, &amp;quot;Target framework&amp;quot;, &amp;quot;Change&amp;quot; and choose &amp;quot;.NET Framework 4.7.2&amp;quot;,&lt;br /&gt;
# In your project properties, change the build events so only a single file is built:&lt;br /&gt;
## Go to the &amp;quot;Compiling&amp;quot; tab, &amp;quot;Output&amp;quot;, &amp;quot;Debug info&amp;quot; and choose &amp;quot;No debug information&amp;quot;;&lt;br /&gt;
## Right-click your .cs files -&amp;gt; Properties and change &amp;quot;Copy to output&amp;quot; (If you haven't resized the properties bar, this will be truncated to &amp;quot;Copy to out&amp;quot;) to Never,&lt;br /&gt;
# In your project properties, fix the output location to put the DLL in the Assemblies folder:&lt;br /&gt;
## Go to the &amp;quot;Compiling&amp;quot; tab, &amp;quot;Output&amp;quot;, &amp;quot;Output path&amp;quot; and change the output path to &amp;quot;..\..\Assemblies\&amp;quot;.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
&lt;br /&gt;
On Linux it is possible to develop using .NET packages provided by Microsoft:&lt;br /&gt;
# [https://dotnet.microsoft.com/download Install .NET by following the provided instructions.]&lt;br /&gt;
# If you use IDE, use it to build (no further details, not tested).&lt;br /&gt;
# It is possible to build from CLI using a .csproj file. Find a mod that has description pointing to its GitHub sources and copy from there ([https://github.com/llunak/rimworld-dietfiltersinstorage/blob/master/Source/DietFiltersInStorage.csproj example here]), or use another way to create a .csproj file.&lt;br /&gt;
# For building use a command like the following (substitute the proper .csproj file, change Release to Debug for a debug build):&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;dotnet build &amp;lt;project file&amp;gt;.csproj /property:Configuration=Release&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you get errors, possibly the .csproj is Windows-specific and needs to be edited:&lt;br /&gt;
## You may need to fix paths (point them to .dll files in RimWorld/RimWorld*_Data/Managed, but it is generally better to use NuGet as described above in Option 2, as that is platform-independent).&lt;br /&gt;
## See other setups above for other settings (those IDEs write those settings to the .csproj files).&lt;br /&gt;
&lt;br /&gt;
Note that .NET Framework from Microsoft is Windows-only, and some .csproj files do not build without it. Generally it seems those using Windows-specific paths are affected, while those platform-independent work fine. Either use Mono (see below), or use one that works. The example .csproj file linked above can usually be used as a drop-in replacement, with only properties in the first PropertyGroup needing adjustment. If you really want or need it, you can get .NET Framework from Mono, by additionally doing these steps:&lt;br /&gt;
# Install Mono (refer to your distribution's instructions);&lt;br /&gt;
# Change the build command to the following (4.7.2 is the .NET version from the .csproj file):&amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.7.2-api/ dotnet build &amp;lt;project file&amp;gt;.csproj /property:Configuration=Release&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Xamarin/MonoDevelop===&lt;br /&gt;
The setup is similar as the one above. A few special points to address:&lt;br /&gt;
# Mono 4.X isn't backward compatible so you may need to install an older 3.X version of Mono in order to compile against .NET4.7.2 dlls.&lt;br /&gt;
# Make sure you uncheck &amp;quot;Use MSBuild build engine (recommended for this project type)&amp;quot; under project &amp;gt; options &amp;gt; build &amp;gt; general   (You might find this by right-clicking on your project - not solution - name and selecting options)&lt;br /&gt;
# Changing the framework to 4.7.2 can be found (for Linux anyway) in the same place.&lt;br /&gt;
&lt;br /&gt;
More detailed installation instructions for Linux can be found [https://blog.rubenwardy.com/2016/07/21/rimworld-setup-monodevelop/ here] and [https://spdskatr.github.io/RWModdingResources/mono-arch here]. Note that as of now (2021) these may be outdated, so if it doesn't work, you can try the steps described in the Mono section.&lt;br /&gt;
&lt;br /&gt;
===Rider (good for Mac)===&lt;br /&gt;
JetBrains Rider is a great cross-platform C# IDE. Previously a paid product (with exceptions), it now offers a community license, making it free for non-commercial use.&lt;br /&gt;
&lt;br /&gt;
# Open Rider and click New Solution in the welcome dialog.&lt;br /&gt;
## Click Class Library under .NET on the left. The option may take a second to show up.&lt;br /&gt;
## Under Solution Name (and Project Name), enter the name of your mod.&lt;br /&gt;
## Set the Solution Directory to [your mod folder]/Source.&lt;br /&gt;
## Optionally check &amp;quot;put solution and project in the same directory.&amp;quot; This is probably a good idea.&lt;br /&gt;
## Change Framework to .Net Framework 4.7.2. &lt;br /&gt;
### If you're on Windows and 4.7.2 does not show up as an option, you will have to install the &amp;quot;4.7.2 Dev Pack&amp;quot; from [https://dotnet.microsoft.com/en-us/download/visual-studio-sdks Microsoft].&lt;br /&gt;
### If you're on MacOS, you may see an error &amp;quot;mono is not found&amp;quot;; install mono from [https://www.mono-project.com/docs/getting-started/install/mac/ here]. Additionally, if you do not have the option to choose .NET 4.7.2, you can create a project with the available NET option(s) and then manually edit the .csproj file to contain &amp;quot;&amp;lt;TargetFramework&amp;gt;net472&amp;lt;/TargetFramework&amp;gt;&amp;quot; later.&lt;br /&gt;
## Click Create.&lt;br /&gt;
# In the left side bar, expand your solution, right click your project (mod name with &amp;quot;C#&amp;quot; icon) and click Properties.&lt;br /&gt;
## In the Properties window, select Configurations &amp;gt; Debug on the left and uncheck Debug Symbols.&lt;br /&gt;
## For both configurations, change the Output Path to ../../Assemblies.&lt;br /&gt;
## Click OK.&lt;br /&gt;
# Expand your project, right click References and click Add Reference.&lt;br /&gt;
## Click Add From.&lt;br /&gt;
## Browse to the folder with the RimWorld DLLs&lt;br /&gt;
### DLL Location for Mac: &amp;quot;/Users/[username]/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed&lt;br /&gt;
### For Win10: &amp;quot;\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed&amp;quot;&lt;br /&gt;
## Select both Assembly-CSharp.dll and UnityEngine.dll and click OK.&lt;br /&gt;
## Expand Assemblies under References. For both of the assemblies that you just added:&lt;br /&gt;
### Right click the assembly and click Properties.&lt;br /&gt;
### Uncheck &amp;quot;Copy Local&amp;quot; (you may need to scroll down) and click OK.&lt;br /&gt;
&lt;br /&gt;
You're done! Note that Rider has a built-in decompiler—to view the source of a RimWorld class or method, just right-click its name and click Go To &amp;gt; Definition.&lt;br /&gt;
&lt;br /&gt;
===.NET Framework via Commmandline===&lt;br /&gt;
If you are on Windows and for some reason you don't want to use Visual Studio, you can also use the C# compiler that comes with the .NET Framework from within the terminal.&lt;br /&gt;
&lt;br /&gt;
# Install the [https://dotnet.microsoft.com .NET Framework].&lt;br /&gt;
# (Optional) Adding the compiler to PATH.&lt;br /&gt;
## Search for &amp;quot;env&amp;quot; -&amp;gt; Edit system environment variables -&amp;gt; click on &amp;quot;Environment Variables&amp;quot; -&amp;gt; Edit the Path of the user variables -&amp;gt; Add the folder of csc.exe (Usually C:\Windows\Microsoft.NET\Framework\vX.X.XXXXX).&lt;br /&gt;
# Find &amp;lt;br/&amp;gt;&amp;lt;pre&amp;gt;Assembly-CSharp.dll&amp;amp;#10;UnityEngine.CoreModule.dll&amp;lt;/pre&amp;gt; in your game files(Usualy at: C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\).&lt;br /&gt;
# Open a terminal and cd to the location of your .cs file.&lt;br /&gt;
# Compile your .cs file (If you skipped adding csc.exe to path, replace it with its full filepath in the following command).&lt;br /&gt;
## It should look something like this:&amp;lt;pre&amp;gt;csc.exe /t:library /r:&amp;quot;C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll&amp;quot;,&amp;quot;C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll&amp;quot; MyMod.cs&amp;lt;/pre&amp;gt;&lt;br /&gt;
## The command is structured where:&amp;lt;pre&amp;gt;csc.exe&amp;lt;/pre&amp;gt; is the compiler(or the whole filepath), and:&amp;lt;pre&amp;gt;/r:&amp;quot;...&amp;quot;,&amp;quot;...&amp;quot;&amp;lt;/pre&amp;gt; is the filepath of both gamefiles from step 3, and:&amp;lt;pre&amp;gt;MyMod.cs&amp;lt;/pre&amp;gt; is your C# source code.&lt;br /&gt;
# Explanation:&lt;br /&gt;
## the /t flag sets it to be a .dll file.&lt;br /&gt;
## the /r flag references the game files(Not the decompiled source code, the game files).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Visual Studio Code via Dev Container===&lt;br /&gt;
{{Recode|section=1|reason=Section commented out due to unknown, unvalidated source. Ideally a full guide for VCS needs to be written}}&lt;br /&gt;
&amp;lt;!-- VS Code provides with Dev Containers a very simple way to set up an working development environment. To make use of Dev Containers you need VS Code with the Dev Containers Extension and docker installed on your machine.&lt;br /&gt;
&lt;br /&gt;
====Quick Start====&lt;br /&gt;
For a quick start either clone the repository inside your mods folder:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone https://github.com/N3fastus/RainingGoo&amp;lt;/pre&amp;gt;&lt;br /&gt;
or download a zip archive by visiting the [https://github.com/N3fastus/RainingGoo Repository]. Click &amp;quot;Code&amp;quot;, then &amp;quot;Download ZIP&amp;quot; and unzip the code in your mods folder.&lt;br /&gt;
The Mod has a dependency to [https://github.com/pardeike/HarmonyRimWorld/releases Harmony], this one needs also to be in the &amp;quot;Mods&amp;quot; directory. Download the zip and extract it to the &amp;quot;Mods&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
Now open the folder with VS Code. If you are not on Linux you need to adjust the path in '''.devcontainer/docker-compose.yml''' to your platform. &lt;br /&gt;
To start up the container you need to press '''CTRL + Shift + P''' and type '''&amp;quot;Dev Container: Reopen in Container&amp;quot;'''. This might take a few minutes.&lt;br /&gt;
When the container is up and running, switch to the terminal inside VS Code and type:&lt;br /&gt;
&amp;lt;pre&amp;gt;dotnet build&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the Assemblies folder should now be a &amp;quot;RainingGoo.dll&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Starting a new Project====&lt;br /&gt;
To start over with a complete new solution, copy the &amp;quot;.devcontainer&amp;quot; folder to your own project and open it in VS Code. &lt;br /&gt;
&lt;br /&gt;
To create a new solution file in the actual location:&lt;br /&gt;
&amp;lt;pre&amp;gt;dotnet new sln&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create a new project (here a library) in the actual location:&lt;br /&gt;
&amp;lt;pre&amp;gt;dotnet new classlib -n MyNewProject -o .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add the created project to the solution file:&lt;br /&gt;
&amp;lt;pre&amp;gt;dotnet sln add Path/to/MyNewProject.csproj&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the configuration of the csproj files compare against the example project above.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Common issues=&lt;br /&gt;
* Can't find the option to target .NET Framework 4.7.2? It may require additional installation steps. In Visual Studio, Tools =&amp;gt; Get Tools and features =&amp;gt; Individual Components =&amp;gt; Select ''.NET Framework 4.7.2 development tools'' (or google installation instructions). Also make sure your project is a ''Class Library (.NET '''Framework''')''. Not .NET Core or .NET Standard.&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[Modding Tutorials/Writing custom code|Writing custom code]] continues on setting up your solution.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/GameComponent&amp;diff=172156</id>
		<title>Modding Tutorials/GameComponent</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/GameComponent&amp;diff=172156"/>
		<updated>2025-11-21T20:07:51Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BackToTutorials}}&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;&amp;amp;nbsp;[[Modding Tutorials/Custom Comp Classes]]&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Outdated}} &lt;br /&gt;
&lt;br /&gt;
Although neither explicitly nor formally linked, Map-, World- and GameComponents share a very similar design (and because of that they also share one tutorial). Similar to [[Modding Tutorials/ThingComp|ThingComp]], you can add any custom code to your Map-, World- or GameComponents for you to call manually. It also has methods called at specific occurrences that you can override.&lt;br /&gt;
&lt;br /&gt;
'''Benefits''':&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;+&amp;lt;/nowiki&amp;gt; Are very well supported by RimWorld.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;+&amp;lt;/nowiki&amp;gt; Generally safe to add to existing saves.&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;+&amp;lt;/nowiki&amp;gt; Work at a very global level.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;+&amp;lt;/nowiki&amp;gt; Can save data.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;+&amp;lt;/nowiki&amp;gt; Certain functionality gets automatically called by RimWorld.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;+&amp;lt;/nowiki&amp;gt; Can be employed to achieve lots of different types of functionality.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;+&amp;lt;/nowiki&amp;gt; Are always accessible.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Downsides''':&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt; Removing a mod with these types of components from a save-game results in a (mostly harmless) one-time error.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt; Does not expose any of its functionality to XML.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* You need to have [[Modding Tutorials/Setting up a solution|set up your editor and environment]]&lt;br /&gt;
* You need to know [[Modding Tutorials/Writing custom code|how to write custom code]]&lt;br /&gt;
* A [[Modding Tutorials/Decompiling_source_code|decompiler]] helps, because this tutorial isn't going to tell you the exact implementation details of the Map-, World- or GameComponents.&lt;br /&gt;
&lt;br /&gt;
== What you'll learn ==&lt;br /&gt;
How to use Map-, World- or GameComponents, for the price of one.&lt;br /&gt;
&lt;br /&gt;
== Setting up ==&lt;br /&gt;
RimWorld will automatically create an instance of all classes that inherit from Map-, World- or GameComponent.&lt;br /&gt;
&lt;br /&gt;
To implement a Map-, World-, or GameComponent, we need to inherit from the respective class and implement a parametered constructor inheriting from base. See [[Modding Tutorials/GameComponent#Example Code|example]]. This constructor tells your Map-, World-, or GameComponent what Map, World, or Game it belongs to.&lt;br /&gt;
&lt;br /&gt;
Note that you'll need ''using RimWorld.Planet;'' for WorldComponents.&lt;br /&gt;
&lt;br /&gt;
== Example Code ==&lt;br /&gt;
&amp;lt;source lang =&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
using Verse;&lt;br /&gt;
using RimWorld.Planet;&lt;br /&gt;
&lt;br /&gt;
namespace MyExampleMod&lt;br /&gt;
{&lt;br /&gt;
    public class MyExampleWorldComponent : WorldComponent&lt;br /&gt;
    {&lt;br /&gt;
        public bool myExampleBool = true;&lt;br /&gt;
&lt;br /&gt;
        public MyExampleWorldComponent(World world) : base(world)&lt;br /&gt;
        {&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
And there we have it. That creates an instance of a WorldComponent. We can then put things like a tracker for &amp;quot;How often did we trade with Faction X&amp;quot; in, or [[Modding Tutorials/GameComponent#Overridable methods of Map-, World- or GameComponent|override one or more of the accessible methods.]] Since these types of components are accessible from pretty much anywhere, they lend themselves to a wide variety of uses.&lt;br /&gt;
&lt;br /&gt;
== Accessing your Map-, World- or GameComponent ==&lt;br /&gt;
These all follow the same design that [[Modding Tutorials/ThingComp|ThingComp]] follows; GetComponent&amp;lt;''TYPE''&amp;gt;().&lt;br /&gt;
===MapComponent===&lt;br /&gt;
First off: Know that null is a perfectly valid value for a Map:&lt;br /&gt;
* Players can abandon all their maps and just caravan around.&lt;br /&gt;
* A pawn on a Caravan is in a null map.&lt;br /&gt;
* A pawn inside a ThingHolder (Carried by another pawn, inside a cryptosleep casket or transport pod, inside a Corpse) is in a null map.&lt;br /&gt;
Trying to access your Component from something that is null leads to bad things happening. Null-check.&lt;br /&gt;
&lt;br /&gt;
====From a Thing on a map====&lt;br /&gt;
&amp;lt;source lang =&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
thing.Map.GetComponent&amp;lt;MyExampleMapComponent&amp;gt;();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: If the thing in question is inside a ThingHolder, use thing.MapHeld instead. That iterates through the ThingHolders until it finds a Map (or null) to return.&lt;br /&gt;
&lt;br /&gt;
====From the currently visible map====&lt;br /&gt;
&amp;lt;source lang =&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Find.CurrentMap.GetComponent&amp;lt;MyExampleMapComponent&amp;gt;();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note: Ensure that you want your MapComponent to do stuff on the ''currently visible'' map. thing.Map is often better.&lt;br /&gt;
&lt;br /&gt;
====From who knows where====&lt;br /&gt;
If you want to play it safe, you can add something like the below to your MapComponent class to return it like so:&lt;br /&gt;
&amp;lt;source lang =&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
        public static MyExampleMapComponent GetMapComponentFor(Map map)&lt;br /&gt;
        {&lt;br /&gt;
            if (map == null)&lt;br /&gt;
            {&lt;br /&gt;
                Log.Error(&amp;quot;Called GetMapComponent on a null map&amp;quot;);&lt;br /&gt;
                return null;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            if (map.GetComponent&amp;lt;MyExampleMapComponent&amp;gt;() == null)&lt;br /&gt;
            {&lt;br /&gt;
                map.components.Add(new MyExampleMapComponent(map));&lt;br /&gt;
            }&lt;br /&gt;
            return map.GetComponent&amp;lt;MyExampleMapComponent&amp;gt;();&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The safety this design offers is two-fold: It null checks the Map and gives a useful warning, and it handles the rare case where something went wrong with instantiating the MapComponent. This can happen when your MapComponent caused an exception during instantiation, or when a MapComponent that was loaded before yours threw an exception during itsinstantiation.&lt;br /&gt;
&lt;br /&gt;
===WorldComponent===&lt;br /&gt;
&amp;lt;source lang =&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Find.World.GetComponent&amp;lt;MyExampleWorldComponent&amp;gt;();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===GameComponent===&lt;br /&gt;
&amp;lt;source lang =&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
Current.Game.GetComponent&amp;lt;MyExampleGameComponent&amp;gt;();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Gotcha:''' The constructor should take a parameter of type ''Game'' (or you'll get errors saying &amp;quot;Constructor not found&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
Note the difference in Current vs Find for Game vs Map- and World Components.&lt;br /&gt;
&lt;br /&gt;
== Overridable methods of Map-, World- or GameComponent ==&lt;br /&gt;
'''NOTE''': This is up to date for version 1.0.2150. For the most up-to-date info, grab a decompiler.&amp;lt;/br&amp;gt;&lt;br /&gt;
'''NOTE''': Not every method listed here is available to all three types of Component.&amp;lt;/br&amp;gt;&lt;br /&gt;
'''NOTE''': Mentally replace TYPE with the type associated with your Component, be it Map, World or Game.&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It does not make sense to override every method listed here. It therefor goes without saying you should only override those methods need.&lt;br /&gt;
&lt;br /&gt;
===TYPEComponentUpdate===&lt;br /&gt;
Runs per frame, even when the game is paused. Best used for things that need updating regardless of [[Time|tickrate]], but it's unwise to put game logic here.&lt;br /&gt;
&lt;br /&gt;
===TYPEComponentTick===&lt;br /&gt;
Runs per Tick.&lt;br /&gt;
&lt;br /&gt;
===TYPEComponentOnGUI===&lt;br /&gt;
Runs per frame, when the TYPE is currently visible. Not available to WorldComponent. Useful for adding GUI stuff.&lt;br /&gt;
&lt;br /&gt;
===ExposeData===&lt;br /&gt;
{{Main|Modding Tutorials/ExposeData}}&lt;br /&gt;
Saves data.&lt;br /&gt;
&lt;br /&gt;
===FinalizeInit===&lt;br /&gt;
Called when RimWorld is done instantiating the TYPE. This runs after your constructor.&lt;br /&gt;
&lt;br /&gt;
FinalizeInit runs after creating a new instance of TYPE and when loading. If you need instance data from your TYPE (like a WeatherManager, LordManager whatever else) this is the place. This is also the place to initialise your TYPEComponent if your constructor is at risk of throwing: There is no try/catch logic in instantiating new components, but there is for FinalizeInit. Throwing an exception in your constructor '''will''' cause issues with generating the Game/World/Map, whereas throwing in FinalizeInit ''may'' cause issues.&lt;br /&gt;
&lt;br /&gt;
===StartedNewGame===&lt;br /&gt;
Unique to GameComponent. Almost, but not quite, entirely unlike FinalizeInit.&lt;br /&gt;
&lt;br /&gt;
===LoadedGame===&lt;br /&gt;
Unique to GameComponent. Left as an exercise to the reader.&lt;br /&gt;
&lt;br /&gt;
===MapGenerated===&lt;br /&gt;
Unique to MapComponent. Left as an exercise to the reader.&lt;br /&gt;
&lt;br /&gt;
===MapRemoved===&lt;br /&gt;
Unique to MapComponent. Left as an exercise to the reader.&lt;br /&gt;
&lt;br /&gt;
[[Category: Modding tutorials]]&lt;br /&gt;
[[Category: Modding]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Modifying_classes&amp;diff=171827</id>
		<title>Modding Tutorials/Modifying classes</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Modifying_classes&amp;diff=171827"/>
		<updated>2025-11-11T07:05:01Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Clarifying the difference between extension methods and actual class methods.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
=Changing methods=&lt;br /&gt;
Use [[Modding Tutorials/Harmony| Harmony]].&lt;br /&gt;
&lt;br /&gt;
=Adding fields to classes=&lt;br /&gt;
You can't. Not even with [[Modding Tutorials/Harmony| Harmony]]. Maybe you want to [[Modding_Tutorials/Def_classes| subclass]] instead?&lt;br /&gt;
&lt;br /&gt;
=Adding methods to classes=&lt;br /&gt;
Yes and no. You can create [https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods extension methods] that are syntactic sugar for calling static methods, but extension methods do not have access to protected or private fields or methods that an actual class method would.&lt;br /&gt;
&lt;br /&gt;
For example, if you wanted to add a method to Pawn which would tell you if that pawn has a specific trait, you could do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using RimWorld;&lt;br /&gt;
using Verse;&lt;br /&gt;
&lt;br /&gt;
namespace MyExampleClassExtension&lt;br /&gt;
{&lt;br /&gt;
    public static class PawnExtensions&lt;br /&gt;
    {&lt;br /&gt;
        public static bool HasTrait(this Pawn pawn, TraitDef trait)&lt;br /&gt;
        {&lt;br /&gt;
            return pawn.story.traits.HasTrait(trait);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This can then be called like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
bool isNudist = pawn.HasTrait(TraitDefOf.Nudist)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note the first argument to HasTrait: `this Pawn Pawn` -- that tells C# that you are defining an extension method on the Pawn class.&lt;br /&gt;
&lt;br /&gt;
=Adding fields to Defs=&lt;br /&gt;
You can. The game support something called a [[Modding Tutorials/DefModExtension| DefModExtension]]. If you have a Def, you can get your mod extension from it. This allows you to add any custom field to any def.&lt;br /&gt;
&lt;br /&gt;
=Adding behaviour to the Thing class=&lt;br /&gt;
If it's a ThingWithComps, you can add a [[Modding Tutorials/ThingComp|ThingComp]] instead. Almost all Things are a ThingWithComps. ThingComps can also be used to store whatever data you need.&lt;br /&gt;
&lt;br /&gt;
=Adding behaviour to the Hediff class=&lt;br /&gt;
HediffWithComps also support comps. HediffComps are different from [[Modding Tutorials/ThingComp|ThingComp]]s, but their general use is the same.&lt;br /&gt;
&lt;br /&gt;
=Using Harmony to override a non-overridden method=&lt;br /&gt;
You can't. Harmony can only patch methods which are actually implemented. You can't patch what isn't there. &lt;br /&gt;
&lt;br /&gt;
Alternatives: &lt;br /&gt;
* [[Modding_Tutorials/Modifying_classes#Patching_the_base_class_of_a_subclass|Patch the base]] class instead, then check for the instance.&lt;br /&gt;
* [[Modding_Tutorials/Modifying_classes#Adding_fields_or_methods_to_classes|Subclass]], and then replace it wherever it's created with Harmony.&lt;br /&gt;
&lt;br /&gt;
=Patching the base class of a subclass=&lt;br /&gt;
[[Modding Tutorials/Harmony|Harmony]] can only patch methods that actually have IL code. What you can do is patch the parent class. Let your patch take the __instance of the parent and pattern match.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
if (!(__instance is SubClass))&lt;br /&gt;
    return;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding tutorials]][[Category:Modding]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Textures&amp;diff=171447</id>
		<title>Modding Tutorials/Textures</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Textures&amp;diff=171447"/>
		<updated>2025-10-29T16:40:03Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Added note about texture overwriting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Mod Textures}}&lt;br /&gt;
&lt;br /&gt;
{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Under_Review}}&lt;br /&gt;
&lt;br /&gt;
(Work in progress) This is a guide for creating and adding textures to RimWorld mods.&lt;br /&gt;
&lt;br /&gt;
== Creating Mod Textures ==&lt;br /&gt;
&lt;br /&gt;
As a Unity game, RimWorld is capable of loading textures using a variety of formats. Most textures used in mods are transparent PNG files, but RimWorld is also capable of loading JPG, PSD, and even [https://en.wikipedia.org/wiki/DirectDraw_Surface DDS files].&lt;br /&gt;
&lt;br /&gt;
# While RimWorld's vanilla textures are drawn in a vector style, vector art is not required and many of the original Core textures were actually raster assets. Using whichever technique you are more comfortable with!&lt;br /&gt;
# RimWorld texture resolutions are independent of their draw size in-game, and are generally sized relative to their draw size on screen. Most original vanilla textures use a resolution of 64 pixels per tile, but newer DLC textures and most mod artists use a resolution of 128 ppt as a baseline. Some mod artists will use texture resolutions of 256 ppt or higher, but this is generally considered excessive, not to mention highly detailed textures can clash with RimWorld's art style. Textures that are too large will also take up a lot more VRAM and RimWorld will simply crash if the GPU's VRAM is filled.&lt;br /&gt;
# The final dimension of a RimWorld texture should be a multiple of four and ideally a power of two (32x32, 64x64, 128x128, 256x256, etc). This makes it easier for GPUs to load and work with.&lt;br /&gt;
# RimWorld's art style dictates that interactive objects such as items and buildings should have a thick black outline, generally equal to 2px of thickness per 64px of tile resolution. Plants generally have a green instead of black outline.&lt;br /&gt;
# It is strongly recommended that you reference vanilla textures when creating mod textures. Ludeon publishes an [https://www.dropbox.com/sh/mz6zjq3f1d654f3/AACX_OMdBG_J78hF2Ph-HzM3a?e=1&amp;amp;dl=0|Official RimWorld Art Source] that contains almost all vanilla and DLC textures for modders to reference for this purpose.&lt;br /&gt;
# Textures should be placed in the Textures folder of the [[Modding_Tutorials/Mod_Folder_Structure|mod folder structure]]. Note that all textures from all mods are loaded into the same content loader, thus it is strongly recommended that you either prefix your texture names or place them in a uniquely named folder to minimize the chance of colliding with another mod.&lt;br /&gt;
# Texture file resolution begins in the Textures folder. Thus, if you have a texture that is placed in &amp;lt;code&amp;gt;Textures/MyMod/MyTexture.png&amp;lt;/code&amp;gt;, then the path you need to use to reference it would simply be &amp;lt;code&amp;gt;MyMod/MyTexture&amp;lt;/code&amp;gt;.&lt;br /&gt;
# All textures from the vanilla game and all mods are loaded into the same space in the Unity content finder, thus reusing the same path as a vanilla texture or another mod will cause the last one loaded to overwrite the other(s). This can be done intentionally for a re-texture mod, but otherwise it's strongly recommended that you prefix either your folders or files with a unique name to reduce the chance of unintended collision. (i.e. &amp;lt;code&amp;gt;MyMod/Things/MyTexture&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Things/MyMod_MyTexture&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== Texture Masking ==&lt;br /&gt;
&lt;br /&gt;
Stuffable or paintable objects can use a texture mask to determine which parts of the texture should be colored or not. For a typical texture mask, black is used to prevent coloring and 100% red is used to specify that the primary color should be drawn. A darker shader of red will result in less of the color being multiplied in; for example, &amp;lt;code&amp;gt;#BB0000&amp;lt;/code&amp;gt; would result in the stuff or paint color being applied at 75% strength.&lt;br /&gt;
&lt;br /&gt;
The following example from the [[Modding_Tutorials/Basic_Melee_Weapon|Basic Melee Weapon tutorial]] makes it so that only the blade of the machete is painted with the stuff color, leaving the handle the default texture color.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;Weapon Texture&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ExampleWeapon Machete.png|none]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;Texture Mask&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
[[File:ExampleWeapon Machete_m.png|none]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Very rarely, a second color channel is used for certain textures, such as the assignment color on beds (colonist, medical, prisoner, etc). Areas of the texture that should be painted with the secondary color should use green instead of red. Red and green can be mixed if blending is desired, as the strength of the color applied is based on the value of the red or green color channel.&lt;br /&gt;
&lt;br /&gt;
== Use-specific Recommendations ==&lt;br /&gt;
&lt;br /&gt;
The following are texture recommendations for specific use cases.&lt;br /&gt;
&lt;br /&gt;
=== Weapons ===&lt;br /&gt;
&lt;br /&gt;
Melee weapons should be drawn with the point of the weapon facing to the right, as when pawns are facing west it will be mirrored horizontally. &amp;lt;code&amp;gt;&amp;lt;equippedAngleOffset&amp;gt;&amp;lt;/code&amp;gt; in the weapon's &amp;lt;code&amp;gt;&amp;lt;graphicData&amp;gt;&amp;lt;/code&amp;gt; is used to angle the weapon into a more natural orientation, with the vast majority of vanilla melee weapons being -65 degrees, -25 degrees ([[Ikwa|ikwa]]), or -20 degrees ([[Thrumbo horn|thrumbo horns]], [[Elephant tusk|elephant tusks]]).&lt;br /&gt;
&lt;br /&gt;
[[File:MeleeExampleGrid.png|none|border]]&lt;br /&gt;
&lt;br /&gt;
Ranged weapons should also be drawn aiming to the right, with the additional consideration that the barrel or point of origin for projectiles should be vertically centered in the texture to ensure that it lines up with where projectiles are actually spawned.&lt;br /&gt;
&lt;br /&gt;
[[File:RifleExampleGrid.png|none|border]]&lt;br /&gt;
&lt;br /&gt;
For weapons with lopsided extensions such as a suppressed pistol, it is generally recommended to keep the body of the weapon centered and to expand the canvas so that the weapon looks correct when wielded. You can increase the &amp;lt;code&amp;gt;&amp;lt;drawSize&amp;gt;&amp;lt;/code&amp;gt; of a weapon in its &amp;lt;code&amp;gt;&amp;lt;graphicData&amp;gt;&amp;lt;/code&amp;gt; to compensate if necessary.&lt;br /&gt;
&lt;br /&gt;
[[File:PistolExampleGrid.png|none|border]]&lt;br /&gt;
&lt;br /&gt;
Projectiles should be drawn facing upwards, with the center of the texture at the exact coordinate position of the projectile in-game. Note that unlike weapons, projectile textures are ''not'' flipped when facing west.&lt;br /&gt;
&lt;br /&gt;
[[File:ProjectileExampleGrid.png|none|border]]&lt;br /&gt;
&lt;br /&gt;
=== Apparel ===&lt;br /&gt;
&lt;br /&gt;
By default, headwear and body apparel textures are overlaid 1:1 onto heads and bodies respectively, thus it is strongly recommended that you start with a vanilla body or apparel texture as a template. (Please see links above for the official art source.)&lt;br /&gt;
&lt;br /&gt;
Headwear requires a minimum of 3 textures, one each for south, north, and east facings. A west facing is optional; RimWorld will mirror your east texture if none is provided, so you only need to provide one for asymmetric apparel or if you want the west texture to be different from the east texture. An additional texture can be used to represent the apparel on the ground, thus a total of 3+1 textures is recommended for headwear, 6+2 if you use texture masks.&lt;br /&gt;
&lt;br /&gt;
Body apparel has the same texture usage, but for each of the 5 vanilla body types (male, female, thin, hulk, and fat) for a total of 15+1 textures or 30+2 with texture masks.&lt;br /&gt;
&lt;br /&gt;
Utility packs such as tox gas canisters can be set to render using a single texture but with offsets based on body type. This only works for utility-slot items and has the same texture requirements as headwear (3+1, or 6+2 with masks).&lt;br /&gt;
&lt;br /&gt;
=== Plants ===&lt;br /&gt;
''See [[Modding_Tutorials/Plant_Rendering|Plant Rendering]].''&lt;br /&gt;
&lt;br /&gt;
=== Pawns ===&lt;br /&gt;
''See [[Modding_Tutorials/Pawn_Rendering|Pawn Rendering]].'' (Placeholder)&lt;br /&gt;
&lt;br /&gt;
=== Buildings ===&lt;br /&gt;
&lt;br /&gt;
For buildings, it is generally recommended to use a canvas sized precisely for the &amp;lt;code&amp;gt;&amp;lt;drawSize&amp;gt;&amp;lt;/code&amp;gt; of the building. Centering the texture against the canvas also ensures that you do not have to mess with draw offsets to make it align properly.&lt;br /&gt;
&lt;br /&gt;
The following is a sample texture for a &amp;lt;code&amp;gt;&amp;lt;size&amp;gt;(2,2)&amp;lt;/size&amp;gt;&amp;lt;/code&amp;gt; table with &amp;lt;code&amp;gt;&amp;lt;drawSize&amp;gt;(3,3)&amp;lt;/drawSize&amp;gt;&amp;lt;/code&amp;gt; which results in a canvas size of 384x384 at 128 pixels per tile.&lt;br /&gt;
&lt;br /&gt;
[[File:BuildingExampleGrid.png|none|border]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Walls and Conduits ===&lt;br /&gt;
&lt;br /&gt;
Walls and conduits use a special graphic type called a &amp;quot;linked atlas&amp;quot;. This is a spritesheet of 16 separate subtextures representing all possible tile link configurations printed onto a single master texture.&lt;br /&gt;
&lt;br /&gt;
The red overlaid areas are culled from the texture and will not be shown. The green arrows indicate link directions.&lt;br /&gt;
&lt;br /&gt;
[[File:WallExampleGrid.png|none|border]]&lt;br /&gt;
&lt;br /&gt;
=== Terrain ===&lt;br /&gt;
&lt;br /&gt;
Terrain in RimWorld uses a single texture painted over a 16x16 tile area. This texture should be tileable in all directions to ensure smooth display over large areas.&lt;br /&gt;
&lt;br /&gt;
[[File:TerrainExampleGrid.png|none|border]]&lt;br /&gt;
&lt;br /&gt;
== Tips and Tricks ==&lt;br /&gt;
&lt;br /&gt;
* Unless you are using a Unity asset bundle to disable compression, textures loaded into RimWorld will be compressed in memory. This can result in a white outline around your textures due to the fact that some art programs will discard all color data in fully transparent pixels. This can be fixed by either instructing your art program to preserve color data (preferably black) in transparent pixels, or by adding an extra 1% opacity black outline around the regular outline of the object texture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Assets&amp;diff=171181</id>
		<title>Modding Tutorials/Assets</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Assets&amp;diff=171181"/>
		<updated>2025-10-27T15:59:54Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Marking guide as outdated until it can be rewritten or replaced.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BackToTutorials}}&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Outdated}}&lt;br /&gt;
&lt;br /&gt;
In this tutorial you will learn how to extract the base assets of RimWorld.&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
# [https://github.com/SeriousCache/UABE Unity Assets Bundle Extractor] to extract the contents of the unity .asset archives.&lt;br /&gt;
# or [https://github.com/Perfare/AssetStudio AssetStudio]&lt;br /&gt;
&lt;br /&gt;
=UnityEx=&lt;br /&gt;
To extract the original files from the Unity asset archives we will be using UnityEx which is compatible with Rimworld 1.0's Archives.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#Download UnityEx either by searching using your search engine of choice or [https://yadi.sk/d/m3vFWoQ3j62Cr via this link].&lt;br /&gt;
#Place the UnityEX.exe somewhere easily locatable (I prefer to place it into the Rimworld Directory).&lt;br /&gt;
#Run UnityEX.exe and open the .asset file you would like to extract, for example; &amp;lt;pre&amp;gt;RimWorld\RimWorldWin64_Data\resources.assets&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Extract the files you need. If you are extracting .tex files you can use &amp;quot;Extract with convert&amp;quot;, this will convert the .tex files to .dds.&lt;br /&gt;
#The extracted files will be placed into a new folder in the same directory (Unity_Assets_Files) as the .asset file you have extracted.&lt;br /&gt;
&lt;br /&gt;
=Unity Assets Bundle Extractor=&lt;br /&gt;
To extract the original files from the Unity asset archives we will be using Unity Assets Bundle Extractor which is compatible with Rimworld 1.0's Archives.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#Download Unity Assets Bundle Extractor by searching using your search engine of choice or [https://github.com/SeriousCache/UABE via this link].&lt;br /&gt;
#Unzip it.&lt;br /&gt;
#Run AssetBundleExtractor.exe and open the .asset file you would like to extract, for example, &amp;lt;pre&amp;gt;RimWord\RimWorldWin64_Data\resources.assets&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Select the files you need/want. Then, click &amp;quot;Plugins&amp;quot; and select &amp;quot;Export to .png&amp;quot; or &amp;quot;Export sound&amp;quot;. Note that this only works when you select files by type: so select only audio files or only textures.&lt;br /&gt;
#Click OK and select a folder for storage.&lt;br /&gt;
&lt;br /&gt;
=AssetStudio=&lt;br /&gt;
To extract the original files from the Unity asset archives we will be using AssetStudio which is compatible with Rimworld 1.5's Archives (older versions not tested).&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#Download AssetStudio by searching using your search engine of choice or [https://github.com/Perfare/AssetStudio via this link], if you are unsure which .NET runtime version you have installed net472 should be fine.&lt;br /&gt;
#Unzip it.&lt;br /&gt;
#Run AssetStudioGUI.exe and open the asset file you would like to extract, for example with '''File -&amp;gt; Load file''', &amp;lt;pre&amp;gt;RimWord\RimWorldWin64_Data\resources.assets&amp;lt;/pre&amp;gt; or for the DLC Asset Bundles with '''File -&amp;gt; Load folder''' &amp;lt;pre&amp;gt;RimWorld\Data\Anomaly\AssetBundles&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Switch to the Asset List tab.&lt;br /&gt;
#Select the files you need/want. Then, right click and select &amp;quot;Export selected assets&amp;quot;, works for audio and textures.&lt;br /&gt;
#Select a folder for storage and click open.&lt;br /&gt;
&lt;br /&gt;
=AssetStudio on Linux=&lt;br /&gt;
&lt;br /&gt;
#Download AssetStudio by searching using your search engine of choice or [https://github.com/Perfare/AssetStudio via this link]. Use the .net 6 version (AssetStudio.net6.v0.16.47.zip)&lt;br /&gt;
#Install [https://github.com/bottlesdevs/Bottles Bottles] however is appropriate for your distro. [https://aur.archlinux.org/packages/bottles Here] is the AUR link for arch users&lt;br /&gt;
#Unzip AssetStudio.net6.v0.16.47.zip (e.g /home/username/applications/AssetStudio.net6.v0.16.47/)&lt;br /&gt;
#Open Bottles and and click the + symbol in the top left corner of the UI to 'Create New Bottle'&lt;br /&gt;
#In the 'Create New Bottle' options window that pops up enter a name (e.g 'AssetStudio') and select 'Application'. You can leave the other options as default.&lt;br /&gt;
#Once the AssetStudio bottle has been created and has automatically opened the details page click on 'Add Shortcuts...'&lt;br /&gt;
#Navigate to where you extracted AssetStudio and select 'AssetStudioGUI.exe'&lt;br /&gt;
#After you have selected the exe you'll be on the bottle Detail page again, this time select 'Dependencies' and from the list choose 'dotnetcoredesktop6'&lt;br /&gt;
#After the .net dependency is installed you can now click the play button next to 'AssetStudioGUI' and the application will launch&lt;br /&gt;
#Open the asset file you would like to extract, for example with '''File -&amp;gt; Load file''', &amp;lt;pre&amp;gt;RimWord\RimWorldWin64_Data\resources.assets&amp;lt;/pre&amp;gt; or for the DLC Asset Bundles with '''File -&amp;gt; Load folder''' &amp;lt;pre&amp;gt;RimWorld\Data\Anomaly\AssetBundles&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Switch to the Asset List tab.&lt;br /&gt;
#Select the files you need/want. Then, right click and select &amp;quot;Export selected assets&amp;quot;, works for audio and textures.&lt;br /&gt;
#Select a folder for storage and click open.&lt;br /&gt;
&lt;br /&gt;
Notes: You could wait unzip AssetStudio in the Bottles prefix folder if you want to want to keep it all together (e.g /home/username/.local/share/bottles/bottles/AssetStudio/drive_c/Program Files/AssetStudio.net6.v0.16.47/). This would require waiting for step 5 to be complete (creating the bottle) prior to unzipping so that the folder structure exists.&lt;br /&gt;
&lt;br /&gt;
AssetStudio.net6.v0.16.47 is used in this tutorial as it uses the most recent version of .net however the dependency for .net472 can be installed in Bottles (dotnet472) so AssetStudio.net472.v0.16.47.zip could presumably be used if there was a need.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Bottles create 1.png|'Create New Bottle' dialog box in Bottles&lt;br /&gt;
Bottles create 2.png|'Details' page for a newly created bottle in Bottles&lt;br /&gt;
Bottles create 3.png|Bottles 'Dependencies' screen with correct dependency highlighted&lt;br /&gt;
Bottles create 4.png|Completed bottle with AssetStudioGUI ready to run and use&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
* [[Modding Tutorials/Recommended software#Graphics Software|Recommended graphics software]] for suggestions on software for further editing or viewing of source files.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Time&amp;diff=171180</id>
		<title>Time</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Time&amp;diff=171180"/>
		<updated>2025-10-27T15:38:05Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Removed the confusing &amp;quot;1.44 Min&amp;quot; because nothing in RimWorld actually measures time in-game by minutes, it always goes straight from hours to seconds.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Gameplay_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;!-- End of Nav --&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
'''Time''' in RimWorld is split into two related systems - [[#Real time|real time]], that is the time experienced by the player, and [[#In-game time|in-game time]], that is time that passes in the gameworld of the colony and experienced by the pawns themselves.&lt;br /&gt;
&lt;br /&gt;
== Real time ==&lt;br /&gt;
Time in RimWorld passes as a series of ticks. On normal game speed, there are 60 such ticks to a real second; there are always 2,500 ticks to one in-game hour.&lt;br /&gt;
&lt;br /&gt;
{| {{STDT|c_01 text-right}}&lt;br /&gt;
! colspan='2' | In-Game Time&lt;br /&gt;
! colspan='1' | Ticks&lt;br /&gt;
! colspan='1' | Real Time&lt;br /&gt;
|-&lt;br /&gt;
! 1 Sec&lt;br /&gt;
|           || |     60 || 1s&lt;br /&gt;
|-&lt;br /&gt;
! 1 Hour&lt;br /&gt;
| 60 Min    || |    2,500 || | ~42s&lt;br /&gt;
|-&lt;br /&gt;
! 1 Day&lt;br /&gt;
|| 24 Hours  ||    60,000 || | 16m 40s&lt;br /&gt;
|-&lt;br /&gt;
! 1 Quadrum&lt;br /&gt;
|| 15 Days  ||   900,000 || 4h 10m&lt;br /&gt;
|-&lt;br /&gt;
! 1 Year&lt;br /&gt;
|| 4 Quadrums || 3,600,000 || 16h 40m&lt;br /&gt;
|}&lt;br /&gt;
{| {{STDT|c_01 text-right}}&lt;br /&gt;
|-&lt;br /&gt;
! colspan='3' | Technical details for modders&lt;br /&gt;
|-&lt;br /&gt;
!&lt;br /&gt;
! Ticks&lt;br /&gt;
! Time&lt;br /&gt;
|-&lt;br /&gt;
| 1 tick || 1 tick || 1/60th second&lt;br /&gt;
|-&lt;br /&gt;
| 1 rare tick || 250 ticks || 4.16 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 1 long tick || 2000 ticks || 33.33 seconds&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The player also has access to play speed controls that attempt to multiply the rate at which game time progresses. Note that depending on a number of technical factors including the machine on which the game is being run, it may not be possible to run the game at the target speed. In this case, the game will run as close to the target as possible and, as such, the limit will be more noticeable at higher speeds. &lt;br /&gt;
&lt;br /&gt;
The speeds are described in the table below. The speeds controls can be selected by the buttons on the lower right hand sode of the screen, or by key binds. Note that Speeds 2, 3, and 4 are sometimes described by the community as 2x, 3x, and 4x speed, however this is not representative of the actual speed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Speed !! Default key binding !! Game speed multiplier !! Button&lt;br /&gt;
|-&lt;br /&gt;
| Pause || {{Key|Space}} || x0 || [[File:TimeSpeedButton Pause.png]]&lt;br /&gt;
|-&lt;br /&gt;
| 1 || {{Key|1}} || x1 || [[File:TimeSpeedButton Normal.png]]&lt;br /&gt;
|-&lt;br /&gt;
| 2 || {{Key|2}} || x3 || [[File:TimeSpeedButton Fast.png]]&lt;br /&gt;
|-&lt;br /&gt;
| 3 || {{Key|3}} || x6 || [[File:TimeSpeedButton Superfast.png]]&lt;br /&gt;
|-&lt;br /&gt;
| 4 || {{Key|4}} || x15 || N/A&lt;br /&gt;
|}&lt;br /&gt;
Note that Speed 4 is only available when [[development mode]] is active and is only available by key bind.&lt;br /&gt;
&lt;br /&gt;
== In-game time ==&lt;br /&gt;
{{Stub|section=1|reason=Exploration of [[Temperature]]/Season link and [[Light]]/Season link}}&lt;br /&gt;
{{Quote|The year is divided into 4 quadrums* of 15 days each. Quadrums are the same everywhere, while seasons are different in different places}}&lt;br /&gt;
Time on the rimworld proceeds largely as one would expect except for three primary differences. Years only last 60 days, years are separated into 4 15-day &amp;quot;quadrums&amp;quot; instead of months, and the year is seasonal - that is, last season ends at the same time as the year. Note that times given in-game will use this system - thus if something ''&amp;quot;spoils in 1 year&amp;quot;'', you have 60 in-game days, not 365. &lt;br /&gt;
&lt;br /&gt;
Like terrestrial seasons, the [[temperature]] changes with progression of the quadrums and the temperature effects depend on the latitude. When it is &amp;quot;Summer&amp;quot; in the Northern Hemisphere, it is &amp;quot;Winter&amp;quot; in the Southern, and vice versa, while areas near the equator remain temperate year-round.&lt;br /&gt;
&lt;br /&gt;
Each quadrums is given a name that is a portmanteau of the terrestrial months of the ''season'' that quadrum is equivalent to, rather than named for months in the same period of the year. Thus, Aprimay is a portmanteau of April and May, but is the start of the year and relates to Spring in the North, but Fall in the South. Mouse-hovering over the in-game date in the lower right-hand corner will list what &amp;quot;local seasons&amp;quot; each quadrum represents for the settlement currently viewed.  &lt;br /&gt;
&lt;br /&gt;
The names of these 4 quadrums are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Northern Season !! Southern Season !! Days&lt;br /&gt;
|-&lt;br /&gt;
! Aprimay   &lt;br /&gt;
| Spring || Fall || 1 to 15&lt;br /&gt;
|-&lt;br /&gt;
! Jugust    &lt;br /&gt;
| Summer || Winter || 16 to 30&lt;br /&gt;
|-&lt;br /&gt;
! Septober  &lt;br /&gt;
| Fall || Spring || 31 to 45&lt;br /&gt;
|-&lt;br /&gt;
! Decembary &lt;br /&gt;
| Winter || Summer || 46 to 60&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The game starts in the year 5500, and by default begins in Spring (Aprimay or Septober). In colder biomes, the season will adjust to Summer, to allow players to survive and grow plants, although some colder biomes there is permanent winter, and this changes nothing. Starting season may be changed in [[World generation#Advanced settings|World Generation]]. &lt;br /&gt;
&lt;br /&gt;
===Time of day===&lt;br /&gt;
Days in RimWorld last 24 hours, or {{Ticks|60,000}}. The in-game clock is in 24-hour format, with the hours displayed in military time from 0h to 23h. The time of day has a few effects on gameplay:&lt;br /&gt;
*Time determines the level of [[light]] outdoors.&lt;br /&gt;
*Plants can only grow from 6:00 to 19:12.&lt;br /&gt;
*[[Night owl]]s consider it &amp;quot;Day time&amp;quot; from 11h to 18h, and &amp;quot;Night time&amp;quot; from 23h to 6h.&lt;br /&gt;
&lt;br /&gt;
[[Light|Daylight]] length is also tied to the season and latitude - the day will be independent of the season at the equator but get longer in the Summer and shorter in the Winter the further north or south you go. Exact details of the relationship between season, latitude and day length are currently unknown.&lt;br /&gt;
&lt;br /&gt;
The hour of the day is relative to the location on the [[Menus#World|World map]]. If it's noon (1200) at your home base, it will still be late morning (1100/11 AM) a bit to the west, and already early afternoon (1300/1 PM) a bit to the east, as &amp;quot;time zones&amp;quot; are in our world. Time of day is modeled on the planet view; local time of day corresponds to how the sunlight hits the planet.&lt;br /&gt;
&lt;br /&gt;
===Work===&lt;br /&gt;
Items in game list values with names like &amp;quot;Work to build&amp;quot;, &amp;quot;Work to uninstall&amp;quot;, or &amp;quot;[[Work To Make]]&amp;quot; in their info boxes. One unit of work is approximately {{Ticks|60}}. Note that the work values are rounded to display nicely as seconds, and the actual tick amounts are used by the game engine, not the displayed work.&lt;br /&gt;
&lt;br /&gt;
== Version history ==&lt;br /&gt;
* [[Version/0.0.254B|0.0.254B]] - Abolished cycles - dates are measured in days only.&lt;br /&gt;
* [[Version/0.10.785|0.10.785]] - Day length extended from 24,000 to 30,000 ticks. Days per month reduced from 12 to 10.&lt;br /&gt;
* [[Version/0.13.1135|0.13.1135]] - Days are now twice as long as before, with years being half as many days i.e. years are exactly as long as before in actual play time, just divided into a smaller number of longer days. The year is now split into seasons instead of months.&lt;br /&gt;
* [[Version/0.17.1546|0.17.1546]] - As season names could no longer be consistently applied to the entire globe, necessitating that they be named as month-like &amp;quot;quadrums.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
[[Category:Game mechanics]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=170703</id>
		<title>Modding Tutorials</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=170703"/>
		<updated>2025-10-09T02:51:14Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* Updates and Migrations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Mods_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the hub page for tutorials, guides, and reference materials for creating mods for RimWorld. If you are looking for instructions on how to use RimWorld, please check out the general [[Modding]] hub.&lt;br /&gt;
&lt;br /&gt;
As RimWorld does not have a formal modding API, nearly all of the information here has been gathered and maintained by the modding community.&lt;br /&gt;
&lt;br /&gt;
'''NEW: [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]]''' - A work-in-progress list of changes datamined by the modding community in the current unstable version of RimWorld 1.6. '''THERE MAY BE ODYSSEY DLC SPOILERS, YOU HAVE BEEN WARNED.'''&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
==About RimWorld==&lt;br /&gt;
{{Stub|section=1|reason= Where does [[Modding Tutorials/Rituals]] fit in the below categories?}}&lt;br /&gt;
RimWorld is a multi-platform game written on Unity 2022.3.35. However, the Unity Editor is not used for creating mods unless you are creating new shaders or building optional asset bundles.&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Recommended_software|Recommended Software]] - Editors and other useful software for mod development&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]] - Explore the basic folder structure of a mod&lt;br /&gt;
** [[Modding_Tutorials/About.xml|About.xml]] - About.xml identifies and describes your mod to RimWorld so that it can be loaded properly&lt;br /&gt;
&lt;br /&gt;
===Game Systems Guides===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Defs|Defs]] - XML Definitions are used to define and configure content in a way that does not require compiling code&lt;br /&gt;
** [[Modding_Tutorials/MayRequire|MayRequire]] - MayRequire and MayRequireAnyOf are used to conditionally load Defs and list entries based on whether a DLC or other mod is loaded&lt;br /&gt;
* [[Modding_Tutorials/Localization|Localization]] - Define text strings used for translations and word lists used in name and text generation&lt;br /&gt;
* [[Modding_Tutorials/PatchOperations|PatchOperations]] - PatchOperations are used to modify XML Defs without overwriting them completely&lt;br /&gt;
* [[Modding_Tutorials/Sounds|Sounds]] - (Needs Rewriting) Adding sound files for mods&lt;br /&gt;
* [[Modding_Tutorials/Textures|Textures]] - How to create and add textures to mods&lt;br /&gt;
* [[Modding Tutorials/Plant Rendering|Plant Rendering]] - An explanation of how plant textures are rendered&lt;br /&gt;
* [[Modding_Tutorials/Research_Projects|Research Projects]] - How to create and use research projects.&lt;br /&gt;
&lt;br /&gt;
===XML Tutorials===&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step tutorials for creating basic content mods.&lt;br /&gt;
&lt;br /&gt;
Basic Tutorials:&lt;br /&gt;
* [[Modding_Tutorials/Basic_Melee_Weapon|Basic Melee Weapon]] - How to create a basic melee weapon with a texture mask&lt;br /&gt;
* [[Modding_Tutorials/Basic_Ranged_Weapon|Basic Ranged Weapon]] - How to create a basic ranged weapon with custom sound effects&lt;br /&gt;
* [[Modding_Tutorials/Basic_Plant|Basic Plant]] - How to create a custom plant with both a cultivated and wild variant&lt;br /&gt;
* Custom Animal (Upcoming)&lt;br /&gt;
* Simple Building (Upcoming)&lt;br /&gt;
* Custom Workbench (Upcoming)&lt;br /&gt;
* Custom Drug (Upcoming)&lt;br /&gt;
&lt;br /&gt;
Advanced Tutorials:&lt;br /&gt;
* Custom Faction (Upcoming)&lt;br /&gt;
* Custom Culture (Upcoming)&lt;br /&gt;
* Custom Trader Type (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===C# Guides===&lt;br /&gt;
&lt;br /&gt;
C# is used to create and define custom game behaviors &lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Decompiling source code|Decompiling Source Code]] - How to set up and use a decompiler to read vanilla game code&lt;br /&gt;
* [[Modding_Tutorials/Setting up a solution|Setting up a Solution]] - How to set up a solution for compiling a custom mod assembly&lt;br /&gt;
* [[Modding_Tutorials/Application_Startup|Application Startup]] - Describes the application startup process and the order in which game data is loaded&lt;br /&gt;
* Custom Consumable (Upcoming)&lt;br /&gt;
* Custom Overlays (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===Updates and Migrations ===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.5_Mod_Updates|RimWorld 1.5 Mod Updates]] - (WARNING: Anomaly Spoilers) Community notes for updating mods from 1.4 to 1.5.&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]] - (WARNING: Odyssey Spoilers) Community notes for updating mods from 1.5 to 1.6.&lt;br /&gt;
&lt;br /&gt;
===Slightly Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Plague_Gun_(1.1)|Plague Gun]] - This tutorial was created for RimWorld 1.0 but updated for 1.4. While the exact content is obsolete as you can now accomplish the same result with purely vanilla XML, it is still useful as a crash course for end-to-end mod creation and is here until newer tutorials can replace it.&lt;br /&gt;
&lt;br /&gt;
===Uploading to Steam Workshop===&lt;br /&gt;
* You can upload your mod to Steam Workshop by enabling Development Mode from your game Options and then using the Upload option under the Advanced button in the vanilla mod manager.&lt;br /&gt;
* Note that in order to upload to Steam Workshop, you must own the game on Steam Workshop. Owning RimWorld on GOG or Epic will not work.&lt;br /&gt;
* Your Preview.png should be a 640x360 or 1280x720 PNG and '''must''' be under 1MB. If it is too large, then your upload will be rejected with &amp;lt;code&amp;gt;Error : Limit Exceeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you get a &amp;lt;code&amp;gt;OnItemSubmitted Fail&amp;lt;/code&amp;gt; error, make sure you close any programs that are targeting items in your mods folder. This can also mean that Steam Workshop is having some technical issues at the moment. If it keeps occurring, then the only thing to do is to wait a few hours for it to clear up.&lt;br /&gt;
* Steam mod descriptions don't use markdown, they use a variant of BBCode. Please check out the [https://steamcommunity.com/comment/Guide/formattinghelp Steam text formatting guide].&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All of the above tutorials have been cleaned up and reviewed by the #mod-development team on the [https://discord.gg/rimworld RimWorld Discord] in cooperation with RimWorld Wiki staff editors. Please let us know before creating, adding, or making any major edits to the vetted tutorials and guides section!&lt;br /&gt;
&lt;br /&gt;
==Outdated / Under Review==&lt;br /&gt;
&lt;br /&gt;
The following tutorials are either out of date or in need of a rewrite. The information in them might be useful but may not be up to standard; please be aware of any potential inaccuracies until they can be addressed.&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/First Steps|First Steps and Some Links]]&lt;br /&gt;
* [[Modding Tutorials/Essence| Essence of Modding]]&lt;br /&gt;
* [[Modding Troubleshooting Tips and Guides]]&lt;br /&gt;
* [[Modding Tutorials/Testing mods|Testing Mods]]&lt;br /&gt;
** [[Modding Tutorials/Testing mods#Development mode|Development Mode]]&lt;br /&gt;
* [[Modding Tutorials/Sounds|Adding and Testing Sounds]]&lt;br /&gt;
* [[Modding Tutorials/Assets|Decompiling Texture/Sound Assets]]&lt;br /&gt;
* [[Modding Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
* [[Modding_Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding_Tutorials/Modifying defs|Modifying Defs]]&lt;br /&gt;
* [[Modding_Tutorials/Troubleshooting|Troubleshooting mods]]&lt;br /&gt;
&lt;br /&gt;
===XML tutorials===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/XML file structure|XML File Structure]]&lt;br /&gt;
* [[Modding Tutorials/XML Defs|Introduction to XML Defs]]&lt;br /&gt;
** [[Modding Tutorials/Compatibility with defs|XML Def Compatibility]]&lt;br /&gt;
** [[Modding Tutorials/ThingDef|ThingDef explained]]&lt;br /&gt;
** [[Modding Tutorials/Weapons Guns|Weapons_Guns.xml explained]]. Slightly dated.&lt;br /&gt;
&lt;br /&gt;
===C# tutorials===&lt;br /&gt;
* [[Modding_Tutorials/Hello World|Hello World]]&lt;br /&gt;
* [[Modding_Tutorials/Writing custom code|Writing Custom Code]]&lt;br /&gt;
* [[Modding Tutorials/Linking XML and C#|Linking XML and C#]]&lt;br /&gt;
* [[Modding_Tutorials/Harmony|Alter Code at Runtime with Harmony]] - this is a best practice for modifying game code, replacing C# code injection to reduce Mod Conflicts&lt;br /&gt;
* [[Modding_Tutorials/Modifying classes|Adding fields and methods to classes]]&lt;br /&gt;
* [[Modding Tutorials/ModSettings|Mod settings]] - Add settings to your mod&lt;br /&gt;
* [[Modding Tutorials/DefModExtension|Def mod extensions]] - Add (custom) fields to Defs&lt;br /&gt;
* [[Modding Tutorials/Custom Comp Classes|Custom Comp Classes]] - A quick overview of what types of Comps there are, and what they're suited for.&lt;br /&gt;
* [[Modding_Tutorials/ThingComp|ThingComp]] - Learn all there is to know about ThingComps.&lt;br /&gt;
* [[Modding Tutorials/GameComponent|Components]] - GameComponents, WorldComponents, and MapComponents&lt;br /&gt;
* [[Modding_Tutorials/Def classes|Introduction to Def Classes]]&lt;br /&gt;
* [[Modding_Tutorials/Compatibility_with_DLLs|Using Harmony to optionally patch other mods for the sake of compatibility]]&lt;br /&gt;
* [[Modding Tutorials/TweakValue|TweakValues]] - Change values on the fly (handy for quick iteration!)&lt;br /&gt;
* [[Modding Tutorials/ExposeData|ExposeData]] - Save stuff&lt;br /&gt;
* [[Modding Tutorials/BigAssListOfUsefulClasses|The big ass list of useful classes]] - A non-exhaustive list of classes you'll use most&lt;br /&gt;
* [[Modding Tutorials/GrammarResolver|Grammar Resolver]] - PAWN_objective, PAWN_possessive? Find out what it all means here.&lt;br /&gt;
* [https://github.com/Mehni/ExampleJob/wiki ExampleJob] - Mehni's top to bottom breakdown of Jobs.&lt;br /&gt;
* [[Modding_Tutorials/ConfigErrors|Config Errors]] - Provide configuration issues to the user on startup.&lt;br /&gt;
* [[Modding Tutorials/DebugActions|Debug Actions]] - Call methods from the debug menu&lt;br /&gt;
* [https://www.arp242.net/rimworld-mod-linux.html Getting started with RimWorld modding on Linux]&lt;br /&gt;
&lt;br /&gt;
===Art Tutorials===&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/artstyle Artstyle] - Officially unofficial guide to RimWorld's Artstyle&lt;br /&gt;
* [https://www.reddit.com/r/RimWorld/comments/5tn1pi/rimworldstyle_sprite_tutorials/ Ekksu's guide to creating RimWorld animals]&lt;br /&gt;
* [https://steamcommunity.com/sharedfiles/filedetails/?id=1114369188 ChickenPlucker's guide to creating apparel]&lt;br /&gt;
* [https://github.com/seraphile/rimshare/wiki/Colouring-in-Images Seraphile's guide to masks]&lt;br /&gt;
&lt;br /&gt;
===Under Construction===&lt;br /&gt;
&lt;br /&gt;
These are currently unfinished and need to be cleaned up or removed&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Quests]]&lt;br /&gt;
* [[Modding Tutorials/Troubleshooting/Finding Exceptions]]&lt;br /&gt;
&lt;br /&gt;
===Dangerously Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[RimWorld 1.3: XML Mod Creation]]&lt;br /&gt;
* [[Modding Tutorials/Assembly Modding Example|Assembly Modding]]&lt;br /&gt;
* [[Plague Gun (1.1)|The Plague Gun]] tutorial originally by Jecrell, updated to 1.1+. &lt;br /&gt;
* [[Modding Tutorials/Xenotype template]] originally by Ryflamer&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Smelter]]&lt;br /&gt;
* [[Modding Tutorials/Items]]&lt;br /&gt;
* [[Modding Tutorials/Furniture]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [https://github.com/roxxploxx/RimWorldModGuide/wiki Roxxploxx's set of modding tutorials]&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/ RimWorld Modding Resources - A hub for guides, modders, practical tips]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Research_Projects&amp;diff=170671</id>
		<title>Modding Tutorials/Research Projects</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Research_Projects&amp;diff=170671"/>
		<updated>2025-10-07T19:38:52Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* Fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Research Projects}}&lt;br /&gt;
&lt;br /&gt;
{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Under_Review}}&lt;br /&gt;
&lt;br /&gt;
Research projects are used to gate access to buildings and crafting recipes behind the use of the [[Research]] system.&lt;br /&gt;
&lt;br /&gt;
''Last updated: 2025-10-06 (RimWorld v1.6)''&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Research projects are defined in XML using &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt; [[Modding_Tutorials/Defs|Defs]]. As with all Defs, looking at the vanilla examples is a great way to get a feel for how the system is used.&lt;br /&gt;
&lt;br /&gt;
=== Fields ===&lt;br /&gt;
&lt;br /&gt;
The following are valid fields in &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt;. All of these fields are optional unless otherwise specified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TutorialTableWrapper&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;TutorialCodeTable&amp;quot;&lt;br /&gt;
! XML Example !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;baseCost&amp;gt;1000&amp;lt;/baseCost&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
The base cost to complete this research project. The final cost of this project will be modified by tech level differences between the player's faction and that of the research project. A research project must either have a &amp;lt;code&amp;gt;baseCost&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;knowledgeCost&amp;lt;/code&amp;gt; (see below).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;preqrequisites&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Electricity&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Batteries&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/preqrequisites&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
All of a project's prerequisites must be completed before research on it can begin. Prerequisites on the same tab will be linked to the project with a line.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;hiddenPreqrequisites&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Machining&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/hiddenPreqrequisites&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Hidden prerequisites work exactly the same as regular prerequisites except that lines will not be drawn between this project and its hidden prerequisites. Using them can be useful in reducing visual clutter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;techLevel&amp;gt;Industrial&amp;lt;/techLevel&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
The tech level of this research project. Valid options are: '''Undefined''', '''Animal''', '''Neolithic''', '''Medieval''', '''Industrial''', '''Spacer''', '''Ultra''', and '''Archotech'''. As tech levels are defined via an enum rather than via Defs, it is effectively impossible to define new ones without major compatibility problems.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requiredByThis&amp;gt;&amp;lt;/requiredByThis&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This field is present on &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt; but is not used anywhere in vanilla XML, nor does the field appear to be utilized by any C# code. Its purpose is unknown.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;researchMods&amp;gt;&amp;lt;/researchMods&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
A code hook for wiring up C# classes that will be notified when this research project is completed. This was used in early alpha versions of RimWorld for research projects such as Gun Turret Cooling which permanently increased the burst shot count of improvised turrets from 3 to 4, but is no longer used.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requiredResearchBuilding&amp;gt;HiTechResearchBench&amp;lt;/requiredResearchBuilding&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If specified, this research project can only be researched at this particular research bench. Note that there is no concept of progression with research benches; if you specify the simple research bench as a required research building then it will not be researchable at a hi-tech research bench.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requiredResearchFacilities&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;MultiAnalyzer&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/requiredResearchFacilities&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Specifies one or more research bench attached facilities that are required to work on this research project. Due to the aforementioned lack of research bench progression and the amount of space that research benches take up in a colony, it is generally recommended to gate modded research projects behind facilities rather than custom research benches if a gatekeeper building is desired. Attached facilities can also be made non-buildable and only obtainable from traders or quests to make them more difficult to acquire.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tags&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;ClassicStart&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;TribalStart&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/tags&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Tags are used to specify this research project as a starting project for starting scenarios.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tab&amp;gt;MyCustomResearchTab&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If specified, will use the designated tab instead of the vanilla research tab. See Custom Research Tabs below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;researchViewX&amp;gt;1&amp;lt;/researchViewX&amp;gt;&lt;br /&gt;
&amp;lt;researchViewX&amp;gt;1.4&amp;lt;/researchViewY&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Specifies the position within its tab that this research project appears at within the vanilla research window. See Research Tab Layout below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;discoveredLetterTitle&amp;gt;About: My Custom Tech&amp;lt;/discoveredLetterTitle&amp;gt;&lt;br /&gt;
&amp;lt;discoveredLetterText&amp;gt;You have discovered a unique technology that unlocks phenomenal cosmic powers!&amp;lt;/discoveredLetterText&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If used, generates a letter when this research project is completed. The following vanilla research projects use this: Electricity, Fabrication, Starflight Basics, and Standard Gravtech.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;discoveredLetterDisabledWhen&amp;gt;&lt;br /&gt;
  &amp;lt;bigThreatsDisabled&amp;gt;true&amp;lt;/bigThreatsDisabled&amp;gt;&lt;br /&gt;
&amp;lt;/discoveredLetterDisabledWhen&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Used to disable the discovered letter when certain game mechanics are disabled due to difficulty settings. Valid options here are: &amp;lt;code&amp;gt;bigThreatsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;trapsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;turretsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mortarsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;extremeWeatherIncidentsDisabled&amp;lt;/code&amp;gt;. This is only used in vanilla for Starflight Basics, which disables the letter warning the player about the raids during reactor startup if big threats (raids) are disabled.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;techprintCount&amp;gt;2&amp;lt;/techprintCount&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Royalty]] {{RoyaltyIcon}} Only) Specifies the number of techprints required to unlock this research project. Note that if the Royalty DLC is not loaded, then this project will be freely researchable so long as its other requirements are met.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;techprintCommonality&amp;gt;1&amp;lt;/techprintCommonality&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Royalty]] {{RoyaltyIcon}} Only) Specifies the commonality of this project's techprints if applicable. Defaults to 1.0.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;techprintMarketValue&amp;gt;1000&amp;lt;/techprintMarketValue&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Royalty]] {{RoyaltyIcon}} Only) Overrides the [[Market Value]] of this research project's techprints if applicable. Defaults to 1000.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;heldByFactionCategoryTags&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Empire&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/heldByFactionCategoryTags&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Royalty]] {{RoyaltyIcon}} Only) If specified, then techprints for this research project are only available from factions with the specified tag. Faction category tags are arbitrary strings, with the following used by vanilla factions: Tribal, Outlander, Ancient, Empire {{RoyaltyIcon}}, OutlanderRefugee {{RoyaltyIcon}}, Beggars {{IdeologyIcon}}, Pilgrims {{IdeologyIcon}}, Sanguophages {{BiotechIcon}}, HoraxCult {{AnomalyIcon}}, Salvager {{OdysseyIcon}}, and TradersGuild {{OdysseyIcon}}.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;hideWhen&amp;gt;&lt;br /&gt;
  &amp;lt;turretsDisabled&amp;gt;true&amp;lt;/turretsDisabled&amp;gt;&lt;br /&gt;
&amp;lt;/hideWhen&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Hides this research project if certain game mechanics are disabled by difficulty settings. Valid options here are: &amp;lt;code&amp;gt;bigThreatsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;trapsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;turretsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mortarsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;extremeWeatherIncidentsDisabled&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requiresMechanitor&amp;gt;true&amp;lt;/requiresMechanitor&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Biotech]] {{BiotechIcon}} Only) If set to true, then this research project can only be researched by a [[mechanitor]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requiredAnalyzed&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;SignalChip&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/requiredAnalyzed&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If specified, then the linked CompAnalyzable items must be analyzed before progress on this research project can be started.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;recalculatePower&amp;gt;true&amp;lt;/recalculatePower&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If specified, forces existing power networks to recalculate their network load upon completion of this research project. Only used in vanilla by Colored Lights, which halves the power cost of vanilla electrical lamps.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;knowledgeCategory&amp;gt;Basic&amp;lt;/knowledgeCategory&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Anomaly]] {{AnomalyIcon}} Only) If specified, determines the &amp;lt;code&amp;gt;KnowledgeCategoryDef&amp;lt;/code&amp;gt; that this research project belongs in. Vanilla Anomaly has Basic and Advanced.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;knowledgeCost&amp;gt;30&amp;lt;/knowledgeCost&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Anomaly]] {{AnomalyIcon}} Only) The knowledge cost to complete this research project. A research project cannot have both a &amp;lt;code&amp;gt;baseCost&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;knowledgeCost&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;teachConcept&amp;gt;Fishing&amp;lt;/teachConcept&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If specified, triggers the designated &amp;lt;code&amp;gt;ConceptDef&amp;lt;/code&amp;gt; in the Learning Helper upon completion of this research project. The only vanilla research projects that use this are Fishing and Void Provocation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;generalRules&amp;gt;&lt;br /&gt;
  &amp;lt;rulesStrings&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;subject-&amp;gt;multi-analysis&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;li&amp;gt;subject_story-&amp;gt;automated a research laboratory&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;subject_story-&amp;gt;unlocked the trans-spectrum secrets of the universe&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;subject_story-&amp;gt;helped identify new stable isotopes&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;li&amp;gt;subject_gerund-&amp;gt;constructing multi-analyzers&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/rulesStrings&amp;gt;&lt;br /&gt;
&amp;lt;/generalRules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If provided, is used to generate descriptive flavor text for [[Schematic|schematics]]. Research projects without generalRules will never have schematics generated for them.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requireGravEngineInspected&amp;gt;true&amp;lt;/requireGravEngineInspected&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Odyssey]] {{OdysseyIcon}} Only) If set to true, then this research project can only be started after a working grav engine has been inspected. Only used by Standard Gravtech in vanilla.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;customUnlockTexts&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Fishing zones&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/customUnlockTexts&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Adds arbitrary text lines to the &amp;quot;unlocks&amp;quot; segment of this research project's description in the research window. Only used by [[Fishing]] in vanilla.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Research Tab Layout ===&lt;br /&gt;
&lt;br /&gt;
Research projects are laid out in the vanilla research UI using a simple coordinate system defined by &amp;lt;code&amp;gt;&amp;lt;researchViewX&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;researchViewY&amp;gt;&amp;lt;/code&amp;gt;. note that while the X-axis increments by 1, the Y-axis increments by 0.7.&lt;br /&gt;
&lt;br /&gt;
[[File:ResearchView.png|none|border]]&lt;br /&gt;
&lt;br /&gt;
Note that research projects that occupy the same grid location (usually from multiple mods trying to use the same location) will cause the projects to get staggered in the research window. It is generally recommended to use a custom research tab if you have sufficient research projects to justify it.&lt;br /&gt;
&lt;br /&gt;
== Custom Research Tabs ==&lt;br /&gt;
&lt;br /&gt;
Custom research tabs can be used by creating a &amp;lt;code&amp;gt;ResearchTabDef&amp;lt;/code&amp;gt;, then specifying this in the &amp;lt;code&amp;gt;&amp;lt;tab&amp;gt;&amp;lt;/code&amp;gt; field of your &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ResearchTabDef&amp;gt;&lt;br /&gt;
  &amp;lt;defName&amp;gt;MyCustomResearchTab&amp;lt;/defName&amp;gt;&lt;br /&gt;
  &amp;lt;label&amp;gt;My Mod&amp;lt;/label&amp;gt;&lt;br /&gt;
  &amp;lt;generalTitle&amp;gt;Custom mod research&amp;lt;/generalTitle&amp;gt;&lt;br /&gt;
  &amp;lt;generalDescription&amp;gt;Fancy-pants research unlocked by my super-cool mod.&amp;lt;/generalDescription&amp;gt;&lt;br /&gt;
&amp;lt;/ResearchTabDef&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Custom Research ==&lt;br /&gt;
&lt;br /&gt;
The following vanilla Def types support one or more research projects as a prerequisite:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TutorialTableWrapper&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;TutorialCodeTable&amp;quot;&lt;br /&gt;
! XML Object !! Field&lt;br /&gt;
|-&lt;br /&gt;
| RecipeDef || researchPrerequisite (single)&lt;br /&gt;
|-&lt;br /&gt;
| RecipeDef || researchPrerequisites (list)&lt;br /&gt;
|-&lt;br /&gt;
| BuildableDef (includes ThingDef) || researchPrerequisites (list only)&lt;br /&gt;
|-&lt;br /&gt;
| PlantProperties || sowResearchPrerequisites (list only)&lt;br /&gt;
|-&lt;br /&gt;
| RecipeMakerProperties || researchPrerequisite (single)&lt;br /&gt;
|-&lt;br /&gt;
| RecipeMakerProperties || researchPrerequisites (list)&lt;br /&gt;
|-&lt;br /&gt;
| TerrainTemplateDef || researchPrerequisites (list only)&lt;br /&gt;
|-&lt;br /&gt;
| DesignationCategoryDef || researchPrerequisites (list only)&lt;br /&gt;
|-&lt;br /&gt;
| PsychicRitualDef || researchPrerequisites (list only)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Checking Research Completion ==&lt;br /&gt;
&lt;br /&gt;
Checking whether a research project has been completed from C# can be done by obtaining the &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt; and calling the &amp;lt;code&amp;gt;IsFinished&amp;lt;/code&amp;gt; property. If you need to do this often, then it's recommended you use a [[Modding_Tutorials/Linking_XML_and_C|DefOf]] to obtain a static reference to it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Overhaul_workspace&amp;diff=170668</id>
		<title>Modding Tutorials/Overhaul workspace</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Overhaul_workspace&amp;diff=170668"/>
		<updated>2025-10-07T03:45:44Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: /* Modding Basics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Overhaul Workspace}}&lt;br /&gt;
&lt;br /&gt;
{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Under_Review}}&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This is a workspace for the ongoing overhaul of the RimWorld Wiki's modding tutorials and references. If you managed to find your way here, please check out the main [[Modding_Tutorials|modding tutorials index page]] instead.&lt;br /&gt;
&lt;br /&gt;
This overhaul is being overseen by the '''#mod-development''' channel on the [https://discord.gg/rimworld RimWorld Discord], please contact us before changing anything.&lt;br /&gt;
&lt;br /&gt;
== Modding Basics ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;Modding Basics&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
* Getting Started&lt;br /&gt;
* [[Modding_Tutorials/Recommended software|Recommended Software]]&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]]&lt;br /&gt;
* [[Modding_Tutorials/About.xml|About.xml]]&lt;br /&gt;
* [[Modding_Tutorials/Textures|Textures]]&lt;br /&gt;
* [[Modding_Tutorials/Sounds|Sounds]]&lt;br /&gt;
* [[Modding_Tutorials/Localization|Localization]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;XML&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
* Defs&lt;br /&gt;
* ThingDef&lt;br /&gt;
* [[Modding Tutorials/MayRequire|MayRequire]]&lt;br /&gt;
* [[Modding Tutorials/PatchOperations|PatchOperations]]&lt;br /&gt;
* [[Modding Tutorials/Research Projects|Research Projects]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;C#&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
* C# Basics&lt;br /&gt;
* [[Modding_Tutorials/Decompiling source code|Decompiling Source Code]] - Reading compiled code from the base game as well as DLCs and other mods.&lt;br /&gt;
* [[Modding_Tutorials/Setting up a solution|Setting up]] - (Needs cleanup)&lt;br /&gt;
* Harmony Primer&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;Code References&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
* [[Modding_Tutorials/Infrastructure_Overview|Infrastructure Overview]]&lt;br /&gt;
* [[Modding_Tutorials/Application_Startup|Application Startup]]&lt;br /&gt;
* [[Modding_Tutorials/Simulation_Lifecycle|Simulation Lifecycle]]&lt;br /&gt;
* [[Modding_Tutorials/Rendering_Lifecycle|Rendering Lifecycle]]&lt;br /&gt;
* [[Modding_Tutorials/Buildings|Buildings]]&lt;br /&gt;
* [[Modding_Tutorials/Pawns|Pawns]]&lt;br /&gt;
* [[Modding_Tutorials/Audio|Audio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
This will be a curated subset of tutorials that will be vetted, reviewed, and maintained by the overhaul team. These are meant to be a cohesive set of tutorials that guides the reader from the simplest single-Def items such as weapons to building a full custom faction.&lt;br /&gt;
&lt;br /&gt;
=== Basic Tutorials (XML) ===&lt;br /&gt;
* [[Modding_Tutorials/Basic_Melee_Weapon|Creating a custom melee weapon]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Ranged_Weapon|Creating a custom ranged weapon]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Plant|Creating a custom plant]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Animal|Creating a custom animal]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Building|Creating a simple building]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Workbench|Creating a custom workbench]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Drug|Creating a custom drug]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced Tutorials (XML) ===&lt;br /&gt;
* [[Modding_Tutorials/Advanced_Faction|Creating a custom faction]]&lt;br /&gt;
* [[Modding_Tutorials/Advanced_Culture|Creating a custom culture]]&lt;br /&gt;
* [[Modding_Tutorials/Advanced_Trader|Creating a custom trader type]]&lt;br /&gt;
&lt;br /&gt;
=== Basic Tutorials (C#) ===&lt;br /&gt;
* [[Modding_Tutorials/Basic_Consumable|Creating a custom consumable]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced Tutorials (C#) ===&lt;br /&gt;
* [[Modding_Tutorials/Advanced_Texture_Overlays|Creating custom texture overlays]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding tutorials]]&lt;br /&gt;
&lt;br /&gt;
== Banner Templates ==&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Under_Review}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{:Modding_Tutorials/Under_Review}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Marked_for_Deletion}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{:Modding_Tutorials/Marked_for_Deletion}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Obsolete}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{:Modding_Tutorials/Obsolete}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Outdated}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{:Modding_Tutorials/Outdated}}&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Overhaul_workspace&amp;diff=170667</id>
		<title>Modding Tutorials/Overhaul workspace</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Overhaul_workspace&amp;diff=170667"/>
		<updated>2025-10-07T03:44:05Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Overhaul Workspace}}&lt;br /&gt;
&lt;br /&gt;
{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Under_Review}}&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This is a workspace for the ongoing overhaul of the RimWorld Wiki's modding tutorials and references. If you managed to find your way here, please check out the main [[Modding_Tutorials|modding tutorials index page]] instead.&lt;br /&gt;
&lt;br /&gt;
This overhaul is being overseen by the '''#mod-development''' channel on the [https://discord.gg/rimworld RimWorld Discord], please contact us before changing anything.&lt;br /&gt;
&lt;br /&gt;
== Modding Basics ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;Modding Basics&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
* Getting Started&lt;br /&gt;
* [[Modding_Tutorials/Recommended software|Recommended Software]]&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]]&lt;br /&gt;
* [[Modding_Tutorials/About.xml|About.xml]]&lt;br /&gt;
* [[Modding_Tutorials/Textures|Textures]]&lt;br /&gt;
* [[Modding_Tutorials/Sounds|Sounds]]&lt;br /&gt;
* [[Modding_Tutorials/Research_Projects|Research Projects]]&lt;br /&gt;
* [[Modding_Tutorials/Localization|Localization]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;XML&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
* Defs&lt;br /&gt;
* ThingDef&lt;br /&gt;
* [[Modding Tutorials/MayRequire|MayRequire]]&lt;br /&gt;
* [[Modding Tutorials/PatchOperations|PatchOperations]]&lt;br /&gt;
* [[Modding Tutorials/Research Projects|Research Projects]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;C#&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
* C# Basics&lt;br /&gt;
* [[Modding_Tutorials/Decompiling source code|Decompiling Source Code]] - Reading compiled code from the base game as well as DLCs and other mods.&lt;br /&gt;
* [[Modding_Tutorials/Setting up a solution|Setting up]] - (Needs cleanup)&lt;br /&gt;
* Harmony Primer&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-section&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-subtitle&amp;quot;&amp;gt;Code References&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;TwoColumnCollapsibleLayout-text&amp;quot;&amp;gt;&lt;br /&gt;
* [[Modding_Tutorials/Infrastructure_Overview|Infrastructure Overview]]&lt;br /&gt;
* [[Modding_Tutorials/Application_Startup|Application Startup]]&lt;br /&gt;
* [[Modding_Tutorials/Simulation_Lifecycle|Simulation Lifecycle]]&lt;br /&gt;
* [[Modding_Tutorials/Rendering_Lifecycle|Rendering Lifecycle]]&lt;br /&gt;
* [[Modding_Tutorials/Buildings|Buildings]]&lt;br /&gt;
* [[Modding_Tutorials/Pawns|Pawns]]&lt;br /&gt;
* [[Modding_Tutorials/Audio|Audio]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
This will be a curated subset of tutorials that will be vetted, reviewed, and maintained by the overhaul team. These are meant to be a cohesive set of tutorials that guides the reader from the simplest single-Def items such as weapons to building a full custom faction.&lt;br /&gt;
&lt;br /&gt;
=== Basic Tutorials (XML) ===&lt;br /&gt;
* [[Modding_Tutorials/Basic_Melee_Weapon|Creating a custom melee weapon]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Ranged_Weapon|Creating a custom ranged weapon]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Plant|Creating a custom plant]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Animal|Creating a custom animal]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Building|Creating a simple building]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Workbench|Creating a custom workbench]]&lt;br /&gt;
* [[Modding_Tutorials/Basic_Drug|Creating a custom drug]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced Tutorials (XML) ===&lt;br /&gt;
* [[Modding_Tutorials/Advanced_Faction|Creating a custom faction]]&lt;br /&gt;
* [[Modding_Tutorials/Advanced_Culture|Creating a custom culture]]&lt;br /&gt;
* [[Modding_Tutorials/Advanced_Trader|Creating a custom trader type]]&lt;br /&gt;
&lt;br /&gt;
=== Basic Tutorials (C#) ===&lt;br /&gt;
* [[Modding_Tutorials/Basic_Consumable|Creating a custom consumable]]&lt;br /&gt;
&lt;br /&gt;
=== Advanced Tutorials (C#) ===&lt;br /&gt;
* [[Modding_Tutorials/Advanced_Texture_Overlays|Creating custom texture overlays]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding tutorials]]&lt;br /&gt;
&lt;br /&gt;
== Banner Templates ==&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Under_Review}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{:Modding_Tutorials/Under_Review}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Marked_for_Deletion}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{:Modding_Tutorials/Marked_for_Deletion}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Obsolete}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{:Modding_Tutorials/Obsolete}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Outdated}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{:Modding_Tutorials/Outdated}}&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=170666</id>
		<title>Modding Tutorials</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials&amp;diff=170666"/>
		<updated>2025-10-07T03:41:52Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: Added link to research project guide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Top Nav Box--&amp;gt;&lt;br /&gt;
{| align=center&lt;br /&gt;
| {{Mods_Nav}}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the hub page for tutorials, guides, and reference materials for creating mods for RimWorld. If you are looking for instructions on how to use RimWorld, please check out the general [[Modding]] hub.&lt;br /&gt;
&lt;br /&gt;
As RimWorld does not have a formal modding API, nearly all of the information here has been gathered and maintained by the modding community.&lt;br /&gt;
&lt;br /&gt;
'''NEW: [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]]''' - A work-in-progress list of changes datamined by the modding community in the current unstable version of RimWorld 1.6. '''THERE MAY BE ODYSSEY DLC SPOILERS, YOU HAVE BEEN WARNED.'''&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
==About RimWorld==&lt;br /&gt;
{{Stub|section=1|reason= Where does [[Modding Tutorials/Rituals]] fit in the below categories?}}&lt;br /&gt;
RimWorld is a multi-platform game written on Unity 2022.3.35. However, the Unity Editor is not used for creating mods unless you are creating new shaders or building optional asset bundles.&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Recommended_software|Recommended Software]] - Editors and other useful software for mod development&lt;br /&gt;
* [[Modding_Tutorials/Mod_Folder_Structure|Mod Folder Structure]] - Explore the basic folder structure of a mod&lt;br /&gt;
** [[Modding_Tutorials/About.xml|About.xml]] - About.xml identifies and describes your mod to RimWorld so that it can be loaded properly&lt;br /&gt;
&lt;br /&gt;
===Game Systems Guides===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Defs|Defs]] - XML Definitions are used to define and configure content in a way that does not require compiling code&lt;br /&gt;
** [[Modding_Tutorials/MayRequire|MayRequire]] - MayRequire and MayRequireAnyOf are used to conditionally load Defs and list entries based on whether a DLC or other mod is loaded&lt;br /&gt;
* [[Modding_Tutorials/Localization|Localization]] - Define text strings used for translations and word lists used in name and text generation&lt;br /&gt;
* [[Modding_Tutorials/PatchOperations|PatchOperations]] - PatchOperations are used to modify XML Defs without overwriting them completely&lt;br /&gt;
* [[Modding_Tutorials/Sounds|Sounds]] - (Needs Rewriting) Adding sound files for mods&lt;br /&gt;
* [[Modding_Tutorials/Textures|Textures]] - How to create and add textures to mods&lt;br /&gt;
* [[Modding Tutorials/Plant Rendering|Plant Rendering]] - An explanation of how plant textures are rendered&lt;br /&gt;
* [[Modding_Tutorials/Research_Projects|Research Projects]] - How to create and use research projects.&lt;br /&gt;
&lt;br /&gt;
===XML Tutorials===&lt;br /&gt;
&lt;br /&gt;
The following are step-by-step tutorials for creating basic content mods.&lt;br /&gt;
&lt;br /&gt;
Basic Tutorials:&lt;br /&gt;
* [[Modding_Tutorials/Basic_Melee_Weapon|Basic Melee Weapon]] - How to create a basic melee weapon with a texture mask&lt;br /&gt;
* [[Modding_Tutorials/Basic_Ranged_Weapon|Basic Ranged Weapon]] - How to create a basic ranged weapon with custom sound effects&lt;br /&gt;
* [[Modding_Tutorials/Basic_Plant|Basic Plant]] - How to create a custom plant with both a cultivated and wild variant&lt;br /&gt;
* Custom Animal (Upcoming)&lt;br /&gt;
* Simple Building (Upcoming)&lt;br /&gt;
* Custom Workbench (Upcoming)&lt;br /&gt;
* Custom Drug (Upcoming)&lt;br /&gt;
&lt;br /&gt;
Advanced Tutorials:&lt;br /&gt;
* Custom Faction (Upcoming)&lt;br /&gt;
* Custom Culture (Upcoming)&lt;br /&gt;
* Custom Trader Type (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===C# Guides===&lt;br /&gt;
&lt;br /&gt;
C# is used to create and define custom game behaviors &lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Decompiling source code|Decompiling Source Code]] - How to set up and use a decompiler to read vanilla game code&lt;br /&gt;
* [[Modding_Tutorials/Setting up a solution|Setting up a Solution]] - How to set up a solution for compiling a custom mod assembly&lt;br /&gt;
* [[Modding_Tutorials/Application_Startup|Application Startup]] - Describes the application startup process and the order in which game data is loaded&lt;br /&gt;
* Custom Consumable (Upcoming)&lt;br /&gt;
* Custom Overlays (Upcoming)&lt;br /&gt;
&lt;br /&gt;
===Updates and Migrations ===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.5_Mod_Updates|RimWorld 1.5 Mod Updates]] - (WARNING: Anomaly Spoilers) Community notes for updating mods from 1.4 to 1.5.&lt;br /&gt;
* [[Modding_Tutorials/RimWorld_1.6_Mod_Updates|RimWorld 1.6 Mod Updates]]''' - A work-in-progress list of changes datamined by the modding community in the current unstable version of RimWorld 1.6. '''THERE MAY BE ODYSSEY DLC SPOILERS, YOU HAVE BEEN WARNED.&lt;br /&gt;
&lt;br /&gt;
===Slightly Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[Modding_Tutorials/Plague_Gun_(1.1)|Plague Gun]] - This tutorial was created for RimWorld 1.0 but updated for 1.4. While the exact content is obsolete as you can now accomplish the same result with purely vanilla XML, it is still useful as a crash course for end-to-end mod creation and is here until newer tutorials can replace it.&lt;br /&gt;
&lt;br /&gt;
===Uploading to Steam Workshop===&lt;br /&gt;
* You can upload your mod to Steam Workshop by enabling Development Mode from your game Options and then using the Upload option under the Advanced button in the vanilla mod manager.&lt;br /&gt;
* Note that in order to upload to Steam Workshop, you must own the game on Steam Workshop. Owning RimWorld on GOG or Epic will not work.&lt;br /&gt;
* Your Preview.png should be a 640x360 or 1280x720 PNG and '''must''' be under 1MB. If it is too large, then your upload will be rejected with &amp;lt;code&amp;gt;Error : Limit Exceeded&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you get a &amp;lt;code&amp;gt;OnItemSubmitted Fail&amp;lt;/code&amp;gt; error, make sure you close any programs that are targeting items in your mods folder. This can also mean that Steam Workshop is having some technical issues at the moment. If it keeps occurring, then the only thing to do is to wait a few hours for it to clear up.&lt;br /&gt;
* Steam mod descriptions don't use markdown, they use a variant of BBCode. Please check out the [https://steamcommunity.com/comment/Guide/formattinghelp Steam text formatting guide].&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
'''Note:''' All of the above tutorials have been cleaned up and reviewed by the #mod-development team on the [https://discord.gg/rimworld RimWorld Discord] in cooperation with RimWorld Wiki staff editors. Please let us know before creating, adding, or making any major edits to the vetted tutorials and guides section!&lt;br /&gt;
&lt;br /&gt;
==Outdated / Under Review==&lt;br /&gt;
&lt;br /&gt;
The following tutorials are either out of date or in need of a rewrite. The information in them might be useful but may not be up to standard; please be aware of any potential inaccuracies until they can be addressed.&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/First Steps|First Steps and Some Links]]&lt;br /&gt;
* [[Modding Tutorials/Essence| Essence of Modding]]&lt;br /&gt;
* [[Modding Troubleshooting Tips and Guides]]&lt;br /&gt;
* [[Modding Tutorials/Testing mods|Testing Mods]]&lt;br /&gt;
** [[Modding Tutorials/Testing mods#Development mode|Development Mode]]&lt;br /&gt;
* [[Modding Tutorials/Sounds|Adding and Testing Sounds]]&lt;br /&gt;
* [[Modding Tutorials/Assets|Decompiling Texture/Sound Assets]]&lt;br /&gt;
* [[Modding Tutorials/Compatibility|Compatibility]]&lt;br /&gt;
* [[Modding_Tutorials/Distribution|Distribution]]&lt;br /&gt;
* [[Modding_Tutorials/Modifying defs|Modifying Defs]]&lt;br /&gt;
* [[Modding_Tutorials/Troubleshooting|Troubleshooting mods]]&lt;br /&gt;
&lt;br /&gt;
===XML tutorials===&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/XML file structure|XML File Structure]]&lt;br /&gt;
* [[Modding Tutorials/XML Defs|Introduction to XML Defs]]&lt;br /&gt;
** [[Modding Tutorials/Compatibility with defs|XML Def Compatibility]]&lt;br /&gt;
** [[Modding Tutorials/ThingDef|ThingDef explained]]&lt;br /&gt;
** [[Modding Tutorials/Weapons Guns|Weapons_Guns.xml explained]]. Slightly dated.&lt;br /&gt;
&lt;br /&gt;
===C# tutorials===&lt;br /&gt;
* [[Modding_Tutorials/Hello World|Hello World]]&lt;br /&gt;
* [[Modding_Tutorials/Writing custom code|Writing Custom Code]]&lt;br /&gt;
* [[Modding Tutorials/Linking XML and C#|Linking XML and C#]]&lt;br /&gt;
* [[Modding_Tutorials/Harmony|Alter Code at Runtime with Harmony]] - this is a best practice for modifying game code, replacing C# code injection to reduce Mod Conflicts&lt;br /&gt;
* [[Modding_Tutorials/Modifying classes|Adding fields and methods to classes]]&lt;br /&gt;
* [[Modding Tutorials/ModSettings|Mod settings]] - Add settings to your mod&lt;br /&gt;
* [[Modding Tutorials/DefModExtension|Def mod extensions]] - Add (custom) fields to Defs&lt;br /&gt;
* [[Modding Tutorials/Custom Comp Classes|Custom Comp Classes]] - A quick overview of what types of Comps there are, and what they're suited for.&lt;br /&gt;
* [[Modding_Tutorials/ThingComp|ThingComp]] - Learn all there is to know about ThingComps.&lt;br /&gt;
* [[Modding Tutorials/GameComponent|Components]] - GameComponents, WorldComponents, and MapComponents&lt;br /&gt;
* [[Modding_Tutorials/Def classes|Introduction to Def Classes]]&lt;br /&gt;
* [[Modding_Tutorials/Compatibility_with_DLLs|Using Harmony to optionally patch other mods for the sake of compatibility]]&lt;br /&gt;
* [[Modding Tutorials/TweakValue|TweakValues]] - Change values on the fly (handy for quick iteration!)&lt;br /&gt;
* [[Modding Tutorials/ExposeData|ExposeData]] - Save stuff&lt;br /&gt;
* [[Modding Tutorials/BigAssListOfUsefulClasses|The big ass list of useful classes]] - A non-exhaustive list of classes you'll use most&lt;br /&gt;
* [[Modding Tutorials/GrammarResolver|Grammar Resolver]] - PAWN_objective, PAWN_possessive? Find out what it all means here.&lt;br /&gt;
* [https://github.com/Mehni/ExampleJob/wiki ExampleJob] - Mehni's top to bottom breakdown of Jobs.&lt;br /&gt;
* [[Modding_Tutorials/ConfigErrors|Config Errors]] - Provide configuration issues to the user on startup.&lt;br /&gt;
* [[Modding Tutorials/DebugActions|Debug Actions]] - Call methods from the debug menu&lt;br /&gt;
* [https://www.arp242.net/rimworld-mod-linux.html Getting started with RimWorld modding on Linux]&lt;br /&gt;
&lt;br /&gt;
===Art Tutorials===&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/artstyle Artstyle] - Officially unofficial guide to RimWorld's Artstyle&lt;br /&gt;
* [https://www.reddit.com/r/RimWorld/comments/5tn1pi/rimworldstyle_sprite_tutorials/ Ekksu's guide to creating RimWorld animals]&lt;br /&gt;
* [https://steamcommunity.com/sharedfiles/filedetails/?id=1114369188 ChickenPlucker's guide to creating apparel]&lt;br /&gt;
* [https://github.com/seraphile/rimshare/wiki/Colouring-in-Images Seraphile's guide to masks]&lt;br /&gt;
&lt;br /&gt;
===Under Construction===&lt;br /&gt;
&lt;br /&gt;
These are currently unfinished and need to be cleaned up or removed&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Quests]]&lt;br /&gt;
* [[Modding Tutorials/Troubleshooting/Finding Exceptions]]&lt;br /&gt;
&lt;br /&gt;
===Dangerously Outdated===&lt;br /&gt;
&lt;br /&gt;
* [[RimWorld 1.3: XML Mod Creation]]&lt;br /&gt;
* [[Modding Tutorials/Assembly Modding Example|Assembly Modding]]&lt;br /&gt;
* [[Plague Gun (1.1)|The Plague Gun]] tutorial originally by Jecrell, updated to 1.1+. &lt;br /&gt;
* [[Modding Tutorials/Xenotype template]] originally by Ryflamer&lt;br /&gt;
&lt;br /&gt;
* [[Modding Tutorials/Smelter]]&lt;br /&gt;
* [[Modding Tutorials/Items]]&lt;br /&gt;
* [[Modding Tutorials/Furniture]]&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [https://github.com/roxxploxx/RimWorldModGuide/wiki Roxxploxx's set of modding tutorials]&lt;br /&gt;
* [https://spdskatr.github.io/RWModdingResources/ RimWorld Modding Resources - A hub for guides, modders, practical tips]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
	<entry>
		<id>https://rimworldwiki.com/index.php?title=Modding_Tutorials/Research_Projects&amp;diff=170665</id>
		<title>Modding Tutorials/Research Projects</title>
		<link rel="alternate" type="text/html" href="https://rimworldwiki.com/index.php?title=Modding_Tutorials/Research_Projects&amp;diff=170665"/>
		<updated>2025-10-07T03:40:57Z</updated>

		<summary type="html">&lt;p&gt;Aelanna: New research project modding guide.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Research Projects}}&lt;br /&gt;
&lt;br /&gt;
{{BackToTutorials}}&lt;br /&gt;
&lt;br /&gt;
{{:Modding_Tutorials/Under_Review}}&lt;br /&gt;
&lt;br /&gt;
Research projects are used to gate access to buildings and crafting recipes behind the use of the [[Research]] system.&lt;br /&gt;
&lt;br /&gt;
''Last updated: 2025-10-06 (RimWorld v1.6)''&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Research projects are defined in XML using &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt; [[Modding_Tutorials/Defs|Defs]]. As with all Defs, looking at the vanilla examples is a great way to get a feel for how the system is used.&lt;br /&gt;
&lt;br /&gt;
=== Fields ===&lt;br /&gt;
&lt;br /&gt;
The following are valid fields in &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt;. All of these fields are optional unless otherwise specified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TutorialTableWrapper&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;TutorialCodeTable&amp;quot;&lt;br /&gt;
! XML Example !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;baseCost&amp;gt;1000&amp;lt;/baseCost&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
The base cost to complete this research project. The final cost of this project will be modified by tech level differences between the player's faction and that of the research project. A research project must either have a &amp;lt;code&amp;gt;baseCost&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;knowledgeCost&amp;lt;/code&amp;gt; (see below).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;preqrequisites&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Electricity&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Batteries&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/preqrequisites&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
All of a project's prerequisites must be completed before research on it can begin. Prerequisites on the same tab will be linked to the project with a line.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;hiddenPreqrequisites&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Machining&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/hiddenPreqrequisites&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Hidden prerequisites work exactly the same as regular prerequisites except that lines will not be drawn between this project and its hidden prerequisites. Using them can be useful in reducing visual clutter.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;techLevel&amp;gt;Industrial&amp;lt;/techLevel&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
The tech level of this research project. Valid options are: '''Undefined''', '''Animal''', '''Neolithic''', '''Medieval''', '''Industrial''', '''Spacer''', '''Ultra''', and '''Archotech'''. As tech levels are defined via an enum rather than via Defs, it is effectively impossible to define new ones without major compatibility problems.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requiredByThis&amp;gt;&amp;lt;/requiredByThis&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
This field is present on &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt; but is not used anywhere in vanilla XML, nor does the field appear to be utilized by any C# code. Its purpose is unknown.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;researchMods&amp;gt;&amp;lt;/researchMods&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
A modder hook for wiring up C# classes that will be notified when this research project is completed. Not used in any vanilla research project. (More documentation needed, it is unknown if any mods actually use this.)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requiredResearchBuilding&amp;gt;HiTechResearchBench&amp;lt;/requiredResearchBuilding&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If specified, this research project can only be researched at this particular research bench. Note that there is no concept of progression with research benches; if you specify the simple research bench as a required research building then it will not be researchable at a hi-tech research bench.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requiredResearchFacilities&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;MultiAnalyzer&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/requiredResearchFacilities&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Specifies one or more research bench attached facilities that are required to work on this research project. Due to the aforementioned lack of research bench progression and the amount of space that research benches take up in a colony, it is generally recommended to gate modded research projects behind facilities rather than custom research benches if a gatekeeper building is desired. Attached facilities can also be made non-buildable and only obtainable from traders or quests to make them more difficult to acquire.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tags&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;ClassicStart&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;TribalStart&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/tags&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Tags are used to specify this research project as a starting project for starting scenarios.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tab&amp;gt;MyCustomResearchTab&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If specified, will use the designated tab instead of the vanilla research tab. See Custom Research Tabs below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;researchViewX&amp;gt;1&amp;lt;/researchViewX&amp;gt;&lt;br /&gt;
&amp;lt;researchViewX&amp;gt;1.4&amp;lt;/researchViewY&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Specifies the position within its tab that this research project appears at within the vanilla research window. See Research Tab Layout below for more details.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;discoveredLetterTitle&amp;gt;About: My Custom Tech&amp;lt;/discoveredLetterTitle&amp;gt;&lt;br /&gt;
&amp;lt;discoveredLetterText&amp;gt;You have discovered a unique technology that unlocks phenomenal cosmic powers!&amp;lt;/discoveredLetterText&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If used, generates a letter when this research project is completed. The following vanilla research projects use this: Electricity, Fabrication, Starflight Basics, and Standard Gravtech.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;discoveredLetterDisabledWhen&amp;gt;&lt;br /&gt;
  &amp;lt;bigThreatsDisabled&amp;gt;true&amp;lt;/bigThreatsDisabled&amp;gt;&lt;br /&gt;
&amp;lt;/discoveredLetterDisabledWhen&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Used to disable the discovered letter when certain game mechanics are disabled due to difficulty settings. Valid options here are: &amp;lt;code&amp;gt;bigThreatsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;trapsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;turretsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mortarsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;extremeWeatherIncidentsDisabled&amp;lt;/code&amp;gt;. This is only used in vanilla for Starflight Basics, which disables the letter warning the player about the raids during reactor startup if big threats (raids) are disabled.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;techprintCount&amp;gt;2&amp;lt;/techprintCount&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Royalty]] {{RoyaltyIcon}} Only) Specifies the number of techprints required to unlock this research project. Note that if the Royalty DLC is not loaded, then this project will be freely researchable so long as its other requirements are met.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;techprintCommonality&amp;gt;1&amp;lt;/techprintCommonality&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Royalty]] {{RoyaltyIcon}} Only) Specifies the commonality of this project's techprints if applicable. Defaults to 1.0.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;techprintMarketValue&amp;gt;1000&amp;lt;/techprintMarketValue&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Royalty]] {{RoyaltyIcon}} Only) Overrides the [[Market Value]] of this research project's techprints if applicable. Defaults to 1000.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;heldByFactionCategoryTags&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Empire&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/heldByFactionCategoryTags&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Royalty]] {{RoyaltyIcon}} Only) If specified, then techprints for this research project are only available from factions with the specified tag. Faction category tags are arbitrary strings, with the following used by vanilla factions: Tribal, Outlander, Ancient, Empire {{RoyaltyIcon}}, OutlanderRefugee {{RoyaltyIcon}}, Beggars {{IdeologyIcon}}, Pilgrims {{IdeologyIcon}}, Sanguophages {{BiotechIcon}}, HoraxCult {{AnomalyIcon}}, Salvager {{OdysseyIcon}}, and TradersGuild {{OdysseyIcon}}.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;hideWhen&amp;gt;&lt;br /&gt;
  &amp;lt;turretsDisabled&amp;gt;true&amp;lt;/turretsDisabled&amp;gt;&lt;br /&gt;
&amp;lt;/hideWhen&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Hides this research project if certain game mechanics are disabled by difficulty settings. Valid options here are: &amp;lt;code&amp;gt;bigThreatsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;trapsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;turretsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mortarsDisabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;extremeWeatherIncidentsDisabled&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requiresMechanitor&amp;gt;true&amp;lt;/requiresMechanitor&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Biotech]] {{BiotechIcon}} Only) If set to true, then this research project can only be researched by a [[mechanitor]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requiredAnalyzed&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;SignalChip&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/requiredAnalyzed&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If specified, then the linked CompAnalyzable items must be analyzed before progress on this research project can be started.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;recalculatePower&amp;gt;true&amp;lt;/recalculatePower&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If specified, forces existing power networks to recalculate their network load upon completion of this research project. Only used in vanilla by Colored Lights, which halves the power cost of vanilla electrical lamps.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;knowledgeCategory&amp;gt;Basic&amp;lt;/knowledgeCategory&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Anomaly]] {{AnomalyIcon}} Only) If specified, determines the &amp;lt;code&amp;gt;KnowledgeCategoryDef&amp;lt;/code&amp;gt; that this research project belongs in. Vanilla Anomaly has Basic and Advanced.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;knowledgeCost&amp;gt;30&amp;lt;/knowledgeCost&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Anomaly]] {{AnomalyIcon}} Only) The knowledge cost to complete this research project. A research project cannot have both a &amp;lt;code&amp;gt;baseCost&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;knowledgeCost&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;teachConcept&amp;gt;Fishing&amp;lt;/teachConcept&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If specified, triggers the designated &amp;lt;code&amp;gt;ConceptDef&amp;lt;/code&amp;gt; in the Learning Helper upon completion of this research project. The only vanilla research projects that use this are Fishing and Void Provocation.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;generalRules&amp;gt;&lt;br /&gt;
  &amp;lt;rulesStrings&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;subject-&amp;gt;multi-analysis&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;li&amp;gt;subject_story-&amp;gt;automated a research laboratory&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;subject_story-&amp;gt;unlocked the trans-spectrum secrets of the universe&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;subject_story-&amp;gt;helped identify new stable isotopes&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;li&amp;gt;subject_gerund-&amp;gt;constructing multi-analyzers&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/rulesStrings&amp;gt;&lt;br /&gt;
&amp;lt;/generalRules&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
If provided, is used to generate descriptive flavor text for [[Schematic|schematics]]. Research projects without generalRules will never have schematics generated for them.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requireGravEngineInspected&amp;gt;true&amp;lt;/requireGravEngineInspected&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
([[Odyssey]] {{OdysseyIcon}} Only) If set to true, then this research project can only be started after a working grav engine has been inspected. Only used by Standard Gravtech in vanilla.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;customUnlockTexts&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Fishing zones&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/customUnlockTexts&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
| class=&amp;quot;TutorialCodeTable-description&amp;quot; |&lt;br /&gt;
Adds arbitrary text lines to the &amp;quot;unlocks&amp;quot; segment of this research project's description in the research window. Only used by [[Fishing]] in vanilla.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Research Tab Layout ===&lt;br /&gt;
&lt;br /&gt;
Research projects are laid out in the vanilla research UI using a simple coordinate system defined by &amp;lt;code&amp;gt;&amp;lt;researchViewX&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;researchViewY&amp;gt;&amp;lt;/code&amp;gt;. note that while the X-axis increments by 1, the Y-axis increments by 0.7.&lt;br /&gt;
&lt;br /&gt;
[[File:ResearchView.png|none|border]]&lt;br /&gt;
&lt;br /&gt;
Note that research projects that occupy the same grid location (usually from multiple mods trying to use the same location) will cause the projects to get staggered in the research window. It is generally recommended to use a custom research tab if you have sufficient research projects to justify it.&lt;br /&gt;
&lt;br /&gt;
== Custom Research Tabs ==&lt;br /&gt;
&lt;br /&gt;
Custom research tabs can be used by creating a &amp;lt;code&amp;gt;ResearchTabDef&amp;lt;/code&amp;gt;, then specifying this in the &amp;lt;code&amp;gt;&amp;lt;tab&amp;gt;&amp;lt;/code&amp;gt; field of your &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ResearchTabDef&amp;gt;&lt;br /&gt;
  &amp;lt;defName&amp;gt;MyCustomResearchTab&amp;lt;/defName&amp;gt;&lt;br /&gt;
  &amp;lt;label&amp;gt;My Mod&amp;lt;/label&amp;gt;&lt;br /&gt;
  &amp;lt;generalTitle&amp;gt;Custom mod research&amp;lt;/generalTitle&amp;gt;&lt;br /&gt;
  &amp;lt;generalDescription&amp;gt;Fancy-pants research unlocked by my super-cool mod.&amp;lt;/generalDescription&amp;gt;&lt;br /&gt;
&amp;lt;/ResearchTabDef&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using Custom Research ==&lt;br /&gt;
&lt;br /&gt;
The following vanilla Def types support one or more research projects as a prerequisite:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;TutorialTableWrapper&amp;quot;&amp;gt;&lt;br /&gt;
{| class=&amp;quot;TutorialCodeTable&amp;quot;&lt;br /&gt;
! XML Object !! Field&lt;br /&gt;
|-&lt;br /&gt;
| RecipeDef || researchPrerequisite (single)&lt;br /&gt;
|-&lt;br /&gt;
| RecipeDef || researchPrerequisites (list)&lt;br /&gt;
|-&lt;br /&gt;
| BuildableDef (includes ThingDef) || researchPrerequisites (list only)&lt;br /&gt;
|-&lt;br /&gt;
| PlantProperties || sowResearchPrerequisites (list only)&lt;br /&gt;
|-&lt;br /&gt;
| RecipeMakerProperties || researchPrerequisite (single)&lt;br /&gt;
|-&lt;br /&gt;
| RecipeMakerProperties || researchPrerequisites (list)&lt;br /&gt;
|-&lt;br /&gt;
| TerrainTemplateDef || researchPrerequisites (list only)&lt;br /&gt;
|-&lt;br /&gt;
| DesignationCategoryDef || researchPrerequisites (list only)&lt;br /&gt;
|-&lt;br /&gt;
| PsychicRitualDef || researchPrerequisites (list only)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Checking Research Completion ==&lt;br /&gt;
&lt;br /&gt;
Checking whether a research project has been completed from C# can be done by obtaining the &amp;lt;code&amp;gt;ResearchProjectDef&amp;lt;/code&amp;gt; and calling the &amp;lt;code&amp;gt;IsFinished&amp;lt;/code&amp;gt; property. If you need to do this often, then it's recommended you use a [[Modding_Tutorials/Linking_XML_and_C|DefOf]] to obtain a static reference to it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Modding]]&lt;br /&gt;
[[Category:Modding tutorials]]&lt;/div&gt;</summary>
		<author><name>Aelanna</name></author>
	</entry>
</feed>