Template:VisuMZ Conditional Random Encounters Notetags

From Yanfly.moe Wiki
Jump to navigation Jump to search

To make these comment tags work, insert any of the below comment tags inside a comment found within any of the troop's pages. The page's conditions do not need to be met and can even work with the "Don't Run" condition.

If there are multiple comments, the comments will be stringed together allowing for more than 6 lines of conditions.

If using the Battle Core's "Base Troop ID(s)" Plugin Parameter, the comments from the Base Troop pages will also be copied over.

---

Requirement Comment Tags

CondRandEnc Preview1.png

---

<Random Encounter Requirements>
 condition
 condition
 condition
 condition
</Random Encounter Requirements>

- Used for: Troop Page Comment Tags
- Create conditional requirements for this random encounter to be met before
  it would appear in the random encounter pool for the map.
- Replace 'condition' with any of the conditions listed in below section.
- Insert and/or remove 'condition' lines to add/remove conditions.
- If you are using the Battle Core, this will NOT work with a Base Troop.
  You will get an alert message saying so.
  - Why? Because this can cause all of the troops in the game to just shut
    off and you don't want that.

Condition List

CondRandEnc Preview1.png

Replace 'condition' in the notetags in the above section with any of the following to make conditions. These conditions are also used in the Plugin Parameters for the default conditions, too.

---

x >= y
x > y
x === y
x !== y
x < y
x <= y

- Replace 'x' and 'y' with any of the following:

- 'Switch x' (replace 'x' with a number) for switch x's current state.
- 'TRUE', 'FALSE', 'ON', 'OFF' for the opposite x/y value.
- Using any of these boolean modifiers must be paired with '===' or '!=='

- 'Variable x' (replace 'x' with a number) for variable x's current value.
- A numeric value representing a hard number.
- '50%' or any other percentile number to represent a rate.
- '0.5' or any other float number to represent a rate.

- 'Item id Count' for the number of specific items the party owns.
  - Replace 'id' with the ID of the item.
- 'Item name Count' for the number of specific items the party owns.
  - Replace 'name' with the ID of the item.

- 'Weapon id Count' for the number of specific weapons the party owns.
  - Replace 'id' with the ID of the weapon.
- 'Weapon name Count' for the number of specific weapons the party owns.
  - Replace 'name' with the ID of the weapon.

- 'Armor id Count' for the number of specific armors the party owns.
  - Replace 'id' with the ID of the armor.
- 'Armor name Count' for the number of specific armors the party owns.
  - Replace 'name' with the ID of the armor.

- 'Alive Members' for the number of alive party members when drops are
  being determined.

- 'Battle Members' for the number of participating party members in battle.

- 'Dead Members' for the number of dead party members when drops are
  being determined.

- 'Death Turn' for the turn the enemy died. If an enemy was revived during
  battle, then take the most recent turn the enemy has died.

- 'Party Gold' for the party's current gold value when drops are
  being determined.

- 'Party Members' for the number of total party members in battle.

---

BGM Comment Tags

---

<Forced BGM>
 Name: filename
 Volume: x
 Pitch: x
 Pan: x
</Forced BGM>

- Used for: Troop Page Comment Tags
- Forces a specific BGM to play whenever this specific encounter is primed
  for battle.
- This will override any database settings or music changes from event
  commands.
- Replace 'filename' with the filename of the BGM you want to play.
  - Do NOT include the file extension.
- Replace 'volume' with a number to determine sound volume.
- Replace 'pitch' with a number to determine sound pitch.
- Replace 'pan' with a number to determine sound panning.

---