[A16] Nerve Stapling

Started by Thirite, December 31, 2016, 08:19:29 PM

Previous topic - Next topic

Thirite

Adds "nerve staples" to RimWorld. Installing a nerve staple implant on a pawn (typically a prisoner, or a particularly annoying colonist) will immediately soothe their foolish thoughts about disobeying you or engaging in unwanted, destructive behaviour. Nerve stapling damages all skills on installation and removes any passions the pawn has. Nerve staples can be constructed at the Machining Table after researching Microelectronics Basics, and cost 5 plasteel to make each.

I whipped this mod up in about 3 hours so it could very well be horribly unbalanced. Comments and criticism more than welcome.

Download here - v01c

Changelog:
v0.1a - Initial release
v0.1b - Fixed a bug regarding an enumerator being modified while enumerating it
v0.1c - Added relevant thoughts to people being nerve stapled: friends, rivals, and prisoners

Hydromancerx


etoire

#2
So it sounds to me like this mod can prevent mental breaks, including those done by pyromaniacs and drug addicts. I'm really tempted to try this mod out! I'll go ahead and test it out and give you some feedback.

Nerve Staple sounds weird, and the mood effect bonus called Stapled Nerves sounds even odder since it's a positive mood boost. Hernias are basically impacted nerves, and those hurt like a truck!
Couple of suggestion names: Brain worm, mindwire, euphoria.
Suggestion effect name to go with name: brain wormed, wired mind, euphoric

etoire

#3
Just tried it, on implantation, I had this error thrown at me. It did remove pyromaniac, which was neat.

JobDriver threw exception in initAction. Pawn=Ark, Job=DoBill A=Thing_Human1638 B=Thing_NerveStaple56062 C=(134, 0, 113), Exception: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
  at System.Collections.Generic.List`1+Enumerator[RimWorld.Trait].VerifyState () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1+Enumerator[RimWorld.Trait].MoveNext () [0x00000] in <filename unknown>:0
  at NerveStapling.Recipe_NerveStaple.ApplyOnPawn (Verse.Pawn pawn, Verse.BodyPartRecord part, Verse.Pawn billDoer, System.Collections.Generic.List`1 ingredients) [0x00000] in <filename unknown>:0
  at RimWorld.Bill_Medical.Notify_IterationCompleted (Verse.Pawn billDoer, System.Collections.Generic.List`1 ingredients) [0x00000] in <filename unknown>:0
  at Verse.AI.Toils_Recipe+<FinishRecipeAndStartStoringProduct>c__AnonStorey418.<>m__674 () [0x00000] in <filename unknown>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.<DoRecipeWork>c__AnonStorey417:<>m__66F()
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:Update()
Verse.Root_Play:Update()

Thirite

Oh weird, I thought I fixed that bug.

The name comes from Alpha Centauri, where you could 'nerve staple' rioting/disruptive civilians to prevent them from causing further unrest or refusing to work. It's not mechanically the same thing since it's an implant in my mod rather than a exterior device that wires itself through the skin into the nervous system.

Thirite

Should be working fine now; updated the link in the OP.

Primal Lord

Is the damage to skills a permanent effect or an instant effect? (ie can i still hit skill level 20 on a nerve stapled pawn?)

Thirite

#7
Quote from: Primal Lord on January 02, 2017, 10:04:23 PM
... can i still hit skill level 20 on a nerve stapled pawn?
Yes, it's only a one time damage effect. Though passions are gone for good. I could cap nerve stapled pawns at a certain skill level, but that's a balancing issue.

O Negative

You could probably create a pretty basic "Plastic Surgery" mod with this kind of code.

Just have it remove any "ugly" traits on a pawn.

If you wanted, you could have a chance for botched plastic surgery, which just leaves scarring on the face or something :P

Just trying to throw ideas out there :)

Thirite

#9
You're quite right. Depending on the doctor's artistic level and some randomness, the success could have no change, or make them Pretty, or Beautiful (or new Trait- Stunning! super pretty for master plastic surgeons). Not a bad idea. Make it require "No Arbitrary Surgery" for the proper negative outcomes, hahaha.

Edit: Uploaded new version to the OP. Added in the relevant thoughts regarding to colonists/prisoners reacting to someone being nerve stapled

thesoupiest

What materials are required to perform nerve staple installations? I have medicine and a nerve staple, but my doctor can still not perform the surgery because of "need materials."

Thirite

Make sure whoever you are implanting the nerve staple into has their health settings to allow medicine use. Also please be aware of the newer thread in the release section:
https://ludeon.com/forums/index.php?topic=29316.0