Skip to content

New Verb Classes

ilikegoodfood edited this page Sep 6, 2019 · 7 revisions

The Verb Expansion Framework includes a number of new verb classes. These offer new ways to inflict violence on the Rim.

VEF_Verb_ShootBody

VEF_Verb_ShootBody has no new fields or properties. Projectiles fired by this type of verb have their damage modified proportionately to the baseBodySize of the pawn that fired the verb.

weaponDamageMultiplier + ((baseBodySize - 1) * 0.5)

VEF_Verb_Explode, VEF_Verb_ExplodeSafe, VEF_Verb_SelfDestruct

All three of these verb classes allow for the creation of point-blank explosions, centred on the pawn.

VEF_Verb_Explode damages all entities within the explosion radius, inlcuding the verb's user.

VEF_Verb_ExplodeSafe damages all entities within the explosion radius, excluding the tile that the verb's user is in. This ensures that the verb's user is not harmed when it uses the verb.

VEF_Verb_SelfDestructdamages all entities within the explosion radius and always kills the verb's user.

At this time, the Verb Expnasion Framework is only able to provide UI textures for these verb classes if the verb is attached to a piece of equipment (a weapon).

VEF_VerbProperties_Explode

All three of these verb classes also require the use of an expanded set of verb properties. VEF_VerbProperties_Explode provides a number of required and optional fields, specifcially to fascilitate explosions that do not require projectiles.

Attaching a Verb with VEF_VerbProperties_Explode

If unsure of how this corrolates to attaching a verb to a def, see Verbs.

When defining a verb inside tehe Verbs list, each verb is it's own list item (marked as <li></li>). By default, the list item is of the Verse.VerbProperties Class. In order to use the VEF_VerbProperties_Explode class, you must assign a class as shown in the follwoing structural example:

This is a placement guide, not functioning code. Do not just copy and paste it.

            <verbs>
                <li Class="VerbExpansionFramework.VEF_VerbProperties_Explode">
                    <!--Contents of Verb-->
                    <!-- verbClass should be one of VEF_Verb_Explode, VEF_Verb_ExplodeSafe, or VEF_Verb_SelfDestruct -->
                </li>
            </verbs>

Verb Properties

All verb properties from the default verbs can also be used when defining these verbs, however, not all of them have any effect, such as accuracy.

<label></label>

label is a default verb property. It is the string used to display the name of the thing to the player in game. The label should be written entirely in small leters, and with spaces. It is not used in RimWorld itself, as there is no way to see a verb's label, but VEF makes use of it for custom labeling of the verb gizmo.

<range></range>

range is a default verb property. It is the maximum range of the verb. It cannot be used on a traget that is further away from the verb's user than this distance. Make sure you define it corectly.

Since verbs of these verb classes cannot be used in melee, it is recommended that the range be at least 2. To ensure that the target is within the explosion, it is also recommended that the range be at least 1 less than the explosionRadius.

<warmupTime></warmupTime>

warmupTime is a default verb property. It specifies, in seconds, the amount of time it takes a pawn to fire a burst from first aquiring a target. All RimWorld verbs use it.

Since it is possible to prevent a pawn or turret from using verbs of these verb classes by entering melee range with them, it is recommended that the warmup time be set to less than 1 second, making it explode almost immediately upon a target entering range.

<defaultCooldownTime></defaultCooldownTime>

defaultCooldownTime is the direct verb version of RangedWeapon_Cooldown. All verbs that are not attached to equipment should have a defaultColdownTime.

Since verbs of these verb classes are explosives of a large radius and short warmup time, it is recommended that the defaultCooldownTime b e set very high. This will result in the verb's user being stuck in cooldown during combat for the duration.

<explosionRadius></explosionRadius>

explosionRadius describes the radius of the explosion. In order to ensure that the target is within this radius, it is recommended that the explosionRadius be at least 1 larger than the range.

<explosionDamageType></explosionDamageType>

explosionDamageType contains the defNAme of the DamageDef that the explosion causes. It is required for the explosion to function.

<explosionDamageAmount></explosionDamageAmount>

explosionDamageAmount is the amount of damage that the explosion does to an entity caught within the epxlosion.

<explosionSound></explosionSound>

explosionSound contains the defName of the soundDef that you wish to be played when the explosion is triggered. This is an optional field.

<postExplosionSpawnThingDef></postExplosionSpawnThingDef>

postExplosionSpawnThingDef is the defName of the ThingDef to be spawned on each tile of the explosion after the explosion is completed. The equivelent to this optional field is used by RimWorld's verbs to spawn filth.

<postExplosionSpawnThingChance></postExplosionSpawnThingChance>

postExplosionSpawnThingChance is the dedcimal change of the postExplosionSpawnThingDefbeing spawned on each tile effected by the explosion. It should be between 1 (spawns on every tile) and 0 (doesn't spawn). This field is optional, with a default value of 1.

<postExplosionSpawnThingCount></postExplosionSpawnThingCount>

postExplosionSpawnThingCount describes the number of postExplosionSpawnThingDef to spawn in a tile on a successful spawn. This field is optional, with a default value of 1.

<preExplosionSpawnThingDef></preExplosionSpawnThingDef>

preExplosionSpawnThingDef is the defName of the ThingDef to be spawned on each tile of the explosion before the explosion is completed. The equivelent to this optional field is used by RimWorld's verbs to spawn filth.

<preExplosionSpawnThingChance></preExplosionSpawnThingChance>

preExplosionSpawnThingChance is the dedcimal change of the preExplosionSpawnThingDefbeing spawned on each tile effected by the explosion. It should be between 1 (spawns on every tile) and 0 (doesn't spawn). This field is optional, with a default value of 1.

<preExplosionSpawnThingChance></preExplosionSpawnThingChance>

preExplosionSpawnThingChance describes the number of postExplosionSpawnThingDef to spawn in a tile on a successful spawn. This field is optional, with a default value of 1.

<applyDamageToExplosionCellsNeighbors></applyDamageToExplosionCellsNeighbors>

applyDamageToExplosionCellsNeighbors controls whether the explosion deals damage to tiles adjacent to the radius it effects. If set to true, then only damage is delt to those tiles. None of the other effects apply. This field is optional, with a default value of false.

<chanceToStartFire></chanceToStartFire>

chanceToStartFire is the decial chance of flammable entities that are within the explosion being ignited. It should be between 1 (every item is ignited) and 0 (no items are ignited). This field is optional, with a default value of 0.

<damageFalloff></damageFalloff>

damageFalloff determines whether the outermost tiles iof the explosion suffer from reduced damage output. If set to true, entities within the outer edge of gthe explosion will suffer less damage than those closer to the source. This field is optional, with a default value of false.