02-18-2026, 03:02 AM (This post was last modified: Yesterday, 04:38 AM by kyonides.
Edit Reason: Update #3
)
ChooseFoes XP
by Kyonides
Introduction
This scriptlet allows you to open a simple menu where you can choose your enemy's troops based on the current map's random enemy encounter list.
It will use the map's battleback picture as its backdrop. Don't worry about this, it will cover the whole RMXP game screen by default.
You are encouraged to set a custom BGM, otherwise the scene will remain silent until you have finished picking a foe.
AVAILABLE MODES
:accessory
:levels
Accessory Mode
By the way, setting a specific "Choose Foe" accessory is mandatory here!
Actors' Level Average Mode
You must set a default level plus any specific map's average level.
Optional Script Call
Code:
$game_party.choose_foes_mode = :your_mode
The Scripts
2 VERSIONS
Version 0.11.0
Code:
# * ChooseFoes XP * #
# Not Exactly a Plug-n-Play Script
# Scripter : Kyonides
# 0.11.0 - 2026-05-05
# This scriptlet allows you to open a simple menu where you can choose your
# enemy's troops based on the current map's random enemy encounter list.
# The new MAP_ID_EXTRA_TROOP hash allows you to set a key-value pair of
# MapID => TroopID to add any given troop found in the Troops DB to that map.
# You can replace the TroopID with a :highest or :lowest or :random symbol.
# Notice: This is entirely optional. Use it only for maps that truly need it.
# - AVAILABLE MODES: :accessory and :levels
# * Accessory Mode * #
# Setting a specific "Choose Foe" accessory is mandatory here!
# * Average Level Mode * #
# You must set a default level plus any specific map's average level.
def update
@command_window.update
if Input.trigger?(Input::B) or Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
@stage = nil
n = @command_window.index
$game_temp.battle_troop_id = @list[n]
@callback.call
end
end
end
end
module Audio
def self.play_anon_bgm(bgm)
if !bgm or bgm.name.empty?
bgm_stop
else
bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch)
end
Graphics.frame_reset
end
end
class Game_Actor
def can_pick_foes?
ChooseFoes::ACCESSORY_ID == @armor4_id and @armor4_id > 0
end
end
class Game_Party
alias :kyon_chs_foes_gm_pty_init :initialize
def initialize
kyon_chs_foes_gm_pty_init
@choose_foes_mode = ChooseFoes::MODE
@defeated_troop_ids = []
end
def choose_foes_with_accessory?
@actors.find {|a| a.can_pick_foes? } != nil
end
def choose_foes?
case @choose_foes_mode
when :accessory
return choose_foes_with_accessory?
when :levels
return choose_foes_level_avg?
end
end
def lowest_troop_id
@defeated_troop_ids.min || 1
end
def highest_troop_id
@defeated_troop_ids.max || 1
end
def random_troop_id
n = rand(@defeated_troop_ids.size)
@defeated_troop_ids[n] || 1
end
attr_accessor :choose_foes_mode
end
class Scene_Map
alias :kyon_chs_foes_scn_mp_cll_btl :call_battle
def call_battle
list = $game_map.encounter_list
if list.size > 1 and $game_party.choose_foes?
cb = method(:kyon_chs_foes_scn_mp_cll_btl)
$scene = ChooseFoes::Scene.new(cb)
else
kyon_chs_foes_scn_mp_cll_btl
end
end
end
Version 0.9.0
Code:
# * ChooseFoes XP * #
# Not Exactly a Plug-n-Play Script
# Scripter : Kyonides
# 0.9.0 - 2026-02-18
# This scriptlet allows you to open a simple menu where you can choose your
# enemy's troops based on the current map's random enemy encounter list.
# - AVAILABLE MODES: :accessory and :levels
# * Accessory Mode * #
# Setting a specific "Choose Foe" accessory is mandatory here!
# * Average Level Mode * #
# You must set a default level plus any specific map's average level.
def update
@command_window.update
if Input.trigger?(Input::B) or Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
@stage = nil
n = @command_window.index
$game_temp.battle_troop_id = @list[n]
@callback.call
end
end
end
end
module Audio
def self.play_anon_bgm(bgm)
if !bgm or bgm.name.empty?
bgm_stop
else
bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch)
end
Graphics.frame_reset
end
end
class Game_Actor
def can_pick_foes?
ChooseFoes::ACCESSORY_ID == @armor4_id and @armor4_id > 0
end
end
class Game_Party
alias :kyon_chs_foes_gm_pty_init :initialize
def initialize
kyon_chs_foes_gm_pty_init
@choose_foes_mode = ChooseFoes::MODE
end
def choose_foes_with_accessory?
@actors.find {|a| a.can_pick_foes? } != nil
end
def choose_foes?
case @choose_foes_mode
when :accessory
return choose_foes_with_accessory?
when :levels
return choose_foes_level_avg?
end
end
attr_accessor :choose_foes_mode
end
class Scene_Map
alias :kyon_chs_foes_scn_mp_cll_btl :call_battle
def call_battle
list = $game_map.encounter_list
if list.size > 1 and $game_party.choose_foes?
cb = method(:kyon_chs_foes_scn_mp_cll_btl)
$scene = ChooseFoes::Scene.new(cb)
else
kyon_chs_foes_scn_mp_cll_btl
end
end
end
Terms & Conditions
Free as in beer.
Include my nickname in your game credits.
You may mention this forum there as well.
That's it!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
02-18-2026, 10:31 AM (This post was last modified: 02-18-2026, 10:36 AM by kyonides.
Edit Reason: Update #1
)
Script Update!
ChooseFoes XP has been upgraded! It has reached the 0.9.0 milestone after getting 2 brand new features and a bug fix.
Feature #1
Now you can choose a trigger mode. The available modes are :accessory and :levels right now.
:levels will retrieve your party's level average and then compare it with the current map's minimum level as set in the MAP_ACTOR_LVL hash.
Feature #2
You can call $game_party.choose_foes_mode = :accessory OR :levels to change the current default mode.
Bug Fix #1
It will now call the Scene_Map's call_battle method if the player cannot choose his or her foes.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
Yesterday, 04:38 AM (This post was last modified: Yesterday, 04:42 AM by kyonides.)
Script Update!
ChooseFoes XP has been upgraded once again, now reaching the 0.11.0 milestone.
New Feature
The MAP_ID_EXTRA_TROOP hash allows you to set an extra troop for a given map.
Like all hashes, it accepts a key-value pair consisting of a MapID and a TroopID or a symbol like :lowest or :highest or :random
That value or symbol will let the script pick one troop ID from the Troops database based on a specific ID or the lowest / highest troop ever defeated so far.