Ludeon Forums

RimWorld => Mods => Help => Topic started by: Shurp on December 28, 2018, 06:21:43 AM

Title: Where is techLevel defined?
Post by: Shurp on December 28, 2018, 06:21:43 AM
I decided to try manufacturing bionics in my latest run, only to be disappointed on discovering that they've been nerfed from 140% efficiency to 125%.  I'd like to restore the older behavior but I can't see where to do it.  It seems like they're getting their effectiveness from the "Spacer" techLevel tag.  But I can't see where this is defined.  It's not hardcoded, is it?
Title: Re: Where is techLevel defined?
Post by: Mehni on December 28, 2018, 02:57:01 PM
It's a good thing you gave a backstory, because the question you asked is pretty far from your goal.

QuoteIt seems like they're getting their effectiveness from the "Spacer" techLevel tag.

They don't. Bionics get their efficiency from their corresponding Hediff. TechLevel doesn't enter into it.
Title: Re: Where is techLevel defined?
Post by: Shurp on December 28, 2018, 06:17:12 PM
Wow, I was way off, LOL.  OK, I see it now:

<partEfficiency>1.25</partEfficiency>

I'm just surprised it's not in the ThingDef file, because the way it is set up now if you decide to add a new attachment (mechanical hand!) you have to add it in multiple places.  Weird.

Thank you for pointing me in the right direction!!!
Title: Re: Where is techLevel defined?
Post by: AileTheAlien on January 10, 2019, 08:24:15 PM
It's more flexible the way it is right now, and follows the same as drugs, peg-legs, brain-implants, diseases, psychic emanators, etc. Like, those all use the generic "hediff", which is just a generic way to add effects to pawns. It's a lot more annoying when things are hard-coded to only act a certain way, in the name of "saving some lines of code". For example, psychic-emanators are hard-coded to give their specific hediff, instead of being some kind of generic <giveHediffToPawnsInRadius> tag, that you could then use to make mods to that building, or new buildings in other mods. ;)
Title: Re: Where is techLevel defined?
Post by: dninemfive on January 11, 2019, 12:32:39 AM
Actually, Psychic Emanators implement a ThoughtWorker which gives a thought to pawns in their radius (or, more precisely, a thoughtworker constantly runs to give a thought to any pawns in the radius of an active Psychic Emanator). That said, yes, a less processor-intensive "get all things in radius" function would be nice but doesn't seem to be possible in-game afaik.
Title: Re: Where is techLevel defined?
Post by: AileTheAlien on January 11, 2019, 09:25:54 PM
Quote from: dninemfive on January 11, 2019, 12:32:39 AM
Psychic Emanators [...] a thoughtworker constantly runs to give a thought to any pawns in the radius of an active Psychic Emanator
That's the problem; Although you can change the PsychicEmanatorSoothe, it's always going to be a Thought instead of a more generic Hediff, and you cannot give a radius-effect to any other building, without C# work.