Ludeon Forums

Ludeon Forums

  • March 26, 2019, 04:53:41 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Where is techLevel defined?  (Read 140 times)

Shurp

  • Planetologist
  • ****
  • Posts: 2039
  • Edgelord
    • View Profile
Where is techLevel defined?
« 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?
Logged
If you give an annoying colonist a parka before banishing him to the ice sheet you'll only get a -3 penalty instead of -5.

And don't forget that the pirates chasing a refugee are often better recruits than the refugee is.

Mehni

  • Super Tester
  • Colonist
  • ***
  • Posts: 785
    • View Profile
Re: Where is techLevel defined?
« Reply #1 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.

Quote
It 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.

Shurp

  • Planetologist
  • ****
  • Posts: 2039
  • Edgelord
    • View Profile
Re: Where is techLevel defined?
« Reply #2 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!!!
Logged
If you give an annoying colonist a parka before banishing him to the ice sheet you'll only get a -3 penalty instead of -5.

And don't forget that the pirates chasing a refugee are often better recruits than the refugee is.

AileTheAlien

  • Colonist
  • ***
  • Posts: 597
  • Refugee
    • View Profile
Re: Where is techLevel defined?
« Reply #3 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. ;)
« Last Edit: January 10, 2019, 08:26:47 PM by AileTheAlien »
Logged

dninemfive

  • Drifter
  • **
  • Posts: 58
  • Refugee
    • View Profile
Re: Where is techLevel defined?
« Reply #4 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.
Logged

AileTheAlien

  • Colonist
  • ***
  • Posts: 597
  • Refugee
    • View Profile
Re: Where is techLevel defined?
« Reply #5 on: January 11, 2019, 09:25:54 PM »

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