Blizzard's little tricks
Version: 0.4
The ideaEver got tired of wanting to make something pretty simple in your game, but you can't figure out how, so you request a script? RMXP has many possibilities beyond your knowledge. I am making a collection of simple add ons in the database and/or events and I need
your help to make this tute better. Suggestions are more than welcome.
1. Defined-damage skillsWant to make a skill, that does 5000 damage everytime it is used?!
Pictures tell more than words:
2. Killed characters have 1 HP after the end of the battleYou need a script? Don't be silly!
3. The Powers of VariablesNote: To understand this tutorial you need the knowledge how to use the "Call Script" event command.
Note: You do
not really need to understand variables for this tutorial.
Note: Everything that I will show you now also works for switches, but I recommend using variables.
a) Not only numbers!You want to show the name of the
first character in your party in a message window. But RMXP only supports the \n[X] command that refers to the database, not the current party. There is a trick how to override this. Open the event editor and find that command.
Try this here:
Very useful if you have a game where party leader can be chosen and you want the party leader to say all the important things. You can even go further and make a conditional branch with the script command and type into the little window:
$game_variables[1] == "Johnny"
and make it with an "else" branch. Johnny will say something different than i.e. Maria. Of course you have to make both messages for Maria and Johnny. Don't forget to use the "Variable Operation" command and set it to a numeric value again if you use it also for other purposes.
a) Unlimited PARTIES!Use the same Call script command and type:
$game_variables[1] = $game_party
$game_party = Game_Party.new
Your current party will be stored for later and you have a new fresh party for your game with new inventory, new money etc. If you want to restore your old party just type:
$game_variables[2] = $game_party
$game_party = $game_variables[1]
This will store the second party into variable 2 for later, while you can continue playing again with the first party. You can create an unlimited (*cough*) number of parties and make a mulitple game with two stories OR make a game where you play a party in the past, a party in the present and a party in the future OR etc. It's up to you.
4. Create different skillsNote: To understand this tutorial you need the knowledge how to use the "Call script command"
a) Chain skillsBored of ordinary skills? How about an entire chain reaction of skills? It is very simple. Make one normal skill. It even doesn't'need to do anything, but I'll make it attack the enemy. I'll call it Phoenix Burner. Make the skills call an event and name it however you want (I named it Phoenix process).
Now make a second skill that is supposed to be executed right after your first skill. Make the SP cost 0. You can name it however you want. I named it "Phoenix is being summoned", because it has a Phoenix animation.
And now comes the most important part: The common event! My common event activates the second skill, removes "Defeated" and adds "Auto-Revive". Note that this common event only works for actor 1 in the party. If you want more than one actors to have the same chain skill, you need to make another starting chain skill for each character and you need another common event for each character.
Of course you can play around with the event however you like it. i.e. THIS Phoenix Burner skill would cause nearly the same effect as the one before, but only nearly. There is an 80% chance he will revive dead actors, after that another 80% chance of adding Auto-Revive and after that again an 80% chance of executing the second chain skill again. All in all:
- 80% chance of revive
- 80% chance (64% altogether) for auto-revive
- 80% chance (51,2% altogether) of a second summoning of the Phoenix
5. Hero switchThis will allow you to switch the party leading hero by pressing SHIFT one th map. Of course you can change the button. Just use this common event and turn on the appropriate switch. Note that the order in during battle also changes.
6. Universal Script tricksa) Add an option into the normal MenuFind in your extra script lines like this one:
Change them to:
$scene = Scene_Menu.new(INDEX)
where INDEX is the choice on what the cursor should be placed when returning to the menu.
Open Scene_Menu and change
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "Save"
s6 = "End Game"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
to
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = "NEW_OPTION"
s6 = "Save"
s7 = "End Game"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
Now find this part further below in the same script:
when 4 # save
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 5 # end game
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
end
(I removed the comments.) Change it to:
when 4 # Bestiary
$game_system.se_play($data_system.decision_se)
$scene = Scene_NEW_OPTION.new
when 5 # save
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 6 # end game
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
end
Now you have a new option in your menu.
b) Ultimate Font OverrideThis little script will do the job:
#==============================================================================
# Game_System
#==============================================================================
class Game_System
attr_reader :fontname
attr_reader :fontsize
alias init_ultimate_font_override_later initialize
def initialize
init_ultimate_font_override_later
self.fontname = "Arial"
self.fontsize = 24
end
def fontname=(name)
$defaultfonttype = $fontface = @fontname = name
end
def fontsize=(size)
$defaultfontsize = $fontsize = @fontsize = size
end
end
#==============================================================================
# Bitmap
#==============================================================================
class Bitmap
alias init_font_override_later initialize
def initialize(w, h = nil)
if w.is_a?(Numeric) and h.is_a?(Numeric)
init_font_override_later(w, h)
else
init_font_override_later(w)
end
if $game_system.fontname != nil and not $scene.is_a?(Scene_Title)
self.font.name = $game_system.fontname
self.font.size = $game_system.fontsize
else
self.font.name = "Arial"
self.font.size = 24
end
end
end
You can change the font/fontsize with
$game_system.fontname = "FONTNAME"
$game_system.fontsize = FONTSIZE
It will override the font from any RMXP version.
Thanks to: