Le Deal du moment :
Google Pixel 7 5G – Smartphone 6,3″ OLED ...
Voir le deal
316 €

Aller en bas
AnthO'
AnthO'
Membre

Nombre de messages : 2202
Age : 30
Localisation : Orléans
Distinction : Panda d'élite

[Wax Rolling Eyes]
Date d'inscription : 05/01/2008
http://anthonybourgouin.fr

Credits Empty Credits

Ven 28 Nov 2008 - 18:31
Map Credit
Version
1.0
Par Woratana
Date: 10/05/2008

Screenshots
Credits 2r7pzpx



Script
A placer au dessus de Main
Code:
#===============================================================
# ● [VX] ◦ Map Credit ◦ □
#--------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released on: 09/05/2008
# ◦ Version: 1.0
#----------------------------------------------------
# ◦ How to use:
# ** To start Credit, call script:
# $scene.credit.start
#
# ** To Stop and Clear Credit, call script:
# $scene.credit.terminate
#----------------------------------------------------
# ◦ Special Tags for Decorate Text:
# There are special tags that you can put in text to decorate that line
#
# You can also set default text decoration for all text in:
  #-------------------------------------
  # SETUP HEADER TEXT HERE
  #-------------------------------------
# for Header line (line that has tag <h>)
# &
  #-------------------------------------
  # SETUP CONTENT TEXT HERE
  #-------------------------------------
# for Normal line~
#-----------------------------------------------------
# ◦ >= Tag List <= ◦
# * These tags will only apply to the line it is in~
# * You cannot use opposite tags in same line. (e.g. <b> and </b>)
#
# <b> :Bold Text
# </b> :No Bold Text

# <i> :Italic Text
# </i> :No Italic Text

# <center> :Align text to Center
# <left> :Align text to left
# <right> :Align text to right

# <h> :Make that line become Header line
#===========================================================================

#----------------------------------------
# Map Credit Main Script \('w' )
#----------------------------------------
class Wora_Map_Credit

  BG_Image = 'credit_bg' # Background Image file name, image must be in folder 'Picture'
  # leave '' for no background
  BG_Image_Opacity = 255 # Background Opacity (0 - 255)
 
  Text_Begin_y = 416 # Use 0 - 416: Text will start in the screen
  # Use 416+: Text will start below the screen
 
  Text_Scroll_Speed = 1 # Higher this number = Faster
  Text_Scroll_Delay = 0 # Delay between each text move (0 for no delay)
  Text_Opacity = 220 # Text Opacity
  Text_Blend_Type = 0 # 0: Normal, 1: Add, 2: Subtraction
 
  Test_Text = 'I' # Text for test height,
  # Change to taller alphabet if height is not right~

#--------------------------
# Start Credit
#--------------------------
Credit= <<_MAP_CREDIT_

<h>Story
Name Here

<h>Graphics
Name Here

<h>Mapping
Name Here

<h>Scripting
Name Here
Name Here

<h>Special Thanks
Name Here
Name Here
Name Here

_MAP_CREDIT_
#--------------------------
# End Credit
#--------------------------
  #-------------------------------------
  # SETUP HEADER TEXT HERE
  #-------------------------------------
  def header_properties(bitmap)
    bitmap.font.name = 'Tahoma' # Text Font
    bitmap.font.color = Color.new(0, 0, 255, 255) # (Red, Green, Blue, Opacity)
    bitmap.font.size = 30 # Text size
    bitmap.font.bold = true # Bold Text? (true/false)
    bitmap.font.italic = false # Italic Text? (true/false)
    bitmap.font.shadow = true # Shadowed Text? (true/false)
    @text_outline = Color.new(0,0,0) # nil for no outline, Color.new(r,g,b) for outline
    @text_align = 1 # 0: Left, 1: Center, 2: Right
  end
 
  #-------------------------------------
  # SETUP CONTENT TEXT HERE
  #-------------------------------------
  def content_properties(bitmap)
    bitmap.font.name = 'Tahoma'
    bitmap.font.color = Color.new(255, 255, 255, 255)
    bitmap.font.size = 22
    bitmap.font.bold = true
    bitmap.font.italic = false
    bitmap.font.shadow = true
    @text_outline = nil
    @text_align = 1
  end
#-----------------------------------------------------------------------
# -END- MAP CREDIT SCRIPT SETUP PART
#===========================================================================

  def initialize
    @started = false
  end
 
  # Delete credit if credit started
  def terminate
    if @started
      if @bg != nil
        @bg.bitmap.dispose
        @bg.dispose
      end
      @sprite.bitmap.dispose
      @sprite.dispose
      @started = false
    end
  end
 
  # Start Credit
  def start(text = Credit, bg = BG_Image)
    # Create Background Sprite
    if BG_Image != ''
      @bg = Sprite.new
      @bg.bitmap = Cache.picture(bg)
      @bg.opacity = BG_Image_Opacity
      @bg.z = 10000
    end
    # Create Text Sprite
    @sprite = Sprite.new
    @sprite.x = 0
    @sprite.y = 0
    @sprite.z = 10001
    @sprite.opacity = Text_Opacity
    @sprite.blend_type = Text_Blend_Type
    # Calculate Credit Height
    header_line = 0
    content_line = 0
    height = 0
    text = text.split(/\n/)
    text.each do |i|
      if i.include?('<h>'); header_line += 1
      else; content_line += 1
      end
    end
    @sprite.bitmap = Bitmap.new(1,1)
    # Test Header Properties
    header_properties(@sprite.bitmap)
    header_height = @sprite.bitmap.text_size(Test_Text).height
    height += ( header_line * ( header_height ) )
    # Test Content Properties
    content_properties(@sprite.bitmap)
    content_height = @sprite.bitmap.text_size(Test_Text).height
    height += ( content_line * ( content_height ) )
    @sprite.bitmap.dispose
    # Finished Test, Draw Text
    @sprite.bitmap = Bitmap.new(Graphics.width, Text_Begin_y + height + 32)
    content_x = 0
    content_y = Text_Begin_y
    text.each do |i|
     
      # Determine Special Tags
      if i.include?('<h>')
        i.sub!('<h>', '')
        header_properties(@sprite.bitmap)
        bitmap_height = header_height
      else
        content_properties(@sprite.bitmap)
        bitmap_height = content_height
      end
      # Bold Text
      if i.include?('<b>')
        i.sub!('<b>', ''); @sprite.font.bold = true
      elsif i.include?('</b>')
        i.sub!('</b>', ''); @sprite.font.bold = false
      end
      # Italic Text
      if i.include?('<i>')
        i.sub!('<i>', ''); @sprite.font.italic = true
      elsif i.include?('</i>')
        i.sub!('</i>', ''); @sprite.font.italic = false
      end
      # Align Text
      if i.include?('<center>')
        i.sub!('<center>', ''); @text_align = 1
      elsif i.include?('<left>')
        i.sub!('<left>', ''); @text_align = 0
      elsif i.include?('<right>')
        i.sub!('<right>', ''); @text_align = 2
      end
      if !@text_outline.nil? # Text Outline
        ori_color = @sprite.bitmap.font.color.clone
        @sprite.bitmap.font.color = @text_outline
        @sprite.bitmap.draw_text(content_x-1, content_y, @sprite.bitmap.width,
bitmap_height, i, @text_align)
        @sprite.bitmap.draw_text(content_x, content_y-1, @sprite.bitmap.width,
bitmap_height, i, @text_align)
        @sprite.bitmap.draw_text(content_x, content_y+1, @sprite.bitmap.width,
bitmap_height, i, @text_align)
        @sprite.bitmap.draw_text(content_x+1, content_y, @sprite.bitmap.width,
bitmap_height, i, @text_align)
        @sprite.bitmap.font.color = ori_color
      end
     
      # Draw Text
      @sprite.bitmap.draw_text(content_x, content_y, @sprite.bitmap.width,
bitmap_height, i, @text_align)
      content_y += bitmap_height
    end
    @delay = 0
    @started = true
  end
 
  # Update credit if credit started~
  def update
    if @started
      if @delay > 0
        @delay -= 1
        return
      else
        @sprite.oy += Text_Scroll_Speed
        @delay += Text_Scroll_Delay
      end
    end
  end
end

#----------------------------------------
# Plug Credit to Map >_> <_<~
#----------------------------------------
class Scene_Map < Scene_Base
  attr_reader :credit
  alias wor_mapcre_scemap_str start
  alias wor_mapcre_scemap_upd update
  alias wor_mapcre_scemap_ter terminate

  def start
    @credit = Wora_Map_Credit.new # Create Credit
    wor_mapcre_scemap_str
  end
 
  def update
    @credit.update # Update Credit
    wor_mapcre_scemap_upd
  end
 
  def terminate
    @credit.terminate # Dispose Credit
    wor_mapcre_scemap_ter
  end
end



Instructions
- Pour appeler le script dans un event:
Code:
$scene.credit.start


- Pour le stopper (En processus parallèle,il est nécessaire de mettres des attentes de 999 frames pour les crédit, avant la fin (3 ou 4 fois selon la longueur):


Code:
$scene.credit.terminate
[/i][/b]
Korndor
Korndor
Staffeux retraité

Nombre de messages : 4959
Age : 110
Localisation : Erem Vehyx
Distinction : Champion de boxe et au lit ! :O [Wax]
Être Mythique [Mister]
Papi Korndor qui a l'ostéoporose [Skillo]
Soldat Ikéa [Coco']
Un bonhomme, un vrai ! [Neresis]
Vieillard acariâtre [Didier Gustin]
Date d'inscription : 16/12/2007
https://www.rpgmakervx-fr.com/

Credits Empty Re: Credits

Ven 28 Nov 2008 - 19:20
Vérifies avant de poster un script...
Mais merci quand même ^^"
wilkyo
wilkyo
Membre

Nombre de messages : 316
Age : 32
Localisation : Loiret
Distinction : Sauveur de miches // Chou (l)

[Coco' Smile]

Adepte de Pedobear // Lécheur de lolis

[Mist' Wink]

Personnage Colorée // Instructeur de boulet

[Wax Rolling Eyes]
Date d'inscription : 01/09/2008
http://www.wilkyo.com

Credits Empty Re: Credits

Ven 28 Nov 2008 - 21:28
J"étais sur de l'avoir déjà vu !
Je l'avais même testé et il était (et est toujours) super !
On peut faire bouger des personnages sous les crédits, ce qui donne un effet de Cinématique de fin !
AnthO'
AnthO'
Membre

Nombre de messages : 2202
Age : 30
Localisation : Orléans
Distinction : Panda d'élite

[Wax Rolling Eyes]
Date d'inscription : 05/01/2008
http://anthonybourgouin.fr

Credits Empty Re: Credits

Sam 29 Nov 2008 - 9:47
Ba pourtant tret' je dois l'avoué que j'ai chercher !

Désolé...Pas grave ça le remet au goût du jour....^^'
Masouf
Masouf
Membre

Nombre de messages : 284
Age : 30
Localisation : Rennes
Distinction : aucune
Date d'inscription : 24/12/2008

Credits Empty Re: Credits

Dim 1 Mar 2009 - 16:48
Bonjour,
Moi j'ai un petit probleme, je l'ai placer au début de mon jeu et quand je fait tester le projet ca maffiche ca:
script 'credit' line180: SyntaxError occured.
Masouf
Masouf
Membre

Nombre de messages : 284
Age : 30
Localisation : Rennes
Distinction : aucune
Date d'inscription : 24/12/2008

Credits Empty Re: Credits

Dim 1 Mar 2009 - 17:13
Voici les ligne de 179 à 183:
Code:
# Finished Test, Draw Text
@sprite.bitmap = Bitmap.new(Graphics.width, Text_Begin_y  height  32)
content_x = 0
content_y = Text_Begin_y
text.each do |i|
Berka
Berka
Staffeux retraité

Nombre de messages : 1832
Age : 33
Localisation : Paris
Distinction : rubyste déglingué
9ème dan en scripting-no-jutsu

Nouveau Justine Beber ;P
Date d'inscription : 16/12/2007
http://rpgruby.olympe-network.com

Credits Empty Re: Credits

Dim 1 Mar 2009 - 17:15
il manque des opérateurs: +-*/%...
essaye:
Code:
@sprite.bitmap = Bitmap.new(Graphics.width, Text_Begin_y+height-32)
Masouf
Masouf
Membre

Nombre de messages : 284
Age : 30
Localisation : Rennes
Distinction : aucune
Date d'inscription : 24/12/2008

Credits Empty Re: Credits

Dim 1 Mar 2009 - 17:18
Meme probleme mais pour la ingne 224:
Code:
bitmap_height, i, @text_align)
Berka
Berka
Staffeux retraité

Nombre de messages : 1832
Age : 33
Localisation : Paris
Distinction : rubyste déglingué
9ème dan en scripting-no-jutsu

Nouveau Justine Beber ;P
Date d'inscription : 16/12/2007
http://rpgruby.olympe-network.com

Credits Empty Re: Credits

Dim 1 Mar 2009 - 17:21
j'edite le premier message !
Masouf
Masouf
Membre

Nombre de messages : 284
Age : 30
Localisation : Rennes
Distinction : aucune
Date d'inscription : 24/12/2008

Credits Empty Re: Credits

Mer 4 Mar 2009 - 19:00
J'ai trouver un moyen d'avoir le meme résultat:
_tu prend ce script : http://rpgmakervx.1fr1.net/divers-f39/credits-directement-sur-la-map-t2533.htm
_tu suis les indication
_sauf que pour l'image prend celle-la:https://servimg.com/view/13602497/2 (fait gaffe l'image est invisible)
_met la dans le dossier Graphics/Picture de ton projet.
et voila!
Haribo
Haribo
Membre

Nombre de messages : 70
Age : 113
Localisation : Dans ma chambre...
Distinction : aucune
Date d'inscription : 22/01/2010

Credits Empty Re: Credits

Jeu 11 Fév 2010 - 2:17
Désoler de faire un up incroyable mais quand je veux tester le crédit ça me marque :
Scripts "Credits" line 197: NoMethodError occured

undefined method 'font' for # <Sprite:0x170af10


Ca veut dire quoi tout ce charabia ? ^^
Encore désoler du up Sad
Coco'
Coco'
Staffeux retraité

Nombre de messages : 6578
Age : 30
Localisation : Nord/Douai
Distinction : EL DICTATOR COCO'
Coco-Dieu en puissance

Credits Magikarpe Grand gourou suppléant de la secte des MAGIKARP
Leader charismatique des 2beStaffieux

N°1 du forum
Président, vice-présidents et membres honoraires de la cour suprême du forum
Président de l'association des grosses distinctions CMB
Date d'inscription : 02/07/2008
https://www.rpgmakervx-fr.com

Credits Empty Re: Credits

Jeu 11 Fév 2010 - 14:06
Ouais... Joli nécropost, c'est le cas...

Pour les demandes de ce type, c'est pas là, mais dans l'entraide ~~'
Contenu sponsorisé

Credits Empty Re: Credits

Revenir en haut
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum