03-30-2022, 07:35 PM
(This post was last modified: 03-31-2022, 04:11 AM by kyonides.
Edit Reason: XP + ACE
)
Memorize Events at Will!
Just make sure they will not come back to slap the hell out of your face.
XP Version
Code:
class Interpreter
alias :kyon_int_tool_init :initialize
alias :kyon_int_tool_setup :setup
def initialize(depth=0, main=false)
@memo_events = {} if main
kyon_int_tool_init(depth, main)
end
def setup(list, event_id)
kyon_int_tool_setup(list, event_id)
@memo_events[@map_id] ||= {}
end
def this_map_memo_events() @memo_events[@map_id] end
attr_reader :memo_events
end
ACE Version
Code:
class Game_Map
alias :kyon_map_tool_init :initialize
alias :kyon_map_tool_setup :setup
def initialize
kyon_map_tool_init
@interpreter.setup_memo_events
end
def setup(map_id)
kyon_map_tool_setup(map_id)
@interpreter.setup_map_memo_events(map_id)
end
attr_reader :memo_events
end
class Interpreter
def setup_memo_events() @memo_events ||= {} end
def setup_map_memo_events(map_id)
@map_id = map_id
@memo_events[@map_id] ||= {}
end
def map_memo_events() @memo_events[@map_id] end
def clear_memo_events() @memo_events.clear end
def clear_map_memo_events() @memo_events[@map_id].clear end
end
If you are going to use these events from a custom script, use the following calls:
XP Calls
$game_system.map_interpreter.memo_events[MapID][EventID]
$game_system.map_interpreter.this_map_memo_events[EventID]
ACE Calls
$game_map.interpreter.memo_events[MapID][EventID]
$game_map.interpreter.this_map_memo_events[EventID]
Else if you are editing script commands, use the ones below:
Any Version
memo_events[MapID][EventID]
this_map_memo_events[EventID]
clear_memo_events
clear_map_memo_events
"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.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
My Original Stories (available in English and Spanish)
List of Compiled Binary Executables I have published...
HiddenChest & Roole
Give me a free copy of your completed game if you include at least 3 of my scripts!
Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE