Ludeon Forums

Ludeon Forums

  • September 27, 2021, 09:05:37 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Incapication  (Read 5549 times)

palandus

  • Colonist
  • ***
  • Posts: 491
  • Refugee
    • View Profile
Incapication
« on: December 23, 2013, 03:01:16 AM »

Anyone figured out how to modify the probability of incapicating (knocking out) a colonist or raider? Or increasing burst size for weapons? (I am using the .net reflector and reflexil, so just tell me which part of the file structure it can be found in)
Logged

why1do

  • Drifter
  • **
  • Posts: 28
  • Refugee
    • View Profile
Re: Incapication
« Reply #1 on: December 23, 2013, 11:09:14 AM »

Definitions_Guns for the guns

Pawn_HealthTracker seems to have what you want
Logged

palandus

  • Colonist
  • ***
  • Posts: 491
  • Refugee
    • View Profile
Re: Incapication
« Reply #2 on: December 23, 2013, 01:29:01 PM »

But how do you modify burst size? You can't change the value in Reflexil in .net Reflector. Unless I'm missing something. When you however over the line that should contain it the "Constant" field is "None" and the Value is "empty/blank/nothing is there". Could you explain that part a bit better?
Logged

Cain

  • Muffalo
  • *
  • Posts: 3
  • Defensive Sniper
    • View Profile
Re: Incapication
« Reply #3 on: December 23, 2013, 06:22:42 PM »

i don't know how to modify the incap chance, however, once raiders have landed, figure out which raiders you want to incap, and as the fighting starts (or just before, as incap'd enemies can still be killed by wayward shots) save, then open your save file and search for the names of the raiders you want, then change their healthtracker to look something like this:

                    <HealthTracker>
            <PawnHealth>31</PawnHealth>
            <Incapacitated>True</Incapacitated>
            <TicksToNextBleed>694</TicksToNextBleed>
            <TicksToNextHeal>603</TicksToNextHeal>
            <ForceIncap>True</ForceIncap>
         </HealthTracker>

also, set their moving string to "False". save your changes and when you reload your save file, viola, instant incap.
Logged

palandus

  • Colonist
  • ***
  • Posts: 491
  • Refugee
    • View Profile
Re: Incapication
« Reply #4 on: December 23, 2013, 09:50:59 PM »

I've figured out the incap chance now. I've got it to basically incap a target at or below 75 HP. Some still get killed and some still get incapped at very low values, but it works. Have way too many prisoners now though... I have like 40+ prisoner dedicated beds and they are all full.
Logged

Cain

  • Muffalo
  • *
  • Posts: 3
  • Defensive Sniper
    • View Profile
Re: Incapication
« Reply #5 on: December 23, 2013, 11:17:27 PM »

yeah i only incap the ones i want to keep. i'm almost on cycle 30 and i haven't seen a trader, much less a slaver, in over 20 cycles, so it's either convert or execute
Logged

palandus

  • Colonist
  • ***
  • Posts: 491
  • Refugee
    • View Profile
Re: Incapication
« Reply #6 on: December 24, 2013, 03:59:34 PM »

Aye. I usually leave any assassins and con artists on the field and take pretty much anyone else. Mostly because a Marine is slightly worse shooter than assassin but can do any task, and well.. why would a con artist being in a raider band anyway? Hes got the non-violent trait which prevents him from attacking anyway.
Logged

CodyRex123

  • Colonist
  • ***
  • Posts: 209
  • Legend Keeper
    • View Profile
Re: Incapication
« Reply #7 on: December 28, 2013, 02:46:23 PM »

Palandus. i am pretty sure the game throw those out there if it thinks you have to little guns, plus that theres a people cap thats why you dont get slavers any more, i would love a mod that makes slavers come forever, not this 19/20 max stuff
Logged
Dragons!

palandus

  • Colonist
  • ***
  • Posts: 491
  • Refugee
    • View Profile
Re: Incapication
« Reply #8 on: December 31, 2013, 05:50:04 PM »

Making slavers come frequently is easily enough done. Simply increase the chance of occuring for Slavers from 1.0 to 100 (incident) and change maximum population from the storytellers.
Logged

Plasmatic

  • Colonist
  • ***
  • Posts: 267
  • Refugee
    • View Profile
Re: Incapication
« Reply #9 on: January 06, 2014, 09:31:48 AM »

I've figured out the incap chance now. I've got it to basically incap a target at or below 75 HP. Some still get killed and some still get incapped at very low values, but it works. Have way too many prisoners now though... I have like 40+ prisoner dedicated beds and they are all full.

How did you do that?
Logged

palandus

  • Colonist
  • ***
  • Posts: 491
  • Refugee
    • View Profile
Re: Incapication
« Reply #10 on: January 07, 2014, 10:53:51 PM »

Theres a few values that you need to consider: (Using .NET Reflector with Reflexil, editing Assembly CSharp.dll)

1) PawnHealthTracker -> IncapThreshold -> get_incapThreshold

the.maxhealth * 0.4f
=> Determines when a shot can cause incapication. So without editing the value, the maximum HP level would be 40% or 40 HP for a colonist with 100 HP. So until the target in question reaches 40 HP, they cannot be incapped.

if num > 40; return 40
=> I believe this means that if the percentage of HP is greater than 40, then it lists it as 40 HP for when incapping can occur. This is important if the colonist has the trait Tough (+50 HP), or if you have changed the maximum health per colonist. So, normally a colonist with Tough would be incapped at 60 HP (150*0.4), but that colonist will also only get capped at 40 HP. I believe this is to make it so that any colonist can be incapped at the same level.

I personally have these set to 0.75 and 75 respectively.

2) PawnKindDefinition -> .ctor()

this.baseIncapChancePerDamage = 0.01f;
=> This states that there is a 1% chance per damage that a target will be incapped. This is important, as you can change the values in 1) and it appears to do nothing. Changing this value will increase the likeliness of incapping a target WHEN they are at OR below the damage threshold (default = 0.4 or 40).

I personally set this to 0.15 or 15% chance to incap a target per bullet hit when at the threshold or below.

3) PawnKindDefsHardcoded -> Definitions_Civil -> MoveNext()

this.<k>__0.baseIncapChancePerDamage = 0.13f;
=> This is the value used for YOUR colonists. I list it here, because the incap chance by default is DIFFERENT for Raiders and your colonists. Raiders, have a base chance of 1% per damage suffered to be incapped, whereas your colonists have a base chance of 13% per damage suffered to be incapped.

I personally set this to 1% so that my colonists don't get incapped all the time.

Hope this helps!


Logged

CodyRex123

  • Colonist
  • ***
  • Posts: 209
  • Legend Keeper
    • View Profile
Re: Incapication
« Reply #11 on: January 18, 2014, 01:41:03 AM »

Making slavers come frequently is easily enough done. Simply increase the chance of occuring for Slavers from 1.0 to 100 (incident) and change maximum population from the storytellers.



But where do you find this file?
Logged
Dragons!