Blizzard's little tricks

Started by Blizzard, January 12, 2008, 12:50:57 pm

Previous topic - Next topic

Blizzard

January 12, 2008, 12:50:57 pm Last Edit: December 02, 2008, 11:23:34 am by Blizzard
Blizzard's little tricks
Version: 0.4



The idea

Ever 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 skills

Want to make a skill, that does 5000 damage everytime it is used?!
Pictures tell more than words:

Spoiler: ShowHide



2. Killed characters have 1 HP after the end of the battle

You need a script? Don't be silly!

Spoiler: ShowHide



3. The Powers of Variables

Note: 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.

Spoiler: ShowHide


Try this here:

Spoiler: ShowHide


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 skills

Note: To understand this tutorial you need the knowledge how to use the "Call script command"

a) Chain skills

Bored 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).

Spoiler: ShowHide


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.

Spoiler: ShowHide


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.

Spoiler: ShowHide


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



Spoiler: ShowHide



5. Hero switch

This 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.

Spoiler: ShowHide



6. Universal Script tricks

a) Add an option into the normal Menu

Find in your extra script lines like this one:

      $scene = Scene_Map.new


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 Override

This 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:

  • Oops, nobody yet

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

winkio

Can you make defined damage weapons the same way as the skills?  I tried it and it didn't work...

Blizzard

Nope. Hm... How about I make this add-on now and release it in Tons of Add-ons? Right now I'm working on a new release of CRLS, RO Job/Skill System and Easy Party Switcher since I have some free time today.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Calintz


Nortos

January 27, 2008, 06:02:38 am #4 Last Edit: February 06, 2008, 04:50:30 pm by Nortos
I got something you could add Blizz random battle music
change this line in scene_map
$game_system.bgm_play($game_system.battle_bgm)

to...
 Audio.bgm_play("Audio/BGM/battlemusic" + rand(10).to_s, 100, 100)


where 10 is the amount of songs have and you name all your songs battlemusic0, battlemusic1, battlemusic2 and so forth

Calintz


G_G

Hey blizz add this in here, the little dash trick

Hold Shit to Run: ShowHide
 
Branch if A is being held
   Change Speed to 5
else
   Change Speed to 4
End

Remember to add switches to turn it off durint the cutscene. Blizzard told me this

Chaze007

heh these helped a lot, thanks.
Always I Wanna Be With You! Make Believe With You!

Blizzard

No, game_guy, that's an event system, not a simple functionality of RMXP that can be actually done without complicated events/scripts.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

shdwlink1993

August 21, 2008, 01:53:19 am #9 Last Edit: December 02, 2008, 11:22:16 am by Blizzard
Umm... game_guy? You might want to edit shit to shift. :^_^': I certainly do not want to hold a bunch of crap whenever I feel like running, thanks anyway. :haha:
Stuff I've made:




"Never think you're perfect or else you'll stop improving yourself."

"Some people say the glass is half full... some half empty... I just wanna know who's been drinking my beer."

cstb

August 22, 2008, 10:24:42 am #10 Last Edit: September 03, 2008, 03:31:02 pm by cstb
Blizz how can i make hero switch change the first 2 characters in the database alone?Because When i use it then my third character switches to the first one.
EDIT:*bump*
Chronos: Failed project due to loss of data.
Maybe I could try again...


Which Final Fantasy Character Are You?
Final Fantasy 7

cstb

bump.ANSWER MAH QUESTION plz?...
Chronos: Failed project due to loss of data.
Maybe I could try again...


Which Final Fantasy Character Are You?
Final Fantasy 7

Blizzard

It cycles through the party when you use that script, no skipping. And how would you expect this to work? It would look pretty dumb if you changed it like this:

1234
2341
1234
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

cstb

ooo.because i was hoping that i could switch my main characters and not the guests.
Chronos: Failed project due to loss of data.
Maybe I could try again...


Which Final Fantasy Character Are You?
Final Fantasy 7

Blizzard

You should have tried it out first. :P
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Satoh

Somehow I think I'd run if I were holding shit.... >.>
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Calintz

Blizzard...
You're a sneeeeaky little bastard!!

Shining Riku

 :huh: Heya, I was just wondering. I really like your Stormtronics custom menu, Blizz, but i'd like to add a few more options into it.

All the stuff you said about adding an extra option in this tute, does that work for your menu too? Am I even allowed to modify it? :wacko:
'Cause I really love the menu interface and I don't want to change it back to the default menu. Bleah.

...........Is this even the right place to ask those questions anyways? :(

Calintz

...Lol, I am sure Blizzard doesn't care if you tweak the script to adapt to YOUR GAME'S specific needs, so long as you don't attempt to take credit for the changes. Let's face it...Adding an option or two into his CMS doesn't give anybody the right to claim any form of credit...

Hell, I have tweaked his CMS to fit my game.
My main character has an artbook where you can view the important pictures that are viewed throughout the game. I added this artbook to the menu so that you can view them anytime you feel like it =)

Shining Riku

Sweet. Thanks for the fast reply, Calintz. :) So, just making sure...If I wanna add another option to his menu I do all that in the Stormtronics CMS script, righto?