Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: Level Up Common ACE
- Original author: kyonides
- Original date: March 21, 2024
- Source thread: https://forums.rpgmakerweb.com/threads/level-up-common-ace.167011/
- Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSS3 Scripts (RMVX Ace)
Summary
00. Thus once the leveling up process ends, and the level up message shows up on screen, the game will call that common event in no time. Ruby: # * Level Up Common ACE * #
Archived First Post
Level Up Common ACE
by Kyonides
by Kyonides
Introduction
This simple scriptlet will let you call a given Common Event by leaving an extremely simple note tag in an Actor's Note Box.
Instructions for the Old Script
Ruby:
<level up ce 50>
Thus once the leveling up process ends, and the level up message shows up on screen, the game will call that common event in no time.
Ruby:
# * Level Up Common ACE * #
# Scripter : Kyonides Arkanthes
# 2024-03-18
# Leave a tag in a given Actor's notebox.
# Example: <level up ce 100>
# And it will call that common event after the actor finishes leveling up.
module LvUpCm
COMMON_EVENT = /<level up ce (\d+)>/i
end
class RPG::Actor
def level_up_common_event
@note[LvUpCm::COMMON_EVENT]
$1.to_i
end
end
class Game_Actor
alias :kyon_lvl_up_cmmn_gm_act_lvl_up :level_up
def level_up
kyon_lvl_up_cmmn_gm_act_lvl_up
call_level_up_common_event
end
def call_level_up_common_event
event_id = actor.level_up_common_event
$game_temp.reserve_common_event(event_id) if event_id > 0
end
end
Instructions for the New Script
Ruby:
<level up 1-5 ce 100>
There 1 and 5 define the range of levels while 100 stands for the Common Event #100.
Thus once the leveling up process ends, and the level up message shows up on screen, the game will call that common event in no time.
Ruby:
# * Level Up Common ACE * #
# Scripter : Kyonides Arkanthes
# 2024-03-20
# Leave a tag in a given Actor's notebox.
# Example: <level up 1-5 ce 100>
# And it will call that common event after the actor finishes leveling up.
module LvUpCm
COMMON_EVENT = /<level up \d+-\d+ ce \d+>/i
end
class RPG::Actor
def level_up_common_events
notes = @note.scan(LvUpCm::COMMON_EVENT)
return if notes.empty?
notes.map! {|s| s[/(\d+)-(\d+)....(\d+)/]; [$1.to_i, $2.to_i, $3.to_i] }
end
end
class Game_Actor
alias :kyon_lvl_up_cmmn_gm_act_lvl_up :level_up
def level_up
kyon_lvl_up_cmmn_gm_act_lvl_up
call_level_up_common_event
end
def call_level_up_common_event
ce = actor.level_up_common_events
return unless ce
group = ce.find {|a,b,c| @level.between?(a, b) }
lvl1, lvl2, event_id = group
return unless lvl1 and lvl2 and event_id
$game_temp.reserve_common_event(event_id)
end
end
Download Demo
Terms & Conditions
Free for use in ANY game.
Due credit is mandatory.
Mention this forums in your game credits.
That's it!
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadLicense / Terms Note
Due credit is mandatory. Mention this forums in your game credits. That's it!
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...