forked from RimWorld-CCL-Reborn/JecsTools
-
Notifications
You must be signed in to change notification settings - Fork 18
CompOversizedWeapon
Matthew Walls edited this page Feb 16, 2019
·
3 revisions
Make your weapons look bigger when equipped!
In unmodded RimWorld the drawSize
value in graphicData
in ThingDef
does not apply to equipped weapons. This component forces RimWorld to use the drawSize
you select for your weapon.
Here is an XML example (parts have been removed with <...>s) of a simple weapon with a working drawSize
due to adding CompOversizedWeapon to its list of <comps>
.
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
...
<ThingDef ParentName="BaseWeaponNeolithic">
<defName>LotRE_Bow_Galadhrim</defName>
<label>galadhrim-elf bow</label>
<graphicData>
...
<drawSize>1.5</drawSize>
</graphicData>
...
<comps>
<li Class="CompOversizedWeapon.CompProperties_OversizedWeapon">
</li>
</comps>
...
</ThingDef>
...
</Defs>
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
...
<defName>LotRE_MeleeWeapon_Saber</defName>
<label>elf saber</label>
<description>A true weapon to match the Elves. A tall curved yet slender blade with a hilt decorated with precious metals. Useful for graceful sweeping strikes.</description>
<graphicData>
<texPath>Things/Item/Equipment/WeaponMelee/ElvenSaber</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>1.0</drawSize>
</graphicData>
...
<comps>
<li Class="CompOversizedWeapon.CompProperties_OversizedWeapon">
<verticalFlipNorth>true</verticalFlipNorth>
<angleAdjustmentWest>90</angleAdjustmentWest>
<angleAdjustmentEast>-90</angleAdjustmentEast>
<northOffset>(0.2,0,0.2)</northOffset>
<eastOffset>(0,0,0.1)</eastOffset>
<westOffset>(0,0,0.1)</westOffset>
<southOffset>(-0.2,0,-0.2)</southOffset>
</li>
</comps>
....
</ThingDef>
</Defs>
::Note:: Characters that use this component do not use the lifestage graphics.
Here is the current list of parameters in CompOversized.CompProperties_OversizedWeapon
and what they do.
- northOffset - Sets with three values, (x, y, z). This setting adjusts the position of the weapon graphic when equipped by a character facing the north.
- eastOffset - Same as northOffset, but for the east.
- southOffset - "
- westOffset - "
- verticalFlipNorth - When set, this will turn the weapon's graphic turn 180 degrees when the character is facing north.
- angleAdjustmentWest - When facing west, this is the number of degrees the weapon's graphic will be rotated.
- angleAdjustmentEast - The same will happen as with the angle adjustment for the west, except when the character faces the east.
- angleAdjustmentNorth - "
- angleAdjustmentSouth - "
-
verticalFlipOutsideCombat - When set to
true
, outside combat, the weapon's graphic is turned 180 degrees. -
isDualWeapon - When set to
true
, the weapon's graphic is duplicated to give the illusion of two weapons being equipped at the same time.
Add Abilities to Characters
Add Abilities to Equipment
Add Genes to PawnKindDefs
Add Animations and Sounds
- CompAnimated
- CompAnimatedOver
- CompOverlays
- CompExtraSounds
- CompOversizedWeapon
- CompActivatableEffect
- CompLumbering
- CompDelayedSpawer
- CompToggleDef
Add Vehicles
Add Weapon / Armor / Health Effects
Add World Jobs
Misc