Incapication

Started by palandus, December 23, 2013, 03:01:16 AM

Previous topic - Next topic

palandus

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)

why1do

Definitions_Guns for the guns

Pawn_HealthTracker seems to have what you want

palandus

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?

Cain

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.

palandus

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.

Cain

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

palandus

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.

CodyRex123

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
Dragons!

palandus

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.

Plasmatic

Quote from: palandus 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.

How did you do that?

palandus

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!



CodyRex123

Quote from: palandus 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.



But where do you find this file?
Dragons!