Use <statBases> in Defs? (HealthDiffDefs)

Started by Aristocat, November 13, 2014, 12:33:43 AM

Previous topic - Next topic

Aristocat


  <HealthDiffDef ParentName="AddedBodyPartBase">
    <defName>BionicArm</defName>
    <label>bionic arm</label>

      <statBases>
         <StatOffsets>
            <MentalBreakThreshold>20</MentalBreakThreshold>
         </StatOffsets>
      </statBases>
    <addedBodyPart>
      <isBionic>true</isBionic>
      <isSolid>true</isSolid>
      <partEfficiency>1.0</partEfficiency>
      <spawnThingOnRemoved>BionicArm</spawnThingOnRemoved>
    </addedBodyPart>
    <modifiers>
          <PainchangeBy>-0.05</PainchangeBy>
      <activities>
        <li>
          <activity>Manipulation</activity>
          <changeBy>0.2</changeBy>
        </li>
      </activities>
    </modifiers>
    <verbs>
      <li>
        <verbClass>Verb_MeleeAttack</verbClass>
        <cooldownTicks>100</cooldownTicks>
        <meleeDamageAmount>8</meleeDamageAmount>
        <meleeDamageDef>Blunt</meleeDamageDef>
      </li>
    </verbs>
  </HealthDiffDef>

Is there any way to make this work?

Evul

    <modifiers>
      <activities>
        <li>
          <activity>PainchangeBy</activity>
          <changeBy>-0.05</changeBy>
        </li>
        <li>
          <activity>Manipulation</activity>
          <changeBy>0.2</changeBy>
        </li>
      </activities>
    </modifiers>


Try this? :)

Aristocat

#2
Quote from: Evul on November 13, 2014, 01:23:11 AM
    <modifiers>
      <activities>
        <li>
          <activity>PainchangeBy</activity>
          <changeBy>-0.05</changeBy>
        </li>
        <li>
          <activity>Manipulation</activity>
          <changeBy>0.2</changeBy>
        </li>
      </activities>
    </modifiers>


Try this? :)

uh no.                   <PainchangeBy>-0.05</PainchangeBy> worked fine as it is. problem is

       <statBases>
         <StatOffsets>
            <MentalBreakThreshold>20</MentalBreakThreshold>
         </StatOffsets>
      </statBases>
Which doesn't work anywhere. I want to make bionic eye/arms reduce aim delay, and work global speed and etc.

Evul

Oh right. I let you know if i find something! Going to try some stuff.

Minus

Just poking my head in here. Any discoveries found are probably going to cause an instant update to my Extended Surgery and Bionics mod.

Our cybernetic hearts mean we care more!
Mods: Extended Surgery and Bionics, Brain Surgery, Medical XP Balance

Cat123

Quote from: Minus on November 19, 2014, 09:33:49 AM
Just poking my head in here. Any discoveries found are probably going to cause an instant update to my Extended Surgery and Bionics mod.

He made it work via a clever hack:

https://ludeon.com/forums/index.php?topic=7520.0

Basically, made them apparel that is locked to a single (new) bodypart & is located on the skin (or overhead for existing parts). Clever, but could lead to a lot of conflicts with other apparel mods on the common bodyparts.

Aristocat

Quote from: Cat123 on November 19, 2014, 01:47:18 PM
Quote from: Minus on November 19, 2014, 09:33:49 AM
Just poking my head in here. Any discoveries found are probably going to cause an instant update to my Extended Surgery and Bionics mod.

He made it work via a clever hack:

https://ludeon.com/forums/index.php?topic=7520.0

Basically, made them apparel that is locked to a single (new) bodypart & is located on the skin (or overhead for existing parts). Clever, but could lead to a lot of conflicts with other apparel mods on the common bodyparts.

It shouldn't conflict I think.. Unless some mod make something protect torso in head layer or vice versa. Only conflicting part with apparello is power armor now protect hands and feet which means you can't wear socks and gloves.

Commander Beanbag

It looks like you can just create a new apparel layer. I had a peek at the assembly for it and it's about 8 lines, and all it does is define the layers.

Aristocat

Quote from: Commander Beanbag on November 20, 2014, 05:50:57 PM
It looks like you can just create a new apparel layer. I had a peek at the assembly for it and it's about 8 lines, and all it does is define the layers.

Do you know how to use statoffset thingy in healthdiff(/defs?)?