Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

3 Pages V   1 2 3 >  
Closed TopicStart new topic
> Movie Script, Sound Spawn script
anime4mage
post Apr 9 2008, 02:58 PM
Post #1


Level 5
Group Icon

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#
[Show/Hide] Example

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
[Show/Hide] Example

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
[Show/Hide] Example1
[Show/Hide] Example2

#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
Attached File(s)
Attached File  Movie_Script.html ( 25.71K ) Number of downloads: 919
 


__________________________
http://www.animemage.org<< My website (^^)
Go to the top of the page
 
+Quote Post
   
anime4mage
post Apr 16 2008, 09:39 AM
Post #2


Level 5
Group Icon

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


__________________________
http://www.animemage.org<< My website (^^)
Go to the top of the page
 
+Quote Post
   
xerious
post Apr 16 2008, 09:40 AM
Post #3



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Beginner




Great Work SS, laugh.gif laugh.gif biggrin.gif laugh.gif wink.gif

i make good use of this script biggrin.gif

BTW,the resolution for the avi's in RPGVX is 544px X 416px

hopefully anyone can use this info just as me cool.gif

greetz,
Xerious
Go to the top of the page
 
+Quote Post
   
anime4mage
post Apr 16 2008, 09:52 AM
Post #4


Level 5
Group Icon

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




Currently I am looking on how to close the active movie window without acctually loading an audio file(alt+F4).
or
I am looking on how the Active movie window loads the videos so the popup window doesn't appear(this would probably help fullscreen issues)

-anybody who knows how to do this can PM me-

There are alot of issue's with fullscreen.

So far this work's really well with 'RMVX'


__________________________
http://www.animemage.org<< My website (^^)
Go to the top of the page
 
+Quote Post
   
anime4mage
post Apr 18 2008, 01:57 PM
Post #5


Level 5
Group Icon

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




Whooo!

I finally did it! I made some work around for the movie script and made it able to play video.
The script was from sound spawn [who mysteriously disappeared] and left an ineffective script.
I just made work around to the script to play effectively.
ERZENGEL gave me an (alt+F4) script to close windows; with out it movie would appear blank. #Thank YOU!#

Loading the movie may be a crude work around, but it WORKS! #just that fullscreen mode doesn't work#

Thank you everyone, if you supported me.

#now it depends if I continue work on this script, but I need to do this cause for me it would come in handy.#


__________________________
http://www.animemage.org<< My website (^^)
Go to the top of the page
 
+Quote Post
   
anime4mage
post Apr 23 2008, 07:59 AM
Post #6


Level 5
Group Icon

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




just a little bump and update.

added some recommeded codecs to recode video.

and reposted the script download.

This post has been edited by anime4mage: Apr 23 2008, 08:00 AM


__________________________
http://www.animemage.org<< My website (^^)
Go to the top of the page
 
+Quote Post
   
Firestalker5
post Apr 23 2008, 09:15 AM
Post #7


Level 6
Group Icon

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




I have a question..... how would you make it so it can be called during battle?

I'm actually using the older version for my game as a Summon [ALA FFVII where the summon is an attack not a character].

I tried it, but I got a script is hanging error while the movie was playing and the whole thing was shutdown.
Go to the top of the page
 
+Quote Post
   
anime4mage
post Apr 29 2008, 07:42 AM
Post #8


Level 5
Group Icon

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




Sorry for the late Reply I was busy over the weekend.

I really had no problems using it in battle mode the way I used it, by using the database/monster group[script window].

But the only problem I encountered was returning to scene pulling me out of battle.

Originally the script wasn't meant for battle, it was just made to give users cutscenes.

can you give me the code of how you are using it?

This post has been edited by anime4mage: Apr 29 2008, 07:44 AM


__________________________
http://www.animemage.org<< My website (^^)
Go to the top of the page
 
+Quote Post
   
Firestalker5
post Apr 29 2008, 09:00 AM
Post #9


Level 6
Group Icon

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 tongue.gif ].

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.
Go to the top of the page
 
+Quote Post
   
anime4mage
post Apr 29 2008, 12:23 PM
Post #10


Level 5
Group Icon

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




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. or 'whatever' just put good labels on them so I know what is what.

##oh yeah I forgot. In XP you will have to remove the '#' from the script at line '#Remove '#' if using RMXP'

This post has been edited by anime4mage: Apr 29 2008, 12:34 PM


__________________________
http://www.animemage.org<< My website (^^)
Go to the top of the page
 
+Quote Post
   
Firestalker5
post Apr 29 2008, 12:28 PM
Post #11


Level 6
Group Icon

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.
Go to the top of the page
 
+Quote Post
   
anime4mage
post Apr 29 2008, 01:04 PM
Post #12


Level 5
Group Icon

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.


__________________________
http://www.animemage.org<< My website (^^)
Go to the top of the page
 
+Quote Post
   
Firestalker5
post Apr 29 2008, 01:30 PM
Post #13


Level 6
Group Icon

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




I use a WMV.

I call the event from a common event, so it's not an auto-start or parallel Process.

I call the movie by using a skill in battle. I have used other things for cutscenes in the game itself. I was trying to make a summon system like Legend of Legia II [where the summon comes out and attacks then disappears].
Go to the top of the page
 
+Quote Post
   
Suraksin Varja
post May 9 2008, 03:23 AM
Post #14


Level 4
Group Icon

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




Yo!~ first off thanks for tweaking it for VX, just uh, cant seem to get my video down to 544 x 416, tried using your resize code too.. meh maybe I'm messin it up somewhere, idunno... any pointers? wallbash.gif
Go to the top of the page
 
+Quote Post
   
anime4mage
post May 27 2008, 07:47 AM
Post #15


Level 5
Group Icon

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




update, Ok put in some examples put in color coded HTML file no more TXT


__________________________
http://www.animemage.org<< My website (^^)
Go to the top of the page
 
+Quote Post
   
Elighja
post May 30 2008, 08:20 PM
Post #16


Graphics Designer/Programmer
Group Icon

Group: Revolutionary
Posts: 202
Type: Developer
RM Skill: Advanced




So what do we change to change the movie name when launching it ingame? because right not the movies name is movie by default right?

Edit:// also when i try to run in game its like it just skips the movie and repositions my guy.

P.S: could you maybe make a demo?
Go to the top of the page
 
+Quote Post
   
Automaton
post Jul 12 2008, 09:13 AM
Post #17


Level 27
Group Icon

Group: Revolutionary
Posts: 632
Type: Artist
RM Skill: Skilled




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?)


__________________________
Go to the top of the page
 
+Quote Post
   
Yanazake
post Jul 13 2008, 01:26 PM
Post #18


Level 6
Group Icon

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
Go to the top of the page
 
+Quote Post
   
Automaton
post Jul 14 2008, 09:18 AM
Post #19


Level 27
Group Icon

Group: Revolutionary
Posts: 632
Type: Artist
RM Skill: Skilled




well do you know any title animation scripts?


__________________________
Go to the top of the page
 
+Quote Post
   
Yanazake
post Jul 26 2008, 10:38 AM
Post #20


Level 6
Group Icon

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
Go to the top of the page
 
+Quote Post
   

3 Pages V   1 2 3 >
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 02:57 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker