# Unit Profile

## Creation

To create a unit profile, find (or create) the *GameName/Resources/GameName/UnitProfile* folder in the project tab and right click.  Choose *Create > AnyRPG > UnitProfile*.

![](https://2976860065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx7Nd93HqSNPpv2JhrViE%2Fuploads%2FphLWqpy1zK2ezttuqYDM%2Fimage.png?alt=media\&token=8c75ad75-6343-43ac-93ef-ffca09ffaed4)

## Properties

The default properties of a character unit are listed below.  Some of these properties can be overridden if this character is used as a player.

### Unit Prefab

| Name                     | Description                                                                                                                                                                    |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Automatic Prefab Profile | If true, the unit prefab is loaded by searching for a [UnitPrefabProfile](https://docs.anyrpg.org/scriptable-objects/unit-prefab-profile) with the same name as this resource. |
| Prefab Profile Name      | The name of the prefab profile that contains the prefab that represents this unit.  Only used if *Automatic Prefab Profile* and *Use Inline Prefab Props* are not true.        |
| Use Inline Prefab Props  | If true, the unit prefab is loaded from the inline *Unit Prefab Props* field.                                                                                                  |
| Unit Prefab Props        | [Unit Prefab Profile](https://docs.anyrpg.org/scriptable-objects/unit-prefab-profile) properties.                                                                              |

### Unit Settings

| Name           | Description                                           |
| -------------- | ----------------------------------------------------- |
| Is UMA Unit    | Deprecated, not currently used.                       |
| Is Pet         | If true, this unit can be captured and kept as a pet. |
| Flight Capable | If true, this unit can fly.                           |
| Glide Capable  | If true, this unit can glide.                         |

### Character

| Name                      | Description                                                                                                                        |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Character Name            | The name of the character, which will be shown in unit frames and nameplates.                                                      |
| Title                     | A title that will be shown below the name in the nameplate.                                                                        |
| Faction Name              | The name of the [Faction](https://docs.anyrpg.org/scriptable-objects/faction) that this character belongs to.                      |
| Unit Type Name            | The name of the [Unit Type](https://docs.anyrpg.org/scriptable-objects/unit-type) of this character.                               |
| Character Race Name       | The name of the [Character Race](https://docs.anyrpg.org/scriptable-objects/character-race) of this character.                     |
| Character Class Name      | The name of the [Character Class](https://docs.anyrpg.org/scriptable-objects/character-class) of this character.                   |
| Class Specialization Name | The name of the [Class Specialization](https://docs.anyrpg.org/scriptable-objects/class-specialization) of this character.         |
| Spawn Dead                | If true, the character will spawn dead.                                                                                            |
| Prevent Auto Despawn      | If true, the character will not despawn when it does.                                                                              |
| Default Toughness         | The name of a [Unit Toughness](https://docs.anyrpg.org/scriptable-objects/unit-toughness) that defines how tough the character is. |

### Voice

| Name                   | Description                                                                                                                                                                                                                                    |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Voice Profile          | A [Voice Profile](https://docs.anyrpg.org/scriptable-objects/voice-profile) that contains voice audio clips to play.                                                                                                                           |
| Use Inline Voice Props | If true, the [Voice Profile](https://docs.anyrpg.org/scriptable-objects/voice-profile) is loaded from the inline settings below, instead of the shared voice profile above.                                                                    |
| Voice Props            | If *Use Inline Voice Props* is true, the [Voice Profile Properties](https://docs.anyrpg.org/voice-profile#properties) here will be used instead of the shared [Voice Profile](https://docs.anyrpg.org/scriptable-objects/voice-profile) above. |

### Configuration

| Name                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Capabilities           | [Capabilities](https://docs.anyrpg.org/shared-properties/capabilities) the character has.                                                                                                                                                                                                                                                                                                                                         |
| Primary Stats          | A list of [Character Stat General Properties](https://docs.anyrpg.org/character-stat#general-properties).                                                                                                                                                                                                                                                                                                                         |
| Power Resources        | A list of [Power Resources](https://docs.anyrpg.org/scriptable-objects/power-resource) the character has.                                                                                                                                                                                                                                                                                                                         |
| Use Provider Equipment | By default NPCs only equip the [Equipment](https://docs.anyrpg.org/scriptable-objects/items/equipment) listed in the *Equipment Name List*.  If true, NPCs will equip all [Equipment](https://docs.anyrpg.org/scriptable-objects/items/equipment) from any provider, including [Character Class](https://docs.anyrpg.org/scriptable-objects/character-class), [Faction](https://docs.anyrpg.org/scriptable-objects/faction), etc. |
| Equipment Name List    | A list of [Equipment](https://docs.anyrpg.org/scriptable-objects/items/equipment) that the character will have equipped by default.                                                                                                                                                                                                                                                                                               |

### Combat

| Name                      | Description                                                                                                                                                |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Is Aggressive             | If true, the unit will attack anything in its aggro radius, based on the [Faction](https://docs.anyrpg.org/scriptable-objects/faction) relationship.       |
| Aggro Radius              | The radius of the aggro sphere around this unit. Set to 0 to disable aggro.                                                                                |
| Automatic Combat Strategy | If true, a [Combat Strategy](https://docs.anyrpg.org/scriptable-objects/combat-strategy) matching the unit name will be looked up, and used if found.      |
| Combat Strategy Name      | The name of a [Combat Strategy](https://docs.anyrpg.org/scriptable-objects/combat-strategy) to use.                                                        |
| Default Hit Effects       | [Ability Effects](https://docs.anyrpg.org/scriptable-objects/ability-effects) to cast on the target when the performing an unarmed standard (auto) attack. |

### Movement

| Name                         | Description                                                                                                                                                                                                                                                                                                                                                                                               |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Is Mobile                    | If true, the character can move.                                                                                                                                                                                                                                                                                                                                                                          |
| Footstep Type                | <p><strong>None</strong></p><p>Do not play footsteps.</p><p><strong>Unit</strong></p><p>Play the footsteps configured below. <strong>Environment</strong></p><p>Play the footsteps based on the terrain. <strong>UnitFallback</strong></p><p>Try environment, then fallback to unit if no environment sound available.<br><strong>Both</strong><br>Play environment and unit sounds at the same time.</p> |
| Play On Footstep             | If true, individual footstep sounds will play when the foot hits the ground, instead of playing a repeating footsteps loop when moving.                                                                                                                                                                                                                                                                   |
| Movement Audio Profile Names | A list of [Audio Profiles](https://docs.anyrpg.org/scriptable-objects/audio-profile) that contain audio clips that will be played when the unit is in motion.  If *Play On Footstep* is true, the audio clips will by cycled through as the feet hit the ground.                                                                                                                                          |

### Patrol

| Name              | Description                                                                                       |
| ----------------- | ------------------------------------------------------------------------------------------------- |
| Use Inline Patrol | If true, the patrol defined in the *Patrol Config* field will be used.                            |
| Patrol Config     | [Patrol](https://docs.anyrpg.org/scriptable-objects/patrol-profile) properties.                   |
| Patrol Names      | The names of [Patrol Profiles](https://docs.anyrpg.org/scriptable-objects/patrol-profile) to use. |

### Interaction

| Name                        | Description                                                                                                                                                                                                                                                                 |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Face Interaction Target     | If true, and the character is an NPC, it will turn and face any player that interacts with it.                                                                                                                                                                              |
| Interaction Max Range       | The maximum range at which this character can be interacted with if it is an NPC.                                                                                                                                                                                           |
| Interactable Options        | A list of named [Interactable Options](https://docs.anyrpg.org/scriptable-objects/interactable-option-configurations) that define which [Interactables](https://docs.anyrpg.org/scriptable-objects/interactable-option-configurations) this character has, if it is an NPC. |
| Inline Interactable Options | [Interactable Option Configurations](https://docs.anyrpg.org/scriptable-objects/interactable-option-configurations) that define which [Interactables](https://docs.anyrpg.org/scriptable-objects/interactable-option-configurations) this character has, if it is an NPC.   |

### Object Persistence

| Name                    | Description                                                                                                                                                                                                                                                                                             |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Persist Object Position | If true, the object position is saved so that the object will spawn at the saved location next time a game is loaded. This requires at least one of *Save On Level Unload*, *Save On Game Save*, or a save setting in a [Patrol](https://docs.anyrpg.org/scriptable-objects/patrol-profile) to be true. |
| Save On Level Unload    | If true, the position will be saved when a level is unloaded.                                                                                                                                                                                                                                           |
| Save On Game Save       | If true, the position will be saved when the game is saved.                                                                                                                                                                                                                                             |
| Overwrite Unit UUID     | If true, the automatic UUID assigned to the unit will be overwritten with the UUID in the *UUID* field.                                                                                                                                                                                                 |
| UUID                    | An automatically created Universally Unique Identifier used to ensure that all objects with saved position data do not overwrite another object's data.                                                                                                                                                 |

## Next Steps

* Add a unit profile to the *Default Player Unit Profile Name* field in the System Configuration Manager to make this unit the default when a new game is started.
* Add a unit profile to the *Character Creator Profile Names* list in the System Configuration Manager to allow a player to choose this unit from a list of units when starting a new game.
* Add a unit profile to the *Character Creator Profile Names* list in a [Faction](https://docs.anyrpg.org/scriptable-objects/faction) to allow a player to choose this unit from a list of units when starting a new game as a specific [Faction](https://docs.anyrpg.org/scriptable-objects/faction).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.anyrpg.org/scriptable-objects/unit-profile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
