Skip to content

MVCF: Testing

Joshua edited this page Dec 11, 2022 · 1 revision

Tests for MVCF

In order to avoid breaking people's games, we will start testing MVCF before every release. Eventually this process will hopefully be automated, but for now it is manual. Each test has series of steps and an expected result, and fails if that result does not happen, or if an error is printed. All these test should be done with VEF and a mod that enables MVCF features, like Alpha Animals, VAE - Accessories, or Combat Bionics. Some tests require a specific mod or mods. Many of these tests can be done at once, but the steps are from starting the game each time, for completeness.

Vanilla

These test if vanilla functions still work, and are the most important.

Gun Equip

Steps

  1. Generate map, crashlanding (use Dev Quicktest)
  2. Draft colonist
  3. Equip colonist with the rifle
  4. Attempt to fire at something

Expected Result

The gun fires a bullet.

Gun Unequip

Steps

  1. Generate map, crashlanding (use Dev Quicktest)
  2. Draft colonist
  3. Equip colonist with the rifle
  4. Unequip the rifle
  5. Spawn an enemy

Expected Result

Colonist does not fire at the enemy with a gun they don't have.

Automatic Target Finding

Steps

  1. Generate map, crashlanding (use Dev Quicktest)
  2. Draft colonist
  3. Equip colonist with the rifle
  4. Unequip the rifle
  5. Spawn an enemy

Expected Result

The colonist shoots the enemy.

Hunting

Steps

  1. Generate map, crashlanding (use Dev Quicktest)
  2. Equip colonist with the rifle
  3. Set colonist to do Hunting work
  4. Designate an animal to hunt

Expected Result

Colonist hunts animal. Also, the "Colonist lacks hunting weapon" alert should not appear.

Enemies

Steps

  1. Generate map (use Dev Quicktest)
  2. Generate an enemy raid, preferably pirates

Expected Result

The enemies shoot the colonists. If there are any rocket launchers, ensure they disappear and are not fired more than once.

Mortars

Steps

  1. Generate map (use Dev Quicktest)
  2. Generate an enemy siege

Expected Result

The mortars are built and then fired at the colonists.

Saving and Loading

Steps

  1. Generate map, crashlanding (use Dev Quicktest)
  2. Draft colonist
  3. Equip colonist with the rifle
  4. Save
  5. Load the save
  6. Fire the weapon

Expected Result

Weapon is fired.

Animals

These tests are focused on ensuring the animal features work properly. Use Race to the Rim or Alpha Animals or something to test it.

Tamed

Steps

  1. Generate map (use Dev Quicktest)
  2. Spawn an animal with a ranged attack
  3. Dev tame it
  4. Select attack training
  5. Dev train it
  6. Spawn an enemy

Expected Result

Animal shoots at the enemy.

Manhunter

Steps

  1. Generate map (use Dev Quicktest)
  2. Spawn an animal with a ranged attack
  3. Use dev tools to force it to be manhunter (Mental State -> Manhunter (Permanent)

Expected Result

Animal shoots at colonists with a ranged attack.

Apparel

These tests test apparel verbs, as well as independent fire and drawing. All use VAE - Accessories.

Equip

Steps

  1. Generate map (use Dev Quicktest)
  2. Spawn Mini-Turret pack
  3. Equip pawn with it
  4. Spawn an enemy

Expected Result

You can see the pack rendered on the pawn's back. The gun on the pack will shoot at the enemy.

Unequip

Steps

  1. Generate map (use Dev Quicktest)
  2. Spawn Mini-Turret pack
  3. Equip pawn with it
  4. Have them drop it
  5. Spawn an enemy

Expected Result

The pack disappears. The enemy is not shot at.

Reloading

This part tests the reloading features of the mod. Use Reloadable Rockets or Heavy Weapons Reloading.

Unloading

Steps

  1. Generate map (use Dev Quicktest)
  2. Spawn a reloadable weapon
  3. Select a pawn and right click the hit "Unload"

Expected Result

Pawn unloads weapon, spawning ammunition items.

Firing

Steps

  1. Generate map (use Dev Quicktest)
  2. Spawn a reloadable weapon
  3. Draft pawn
  4. Equip pawn with weapon
  5. Fire weapon

Expected Result

Weapon is fired and ammunition count goes down.

Reloading

Steps

  1. Generate map (use Dev Quicktest)
  2. Spawn a reloadable weapon
  3. Draft pawn
  4. Equip pawn with weapon
  5. Fire weapon, several times
  6. Spawn ammo
  7. Select pawn, hit ammo, hit "Reload"

Expected Result

Weapon is reloaded: Ammo count increases and ammo items are removed.

Automatic Reloading

Steps

  1. Generate map (use Dev Quicktest)
  2. Spawn a reloadable weapon
  3. Draft pawn
  4. Equip pawn with weapon
  5. Fire weapon until empty
  6. Spawn ammo
  7. Undraft pawn

Expected Result

Pawn should reload the weapon with the ammo.

Inventory Reloading

This one also requires Pick Up and Haul, or a similar mod to add stuff to inventory.

Steps

  1. Generate map (use Dev Quicktest)
  2. Spawn a reloadable weapon
  3. Draft pawn
  4. Equip pawn with weapon
  5. Spawn ammo
  6. Put ammo in pawn's inventory
  7. Fire weapon until empty

Expected Result

Pawn reloads weapon with ammo from their inventory.

AI

Steps

  1. Generate map (use Dev Quicktest)
  2. Disable player damage
  3. Spawn Mercenary Heavies until there's a bunch with rocket launchers

Expected Result

Enemies should fire rockets at colonists, then reload their launchers, then switch weapons when they run out.

Hunting

This one also requires Pick Up and Haul, or a similar mod to add stuff to inventory.

Steps

  1. Generate map (use Dev Quicktest)
  2. Spawn a reloadable weapon
  3. Draft pawn
  4. Equip pawn with weapon
  5. Spawn ammo
  6. Put ammo in pawn's inventory
  7. Set pawn to hunt
  8. Designate animals to hunt
  9. Undraft pawn

Expected Result

Pawn will hunt animals until out of ammo, then reload and continue hunting.

Hediffs

This section tests hediff verbs. Requires Combat Bionics.

Add

Steps

  1. Generate map (use Dev Quicktest)
  2. Add wrist minigun to pawn's hands.
  3. Fire it at something.

Expected Result

Minigun fires correctly.

Remove

Steps

  1. Generate map (use Dev Quicktest)
  2. Add wrist minigun to pawn's hands.
  3. Remove it
  4. Spawn an enemy

Expected Result

Enemy is not fired at.

VFE Core

General Comp classes

General DefModExtensions

Item Processor

PipeSystem

Custom Structure Generation

Multi Verb Combat Framework - MVCF

Animal Behaviours

Genes

Apparel

Cuisine

Furniture

Plants

Deprecated

Clone this wiki locally