The way I want to do this is after turning on a switch, the enemies in a specific map get switched to a different one, don't know how to do this though.
How do I make a tiered enemy system?
RPG Maker VXAce SupportGonna need a bit more info than that, champ.
by default the random encounter list is static and can't be changed ingame.
however Tsukihime wrote a script that allows you to add different enemies to the encounter table during play. it is a bit more complex than with a switch, but it is the only way I know of.
www.himeworks.com
however Tsukihime wrote a script that allows you to add different enemies to the encounter table during play. it is a bit more complex than with a switch, but it is the only way I know of.
www.himeworks.com
are the enemies events on the map or listed in the random encounter list on the map settings?
For the events that would be easy.
for the map settings that would require a script to modify the list, and that has never been made as far as I know.
Follow up questions
Is this for only one map?
You will be using only one switch?
I'm working on the logic and if a variable was used then you could have several enemy tiers.
If a variable is used then a switch is not needed.
First try seems to work ok
Ruby:
# ╔═══════════════════════════════════════════════╦════════════════════╗
# ║ Title: Change Map Encounter List ║ Version: 1.00 ║
# ║ Author: Roninator2 ║ ║
# ╠═══════════════════════════════════════════════╬════════════════════╣
# ║ Function: ║ Date Created ║
# ║ ╠════════════════════╣
# ║ Use variable to change encounters ║ 01 Dec 2024 ║
# ╚═══════════════════════════════════════════════╩════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Requires: nil ║
# ║ ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Brief Description: ║
# ║ Set variable to swap encounter list ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Instructions: ║
# ║ Set the value in the variable ║
# ║ 0 = troop list 0, 1 = troop list 1, etc ║
# ║ Set variable by note tag on map note box ║
# ║ <var: 3> ║
# ║ ║
# ║ Use note tags to distinguich which group of enemies to ║
# ║ have as the encounter list. ║
# ║ <enc tier 0: 1-15> ║
# ║ <enc tier 1: 16-30> ║
# ║ Note tag goes in map note box ║
# ║ <enc tier 1: 16 - 30> ║
# ║ <enc tier variable value: numberical first enemy - last enemy ║
# ║ ║
# ║ So if you have 30 enemies listed in the encounter box ║
# ║ they would be checked in order. The top one is 1, ║
# ║ the bottom one is 30 ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Updates: ║
# ║ 1.00 - 01 Dec 2024 - Script finished ║
# ║ ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Credits and Thanks: ║
# ║ Roninator2 ║
# ║ ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Terms of use: ║
# ║ Follow the original Authors terms of use where applicable ║
# ║ - When not made by me (Roninator2) ║
# ║ Free for all uses in RPG Maker except nudity ║
# ║ Anyone using this script in their project before these terms ║
# ║ were changed are allowed to use this script even if it conflicts ║
# ║ with these new terms. New terms effective 03 Apr 2024 ║
# ║ No part of this code can be used with AI programs or tools ║
# ║ Credit must be given ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ End of editable region ║
# ╚════════════════════════════════════════════════════════════════════╝
module R2_Swap_Map_Encounters
# regex to look at map settings
ECN_SWAP = /<enc(?:|[ -_])tier(?:|[ -_])(\d+):(?:|[ -_])(\d+)(?:|[ -_])(\d+)>/i
ECN_VAR = /<var(?:|[ -_]):(?:|[ -_])(\d+)>/i
end
class Game_Map
#--------------------------------------------------------------------------
# * Get Encounter List
#--------------------------------------------------------------------------
def encounter_list
encounter_var = 0
encounter_swap = {}
@map.note.split(/[\r\n]+/).each { |line|
case line
when R2_Swap_Map_Encounters::ECN_VAR
encounter_var = $1.to_i
end
}
if encounter_var >= 1
@map.note.split(/[\r\n]+/).each { |line|
case line
when R2_Swap_Map_Encounters::ECN_SWAP
encounter_swap[$1.to_i] = [$2.to_i,$3.to_i]
end
}
if !encounter_swap.empty?
list = []
low = encounter_swap[$game_variables[encounter_var]][0]
high = encounter_swap[$game_variables[encounter_var]][1]
@map.encounter_list.each_with_index do |en,i|
i += 1
if i >= low && i <= high
list.push(en)
end
end
return @map.encounter_list if list.empty?
return list
else
return @map.encounter_list
end
else
return @map.encounter_list
end
end
end
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-a-tiered-enemy-system.173591/