Movie Script, Sound Spawn script |
|
|
|
|
Apr 9 2008, 02:58 PM
|

Level 5

Group: Member
Posts: 60
Type: Event Designer
RM Skill: Skilled

|
Update 4/18/08 ---------------------- Main Movie Script #Author: Sound Spawn# #Enhanced Animemage# -not recommended for Fullscreen- -It is not recommended to use this script in a Finished Game, however use at your own risk.- -this script will not affect game development, this is a add-on.- --This Script was posted so Other's can help with it's development-- Here is Sound Spawns AVI script(now MPG), not mine so don't ask me how to use it. -Works with RMXP and RMVX- you will need at least a 640x480 video resolution in .mpg format -for RMXP- you will need at least a 544x416 video resolution in .mpg format -for RMVX- or use Graphics.resize_screen(width, height) (I'd suggest finding a video recoder, Converter) I like Free Video Converter(needs .net framework 2.0) I recommend using MPEG-1, WMV7 video Codecs with 25FPS, 512kbps or 256kbps and MP2, WMA Audio Codecs with 44100 Frequency, Stereo, and 128kbps. #note: Full Screen Call buggy# #Resolution that are smaller than 640x480 will lock to topleft screen; bigger than 640x480 will lose bottom and right portions of movie# Make file called Movies in <Mydocuments>/<RMXP or RMVX>/<your project>/Movies ie subdirectory (yourgame\data, yourgame\graphics, yourgame\movies <-put mpg files here) Insert new script file in Script Editor under Scene_****'s name new file - Scene_Movie Copy and Paste code in empty script window follow the inset instructions CODE ##Copy this into a new section of your game. ##To play a file, move the mpg file into a "movies" subdirectory ##(yourgame\data, yourgame\graphics, yourgame\movies). ##Then call '$scene = Scene_Movie.new("filename")' where filename is your movies actual filename ## (minus the .mpg). #exapmple Scene_Movie.new("???") ## If you want to play multiple movies in a row ##(for example before the game starts, maybe a "developed by", "produced by", "intro movie" ## set or something... Go to the "main" section of code and find the line "$scene = Scene_Title.new". ##Just after that line add: ##CODE ##Audio.bgm_play("Movies/" + 'dev_by', 100, 100) #loads movie ##Audio.bgm_play("Movies/" + 'pro_b', 100, 100) #loads movie ##Audio.bgm_play("Movies/" + 'intro', 100, 100) #loads movie ##Audio.bgm_stop ##$scene = Scene_Movie.close_scene #closes active movie window ##$scene = Scene_Movie.new("dev_by") ##$scene = Scene_Movie.new("pro_by") ##$scene = Scene_Movie.new("intro") ##$scene = Scene_Title.new class Scene_Movie def initialize(movie) @readini = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l' @movie_name = Dir.getwd()+"\\Movies\\"+movie+".mpg" main end
def main
game_name = "\0" * 256 @readini.call('Game','Title','',game_name,255,".\\Game.ini") game_name.delete!("\0") @wnd = Win32API.new('user32','FindWindowEx','%w(l,l,p,p)','L') @temp = @wnd.call(0,0,nil,game_name).to_s movie = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','V') movie.call("open \""+@movie_name+"\" alias FILE style 1073741824 parent " + @temp.to_s,0,0,0) @message = Win32API.new('user32','SendMessage','%w(l,l,l,l)','V') @detector = Win32API.new('user32','GetSystemMetrics','%w(l)','L') @width = @detector.call(0) if @width == 640 fullscreen Graphics.update sleep(1) Graphics.update sleep(1) Graphics.update sleep(1) end status = " " * 255 movie.call("play FILE",0,0,0) loop do sleep(0.1) # @message.call(@temp.to_i,11,0,0) #Remove '#' if using RMXP # Graphics.update #Remove '#' if using RMXP @message.call(@temp.to_i,11,1,0) Input.update movie.call("status FILE mode",status,255,0) true_status = status.unpack("aaaa") if true_status.to_s != "play" break end if Input.trigger?(Input::B) #can change or add Input::C Input.update break end end movie.call("close FILE",0,0,0) bail end
def bail if @width == 640 fullscreen end end end
def fullscreen()
$full.call(18,0,0,0) $full.call(13,0,0,0) $full.call(18,0,2,0) $full.call(13,0,2,0) end $full = Win32API.new('user32','keybd_event','%w(l,l,l,l)','')
def close_scene $keybd = Win32API.new ('user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v') $keybd.call 0xA4, 0, 0, 0 $keybd.call 0x73, 0, 0, 0 $keybd.call 0x73, 0, 2, 0 $keybd.call 0xA4, 0, 2, 0 end #End Movie Script# To make intro movie call script in Main(Script Editor) Put scene_movie above scene_title - Leave Quotes in "" rename movie to your mpg file(exlude .mpg) CODE Audio.bgm_play("Movies/" + 'movie', 100, 100) Audio.bgm_stop $scene = Scene_Movie.close_scene #closes active movie window $scene = Scene_Movie.new("movie") $scene = Scene_Title.new To make multiple scenes CODE Audio.bgm_play("Movies/" + 'splash', 100, 100) Audio.bgm_play("Movies/" + 'developedby', 100, 100) Audio.bgm_play("Movies/" + 'movie', 100, 100) Audio.bgm_stop $scene = Scene_Movie.close_scene #closes active movie window $scene = Scene_Movie.new("splash") $scene = Scene_Movie.new("developedby") $scene = Scene_Movie.new("movie.mpg") #will not work(because of '.mpg'), will skip $scene = Scene_Title.new To call in game; call script using 'call script event' CODE Audio.bgm_play("Movies/" + 'movie', 100, 100) Audio.bgm_stop $scene = Scene_Movie.close_scene $scene = Scene_Movie.new("movie") $scene = Scene_Map.new return ------------------------------------------ #you can add this to the script; but you can just use event commands after script call $scene = Scene_Movie.new("movie") $game_map.events[1].erase #Event number to erase/ if event001=[1] $game_map.setup(1) #Move player to map/ if map001=(1) $game_player.moveto(0,0) #Move Player to tile/ (0,0)=topleftcorner $game_player.refresh #player refresh $scene = Scene_Map.new #reset map $game_map.autoplay #load game #don't forget to Stop BGM & BGS before script; then enable BGM & BGS after script# This is the most complete guide to movie script I hope you like it. All thanks and praise for script is associated to 'Sound Spawn' --This Script was posted so Other's can help with it's development--
This post has been edited by anime4mage: May 27 2008, 07:44 AM
__________________________
|
|
|
|
|
|
|
|
|
Apr 16 2008, 09:39 AM
|

Level 5

Group: Member
Posts: 60
Type: Event Designer
RM Skill: Skilled

|
** Update 4/16/08 Movie script will play other files. However Script is very unstable and fails to play video most the time. Here are supported/unsupported formats and codecs. CODE Supported formats | Unsupported formats asf, avi, mpg, wmv | vob, flv, 3g2, 3gp, mp4
Supported Video codecs wmv7, wmv8, Mpeg-1, Mpeg-2, rawvideo(works best, high in file size)
Unsupported Video codecs H.263, H.264, Mpeg-4, MS-Mpeg4-V1, MS-Mpeg4-V2, divx, divx5, DVdigitalVideo, Xvid
Supported Audio codecs | Unsupported Audio codecs WMA, Mp2, MP3 | ACC, AC3 To Play other format change (.mpg) from Movie_Scene(Script Editor) CODE @movie_name = Dir.getwd()+"\\Movies\\"+movie+".mpg" # (.mpg) to .asf, .avi, .wmv I recommend using MPEG-1, WMV7 video Codecs with 25FPS, 512kbps or 256kbps and MP2, WMA Audio Codecs with 44100 Frequency, Stereo, and 128kbps. -Ability to play Movie script may depend on your computer system.- #note: I have had difficulty playing this script, RawVideo avi files worked best but a 4sec movie was 20MB. I was able to play a .mpg file 'successfully' a couple times. This is because if you load the active movie window i.e.-audio/bgm- the .mpg will work. Also the video works but gets missplaced out of the game screen. -It is not recommended to use this script in a Finished Game, however use at your own risk.- ----------------------------------------------------------------------------------------------------------- Update 4/18/08 Completed RMVX RMXP Movie Script Release is fully compatible with RMVX RMXP #but still has issues with Fullscreen. -Special Thanks to ERZENGEL for [alt+F4] script- Without it movies would load differently. #still is a crude way to load video but works.
This post has been edited by anime4mage: Apr 23 2008, 07:55 AM
__________________________
|
|
|
|
|
|
|
|
|
Apr 29 2008, 09:00 AM
|

Level 6

Group: Member
Posts: 88
Type: Event Designer
RM Skill: Skilled

|
I managed to get the hanging script error off, but the movie doesn't stop playing when it finishes. I actually have a few revisions of this script with me. The oldest version of the script works great for me on my crappy, laggy computer at home, but it doesn't work at all on my top of line computer at work[yes I have RMXP at work, I work late a lot  ]. Which version of the script would you like me to send you? The one that works great on my computer at home? Your version of the script works great on my computer at work.
|
|
|
|
|
|
|
|
|
Apr 29 2008, 12:28 PM
|

Level 6

Group: Member
Posts: 88
Type: Event Designer
RM Skill: Skilled

|
QUOTE (anime4mage @ Apr 29 2008, 11:37 AM)  Well I did say 'it may depend on your computer system' in an update reply.
I wonder if you have Windows Vista, I have heard that XP won't work on Vista and if this has anything to with RGSS moving to RGSS2 in RMVX; I don't know.
I do know the movie script works well now because the older script couldn't load the movie and just play audio. My fix was loading the movie window and disable it; Then the movie would load on the screen perfectly.
Have you compared the scripts from work and home?
Well you can send the not working one. That's just it the script from home is the same script from work. The oldest version of this script is the one that works on my computer at home, but not at home. While the newest version[yours] doesn't end. The movie just keeps playing over and over again.
|
|
|
|
|
|
|
|
|
Apr 29 2008, 01:04 PM
|

Level 5

Group: Member
Posts: 60
Type: Event Designer
RM Skill: Skilled

|
try this CODE Audio.bgm_play("Movies/" + 'movie', 100, 100) Audio.bgm_stop $scene = Scene_Movie.close_scene $scene = Scene_Movie.new("movie") $scene = Scene_Map.new or this CODE Audio.bgm_play("Movies/" + 'movie', 100, 100) Audio.bgm_stop $scene = Scene_Movie.close_scene $scene = Scene_Movie.new("movie") $game_map.events[1].erase $game_map.setup(1) $game_player.moveto(0,0) $game_player.refresh $scene = Scene_Map.new $game_map.autoplay '$scene = Scene_Map.new' will close the movie file actually it calls a new map. are you using avi file? or mpg? are you using a autostart event? Parallel Process? if so don't.
__________________________
|
|
|
|
|
|
|
|
|
Jul 13 2008, 01:26 PM
|
Level 6

Group: Member
Posts: 80
Type: Artist
RM Skill: Skilled

|
QUOTE (Automaton @ Jul 12 2008, 01:27 PM)  so what do we do to make a moving title screen? (the movie would be the title but you can click newgame, load or quit while its running and it loops, how?) it is much easier to use a, title animation script. this would make the title extremely heavy... But anyway, it's a good scriptt. I hope it gets fully fixed soon :3
|
|
|
|
|
|
|
|
|
Jul 26 2008, 10:38 AM
|
Level 6

Group: Member
Posts: 80
Type: Artist
RM Skill: Skilled

|
QUOTE (Automaton @ Jul 14 2008, 01:40 PM)  well do you know any title animation scripts? I'm certain I saw two. One by Mogslayer, which uses three or more layers of image to create an animated title, and another one which I don't know who created, that uses a sequence of pictures to animate the title. I don't have any of them, unfortunately... Also, you could look for "RMXPflash", which is the first script that allows the use of SWF files with RPG maker XP :3
|
|
|
|
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
RPG RPG Revolution is an Privacy
Policy and Legal
|
|