# Making it Work

## Components

Give the [skill-interpreter](https://stylishesper.gitbook.io/skill-tree/systems/skill-tree/components/skill-interpreter "mention") component to your player character to do something when a certain skill is used.

Give the [unit-stats-provider](https://stylishesper.gitbook.io/skill-tree/systems/stats/components/unit-stats-provider "mention") component to your player character to give them stats.

## Summary of The Order

The order to get your skills working is quite simple.

1. Drag the [default-prefabs](https://stylishesper.gitbook.io/skill-tree/quick-start/default-prefabs "mention") onto your scene.
2. Create your skills in the [editor-window](https://stylishesper.gitbook.io/skill-tree/systems/skill-tree/editor-window "mention").
3. Give the [skill-interpreter](https://stylishesper.gitbook.io/skill-tree/systems/skill-tree/components/skill-interpreter "mention") and [unit-stats-provider](https://stylishesper.gitbook.io/skill-tree/systems/stats/components/unit-stats-provider "mention") components to your player character and set them up.

You do have to code your own skills. Remember, Skill Tree is not a skill creator and doesn't advertise itself as one. If you're new to programming, try checking out the demo scene in the `Assets/StylishEsper/SkillTree/Example` folder.

## Scripting

Remember to use the namespace `Esper.SkillTree`.

### Initialization

Use `SkillTree.Initialize()` to initialize Skill Tree. This is required to get it working properly. You can use the [skill-tree-initializer](https://stylishesper.gitbook.io/skill-tree/systems/skill-tree/components/skill-tree-initializer "mention") component.

It may be required to call `SkillTree.ClearData()` when Skill Tree's functionality is no longer needed. The initializer component calls this automatically as necessary.

### Handling Level Up

Whenever your player levels up, call `SkillTree.SetPlayerLevel()`, as this will let Skill Tree know what level the player currently is.

### Setting Skill Points

You can set the player's current skill points with `SkillTree.playerSkillPoints`.

### Completing Skill Use

Skill Tree prevents the usage of skills by a character if they are already in the middle of using one. Call `SkillTree.CompleteSkillUse` to let Skill Tree know that the character should now be free to use another skill.

If you have any issues, please see the [getting-help](https://stylishesper.gitbook.io/skill-tree/support/getting-help "mention") page.


---

# 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://stylishesper.gitbook.io/skill-tree/quick-start/making-it-work.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.
