Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - System.Linq

#1
When you load a prisoner into a transport pod and send them to another colony, they are no longer a prisoner upon arriving. You have to recapture them, or in the case of the guy who I podded in front of my prison in my main colony, they get immediately gunned down by turrets upon arriving and die.
#2
Releases / [1.0] Run and Hide
March 17, 2018, 04:57:48 AM


Run and Hide solves the problem of colonists getting themselves killed by fleeing into unsafe places (i.e. away from the colony, into corners, etc.) by allowing the player to place a marker which designates a spot that the colonist can run to for safety. Colonists will flee to the nearest pre-placed bunker spot whenever they run into danger.
   
Compatible with every mod and can be installed on existing saves.


Download
I recommend you download it from the Steam Workshop to receive automatic updates. Visit the Steam Workshop page to subscribe here.

If you do not have RimWorld on Steam, but you have a forums account, you can also download it manually through the attachment. Note that the mod requires HugsLib to function.



License
Can include in modpacks with credit. Can reuse/edit code with credit.

[attachment deleted due to age]
#3
Releases / [1.0] Death Rattle (2018-10-30)
July 17, 2017, 02:00:30 AM


This mod makes it so that people will no longer instantly die when their vital capacities reach zero. If one of your colonists has their liver destroyed by a charge lance, for instance, they will become severely ill and you will have a short window to get them a new liver before they die.

The time scales in this mod are not entirely realistic, because Rimworld's time scale makes it effectively impossible for a colonist to receive life-saving care in a realistic amount of time. Colonists move too slowly, and days pass too quickly, so the numbers have been fudged to make it difficult, but possible, to save someone if you have a donor organ on hand.

Be warned: Just because they survive, doesn't mean they won't suffer permanent brain injury as a result of their near-death experience.

Don't ask me about compatibility. It should be compatible with everything. Just try it, and let me know if it doesn't work, so I can fix it.

Download
I recommend you download it from the Steam Workshop to receive automatic updates. Visit the Steam Workshop page to subscribe here.

If you do not have RimWorld on Steam, but you have a forums account, you can also download it manually through the attachment. Note that the mod requires HugsLib to function.



License
Can include in modpacks with credit. Can reuse/edit code with credit.

[attachment deleted due to age]
#4
Whenever a caravan is ambushed (tested with manhunters), it is reset to the world hex it was traveling from, undoing all its progress. This is a serious problem if, for instance, it's traveling to the player's home base in the adjacent hex, which is in a mountain, and it's out of food.
#5
Bugs / Several JoyGiverDefs do not have JobDefs
July 15, 2017, 06:32:53 PM
Some JoyGiverDefs do not have JobDefs assigned to them, like this one:


  <JoyGiverDef>
    <defName>SocialRelax</defName>
    <giverClass>JoyGiver_SocialRelax</giverClass>
    <baseChance>4</baseChance>
    <joyKind>Social</joyKind>
  </JoyGiverDef>


Presumably, the reason for this is that the JoyGiver class references the JobDef directly:
job = new Job(JobDefOf.SocialRelax, compGatherSpot.parent, t);

However, this makes it almost impossible to match a JoyGiver to a JobDef. This means that if you only have a Job, you cannot determine which JoyGiver it came from. Which means that you cannot re-issue that Job to another pawn using TryGiveJobFromJoyGiverDefDirect(). This makes it impossible to duplicate jobs like SocialRelax which have a target (like a chair) that is reserved by one pawn, if you wanted another pawn to choose a different chair.
#6
Mod bugs / CTD on OSX on any new colony
July 13, 2017, 01:28:09 PM
Full log:

Initialize engine version: 5.4.1f1 (649f48bbbf0f)
GfxDevice: creating device client; threaded=1
Renderer: Intel(R) Iris(TM) Graphics 6100
Vendor:   Intel Inc.
Version:  4.1 INTEL-10.18.65
GLES:     0
GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_fl
ush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier
OPENGL LOG: Creating OpenGL 4.1 graphics device ; Context level  <OpenGL 4.1> ; Context handle 151343104
Begin MonoManager ReloadAssembly
Platform assembly: /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.dll (this message is harmless)
Loading /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.dll into Unity Child Domain
Platform assembly: /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/Assembly-CSharp-firstpass.dll (this message is harmless)
Loading /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/Assembly-CSharp-firstpass.dll into Unity Child Domain
Platform assembly: /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/Assembly-CSharp.dll (this message is harmless)
Loading /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/Assembly-CSharp.dll into Unity Child Domain
Platform assembly: /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UI.dll (this message is harmless)
Loading /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.UI.dll into Unity Child Domain
Platform assembly: /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.Networking.dll (this message is harmless)
Loading /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/UnityEngine.Networking.dll into Unity Child Domain
Platform assembly: /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/System.Xml.Linq.dll (this message is harmless)
Loading /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/System.Xml.Linq.dll into Unity Child Domain
- Completed reload, in  0.068 seconds
Platform assembly: /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/System.Core.dll (this message is harmless)
Platform assembly: /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/System.dll (this message is harmless)
Platform assembly: /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Resources/Data/Managed/System.Xml.dll (this message is harmless)
UnloadTime: 3.134258 ms
Setting breakpad minidump AppID = 294100
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561197999501558 [API loaded no]
Command line arguments: -logFile ~/Desktop

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

RimWorld 0.17.1557 rev1154

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Non platform assembly: data-0x1034c4c00 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x1034c4c00.dylib
Non platform assembly: data-0x1125a8000 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x1125a8000.dylib
Non platform assembly: data-0x1034e4800 (this message is harmless)
Non platform assembly: data-0x112b1c000 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x112b1c000.dylib
Non platform assembly: data-0x102cbe200 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x102cbe200.dylib
Non platform assembly: data-0x1034dfe00 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x1034dfe00.dylib
Non platform assembly: data-0x102cc5c00 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x102cc5c00.dylib
Non platform assembly: data-0x102cc8400 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x102cc8400.dylib
Non platform assembly: data-0x102cc9600 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x102cc9600.dylib
Non platform assembly: data-0x10920ae00 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x10920ae00.dylib
Non platform assembly: data-0x102ccae00 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x102ccae00.dylib
Non platform assembly: data-0x1034f4800 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x1034f4800.dylib
Non platform assembly: data-0x102cde600 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x102cde600.dylib
Non platform assembly: data-0x102ce3e00 (this message is harmless)
Non platform assembly: data-0x1127b9000 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x1127b9000.dylib
Non platform assembly: data-0x102ce3e00 (this message is harmless)
Non platform assembly: data-0x1127da000 (this message is harmless)
Fallback handler could not load library /Users/makeschool/Library/Application Support/Steam/steamapps/common/RimWorld/RimWorldMac.app/Contents/Frameworks/MonoEmbedRuntime/osx/data-0x1127da000.dylib
Extended Storage :: Harmony patch successful (Void SpawnSetup(Verse.Map, Boolean)) Transpiler (gets rid of the unnecessary stack count truncation)

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Duplicate code-linked translation key: Paused in language English

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Duplicate code-linked translation key: QualityBuilder.Nothing in language English

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Duplicate code-linked translation key: MessagePlacementOnSupport in language English

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

OnLevelWasLoaded was found on ModInitializerComponent
This message has been deprecated and will be removed in a later version of Unity.
Add a delegate to SceneManager.sceneLoaded instead to get notifications after scene loading has completed

(Filename:  Line: 375)

Type ModInitializer probably needs a StaticConstructorOnStartup attribute, because it has a field obj of type GameObject. All assets must be loaded in the main thread.

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Hospitality injected.

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

[HugsLib] v3.1.2 initialized ExpandedIncidents, Hospitality, Psychology

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

AcEnhancedCrafting injected.

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Unloading 5 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 1.034148 ms
QualityBuilder added property to '51' things

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)


Unloading 48 unused Assets to reduce memory usage. Loaded Objects now: 7333.
Total: 26.224812 ms (FindLiveObjects: 0.336589 ms CreateObjectMapping: 0.312705 ms MarkObjects: 25.517597 ms  DeleteObjects: 0.057515 ms)

Loading game from file Work Colony with mods Core, HugsLib, EdB Prepare Carefully, Rimsenal - Rimhair, AC-Enhanced Crafting - A17, Expanded Prosthetics and Organ Engineering 2.0, A Dog Said..., QualityBuilder, RT Fuse, Efficient Light, Feed The Colonists, BetterCoolers, BetterVents, Expanded Incidents, ExtendedStorageFluffyHarmonised, Hospitality, and Psychology

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

QualityBuilder added to orders category.

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)

Unloading 0 Unused Serialized files (Serialized files now loaded: 0)

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 12823.
Total: 106.372513 ms (FindLiveObjects: 1.002319 ms CreateObjectMapping: 1.373768 ms MarkObjects: 103.960632 ms  DeleteObjects: 0.035095 ms)


Unhandled Exception: System.ExecutionEngineException: SIGILL


Not exactly helpful. The game just crashes to desktop a little while after I start a new colony. It happens with every new colony I make. I'm testing on a Macbook Pro, OSX Sierra 10.12 to replicate this.

[attachment deleted by admin due to age]
#7
From ThingDef.PostLoad():


if (this.inspectorTabs != null)
{
for (int i = 0; i < this.inspectorTabs.Count; i++)
{
if (this.inspectorTabsResolved == null)
{
this.inspectorTabsResolved = new List<InspectTabBase>();
}
try
{
this.inspectorTabsResolved.Add(InspectTabManager.GetSharedInstance(this.inspectorTabs[i]));
}
catch (Exception ex)
{
Log.Error(string.Concat(new object[]
{
"Could not instantiate inspector tab of type ",
this.inspectorTabs[i],
": ",
ex
}));
}
}
}
#8
Releases / [1.0] Psychology (2018-11-18)
June 30, 2017, 02:39:52 AM

Doesn't break saves!
Mod options available!
   
"This is the absolute best mod for Rimworld. It adds innumerable layers of depth other mods could never hope to achieve. Well done."
"I can't play rimworld without this beautiful mod!"
"This is truly a masterpiece of a mod and I hope the developers see that and include it in the core game :)"
"This mod is so fundamental to the way I have come to play Rimworld that I will not start a single B19 game without it."
"This is the mod in my opinion that TRUELY makes Rimworld one of the best games on Steam."
"This mod really enriches the gameplay of Rimworld. I am much less likely to play without it."
"This is the first comment I've made in ages for any mod I absolutely love this mod and can't believe you did it solo."
"I can't really tell what it's doing, but it's so critically acclaimed that it's gotta do something right?"
   
This is a total overhaul of Rimworld's psychological and social systems. Your colonists, and the stories you can tell about them, are what make Rimworld such a fun game. Unfortunately, besides what they can contribute to the colony, colonists are pretty much interchangeable. Now, everyone you encounter will have a unique and recognizable character archetype, giving them massively increased depth and charm. Their personality traits will affect absolutely every facet of their interactions with other people, which have also been expanded to allow your colonists more ways to get to know each other and express their individuality.
   
Psyche
Every person on the rimworld now has their own attitude and personality as part of the new psyche system, entirely separate from traits. You can view a rundown of their personality traits in the Psyche tab. A colonist's psyche has a real and noticeable effect on their social interactions and self-expression. Colonists' relationships with each other are now far more realistic, varied, and driven by their persistent identity.
   
Social
Colonists (and non-colonists) hold conversations with each other about a multitude of topics in order to form opinions on them. Two colonists might briefly remark on something as they pass each other in the hallway, or have a long discussion while working on crafting tables in the same room. Instead of being arbitrarily assigned a compatibility with each other, they will naturally gravitate towards like-minded people and away from those they have strong disagreements with. Colonists will even set aside their differences when the colony is small enough that they have to tolerate each other.
   
Some colonists may not have an opportunity to get to know each other very well, because they simply don't spend enough time in the same vicinity and never get an opportunity to chat. Parties are a great place for your colonists to get together and make new friends (or enemies). However, they will also now invite each other to hang out when they have free time, and spend a few hours relaxing and talking. Good friends will also hang out to keep their relationship strong, and empathetic colonists might even try to hang out with people they don't like to see if they misjudged them.
   
If there are relationships in your colony, they will make plans to go on dates when they don't have to work. Unless their schedule changes, they will meet at the scheduled date and time and spend time together to keep their relationship alive. Of course, if they're not meant for each other, a date may also reveal an incompatibility between them.
   
Sexuality and Romance
Instead of being arbitrarily assigned a slot-hogging Gay trait, everyone's sexuality is now graded on the Kinsey scale, from zero to six. The overwhelming majority of colonists will be straight, but their sexual orientations can have much more variety and their romantic interest in each other will be adjusted accordingly. Everyone also has both a sexual and romantic drive, influencing their interest in that part of a relationship. Depending on their personality, colonists may be more likely to have multiple "flings" rather than a single lover, and how they treat breakups is affected accordingly.
   
Mayorship
After a settlement's first year, elections will be held at some point every fall. A slate of colonists will announce their candidacy for mayor, and will present a platform to run on that is chosen based on their personality. A few days later, a polling place will be chosen and colonists will go there to cast their votes. They will vote for the candidate whose positions best align with their personality, and their opinion of the candidates may also affect their vote.
   
The candidate with the plurality of votes becomes the mayor until the next election. They will receive visits from constituents in their office or bedroom unless their schedule is set to Work during that period, particularly by people who are very unhappy or very content. Complaining colonists can find relief in venting to the mayor, and the mayor of a happy, well-functioning colony will be pleased by the words of support they receive.
   
Mental Illness and Treatment
The number of mental breaks has been vastly improved, and colonists will break differently depending on their traits. Inhabitants of the rimworld can also develop anxiety (usually in their teenage years), or acquire it after suffering PTSD from a stressful mental break. They will require occasional treatment (and good medicine, if it can be spared) to keep their anxiety in check, but once managed, it won't affect their day-to-day life. Some traits that can make colonists undesirable, like chemical interest and pyromania, can also now be treated to mitigate their effects at the cost of medical upkeep.

Additionally, the drug methadone is now available to help treat addiction. Instead of removing legs or trapping colonists in walled-up rooms, you can put them on a methadone regimen to eliminate the severe mood penalty, though they will still suffer all the physical effects of addiction. Methadone itself is mildly addictive, so be careful!

Mental breaks have been rebalanced and tweaked, and new ones have been added. Some of the new vanilla mental breaks are replaced by better versions that were in Psychology already.
   
Support
I do not accept any form of financial support. If you want to support this mod, then please subscribe to it, rate it, and tell everyone about it. If you absolutely must spend money on something, then gift Rimworld to someone who hasn't yet experienced it to support Tynan and the incredible work that he does. This mod would not be possible without the great game he created, and the strenuous effort he has put into supporting mod creators.
   
Compatibility
Thanks to HugsLib and Harmony, this mod should be compatible with practically everything. You can disable many features from the mod's options if you don't want to play with them, and also adjust your play experience. Mods which make changes to the code but do not use Harmony are quite likely to be incompatible with Psychology.
   
Credits
({x}) Disarray: Idea for passionate work mood bonus.
twoski: Ideas for many of the new mental breaks.
Wellech: Name of the new Socialite trait.

Download
I recommend you download from the Steam Workshop to receive automatic updates. Visit the Steam Workshop page to subscribe here.

Otherwise, the mod is uploaded on the Nexus. Note that the mod requires HugsLib to function.



License
Can include in modpacks with credit. Can reuse/edit code with credit.

[attachment deleted due to age]
#9

if (!leadingThoughtInGroup.VisibleInNeedsTab)
{
NeedsCardUtility.thoughtGroup.Clear();
return false;
}



if (NeedsCardUtility.DrawThoughtGroup(rect, NeedsCardUtility.thoughtGroupsPresent[i], pawn))
{
num += 24f;
}


These two blocks of code in NeedsTabUtility are intended to prevent thoughts that aren't actually visible (like social memories) from being displayed. However, because the height of the Rect doesn't take this into account (float height = (float)NeedsCardUtility.thoughtGroupsPresent.Count * 24f;), it doesn't work properly, and those thoughts still result in this:



I recommend that PawnNeedsUIUtility.GetThoughtGroupsInDisplayOrder simply discard them instead.


public static void GetThoughtGroupsInDisplayOrder(Need_Mood mood, List<Thought> outThoughtGroupsPresent)
{
outThoughtGroupsPresent.Clear();
outThoughtGroupsPresent.AddRange(mood.thoughts.DistinctThoughtGroups().Where(t => t.VisibleInNeedsTab));
outThoughtGroupsPresent.SortByDescending((Thought th) => mood.thoughts.MoodOffsetOfThoughtGroup(th));
}
#10
Releases / [1.0] Expanded Incidents (2018-10-30)
January 21, 2017, 11:29:04 PM


This mod increases the variety of incidents your colony faces. The new incidents are designed to be balanced, generally long-term events that you can mitigate or eliminate with proper planning or response, so long as they have any significant impact on your colony.
   
Expanded Incidents does not require a new save game. It's compatible with everything. It will use Psychology's systems if you have both installed.

New Incidents
- Quarrel: Two pawns friendly towards each other have their relationship damaged by an argument until they make up.
- Homesick: One of your pawns is feeling homesick. They may spread it to other pawns through conversation, until they've made your whole colony unhappy!
- Cliques: Two pawns who dislike each other separate the colony into cliques of their friends. Members of each clique may come to blows.
- Sabotage: Keep a close eye on your colonists if you notice things malfunctioning in your base. Someone has to be to blame. But who?
- Thief: Colonists and pets may spot thieves attempting to sneak into your base and steal valuables, who won't leave without a fight!

Download
I recommend you download it from the Steam Workshop to receive automatic updates. Visit the Steam Workshop page to subscribe here.

If you do not have RimWorld on Steam, but you have a forums account, you can also download it manually through the attachment. Note that the mod requires HugsLib to function.



License
Can include in modpacks with credit. Can reuse/edit code with credit.

[attachment deleted due to age]
#11
1) Draft colonists and use them to arrest people
2) Manually attack non-hostile targets with drafted colonists
3) Arrest and release colonists instead of recruiting them

These are vital problem-solving tools a huge number of players don't know about because they were never taught and never tried. Add them to the tutorial.
#12
Outdated / [A16] Hygiene (2017-1-14)
January 09, 2017, 01:24:21 AM


This mod adds a hygiene need to humanlike pawns. Over the course of the day it will decrease, and they will find a building to satisfy it. Pawns who are squeaky clean (90%+ hygiene) will get a mood bonus, and a pawn's hygiene determines how likely they are to pick up filth and track it around. Pawns with very low hygiene will be increasingly unhappy. Pawns resting medically will be washed by doctors.

There are two hygiene-fulfilling buildings: the bathtub, and the shower. The bathtub takes longer to bathe in, but gives your pawns more comfort and looks nicer. The shower is much faster, and smaller, and won't give your pawns an unhappy thought for bathing outside, but requires electricity.

You must design your colony's bathing facilities carefully. Colonists will prioritize showers over bathtubs, but will not use them if they are in a prisoner-marked area or another colonist's bedroom. Pawns will take their clothes off when they shower, and will seek out new clothes afterward, so place clothes nearby so they don't have to do the walk of shame to the stockpile. Prisoners should pick their clothes back up off the floor. Pawns also don't want to be seen by others when they're bathing, and will get an unhappy thought if observed.

Art by Shinzy!

Screenshots





Download
I recommend you download it from the Steam Workshop to receive automatic updates. Visit the Steam Workshop page to subscribe here.

If you do not have RimWorld on Steam, but you have a forums account, you can also download it manually through the attachment. Note that the mod requires HugsLib to function.



License
Can include in modpacks with credit. Can reuse/edit code with credit.

[attachment deleted by admin due to age]
#13
Releases / [1.0] Less Arbitrary Surgery (2018-10-30)
January 03, 2017, 07:45:48 PM


This mod changes surgery success to be less arbitrary and random. It doesn't change your surgeon's chance of success, but it does change failures in the following ways:
   
-If they don't succeed, they get a second chance to succeed with non-lethal injuries.
-If they fail, they have a chance to only give non-lethal injuries based on their surgery skill (as they identify that the patient is dying and abort the surgery).
-If they fail that, then the death on failed surgery chance is reduced by their chance to successfully complete the surgery.
-If the surgery is not lethal, the difference between catastrophic and minor failure is based on the surgery success chance, instead of being a literal coin flip.
-Only impaired pawns will ever have ridiculous surgery injuries.
-Surgery failures will cause infection. Pawns injured during a successful surgery may get an infection, depending on the doctor's skill.
-Instead of doing 30 damage on a minor failure and 65 on a catastrophic failure, minor failures do 10-20 damage and catastrophic failures do 30-60. This makes it so that some surgeries (like on the head) are not disproportionately lethal even on minor failures.
-Instead of doing between 50-100% of a part's remaining health in damage per surgery injury, failures do between 10-25% of a part's remaining health, so that an injury is far less likely to kill or sever a part on a patient unless its total damage exceeds the part's remaining health.
-You will receive the body part or implant back on a minor failure.
   
Compatible with Psychology, EPOE, A Dog Said, DE Surgeries, and Mechanite Augmentation. If you've tested your mod with this and confirmed its compatibility, contact me to add it to the list.

Download
I recommend you download it from the Steam Workshop to receive automatic updates. Visit the Steam Workshop page to subscribe here.

If you do not have RimWorld on Steam, but you have a forums account, you can also download it manually through the attachment. Note that the mod requires HugsLib to function.



License
Can include in modpacks with credit. Can reuse/edit code with credit.

[attachment deleted due to age]
#14
Of all the things I would expect Tynan to be on top of, gender differences in disease onset is one of them. Why do both genders get the same ChanceCurve for every disease? Many diseases have significant differences in diagnosis between the genders.
#15
Bugs / Gay colonists rarely hit on each other
December 27, 2016, 01:49:41 PM
Here's the code that governs sexuality from InteractionWorker_RomanceAttempt:


float num7 = (initiator.gender != recipient.gender != (initiator.story.traits.HasTrait(TraitDefOf.Gay) != recipient.story.traits.HasTrait(TraitDefOf.Gay))) ? 1f : 0.15f;


Here's the resultant truth table:

x = Initiator is male
y = Recipient is male
z = Initiator is gay
a = Recipient is gay

When s is true, pawns will hit on each other. When z^a is true, only one of them is gay. When it's false, both of them are straight OR (crucially) both of them are gay, as you can see in the final row. The result is that, as in the final row, when both are male and both are gay, both get the reduced 15% rate to hit on each other.

This bug means that gay colonists are once again doomed to hit endlessly on straight colonists (and straight colonists will hit on gay colonists if they find them attractive, ironically), but two gay people will very rarely end up together. This does not seem like intended behavior, more likely an unforeseen consequence of trying to adopt an elegant equation to govern straight-gay interaction.

It should look like this:


float num7 = (initiator.gender == recipient.gender) ? ((initiator.story.traits.HasTrait(TraitDefOf.Gay)) ? 1f : 0.15f) : ((!initiator.story.traits.HasTrait(TraitDefOf.Gay)) ? 1f : 0.15f);
#16
Outdated / [A16] Psychology (2017-5-14)
August 19, 2016, 07:16:38 AM


This mod is a complete overhaul of Rimworld's psychological and social systems. The stories that emerge from your pawns' quirks are the most fun part of RimWorld, and this mod aims to expand on that emergent storytelling by increasing the extent and complexity of its systems.
   
Psychology does not require a new save game.

Personality
- Everyone is generated with a random personality, summarized by many different attributes. This system is entirely separate from traits. The attributes are influenced not only by each other, but by everything else about that person. Every colonist has a unique and recognizable character archetype, giving them massively increased depth and charm.
- A colonist's personality influences everything about how they interact with others. It's a complete, extensive revamp of the social system from the bottom up. Colonists' relationships with each other are now far more realistic, varied, and driven by their own personality.
- Colonists will change their minds about each other after having conversations on topics relevant to a particular personality attribute. Instead of being arbitrarily assigned a compatibility with each other, they will naturally gravitate towards like-minded people and away from those they have strong disagreements with.

Sexuality and Romance
- Colonists' sexualities are graded on the Kinsey scale, from 0 to 6. The overwhelming majority of colonists will be straight, but their sexual orientations can have much more variety and their romantic interest in each other will be adjusted accordingly. The sexuality curve can also be changed in the mod settings.
- Depending on their personality, colonists may be more likely to have multiple "flings" rather than a single lover, and how they treat breakups is affected accordingly.
- Colonists also have both sexual and romantic drives. If they are exceedingly low, it may affect their desire to do lovin' or commit to a long-term relationship, respectively. They may still take lovers, particularly if someone else romances them, but what they get out of it will be affected by those factors.

Interactions
- Colonists may invite each other to hang out when their schedule isn't set to Work, though it's more likely during explicit free time, and especially when they're not doing anything else.
- They may hang out with people they're already friendly with, or choose acquaintances they haven't formed a strong opinion on to get to know them better. Empathetic colonists may also choose to hang out with people they don't care for, to give them a second chance.
- Colonists who are hanging out will explore the colony's joy activities together and have long discussions, ensuring a lasting social rapport, even between people who otherwise would not spend enough time in each others' company to have an opinion on them.
- Colonists in relationships may also plan dates for times when they don't have to work, and drop whatever they're doing to spend time with each other and maintain a good relationship. Of course, if they're not meant for each other, they may find out this way as well.

Mayors and Elections
- After a settlement's first year, elections will be held at some point every fall. A slate of colonists will announce their candidacy for mayor, and will present a platform to run on that is chosen based on their personality.
- A few days later, a polling place will be chosen and colonists will go there to cast their votes. They will vote for the candidate whose positions best align with their personality, and their opinion of the candidates may also affect their vote.
- The candidate with the plurality of votes becomes the mayor until the next election. They will receive visits from constituents in their room, particularly by people who are very unhappy or very content. Complaining colonists will get a happy thought from venting to the mayor, and the mayor will get a thought depending on their personality and what the colonist said to them.

New Traits
- Prude: This old-fashioned pawn hates the sight of nudity, and is mortified by the thought that others might be able to see their private areas. They are eternally disapproving of nudists and bothered by wearing ratty clothing.
- Insomniac: This pawn has a sleeping disorder. They will rarely attempt to sleep, and will never be fully satisfied by doing so. They spend most of their time awake, and thus, productive; but almost always tired.
- Bleeding Heart: This pawn is a big old softie. They will be pleased by doing things that help others, and more traumatized by brutal or senseless acts like mistreatment of prisoners or violence. They also will not get along with psychopaths.
- Gourmet: This demanding pawn expects to eat well every day. They'll be more satisfied by doing so, but more annoyed by having to eat things other than what they want.
- Unstable: This fluctuating pawn experiences random mood swings multiple times a day, and to a greater degree than other pawns, with manic and depressive episodes.
- Lecher: This unabashedly sexual pawn only cares about their own desires. They'll hit on anyone they find attractive, regardless of how they personally feel about them or if they are likely to be reciprocated. Anyone who accepts the advances of this pawn is likely to have their heart broken.
- Codependent: This pawn needs the comfort of intimacy. They will be unhappy when alone, and devastated by breakups and affairs. On the plus side, they are loyal and happy when they have someone to latch on to.
- Outdoorsy: This pawn enjoys spending time in the open. They get a mood boost when there's no roof above their head, and are affected by cabin fever more severely.
- Pluviophile: This pawn simply likes the sound and feel of rain, and will receive a mood bonus from it.
- Photosensitive: This pawn, either through gene modding or random mutation, has eyes that are extremely sensitive to the light. They will be very unhappy at being exposed to it, but find darkness comforting.
- Socialite: This fun-loving pawn is great at parties, and so your colony will hold them more often as long as they're around. (name credit Wellech)
- Desensitized: This numbed pawn no longer gets mood penalties for witnessing death or observing corpses. They will still be upset by colonists' deaths in general, and by other moral outrages. This trait can potentially be gained during play whenever a pawn sees someone die or looks at a body.
- Heavy Sleeper: This comatose pawn cannot receive mood penalties for disturbed sleep, but is also dificult to wake up.
- Polyamorous: This pawn has too much love to share with just one person. They will be unhappy in relationships with non-polygamous pawns, and can romance multiple people.
- Open-Minded: This pawn doesn't suffer negative opinion penalties for people's appearances, and won't take appearance into account in romance.

New Thoughts
- Adrenaline Rush: Pawns get a short mood boost when killing a hostile from an enemy faction. This gives them some relief at having defended their home.
- Dreams: Pawns may have dreams while sleeping which can affect their mood.
- Passionate Work: Pawns will be a little happier while doing something they have a burning passion for. (idea credit ({x}) Disarray)
- Imprisonment: They may be willing to join your colony, but pawns you've captured and recruited will be resentful and awkward with the people that imprisoned them, until they get used to their new life.
- Individuality: Pawns don't like looking the same as everybody else. They will get a gradually worsening mood penalty depending on how many other colony members are wearing a perfectly matching outfit.

New Illnesses
- Anxiety: Pawns with this illness can have panic attacks, more frequent the worse their anxiety is. Severe anxiety also increases a pawn's mental break threshold, makes it more difficult for them to talk, and causes them to sleep more often. Long-term treatment can reduce anxiety to a level where it does not interfere with a pawn's daily routine. The younger the pawn, the more likely they are to develop anxiety and the more severe it is likely to be. Pawns can also develop anxiety after having a mental break.

New Mental Breaks
- Berserk (extreme): The same mental break you know and love, but its frequency is greatly reduced. Bloodlust pawns now have the greatest chance to go berserk, followed by psychopaths, then brawlers. (idea credit twoski)
- Sadism (extreme): The pawn will go after the colony's prisoners and pets, as well as wild animals, and brutalize them. Psychopaths have the greatest chance to become sadistic, followed by bloodlust pawns, then brawlers. (idea credit twoski)
- Self-harm (extreme): The pawn will cut their hands and arms and hide in their room. Masochists have the greatest chance to self-harm. (idea credit twoski)
- Tantrum (extreme): The pawn will destroy nearby furniture and buildings. (idea credit twoski)
- Abuse (extreme): The pawn will wander around the colony, finding people to harass and insult. Abrasive pawns have the greatest chance to break this way, followed by unstable pawns. (idea credit twoski)
- Fell plotting (extreme): The pawn will retire to their room to hatch some terrible scheme, if you don't stop them. Psychopaths have the greatest chance to break this way, followed by bloodlust pawns.
- Paranoia (extreme): The pawn will wander aimlessly, depressing the people around them with their paranoid ramblings.
- Compulsion (major): The pawn relentlessly cleans and organizes their surroundings, usually until they pass out from exhaustion. (idea credit twoski)
- Antisocial (minor): The pawn will wander out into the wilderness, avoiding their fellow colonists. (idea credit twoski)
- Apathy (minor): The pawn becomes lethargic and will frequently wander around instead of working. They cannot be manually assigned to tasks or drafted while apathetic. (idea credit twoski)
- Histrionic (minor): The pawn desperately seeks attention and validation, wandering around the colony trying to talk to people. Occasionally, they will flirt with someone or propose to their partner. Socialite pawns have the greatest chance to break this way, followed by Lechers.

New Treatments
- Some traits can be treated by assigning them a bill through the Operations screen. If successful, they will gain a status effect that nullifies the trait, at the cost of being a little more on edge. It must be maintained through use of good medicine, or they may lapse.
- Pyromaniac: Will no longer go on fire-starting sprees.
- Chemical interest/fascination: Will no longer go on drug binges.
- Depression: Mood malus reduced to that of the Pessimist trait.

New Drugs
- Methadone: An opioid used to treat drug addiction. Barely addictive itself, it is useful for keeping colonists functional while they are suffering from withdrawal. Cheap and easy to manufacture.

Miscellaneous
- Arresting: Pawns now have a "peaceful arrest chance" stat based on their Social skill, which is used when determining whether someone refuses arrest.

COMPATIBILITY
- By using this mod with other mods that perform the same functions, you are taking FULL responsibility for any problems that may arise. You are also accepting that even if Psychology is able to work with that mod, you may be limiting your enjoyment of this mod because the other mod will ignore or maybe even disable Psychology's systems. It is not recommended to use this mod with any other social interaction mods.
- Mods which only modify Defs and not any of the game's code are 100% compatible with Psychology, though Psychology may override them with its own values.
- Psychology should be placed as low in your mod order as possible, after Less Arbitrary Surgery, and before Expanded Incidents.
- Psychology adds new properties to pawns. Colonies with Psychology enabled on them may break if the mod is disabled. Colonies without Psychology enabled on them will only receive new functionality on new pawns. Pawns which aren't Psychology-enabled should behave just like before.


MOD AUTHORS: You can use the source code provided with the mod to build compatibility into your mod. Use reflection to access Psychology's traits and thoughts and check if the mod is loaded, then include the mod's functionality in any classes you detour. Then tell your users to load your mod before Psychology, so that it can perform both mods' work (or only yours, if they are not using Psychology). Example:

ThoughtDef kp = DefDatabase<ThoughtDef>.GetNamedSilentFail("KilledPatientBleedingHeart");
if(kp != null)
    surgeon.needs.mood.thoughts.memories.TryGainMemoryThought(kp, patient);
   
This will try to give the pawn Psychology's Bleeding Heart thought, but ONLY if it detects that that thought actually exists (which means Psychology is loaded). Otherwise, it does nothing, because the user isn't using Psychology.

Download
I recommend you download from the Steam Workshop to receive automatic updates. Visit the Steam Workshop page to subscribe here.

If you do not have RimWorld on Steam, but you have a forums account, you can also download it manually through the attachment. Note that the mod requires HugsLib to function.

Finally, the mod is uploaded on the Nexus if you have no other way to download it, but this is not guaranteed to be up-to-date.



License
Can include in modpacks with credit. Can reuse/edit code with credit.

[attachment deleted by admin due to age]