• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Resource icon

v21.1 Challenge Modes 2.1

This resource pertains to version 21.1 of Pokémon Essentials.
Pokémon Essentials Version
v21.1 ✅
# Challenge Modes - Complete Function Guide
## Overview
Challenge Modes is a comprehensive challenge system for Pokemon Essentials v21.1 that transforms your game into an engaging, rule-based experience. This plugin includes classic Nuzlocke rules, new challenge modes like Monotype and Randomizer, and advanced integrations with Level Caps and AI systems.
Key Features:
  • 19 selectable challenge rules that can be combined
  • Monotype and Randomizer modes
  • Hardcore mode with perfect IVs and no EVs
  • Trainer scaling for increased difficulty
  • Level cap integration with 3 difficulty modes
  • Item restrictions and species limitations
  • Advanced AI system integration
IMPORTANT: This plugin replaces the original "Nuzlocke EX" plugin. If updating from an older version, delete the old "Nuzlocke EX" folder from your Plugins directory before installing.
---
## Installation
### First Time Installation
1. Extract the "Challenge Modes" folder to your Plugins/ directory
2. Compile your game (Debug > Compile)
3. Test with a new save file
### Updating from Nuzlocke EX
1. Delete the old "Nuzlocke EX" folder from Plugins/
2. Extract the new "Challenge Modes" folder to Plugins/
3. Compile your game
4. Existing save files remain compatible
### Additional Plugins (Optional)
For full functionality, consider installing:
  • Level Caps EX - For level cap challenges
  • Advanced AI System - For enhanced trainer AI
  • Voltseon's Pause Menu - For level cap HUD display
NOTE: Challenge modes automatically activate only after the player has received their first Pokeballs, ensuring proper game progression.
---
## Core Features
### Automatic Activation
Challenge modes activate automatically when:
1. The player selects rules via ChallengeModes.start
2. The player has at least one Pokeball in their bag
3. Challenge begins with ChallengeModes.begin_challenge
### Save Integration
All challenge progress is automatically saved:
  • Active rules
  • Encounter tracking
  • Victory/defeat records
  • Challenge-specific data (Monotype type, Randomizer seed, etc.)
### Hall of Fame Tracking
The plugin tracks all challenge attempts:
  • Records victories and defeats
  • Stores which rules were active
  • Accessible via script commands
---
## Challenge Rules
### Available Rules
#### 1. Permafaint (PERMAFAINT)
Description: Once a Pokemon faints, it cannot be revived until the challenge ends.
Effects:
  • Fainted Pokemon are marked with perma_faint flag
  • Cannot be used in battle or healed
  • Party menu shows them as permanently fainted
Usage:
Ruby:
Expand Collapse Copy
if ChallengeModes.on?(:PERMAFAINT)
  pbMessage("Your Pokemon has permanently fainted!")
end
---
#### 2. One Capture per Map (ONE_CAPTURE)
Description: Only the first Pokemon encountered on each map can be caught.
Effects:
  • Tracks first encounter per map area
  • Blocks catching additional Pokemon on the same map
  • Split maps (connected areas) share encounter slots
Whitelist: Certain Pokemon can be excluded via ONE_CAPTURE_WHITELIST
Configuration:
Ruby:
Expand Collapse Copy
# In 000_Config.rb
ONE_CAPTURE_WHITELIST = [
  :DIALGA, :PALKIA, :GIRATINA, :ARCEUS
]
SPLIT_MAPS_FOR_ENCOUNTERS = [
  [44, 45],       # These maps share an encounter slot
  [49, 50, 51]    # These maps share an encounter slot
]
---
#### 3. Shiny Clause (SHINY_CLAUSE)
Description: Shiny Pokemon are exempt from the "One Capture per Map" rule.
Effects:
  • Shiny encounters don't count as "first encounter"
  • Can catch shinies even if you already caught on that map
  • Only works when ONE_CAPTURE is also active
---
#### 4. Dupes Clause (DUPS_CLAUSE)
Description: Pokemon from evolution lines you already own don't count as encounters.
Effects:
  • Checks entire evolution family
  • Prevents catching duplicate lines
  • Only works when ONE_CAPTURE is also active
Example: If you own Charmander, encountering Charmeleon doesn't count as your first encounter.
---
#### 5. Gift Clause (GIFT_CLAUSE)
Description: Gifted Pokemon or eggs don't count as encounters.
Effects:
  • Gift Pokemon don't consume encounter slots
  • Eggs don't count as encounters
  • Only works when ONE_CAPTURE is also active
---
#### 6. Monotype Challenge (MONOTYPE_MODE)
Description: You can only use Pokemon of a single type.
Type Selection:
At challenge start, you'll choose from:
  • Normal, Fire, Water, Electric, Grass, Ice
  • Fighting, Poison, Ground, Flying, Psychic
  • Bug, Rock, Ghost, Dragon, Dark, Steel, Fairy
Effects:
  • Cannot catch Pokemon without your chosen type
  • Cannot use Pokemon in battle without your chosen type
  • Blocks receiving gift Pokemon that don't match
  • Dual-type Pokemon must have your type as primary OR secondary
Storage:
Ruby:
Expand Collapse Copy
# Access chosen type
$PokemonGlobal.challenge_monotype_type
# Returns :FIRE, :WATER, etc.
---
#### 7. Randomizer Mode (RANDOMIZER_MODE)
Description: Wild Pokemon, trainer Pokemon, and gifts are randomized.
Settings:
Ruby:
Expand Collapse Copy
RANDOMIZER_SETTINGS = {
  :wild_pokemon => true,      # Randomize wild encounters
  :trainer_pokemon => true,   # Randomize trainer Pokemon
  :starter_pokemon => true,   # Randomize starters
  :gift_pokemon => true,      # Randomize gifts
  :legendary_separate => true,# Keep legendaries separate
  :similar_strength => true   # Match BST within ±100
}
How it Works:
  • Seed-based randomization for consistency
  • Same species always randomizes to same replacement
  • Similar strength matching for balance
  • Legendary Pokemon stay as legendaries (if enabled)
Early Activation:
Ruby:
Expand Collapse Copy
# For starter randomization, call before starter selection
ChallengeModes.begin_randomizer_early
---
#### 8. Forced Nicknames (FORCE_NICKNAME)
Description: Any Pokemon caught or obtained must be nicknamed.
Effects:
  • Sets $PokemonSystem.givenicknames = 0 (always ask)
  • Cannot skip nickname prompt
---
#### 9. Forced Set Battle Style (FORCE_SET_BATTLES)
Description: No switch prompt after fainting opponent's Pokemon.
Effects:
  • Sets $PokemonSystem.battlestyle = 1 (Set mode)
  • Increases difficulty significantly
---
#### 10. No Items in Trainer Battles (NO_TRAINER_BATTLE_ITEMS)
Description: Item usage disabled in trainer battles.
Effects:
  • Cannot use items from bag during trainer battles
  • Held items still work normally
---
#### 11. No White-out (GAME_OVER_WHITEOUT)
Description: If all party Pokemon faint, you lose the challenge immediately.
Effects:
  • Instant challenge failure on party wipe
  • Should call ChallengeModes.set_loss(true)
Implementation:
Ruby:
Expand Collapse Copy
# In your white-out event
if ChallengeModes.on?(:GAME_OVER_WHITEOUT)
  ChallengeModes.set_loss(true)
  pbMessage("Your challenge has ended...")
  # Game over sequence
else
  # Normal white-out handling
end
---
#### 12. Level Cap (LEVEL_CAP)
Description: Pokemon cannot exceed certain level caps.
Requires: Level Caps EX plugin
Three Modes:
1. Hard Cap (Mode 1) - Cannot gain EXP past cap
2. EXP Cap (Mode 2) - Reduced EXP (1/10th) past cap
3. Obedience Cap (Mode 3) - Pokemon disobey past cap
Mode Selection:
Player chooses mode when challenge starts (if LEVEL_CAP rule is active)
Variables:
Ruby:
Expand Collapse Copy
# Variable 198 = Current level cap
# Variable 199 = Level cap mode (1-3)
# Switch 200 = Bypass for enemy trainers
Usage:
Ruby:
Expand Collapse Copy
# Set level cap
$game_variables[198] = 20
# Update level cap with message
ChallengeModes.update_level_cap(25)
# Check current cap
LevelCapsEX.level_cap  # Returns current cap value
Example Progression:
Ruby:
Expand Collapse Copy
# After 1st Gym
ChallengeModes.update_level_cap(15)
# After 2nd Gym
ChallengeModes.update_level_cap(20)
# After 3rd Gym
ChallengeModes.update_level_cap(25)
---
#### 13. Hardcore Mode (HARDCORE_MODE)
Description: All Pokemon have perfect IVs (31) and EVs are completely disabled.
Effects:
  • All Pokemon: 31 IVs in all stats
  • EVs locked at 0 (cannot be gained)
  • Applies to wild, gift, and trainer Pokemon
  • Creates balanced competitive environment
Blocked Items:
  • Vitamins: HP Up, Protein, Iron, Calcium, Zinc, Carbos
  • Wings: Health Wing, Muscle Wing, Resist Wing, etc.
  • Feathers: Health Feather, Muscle Feather, etc.
  • Power Items: Power Weight, Power Bracer, Power Belt, etc.
  • Macho Brace
  • EV-reducing Berries: Pomeg, Kelpsy, Qualot, etc.
Features:
  • Automatic application to all new Pokemon
  • Trainer Pokemon also get 31 IVs, 0 EVs
  • Fair competitive battles
---
#### 14. Trainer Scaling (TRAINER_SCALING)
Description: All trainers receive significant difficulty boosts including level increases, better items, improved stats, and additional Pokemon.
Effects:
  • +2 Level Boost - All trainer Pokemon are 2 levels higher (configurable)
  • 40% Extra Pokemon - Trainers have a chance to add an extra Pokemon (if < 6)
  • 30% Evolution Chance - Pokemon may evolve to their next form
  • Better Items - Trainer items upgraded (Potion → Super Potion → Hyper Potion → Full Restore)
  • Improved IVs - All trainer Pokemon get 25 IVs instead of random
  • Held Items - Pokemon receive type-appropriate held items (Charcoal, Mystic Water, etc.)
Configuration:
Ruby:
Expand Collapse Copy
# In 013_Trainer_Scaling.rb
TRAINER_SCALING = {
  :level_boost => 2,              # Levels to add
  :extra_pokemon_chance => 40,    # % chance for extra Pokemon
  :evolution_upgrade_chance => 30,# % chance to evolve
  :better_items => true,
  :improved_ivs => true,
  :held_items => true
}
Example:
Code:
Expand Collapse Copy
Normal Mode:
  Lass Marie
    Poliwag Lv.4
With TRAINER_SCALING:
  Lass Marie
    Poliwag Lv.6 @ Mystic Water
    IVs: 25/25/25/25/25/25
    40% chance: Goldeen Lv.5 @ Mystic Water
Note: This rule must be selected during challenge setup. It does NOT activate automatically with other challenge modes.
---
#### 15. No Pokémon Centers (NO_POKEMON_CENTER)
Description: All Pokémon Center healing is completely blocked.
Effects:
  • Cannot heal at Pokémon Centers
  • Blocks pbPokeCenterPC function
  • Shows rejection message when attempted
  • Forces alternative healing methods (Potions, Berries, etc.)
Usage:
Ruby:
Expand Collapse Copy
# Check if rule is active
if ChallengeModes.no_pokemon_center?
  pbMessage("Find another way to heal!")
end
Workarounds:
  • Use healing items (Potions, Full Heals, etc.)
  • Use healing moves (Softboiled, Heal Pulse, etc.)
  • Rest at home (if implemented in your game)
---
#### 16. No Legendaries (NO_LEGENDARIES)
Description: Legendary and Mythical Pokémon cannot be caught or used in battle.
Effects:
  • Cannot catch Legendary/Mythical Pokémon
  • Blocks Poké Ball usage on legendaries
  • Removes legendaries from party if somehow obtained
  • Checks Legendary and Mythical flags
Detection:
Ruby:
Expand Collapse Copy
# Check if Pokémon is legendary
ChallengeModes.is_legendary?(pokemon)
# Returns true for Legendary or Mythical flagged Pokémon
Affected Pokémon (Examples):
  • Articuno, Zapdos, Moltres
  • Mewtwo, Mew
  • Lugia, Ho-Oh
  • Groudon, Kyogre, Rayquaza
  • Dialga, Palkia, Giratina, Arceus
  • All other Legendary/Mythical Pokémon
Note: Legendary encounters can still occur, but catching attempts will fail with a message.
---
#### 17. Limited Healing (LIMITED_HEALING)
Description: Pokémon Center visits are limited to 3 per town/area.
Effects:
  • Tracks healing counter per map ID
  • Maximum 3 heals per area (configurable)
  • Shows remaining heals after each visit
  • Counter persists until challenge reset
Configuration:
Ruby:
Expand Collapse Copy
# In 000_Config.rb
LIMITED_HEALING_COUNT = 3  # Max heals per area
Counter Tracking:
Ruby:
Expand Collapse Copy
# Get healing count for current map
ChallengeModes.get_healing_count
# Returns: 0, 1, 2, or 3
# Get remaining heals
ChallengeModes.remaining_heals
# Returns: 3, 2, 1, or 0
# Check if healing allowed
ChallengeModes.can_heal_on_map?
# Returns: true or false
Script Command:
Ruby:
Expand Collapse Copy
# Check healing status for current map
pbCheckHealingStatus
# Shows: "Healing visits in Pewter City: 2 used, 1 remaining"
Example Messages:
Code:
Expand Collapse Copy
"You have 2 healing visits left in Pewter City."
"This was your last healing visit in Pewter City!"
"You've already used your 3 healing visits in Pewter City."
Note: Each town/city has its own counter. Moving to a new area resets the available heals.
---
#### 18. Species Clause (SPECIES_CLAUSE)
Description: Only one Pokémon of each species is allowed in your party at a time.
Effects:
  • Blocks catching duplicate species
  • Sends duplicates to PC automatically
  • Checks base species (ignores forms)
  • Works during catches and gift Pokémon
Species Detection:
Ruby:
Expand Collapse Copy
# Check if species already in party
ChallengeModes.species_in_party?(:PIKACHU)
# Returns: true or false
# Get current party species
ChallengeModes.get_party_species
# Returns: [:PIKACHU, :CHARMANDER, :BULBASAUR]
Script Command:
Ruby:
Expand Collapse Copy
# View current party species
pbCheckPartySpecies
# Shows: "Party Species: 1. Pikachu, 2. Charmander, 3. Bulbasaur"
Example:
Code:
Expand Collapse Copy
You already have a Pikachu in your party!
Species Clause: Only one of each species allowed!
Pikachu was sent to the PC.
Form Handling:
  • Alolan Raichu and regular Raichu = SAME species (blocked)
  • Mega evolutions count as same species
  • Regional forms count as same species
---
#### 19. Item Restrictions (ITEM_RESTRICTIONS)
Description: X-Items are banned, and Revives/Full Restores are limited per battle.
Banned Items:
  • X Attack, X Defense, X Special, X Speed, X Accuracy
  • X Sp. Atk, X Sp. Def
  • Dire Hit, Guard Spec.
Limited Items (3 per battle):
  • Revive (3 uses)
  • Max Revive (3 uses)
  • Full Restore (3 uses)
Configuration:
Ruby:
Expand Collapse Copy
# In 000_Config.rb
ITEM_RESTRICTIONS_CONFIG = {
  :banned_items => [
    :XATTACK, :XDEFEND, :XSPATK, :XSPDEF,
    :XSPEED, :XACCURACY, :DIREHIT, :GUARDSPEC
  ],
  :limited_items => [
    :REVIVE, :MAXREVIVE, :FULLRESTORE
  ],
  :item_limits => {
    :REVIVE       => 3,
    :MAXREVIVE    => 3,
    :FULLRESTORE  => 3
  }
}
Item Usage Tracking:
Ruby:
Expand Collapse Copy
# Check if item can be used
ChallengeModes.can_use_item?(:REVIVE)
# Returns: true or false
# Get remaining uses
ChallengeModes.remaining_uses(:REVIVE)
# Returns: 3, 2, 1, or 0
# Get current usage
ChallengeModes.get_item_usage(:REVIVE)
# Returns: 0, 1, 2, or 3
Script Command:
Ruby:
Expand Collapse Copy
# Check item usage for current battle
pbCheckItemUsage
# Shows: "Revive: 2/3, Full Restore: 1/3"
Example Messages:
Code:
Expand Collapse Copy
"X Attack is banned in Challenge Mode!"
"You've already used Revive this battle! Limit: 3 per battle"
"(2 Revive remaining this battle)"
"(That was your last Full Restore for this battle)"
Note: Item counter resets at the start of each battle. Healing items like Potions are NOT affected.
---
## Script Commands
### Basic Commands
#### Start Challenge Selection
Ruby:
Expand Collapse Copy
ChallengeModes.start
Opens the rule selection interface for the player.
#### Begin Challenge
Ruby:
Expand Collapse Copy
ChallengeModes.begin_challenge
Activates the challenge with selected rules. Usually called automatically after first Pokeball.
#### Check if Challenge Active
Ruby:
Expand Collapse Copy
ChallengeModes.on?
# Returns true if any challenge is active
ChallengeModes.on?(:PERMAFAINT)
# Returns true if specific rule is active
ChallengeModes.running?
# Returns true if challenge has been started
#### Get Active Rules
Ruby:
Expand Collapse Copy
ChallengeModes.rules
# Returns array of active rule symbols
# Example: [:PERMAFAINT, :ONE_CAPTURE, :LEVEL_CAP]
#### Reset Challenge
Ruby:
Expand Collapse Copy
ChallengeModes.reset
Clears all challenge data and stops the challenge. Resets Level Cap variables if active.
---
### Victory/Defeat Tracking
#### Record Victory
Ruby:
Expand Collapse Copy
ChallengeModes.set_victory(should_reset = false)
Records a challenge victory in the Hall of Fame.
Parameters:
- should_reset: If true, also resets challenge after recording
Example:
Ruby:
Expand Collapse Copy
# After defeating Elite Four
if ChallengeModes.on?
  ChallengeModes.set_victory(false)  # Record but don't reset
  pbMessage("You've completed the challenge!")
  # Show victory sequence
  ChallengeModes.reset  # Reset when ready
end
#### Record Defeat
Ruby:
Expand Collapse Copy
ChallengeModes.set_loss(should_reset = true)
Records a challenge defeat.
Example:
Ruby:
Expand Collapse Copy
# On white-out with GAME_OVER_WHITEOUT
if ChallengeModes.on?(:GAME_OVER_WHITEOUT)
  ChallengeModes.set_loss(true)
  pbMessage("Your challenge has ended...")
end
#### Check Victory/Defeat
Ruby:
Expand Collapse Copy
ChallengeModes.won?
# Returns true if player won any challenge
ChallengeModes.won?(hall_no)
# Check specific Hall of Fame entry
ChallengeModes.lost?
# Returns true if player lost any challenge
ChallengeModes.lost?(hall_no)
# Check specific loss record
---
### Forced Rules Mode
#### Enable Forced Rules
Ruby:
Expand Collapse Copy
ChallengeModes.use_forced_rules(true)
When enabled, skips rule selection and uses pre-defined rules.
#### Set Forced Rules
Ruby:
Expand Collapse Copy
ChallengeModes.set_forced_rules(rules_array)
Example:
Ruby:
Expand Collapse Copy
# Force specific rules for story mode
ChallengeModes.use_forced_rules(true)
ChallengeModes.set_forced_rules([
  :PERMAFAINT,
  :ONE_CAPTURE,
  :FORCE_SET_BATTLES,
  :LEVEL_CAP
])
ChallengeModes.start
# Don't forget to disable after
ChallengeModes.use_forced_rules(false)
---
### Level Cap Commands
#### Update Level Cap
Ruby:
Expand Collapse Copy
ChallengeModes.update_level_cap(new_cap)
Increases the level cap and shows a message.
Example:
Ruby:
Expand Collapse Copy
# After gym leader defeat
ChallengeModes.update_level_cap(20)
# Shows: "The level cap has been raised to 20!"
#### Direct Variable Access
Ruby:
Expand Collapse Copy
# Set cap directly
$game_variables[198] = 25
# Set mode directly
$game_variables[199] = 1  # 1=Hard, 2=EXP, 3=Obedience
# Toggle trainer bypass
$game_switches[200] = true  # Trainers ignore cap
---
### Randomizer Commands
#### Early Randomizer Activation
Ruby:
Expand Collapse Copy
ChallengeModes.begin_randomizer_early
Call BEFORE starter selection to randomize starters.
Example:
Ruby:
Expand Collapse Copy
# In starter selection event
if ChallengeModes.on?(:RANDOMIZER_MODE)
  ChallengeModes.begin_randomizer_early
end
# Then continue with normal starter selection
---
## Configuration
### File: 000_Config.rb
#### One Capture Whitelist
Ruby:
Expand Collapse Copy
ONE_CAPTURE_WHITELIST = [
  :DIALGA, :PALKIA, :GIRATINA, :ARCEUS
]
Pokemon in this list ignore the One Capture rule.
#### Split Maps
Ruby:
Expand Collapse Copy
SPLIT_MAPS_FOR_ENCOUNTERS = [
  [44, 45],
  [49, 50, 51]
]
Maps in the same array share encounter slots.
#### Monotype Types
Ruby:
Expand Collapse Copy
MONOTYPE_TYPES = [
  :NORMAL, :FIRE, :WATER, :ELECTRIC, :GRASS, :ICE,
  :FIGHTING, :POISON, :GROUND, :FLYING, :PSYCHIC,
  :BUG, :ROCK, :GHOST, :DRAGON, :DARK, :STEEL, :FAIRY
]
Available types for Monotype mode.
#### Randomizer Settings
Ruby:
Expand Collapse Copy
RANDOMIZER_SETTINGS = {
  :wild_pokemon => true,
  :trainer_pokemon => true,
  :starter_pokemon => true,
  :gift_pokemon => true,
  :legendary_separate => true,
  :similar_strength => true
}
---
### File: 013_Trainer_Scaling.rb
#### Trainer Scaling Configuration
Ruby:
Expand Collapse Copy
TRAINER_SCALING = {
  :level_boost => 2,              # Add 2 levels to all trainer Pokemon
  :extra_pokemon_chance => 40,    # 40% chance for extra Pokemon
  :evolution_upgrade_chance => 30,# 30% chance to evolve Pokemon
  :better_items => true,           # Upgrade trainer items
  :improved_ivs => true,           # Set IVs to 25
  :held_items => true              # Add type-based held items
}
Trainer Scaling activates automatically when ANY challenge mode is running.
---
## Integration Features
### Trainer Scaling System
IMPORTANT: Trainer Scaling is now a SELECTABLE RULE. It must be enabled during challenge setup to take effect.
When the TRAINER_SCALING rule is active, all trainer battles are automatically scaled:
Level Boost:
- All trainer Pokemon receive +2 levels (configurable)
Extra Pokemon:
- 40% chance trainers get an extra Pokemon (if < 6)
Evolution Upgrade:
- 30% chance Pokemon evolve to next form
Better Items:
  • Potion → Super Potion
  • Super Potion → Hyper Potion
  • Hyper Potion → Full Restore
  • Revive → Max Revive
Improved Stats:
  • IVs increased to 25
  • Type-appropriate held items added
How to Enable:
Select "Trainer Scaling" during challenge mode setup, or use:
Ruby:
Expand Collapse Copy
# Include :TRAINER_SCALING in your rules
ChallengeModes.use_forced_rules(true)
ChallengeModes.set_forced_rules([
  :PERMAFAINT,
  :ONE_CAPTURE,
  :TRAINER_SCALING  # Enable trainer scaling
])
ChallengeModes.start
Example:
Code:
Expand Collapse Copy
Without TRAINER_SCALING:
  Lass Marie
    Poliwag Lv.4
With TRAINER_SCALING:
  Lass Marie
    Poliwag Lv.6 @ Mystic Water
    IVs: 25/25/25/25/25/25
    40% chance: Goldeen Lv.5 @ Mystic Water
---
### Advanced AI Integration
If the Advanced AI System plugin is installed:
Automatic Activation:
  • AI enhances when challenge modes are ON
  • Or when trainer skill level ≥ 48
AI Features:
  • Intelligent move selection
  • Strategic switching
  • Type advantage calculations
  • Status move evaluation
  • Weather awareness
  • Hazard management
Configuration:
Ruby:
Expand Collapse Copy
# In Advanced AI System/[001] Settings.rb
ACTIVATE_WITH_CHALLENGE_MODES = true
MIN_SKILL_FOR_AUTO_ACTIVATION = 48
---
### Level Caps EX Integration
Full integration with Level Caps EX plugin:
Automatic Setup:
  • Level cap variables configured on challenge start
  • Player chooses cap mode (Hard/EXP/Obedience)
  • Automatic reset on challenge end
Variables:
  • 198: Current level cap
  • 199: Level cap mode (1-3)
  • Switch 200: Trainer bypass
Helper Methods:
Ruby:
Expand Collapse Copy
# Update cap with message
ChallengeModes.update_level_cap(25)
# Check current cap
LevelCapsEX.level_cap
# Check if hard cap active
LevelCapsEX.hard_cap?
---
## Event Integration
### Starting a Challenge
#### Method 1: Simple Start
Ruby:
Expand Collapse Copy
# In an event at game start
ChallengeModes.start
#### Method 2: Forced Rules
Ruby:
Expand Collapse Copy
# Force specific rules
ChallengeModes.use_forced_rules(true)
ChallengeModes.set_forced_rules([
  :PERMAFAINT,
  :ONE_CAPTURE,
  :LEVEL_CAP
])
ChallengeModes.start
ChallengeModes.use_forced_rules(false)
---
### Level Cap Progression
Ruby:
Expand Collapse Copy
# Conditional Branch: Script
# After Gym Leader 1 defeat
if ChallengeModes.on?(:LEVEL_CAP)
  ChallengeModes.update_level_cap(15)
end
# After Gym Leader 2
if ChallengeModes.on?(:LEVEL_CAP)
  ChallengeModes.update_level_cap(20)
end
# After Gym Leader 3
if ChallengeModes.on?(:LEVEL_CAP)
  ChallengeModes.update_level_cap(25)
end
# And so on...
---
### White-out Handling
Ruby:
Expand Collapse Copy
# In white-out event
# Conditional Branch: Script
if ChallengeModes.on?(:GAME_OVER_WHITEOUT)
  # Challenge mode game over
  ChallengeModes.set_loss(true)
  pbMessage("Your challenge has ended in defeat...")
  # Show game over screen
  # Return to title screen or load last save
else
  # Normal white-out
  # Heal party, return to Pokemon Center, etc.
end
---
### Hall of Fame
Ruby:
Expand Collapse Copy
# After defeating Champion
# Conditional Branch: Script
if ChallengeModes.on?
  ChallengeModes.set_victory(false)
  num_rules = ChallengeModes.rules.length
  pbMessage("Incredible! You completed a #{num_rules}-rule challenge!")
  pbMessage("Your victory will be recorded in history!")
  # Show credits/victory sequence
  ChallengeModes.reset
else
  # Normal Hall of Fame
  pbMessage("Welcome to the Hall of Fame!")
end
---
### Conditional Dialogue
Ruby:
Expand Collapse Copy
# Different dialogue for challenge players
# Conditional Branch: Script
if ChallengeModes.on?
  pbMessage("Taking on a challenge? You're brave!")
  if ChallengeModes.on?(:PERMAFAINT)
    pbMessage("Be careful - you can't revive fainted Pokemon!")
  end
else
  pbMessage("Welcome, trainer!")
end
---
### Starter Selection
Ruby:
Expand Collapse Copy
# For Randomizer mode
# BEFORE showing starters
if ChallengeModes.on?(:RANDOMIZER_MODE)
  ChallengeModes.begin_randomizer_early
end
# Then continue with normal starter selection
# The starters will be randomized automatically
---
## Advanced Usage
### Custom Rule Combinations
Ruby:
Expand Collapse Copy
# Check multiple rules
if ChallengeModes.on?(:PERMAFAINT) && ChallengeModes.on?(:LEVEL_CAP)
  pbMessage("Hardcore mode: Permafaint + Level Cap!")
end
# Check rule count
rule_count = ChallengeModes.rules.length
if rule_count >= 5
  pbMessage("You're playing with #{rule_count} rules! Impressive!")
end
---
### Dynamic Rule Display
Ruby:
Expand Collapse Copy
# Show active rules to player
if ChallengeModes.on?
  rules = ChallengeModes.rules
  rule_names = rules.map { |r| ChallengeModes::RULES[r][:name] }
  message = "Active Rules:\n" + rule_names.join("\n")
  pbMessage(message)
end
---
### Save/Load Compatibility
Challenge data is stored in $PokemonGlobal:
  • challenge_started: Boolean
  • challenge_rules: Array of symbols
  • challenge_encs: Hash of encounter data
  • challenge_monotype_type: Symbol (e.g., :FIRE)
  • challenge_randomizer_seed: Integer
  • challenge_randomizer_map: Hash
  • challenge_state: Hash of victory/defeat records
All data saves automatically with the game.
---
### Permafaint Pokemon Management
Ruby:
Expand Collapse Copy
# Check if Pokemon is perma-fainted
if pkmn.perma_faint
  pbMessage("#{pkmn.name} has permanently fainted!")
end
# Manually set (not recommended)
pkmn.perma_faint = true
# Clear permafaint (on challenge reset)
pbEachPokemon do |pkmn, _|
  pkmn.perma_faint = false if pkmn.respond_to?(:perma_faint)
end
---
### Encounter Tracking
Ruby:
Expand Collapse Copy
# Check if encounter used on current map
map_id = $game_map.map_id
if $PokemonGlobal.challenge_encs[map_id]
  pbMessage("You already caught a Pokemon here!")
end
# Manually set encounter (not recommended)
$PokemonGlobal.challenge_encs[map_id] = true
---
### Monotype Type Checking
Ruby:
Expand Collapse Copy
# Get chosen type
monotype = $PokemonGlobal.challenge_monotype_type
# Check if Pokemon valid
pkmn = $player.party[0]
if ChallengeModes.on?(:MONOTYPE_MODE)
  if pkmn.hasType?(monotype)
    pbMessage("#{pkmn.name} is valid for Monotype!")
  else
    pbMessage("#{pkmn.name} doesn't match your type!")
  end
end
---
## Troubleshooting
### Common Issues
#### Rules Not Applying
Problem: Challenge rules don't seem to be working
Solutions:
1. Verify challenge started: p ChallengeModes.running?
2. Check rules array: p ChallengeModes.rules
3. Ensure begin_challenge was called
4. Verify player has Pokeballs
Ruby:
Expand Collapse Copy
# Debug check
if ChallengeModes.running?
  pbMessage("Challenge is running")
  pbMessage("Rules: #{ChallengeModes.rules.inspect}")
else
  pbMessage("Challenge not started")
end
---
#### Level Cap Not Working
Problem: Pokemon still gain EXP past cap
Solutions:
1. Check Level Caps EX plugin is installed
2. Verify variables set: p [imath]game_variables[198] (cap) and p[/imath]game_variables[199] (mode)
3. Check bypass switch: p $game_switches[200]
4. Ensure mode is 1, 2, or 3
Ruby:
Expand Collapse Copy
# Debug level cap
pbMessage("Cap: #{$game_variables[198]}")
pbMessage("Mode: #{$game_variables[199]}")
pbMessage("Bypass: #{$game_switches[200]}")
---
#### Trainer Scaling Not Active
Problem: Trainers aren't scaled
Solutions:
1. Verify any challenge mode is active
2. Check console for scaling messages
3. Review TRAINER_SCALING configuration
Ruby:
Expand Collapse Copy
# Check in battle
if ChallengeModes.running?
  pbMessage("Scaling should be active")
else
  pbMessage("No challenge - no scaling")
end
---
#### Randomizer Inconsistent
Problem: Same Pokemon randomizes differently
Solutions:
1. Seed may have changed - check $PokemonGlobal.challenge_randomizer_seed
2. Clear randomizer map to reset: $PokemonGlobal.challenge_randomizer_map = {}
3. Ensure consistent game state
Ruby:
Expand Collapse Copy
# View randomizer state
pbMessage("Seed: #{$PokemonGlobal.challenge_randomizer_seed}")
pbMessage("Map size: #{$PokemonGlobal.challenge_randomizer_map.size}")
---
### Debug Commands
#### View Challenge State
Ruby:
Expand Collapse Copy
# In an event or console
p "Started: #{$PokemonGlobal.challenge_started}"
p "Rules: #{$PokemonGlobal.challenge_rules}"
p "Encounters: #{$PokemonGlobal.challenge_encs}"
p "Monotype: #{$PokemonGlobal.challenge_monotype_type}"
p "Seed: #{$PokemonGlobal.challenge_randomizer_seed}"
#### Force Rules (Testing)
Ruby:
Expand Collapse Copy
# Manually set rules for testing
$PokemonGlobal.challenge_rules = [:PERMAFAINT, :ONE_CAPTURE]
$PokemonGlobal.challenge_started = true
ChallengeModes.toggle(true)
#### Reset Everything
Ruby:
Expand Collapse Copy
# Nuclear option - clear all challenge data
$PokemonGlobal.challenge_started = nil
$PokemonGlobal.challenge_rules = nil
$PokemonGlobal.challenge_encs = nil
$PokemonGlobal.challenge_monotype_type = nil
$PokemonGlobal.challenge_randomizer_seed = nil
$PokemonGlobal.challenge_randomizer_map = nil
ChallengeModes.toggle(false)
---
## FAQ
### Q: Can I add custom rules?
A: Yes! Add new rules to RULES hash in 000_Config.rb and implement the logic in appropriate files.
### Q: Are save files compatible between versions?
A: Yes, save files from Nuzlocke EX are compatible. New features activate automatically.
### Q: Can I change rules mid-challenge?
A: Not recommended. Rules are locked at challenge start. Changing them may cause issues.
### Q: Does this work with other plugins?
A: Generally yes. Tested with Level Caps EX, Advanced AI, and Voltseon's Pause Menu.
### Q: Can I disable trainer scaling?
A: Yes, set all values in TRAINER_SCALING to false or 0.
### Q: What happens if Level Caps EX isn't installed?
A: Level Cap rule will be available but won't function. Other rules work normally.
### Q: Can I use this for a story-enforced challenge?
A: Yes! Use use_forced_rules(true) and set_forced_rules() to force specific rules.
### Q: How do I translate this plugin?
A: All text uses _INTL() for translation. Edit your language files in PBS/Text/.
Credits
Nononever
  • Like
Reactions: Younam and A.I.R
Author
NoNoNever
Downloads
1,458
Views
6,558
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from NoNoNever

Latest updates

  1. Version 2.1 - Major Update

    # Challenge Modes - Changelog ## Version 2.1 - Major Update (November 2025) ### New Challenge...
  2. Randomizer Fix - Hardcore Nuzlocke

    New Features Hardcore Mode All Pokémon (wild, gift, trainer, starter) have perfect IVs (31 in...
  3. Raid Battles compability

    Added support for Raid Battles compability (storage)
Back
Top