Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to Set Up Equipment Packs

Image Removed

Overview

This After completing this tutorial will show you how , you will be able to give weapons and equipment items to AI entities and to the player.

You will learn how also be able to carry the inventory of the player from one mission to another, as well as giving give the player individual items.

Weapons and equipment

Editing equipment packs

Open the

HTML
<STRONG></STRONG>

Equipment Pack* window using in the *Mission

...

menu.

Image Removed

Select one of the

HTML
<STRONG></STRONG>

Equipment Packs

...

using the drop-down menu.

Image Removed

Or specific items at the start of a level.

Table of Contents
maxLevel3
minLevel2
minlevel2
excludeOverview

Editing Equipment Packs

On the Game menu, click Edit Equipment-Packs:

Image Added

Using the drop-down list, select one of the Equipment-Packs:

Image Added

Info

Player_Default is loaded by default unless specified otherwise through Flowgraph (Inventory:EquipPackAdd).

...

Or, create a new pack by clicking on the

HTML
<STRONG></STRONG>

Add

...

button

Image Removed

Add Weapons and Equipment items to the Equipment list using the

HTML
<STRONG></STRONG>
HTML
<<* or *>

>

...

buttons.

Image Removed

Enemies can be set up to have unlimited ammo so you don't need to specify the amount of bullets.

Editing enemy equipment packs

You can also access the equipment pack editor by clicking

HTML
<STRONG></STRONG>

EquipmentPack

Add:

Image Added

You can then add equipment from the Available Equipment list into the Used Equipment list, or remove equipment by using the << and >> buttons.

As ammo/weapons/accessories are added/removed from the build, the EquipmentPack Editor will automatically notify of changes and update available equipment accordingly.

Accessories Setup

Since CRYENGINE 3.5, the Equipment Pack tool also has the ability to sort Accessories/Attachments for Weapons.

Image Added

In the above example you can see several accessories are ticked, this means they are equipped on the weapon by default when loading this Equipment Pack. Only one accessory can be selected to be the default per-category (as defined in the Weapon script).

This means the Pistol will start with PistolBulletAmmo, the Rifle will start with no accessories and the Shotgun will start with ShotgunSolidAmmo. If we wanted the Flashlight on the pistol by default, we'd check the box next to it in the 'bottom' category.

Ammunition

There is a fairly large overlap between Weapon scripts and Equipment packs which should be kept in mind. Ammunition amounts can be defined in the Accessory XML, in the Weapon XML or in the Equipment Pack.

Typically the 'greater' value will be accepted but kept within the limitations. If your maximum ammo capacity for PistolBullet is 54 and you put 200 in the Equipment pack you'd still only get 54. If you put 10 in the Equipment pack and 12 in the Weapon script, you'd have 22 ammo.

AI Equipment Packs

To assign a specific Equipment pack to an AI, simply reference the Equipment Pack name in the EquipmentPack field of the AI Properties.

Tip

Remember, if you're dealing with many AI/Equipment Packs, AI Entity Archetypes can be used.

You can also access the Equipment Pack editor by clicking the EquipmentPack "..." button in the properties of a character with a weapon.

Image Removed

Changing player equipment packs

The flowgraph equipment packs from the last mission can be reused by setting these flowgraph nodes:
(Note: to test a mission, or to give the player a bunch of weapons at level start use the ADDEQUIPPACK node and connect it to the start node.)

...

HTML
<STRONG></STRONG>

...

HTML
<STRONG></STRONG>

...

HTML
<STRONG></STRONG>

...

HTML
<STRONG></STRONG>

...

HTML
<STRONG></STRONG>

...

HTML
<STRONG></STRONG>

...

HTML
<STRONG></STRONG>

...

HTML
<STRONG></STRONG>

...

HTML
<STRONG></STRONG>

...

Image Removed

...

Image Added

Tip

Note that AI have an unlimited amount of ammunition so you don't need to specify the number of bullets for their Equipment packs.

Saving Players Equipment Over Multiple Levels

During some point in the game you may want to load a new level, but also carry over the players weapons and items over to the next level.

In the following picture we have a setup where on the completion or failure of MissionObjective5 we will save the player's inventory, fade out the screen and then trigger the next level.

Image Added

Then once the next level has been loaded, we will restore the saved inventory, fade in and then activate the mission MissionObjective1.

Image Added

Giving the Player Individual Weapons and Items

...

HTML
<STRONG></STRONG>

Inventory

...

...

HTML
<STRONG></STRONG>

flow graph

...

window:

Image Removed

HTML
<STRONG></STRONG>

AddItem

...

: Adds a item/weapon to the players inventory

HTML
<STRONG></STRONG>

HasItem

...

: Checks if the player has a specific item

HTML
<STRONG></STRONG>

ItemSelected

...

: Checks if the player has selected a specific item

HTML
<STRONG></STRONG>

RemoveAllItems

...

: Removes all items from the players inventory

HTML
<STRONG></STRONG>

RemoveItem

...

: Removes a specific item from the players inventory

HTML
<STRONG></STRONG>

SelectItem

...

: Selects a specific item in the players inventory if available

Use the

HTML
<STRONG></STRONG>

Add Node/Misc/Start* node to give the player a *GaussRifle

...

at level start:

Image Removed

Result

When the player starts the mission he has the GaussRifleright at the beginning:

Image Removed

HTML
<STRONG></STRONG>

Some things to experiment with:

...

Play with your equipment packs to give the player an interesting setup at the start of your level, or to create a unique and varied feel to your enemy types.

If you're working with multiple level setups, it's a good idea for testing to give the player appropriate weapons. However, when streaming between levels, it's a good idea to make sure you don't give your player new weapons for free, or to take any awayIn the example below, the player would receive a RocketLauncher at the beginning of the level, then when they passed through the AreaTrigger, they would receive 2 additional Rockets:

Image Added

 

Excerpt
hiddentrue
This tutorial shows users how to set up equipment packs from within Sandbox.