CombatExtendedRWMod / CombatExtended

Combat Extended mod for RimWorld
129 stars 91 forks source link

Add Forsakens patches #1208

Open sumghai opened 4 years ago

sumghai commented 4 years ago

Additions

References

Reasoning

Testing

Check tests you have performed:

sumghai commented 4 years ago

If the Forsaken ammo is functionally identical to various core ammo sets, would it be more practical to set those respective ammos as the Parent, rather than using the generic ammo parent? If it works, it would prevent any need to have to manually adjust the stats of the Forsaken-specific ammo in the event that the core ammo stats were tweaked.

I tried using non-abstract generic CE projectile defs as the Parents for the Forsaken projectiles, in the hopes that stats would be inherited as you suggested, but this resulted in errors in the debug log - probably because the game doesn't like inheriting from non-abstract defs:

Attempted optimization of Forsaken arrows ```
  • Forsakens
  • Defs AmmoSet_ForsakensArrows Projectile_ForsakensArrows Ammo_ForsakensArrows Heavy arrow designed to be fired from a forsaken bow. ThirdParty/Forsakens/FAmmoArrow Graphic_StackCount 0 ForsakenArrow Projectile_ForsakensArrows Weapons/FArrow Graphic_Single Ammo_ForsakensArrows MakeAmmo_ForsakensArrows Craft 10 forsakens arrows. Making forsaken arrows. 400
  • Steel
  • 4
  • Steel
  • 10
    ```
    Attempted optimization of Reskinned charged projectiles ```
  • Forsakens
  • Defs AmmoSet_8x35mmCharged_ForsakenSniper Bullet_8x35mmCharged_ForsakenSniper Bullet_8x35mmCharged_ForsakenSniper Weapons/SnipPulse Graphic_Single AmmoSet_12GaugeCharged_ForsakenShotGun Bullet_12GaugeCharged_ForsakenShotGun Bullet_12GaugeCharged_ForsakenShotGun Weapons/ShotPulse Graphic_Single AmmoSet_5x35mmCharged_ForsakenAR Bullet_5x35mmCharged_ForsakenAR Bullet_5x35mmCharged_ForsakenAR Weapons/SmolPulse Graphic_Single (1,1)
  • ```
    Screenshot of debug log at startup ![Annotation 2020-04-10 201011](https://user-images.githubusercontent.com/4993380/78990099-1d808a80-7b68-11ea-974f-831e6998f3d6.png)

    I'll see if there are other ways I can optimize ammo def inheritance, but my experience with other conditionally-patched mod-unique ammo suggests this would be highly unlikely.

    sumghai commented 4 years ago

    The most optimization I can do ammo-wise would be to have the Forsaken arrow ammo item inherit from the generic CE AmmoGreatArrowBase def, although stats still need to be explicitly defined in accordance with an actual steel great arrow (3d46dac).

    I'll take a look at some of the other problems now.