[A12d] More Mechanoids (v1.07b - updated 31.12.2015)

Started by Orion, January 11, 2015, 08:25:33 AM

Previous topic - Next topic

NoImageAvailable

#480
Regarding the CR talk, the CR armor system compares penetration vs armor rating to calculate deflection, the formula being (pierceAmount - armorRating) * 4, meaning if armor rating is equal to or higher than penetration shots will always be deflected. Once that happens damage is multiplied by 1 - (2 * armor rating - penetration), so if the difference between armor and penetration is too great armor will block all/no damage. What's more is that worn armor takes damage corresponding to the original damage * penetration, e.g. a sniper rifle will do 24 * 0.7 = 16.8 damage. With natural armor such as with Mechanoids that damage is added to the overall damage instead.

Now the main thing is that, once a shot is deflected the damage after the initial reduction is applied again as blunt type damage. Additionally, penetration is reduced by an amount equal to the armor rating, so in the case of the sniper penetration is reduced to 0.7 * 0.1 = 0.07 against a target with 0.9 sharp armor. So on the second pass the difference between armor and penetration will be big enough that damage will be reduced to 0, meaning enemies with such excessively high natural blunt armor will be all but invincible to weapons that can't penetrate their sharp armor.
"The power of friendship destroyed the jellyfish."

Komyets

No problem Orion, I had free time to do it, don't expect me to do it again soon though :P

@NoImageAvaiable oh hey! Thanks for coming up here, I was thinking of posting something in your mod's forum page but I was too busy to do it yet. I wanted to ask exactly what you just explained now, thank you!

Olay, so, the way I understand this is... if armor is equal or bigger than penetration, no damage is dealt. If that happens, weapon damage is doubled, and it hits the target as blunt damage instead of sharp damage, is that wat you explain? Damn, no wonder the Mammoth does takes damage since its blunt armor is .5, but not the assaulter with .9 blunt.

Could you help with the balancing? I trust that lowering Assaulter armor to 84 like I mentioned above was enough,  but there's probably something I'm missing too. I'm not a modder, just an user with some knowledge about how mods work :x

NoImageAvailable

Quote from: Komyets on November 12, 2015, 02:49:44 PM
No problem Orion, I had free time to do it, don't expect me to do it again soon though :P

@NoImageAvaiable oh hey! Thanks for coming up here, I was thinking of posting something in your mod's forum page but I was too busy to do it yet. I wanted to ask exactly what you just explained now, thank you!

Olay, so, the way I understand this is... if armor is equal or bigger than penetration, no damage is dealt. If that happens, weapon damage is doubled, and it hits the target as blunt damage instead of sharp damage, is that wat you explain? Damn, no wonder the Mammoth does takes damage since its blunt armor is .5, but not the assaulter with .9 blunt.

Could you help with the balancing? I trust that lowering Assaulter armor to 84 like I mentioned above was enough,  but there's probably something I'm missing too. I'm not a modder, just an user with some knowledge about how mods work :x


Well, that's not really how it works. In a nutshell, if the armor is too high the shot will always get deflected. If it gets deflected it has to get not only through sharp armor but blunt armor too. If the difference between armor and penetration is too high the shot will do no damage.

Regarding balance I'd say bringing the blunt resistance in line with vanilla balancing would be a good idea, not just for CR but in general as the vanilla game is balanced around the assumption of blunt damage being better against armor. Centipedes have about a third of their sharp armor in blunt armor, so that might be a good point of reference. Lowering the sharp armor by 5% or so might be a good idea too, unless you're comfortable with the idea of assaulters being impervious to anything other than explosives (for reference, .50cal rifles in CR have armor penetration 0.9, the heavy turret added by CR Defence has 1.0, meaning the assaulter with its current value has a 100% chance to resist a .50cal and a 60% chance to resist a 14.5mm shot, making it the equivalent of a military APC's frontal armor).

Although that's just balance stuff, looking through the files this mod has a hard incompatibility anyways since it overrides the heavy charge blaster.
"The power of friendship destroyed the jellyfish."

AllenWL

Wait... does that mean I can't play this with combat realism, or does that mean I can but I'll have random issues with balance and stuff?

NoImageAvailable

Quote from: AllenWL on November 14, 2015, 06:33:48 AM
Wait... does that mean I can't play this with combat realism, or does that mean I can but I'll have random issues with balance and stuff?

Balance issues with armor + the charge blaster will behave as in vanilla. I'll probably put out a compatibility patch the next few days though.
"The power of friendship destroyed the jellyfish."

Orion

Quote from: NoImageAvailable on November 14, 2015, 08:43:02 AM
Balance issues with armor + the charge blaster will behave as in vanilla. I'll probably put out a compatibility patch the next few days though.
Hey, thanks for your interest and looking into this. What exactly do you change about the charge blaster? If it's vanilla friendly I could make those changes too.

NoImageAvailable

#486
Quote from: Orion on November 15, 2015, 11:53:37 AM
Quote from: NoImageAvailable on November 14, 2015, 08:43:02 AM
Balance issues with armor + the charge blaster will behave as in vanilla. I'll probably put out a compatibility patch the next few days though.
Hey, thanks for your interest and looking into this. What exactly do you change about the charge blaster? If it's vanilla friendly I could make those changes too.

I change basically all the stats of projectiles and guns, add comps and change projectiles' thingClass to Combat_Realism.BulletCR in the BaseBullet. I haven't compared your entries to vanilla so I don't know what changes you made but it would probably be easiest to just merge your changes into my XML entries (simply because there are more things I changed than not).

Here is what my Mechanoid weapons look like:
  <ThingDef Name="BaseBullet" Abstract="True">
    <category>Projectile</category>
    <tickerType>Normal</tickerType>
    <altitudeLayer>Projectile</altitudeLayer>
    <thingClass>Combat_Realism.BulletCR</thingClass>
    <label>bullet</label>
    <useHitPoints>False</useHitPoints>
    <neverMultiSelect>True</neverMultiSelect>
    <graphicData>
      <shaderType>Transparent</shaderType>
    </graphicData>
  </ThingDef>

  <!-- ================= Mechanoid weapons ================= -->

  <ThingDef ParentName="BaseBullet">
    <defName>Bullet_ChargeBlasterHeavy</defName>
    <label>charge blaster shot</label>
    <graphicData>
      <texPath>Things/Projectile/Charge_Small</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <shaderType>TransparentPostLight</shaderType>
    </graphicData>
    <projectile>
      <damageDef>Bullet</damageDef>
      <damageAmountBase>28</damageAmountBase>
      <speed>380</speed>
    </projectile>
    <comps>
      <li Class="Combat_Realism.CompProperties_AP">
        <compClass>Combat_Realism.CompAP</compClass>
        <armorPenetration>1.0</armorPenetration>
      </li>
    </comps>
  </ThingDef>
  <ThingDef ParentName="BaseGun">
    <defName>Gun_ChargeBlasterHeavy</defName>
    <label>heavy charge blaster</label>
    <description>Charged-shot blaster for area suppressive fire. Mechanoid-built.</description>
    <graphicData>
      <texPath>Things/Item/Equipment/WeaponRanged/ChargeBlasterHeavy</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <statBases>
      <MarketValue>2400</MarketValue>
      <AccuracyTouch>0.50</AccuracyTouch>
      <AccuracyShort>0.50</AccuracyShort>
      <AccuracyMedium>0.85</AccuracyMedium>
      <AccuracyLong>0.85</AccuracyLong>
      <RangedWeapon_Cooldown>1.5</RangedWeapon_Cooldown>
    </statBases>
    <tradeability>Never</tradeability>
    <techLevel>Spacer</techLevel>
    <destroyOnDrop>True</destroyOnDrop>
    <menuHidden>True</menuHidden>
    <weaponTags>
      <li>MechanoidGunHeavy</li>
    </weaponTags>
    <verbs>
      <li>
        <verbClass>Combat_Realism.Verb_ShootCR</verbClass>
        <hasStandardCommand>true</hasStandardCommand>
        <projectileDef>Bullet_ChargeBlasterHeavy</projectileDef>
        <forcedMissRadius>2.9</forcedMissRadius>
        <warmupTicks>120</warmupTicks>
        <minRange>3</minRange>
        <range>93</range>
        <ticksBetweenBurstShots>5</ticksBetweenBurstShots>
        <burstShotCount>40</burstShotCount>
        <soundCast>ShotChargeBlaster</soundCast>
        <soundCastTail>GunTail_Heavy</soundCastTail>
        <muzzleFlashScale>9</muzzleFlashScale>
      </li>
    </verbs>
    <comps>
      <li Class="Combat_Realism.CompPropertiesCustom">
        <compClass>Combat_Realism.CompAim</compClass>
        <shotVariation>0.04</shotVariation>
        <shooterVariation>0.05</shooterVariation>
        <recoilOffsetX>(-0.3,0.3)</recoilOffsetX>
        <recoilOffsetY>(-0.3,0.3)</recoilOffsetY>
      </li>
    </comps>
  </ThingDef>


  <ThingDef ParentName="BaseBullet">
    <defName>Bullet_InfernoCannon</defName>
    <label>inferno cannon shell</label>
    <graphicData>
      <texPath>Things/Projectile/InfernoCannonShot</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <shaderType>TransparentPostLight</shaderType>
    </graphicData>
    <thingClass>Combat_Realism.ProjectileCR_Explosive</thingClass>
    <projectile>
      <damageDef>Flame</damageDef>
      <damageAmountBase>60</damageAmountBase>
      <speed>180</speed>
      <explosionRadius>2.4</explosionRadius>
      <postExplosionSpawnThingDef>Puddle_Fuel</postExplosionSpawnThingDef>
      <explosionSpawnChance>0.3</explosionSpawnChance>
    </projectile>
  </ThingDef>
  <ThingDef ParentName="BaseGun">
    <defName>Gun_InfernoCannon</defName>
    <label>inferno cannon</label>
    <description>Incendiary-shot mini-artillery device. Mechanoid-built.</description>
    <graphicData>
      <texPath>Things/Item/Equipment/WeaponRanged/InfernoCannon</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <statBases>
      <MarketValue>2400</MarketValue>
      <AccuracyTouch>0.50</AccuracyTouch>
      <AccuracyShort>0.50</AccuracyShort>
      <AccuracyMedium>0.85</AccuracyMedium>
      <AccuracyLong>0.85</AccuracyLong>
      <RangedWeapon_Cooldown>6</RangedWeapon_Cooldown>
    </statBases>
    <tradeability>Never</tradeability>
    <techLevel>Spacer</techLevel>
    <destroyOnDrop>True</destroyOnDrop>
    <menuHidden>True</menuHidden>
    <weaponTags>
      <li>MechanoidGunHeavy</li>
    </weaponTags>
    <verbs>
      <li>
        <verbClass>Combat_Realism.Verb_ShootCR</verbClass>
        <hasStandardCommand>true</hasStandardCommand>
        <projectileDef>Bullet_InfernoCannon</projectileDef>
        <forcedMissRadius>3.5</forcedMissRadius>
        <ai_IsIncendiary>true</ai_IsIncendiary>
        <warmupTicks>100</warmupTicks>
        <minRange>3</minRange>
        <range>80</range>
        <burstShotCount>1</burstShotCount>
        <soundCast>InfernoCannon_Fire</soundCast>
        <soundCastTail>GunTail_Light</soundCastTail>
        <muzzleFlashScale>14</muzzleFlashScale>
      </li>
    </verbs>
    <comps>
      <li Class="Combat_Realism.CompPropertiesCustom">
        <compClass>Combat_Realism.CompAim</compClass>
        <shotVariation>0.02</shotVariation>
        <shooterVariation>0.05</shooterVariation>
        <recoilOffsetX>(0.0,0.0)</recoilOffsetX>
        <recoilOffsetY>(0.0,0.0)</recoilOffsetY>
      </li>
    </comps>
  </ThingDef>


  <ThingDef ParentName="BaseBullet">
    <defName>Bullet_ChargeLance</defName>
    <label>charge lance shot</label>
    <graphicData>
      <texPath>Things/Projectile/ChargeLanceShot</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <shaderType>TransparentPostLight</shaderType>
      <drawSize>(3,3)</drawSize>
    </graphicData>
    <projectile>
      <damageDef>Bullet</damageDef>
      <damageAmountBase>28</damageAmountBase>
      <speed>400</speed>
    </projectile>
    <comps>
      <li Class="Combat_Realism.CompProperties_AP">
        <compClass>Combat_Realism.CompAP</compClass>
        <armorPenetration>0.9</armorPenetration>
      </li>
    </comps>
  </ThingDef>
  <ThingDef ParentName="BaseGun">
    <defName>Gun_ChargeLance</defName>
    <label>charge lance</label>
    <description>Charged-shot rail-assisted lance weapon. Fires a single charged shot at high velocity.</description>
    <graphicData>
      <texPath>Things/Item/Equipment/WeaponRanged/ChargeLance</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <statBases>
      <MarketValue>2000</MarketValue>
      <AccuracyTouch>0.50</AccuracyTouch>
      <AccuracyShort>0.50</AccuracyShort>
      <AccuracyMedium>0.85</AccuracyMedium>
      <AccuracyLong>0.85</AccuracyLong>
      <RangedWeapon_Cooldown>0.5</RangedWeapon_Cooldown>
    </statBases>
    <tradeability>Never</tradeability>
    <techLevel>Spacer</techLevel>
    <destroyOnDrop>True</destroyOnDrop>
    <menuHidden>True</menuHidden>
    <weaponTags>
      <li>MechanoidGunMedium</li>
    </weaponTags>
    <verbs>
      <li>
        <verbClass>Combat_Realism.Verb_ShootCR</verbClass>
        <hasStandardCommand>true</hasStandardCommand>
        <projectileDef>Bullet_ChargeLance</projectileDef>
        <warmupTicks>120</warmupTicks>
        <range>120</range>
        <burstShotCount>1</burstShotCount>
        <soundCast>ChargeLance_Fire</soundCast>
        <soundCastTail>GunTail_Heavy</soundCastTail>
        <muzzleFlashScale>9</muzzleFlashScale>
      </li>
    </verbs>
    <comps>
      <li Class="Combat_Realism.CompPropertiesCustom">
        <compClass>Combat_Realism.CompAim</compClass>
        <shotVariation>0.017</shotVariation>
        <shooterVariation>0.05</shooterVariation>
        <recoilOffsetX>(0.0,0.0)</recoilOffsetX>
        <recoilOffsetY>(0.0,0.0)</recoilOffsetY>
      </li>
    </comps>
  </ThingDef>


Edit: after looking into the changes made by More Mechanoids it looks like the only non-conflicting change is a tag change to the Inferno cannon.
"The power of friendship destroyed the jellyfish."

Komyets

No wonder why the centipedes carrying a Charge Blaster seem to behave just like vanilla ones during a fight, while the Minigun one is more attentive and agressive, shooting from over 100 squares away and shredding everything to bits withing the crossfire lmao.

@Orion, I think I found aother thing to note about your Mammoth that slipped past me for some odd reason. Mammoth's seem to spawn with Old Injurys, like... Stab Scars on their legs and body, and they usually spawn a lot of these injurys too. I do not know what causes it yet, I havent found time to play RimWorld for a week now.

Orion

Quote from: Komyets on November 16, 2015, 05:14:59 PM
Mammoth's seem to spawn with Old Injurys, like... Stab Scars on their legs and body, and they usually spawn a lot of these injurys too.
I noticed that too, but didn't give it much thought. Makes them look more ancient and worn, so I didn't mind.

devilyn

bout the armored mechanoids, the AGS and mortars do the job pretty nicely, and u can install AGS anywhere w/o having to power it up. (havent tested hand grenades yet) so i think, its ok balanced.
the only thing, i think that an anti-tank rifle would be nice to deal with em (which combat realism lacks).

tho, it would be logical that assaulters should be invulnerable from front but have weak back, but i guess its not possible in rimworld.

about the deteriorating crawlers, its a pain when u start to play "wack a mole" with repairing them instead of enjoing the game. maybe once u activate "repair mode" they should always come for repairs asap, w/o further watching over them?

Orion

Quote from: devilyn on November 25, 2015, 01:59:18 PM
about the deteriorating crawlers, its a pain when u start to play "wack a mole" with repairing them instead of enjoing the game. maybe once u activate "repair mode" they should always come for repairs asap, w/o further watching over them?
Then they'd not get much done, I suppose.
But maybe I could lower the threshold before they get repaired automatically a bit.

OmagaIII

Quote from: Orion on October 26, 2015, 10:53:59 AM
Quote from: Tekuromoto on October 25, 2015, 08:50:03 PM
I love this mod, but I'm having a problem now that my colony is humming along and I have a few crawlers chipped for hauling: if there's nothing for them to haul, the game lags like mad. If I toggle them to stop working and stay home, the lagginess stops.
Any thoughts? I'm running a slew of mods but I'm hoping it's not a conflict.  ::)
Hm. I'll take a look at the corresponding code, but I'm not experiencing the problem myself, so there's a good chance it's a conflict. Are you getting error messages when it happens?

Good Day,

I seem to be having the same problem. However, it doesn't seem to just be the crawlers. I have 4 mining centipedes, 4 growing centipedes, 2 crawler cleaners, 3 crawler haulers, 1 doctor, 4 cooks and one cutter (if i remember correctly). If I have them all active my i5 grinds to a halt. If I have about 3 active then I already notice a slight lag spike every second or so. With the haulers, even one, it basically locks up.

I think that there is something there that just doesn't compute correctly. For some or other reason I also think it might have to do with the AI path-thing of these mechs.

Orion

Quote from: OmagaIII on December 07, 2015, 10:25:45 AM
I seem to be having the same problem. However, it doesn't seem to just be the crawlers. I have 4 mining centipedes, 4 growing centipedes, 2 crawler cleaners, 3 crawler haulers, 1 doctor, 4 cooks and one cutter (if i remember correctly). If I have them all active my i5 grinds to a halt. If I have about 3 active then I already notice a slight lag spike every second or so. With the haulers, even one, it basically locks up.

I think that there is something there that just doesn't compute correctly. For some or other reason I also think it might have to do with the AI path-thing of these mechs.
This sounds like a mod conflict, or you're using a very large map. With the same amount of mechanoids I don't have any slowdowns here.

I wouldn't know which mods are causing this, though. Are you getting any error messages in the console?

OmagaIII

Quote from: Orion on December 07, 2015, 11:33:44 AM
Quote from: OmagaIII on December 07, 2015, 10:25:45 AM
I seem to be having the same problem. However, it doesn't seem to just be the crawlers. I have 4 mining centipedes, 4 growing centipedes, 2 crawler cleaners, 3 crawler haulers, 1 doctor, 4 cooks and one cutter (if i remember correctly). If I have them all active my i5 grinds to a halt. If I have about 3 active then I already notice a slight lag spike every second or so. With the haulers, even one, it basically locks up.

I think that there is something there that just doesn't compute correctly. For some or other reason I also think it might have to do with the AI path-thing of these mechs.
This sounds like a mod conflict, or you're using a very large map. With the same amount of mechanoids I don't have any slowdowns here.

I wouldn't know which mods are causing this, though. Are you getting any error messages in the console?

I'll have a look at the log and provide feedback asap.

theapolaustic1

My friend and I both experienced some odd behavior with this modpack. She had some mechanoids spawn inside of a cryptosleep casket chamber and actually tunnel out to attack her, instead of waiting for her to break through. I had some in a chamber that I broke into, which would constantly return to the chamber to "sleep" and only fight when attacked. Furthering the oddness with mine, the crawler showed the owned interface (the skullywag did not) and claimed to be assigned to growing... But cut off a colonist's toe when he went next to it. Now that it's dead, I can rechip it to hauling or cleaning, but I don't have the option to keep it assigned to growing?

Note that we're playing with the same mods, but it is rather heavily modded (about 14 or so total, most small). The only one I can think of that would actually touch the same stuff would be MD2, if you've had any reports of conflicts disregard this post.