Ergebnis 1 bis 9 von 9

Thema: [RMXP][Ruby] Suche Scripte zur Restaurierung

  1. #1

    [RMXP][Ruby] Suche Scripte zur Restaurierung

    Hi,

    ich habe ein Anliegen, und zwar möchte ich einige möglichst kleine und leicht aufrufbare Scripte haben,welche die nervigsten Funktionsverluste des XP beseitigen sollen. Damit meine ich Funktionen die im 2k vorhanden waren, z.B. die Fade-In-zeit der Musik einzustellen, aber im XP fehlen, ohne das dafür ein adäquater Ersatz voliegt.

    Ich bin noch nicht besonders gut in Ruby, hab' gerade erst die Grundzüge begriffen. Wenn also jemand diese Scripte hat, mir sagen kann wo ich sie finde oder, noch besser, wie ich sie selbst schreiben kann (mir sagt welche Klassen/Methoden ich aufrufen muss, wie die Parameter/Argumente zu übergeben sind) wäre es schön wenn er/sie mir die Sachen/infos geben könnte.

    Ich möchte diese Scripte dann, wenn sie einigermaßen benutzerfreundlich sind, in meinen Standardscripte-Thread aufnehmen, natürlich mit Verweis auf den Urheber.

    Also, primär geht es mir um folgende Bereiche:

    1. Ein Script mit dem sich für Musik und Sounds wie beim 2k die Einspielzeit, sowie die Richtung der Geräuchquelle (links/rechts) einstellen lässt.

    2. Eine Return-Funktion für "Move Screen" sowie die Möglichkeit den Bildausschnitt zu fixieren.

    3. Ein möglichst kurzes Codeschnippsel mit dem sich Mapevents aufrufen lassen. Die "Call Event" Funktion im Maker bezieht sich ja leider nur auf Common-Events.

    Das wären die wichtigsten Sachen die mir jetzt einfallen, wenn jemand noch was anderes hat, nur immer her damit. Beachtet aber bitte dass diese Scripte möglichs einfach aufrufbar sein sollten, da man sie ja wahrscheinlich öfter braucht. Es sollte also nur ein einzeiliges Callscript nötig sein, oder lieber gleich die Standardaufrufmethode ersetzen/erweitern (was ich mir jetzt bei diesen Sachen nicht vorstellen kann).

    Hoffe die Idee ist jetzt nicht gar zu blöd, dachte nur es wäre sinnvoll für diese Dinge mal eine einheitliche Lösung zu finden...

  2. #2
    Ich schließe mich dem mal an und frage nach einem Script, mit dem man Panoramas automatisch scrollen lassen kann.

    Edit
    Ich wollte gerade schon was zum ersten Teil von 2. was schreiben, aber das war Unsinn. o.O

    Geändert von Kelven (19.05.2006 um 12:46 Uhr)

  3. #3
    Zitat Zitat von Kelven
    Ich schließe mich dem mal an und frage nach einem Script, mit dem man Panoramas automatisch scrollen lassen kann.
    Ich benutze es nicht, dachte aber, dass dieses Dubealex Script das könnte: http://www.dubealex.com/asylum/index.php?showtopic=94

  4. #4
    Ich suche nach einem Script für einen ATB-Balken im KS
    Sowie einen, mit dem man Face-sets einbauen kann und das
    man diese im Menü sieht.

  5. #5
    Das Standard Kampfsystem mit ATB Balken kann man hier finden: http://scientia.rpgfantasy.de/wiki/i...plette_Scripts

    FaceSets kann man mit Dubealex' AMS einbinden: http://www.dubealex.com/asylum/index.php?showtopic=590 (dass man diese im Menü sieht, ist da aber nicht dabei)

  6. #6
    @Kelven: Nimm das Skript das SephiMike gepostet hat. Es enthält ziemliche viele Funktionen und man kann da auch recht einfach selber noch dran rumsäbeln. Ich hab das Skript bei mir die RTP Skriptfile miteingebunden, so das es jetzt immer gleich drin ist wenn ich ein neues Projekt starte.
    Es ist unglaublich einfach zu bedienen, selbst für RGSS Anfänger.

  7. #7
    Die 3 Scripte die du aufzählst habe ich leider auch noch nicht gesehen. Nummer 2 und 3 stelle ich mir leichter vor als das erste. Werd mal dran rumprobieren...

  8. #8
    Schön, danke , dachte schon dashier würde untergehen.

  9. #9
    Zum Map scrolling habe ich ein Script von Wachunga gefunden. Anleitung und Features steht im Script drin. Habe es selber aber nicht ausprobiert:

    Code:
    #==============================================================================
    # ** Map Autoscroll
    #------------------------------------------------------------------------------
    # Wachunga
    # Version 1.02
    # 2005-12-18
    #------------------------------------------------------------------------------
    =begin
    
    This script supplements the built-in "Scroll Map" event command with the
    aim of simplifying cutscenes (and map scrolling in general). Whereas the
    normal event command requires a direction and number of tiles to scroll,
    Map Autoscroll scrolls the map to center on the tile whose x and y
    coordinates are given.
    
    FEATURES
    - automatic map scrolling to given x,y coordinate (or player)
    - destination is fixed, so it's possible to scroll to same place even if
    origin is variable (e.g. moving NPC)
    - variable speed (just like "Scroll Map" event command)
    - diagonal scrolling supported
    
    SETUP
    Instead of a "Scroll Map" event command, use the "Call Script" command
    and enter on the following on the first line:
    
    autoscroll(x,y)
    
    (replacing "x" and "y" with the x and y coordinates of the tile to scroll to)
    
    To specify a scroll speed other than the default (4), use:
    
    autoscroll(x,y,speed)
    
    (now also replacing "speed" with the scroll speed from 1-6)
    
    To scroll to the player, instead use the following:
    
    autoscroll_player(speed)
    
    
    Note: because of how the interpreter and the "Call Script" event command
    are setup, the call to autoscroll(...) can only be on the first line of
    the "Call Script" event command (and not flowing down to subsequent lines).
    
    For example, the following call may not work as expected:
    
    autoscroll($game_variables[1],
    $game_variables[2])
    
    (since the long argument names require dropping down to a second line)
    A work-around is to setup new variables with shorter names in a preceding
    (separate) "Call Script" event command:
    
    @x = $game_variables[1]
    @y = $game_variables[2]
    
    and then use those as arguments:
    
    autoscroll(@x,@y)
    
    Note that the renaming must be in a separate "Call Script" because otherwise
    the call to autoscroll(...) isn't on the first line.
    
    Originally requested by militantmilo80:
    http://www.rmxp.net/forums/index.php?showtopic=29519
    
    #==============================================================================
    =end
    
    class Interpreter
    SCROLL_SPEED_DEFAULT = 4
    CENTER_X = (320 - 16) * 4
    CENTER_Y = (240 - 16) * 4
    =begin ------------------------------------------------------------------------
    This method, called by a Call Script event command, scrolls the map to
    center on the tile whose x and y coordinates are given (if valid).
    
    As with the usual "Scroll Map" command, speed can range from 1 to 6, the
    default being 4.
    
    Note that diagonal scrolling has been added and happens automatically when
    the destination is diagonal relative to the starting point (i.e., not
    directly up, down, left or right).
    =end #-------------------------------------------------------------------------
    def autoscroll(x,y,speed=SCROLL_SPEED_DEFAULT)
    if $game_map.scrolling?
    return false
    elsif not $game_map.valid?(x,y)
    print 'Map Autoscroll: given x,y is invalid'
    return command_skip
    elsif not (1..6).include?(speed)
    print 'Map Autoscroll: invalid speed (1-6 only)'
    return command_skip
    end
    max_x = ($game_map.width - 20) * 128
    max_y = ($game_map.height - 15) * 128
    count_x = ($game_map.display_x - [0,[x*128-CENTER_X,max_x].min].max)/128
    count_y = ($game_map.display_y - [0,[y*128-CENTER_Y,max_y].min].max)/128
    if not @diag
    @diag = true
    dir = nil
    if count_x > 0
    if count_y > 0
    dir = 7
    elsif count_y < 0
    dir = 1
    end
    elsif count_x < 0
    if count_y > 0
    dir = 9
    elsif count_y < 0
    dir = 3
    end
    end
    count = [count_x.abs,count_y.abs].min
    else
    @diag = false
    dir = nil
    if count_x != 0 and count_y != 0
    return false
    elsif count_x > 0
    dir = 4
    elsif count_x < 0
    dir = 6
    elsif count_y > 0
    dir = 8
    elsif count_y < 0
    dir = 2
    end
    count = count_x != 0 ? count_x.abs : count_y.abs
    end
    $game_map.start_scroll(dir, count, speed) if dir != nil
    if @diag
    return false
    else
    return true
    end
    end
    
    =begin ------------------------------------------------------------------------
    This method is identical to autoscroll(...) except that it scrolls the
    map to center on the player.
    =end #-------------------------------------------------------------------------
    def autoscroll_player(speed=SCROLL_SPEED_DEFAULT)
    autoscroll($game_player.x,$game_player.y,speed)
    end
    
    end
    
    #------------------------------------------------------------------------------
    
    class Game_Map
    
    def scroll_downright(distance)
    @display_x = [@display_x + distance, (self.width - 20) * 128].min
    @display_y = [@display_y + distance, (self.height - 15) * 128].min
    end
    
    def scroll_downleft(distance)
    @display_x = [@display_x - distance, 0].max
    @display_y = [@display_y + distance, (self.height - 15) * 128].min
    end
    
    def scroll_upright(distance)
    @display_x = [@display_x + distance, (self.width - 20) * 128].min
    @display_y = [@display_y - distance, 0].max
    end
    
    def scroll_upleft(distance)
    @display_x = [@display_x - distance, 0].max
    @display_y = [@display_y - distance, 0].max
    end
    
    def update
    # Refresh map if necessary
    if $game_map.need_refresh
    refresh
    end
    # If scrolling
    if @scroll_rest > 0
    # Change from scroll speed to distance in map coordinates
    distance = 2 ** @scroll_speed
    # Execute scrolling
    case @scroll_direction
    #----------------------------------------------------------------------------
    # Begin Map Autoscroll Edit
    #----------------------------------------------------------------------------
    when 1 # down left
    scroll_downleft(distance)
    #----------------------------------------------------------------------------
    # End Map Autoscroll Edit
    #----------------------------------------------------------------------------
    when 2 # Down
    scroll_down(distance)
    #----------------------------------------------------------------------------
    # Begin Map Autoscroll Edit
    #----------------------------------------------------------------------------
    when 3 # down right
    scroll_downright(distance)
    #----------------------------------------------------------------------------
    # End Map Autoscroll Edit
    #----------------------------------------------------------------------------
    when 4 # Left
    scroll_left(distance)
    when 6 # Right
    scroll_right(distance)
    #----------------------------------------------------------------------------
    # Begin Map Autoscroll Edit
    #----------------------------------------------------------------------------
    when 7 # up left
    scroll_upleft(distance)
    #----------------------------------------------------------------------------
    # End Map Autoscroll Edit
    #----------------------------------------------------------------------------
    when 8 # Up
    scroll_up(distance)
    #----------------------------------------------------------------------------
    # Begin Map Autoscroll Edit
    #----------------------------------------------------------------------------
    when 9 # up right
    scroll_upright(distance)
    #----------------------------------------------------------------------------
    # End Map Autoscroll Edit
    #----------------------------------------------------------------------------
    end
    # Subtract distance scrolled
    @scroll_rest -= distance
    end
    # Update map event
    for event in @events.values
    event.update
    end
    # Update common event
    for common_event in @common_events.values
    common_event.update
    end
    # Manage fog scrolling
    @fog_ox -= @fog_sx / 8.0
    @fog_oy -= @fog_sy / 8.0
    # Manage change in fog color tone
    if @fog_tone_duration >= 1
    d = @fog_tone_duration
    target = @fog_tone_target
    @fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d
    @fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d
    @fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d
    @fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d
    @fog_tone_duration -= 1
    end
    # Manage change in fog opacity level
    if @fog_opacity_duration >= 1
    d = @fog_opacity_duration
    @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d
    @fog_opacity_duration -= 1
    end
    end
    
    end
    Ebenfalls von Wachunga: Ein Script bei der sich die Lautstärke je nach Entfernung der Tonquelle verändert.

    Code:
    ID = 1
    SOUND = '010-River01'
    dx = $game_player.x-$game_map.events[ID].x
    dy = $game_player.y-$game_map.events[ID].y
    d=Math.sqrt(dx.abs**2+dy.abs**2)
    bgs=RPG::AudioFile.new(SOUND)
    bgs.volume = [100-d*10,0].max
    $game_system.bgs_play(bgs)
    In diesem Beispiel ist ein Fluss zu hören, je näher der Held dran ist, desto lauter ist der Fluss zu hören. Ersetzt ID mit der Event ID des Events, welches das Geräusch erzeugt. SOUND ersetzt ihr durch den BGS den ihr nutzen wollt.
    Das Script wird als p.Prozess per Call Script aufgerufen. Ein Wait von 1 kann auch nicht schaden.

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •