collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: KGC_TitleDirection  (Gelesen 2750 mal)

Offline PDM

  • Bibliothekar
  • Global Mod
  • VX-Kenner
  • ****
  • Beiträge: 468
    • Mein Blog
KGC_TitleDirection
« am: Dezember 15, 2009, 14:08:36 »
Vorwort
Ich habe dieses Script aus der KGC Script Libary. Da ich per Suchfunktion keinen Einzelpost des Scriptes gefunden habe, poste ich ihn hier.

Was macht das Script?
Das Script lässt ein Logo wie bei EA erscheinen, erst dann kommt man zum Titelbildschirm.

Wie benutze ich es?
Einfach im Scripteditor als neuen Script einfügen. Dann noch eine Grafik in den Ordner SYSTEM
machen. Diese Grafik muss Logo heißen und ist dementsprechend das, was später angezeigt wird. Natürlich kann die Grafik auch anders heißen, dann muss der Name im Script (Zeile 36) aber auch umgeändert werden. Den Sound, der beim Anzeigen erklingt, kann man auch im Script (Zeile 47) umändern.
Änderungen kann man auch noch hier vornehmen:
Zeile 25 Wann soll die Titelmusik starten? 0=Vor Logo 1=Nach Logo
Zeile 29 Soll das Logo erscheinen? true= es erscheint false= es erscheint nicht
Zeile 53 Logoeffekt (steht im Script)

Script
Spoiler for Hiden:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ? Splash Logo - KGC_TitleDirection ? VX ?
#_/ ?  Last Update: 2008/09/06
#_/ ? Written by TOMY     
#_/ ? Translation by Mr. Anonymous                 
#_/ ? KGC Site:                                                   
#_/ ?  http://ytomy.sakura.ne.jp/                                   
#_/ ? Translator's Blog:                                             
#_/ ?  http://mraprojects.wordpress.com     
#_/----------------------------------------------------------------------------
#_/   This script adds a function to display a splash logo before the title
#_/  screen is displayed. A sample of this effect is provided with the demo
#_/  this script came packaged in.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
#                             ? Customization ?
#==============================================================================

module KGC
module TitleDirection
  #                        ? Start Title BGM Timing ?
  # This allows you to adjust when the title screen BGM is played.
  #   0..Before Logo  1..After Logo
  BGM_TIMING = 1

  #                 ? Show Logo During Testplay (DEBUGGING) ?
  # This toggle allows you to bypass the logo display when debugging.
  TESTPLAY_SHOW = true
 
  #                         ? Splash Logo Image ?
  #  Here, you may specify the image file you'd like to use as a logo.
  # The image must be in the "Graphics/System" folder.
  # Setting this to nil will display nothing. If set to nil, the Splash Logo
  #  Sound Effect defined below is also assumed to be nil.
  SPLASH_LOGO_FILE = "Logo"
 
  #                       ? Splash Logo Sound Effect ?
  # Here, you may specify a sound effect to play while the splash logo displays.
  # This can be written two ways. First, you can simply define a filename and
  #  the script automatically assumes to look in the SE folder and assign
  #  default values for volume and pitch, as such:   
  #     SPLASH_LOGO_SE = "start_logo"
  #  Or class notation, allowing for additional customization, as such:
  #   SPLASH_LOGO_SE = RPG::SE.new("start_logo", 80, 100)
  # Format: ("SoundName", Volume, Pitch)
  SPLASH_LOGO_SE = RPG::SE.new("Flash3", 80, 150)
 
  #                           ? Logo Splash Style ?
  #  Here, you may specify an effect for your logo. It's best just to try out
  # each option and see what works for you.
  #   0..Fade  1..Crossing  2..Zoom  3..Splash
  SPLASH_LOGO_TYPE = 0
  end
end
#=============================================================================#
#                          ? End Customization ?                              #
#=============================================================================#

#=================================================#
#                    IMPORT                       #
#=================================================#

$imported = {} if $imported == nil
$imported["TitleDirection"] = true

#=================================================#

#==============================================================================
# ? Sprite_TitleLogo
#------------------------------------------------------------------------------
#   ??????????????????
#==============================================================================

class Sprite_TitleLogo < Sprite
  attr_accessor :effect_no_out  # ?????????
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def initialize
    super
    @effect_type = 0
    @effect_duration = 0
    @effect_sprites = []
    @effect_no_out = false
  end
  #--------------------------------------------------------------------------
  # ? ??
  #--------------------------------------------------------------------------
  def dispose
    super
    dispose_effect_sprites
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #--------------------------------------------------------------------------
  def dispose_effect_sprites
    @effect_sprites.each { |s| s.dispose }
    @effect_sprites = []
  end
  #--------------------------------------------------------------------------
  # ? Z ????
  #--------------------------------------------------------------------------
  def z=(value)
    super(value)
    @effect_sprites.each { |s| s.z = value }
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #     dx : X ??
  #     dy : Y ??
  #     bitmap : ????
  #--------------------------------------------------------------------------
  def effect_fade(dx, dy, bitmap)
    dispose_effect_sprites
    @effect_type = 0
    @effect_duration = 150
    # ???????
    sprite = Sprite.new
    sprite.bitmap = bitmap
    # ???????
    sprite.x = dx
    sprite.y = dy
    sprite.ox = bitmap.width / 2
    sprite.oy = bitmap.height / 2
    sprite.opacity = 0

    @effect_sprites << sprite
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def effect_cross(dx, dy, bitmap)
    dispose_effect_sprites
    @effect_type = 1
    @effect_duration = 150
    # ???????
    sprites = [Sprite.new, Sprite.new]
    sprites[0].bitmap = bitmap
    sprites[1].bitmap = bitmap
    # ???????
    sprites[0].x = dx - 240
    sprites[1].x = dx + 240
    sprites[0].y = dy
    sprites[1].y = dy
    sprites[0].ox = sprites[1].ox = bitmap.width / 2
    sprites[0].oy = sprites[1].oy = bitmap.height / 2
    sprites[0].opacity = 0
    sprites[1].opacity = 0

    @effect_sprites += sprites
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def effect_zoom(dx, dy, bitmap)
    dispose_effect_sprites
    @effect_type = 2
    @effect_duration = 150
    # ???????
    sprites = [Sprite.new, Sprite.new]
    sprites[0].bitmap = bitmap
    sprites[1].bitmap = bitmap
    # ????
    sprites[0].x = sprites[1].x = dx
    sprites[0].y = sprites[1].y = dy
    sprites[0].ox = sprites[1].ox = bitmap.width / 2
    sprites[0].oy = sprites[1].oy = bitmap.height / 2
    sprites[0].zoom_x = sprites[0].zoom_y = 0.0
    sprites[1].zoom_x = sprites[1].zoom_y = 6.0
    sprites[0].opacity = sprites[1].opacity = 0

    @effect_sprites += sprites
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  def effect_splash(dx, dy, bitmap)
    dispose_effect_sprites
    @effect_type = 3
    @effect_duration = 150
    # ???????
    sprites = [Sprite.new]
    sprites[0].bitmap = bitmap
    # ????
    sprites[0].ox = bitmap.width >> 1
    sprites[0].oy = bitmap.height >> 1
    sprites[0].x = dx
    sprites[0].y = dy
    sprites[0].opacity = 0
    (1..3).each { |i|
      sprites[i] = Sprite.new
      sprites[i].bitmap = bitmap
      sprites[i].ox = sprites[0].ox
      sprites[i].oy = sprites[0].oy
      sprites[i].x = dx
      sprites[i].y = dy
      sprites[i].opacity = 255
      sprites[i].visible = false
    }

    @effect_sprites += sprites
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  def effect_splash_in(dx, dy, bitmap)
    dispose_effect_sprites
    @effect_type = 4
    @effect_duration = 41
    # ???????
    sprites = [Sprite.new]
    sprites[0].bitmap = bitmap
    # ????
    sprites[0].ox = bitmap.width >> 1
    sprites[0].oy = bitmap.height >> 1
    sprites[0].x = dx - 160
    sprites[0].y = dy - 160
    sprites[0].opacity = 0
    (1..3).each { |i|
      sprites[i] = Sprite.new
      sprites[i].bitmap = bitmap
      sprites[i].ox = sprites[0].ox
      sprites[i].oy = sprites[0].oy
      sprites[i].x = dx
      sprites[i].y = dy
      sprites[i].opacity = 0
    }
    sprites[1].x += 160
    sprites[1].y -= 160
    sprites[2].x += 160
    sprites[2].y += 160
    sprites[3].x -= 160
    sprites[3].y += 160

    @effect_sprites += sprites
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def stop_effect
    dispose_effect_sprites
    @effect_duration = 0
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  def effect?
    return @effect_duration > 0
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    super

    if @effect_duration > 0
      update_effect
    end
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def update_effect
    @effect_duration -= 1
    case @effect_type
    when 0
      update_effect_fade
    when 1
      update_effect_cross
    when 2
      update_effect_zoom
    when 3
      update_effect_splash
    when 4
      update_effect_splash_in
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????? : ????
  #--------------------------------------------------------------------------
  def update_effect_fade
    case @effect_duration
    when 100...150
      @effect_sprites[0].opacity += 6
    when 30...100
      # ?????
    when 0...30
      unless @effect_no_out
        @effect_sprites[0].opacity -= 10
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????? : ???
  #--------------------------------------------------------------------------
  def update_effect_cross
    case @effect_duration
    when 110...150
      @effect_sprites[0].x += 6
      @effect_sprites[1].x -= 6
      @effect_sprites[0].opacity += 4
      @effect_sprites[1].opacity += 4
    when 30...110
      @effect_sprites[0].opacity = 255
      @effect_sprites[1].visible = false
    when 0...30
      unless @effect_no_out
        @effect_sprites[0].opacity -= 13
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????? : ???
  #--------------------------------------------------------------------------
  def update_effect_zoom
    case @effect_duration
    when 100...150
      @effect_sprites[0].zoom_x = (@effect_sprites[0].zoom_y += 0.02)
      @effect_sprites[1].zoom_x = (@effect_sprites[1].zoom_y -= 0.1)
      @effect_sprites[0].opacity += 3
      @effect_sprites[1].opacity += 3
    when 30...100
      @effect_sprites[0].opacity = 255
      @effect_sprites[1].visible = false
    when 0...30
      unless @effect_no_out
        @effect_sprites[0].opacity -= 13
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????? : ??????
  #--------------------------------------------------------------------------
  def update_effect_splash
    case @effect_duration
    when 90...150
      @effect_sprites[0].opacity += 5
    when 0...60
      @effect_sprites[0].x -= 2
      @effect_sprites[0].y -= 2
      @effect_sprites[1].x += 2
      @effect_sprites[1].y -= 2
      @effect_sprites[2].x += 2
      @effect_sprites[2].y += 2
      @effect_sprites[3].x -= 2
      @effect_sprites[3].y += 2
      4.times { |j|
        @effect_sprites[j].visible = true
        @effect_sprites[j].opacity -= 5
      }
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????? : ????????
  #--------------------------------------------------------------------------
  def update_effect_splash_in
    case @effect_duration
    when 1...41
      @effect_sprites[0].x += 2
      @effect_sprites[0].y += 2
      @effect_sprites[1].x -= 2
      @effect_sprites[1].y += 2
      @effect_sprites[2].x -= 2
      @effect_sprites[2].y -= 2
      @effect_sprites[3].x += 2
      @effect_sprites[3].y -= 2
      4.times { |j|
        @effect_sprites[j].opacity += 3
      }
    when 0
      @effect_sprites[0].opacity = 255
      (1..3).each { |i|
        @effect_sprites[i].visible = false
      }
    end
  end
end

#???????????????????????????????????????

#==============================================================================
# ¦ Scene_Title
#==============================================================================

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  alias start_KGC_TitleDirection start
  def start
    load_database
    show_splash_logo

    start_KGC_TitleDirection
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  def show_splash_logo
    return if $__splash_logo_shown
    return if $TEST && !KGC::TitleDirection::TESTPLAY_SHOW
    return if KGC::TitleDirection::SPLASH_LOGO_FILE == nil

    play_title_music if KGC::TitleDirection::BGM_TIMING == 0

    # ???? SE ??
    if KGC::TitleDirection::SPLASH_LOGO_SE != nil
      if KGC::TitleDirection::SPLASH_LOGO_SE.is_a?(RPG::SE)
        KGC::TitleDirection::SPLASH_LOGO_SE.play
      elsif KGC::TitleDirection::SPLASH_LOGO_SE.is_a?(String)
        se = RPG::SE.new(KGC::TitleDirection::SPLASH_LOGO_SE)
        se.play
      end
    end

    # ?????????????
    sprite = Sprite_TitleLogo.new
    bitmap = Cache.system(KGC::TitleDirection::SPLASH_LOGO_FILE)
    dx = Graphics.width / 2
    dy = Graphics.height / 2

    # ???????
    case KGC::TitleDirection::SPLASH_LOGO_TYPE
    when 0
      sprite.effect_fade(dx, dy, bitmap)
    when 1
      sprite.effect_cross(dx, dy, bitmap)
    when 2
      sprite.effect_zoom(dx, dy, bitmap)
    when 3
      sprite.effect_splash(dx, dy, bitmap)
    end
    # ???????
    Graphics.transition(0)
    while sprite.effect?
      Graphics.update
      Input.update
      sprite.update
      # C ??????
      if Input.trigger?(Input::C)
        sprite.stop_effect
      end
    end
    # ???
    sprite.dispose
    bitmap.dispose
    # ?????????
    Graphics.freeze

    $__splash_logo_shown = true
  end
end

Credits gehen an KGC!!!

23.12.2010: Kleinen Bug bei Title_music behoben
« Letzte Änderung: Dezember 23, 2010, 13:49:22 von PDM »
PDM's Gameplays
Skype-Name: lordpdm

Re: KGC_TitleDirection

Offline elkay7

  • Event-Jongleur
  • **
  • Beiträge: 65
Re: KGC_TitleDirection
« Antwort #1 am: Dezember 17, 2009, 13:03:40 »
Vielen Dank fürs Posten, das Skript ist echt klasse!
Mfg
« Letzte Änderung: Dezember 17, 2009, 13:03:53 von elkay7 »
.:| News Log |:.

- 15.05.11 -
Elkay7 back on rpgvx.net! "Christmas Shooter II" in progress.

- 24.06.10 -
Project "House of Games" was cancelled. RPG break!

- 18.01.10 -
New game in progress: "House of Games"
Story: 80% - Mapping: 40% - Eventing: 25%

- 06.12.09 -
It's X-Mas Time!
Play "Christmas Shooter I" here: http://www.rpgvx.net/index.php/topic,4313.0.html

Re: KGC_TitleDirection

Offline kiralein37

  • Ralph
  • *
  • Beiträge: 7
Re: KGC_TitleDirection
« Antwort #2 am: Dezember 22, 2010, 22:12:54 »
das geht doch garnicht...

da kommt

...scene_title line 195 NoMethoderror
undefined method  title_bgm nil:Nilclass

Re: KGC_TitleDirection

Offline PDM

  • Bibliothekar
  • Global Mod
  • VX-Kenner
  • ****
  • Beiträge: 468
    • Mein Blog
Re: KGC_TitleDirection
« Antwort #3 am: Dezember 23, 2010, 13:33:28 »
Also das Script funktioniert eigentlich einwandfrei...
Wann tritt der Fehler denn bei dir auf?
Hast du noch andere Scripts drin, bzw. hast du in dem Script rumgefummelt?
Ich habe nämlich keine Erklärung für die Fehlermeldung...

Edit: Weiß jetzt wann die Fehlermeldung kommt, werds mir mal genauer anschauen.

Edit 2 (mit Lösung): Füge in Zeile 392 (über "show_splash_logo") einfach das hier ein: load_database. Das sollte funktionieren. Ich werde es auch oben ändern.[/size][/b]
« Letzte Änderung: Dezember 23, 2010, 13:47:46 von PDM »
PDM's Gameplays
Skype-Name: lordpdm

Logo länger zeigen...

Offline Johny-Kk

  • 1,2,3,5????
  • Database-Verunstalter
  • **
  • Beiträge: 146
  • Ich bin wie ich bin...
    • 4 Souls <3
Logo länger zeigen...
« Antwort #4 am: Februar 13, 2011, 12:57:20 »
ja, hi...
ich habe mir das KGC_TitleDirection (link im spoiler) skript geholt!
habe jetzt aber dazu eine frage...
ist es möglich, die zeit, wie lange das logo angezeigt wird, zu verändern?
das geht nämlich leider schon total schnell weg und für meine idee, welche ich auch schon zur hälfte umgesetzt habe...  :cool:
muss ich es irgendwie hinbekommen, das das logo etwas länger als nur 2 sekunden angezeigt wird...


hoffe auf baldige rückmeldungen
danke schonmal im vorraus...

Re: Logo länger zeigen...

Offline Syforc

  • Ich press die Frucht, brauch kein Messer junge
  • Mr. MACK-Tile
  • ***
  • Beiträge: 221
    • http://www.youtube.com/watch?v=VrdwhXNt4qw
Re: Logo länger zeigen...
« Antwort #5 am: Februar 13, 2011, 13:10:20 »
Ne glaube nicht. Du kannst das doch auch irgendwie selber machen mit dem Logo. Eventen oder so.

mfG
 

[imghttp://www.muskelschmiede.de/forum/images/smilies/bbler.gif[/img]http://

[url=http://www.rpgvx.net/

Re: Logo länger zeigen...

Offline Johny-Kk

  • 1,2,3,5????
  • Database-Verunstalter
  • **
  • Beiträge: 146
  • Ich bin wie ich bin...
    • 4 Souls <3
Re: Logo länger zeigen...
« Antwort #6 am: Februar 13, 2011, 14:19:14 »
ja, aber dann nur nach dem titel, aber das logo soll davor !!!

Re: Logo länger zeigen...

Offline Itakoo

  • Freigeist
  • RTP-Mapper
  • *
  • Beiträge: 42
Re: Logo länger zeigen...
« Antwort #7 am: Februar 14, 2011, 21:16:23 »
Hey.

Es gibt ein Skript!
Leider weiß ich den Namen nicht mehr dafür, aber es muss hier im Forum herum liegen!
Das Skript erlaubt dir 3 Pictures quasi als Intro vor dem Startmenü zu animieren.
Du kannst im Skript die Anzahl an Pictures und die Zeit einstellen.

Tags, die dir evt. bei deiner Suche helfen:

Intro, Fade in, Fade out, Titel..

Ich hoffe ich konnte ein wenig helfen,
und wenn nicht, zumindest etwas Hoffnung vermitteln  :zwinker:

Re: KGC_TitleDirection

Offline Colonios

  • Maker Nerd
  • VX-Kenner
  • ****
  • Beiträge: 596
  • Events <3
Re: KGC_TitleDirection
« Antwort #8 am: Februar 15, 2011, 12:56:02 »
@ Johny-Kk:

Das ist schon das zweite mal!
Fragen zu Skripten, die es hier um Forum gibt, IMMER im original Thread des Skriptes stellen. Sonst verliert sich die Übersichtlichkeit. Und Leute mit dem gleichen Problem müssen nicht im ganzen Forum suchen, sondern finden Antworten im original Thread.

~Und da das nicht zum ersten Mal der Fall ist und du schon mehrere Male aufgefallen bist, gibts eine Verwarnung.


MfG, Colo

Re: KGC_TitleDirection

Offline Johny-Kk

  • 1,2,3,5????
  • Database-Verunstalter
  • **
  • Beiträge: 146
  • Ich bin wie ich bin...
    • 4 Souls <3
Re: KGC_TitleDirection
« Antwort #9 am: Februar 15, 2011, 14:57:17 »
was zur hölle ist denn jetzt falsch?
das ist doch der originale thread!!!


~Weil ich es verschoben und zusammengefügt habe.
MfG, Colo

« Letzte Änderung: Februar 15, 2011, 19:17:38 von Colonios »

Re: KGC_TitleDirection

Offline PDM

  • Bibliothekar
  • Global Mod
  • VX-Kenner
  • ****
  • Beiträge: 468
    • Mein Blog
Re: KGC_TitleDirection
« Antwort #10 am: April 03, 2011, 20:19:01 »
Sry, dass ich mich jetzt erst melde, war aber für ne längere Zeit nicht da. Sicher lässt sich das machen, ich setz mich auch gerne ran, wenn noch Interesse besteht. SChreib einfach, ob du es noch brauchst oder nicht :haha:
PDM's Gameplays
Skype-Name: lordpdm

 


 Bild des Monats

rooftop party

Views: 3581
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal