[RMXP]Credits Script

Started by Jek, July 26, 2010, 12:57:08 am

Previous topic - Next topic

Jek

I had an idea for a script. A credits script! All it does is allows you to make easy credits. Maybe even with afew optional features:

  • Scroll Direction (Up, down, left, at a 12 degree angle upward)

  • Transition (Is it scrolling up, fade in and out, or something else?)

  • Over an image or map (Self explanatory)

  • Text size, color, and type(Bold/Italics/Underlined)

  • Images scrolling up with text

  • Text alignment (Center, left, right)

  • Font change

  • Special Effects (Battle animations that scroll up? Glowing text?)

  • Link text to URL

  • Horizontal Rules


WhiteRose

Just create a picture with the credits, and show the picture off the screen and use the move picture command. That way, you can include images in the credits, as well.

Hellfire Dragon

Script is easier than making an image, also it's easier to update if you forget something :P

As for the script, I almost certain the credits is included in Scrive, if not I have it if you want it.

WhiteRose

July 26, 2010, 12:07:18 pm #3 Last Edit: July 26, 2010, 07:01:05 pm by WhiteRose
Quote from: Hellfire Dragon on July 26, 2010, 09:32:01 am
Script is easier than making an image, also it's easier to update if you forget something :P

As for the script, I almost certain the credits is included in Scrive, if not I have it if you want it.


You do have a point; I didn't think of that.

This Scrive looks interesting; from the screenshots and description, it seems to be something like G_G's Cybele, but only for scripts. Is that right?

G_G

July 26, 2010, 05:57:29 pm #4 Last Edit: July 26, 2010, 07:10:30 pm by game_guy
Yup.

WhiteRose


Jek

I downloaded Scrive and it doesn't work. There is no support topic either. I think its down or something.

Sacred Nym

Perhaps this is what you're looking for?
Quote昨日の自分に「さようなら」
Say "Goodbye" to who you were yesterday.

stripe103

Quote from: Jek on July 26, 2010, 07:47:50 pm
I downloaded Scrive and it doesn't work. There is no support topic either. I think its down or something.
It worked just fine for me. Slow, but it works.

Hellfire Dragon

If you're still looking for this script, here it is.

I'm pretty sure that's one included in Scrive.

Dweller

I´m using this script on a project (hellfire_dragon script link) and if you play a background music on the credit scene and you cancel the scene after it finished, the music still plays.

I´m not a scripter but "playing" with the code changed it to stop the background music if you cancel the credit screen:

CREDITS_FONT = ["Times New Roman"]
CREDITS_SIZE = 26
CREDITS_OUTLINE = Color.new(0,0,127, 255)
CREDITS_SHADOW = Color.new(0,0,0, 100)
CREDITS_FILL = Color.new(255,255,255, 255)

#==============================================================================
# ¦ Scene_Credits
#------------------------------------------------------------------------------
# Scrolls the credits you make below. Original Author unknown. Edited by
# MiDas Mike (now known as Emily_Konichi) so it doesn't play over the Title, but runs by calling the following:
# $scene = Scene_Credits.new
# New Edit 3/6/2007 11:14 PM by AvatarMonkeyKirby.
# Ok, what I've done is changed the part of the script that was supposed to make
# the credits automatically end so that way they actually end! Yes, they will
# actually end when the credits are finished! So, that will make the people you
# should give credit to now is: UNKOWN, Emily_Konichi, and AvatarMonkeyKirby.
#                                             -sincerly yours,
#                                               Your Beloved
# Oh yea, and I also added a line of code that fades out the BGM so it fades
# sooner and smoother.
#==============================================================================

class Scene_Credits

# This next piece of code is the credits.
CREDIT=<<_END_

LE TOURMALET Credits!






- SCRIPT´S -

- Ccoa - Universal Message System
- Emily_Konichi & AvatarMonkeyKirby - Scene_Credits
____________________________________________________






- TESTING -

- Darksplit - Best tester ever
- Maskleto and Saxifrage - Formula´s discussion.
____________________________________________________






- ART & SPRITING -

- Tekubi - Art ideas
- Dwellercoc
____________________________________________________






- Enterbrain (RPGMaker XP and RTP)
- Chaos Project, RPG Revolution and RMVXP forums
  (Tutorials, ideas, rpgmaker info, etc...)
- Dwellercoc - Idea, Events systems


_END_
def main

#-------------------------------
# Animated Background Setup
#-------------------------------

@sprite = Sprite.new
#@sprite.bitmap = RPG::Cache.title($data_system.title_name)
@backgroundList = ["Pic_2"] #Edit this to the title screen(s) you wish to show in the background. They do repeat.
@backgroundGameFrameCount = 0
# Number of game frames per background frame.
@backgroundG_BFrameCount = 3.4
@sprite.bitmap = RPG::Cache.title(@backgroundList[0])

#------------------
# Credits txt Setup
#------------------

credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines[i]
credit_bitmap.font.name = CREDITS_FONT
credit_bitmap.font.size = CREDITS_SIZE
x = 0
credit_bitmap.font.color = CREDITS_OUTLINE
credit_bitmap.draw_text(0 + 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 + 1,640,32,line,1)
credit_bitmap.draw_text(0 + 1,i * 32 - 1,640,32,line,1)
credit_bitmap.draw_text(0 - 1,i * 32 - 1,640,32,line,1)
credit_bitmap.font.color = CREDITS_SHADOW
credit_bitmap.draw_text(0,i * 32 + 8,640,32,line,1)
credit_bitmap.font.color = CREDITS_FILL
credit_bitmap.draw_text(0,i * 32,640,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.z = 9998
@credit_sprite.oy = -430 #-430
@frame_index = 0
@last_flag = false

#--------
# Setup
#--------

#Stops all audio but background music.
Audio.me_stop
Audio.bgs_stop
Audio.se_stop

Graphics.transition

loop do

Graphics.update
Input.update


update
if $scene != self
break
end
end
Graphics.freeze
@sprite.dispose
@credit_sprite.dispose
end

##Checks if credits bitmap has reached it's ending point
def last?
    if @frame_index > (@credit_sprite.bitmap.height + 500)
       $scene = Scene_Map.new
       Audio.bgm_fade(10000) #aprox 10 seconds
      return true
    end
      return false
    end

#Check if the credits should be cancelled
def cancel?
    if Input.trigger?(Input::C)
      $scene = Scene_Map.new
      Audio.bgm_stop
      return true
    end
      return false
    end
def update
@backgroundGameFrameCount = @backgroundGameFrameCount + 1
if @backgroundGameFrameCount >= @backgroundG_BFrameCount
@backgroundGameFrameCount = 0
# Add current background frame to the end
@backgroundList = @backgroundList << @backgroundList[0]
# and drop it from the first position
@backgroundList.delete_at(0)
@sprite.bitmap = RPG::Cache.title(@backgroundList[0])
end
return if cancel?
return if last?
@credit_sprite.oy += 1 #this is the speed that the text scrolls. 1 is default
#The fastest I'd recomend is 5, after that it gets hard to read.
@frame_index += 1 #This should fix the non-self-ending credits
end
end


I think that is a usefull feature to this script.
Dwellercoc
Spoiler: ShowHide

stripe103

August 04, 2010, 01:54:36 pm #11 Last Edit: August 04, 2010, 01:55:45 pm by stripe103
What I can see it should stop the background music.
def cancel?
   if Input.trigger?(Input::C)
     $scene = Scene_Map.new
     Audio.bgm_stop#########THIS LINE SHOULD STOP THE MUSIC
     return true
   end
     return false
   end

But I don't know why it don't with you.

Dweller

I put that code on that line, the original script dont have it
Dwellercoc
Spoiler: ShowHide

stripe103

Why do you want it anyway. The script goes to the title screen when canceled and the back ground music is automatically replaced by the title screen music. It should do that anyway.

Dweller

I call the Credit Script from an event on a map ($scene = Scene_Credits.new). The BGM don't stop without that code modification, cause you return to that map.
Dwellercoc
Spoiler: ShowHide

stripe103

But if you return to a map, then that map's preferences should do it. The credits bgm is getting replaced by the map's one. If you don't have any BGM on the map, then instead of keeping it blank, set it to (None) in the preferences.

SBR*

Quote from: stripe103 on August 05, 2010, 11:26:51 am
But if you return to a map, then that map's preferences should do it. The credits bgm is getting replaced by the map's one. If you don't have any BGM on the map, then instead of keeping it blank, set it to (None) in the preferences.


Yep, and if the BGM stays the same, don't leave it blank, but set it to the BGM it has to stay.

Dweller

QuoteBut if you return to a map, then that map's preferences should do it. The credits bgm is getting replaced by the map's one. If you don't have any BGM on the map, then instead of keeping it blank, set it to (None) in the preferences.


I didn´t have any map selected, if I select "none" in preferences is ok, so the script didn´t need my edit. Ty for the info.
Dwellercoc
Spoiler: ShowHide

Maarten2903


KK20

Thanks for grave-digging a near 10 year old thread.
Locked

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!