Ludeon Forums

Ludeon Forums

  • October 22, 2020, 05:29:24 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [A16] Nerve Stapling  (Read 5333 times)

Thirite

  • Colonist
  • ***
  • Posts: 734
    • View Profile
[A16] Nerve Stapling
« on: December 31, 2016, 08:19:29 PM »

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
« Last Edit: January 05, 2017, 02:26:34 AM by Thirite »
Logged

Hydromancerx

  • Colonist
  • ***
  • Posts: 570
  • Refugee
    • View Profile
Re: [A16] Nerve Stapling
« Reply #1 on: December 31, 2016, 10:48:36 PM »

Weird name but kinda cool.
Logged

etoire

  • Drifter
  • **
  • Posts: 40
  • Refugee
    • View Profile
Re: [A16] Nerve Stapling
« Reply #2 on: January 01, 2017, 10:15:26 AM »

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
« Last Edit: January 01, 2017, 10:28:54 AM by etoire »
Logged

etoire

  • Drifter
  • **
  • Posts: 40
  • Refugee
    • View Profile
Re: [A16] Nerve Stapling
« Reply #3 on: January 01, 2017, 10:26:34 AM »

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

Code: [Select]
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()
« Last Edit: January 01, 2017, 10:42:19 AM by etoire »
Logged

Thirite

  • Colonist
  • ***
  • Posts: 734
    • View Profile
Re: [A16] Nerve Stapling
« Reply #4 on: January 01, 2017, 04:59:04 PM »

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.
Logged

Thirite

  • Colonist
  • ***
  • Posts: 734
    • View Profile
Re: [A16] Nerve Stapling
« Reply #5 on: January 02, 2017, 09:15:23 PM »

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

Primal Lord

  • Drifter
  • **
  • Posts: 73
  • Refugee
    • View Profile
Re: [A16] Nerve Stapling
« Reply #6 on: January 02, 2017, 10:04:23 PM »

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?)
Logged

Thirite

  • Colonist
  • ***
  • Posts: 734
    • View Profile
Re: [A16] Nerve Stapling
« Reply #7 on: January 02, 2017, 11:03:56 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.
« Last Edit: January 02, 2017, 11:05:57 PM by Thirite »
Logged

O Negative

  • Colonist
  • ***
  • Posts: 753
  • Universal Donor
    • View Profile
Re: [A16] Nerve Stapling
« Reply #8 on: January 05, 2017, 01:16:17 AM »

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 :)
Logged

Thirite

  • Colonist
  • ***
  • Posts: 734
    • View Profile
Re: [A16] Nerve Stapling
« Reply #9 on: January 05, 2017, 02:06:28 AM »

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
« Last Edit: January 05, 2017, 02:27:40 AM by Thirite »
Logged

thesoupiest

  • Muffalo
  • *
  • Posts: 11
  • Refugee
    • View Profile
Re: [A16] Nerve Stapling
« Reply #10 on: February 03, 2017, 11:29:58 AM »

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."
Logged

Thirite

  • Colonist
  • ***
  • Posts: 734
    • View Profile
Re: [A16] Nerve Stapling
« Reply #11 on: February 03, 2017, 04:14:44 PM »

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
Logged