Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Custom Ammo Types

Custom moddable ammo types are supported, check out the "12 Gauge Shotgun" for an example of use.

  <object Name="12 Gauge Shotgun" Inherits="BaseMagazineRifle">
    <part Name="Render" DisplayName="12 gauge shotgun" RenderString=")"></part>
    <part Name="Physics" bUsesTwoSlots="true" Weight="16"></part>
    <part Name="Commerce" Value="100"></part>
    <part Name="MissileWeapon" Skill="Rifle" NoWildfire="true" NoAmmoProjectile="Ammo12Gauge" ShotsPerAction="8" AmmoPerAction="1" ShotsPerAnimation="8" WeaponAccuracy="35" RangeIncrement="6"></part>

<!-- heres the important bit that links the loader to AmmoPart="Ammo12Gauge", but we're going to use "AmmoGeneric" instead of an actual in game class part called "Ammo12Gauge"-->
    <part Name="MagazineAmmoLoader" ProjectileObject="" AmmoPart="Ammo12Gauge" MaxAmmo="6"></part>
<!-- -->
    <part Name="Description" Short="A stockless, pump-action shotgun of jet black."></part>
    <part Name="Metal"></part>
    <tag Name="Tier" Value="3"></tag>
    <part Name="Examiner" AlternateDisplayName="rifle" Complexity="3" Difficulty="0"></part>
  </object>
  
  <object Name="Projectile12Gauge" Inherits="TemporaryProjectile">
    <part Name="Projectile" BasePenetration="4" BaseDamage="1d10" ColorString="&amp;y"></part>
    <part Name="Physics" IsReal="false"></part>
  </object>
    
  <object Name="12 Gauge Shell" Inherits="TemporaryProjectile">
    <part Name="Render" DisplayName="12 gauge 00 buckshot" ColorString="&amp;y"></part>


<!-- heres the important bit that links it to AmmoPart="Ammo12Gauge" in the 12 Gauge Shotgun definition-->
    <part Name="AmmoGeneric" ProjectileObject="Projectile12Gauge"></part>
    <tag Name="AmmoPartType" Value="Ammo12Gauge"></tag>
    <tag Name="Ammo12Gauge"></tag>
<!-- -->

    <part Name="Physics" Category="Ammo"></part>
    <part Name="Description" Short="A brass-cased cartridge of round lead balls."></part>
    <part Name="TinkerItem" Bits="C" CanBuild="true" CanRepair="false" CanDisassemble="false" NumberMade="4"></part>
    <part Name="Commerce" Value="0.04"></part>
  </object>
  • No labels