# Rules: Editing the Player

These are rules that can be used to temporarily edit attributes of the player, their party or their inventory for the duration of this battle.

<details>

<summary><mark style="background-color:green;"><strong>"tempPlayer"</strong></mark></summary>

You can use this rule to change the player's name and/or appearance for this battle, and revert back to normal afterwards. For example, you can use this to disguise the player as a different character for a capture tutorial.\
\
This is entered as `setBattleRule("tempPlayer", Attributes)`, where "Attributes" can be either a String, Integer, or an Array which contains both a string and an integer.\
\
The string entered here will be used as the player's new temporary name for this battle. If an integer is entered, this will change the player's outfit to whichever outfit number is set here.

</details>

<details>

<summary><mark style="background-color:green;"><strong>"tempParty"</strong></mark></summary>

You can use this rule to give the player a temporary party that will replace their normal party for this battle, and revert back to their normal party afterwards.\
\
This is entered as `setBattleRule("tempParty", Array)`, where "Array" is an array that contains a number of Pokemon objects, or species ID's and levels.\
\
For example, `[:PIKACHU, 20, :MEOWTH, 15]` will give the player a temporary party consisting of a level 20 Pikachu and a level 15 Meowth.\
\
If you want to edit specific values on the temporary Pokemon the player should have, then you can first create a Pokemon object yourself with something like:&#x20;

```
pkmn = Pokemon.new(:PIKACHU, 20)
```

Then you may edit its values from there. Once the Pokemon is edited to your liking, you may just enter `pkmn` in the array for this battle rule instead of a species ID and level.

</details>

<details>

<summary><mark style="background-color:green;"><strong>"tempBag"</strong></mark></summary>

You can use this rule to give the player a temporary inventory that will replace their normal bag for this battle, and return all of their normal items afterwards.\
\
This is entered as `setBattleRule("tempBag", Array)`, where "Array" is an array that contains a number of item ID's and quantities for each item.\
\
For example, `[:POTION, 5, :ANTIDOTE, 2]` will give the player a temporary bag consisting of only 5 Potions and 2 Antidotes. If no quantity is entered after an item ID, the quantity will always assumed to be 1. So for example, if you set this to something like `[:POKEBALL, 5, :QUICKBALL, :DUSKBALL]`, then the player's temporary bag will consist of 5 Poke Balls, 1 Quick Ball and 1 Dusk Ball.

</details>


---

# 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://lucidious89-tutorials.gitbook.io/deluxe-battle-kit-tutorial/deluxe-battle-kit-for-v21.1/deluxe-battle-rules/rules-editing-the-player.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.
