Version - 0.1a Author - AlphaWhelp Release Date - 5/15/09
Introduction
For those of us who can draw... or have a big budget, but not nearly enough for a full animated movie, I have created a script which will add a comic book scene to your game. If you have ever played Folklore, you get the idea what kind of scene this can create for you (although it won't look anywhere near as fancy). This script is great for creating cut scenes in which you want to show action that simply can't be done with sprites and animations. You're on your own to get the comic pages, though.
Yes I know this can be done with events--but I wrote this script because...
1. It was an experiment to see if I could do it. 2. I was motivated to do it. 3. I like to program. 4. This makes adding comic book cutscenes to your game very very easy so you can do it without being an event command master. 5. The process for adding comic scenes is more streamlined with a script.
Features
Uhh, in case it wasn't obvious, this script only has one feature--add a comic book cutscene to your game
This script allows you to quickly and easily add a comic book scene to your game. When the script is called, it opens up by displaying the first page of your comic. Pressing the enter key will turn to the following page in your comic, accompanied by a nifty little page flip sound effect. When you have reached the last page of your comic, pressing the enter key once more returns you to the map.
Instructions: To call a comic scene, make an script event command that looks like: $scene = Scene_Comic_A.new
To put pages into your comic scene, first import your comic pages into the Pictures folder in the resource manager, then, between the lines: COMIC=<<_END_ and ENDCOMIC type the names of the pages in the order that you wish to appear. Do not leave any blank lines between these two lines because doing so will cause a black page.
Currently this script does not support multiple comic scenes, however for every comic scene you wish to have in addition to the first, simply copy and paste this script directly underneath itself, then change the line "class Scene_Comic_A" into "class Scene_Comic_B" then delete the lines in the second script between COMIC=<<_END_ and ENDCOMIC and replace them with the pages of your second comic scene. Then, to call the second comic scene, make a script event command: $scene = Scene_Comic_B.new
There is no theoretical limit to the number of comic scenes you can have this way, have fun and enjoy the script. Credit to AlphaWhelp.
-AlphaWhelp
Comic Book Scenes version 0.1a Created 5/15/09 11:22 p.m.
def main comic_pages = COMIC.split(/\n/) @sprite = Sprite.new Audio.me_stop Audio.bgs_stop Audio.se_stop @firsttime = true comic_pages.each_index do |i| @page = comic_pages[i] @keypressed = false if @firsttime @sprite.bitmap = Cache.picture(@page) Graphics.transition Graphics.update @firsttime = false else until @keypressed Input.update Graphics.transition Graphics.update continue end end if $scene != self break end end end
def cancel? if Input.trigger?(Input::C) if @page == "ENDCOMIC" $scene = Scene_Map.new @keypressed = true return true else @sprite.bitmap = Cache.picture(@page) @keypressed = true Audio.se_play("Audio/SE/PageFlip") return true end end return false end
def continue return if cancel? end end
Customization
The only thing you will be able to change about this script is the sound effect that plays when flipping a page. There are many sound effect websites you can look up to find a page flip sound effect. It's a common enough sound effect that you can probably find one that is public domain, but if you get one with a credit for the one who recorded it, you must remember to credit that person in addition to me when using this script.
Compatibility
Barring bizarre circumstances that I can't even imagine, this script should be compatible with every other script you have in your game.
Screenshot
Can't really show you the script with screenshots.
Import PageFlip into Audio/SE and import the PNG files into Graphics/Pictures the PNG files are provided for you to test the comic book scene--they are not an actual comic, just testing files.
FAQ
Q: How do I install this script?
A: Copy and paste it below Materials and above Main, but it doesn't matter where in between it goes. Do not forget to download the accompanying files or else your game will crash when it tries to access them.
Q: There's a completely blank black page in my comic?
A: You left a blank line in a place where the instructions specifically said don't leave a blank line. Please reread and follow the instructions provided in the script in its comments.
Credits
All credits to AlphaWhelp, please and thank you.
Terms and Conditions
You must credit me if you use the script, and you must credit whoever drew your comic. If you can draw your own comics, congratulations. YOU MAY NOT USE THIS SCRIPT AT ALL IF YOU PLAN ON USING COPYRIGHTED IMAGES IN YOUR COMIC SCENE WITHOUT PERMISSION FROM THE PERSON WHO DREW THEM. I DON'T CARE HOW OBSCURE THE IMAGE OR ARTIST IS. DON'T DO IT.
Fade Victory ME after battle end (fully compatible)
CODE
class Scene_Battle < Scene_Base alias kill_victory_me battle_end def battle_end(result) RPG::ME.fade(500) kill_victory_me(result) RPG::ME.stop end end
Simple footsteps sound: Note Knock is a pretty terrible footstep sound, you should download your own.
CODE
class Game_Party < Game_Unit alias footsteps_on_player_walk on_player_walk def on_player_walk footsteps_on_player_walk RPG::SE.new("Knock", 1, 150).play end end
What would you like me to add? No guarantees but if I think your suggestions are cool enough I'll get to work.
When I made this script, I stopped programming features once it accomplished everything that I needed it to accomplish for my game, so I understand that it might be a little lacking.
Edit: Lurking I can tell you're still reading this thread based on the little box at the bottom and you haven't replied for a while now. Honestly, if you're not going to give constructive criticism then don't reply. I would rather my thread be empty than filled up with useless garbage like that.
This post has been edited by AlphaWhelp: May 15 2009, 10:24 PM
Fade Victory ME after battle end (fully compatible)
CODE
class Scene_Battle < Scene_Base alias kill_victory_me battle_end def battle_end(result) RPG::ME.fade(500) kill_victory_me(result) RPG::ME.stop end end
Simple footsteps sound: Note Knock is a pretty terrible footstep sound, you should download your own.
CODE
class Game_Party < Game_Unit alias footsteps_on_player_walk on_player_walk def on_player_walk footsteps_on_player_walk RPG::SE.new("Knock", 1, 150).play end end
For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.
Thanks in advance.
Hey there,
Well I don't make battle neither though I can still teach you some things :)... The way I've learned to script is by reading other scripts for the most part. I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!! The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script. You also need to feel the competition that's around in the scripting-community. Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P So that's an other thing... You also don't need to be afraid to learn from others or helpfiles. When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember. Then, you must be calm, cause you need to try the script a lot of times. When I write a script, I test it after almost every changes. First I set up the major structure. Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base def initialize(x,y,width,height) super(x,y,width,height) refresh end
def refresh self.contents.clear draw_contents end
def draw_contents draw_something(with, some, parameters) end
def update refresh if @something != @what_it_should_be end end
So that's also very important. Then, the biggest thing I learned scripting from is TRIAL AND ERROR. That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.
So that's it how I did it. Now it's up to you. Do some requests (if I didn't do it allready :P) and learn from them.
Hope that helped you out a little. If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials. Perhaps they're going to be usefull for you one day ;)
Perhaps you can look at my Read! script. It can do the same, so perhaps you want to look in to it to find some usefull tips?
(Or just leave it and use my script )
Greatzz, SojaBird.
Your Read! script is very nice, and I like looking at other scripts to learn how to write them but yours doesn't really do the same thing mine does. Mine is a lot more simple. I made it in like 10 minutes.
Fade Victory ME after battle end (fully compatible)
CODE
class Scene_Battle < Scene_Base alias kill_victory_me battle_end def battle_end(result) RPG::ME.fade(500) kill_victory_me(result) RPG::ME.stop end end
Simple footsteps sound: Note Knock is a pretty terrible footstep sound, you should download your own.
CODE
class Game_Party < Game_Unit alias footsteps_on_player_walk on_player_walk def on_player_walk footsteps_on_player_walk RPG::SE.new("Knock", 1, 150).play end end
Well, my script CAN DO the same (display several pictures in a row (check the demo (in the bookshop on the counter))), though you can scroll trough them.
Well anyway, keep it up. You'll be a good scripter soon and you'll be able to make it more easy to let the player use this script even with more easy
For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.
Thanks in advance.
Hey there,
Well I don't make battle neither though I can still teach you some things :)... The way I've learned to script is by reading other scripts for the most part. I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!! The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script. You also need to feel the competition that's around in the scripting-community. Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P So that's an other thing... You also don't need to be afraid to learn from others or helpfiles. When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember. Then, you must be calm, cause you need to try the script a lot of times. When I write a script, I test it after almost every changes. First I set up the major structure. Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base def initialize(x,y,width,height) super(x,y,width,height) refresh end
def refresh self.contents.clear draw_contents end
def draw_contents draw_something(with, some, parameters) end
def update refresh if @something != @what_it_should_be end end
So that's also very important. Then, the biggest thing I learned scripting from is TRIAL AND ERROR. That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.
So that's it how I did it. Now it's up to you. Do some requests (if I didn't do it allready :P) and learn from them.
Hope that helped you out a little. If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials. Perhaps they're going to be usefull for you one day ;)
Group: Member
Posts: 1
Type: None
RM Skill: Undisclosed
This seems fairly useful. I'll have to try and use it in one of my future games. (The comic in the demo is so beautiful...I've never seen a comic like that before =D)
Cna yuo raed tihs? Olny 55% of plepoe can. I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt! fi yuo cna raed tihs, palce it in yuor siantugre.
This seems fairly useful. I'll have to try and use it in one of my future games. (The comic in the demo is so beautiful...I've never seen a comic like that before =D)
Fade Victory ME after battle end (fully compatible)
CODE
class Scene_Battle < Scene_Base alias kill_victory_me battle_end def battle_end(result) RPG::ME.fade(500) kill_victory_me(result) RPG::ME.stop end end
Simple footsteps sound: Note Knock is a pretty terrible footstep sound, you should download your own.
CODE
class Game_Party < Game_Unit alias footsteps_on_player_walk on_player_walk def on_player_walk footsteps_on_player_walk RPG::SE.new("Knock", 1, 150).play end end
Group: Member
Posts: 18
Type: None
RM Skill: Undisclosed
Sorry to necro, but that's the the great american way, that site is blocked so we can't download the demo, or the files that are needed. Does anyone have it? I'm sure we can just use the script but I don't remember what files were needed...
Group: +Gold Member
Posts: 1,522
Type: Scripter
RM Skill: Undisclosed
The only necessary file is an audio file called PageFlip, which has to be played in the Audio/SE folder (see line 91 of the code, I'd probably just change "PageFlip" to "Cursor" or something that comes with RMVX by default since I'm lazy).
Other than that, you can see on lines 43 - 48 the code:
That tell the script to look for the fullscreen (544x416) images, called Scene1, Scene2, Scene3, Scene4 and ENDCOMIC which need to be put in the Graphics/Pictures folder.
__________________________
K.I.S.S. Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.