Class: Interpreter
- Inherits:
-
Interpreter_RMXP
- Object
- Interpreter_RMXP
- Interpreter
- Includes:
- Util::SystemMessage
- Defined in:
- scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb,
scripts/00600 Script_RMXP/03100 Game_SelfVariables.rb,
scripts/01450 Systems/99990 Global Systems/01500 HoneyTree.rb,
scripts/00700 PSDK Event Interpreter/01150 Interpreter_Time.rb,
scripts/00700 PSDK Event Interpreter/01301 Interpreter_Shop.rb,
scripts/00700 PSDK Event Interpreter/01205 Interpreter_Fiber.rb,
scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb,
scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb,
scripts/00700 PSDK Event Interpreter/01201 Interpreter_add_item.rb,
scripts/00700 PSDK Event Interpreter/01300 Interpreter_Sequences.rb,
scripts/00700 PSDK Event Interpreter/01102 Interpreter_Move_Reminder.rb,
scripts/00700 PSDK Event Interpreter/01101 Interpreter_Pokemon Internal.rb,
scripts/01450 Systems/09000 Games/00003 Ruine Alpha/00002 Ruine_Alpha_by_FL0RENT_.rb
Overview
Interpreter of the event script commands
Constant Summary collapse
- FEC_SKIP_CODES =
[108, 121, 122]
- MODE_SWOOSH =
If the put item in pocket message is not shown
true
- RECEIVED_POKEMON_ME =
Name of the file used as Received Pokemon ME (with additional parameter like volume)
['audio/me/rosa_yourpokemonevolved', 80]
- SYSTEM_MESSAGE_HEADER =
Header of the system messages
':[windowskin=m_18]:\\c[10]'
- DEFAULT_TRAINER_BGM =
Default BGM used for trainer battle (sent to AudioFile so no audio/bgm)
['xy_trainer_battle', 100, 100]
- DEFAULT_EYE_BGM =
Default eye bgm for trainer encounter (direct, requires audio/bgm)
['audio/bgm/pkmrs-enc1', 100, 100]
- DEFAULT_EXCLAMATION_SE =
Default exclamation SE for trainer encounter (direct, requires audio/se)
['audio/se/015-jump01', 65, 95]
- EXCLAMATION_PARTICLE_DURATION =
Duration of the exclamation particle
54
Constants included from Util::SystemMessage
Util::SystemMessage::HAS_NUMBER_REG, Util::SystemMessage::IS_ITEM, Util::SystemMessage::IS_NUMBER1, Util::SystemMessage::IS_NUMBER2, Util::SystemMessage::IS_NUMBER3, Util::SystemMessage::IS_POKEMON, Util::SystemMessage::MESSAGES
Constants inherited from Interpreter_RMXP
Interpreter_RMXP::COMMAND_TRANSLATION, Interpreter_RMXP::LiteRGSS2RGSS_Input, Interpreter_RMXP::RGSS2LiteRGSS_Input
Instance Attribute Summary
Attributes inherited from Interpreter_RMXP
Instance Method Summary collapse
-
#add_egg(id) ⇒ PFM::Pokemon?
(also: #ajouter_oeuf)
Add an egg to the Party (or in the PC).
-
#add_item(item_id, no_delete = false, text_id: 4, no_space_text_id: 7, color: 11, count: 1)
Add an item to the bag if possible, will delete the event forever.
-
#add_items_to_limited_shop(symbol_of_shop, list_item_id_to_refill = [], list_quantity_to_refill = [])
(also: #ajouter_objets_magasin)
Add items to a limited shop.
-
#add_limited_shop(symbol_of_new_shop, list_of_item_id = [], list_of_item_quantity = [], shop_rewrite: false)
(also: #ajouter_un_magasin_limite)
Create a limited shop (in the main PFM::Shop object).
-
#add_new_pokemon_shop(sym_new_shop, list_id_mon, list_prices, list_param_mon, list_quantity_mon = [], shop_rewrite: false)
(also: #ajouter_nouveau_magasin_pokemon)
Create a limited Pokemon Shop.
-
#add_parallax(image, x, y, z, zoom_x = 1, zoom_y = 1, opacity = 255, blend_type = 0)
Add a parallax.
-
#add_pokemon(pokemon_or_id, level = 5, shiny = false) ⇒ PFM::Pokemon?
(also: #ajouter_pokemon, #ajouter_stocker_pokemon)
Add a pokemon to the party or store it in the PC.
-
#add_pokemon_to_shop(symbol_of_shop, list_id_mon, list_prices, list_param_mon, list_quantity_mon = [], pkm_rewrite: false)
(also: #ajouter_pokemon_au_magasin)
Add Pokemon to a Pokemon Shop.
-
#add_rename_pokemon(pokemon_or_id, level = 5, shiny = false, num_char = 12) ⇒ PFM::Pokemon?
(also: #ajouter_renommer_pokemon)
Add a pokemon to the party or store it in the PC and rename it.
-
#add_specific_pokemon(hash) ⇒ PFM::Pokemon?
(also: #ajouter_pokemon_param)
Add a pokemon (#add_pokemon) with specific informations.
-
#animate_from_charset(lines, duration, reverse: false, repeat: false) ⇒ Boolean
Shortcut for get_character(@event_id).animate_from_charset(*args).
-
#call_battle_wild(id, level, *args)
(also: #demarrer_combat)
Start a wild battle.
-
#call_party_menu(id_var = ::Yuki::Var::Party_Menu_Sel, party = $actors, mode = :map, extend_data = nil)
(also: #appel_menu_equipe)
Show the party menu in order to select a Pokemon.
-
#can_move_reminder_be_called?(mode = 0) ⇒ Boolean
(also: #maitre_capacites_appelable?)
Detect if the move reminder can remind a move to the selected pokemon.
-
#carte_du_monde(arg = :view, wm_id = $env.get_worldmap)
(also: #world_map)
Open the world map.
-
#casino(arg = :voltorb_flip, speed = 2)
Open the casino gameplay.
-
#choice(variable_id, cancel_type, *choices)
Start a choice with more option than RMXP allows.
-
#clear_saved_fog
Clear the saved fog.
-
#cry_pokemon(id)
Play the cry of a Pokemon.
-
#current_time ⇒ Integer
Return the current time in minute.
-
#delete_this_event_forever
Delete the current event forever.
-
#detect_invalid_tile(x, y, width, height, tile_id) ⇒ Boolean
Detect if a specified tile (in layer 3) is in the specified zone.
-
#detect_player(nb_pas, direction) ⇒ Boolean
Detect the player in a specific direction.
-
#detect_player_circle(r) ⇒ Boolean
Detect the player in a circle around the event.
-
#detect_player_rect(nx, ny) ⇒ Boolean
Detect the player in a rectangle around the event.
-
#emotion(type, char_id = 0, wait = 34, params = {})
Show an emotion to an event or the player.
-
#empty_and_save_party(id_storage = nil)
Save the team somewhere and make it empty in the point of view of the player.
-
#event_calling(common_event, event_id) ⇒ Boolean
Check if an event is calling a common event (in its first non comment commands).
-
#fast_travel(x, y = nil, ms = 5)
Shortcut defining the pathfinding request and wait for the end of the path following.
-
#find_path(**kwargs)
Shortcut for get_character(@event_id).find_path(*args).
-
#force_save
(also: #forcer_sauvegarde)
Save the game without asking.
-
#front_event_calling(common_event) ⇒ Boolean
Check if the front event calls a common event (in its first non comment commands).
-
#ge(id = @event_id) ⇒ Game_Event
Return the $game_map.events.
- #get_local_variable(*args) ⇒ Object (also: #VL, #LV)
-
#get_self_switch(self_switch, event_id, map_id = @map_id) ⇒ Boolean
(also: #get_ss)
Get the value of a self_switch.
-
#give_exp(index, amount)
Give a certain amount of exp to one Pokemon.
-
#give_exp_all(amount)
Give a certain amount of exp to every Pokemon in party.
-
#give_item(item_id, count = 1)
Give an item to the player.
-
#give_level(index, amount)
Give a certain amount of level to one Pokemon.
-
#give_level_all(amount)
Give a certain amount of level to every Pokemon in party.
-
#gm ⇒ Game_Map
Return the $game_map.
-
#gp ⇒ Game_Player
Return the $game_player.
-
#gs ⇒ Game_Switches
Return the $game_switches.
-
#gt ⇒ Game_Temp
Return the $game_temp.
-
#gv ⇒ Game_Variables
Return the $game_variables.
-
#hall_of_fame(filename_bgm = 'audio/bgm/Hall-of-Fame', context_of_victory = :league)
Open the Hall of Fame UI.
-
#honey_tree_event(id)
Function calling the honey tree event.
-
#internal_add_pokemon_check_level_shiny(pokemon_id, level, shiny, method_name) ⇒ PFM::Pokemon
Check the input parameters and send the Pokemon to method_name.
-
#internal_add_pokemon_check_symbol(pokemon_or_id, level, shiny, method_name) ⇒ PFM::Pokemon
Check the symbol of the Pokemon and send the Pokemon to method_name.
-
#internal_add_pokemon_final(pokemon) ⇒ PFM::Pokemon
Try to add Pokemon to the party or store the Pokemon in the storage system.
-
#internal_store_pokemon_final(pokemon) ⇒ PFM::Pokemon
Try to add Pokemon to the party or store the Pokemon in the storage system.
-
#message(string, cancel_type = 0, *choices) ⇒ Integer
Show a message with eventually a choice.
-
#mining_game(param = nil, music_filename = GamePlay::MiningGame::DEFAULT_MUSIC, delete_after: true)
Open the Mining Game UI.
-
#mirror_picture(id)
Mirror a RMXP Picture.
-
#move_reminder(pokemon = $actors[$game_variables[::Yuki::Var::Party_Menu_Sel], mode = 0) ⇒ Boolean
(also: #maitre_capacites)
Call the move reminder UI with the choosen Pokemon and a specific mode (0 by default).
-
#npc_trade_sequence(index, pokemon)
Sequence that perform NPC trade.
-
#open_shop(items, prices = {}, show_background: true)
(also: #ouvrir_magasin)
Open a shop.
-
#party ⇒ PFM::GameState
Return the party object (game state).
-
#pfm_text ⇒ PFM::Text
Return the PFM::Text module.
-
#pick_item(item_id, count = 1, no_delete = false)
Pick an item on the ground (and delete the event).
-
#player_spotted?(nb_pas) ⇒ Boolean
(also: #trainer_spotted)
Detect if the event can spot the player and move to the player.
-
#player_spotted_directional?(up: nil, down: nil, left: nil, right: nil) ⇒ Boolean
Detect if the event can spot the player and move to the player with direction relative detection.
-
#player_spotted_rect?(nb_pas, dist) ⇒ Boolean
(also: #trainer_spotted_rect)
Detect if the event can spot the player in a certain rect in frond of itself.
-
#pokemon_index(method_name, *args)
Return the index of the choosen Pokemon or call a method of GameState to find the right Pokemon.
-
#pokemon_shop_open(symbol_or_list, prices = [], param = [], show_background: true)
(also: #ouvrir_magasin_pokemon)
Open a Pokemon shop.
-
#pokemon_stored_sequence(pokemon)
Show the “Pokemon was sent to BOX $” message.
- #puzzle_alpha(id = 1, id_switch = Yuki::Sw::RuinsVictory)
-
#quest_book
(also: #livre_quetes, #quest_ui)
Show the quest book.
-
#receive_pokemon_sequence(pokemon_or_id, level = 5, shiny = false) ⇒ PFM::Pokemon?
Receive Pokemon sequence, when the player is given a Pokemon.
-
#remove_items_from_limited_shop(symbol_of_shop, list_item_id_to_remove, list_quantity_to_remove)
(also: #enlever_objets_magasin)
Remove items from a limited shop.
-
#remove_pokemon_from_shop(symbol_of_shop, remove_list_mon, param_form, list_quantity_to_remove = [])
(also: #enlever_pokemon_du_magasin)
Remove Pokemon from a Pokemon Shop.
-
#rename_pokemon(index_or_pokemon, num_char = 12)
(also: #renommer_pokemon)
Show the rename interface of a Pokemon.
-
#retrieve_saved_party(id_storage = nil)
(also: #retreive_saved_party)
Retrieve the saved team when emptied ( /!\ empty the current team).
-
#retrieve_stolen_pokemon(id_storage = nil)
(also: #retreive_stolen_pokemon)
Retrieve previously stolen Pokemon ( /!\ uses #add_pokemon).
-
#save_this_fog ⇒ Array
Save the current fog.
-
#set_local_variable(value, id_var, id_event = @event_id, id_map = @map_id)
(also: #set_VL, #set_LV)
Set a local variable.
-
#set_self_switch(value, self_switch, event_id, map_id = @map_id)
(also: #set_ss)
Set the value of a self_switch.
-
#show_pokemon(pokemon_id)
Show the Pokemon dex info.
-
#skill_learn(pokemon, id_skill) ⇒ Boolean
(also: #enseigner_capacite)
Learn a skill to a Pokemon.
-
#start_double_trainer_battle(trainer_id, second_trainer_id, bgm: DEFAULT_TRAINER_BGM, disable: 'A', enable: 'B', troop_id: 3, &block)
Start a trainer battle.
-
#start_double_trainer_battle_with_friend(trainer_id, second_trainer_id, friend_trainer_id, bgm: DEFAULT_TRAINER_BGM, disable: 'A', enable: 'B', troop_id: 3, &block)
Start a trainer battle.
-
#start_pc
(also: #demarrer_pc)
Start the storage PC.
-
#start_trade(server)
Start an online Trade.
-
#start_trainer_battle(trainer_id, bgm: DEFAULT_TRAINER_BGM, disable: 'A', enable: 'B', troop_id: 3)
Start a trainer battle.
-
#steal_pokemon(indexes, id_storage = nil, no_save = false)
Save some Pokemon of the team somewhere and remove them from the party.
-
#stop_path
Shortcut for get_character(@event_id).stop_path.
-
#store_pokemon(pokemon_or_id, level = 5, shiny = false) ⇒ PFM::Pokemon?
(also: #stocker_pokemon)
Store a Pokemon in the PC.
-
#timed_event_remaining_time(event_id = @event_id, map_id = @map_id) ⇒ Integer
Get the remaining time until the trigger (in minutes).
-
#trainer_eye_sequence(phrase, eye_bgm: DEFAULT_EYE_BGM, exclamation_se: DEFAULT_EXCLAMATION_SE)
Sequence to call before start trainer battle.
-
#trigger_event_in(amount_of_minutes, local_switch_letter, event_id = @event_id, map_id = @map_id)
Store a timed event (will enable the desired local switch when the timer reached the amount of minutes).
-
#wait_character_move_completion(event_id = @event_id)
(also: #attendre_fin_deplacement_cet_event, #wait_event, #attendre_event)
Wait for the end of the movement of this particular character.
-
#wait_for_player
(also: #attendre_joueur)
Shortcut for wait_character_move_completion(0) Wait for the end of the player movement.
-
#withdraw_pokemon(id, counter = 1)
(also: #retirer_pokemon)
withdraw a Pokemon from the Party.
-
#withdraw_pokemon_at(index)
(also: #retirer_pokemon_index)
withdraw a Pokemon from the party at a specific position in the Party.
-
#yes_no_choice(message, yes = nil, no = nil) ⇒ Boolean
Show a yes no choice.
Methods included from Util::SystemMessage
load_message, parse_opts, show_message, show_message_and_wait
Methods inherited from Interpreter_RMXP
#clear, #command_101, #command_102, #command_103, #command_104, #command_105, #command_106, #command_111, #command_112, #command_113, #command_115, #command_116, #command_117, #command_118, #command_119, #command_121, #command_122, #command_123, #command_124, #command_125, #command_126, #command_127, #command_128, #command_129, #command_131, #command_132, #command_133, #command_134, #command_135, #command_136, #command_201, #command_202, #command_203, #command_204, #command_205, #command_206, #command_207, #command_208, #command_209, #command_210, #command_221, #command_222, #command_223, #command_224, #command_225, #command_231, #command_232, #command_233, #command_234, #command_235, #command_236, #command_241, #command_242, #command_245, #command_246, #command_247, #command_248, #command_249, #command_250, #command_251, #command_301, #command_302, #command_303, #command_311, #command_312, #command_313, #command_314, #command_315, #command_316, #command_317, #command_318, #command_319, #command_320, #command_321, #command_322, #command_331, #command_332, #command_333, #command_334, #command_335, #command_336, #command_337, #command_338, #command_339, #command_340, #command_351, #command_352, #command_353, #command_354, #command_355, #command_402, #command_403, #command_411, #command_413, #command_601, #command_602, #command_603, #command_end, #command_skip, #eval_condition_script, #eval_script, #execute_command, #get_character, #initialize, #input_button, #iterate_actor, #iterate_battler, #iterate_enemy, #launch_common_event, #operate_value, #running?, #setup, #setup_choices, #setup_starting_event, #update
Constructor Details
This class inherits a constructor from Interpreter_RMXP
Instance Method Details
#add_egg(id) ⇒ PFM::Pokemon? Also known as: ajouter_oeuf
Add an egg to the Party (or in the PC)
133 134 135 136 137 138 139 140 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 133 def add_egg(id) creature = data_creature(id.is_a?(Hash) ? id[:id].to_i : id) raise "Database Error : The Pokémon ##{id} doesn't exists." if creature.db_symbol == :__undef__ pokemon = id.is_a?(Hash) ? PFM::Pokemon.generate_from_hash(id) : PFM::Pokemon.new(id, 1) pokemon.egg_init return add_pokemon(pokemon) end |
#add_item(item_id, no_delete = false, text_id: 4, no_space_text_id: 7, color: 11, count: 1)
Add an item to the bag if possible, will delete the event forever
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'scripts/00700 PSDK Event Interpreter/01201 Interpreter_add_item.rb', line 12 def add_item(item_id, no_delete = false, text_id: 4, no_space_text_id: 7, color: 11, count: 1) db_symbol = item_id.is_a?(Symbol) ? item_id : data_item(item_id).db_symbol if (max = Configs.settings.max_bag_item_count) > 0 && ($bag.item_quantity(db_symbol) + count) >= max add_item_no_space(db_symbol, no_space_text_id, color) else item_text, socket = (db_symbol, text_id, color, count: count) # Pokemon Sword/Shield does not show this type of message # If you want your game to show it, change MODE_SWOOSH to false if count == 1 && !MODE_SWOOSH pocket_name = GamePlay::Bag::POCKET_NAMES[socket] pocket_name = send(*pocket_name) if pocket_name.is_a?(Array) ( :bag_store_item_in_pocket, item_1: item_text, header: SYSTEM_MESSAGE_HEADER, PFM::Text::TRNAME[0] => $trainer.name, '[VAR 0112(0002)]' => pocket_name ) end $bag.add_item(db_symbol, count) delete_this_event_forever unless no_delete end @wait_count = 2 end |
#add_items_to_limited_shop(symbol_of_shop, list_item_id_to_refill = [], list_quantity_to_refill = []) Also known as: ajouter_objets_magasin
Add items to a limited shop
22 23 24 |
# File 'scripts/00700 PSDK Event Interpreter/01301 Interpreter_Shop.rb', line 22 def add_items_to_limited_shop(symbol_of_shop, list_item_id_to_refill = [], list_quantity_to_refill = []) PFM.game_state.shop.refill_limited_shop(symbol_of_shop, list_item_id_to_refill, list_quantity_to_refill) end |
#add_limited_shop(symbol_of_new_shop, list_of_item_id = [], list_of_item_quantity = [], shop_rewrite: false) Also known as: ajouter_un_magasin_limite
Create a limited shop (in the main PFM::Shop object)
16 17 18 |
# File 'scripts/00700 PSDK Event Interpreter/01301 Interpreter_Shop.rb', line 16 def add_limited_shop(symbol_of_new_shop, list_of_item_id = [], list_of_item_quantity = [], shop_rewrite: false) PFM.game_state.shop.create_new_limited_shop(symbol_of_new_shop, list_of_item_id, list_of_item_quantity, shop_rewrite: shop_rewrite) end |
#add_new_pokemon_shop(sym_new_shop, list_id_mon, list_prices, list_param_mon, list_quantity_mon = [], shop_rewrite: false) Also known as: ajouter_nouveau_magasin_pokemon
Create a limited Pokemon Shop
45 46 47 |
# File 'scripts/00700 PSDK Event Interpreter/01301 Interpreter_Shop.rb', line 45 def add_new_pokemon_shop(sym_new_shop, list_id_mon, list_prices, list_param_mon, list_quantity_mon = [], shop_rewrite: false) PFM.game_state.shop.create_new_pokemon_shop(sym_new_shop, list_id_mon, list_prices, list_param_mon, list_quantity_mon, shop_rewrite: shop_rewrite) end |
#add_parallax(image, x, y, z, zoom_x = 1, zoom_y = 1, opacity = 255, blend_type = 0)
Add a parallax
211 212 213 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 211 def add_parallax(*args) Yuki::Particles.add_parallax(*args) end |
#add_pokemon(pokemon_or_id, level = 5, shiny = false) ⇒ PFM::Pokemon? Also known as: ajouter_pokemon, ajouter_stocker_pokemon
Add a pokemon to the party or store it in the PC
8 9 10 11 12 13 14 15 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 8 def add_pokemon(pokemon_or_id, level = 5, shiny = false) return internal_add_pokemon_final(pokemon_or_id) if pokemon_or_id.is_a?(PFM::Pokemon) return internal_add_pokemon_check_level_shiny(pokemon_or_id, level, shiny, :add_pokemon) if pokemon_or_id.is_a?(Integer) return internal_add_pokemon_check_symbol(pokemon_or_id, level, shiny, :add_pokemon) if pokemon_or_id.is_a?(Symbol) raise 'Argument Error : Pokémon ID cannot be string' if pokemon_or_id.is_a?(String) nil end |
#add_pokemon_to_shop(symbol_of_shop, list_id_mon, list_prices, list_param_mon, list_quantity_mon = [], pkm_rewrite: false) Also known as: ajouter_pokemon_au_magasin
Add Pokemon to a Pokemon Shop
52 53 54 |
# File 'scripts/00700 PSDK Event Interpreter/01301 Interpreter_Shop.rb', line 52 def add_pokemon_to_shop(symbol_of_shop, list_id_mon, list_prices, list_param_mon, list_quantity_mon = [], pkm_rewrite: false) PFM.game_state.shop.refill_pokemon_shop(symbol_of_shop, list_id_mon, list_prices, list_param_mon, list_quantity_mon, pkm_rewrite: pkm_rewrite) end |
#add_rename_pokemon(pokemon_or_id, level = 5, shiny = false, num_char = 12) ⇒ PFM::Pokemon? Also known as: ajouter_renommer_pokemon
Add a pokemon to the party or store it in the PC and rename it
122 123 124 125 126 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 122 def add_rename_pokemon(pokemon_or_id, level = 5, shiny = false, num_char = 12) pokemon = add_pokemon(pokemon_or_id, level, shiny) rename_pokemon(pokemon, num_char) if pokemon return pokemon end |
#add_specific_pokemon(hash) ⇒ PFM::Pokemon? Also known as: ajouter_pokemon_param
Add a pokemon (#add_pokemon) with specific informations.
39 40 41 42 43 44 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 39 def add_specific_pokemon(hash) pokemon_id = hash[:id].to_i raise "Database Error : The Pokémon ##{pokemon_id} doesn't exists." if each_data_creature.none? { |creature| creature.id == pokemon_id } return add_pokemon(PFM::Pokemon.generate_from_hash(hash)) end |
#animate_from_charset(lines, duration, reverse: false, repeat: false) ⇒ Boolean
Shortcut for get_character(@event_id).animate_from_charset(*args)
264 265 266 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 264 def animate_from_charset(lines, duration, reverse: false, repeat: false) return get_character(@event_id).animate_from_charset(lines, duration, reverse: reverse, repeat: repeat) end |
#call_battle_wild(id, level, shiny, no_shiny) #call_battle_wild(id, level, *args) #call_battle_wild(id, level, *args) Also known as: demarrer_combat
Start a wild battle
158 159 160 161 162 163 164 165 166 167 168 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 158 def call_battle_wild(id, level, *args) id = data_creature(id).id if id.is_a?(Symbol) # /!\ the following condition can trigger some bugs... if args[0].is_a?(Numeric) || args[0].is_a?(Symbol) || args[0].class == PFM::Pokemon || id.class == PFM::Pokemon args[0] = data_creature(args[0]).id if args[0].is_a?(Symbol) $wild_battle.start_battle(id, level, *args) else $wild_battle.start_battle(::PFM::Pokemon.new(id, level, args[0], args[1] == true)) end @wait_count = 2 end |
#call_party_menu(id_var = ::Yuki::Var::Party_Menu_Sel, party = $actors, mode = :map, extend_data = nil) Also known as:
Show the party menu in order to select a Pokemon
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 168 def (id_var = ::Yuki::Var::Party_Menu_Sel, party = $actors, mode = :map, extend_data = nil) block = proc { |scene| $game_variables[id_var] = scene.return_data } case mode when :map GamePlay.(party, &block) when :item GamePlay.(extend_data, party, &block) when :hold GamePlay.(extend_data, party, &block) when :select GamePlay.(party, PFM.game_state.game_variables[Yuki::Var::Max_Pokemon_Select], extend_data) $game_variables[id_var] = -1 when :absofusion GamePlay.(party, *extend_data) $game_variables[id_var] = -1 when :separate GamePlay.(party, extend_data) $game_variables[id_var] = -1 else GamePlay.(party, &block) end @wait_count = 2 end |
#can_move_reminder_be_called?(mode = 0) ⇒ Boolean Also known as: maitre_capacites_appelable?
Detect if the move reminder can remind a move to the selected pokemon
17 18 19 20 21 22 |
# File 'scripts/00700 PSDK Event Interpreter/01102 Interpreter_Move_Reminder.rb', line 17 def can_move_reminder_be_called?(mode = 0) var = $game_variables[::Yuki::Var::Party_Menu_Sel] return false if var < 0 || var >= $actors.size return $actors[var].remindable_skills(mode).any? && !$actors[var].egg? end |
#carte_du_monde(arg = :view, wm_id = $env.get_worldmap) Also known as: world_map
Open the world map
121 122 123 124 125 126 127 128 129 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 121 def carte_du_monde(arg = :view, wm_id = $env.get_worldmap) arg = arg.bytesize == 3 ? :fly : :view if arg.instance_of?(String) if arg == :fly GamePlay.open_town_map_to_fly(wm_id) else GamePlay.open_town_map(wm_id) end @wait_count = 2 end |
#casino(arg = :voltorb_flip, speed = 2)
Open the casino gameplay
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 279 def casino(arg = :voltorb_flip, speed = 2) return if $game_variables[Yuki::Var::CoinCase] <= 0 case arg # Anticipate the creation of other casino scenes when :voltorb_flip casino = GamePlay::Casino::VoltorbFlip.new when :slotmachine casino = GamePlay::Casino::SlotMachine.new(speed) else return end casino.main Graphics.transition @wait_count = 2 end |
#choice(variable_id, cancel_type, *choices)
Start a choice with more option than RMXP allows.
112 113 114 115 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 112 def choice(variable_id, cancel_type, *choices) setup_choices([choices, cancel_type]) $game_temp.choice_proc = proc { |choix| $game_variables[variable_id] = choix + 1 } end |
#clear_saved_fog
Clear the saved fog
194 195 196 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 194 def clear_saved_fog $fog_info = nil end |
#cry_pokemon(id)
Play the cry of a Pokemon
91 92 93 94 95 96 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 91 def cry_pokemon(id) creature = data_creature(id) raise "Database Error : The Pokémon ##{id} doesn't exists." if creature.db_symbol == :__undef__ Audio.se_play(format('Audio/SE/Cries/%03dCry', creature.id)) end |
#current_time ⇒ Integer
Return the current time in minute
4 5 6 7 8 9 10 |
# File 'scripts/00700 PSDK Event Interpreter/01150 Interpreter_Time.rb', line 4 def current_time return ((time = Time.new).to_i / 60 + time.gmtoff / 60) if $game_switches[Yuki::Sw::TJN_RealTime] $game_variables[Yuki::Var::TJN_Min] + $game_variables[Yuki::Var::TJN_Hour] * 60 + (($game_variables[Yuki::Var::TJN_MDay] - 1) % 7) * 1440 + ($game_variables[Yuki::Var::TJN_Week]) * 10_080 end |
#delete_this_event_forever
Delete the current event forever
144 145 146 147 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 144 def delete_this_event_forever $env.set_event_delete_state(@event_id) $game_map.events[@event_id]&.erase end |
#detect_invalid_tile(x, y, width, height, tile_id) ⇒ Boolean
Detect if a specified tile (in layer 3) is in the specified zone
171 172 173 174 175 176 177 178 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 171 def detect_invalid_tile(x, y, width, height, tile_id) ox = Yuki::MapLinker.get_OffsetX oy = Yuki::MapLinker.get_OffsetY rangex = (x + ox)...(x + ox + width) rangey = (y + oy)...(y + oy + height) gm = $game_map return rangex.any? { |tx| rangey.any? { |ty| gm.get_tile(tx, ty) == tile_id } } end |
#detect_player(nb_pas, direction) ⇒ Boolean
Detect the player in a specific direction
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 98 def detect_player(nb_pas, direction) return false if player_detection_disabled? c = $game_map.events[@event_id] dx = $game_player.x - c.x dy = $game_player.y - c.y case direction when :right, 6 return (dy == 0 && dx >= 0 && dx <= nb_pas) when :down, 2 return (dx == 0 && dy >= 0 && dy <= nb_pas) when :left, 4 return (dy == 0 && dx <= 0 && dx >= -nb_pas) else return (dx == 0 && dy <= 0 && dy >= -nb_pas) end end |
#detect_player_circle(r) ⇒ Boolean
Detect the player in a circle around the event
134 135 136 137 138 139 140 141 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 134 def detect_player_circle(r) return false if player_detection_disabled? c = $game_map.events[@event_id] dx = $game_player.x - c.x dy = $game_player.y - c.y return ((dx * dx) + (dy * dy)) <= r end |
#detect_player_rect(nx, ny) ⇒ Boolean
Detect the player in a rectangle around the event
121 122 123 124 125 126 127 128 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 121 def detect_player_rect(nx, ny) return false if player_detection_disabled? c = $game_map.events[@event_id] dx = ($game_player.x - c.x).abs dy = ($game_player.y - c.y).abs return (dx <= nx && dy <= ny) end |
#emotion(type, char_id = 0, wait = 34, params = {})
The available emotion type are :
-
:exclamation
-
:exclamation2
-
:poison
-
:interrogation
-
:music
-
:love
-
:joy
-
:sad
-
:happy
-
:angry
-
:sulk
-
:nocomment
Show an emotion to an event or the player
73 74 75 76 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 73 def emotion(type, char_id = 0, wait = 34, params = {}) Yuki::Particles.add_particle(get_character(char_id), type, params) @wait_count = wait end |
#empty_and_save_party(id_storage = nil)
Save the team somewhere and make it empty in the point of view of the player.
174 175 176 177 178 179 180 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 174 def empty_and_save_party(id_storage = nil) var_id = id_storage ? "@_str_#{id_storage}".to_sym : :@other_party $actors.compact! party = Marshal.load(Marshal.dump($actors)) $actors.clear $storage.instance_variable_set(var_id, party) end |
#event_calling(common_event, event_id) ⇒ Boolean
Check if an event is calling a common event (in its first non comment commands)
98 99 100 101 102 103 104 105 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 98 def event_calling(common_event, event_id) if (event = $game_map.events[event_id]) && event.list i = 0 i += 1 while FEC_SKIP_CODES.include?(event.list[i]&.code) return true if event.list[i] && event.list[i].code == 117 && event.list[i].parameters[0] == common_event end return false end |
#fast_travel(x, y = nil, ms = 5)
Shortcut defining the pathfinding request and wait for the end of the path following
249 250 251 252 253 254 255 256 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 249 def fast_travel(x, y=nil, ms = 5) $game_player.move_speed = ms if y $game_player.find_path to: [x, y] else $game_player.find_path to: x, type: :Border end end |
#find_path(**kwargs)
Shortcut for get_character(@event_id).find_path(*args). Exemple : find_path to:, radius:5
236 237 238 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 236 def find_path(**kwargs) get_character(@event_id).find_path(**kwargs) end |
#force_save Also known as: forcer_sauvegarde
Save the game without asking
133 134 135 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 133 def force_save GamePlay::Save.save end |
#front_event_calling(common_event) ⇒ Boolean
Check if the front event calls a common event (in its first non comment commands)
83 84 85 86 87 88 89 90 91 92 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 83 def front_event_calling(common_event) event = $game_player.front_tile_event if event&.list @event_id = event.id if @event_id == 0 i = 0 i += 1 while FEC_SKIP_CODES.include?(event.list[i]&.code) return true if event.list[i] && event.list[i].code == 117 && event.list[i].parameters[0] == common_event end return false end |
#ge(id = @event_id) ⇒ Game_Event
Return the $game_map.events
34 35 36 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 34 def ge(id = @event_id) gm.events[id] end |
#get_local_variable(id_var) ⇒ Object #get_local_variable(id_var, operation, value = nil) ⇒ Object #get_local_variable(id_event, id_var) ⇒ Object #get_local_variable(id_event, id_var, operation, value = nil) ⇒ Object #get_local_variable(id_map, id_event, id_var) ⇒ Object #get_local_variable(id_map, id_event, id_var, operation, value = nil) ⇒ Object Also known as: VL, LV
104 105 106 107 108 109 110 111 112 113 |
# File 'scripts/00600 Script_RMXP/03100 Game_SelfVariables.rb', line 104 def get_local_variable(*args) if args.first.is_a?(Symbol) # [var_loc, operation, value] return $game_self_variables.do([@map_id, @event_id, args.first], args[1], args[2]) elsif args[1].is_a?(Integer)# [map_id, event_id, var_loc, operation, value] return $game_self_variables.do([args.first, args[1], args[2]], args[3], args[4]) else # [event_id, var_loc, operation, value] return $game_self_variables.do([@map_id, args.first, args[1]], args[2], args[3]) end return nil end |
#get_self_switch(self_switch, event_id, map_id = @map_id) ⇒ Boolean Also known as: get_ss
Get the value of a self_switch
157 158 159 160 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 157 def get_self_switch(self_switch, event_id, map_id = @map_id) key = [map_id, event_id, self_switch] # Clef pour retrouver l'interrupteur local que l'on veut modifier return $game_self_switches[key] end |
#give_exp(index, amount)
Give a certain amount of exp to one Pokemon
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 336 def give_exp(index, amount) index = index.clamp(0, $actors.size - 1) return if $actors[index].level >= $pokemon_party.level_max_limit || $actors[index].egg? @amount = amount pokemon = $actors[index] exp_to_next_lvl = pokemon.exp_lvl - pokemon.exp while @amount >= exp_to_next_lvl break if pokemon.level >= $pokemon_party.level_max_limit pokemon.exp += exp_to_next_lvl @amount -= exp_to_next_lvl exp_to_next_lvl = pokemon.exp_lvl - pokemon.exp if pokemon.exp >= pokemon.exp_lvl pokemon.level_up_stat_refresh Audio.me_play(PFM::ItemDescriptor::LVL_SOUND) PFM::Text.set_num3(pokemon.level.to_s, 1) $scene.(parse_text(18, 62, '[VAR 010C(0000)]' => pokemon.given_name)) PFM::Text.reset_variables pokemon.check_skill_and_learn id, form = pokemon.evolve_check GamePlay.make_pokemon_evolve(pokemon, id, form, true) if id end end pokemon.exp += @amount unless pokemon.level >= $pokemon_party.level_max_limit end |
#give_exp_all(amount)
Give a certain amount of exp to every Pokemon in party
369 370 371 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 369 def give_exp_all(amount) $actors.size.times { |i| give_exp(i, amount) } end |
#give_item(item_id, count = 1)
Give an item to the player
49 50 51 52 |
# File 'scripts/00700 PSDK Event Interpreter/01201 Interpreter_add_item.rb', line 49 def give_item(item_id, count = 1) text_id = data_item(item_id).socket == 5 ? 1 : 0 add_item(item_id, true, text_id: text_id, count: count) end |
#give_level(index, amount)
Give a certain amount of level to one Pokemon
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 376 def give_level(index, amount) return if $actors[index].level >= $pokemon_party.level_max_limit || $actors[index].egg? amount.times do |i| break if $actors[index].level >= $pokemon_party.level_max_limit $actors[index].level_up_stat_refresh Audio.me_play(PFM::ItemDescriptor::LVL_SOUND) PFM::Text.set_num3($actors[index].level.to_s, 1) $scene.(parse_text(18, 62, '[VAR 010C(0000)]' => $actors[index].given_name)) PFM::Text.reset_variables $actors[index].check_skill_and_learn id, form = $actors[index].evolve_check GamePlay.make_pokemon_evolve($actors[index], id, form, true) if id end end |
#give_level_all(amount)
Give a certain amount of level to every Pokemon in party
395 396 397 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 395 def give_level_all(amount) $actors.size.times { |i| give_level(i, amount) } end |
#gm ⇒ Game_Map
Return the $game_map
22 23 24 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 22 def gm $game_map end |
#gp ⇒ Game_Player
Return the $game_player
28 29 30 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 28 def gp $game_player end |
#gs ⇒ Game_Switches
Return the $game_switches
10 11 12 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 10 def gs $game_switches end |
#gt ⇒ Game_Temp
Return the $game_temp
16 17 18 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 16 def gt $game_temp end |
#gv ⇒ Game_Variables
Return the $game_variables
4 5 6 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 4 def gv $game_variables end |
#hall_of_fame(filename_bgm = 'audio/bgm/Hall-of-Fame', context_of_victory = :league)
Open the Hall of Fame UI
298 299 300 301 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 298 def hall_of_fame(filename_bgm = 'audio/bgm/Hall-of-Fame', context_of_victory = :league) GamePlay.open_hall_of_fame(filename_bgm, context_of_victory) @wait_count = 2 end |
#honey_tree_event(id)
Function calling the honey tree event
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'scripts/01450 Systems/99990 Global Systems/01500 HoneyTree.rb', line 154 def honey_tree_event(id) if PFM::HoneyTree.has_pokemon?(id) # There's a Pokemon (:honey_tree_slathered) if PFM::HoneyTree.can_battle?(id) honey_data = PFM::HoneyTree.get(id) pokemon_id = PFM::HoneyTree::POKEMON_LISTS[honey_data[:column]][honey_data[:mon_index]] honey_data[:column] = 0 # Reset $wild_battle.start_battle(pokemon_id, rand(PFM::HoneyTree::LEVEL_RANGE)) else honey_tree_slather_event(id) end else (:honey_tree_sweet_scent) honey_tree_slather_event(id) end end |
#internal_add_pokemon_check_level_shiny(pokemon_id, level, shiny, method_name) ⇒ PFM::Pokemon
Check the input parameters and send the Pokemon to method_name
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'scripts/00700 PSDK Event Interpreter/01101 Interpreter_Pokemon Internal.rb', line 36 def internal_add_pokemon_check_level_shiny(pokemon_id, level, shiny, method_name) do_not_add = false # Check parameters do_not_add = "Database Error : The Pokémon ##{pokemon_id} doesn't exists." if data_creature(pokemon_id).db_symbol == :__undef__ if level < 1 || level > PFM.game_state.level_max_limit do_not_add << 10 if do_not_add do_not_add = "#{do_not_add}Level Error : level #{level} is out of bound." end raise do_not_add if do_not_add # Shiny attribute management shiny = rand(shiny) == 0 if shiny.is_a?(Integer) && shiny > 0 pokemon = PFM::Pokemon.new(pokemon_id, level.abs, shiny, shiny == 0) return send(method_name, pokemon) end |
#internal_add_pokemon_check_symbol(pokemon_or_id, level, shiny, method_name) ⇒ PFM::Pokemon
Check the symbol of the Pokemon and send the Pokemon to method_name
23 24 25 26 27 28 |
# File 'scripts/00700 PSDK Event Interpreter/01101 Interpreter_Pokemon Internal.rb', line 23 def internal_add_pokemon_check_symbol(pokemon_or_id, level, shiny, method_name) id = data_creature(pokemon_or_id).id raise "Database Error : The Pokémon #{pokemon_or_id} doesn't exists." if id == 0 send(method_name, id, level, shiny) end |
#internal_add_pokemon_final(pokemon) ⇒ PFM::Pokemon
Try to add Pokemon to the party or store the Pokemon in the storage system
5 6 7 8 9 10 11 12 13 14 15 |
# File 'scripts/00700 PSDK Event Interpreter/01101 Interpreter_Pokemon Internal.rb', line 5 def internal_add_pokemon_final(pokemon) return_value = PFM.game_state.add_pokemon(pokemon) if return_value.is_a?(Integer) $game_switches[Yuki::Sw::SYS_Stored] = true elsif return_value $game_switches[Yuki::Sw::SYS_Stored] = false else raise "Management Error :\nThe last Pokémon couldn't added to the team\nor to the storage system..." end return pokemon end |
#internal_store_pokemon_final(pokemon) ⇒ PFM::Pokemon
Try to add Pokemon to the party or store the Pokemon in the storage system
55 56 57 58 59 60 |
# File 'scripts/00700 PSDK Event Interpreter/01101 Interpreter_Pokemon Internal.rb', line 55 def internal_store_pokemon_final(pokemon) return_value = $storage.store(pokemon) raise 'Management Error : The Pokemon couldn\'t be stored...' unless return_value $game_switches[Yuki::Sw::SYS_Stored] = true return pokemon end |
#message(string, cancel_type = 0, *choices) ⇒ Integer
This function should only be called from text events!
Show a message with eventually a choice
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'scripts/00700 PSDK Event Interpreter/01205 Interpreter_Fiber.rb', line 14 def (string, cancel_type = 0, *choices) return (string, 1, *choices) unless @fiber # RMXP Compatibility choice_result = 0 # Return false to the interpreter while the last message is shown Fiber.yield(false) while $game_temp. $game_player.look_to(@event_id) unless $game_switches[::Yuki::Sw::MSG_Noturn] # Give info to allow the interpreter to work correctly @message_waiting = true $game_temp. = proc { @message_waiting = false } # Give the message info to the message engine $game_temp. = string # Give the choice info if choices.any? $game_temp.choice_cancel_type = cancel_type $game_temp.choices = choices $game_temp.choice_max = choices.size $game_temp.choice_proc = proc { |n| choice_result = n } end # Give the control back to the interpreter Fiber.yield(true) # Return the result to the event return choice_result end |
#mining_game(item_count, music_filename = GamePlay::MiningGame::DEFAULT_MUSIC) #mining_game(wanted_item_db_symbols, music_filename = GamePlay::MiningGame::DEFAULT_MUSIC)
Open the Mining Game UI
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 310 def mining_game(param = nil, music_filename = GamePlay::MiningGame::DEFAULT_MUSIC, delete_after: true) = $game_map.events[@event_id].event.name.downcase.include?('miningrock') ? 2 : 0 if PFM.game_state.bag.contain_item?(:explorer_kit) if yes_no_choice(ext_text(9005, )) $game_system.bgm_memorize $game_system.bgm_fade(0.2) $scene.call_scene(GamePlay::MiningGame, param, music_filename, fade_out_params: [:mining_game, 0]) $game_system.bgm_restore @wait_count = 2 delete_this_event_forever if delete_after end else (ext_text(9005, + 1)) end end |
#mirror_picture(id)
Mirror a RMXP Picture
329 330 331 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 329 def mirror_picture(id) $game_screen.pictures[id].mirror = true end |
#move_reminder(pokemon = $actors[$game_variables[::Yuki::Var::Party_Menu_Sel], mode = 0) ⇒ Boolean Also known as: maitre_capacites
Call the move reminder UI with the choosen Pokemon and a specific mode (0 by default)
6 7 8 9 10 11 |
# File 'scripts/00700 PSDK Event Interpreter/01102 Interpreter_Move_Reminder.rb', line 6 def move_reminder(pokemon = $actors[$game_variables[::Yuki::Var::Party_Menu_Sel]], mode = 0) result = false GamePlay.open_move_reminder(pokemon, mode) { |scene| result = scene.reminded_move? } @wait_count = 2 return result end |
#npc_trade_sequence(index, pokemon)
Sequence that perform NPC trade
150 151 152 153 154 155 156 157 158 159 |
# File 'scripts/00700 PSDK Event Interpreter/01300 Interpreter_Sequences.rb', line 150 def npc_trade_sequence(index, pokemon) return unless $actors[index].is_a?(PFM::Pokemon) actor = $actors[index] $actors[index] = pokemon # TODO: Trade animation taking actor, pokemon (including messages) $scene.("#{actor.given_name} is being traded with #{pokemon.name}") id, form = pokemon.evolve_check(:trade, pokemon) GamePlay.make_pokemon_evolve(pokemon, id, form, true) if id end |
#open_shop(items, prices) #open_shop(items, prices) Also known as: ouvrir_magasin
Open a shop
9 10 11 12 |
# File 'scripts/00700 PSDK Event Interpreter/01301 Interpreter_Shop.rb', line 9 def open_shop(items, prices = {}, show_background: true) $scene.call_scene(GamePlay::Shop, items, prices, show_background: show_background) @wait_count = 2 end |
#party ⇒ PFM::GameState
Return the party object (game state)
40 41 42 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 40 def party PFM.game_state end |
#pfm_text ⇒ PFM::Text
Return the PFM::Text module
217 218 219 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 217 def pfm_text return PFM::Text end |
#pick_item(item_id, count = 1, no_delete = false)
Pick an item on the ground (and delete the event)
42 43 44 |
# File 'scripts/00700 PSDK Event Interpreter/01201 Interpreter_add_item.rb', line 42 def pick_item(item_id, count = 1, no_delete = false) add_item(item_id, no_delete, text_id: 4, count: count) end |
#player_spotted?(nb_pas) ⇒ Boolean Also known as: trainer_spotted
Detect if the event can spot the player and move to the player
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 9 def player_spotted?(nb_pas) return r = false if player_detection_disabled? c = $game_map.events[@event_id] # Detect if the player is too far away from the event return r = false if (c.x - $game_player.x).abs > nb_pas || (c.y - $game_player.y).abs > nb_pas return r = false if c.z != $game_player.z # Prevent detection when event & player arent both on a bridge return r = true if Input.trigger?(:A) && $game_player.front_tile_event == c # Ensure the player can force the event to detect from other sides it = c.each_front_tiles(nb_pas) # Find first tile where the event & the player overlaps px, py, * = it.find { |x, y| $game_player.x == x && $game_player.y == y } return false unless px && py # Find last tile where the event can move lx, ly, * = it.find { |x, y, d| !c.passable?(x, y, d) } return false unless lx && ly return r = ((lx - px).abs <= 1 && (ly - py).abs <= 1) ensure # Stop the player from Running if r $game_switches[::Yuki::Sw::EV_Run] = false $game_temp.common_event_id = Game_CommonEvent::APPEARANCE end end |
#player_spotted_directional?(up: nil, down: nil, left: nil, right: nil) ⇒ Boolean
Detect if the event can spot the player and move to the player with direction relative detection
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 79 def player_spotted_directional?(up: nil, down: nil, left: nil, right: nil) case $game_map.events[@event_id].direction when 2 return player_spotted?(down || up || left || right || 1) when 8 return player_spotted?(up || down || left || right || 1) when 4 return player_spotted?(left || right || up || down || 1) when 6 return player_spotted?(right || left || up || down || 1) end return false end |
#player_spotted_rect?(nb_pas, dist) ⇒ Boolean Also known as: trainer_spotted_rect
Detect if the event can spot the player in a certain rect in frond of itself
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 41 def player_spotted_rect?(nb_pas, dist) return r = false if player_detection_disabled? c = $game_map.events[@event_id] # Detect if the player is too far away from the event return r = false if (c.x - $game_player.x).abs > nb_pas || (c.y - $game_player.y).abs > nb_pas return r = false if c.z != $game_player.z # Prevent detection when event & player arent both on a bridge return r = true if Input.trigger?(:A) && $game_player.front_tile_event == c # Ensure the player can force the event to detect from other sides it = c.each_front_tiles_rect(nb_pas, dist) # Find first tile where the event & the player overlaps px, py, * = it.find { |x, y| $game_player.x == x && $game_player.y == y } return false unless px && py # Find last tile where the event can move lx, ly, * = it.find { |x, y, d| !c.passable?(x, y, d) } return false unless lx && ly || c.through lx = $game_player.x ly = $game_player.y return r = ((lx - px).abs <= 1 && (ly - py).abs <= 1) ensure # Stop the player from Running if r $game_switches[::Yuki::Sw::EV_Run] = false $game_temp.common_event_id = Game_CommonEvent::APPEARANCE end end |
#pokemon_index(method_name, *args)
Return the index of the choosen Pokemon or call a method of GameState to find the right Pokemon
224 225 226 227 228 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 224 def pokemon_index(method_name, *args) index = $game_variables[Yuki::Var::Party_Menu_Sel].to_i index = party.send(method_name, *args) if index < 0 return index end |
#pokemon_shop_open(symbol_or_list, prices = [], param = [], show_background: true) Also known as: ouvrir_magasin_pokemon
Open a Pokemon shop
34 35 36 37 38 39 40 41 |
# File 'scripts/00700 PSDK Event Interpreter/01301 Interpreter_Shop.rb', line 34 def pokemon_shop_open(symbol_or_list, prices = [], param = [], show_background: true) if symbol_or_list.is_a?(Symbol) GamePlay.open_existing_pokemon_shop(symbol_or_list, prices.is_a?(Hash) ? prices : {}, show_background: show_background) else GamePlay.open_pokemon_shop(symbol_or_list, prices, param, show_background: show_background) end @wait_count = 2 end |
#pokemon_stored_sequence(pokemon)
Show the “Pokemon was sent to BOX $” message
43 44 45 46 47 48 |
# File 'scripts/00700 PSDK Event Interpreter/01300 Interpreter_Sequences.rb', line 43 def pokemon_stored_sequence(pokemon) (:pokemon_stored_to_box, pokemon: pokemon, '[VAR BOXNAME]' => $storage.get_box_name($storage.current_box), header: SYSTEM_MESSAGE_HEADER) end |
#puzzle_alpha(id = 1, id_switch = Yuki::Sw::RuinsVictory)
2 3 4 5 6 |
# File 'scripts/01450 Systems/09000 Games/00003 Ruine Alpha/00002 Ruine_Alpha_by_FL0RENT_.rb', line 2 def puzzle_alpha(id = 1, id_switch = Yuki::Sw::RuinsVictory) $game_switches[id_switch] = false $scene = GamePlay::Alph_Ruins_Puzzle.new(id, id_switch) @wait_count = 2 end |
#quest_book Also known as: livre_quetes, quest_ui
Show the quest book
194 195 196 197 198 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 194 def quest_book GamePlay::QuestUI.new.main Graphics.transition @wait_count = 2 end |
#receive_pokemon_sequence(pokemon_or_id, level = 5, shiny = false) ⇒ PFM::Pokemon?
Receive Pokemon sequence, when the player is given a Pokemon
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'scripts/00700 PSDK Event Interpreter/01300 Interpreter_Sequences.rb', line 20 def receive_pokemon_sequence(pokemon_or_id, level = 5, shiny = false) pokemon = add_pokemon(pokemon_or_id, level, shiny) if pokemon Audio.me_play(*RECEIVED_POKEMON_ME) (:received_pokemon, pokemon: pokemon, header: SYSTEM_MESSAGE_HEADER) original_name = pokemon.given_name while yes_no_choice((:give_nickname_question)) rename_pokemon(pokemon) if pokemon.given_name == original_name || yes_no_choice((:is_nickname_correct_qesion, pokemon: pokemon)) break else pokemon.given_name = original_name end end pokemon_stored_sequence(pokemon) if $game_switches[Yuki::Sw::SYS_Stored] PFM::Text.reset_variables end return pokemon end |
#remove_items_from_limited_shop(symbol_of_shop, list_item_id_to_remove, list_quantity_to_remove) Also known as: enlever_objets_magasin
Remove items from a limited shop
28 29 30 |
# File 'scripts/00700 PSDK Event Interpreter/01301 Interpreter_Shop.rb', line 28 def remove_items_from_limited_shop(symbol_of_shop, list_item_id_to_remove, list_quantity_to_remove) PFM.game_state.shop.remove_from_limited_shop(symbol_of_shop, list_item_id_to_remove, list_quantity_to_remove) end |
#remove_pokemon_from_shop(symbol_of_shop, remove_list_mon, param_form, list_quantity_to_remove = []) Also known as: enlever_pokemon_du_magasin
Remove Pokemon from a Pokemon Shop
59 60 61 |
# File 'scripts/00700 PSDK Event Interpreter/01301 Interpreter_Shop.rb', line 59 def remove_pokemon_from_shop(symbol_of_shop, remove_list_mon, param_form, list_quantity_to_remove = []) PFM.game_state.shop.remove_from_pokemon_shop(symbol_of_shop, remove_list_mon, param_form, list_quantity_to_remove) end |
#rename_pokemon(index_or_pokemon, num_char = 12) Also known as: renommer_pokemon
Show the rename interface of a Pokemon
102 103 104 105 106 107 108 109 110 111 112 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 102 def rename_pokemon(index_or_pokemon, num_char = 12) if index_or_pokemon.is_a?(Integer) pokemon = $actors[index_or_pokemon] raise "IndexError : Pokemon at index #{index_or_pokemon} couldn't be found." unless pokemon else pokemon = index_or_pokemon end $scene.(false) if $scene.class == Scene_Map GamePlay.open_pokemon_name_input(pokemon, num_char) { |name_input| pokemon.given_name = name_input.return_name } @wait_count = 2 end |
#retrieve_saved_party(id_storage = nil) Also known as: retreive_saved_party
Retrieve the saved team when emptied ( /!\ empty the current team)
185 186 187 188 189 190 191 192 193 194 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 185 def retrieve_saved_party(id_storage = nil) var_id = id_storage ? "@_str_#{id_storage}".to_sym : :@other_party party = $storage.instance_variable_get(var_id) return nil if party.empty? $actors.each do |pokemon| $storage.store(pokemon) end $actors = PFM.game_state.actors = party $storage.remove_instance_variable(var_id) if id_storage end |
#retrieve_stolen_pokemon(id_storage = nil) Also known as: retreive_stolen_pokemon
Retrieve previously stolen Pokemon ( /!\ uses #add_pokemon)
220 221 222 223 224 225 226 227 228 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 220 def retrieve_stolen_pokemon(id_storage = nil) var_id = id_storage ? "@_str_#{id_storage}".to_sym : :@other_party party = $storage.instance_variable_get(var_id) return nil if party.empty? party.each do |pokemon| add_pokemon(pokemon) if pokemon end $storage.remove_instance_variable(var_id) if id_storage end |
#save_this_fog ⇒ Array
Save the current fog
182 183 184 185 186 187 188 189 190 191 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 182 def save_this_fog $fog_info = [$game_map.fog_name, $game_map.fog_hue, $game_map.fog_opacity, $game_map.fog_blend_type, $game_map.fog_zoom, $game_map.fog_sx, $game_map.fog_sy ] end |
#set_local_variable(value, id_var, id_event = @event_id, id_map = @map_id) Also known as: set_VL, set_LV
Set a local variable
122 123 124 125 |
# File 'scripts/00600 Script_RMXP/03100 Game_SelfVariables.rb', line 122 def set_local_variable(value, id_var, id_event = @event_id, id_map = @map_id) key = [id_map, id_event, id_var] $game_self_variables[key] = value end |
#set_self_switch(value, self_switch, event_id, map_id = @map_id) Also known as: set_ss
Set the value of a self_switch
144 145 146 147 148 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 144 def set_self_switch(value, self_switch, event_id, map_id = @map_id) # Notre fonction key = [map_id, event_id, self_switch] # Clef pour retrouver l'interrupteur local que l'on veut modifier $game_self_switches[key] = (value == true) # Modification de l'interrupteur local (on le veut à True ou à False) $game_map.events[event_id].refresh if $game_map.map_id == map_id # On rafraichi l'event s'il est sur la même map, pour qu'il prenne en compte la modification end |
#show_pokemon(pokemon) #show_pokemon(pokemon_id)
Show the Pokemon dex info
244 245 246 247 248 249 250 251 252 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 244 def show_pokemon(pokemon_id) pokemon_id = data_creature(pokemon_id).id if pokemon_id.is_a?(Symbol) if pokemon_id.is_a?(PFM::Pokemon) GamePlay.open_dex_to_show_pokemon(pokemon_id) else GamePlay.open_dex_to_show_page(pokemon_id) end @wait_count = 2 end |
#skill_learn(pokemon, id_skill) ⇒ Boolean Also known as: enseigner_capacite
Learn a skill to a Pokemon
73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 73 def skill_learn(pokemon, id_skill) pokemon = $actors[pokemon] if pokemon.is_a?(Integer) move = data_move(id_skill) raise "Database Error : Skill ##{id_skill} doesn't exists." if move.db_symbol == :__undef__ raise "Pokemon Error: #{pokemon} doesn't exists" unless pokemon.is_a?(PFM::Pokemon) @wait_count = 2 result = nil # Show the skill learn interface GamePlay.open_move_teaching(pokemon, move.db_symbol) do |scene| result = scene.learnt end return result end |
#start_double_trainer_battle(trainer_id, second_trainer_id, bgm: DEFAULT_TRAINER_BGM, disable: 'A', enable: 'B', troop_id: 3, &block)
Start a trainer battle
87 88 89 90 |
# File 'scripts/00700 PSDK Event Interpreter/01300 Interpreter_Sequences.rb', line 87 def start_double_trainer_battle(trainer_id, second_trainer_id, bgm: DEFAULT_TRAINER_BGM, disable: 'A', enable: 'B', troop_id: 3, &block) start_trainer_battle(trainer_id, bgm: bgm, disable: disable, enable: enable, troop_id: troop_id, &block) $game_variables[Yuki::Var::Second_Trainer_ID] = second_trainer_id end |
#start_double_trainer_battle_with_friend(trainer_id, second_trainer_id, friend_trainer_id, bgm: DEFAULT_TRAINER_BGM, disable: 'A', enable: 'B', troop_id: 3, &block)
Start a trainer battle
100 101 102 103 104 |
# File 'scripts/00700 PSDK Event Interpreter/01300 Interpreter_Sequences.rb', line 100 def start_double_trainer_battle_with_friend(trainer_id, second_trainer_id, friend_trainer_id, bgm: DEFAULT_TRAINER_BGM, disable: 'A', enable: 'B', troop_id: 3, &block) start_trainer_battle(trainer_id, bgm: bgm, disable: disable, enable: enable, troop_id: troop_id, &block) $game_variables[Yuki::Var::Second_Trainer_ID] = second_trainer_id $game_variables[Yuki::Var::Allied_Trainer_ID] = friend_trainer_id end |
#start_pc Also known as: demarrer_pc
Start the storage PC
45 46 47 48 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 45 def start_pc Audio.se_play('audio/se/computeropen') GamePlay.open_pokemon_storage_system end |
#start_trade(server)
Start an online Trade
233 234 235 236 237 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 233 def start_trade(server) GamePlay::Trade.new(server).main Graphics.transition @wait_count = 2 end |
#start_trainer_battle(trainer_id, bgm: DEFAULT_TRAINER_BGM, disable: 'A', enable: 'B', troop_id: 3)
Start a trainer battle
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'scripts/00700 PSDK Event Interpreter/01300 Interpreter_Sequences.rb', line 60 def start_trainer_battle(trainer_id, bgm: DEFAULT_TRAINER_BGM, disable: 'A', enable: 'B', troop_id: 3) set_self_switch(false, disable, @event_id) # Better to disable the switch here than in defeat original_battle_bgm = $game_system.battle_bgm $game_system.battle_bgm = RPG::AudioFile.new(*bgm) $game_variables[Yuki::Var::Trainer_Battle_ID] = trainer_id $game_temp.battle_abort = true $game_temp.battle_calling = true $game_temp.battle_troop_id = troop_id $game_temp.battle_can_escape = false $game_temp.battle_can_lose = false $game_temp.battle_proc = proc do |n| yield if block_given? $game_variables[Yuki::Var::Trainer_Battle_ID] = 0 $game_variables[Yuki::Var::Second_Trainer_ID] = 0 $game_variables[Yuki::Var::Allied_Trainer_ID] = 0 set_self_switch(true, enable, @event_id) if n == 0 $game_system.battle_bgm = original_battle_bgm end end |
#steal_pokemon(indexes, id_storage = nil, no_save = false)
Save some Pokemon of the team somewhere and remove them from the party
202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 202 def steal_pokemon(indexes, id_storage = nil, no_save = false) pokemons = [] indexes.each do |i| pokemons << $actors[i] end pokemons.compact! pokemons.each do |pokemon| $actors.delete(pokemon) end unless no_save var_id = id_storage ? "@_str_#{id_storage}".to_sym : :@other_party $storage.instance_variable_set(var_id, pokemons) end end |
#stop_path
Shortcut for get_character(@event_id).stop_path
241 242 243 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 241 def stop_path get_character(@event_id).stop_path end |
#store_pokemon(pokemon_or_id, level = 5, shiny = false) ⇒ PFM::Pokemon? Also known as: stocker_pokemon
Store a Pokemon in the PC
25 26 27 28 29 30 31 32 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 25 def store_pokemon(pokemon_or_id, level = 5, shiny = false) return internal_store_pokemon_final(pokemon_or_id) if pokemon_or_id.is_a?(PFM::Pokemon) return internal_add_pokemon_check_level_shiny(pokemon_or_id, level, shiny, :store_pokemon) if pokemon_or_id.is_a?(Integer) return internal_add_pokemon_check_symbol(pokemon_or_id, level, shiny, :store_pokemon) if pokemon_or_id.is_a?(Symbol) raise 'Argument Error : Pokémon ID cannot be string' if pokemon_or_id.is_a?(String) nil end |
#timed_event_remaining_time(event_id = @event_id, map_id = @map_id) ⇒ Integer
Get the remaining time until the trigger (in minutes)
32 33 34 |
# File 'scripts/00700 PSDK Event Interpreter/01150 Interpreter_Time.rb', line 32 def timed_event_remaining_time(event_id = @event_id, map_id = @map_id) return ($user_data.dig(:tjn_events, map_id, event_id)&.first || current_time) - current_time end |
#trainer_eye_sequence(phrase, eye_bgm: DEFAULT_EYE_BGM, exclamation_se: DEFAULT_EXCLAMATION_SE)
Sequence to call before start trainer battle
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'scripts/00700 PSDK Event Interpreter/01300 Interpreter_Sequences.rb', line 114 def trainer_eye_sequence(phrase, eye_bgm: DEFAULT_EYE_BGM, exclamation_se: DEFAULT_EXCLAMATION_SE) character = get_character(@event_id) character.turn_toward_player front_coordinates = $game_player.front_tile # Unless the player triggered the event we show the exclamation unless character.x == front_coordinates.first && character.y == front_coordinates.last Audio.se_play(*exclamation_se) emotion(:exclamation) EXCLAMATION_PARTICLE_DURATION.times do $game_player.update $scene.spriteset.update Graphics.update end end Audio.bgm_play(*eye_bgm) # We move to the trainer while (($game_player.x - character.x).abs + ($game_player.y - character.y).abs) > 1 character.move_toward_player while character.moving? $game_map.update $scene.spriteset.update Graphics.update end end $game_player.turn_toward_character(character) # We do the speech @message_waiting = true = PFM::Text.(phrase) $scene.() @message_waiting = false @wait_count = 2 end |
#trigger_event_in(amount_of_minutes, local_switch_letter, event_id = @event_id, map_id = @map_id)
Store a timed event (will enable the desired local switch when the timer reached the amount of minutes)
19 20 21 22 23 24 25 26 |
# File 'scripts/00700 PSDK Event Interpreter/01150 Interpreter_Time.rb', line 19 def trigger_event_in(amount_of_minutes, local_switch_letter, event_id = @event_id, map_id = @map_id) next_time = current_time + amount_of_minutes # Store the event to trigger (($user_data[:tjn_events] ||= {})[map_id] ||= {})[event_id] = [next_time, local_switch_letter] # Set its local switch to false set_self_switch(false, local_switch_letter, event_id, map_id) $game_map.need_refresh = true end |
#wait_character_move_completion(event_id = @event_id) Also known as: attendre_fin_deplacement_cet_event, wait_event, attendre_event
Wait for the end of the movement of this particular character
151 152 153 154 |
# File 'scripts/00700 PSDK Event Interpreter/01000 Interpreter_Environnement.rb', line 151 def wait_character_move_completion(event_id = @event_id) @move_route_waiting = true @move_route_waiting_id = event_id end |
#wait_for_player Also known as: attendre_joueur
Shortcut for wait_character_move_completion(0) Wait for the end of the player movement
270 271 272 |
# File 'scripts/00700 PSDK Event Interpreter/01200 Interpreter_Shortcut.rb', line 270 def wait_for_player wait_character_move_completion 0 end |
#withdraw_pokemon(id, counter = 1) Also known as: retirer_pokemon
withdraw a Pokemon from the Party
51 52 53 54 55 56 57 58 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 51 def withdraw_pokemon(id, counter = 1) id = data_creature(id).id $actors.delete_if do |pokemon| next false unless pokemon.id == id && counter > 0 next(counter -= 1) # Any number are treaten as true end end |
#withdraw_pokemon_at(index) Also known as: retirer_pokemon_index
withdraw a Pokemon from the party at a specific position in the Party
63 64 65 |
# File 'scripts/00700 PSDK Event Interpreter/01100 Interpreter_Pokemon.rb', line 63 def withdraw_pokemon_at(index) $actors.delete_at(index) end |
#yes_no_choice(message, yes = nil, no = nil) ⇒ Boolean
Show a yes no choice
47 48 49 50 51 52 |
# File 'scripts/00700 PSDK Event Interpreter/01205 Interpreter_Fiber.rb', line 47 def yes_no_choice(, yes = nil, no = nil) yes ||= text_get(11, 27) no ||= text_get(11, 28) return (, 1, yes.dup, no.dup) == 0 unless @fiber # RMXP Compatibility return (, 2, yes.dup, no.dup) == 0 end |