collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: Hilfe zu Skripten.  (Gelesen 51371 mal)

Offline Duke

  • Titel sind überbewertet!
  • RTP-Mapper
  • *
  • Beiträge: 45
  • Projekt: Übermensch
Re: Hilfe zu Skripten.
« Antwort #60 am: Januar 26, 2009, 08:44:59 »
Morgen allerseits!
Ich hab' da ein kleines Problem mit dem "KGC Battlecount-Script". oô

Da isses schonmal:
Spoiler for Hiden:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/    ?          Battle-Related Counters - KGC_BattleCount2           ? VX ?
#_/    ?                  Last Update: 2008/04/13                           ?
#_/    ?                    Original Version by KGC                         ?
#_/    ?                  Version 2 by Mr. Anonymous                        ?
#_/-----------------------------------------------------------------------------
#_/  This script processes a number of battle-related counters, such as Battle
#_/   Count, Victory Count, Escape Count, and more. Due to the nature of this
#_/   script, it's use is up to the creator.
#_/=============================================================================
#_/                          ? Event Commands ?
#_/  These commands are used in "Script" function in the third page of event
#_/   commands under "Advanced".
#_/
#_/ * reset_battle_count
#_/    Resets the battle counter. 
#_/
#_/ * get_defeat_count(EnemyID, VariableID)
#_/    Retrieves the amount of a specified defeated enemy and stores it in the
#_/     given variable.
#_/
#_/ * get_dead_count(ActorID, VariableID)
#_/    Retrieves the amount of times a specified actor has "died" and stores it
#_/     in the given variable.   
#_/
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_

#==============================================================================#
#                            ? Customization ?                                 #
#==============================================================================#
module KGC
  module BattleCount
   
    # Note: The value to the right of each of these is the in-game variable you
    #  desire to have these counters stored in.
   
    #                       ? Battles Counter ?
    # Retrieves the current battle count and stores it in the given variable.
    BATTLE_COUNT = 16
   
    #                      ? Victories Counter ?
    #   Retrieves the current amount of victories and stores it in the given
    #     variable.
    VICTORY_COUNT = 17
   
    #                       ? Escapes Counter ?
    # Retrieves the amount of escapes and stores it in the given variable.
    ESCAPE_COUNT =18
   
    #                       ? Losses Counter ?
    # Retrieves the amount of loses and stores it in the given variable.
    LOSE_COUNT = 19
   
    #                ? Total Defeated Enemies Counter ?
    # Retrieves the total amount of defeated enemies and stores it in the given
    #  variable.
    TOTAL_DEFEAT_COUNT = 20
   
    #                    ? Total Deaths Counter ?
    # Retrieves the total amount of times the party has died (by member) and
    #  stores it in the given variable.
    TOTAL_DEAD_COUNT = 21   
   
  end
end

#------------------------------------------------------------------------------#

$imported = {} if $imported == nil
$imported["BattleCount"] = false

#==============================================================================#
#                               ? KGC::Commands ?                              #
#==============================================================================#

module KGC
 module Commands
  module_function
  #--------------------------------------------------------------------------
  # ? Reset Battle Count
  #--------------------------------------------------------------------------
  def reset_battle_count
    $game_system.reset_battle_count
  end
  #--------------------------------------------------------------------------
  # ? Aquire Battle Count
  #--------------------------------------------------------------------------
  def get_battle_count=(count)
    $game_variables[KGC::BattleCount::BATTLE_COUNT] = count
    return count
  end
  #--------------------------------------------------------------------------
  # ? Aquire Victory Count
  #--------------------------------------------------------------------------
  def get_victory_count=(count)
    $game_variables[KGC::BattleCount::VICTORY_COUNT] = count 
    return count
  end
  #--------------------------------------------------------------------------
  # ? Aquire Escape Count
  #--------------------------------------------------------------------------
  def get_escape_count=(count)
    $game_variables[KGC::BattleCount::ESCAPE_COUNT] = count
    return count
  end
  #--------------------------------------------------------------------------
  # ? Aquire Lose Count
  #--------------------------------------------------------------------------
  def get_lose_count=(count)
    $game_variables[KGC::BattleCount::LOSE_COUNT] = count
    return count
  end
  #--------------------------------------------------------------------------
  # ? Aquire Specified Defeated Enemy
  #     enemy_id    : Enemy ID
  #     variable_id : Variable ID
  #--------------------------------------------------------------------------
  def get_defeat_count(enemy_id, variable_id = 0)
    count = $game_system.defeat_count(enemy_id)
    $game_variables[variable_id] = count if variable_id > 0
    return count
  end
  #--------------------------------------------------------------------------
  # ? Aquire Total Defeat Count
  #--------------------------------------------------------------------------
  def get_total_defeat_count=(count)
    $game_variables[KGC::BattleCount::TOTAL_DEFEAT_COUNT] = count
    return count
  end
  #--------------------------------------------------------------------------
  # ? Aquire Dead Count
  #     actor_id    : Actor ID
  #     variable_id : Variable ID
  #--------------------------------------------------------------------------
  def get_dead_count(actor_id, variable_id = 0)
    count = $game_system.dead_count(actor_id)
    $game_variables[variable_id] = count if variable_id > 0
    return count
  end
  #--------------------------------------------------------------------------
  # ? Aquire Total Dead Count
  #--------------------------------------------------------------------------
  def get_total_dead_count=(count)
    $game_variables[KGC::BattleCount::TOTAL_DEAD_COUNT] = count
    return count
  end
 end
end

class Game_Interpreter
  include KGC::Commands
end

#==================================End Class===================================#

#==============================================================================
# ¦ Game_System
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # ? Open Global Variables
  #--------------------------------------------------------------------------
  attr_writer   :defeat_count             # Defeat Count
  attr_writer   :dead_count               # Dead Count
  #--------------------------------------------------------------------------
  # ? Initialize
  #--------------------------------------------------------------------------
  alias initialize_KGC_BattleCount initialize
  def initialize
    initialize_KGC_BattleCount

    reset_battle_count
  end
  #--------------------------------------------------------------------------
  # ? Reset
  #--------------------------------------------------------------------------
  def reset_battle_count
    battle_count  = 0
    victory_count = 0
    escape_count  = 0
    lose_count    = 0
    @defeat_count = []
    @dead_count   = []
  end
  #--------------------------------------------------------------------------
  # ? Reset Battle Count
  #--------------------------------------------------------------------------
  def battle_count
    reset_battle_count if $game_variables[KGC::BattleCount::BATTLE_COUNT] == nil
    return $game_variables[KGC::BattleCount::BATTLE_COUNT]
  end
  #--------------------------------------------------------------------------
  # ? Reset Victory Count
  #--------------------------------------------------------------------------
  def victory_count
    reset_battle_count if $game_variables[KGC::BattleCount::VICTORY_COUNT] == nil
    return $game_variables[KGC::BattleCount::VICTORY_COUNT]
  end
  #--------------------------------------------------------------------------
  # ? Reset Escape Count
  #--------------------------------------------------------------------------
  def escape_count
    reset_battle_count if $game_variables[KGC::BattleCount::ESCAPE_COUNT] == nil
    return $game_variables[KGC::BattleCount::ESCAPE_COUNT]
  end
  #--------------------------------------------------------------------------
  # ? Reset Lose Count
  #--------------------------------------------------------------------------
  def lose_count
    reset_battle_count if $game_variables[KGC::BattleCount::LOSE_COUNT] == nil
    return $game_variables[KGC::BattleCount::LOSE_COUNT]
  end
  #--------------------------------------------------------------------------
  # ? Reset Defeat Count
  #     enemy_id : Enemy ID
  #--------------------------------------------------------------------------
  def defeat_count(enemy_id)
    reset_battle_count if @defeat_count == nil
    @defeat_count[enemy_id] = 0 if @defeat_count[enemy_id] == nil
    return @defeat_count[enemy_id]
  end
  #--------------------------------------------------------------------------
  # ? Add defeat Count
  #     enemy_id : Enemy ID
  #--------------------------------------------------------------------------
  def add_defeat_count(enemy_id)
    reset_battle_count if @defeat_count == nil
    @defeat_count[enemy_id] = 0 if @defeat_count[enemy_id] == nil
    @defeat_count[enemy_id] += 1
    $game_variables[KGC::BattleCount::TOTAL_DEFEAT_COUNT] = @defeat_count[-1]
  end
  #--------------------------------------------------------------------------
  # ? Calculate Total Defeat Count
  #--------------------------------------------------------------------------
  def total_defeat_count
    n = 0
    for i in 1...$data_enemies.size
      n += defeat_count(i)
    end
    return n
  end
  #--------------------------------------------------------------------------
  # ? Reset Dead Count
  #     actor_id : Actor ID
  #--------------------------------------------------------------------------
  def dead_count(actor_id)
    reset_battle_count if @dead_count == nil
    @dead_count[actor_id] = 0 if @dead_count[actor_id] == nil
    return @dead_count[actor_id]
  end
  #--------------------------------------------------------------------------
  # ? Add Dead Count
  #     actor_id : Actor ID
  #--------------------------------------------------------------------------
  def add_dead_count(actor_id)
    reset_battle_count if @dead_count == nil
    @dead_count[actor_id] = 0 if @dead_count[actor_id] == nil
    @dead_count[actor_id] += 1
    $game_variables[KGC::BattleCount::TOTAL_DEAD_COUNT] = @dead_count[-1]
  end
  #--------------------------------------------------------------------------
  # ? Calculate Total Dead Count
  #--------------------------------------------------------------------------
  def total_dead_count
    n = 0
    for i in 1...$data_actors.size
      n += dead_count(i)
    end
    return n
  end
end

#==================================End Class===================================#

#==============================================================================
# ¦ Scene_Battle
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ? Add Battle Count
  #--------------------------------------------------------------------------
  alias post_start_KGC_BattleCount post_start
  def post_start
    $game_variables[KGC::BattleCount::BATTLE_COUNT] += 1
    post_start_KGC_BattleCount
  end
  #--------------------------------------------------------------------------
  # ? Define Battle Count
  #--------------------------------------------------------------------------
  def battle_count
    return $game_variables[KGC::BattleCount::BATTLE_COUNT]
  end
  #--------------------------------------------------------------------------
  # ? Battle End
  #     result : Battle Result (0:Victory 1:Escape 2:Lose)
  #--------------------------------------------------------------------------
  alias battle_end_KGC_BattleCount battle_end
  def battle_end(result)
    #unless @battle_count_added
      case result
      when 0  # Victory
        $game_variables[KGC::BattleCount::VICTORY_COUNT] += 1
      when 1  # Escape
        $game_variables[KGC::BattleCount::ESCAPE_COUNT]  += 1
      when 2  # Lose
        $game_variables[KGC::BattleCount::LOSE_COUNT]    += 1
      end
      # Add Dead Enemy
      $game_troop.dead_members.each { |enemy|
        $game_system.add_defeat_count(enemy.enemy.id)
      }
      #@battle_count_added = true
     #end
    battle_end_KGC_BattleCount(result)
  end
  #--------------------------------------------------------------------------
  # ? Execute Action
  #--------------------------------------------------------------------------
  alias execute_action_KGC_BattleCount execute_action
  def execute_action
    last_exist_actors = $game_party.existing_members

    execute_action_KGC_BattleCount

    # Add Dead Actor
    dead_actors = last_exist_actors - $game_party.existing_members
    dead_actors.each { |actor|
      $game_system.add_dead_count(actor.id)
    }
  end
end

#==================================End Class===================================#
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/  The original untranslated version of this script can be found here:
# http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/php/tech.php?tool=VX&cat=tech_vx/base_function&tech=battle_count
#_/=============================================================================
#_/  Version2 brought to you by Mr. Anonymous.
# http://mraprojects.wordpress.com
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_

Das Script schleicht sich immer in mein Menü... X_x
(Damit ärgere ich mich im Moment sowieso genug rum >_>")

Aber zu meiner eigentlichen Frage:
Kann mir jemand verraten, wie ich das Script "abschalte"?
Ich würde es gerne nur per Event wieder "anschalten" können.^^

Falls sich jemand berufen sieht, sich das mal anzusehen,
wäre ich auf jeden Fall sehr dankbar!

MfG,
Duke
« Letzte Änderung: Januar 26, 2009, 08:45:46 von Duke »

Re: Hilfe zu Skripten.

Offline Kasaar

  • Epic Scripter !!
  • Eventmeister
  • ***
  • Beiträge: 305
  • Satanistischer Misantroph... noch Fragen? ]:)
Re: Hilfe zu Skripten.
« Antwort #61 am: Januar 26, 2009, 15:51:42 »
Also meiner Meinung nach würde es gehn wenn man das komplette Script in einen Switch schaltet, den Man ingame an und ausschalten kann per event...
Bin jetz kein Profiscripter und weiß auch nit obs so möglich is... aber ich würds so machen :
Das komplette Script einfach mit
If $game_switches[1] = true
script blablabla
end
einschließen ..
Besucht mich auf


Und gebt Kommentare im Blog =)

Re: Hilfe zu Skripten.

Crysis

  • Gast
Re: Hilfe zu Skripten.
« Antwort #62 am: Januar 27, 2009, 16:48:29 »
Hallo allerseits,

Also ich habe eine Frage zum "Actor Profile Information"-Script. Dieses Skript dient dazu, dass wenn man im Status-Menü eines Charakters
"Enter" drücken kann und dann in ein Menü mit zusätzlichen Informationen über den Actor kommt.

Actor Profile Information-Script:
Spoiler for Hiden:
#===============================================================
# ?         Actor Profile Information - CC_ExtendedActorInfo            ? VX ?
# ?                     Version 1.0.0 by Claimh                              ?
# ?                   Translation by Mr. Anonymous                           ?
#------------------------------------------------------------------------------
#  This script adds a character profile screen for extended actor information.
#   This screen is called from the status screen by pressing the "C" button
#   (by default). This information displayed on this screen is customized in
#   this script itself below (in the Customization block).
#==============================================================================
module Chara_Review
#==============================================================================#
#                             ? Customization ?                                #
#==============================================================================#
  # If you have more than 8 actors in your game, you may add additional lines
  #  to each of these fields.
#----------------------------------------------------------------------------
#   Call Screen Input Key
#----------------------------------------------------------------------------
  # This allows you to change the button/key pressed to call the extended
  #  actor information screen from the status screen. (Default: C)
  CHENGE_KEY = Input::C
  #--------------------------------------------------------------------------
  # ? Customize Age
  #--------------------------------------------------------------------------
  CHARA_AGE = {
   # Age is the first field to the right of the profile image.
   # ActorID => "Age"
     5 => "20",
     6 => "22",
     7 => "24",
     8 => "16"
  }
  #--------------------------------------------------------------------------
  # ? Customize Actor's Origin
  #--------------------------------------------------------------------------
  CHARA_FROM = {
   # "From" or Origin is the second field to the right of the profile image.
   # ActorID => "Place"
     5 => "Rei",
     6 => "Tsuin",
     7 => "Tsuin",
     8 => "Kouin"
  }
  #--------------------------------------------------------------------------
  # ? Customize Height
  #--------------------------------------------------------------------------
  CHARA_H = {
   # Height is the third field to the right of the profile image.
   # ActorID => "Height"
     5 => "5 Feet 8 Inches",
     6 => "4 Feet 9 Inches",
     7 => "5 Feet 1 Inch",
     8 => "5 Feet 4 Inches"
  }
  #--------------------------------------------------------------------------
  # ? Customize Weight
  #--------------------------------------------------------------------------
  CHARA_W = {
   # Weight is the fourth field to the right of the profile image.
   # ActorID => "Weight"
     5 => "125 Pounds",
     6 => "87 Pounds",
     7 => "93 Pounds",
     8 => "96 Pounds"
  }
  #--------------------------------------------------------------------------
  # ? Customize Profile Information
  #--------------------------------------------------------------------------
  CHARA_INFO = {
    # Profile Information is displayed beneath the actor's graphic file.
    # ActorID => "Information Text"
    5 => "Ryoku, is a brave strong warrior who always needs to save Kione. He is
    a man with great holy powers. In time portals he gets his Jikoku Sword with slots
    for the Jikoku Crystals to fit into. All the girls love Ryoku, for no real reason.",
    6 => "No one knows much about him, but he knows alot about them. Because
    of his weight and size he is able to move swiftly, but is also deadly with his
    hands. He seems to have a connection with Munaca, only talking to and helping her.",
    7 => "Munaca, is a some what shy girl with wind powers. She seems to know
    the mystery guy, she is confused about him and wants to know what goes on in
    his head. Her wind powers also get stronger when the people are in danger.",
    8 => "Kione, is a girl with the ability to manipulate water, she also loves
    the mystery guy who doesn`t even care about her. She is able to heal people,
    but isn`t very strong. She always near the mystery guy... Why does she bother."
  }
  #--------------------------------------------------------------------------
  # ? Customize Face/Profile Image
  #--------------------------------------------------------------------------
  # Image Type Toggle
  #  This toggle allows to use either the default Face graphic that is set up
  #   in the Actor tab in the database, or a custom image of your choosing.
  #  true = Custom images are used.
  #  false = The actor's face graphic is used.
  BSTUP = false
  # Custom Profile Graphics ("Graphics/Face" directory)(If BSTUP = true)
  BSTUP_FILE = {
    # ActorID => "Profile Image" (Without image format extension)
    #  You may also add more images for actors after the fourth line, if needed.
    5 => "actor1",
    6 => "actor1",
    7 => "actor1",
    8 => "actor1"
  }

#----------------------------------------------------------------------------
#   END Customization
#----------------------------------------------------------------------------
end
#==============================================================================
# ? Window_Charactor
#------------------------------------------------------------------------------
# ? Define Window
#==============================================================================
class Window_Charactor < Window_Base
  #--------------------------------------------------------------------------
  # ? Initialize Profile Window
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, 544, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh(actor)
  end
  #--------------------------------------------------------------------------
  # ? Determine BSTUP Type
  #--------------------------------------------------------------------------
  def refresh(actor)
    self.contents.clear
    return if actor.nil?
    if Chara_Review::BSTUP
      refresh_bstup(actor)  # If BSTUP = true
    else
      refresh_face(actor)   # If BSTUP = false
    end
  end
  #--------------------------------------------------------------------------
  # ? Draw Parameters and Profile Image (BSTUP)
  #--------------------------------------------------------------------------
  def refresh_bstup(actor)
    draw_face_picture(Chara_Review::BSTUP_FILE[actor.id], 0, 0)
    self.contents.font.color = system_color
    self.contents.draw_text(280, 30, 80, WLH, "Name:")
    self.contents.draw_text(280, 60, 80, WLH, "Age:")
    self.contents.draw_text(280, 90, 80, WLH, "From:")
    self.contents.draw_text(280, 120, 80, WLH, "Height:")
    self.contents.draw_text(280, 150, 80, WLH, "Weight:")
    self.contents.font.color = normal_color
    draw_actor_name(actor, 380,  30)
    self.contents.draw_text(380, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id])
    self.contents.draw_text(380, 90, 180, WLH, Chara_Review::CHARA_FROM[actor.id])
    self.contents.draw_text(380, 120 , 200, WLH, Chara_Review::CHARA_H[actor.id])
    self.contents.draw_text(380, 150, 250, WLH, Chara_Review::CHARA_W[actor.id])
    draw_enter_text(20, 300, 500, WLH, Chara_Review::CHARA_INFO[actor.id])
  end
  #--------------------------------------------------------------------------
  # ? Draw Parameters and Profile Image (FACE)
  #--------------------------------------------------------------------------
  def refresh_face(actor)
    draw_actor_face(actor, 8, 32)
    self.contents.font.color = system_color
    self.contents.draw_text(200, 30, 80, WLH, "")
    self.contents.draw_text(200, 60, 80, WLH, "Age:")
    self.contents.draw_text(200, 90, 80, WLH, "From:")
    self.contents.draw_text(200, 120, 80, WLH, "Height:")
    self.contents.draw_text(200, 150, 80, WLH, "Weight:")
    self.contents.font.color = normal_color
    draw_actor_name(actor, 300,  30)
    self.contents.draw_text(300, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id])
    self.contents.draw_text(300, 90, 180, WLH, Chara_Review::CHARA_FROM[actor.id])
    self.contents.draw_text(300, 120 , 200, WLH, Chara_Review::CHARA_H[actor.id])
    self.contents.draw_text(300, 150, 250, WLH, Chara_Review::CHARA_W[actor.id])
    draw_enter_text(20, 200, 500, WLH, Chara_Review::CHARA_INFO[actor.id])
  end
end

class Window_Base < Window
  #--------------------------------------------------------------------------
  # ? Draw Entered Text
  #--------------------------------------------------------------------------
  def draw_enter_text(x, y, width, height, text)
    info_box = text.split(/\n/)
    for i in 0...info_box.size
      self.contents.draw_text( x, y+i*WLH, width, WLH, info_box)
      break if (y+i*WLH) > (self.height-WLH)
    end
  end
  #--------------------------------------------------------------------------
  # ? Draw Face Graphic(Graphics/Face)
  #--------------------------------------------------------------------------
  def draw_face_picture(file_name, x, y)
    bitmap = Cache.face(file_name)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x, y, bitmap, src_rect)
  end
end


#==============================================================================
# ? Scene_Charactor
#------------------------------------------------------------------------------
# ? Define Methods
#==============================================================================
class Scene_Charactor < Scene_Base
  #--------------------------------------------------------------------------
  # ? Initialize Actor
  #     actor_index : Actor ID
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0)
    @actor_index = actor_index
  end
  #--------------------------------------------------------------------------
  # ? Create Menu Background
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @actor = $game_party.members[@actor_index]
    @status_window = Window_Charactor.new(@actor)
  end
  #--------------------------------------------------------------------------
  # ? Dispose Status Window
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # ? Return Scene
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Status.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # ? Next Actor
  #--------------------------------------------------------------------------
  def next_actor
    @actor_index += 1
    @actor_index %= $game_party.members.size
    $scene = Scene_Charactor.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # ? Previous Actor
  #--------------------------------------------------------------------------
  def prev_actor
    @actor_index += $game_party.members.size - 1
    @actor_index %= $game_party.members.size
    $scene = Scene_Charactor.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # ? Actor Profile Screne Inputs
  #--------------------------------------------------------------------------
  def update
    update_menu_background
    @status_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::R)
      Sound.play_cursor
      next_actor
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      prev_actor
    end
    super
  end
end


#==============================================================================
# ? Scene_Status
#==============================================================================
class Scene_Status
  #--------------------------------------------------------------------------
  # ? Update Actor
  #--------------------------------------------------------------------------
  alias update_chara update
  def update
    if Input.trigger?(Chara_Review::CHENGE_KEY)
      Sound.play_decision
      $scene = Scene_Charactor.new(@actor_index)
    end
    update_chara
  end
end

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/  The original untranslated version of this script can be found here:
#http://www4.plala.or.jp/findias/codecrush/material/rgss2/menu/1-menu_chara/menu_char_top.htmll
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_


Also wie man sieht kann man hier bestimmte Informationen über die Actor eingeben, wie zum Beispiel Herkunft, Alter usw.
Ich wollte in mein Spiel einfügen, dass die Werte wie zum Beispiel "Alter" in einer game_variable gespeichert werden und dass
man diese dann im Spiel über Änderung einer Variable im Spiel verändern kann. Also wenn ich zum Beispiel Variable "alter1" im
Spiel auf 20 setze wird es in dem Menü dann das Alter auch als 20 angezeigt.

Das Skript scheint nicht sehr kompliziert zu sein, aber da ich selbst nicht wirklicht gut Skripten kann, würde ich mich echt freuen,
wenn mir da jemand eine Lösung finden könnte.

Re: Hilfe zu Skripten.

Shinji

  • Gast
Re: Hilfe zu Skripten.
« Antwort #63 am: Januar 27, 2009, 20:53:10 »
self.contents.draw_text(300, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id])

daraus machste

self.contents.draw_text(300, 60, 80, WLH, $game_variables[deinevariablennummer])
« Letzte Änderung: Januar 27, 2009, 20:54:15 von Shinji »

Re: Hilfe zu Skripten.

Offline Kasaar

  • Epic Scripter !!
  • Eventmeister
  • ***
  • Beiträge: 305
  • Satanistischer Misantroph... noch Fragen? ]:)
Re: Hilfe zu Skripten.
« Antwort #64 am: Januar 27, 2009, 22:14:47 »
Hab dann auch mal wieder ne Frage...
Also ich hab es nun geschafft per Script ne Message anzeigen zu lassen... nur wie geht das mit dem Zeilenumbruch... weil bei mir zeigt sich dann iwie immer son quadrat Oo
Besucht mich auf


Und gebt Kommentare im Blog =)

Re: Hilfe zu Skripten.

Shinji

  • Gast
Re: Hilfe zu Skripten.
« Antwort #65 am: Januar 27, 2009, 22:26:53 »
\n

Re: Hilfe zu Skripten.

Crysis

  • Gast
Re: Hilfe zu Skripten.
« Antwort #66 am: Januar 27, 2009, 23:26:48 »
erst einmal danke shinji, dass du vesucht hast zu helfen, aber mit deiner lösung hat es leider nicht richtig geklappt.  Nehmen wir mal als beispiel ich habe zwei actor. Ich speichere das alter der helden als variablen alter1 und alter2. Dann vergeht im spiel 1 monat und einer der helden wird 1 jahr älter und ich addiere 1 zur variable alter1. Das selbe mache ich mit dem zweiten helden und der variablen alter2 nach noch einem monat vergangener zeit. So jetzt möchte ich, dass sich die verschiedenen alterswerte der helden im zusätzlichen menü des skriptes auch verändert und nicht gleichbleibt. Bei Shinjis lösung konnte ich zwar das alter im menü über die variable verändern, aber jeder actor hatte das selbe alter und ich hätte halt gerne gehabt, dass das alter von jedem actor in einer unterschiedlichen variable gespeichert wird und das wenn ich dann die variable eines actors verändere ändert sich im menü nur das alter eines actors. Das skript habe ich in meinem letzten post gepostet. Ich hoffe shinji oder sonst jemand kann bei diesem problem helfen.           

EDIT:
Hier das Skript ohne Smileys:

Spoiler for Hiden:
#===============================================================
# ?         Actor Profile Information - CC_ExtendedActorInfo            ? VX ?
# ?                     Version 1.0.0 by Claimh                              ?
# ?                   Translation by Mr. Anonymous                           ?
#------------------------------------------------------------------------------
#  This script adds a character profile screen for extended actor information.
#   This screen is called from the status screen by pressing the "C" button
#   (by default). This information displayed on this screen is customized in
#   this script itself below (in the Customization block).
#==============================================================================
module Chara_Review
#==============================================================================#
#                             ? Customization ?                                #
#==============================================================================#
  # If you have more than 8 actors in your game, you may add additional lines
  #  to each of these fields.
#----------------------------------------------------------------------------
#   Call Screen Input Key
#----------------------------------------------------------------------------
  # This allows you to change the button/key pressed to call the extended
  #  actor information screen from the status screen. (Default: C)
  CHENGE_KEY = Input::C
  #--------------------------------------------------------------------------
  # ? Customize Age
  #--------------------------------------------------------------------------
  CHARA_AGE = {
   # Age is the first field to the right of the profile image.
   # ActorID => "Age"
     5 => "20",
     6 => "22",
     7 => "24",
     8 => "16"
  }
  #--------------------------------------------------------------------------
  # ? Customize Actor's Origin
  #--------------------------------------------------------------------------
  CHARA_FROM = {
   # "From" or Origin is the second field to the right of the profile image.
   # ActorID => "Place"
     5 => "Rei",
     6 => "Tsuin",
     7 => "Tsuin",
     8 => "Kouin"
  }
  #--------------------------------------------------------------------------
  # ? Customize Height
  #--------------------------------------------------------------------------
  CHARA_H = {
   # Height is the third field to the right of the profile image.
   # ActorID => "Height"
     5 => "5 Feet 8 Inches",
     6 => "4 Feet 9 Inches",
     7 => "5 Feet 1 Inch",
     8 => "5 Feet 4 Inches"
  }
  #--------------------------------------------------------------------------
  # ? Customize Weight
  #--------------------------------------------------------------------------
  CHARA_W = {
   # Weight is the fourth field to the right of the profile image.
   # ActorID => "Weight"
     5 => "125 Pounds",
     6 => "87 Pounds",
     7 => "93 Pounds",
     8 => "96 Pounds"
  }
  #--------------------------------------------------------------------------
  # ? Customize Profile Information
  #--------------------------------------------------------------------------
  CHARA_INFO = {
    # Profile Information is displayed beneath the actor's graphic file.
    # ActorID => "Information Text"
    5 => "Ryoku, is a brave strong warrior who always needs to save Kione. He is
    a man with great holy powers. In time portals he gets his Jikoku Sword with slots
    for the Jikoku Crystals to fit into. All the girls love Ryoku, for no real reason.",
    6 => "No one knows much about him, but he knows alot about them. Because
    of his weight and size he is able to move swiftly, but is also deadly with his
    hands. He seems to have a connection with Munaca, only talking to and helping her.",
    7 => "Munaca, is a some what shy girl with wind powers. She seems to know
    the mystery guy, she is confused about him and wants to know what goes on in
    his head. Her wind powers also get stronger when the people are in danger.",
    8 => "Kione, is a girl with the ability to manipulate water, she also loves
    the mystery guy who doesn`t even care about her. She is able to heal people,
    but isn`t very strong. She always near the mystery guy... Why does she bother."
  }
  #--------------------------------------------------------------------------
  # ? Customize Face/Profile Image
  #--------------------------------------------------------------------------
  # Image Type Toggle
  #  This toggle allows to use either the default Face graphic that is set up
  #   in the Actor tab in the database, or a custom image of your choosing.
  #  true = Custom images are used.
  #  false = The actor's face graphic is used.
  BSTUP = false
  # Custom Profile Graphics ("Graphics/Face" directory)(If BSTUP = true)
  BSTUP_FILE = {
    # ActorID => "Profile Image" (Without image format extension)
    #  You may also add more images for actors after the fourth line, if needed.
    5 => "actor1",
    6 => "actor1",
    7 => "actor1",
    8 => "actor1"
  }

#----------------------------------------------------------------------------
#   END Customization
#----------------------------------------------------------------------------
end
#==============================================================================
# ? Window_Charactor
#------------------------------------------------------------------------------
#==============================================================================
class Window_Charactor < Window_Base
  #--------------------------------------------------------------------------
  # ? Initialize Profile Window
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, 544, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh(actor)
  end
  #--------------------------------------------------------------------------
  # ? Determine BSTUP Type
  #--------------------------------------------------------------------------
  def refresh(actor)
    self.contents.clear
    return if actor.nil?
    if Chara_Review::BSTUP
      refresh_bstup(actor)  # If BSTUP = true
    else
      refresh_face(actor)   # If BSTUP = false
    end
  end
  #--------------------------------------------------------------------------
  # ? Draw Parameters and Profile Image (BSTUP)
  #--------------------------------------------------------------------------
  def refresh_bstup(actor)
    draw_face_picture(Chara_Review::BSTUP_FILE[actor.id], 0, 0)
    self.contents.font.color = system_color
    self.contents.draw_text(280, 30, 80, WLH, "Name:")
    self.contents.draw_text(280, 60, 80, WLH, "Age:")
    self.contents.draw_text(280, 90, 80, WLH, "From:")
    self.contents.draw_text(280, 120, 80, WLH, "Height:")
    self.contents.draw_text(280, 150, 80, WLH, "Weight:")
    self.contents.font.color = normal_color
    draw_actor_name(actor, 380,  30)
    self.contents.draw_text(380, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id])
    self.contents.draw_text(380, 90, 180, WLH,Chara_Review::CHARA_FROM[actor.id])
    self.contents.draw_text(380, 120 , 200, WLH, Chara_Review::CHARA_H[actor.id])
    self.contents.draw_text(380, 150, 250, WLH, Chara_Review::CHARA_W[actor.id])
    draw_enter_text(20, 300, 500, WLH, Chara_Review::CHARA_INFO[actor.id])
  end
  #--------------------------------------------------------------------------
  # ? Draw Parameters and Profile Image (FACE)
  #--------------------------------------------------------------------------
  def refresh_face(actor)
    draw_actor_face(actor, 8, 32)
    self.contents.font.color = system_color
    self.contents.draw_text(200, 30, 80, WLH,"Name:")
    self.contents.draw_text(200, 60, 80, WLH, "Age:")
    self.contents.draw_text(200, 90, 80, WLH, "From:")
    self.contents.draw_text(200, 120, 80, WLH, "Height:")
    self.contents.draw_text(200, 150, 80, WLH, "Weight:")
    self.contents.font.color = normal_color
    draw_actor_name(actor, 300,  30)
    self.contents.draw_text(300, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id])
    self.contents.draw_text(300, 90, 180, WLH, Chara_Review::CHARA_FROM[actor.id])
    self.contents.draw_text(300, 120 , 200, WLH, Chara_Review::CHARA_H[actor.id])
    self.contents.draw_text(300, 150, 250, WLH, Chara_Review::CHARA_W[actor.id])
    draw_enter_text(20, 200, 500, WLH, Chara_Review::CHARA_INFO[actor.id])
  end
  end
class Window_Base < Window
  #--------------------------------------------------------------------------
  # ? Draw Entered Text
  #--------------------------------------------------------------------------
    def draw_enter_text(x, y, width, height, text)
    info_box = text.split(/\n/)
    for i in 0...info_box.size
      self.contents.draw_text( x, y+i*WLH, width, WLH, info_box)
      break if (y+i*WLH) > (self.height-WLH)
    end
  end
  #--------------------------------------------------------------------------
  # ? Draw Face Graphic(Graphics/Face)
  #--------------------------------------------------------------------------
  def draw_face_picture(file_name, x, y)
    bitmap = Cache.face(file_name)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x, y, bitmap, src_rect)
  end
end


#==============================================================================
# ? Scene_Charactor
#------------------------------------------------------------------------------
# ? Define Methods
#==============================================================================
class Scene_Charactor < Scene_Base
  #--------------------------------------------------------------------------
  # ? Initialize Actor
  #     actor_index : Actor ID
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0)
    @actor_index = actor_index
  end
  #--------------------------------------------------------------------------
  # ? Create Menu Background
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @actor = $game_party.members[@actor_index]
    @status_window = Window_Charactor.new(@actor)
  end
  #--------------------------------------------------------------------------
  # ? Dispose Status Window
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # ? Return Scene
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Status.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # ? Next Actor
  #--------------------------------------------------------------------------
  def next_actor
    @actor_index += 1
    @actor_index %= $game_party.members.size
    $scene = Scene_Charactor.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # ? Previous Actor
  #--------------------------------------------------------------------------
  def prev_actor
    @actor_index += $game_party.members.size - 1
    @actor_index %= $game_party.members.size
    $scene = Scene_Charactor.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # ? Actor Profile Screne Inputs
  #--------------------------------------------------------------------------
  def update
    update_menu_background
    @status_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::R)
      Sound.play_cursor
      next_actor
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      prev_actor
    end
    super
  end
end


#==============================================================================
# ? Scene_Status
#==============================================================================
class Scene_Status
  #--------------------------------------------------------------------------
  # ? Update Actor
  #--------------------------------------------------------------------------
  alias update_chara update
  def update
    if Input.trigger?(Chara_Review::CHENGE_KEY)
      Sound.play_decision
      $scene = Scene_Charactor.new(@actor_index)
      end
    update_chara
  end
end

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/  The original untranslated version of this script can be found here:
#http://www4.plala.or.jp/findias/codecrush/material/rgss2/menu/1-menu_chara/menu_char_top.htmll
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
« Letzte Änderung: Januar 28, 2009, 15:12:26 von Crysis »

Re: Hilfe zu Skripten.

Shinji

  • Gast
Re: Hilfe zu Skripten.
« Antwort #67 am: Januar 28, 2009, 14:37:39 »
dann mach bitte die smilies aus, die zerfetzen das ganze script^^

edit: so hier...
musst jetzt halt das alter manuell immer anpassen und jeder actor ist zu beginn 0 jahre alt.
benutz dafür folgende callscripts:
$game_actors[5].age = 20 # actor 5 ist nun 20 jahre alt
$game_actors[5].age += 20 # actor 5 ist nun 40 jahre alt
$game_actors[5].age - = 10 # actor 5 ist nun 30 jahre alt
$game_actors[5].age /= 2 # actor 5 ist nun 15 jahre alt
$game_actors[5].age *= 4 # actor 5 ist nun 60 jahre alt
etc.

Spoiler for Hiden:
#===============================================================
# ?         Actor Profile Information - CC_ExtendedActorInfo            ? VX ?
# ?                     Version 1.0.0 by Claimh                              ?
# ?                   Translation by Mr. Anonymous                           ?
#------------------------------------------------------------------------------
#  This script adds a character profile screen for extended actor information.
#   This screen is called from the status screen by pressing the "C" button
#   (by default). This information displayed on this screen is customized in
#   this script itself below (in the Customization block).
#==============================================================================
module Chara_Review
#==============================================================================#
#                             ? Customization ?                                #
#==============================================================================#
  # If you have more than 8 actors in your game, you may add additional lines
  #  to each of these fields.
#----------------------------------------------------------------------------
#   Call Screen Input Key
#----------------------------------------------------------------------------
  # This allows you to change the button/key pressed to call the extended
  #  actor information screen from the status screen. (Default: C)
  CHENGE_KEY = Input::C
  #--------------------------------------------------------------------------
  # ? Customize Age
  #--------------------------------------------------------------------------
  CHARA_AGE = {
   # Age is the first field to the right of the profile image.
   # ActorID => "Age"
     5 => "20",
     6 => "22",
     7 => "24",
     8 => "16"
  }
  #--------------------------------------------------------------------------
  # ? Customize Actor's Origin
  #--------------------------------------------------------------------------
  CHARA_FROM = {
   # "From" or Origin is the second field to the right of the profile image.
   # ActorID => "Place"
     5 => "Rei",
     6 => "Tsuin",
     7 => "Tsuin",
     8 => "Kouin"
  }
  #--------------------------------------------------------------------------
  # ? Customize Height
  #--------------------------------------------------------------------------
  CHARA_H = {
   # Height is the third field to the right of the profile image.
   # ActorID => "Height"
     5 => "5 Feet 8 Inches",
     6 => "4 Feet 9 Inches",
     7 => "5 Feet 1 Inch",
     8 => "5 Feet 4 Inches"
  }
  #--------------------------------------------------------------------------
  # ? Customize Weight
  #--------------------------------------------------------------------------
  CHARA_W = {
   # Weight is the fourth field to the right of the profile image.
   # ActorID => "Weight"
     5 => "125 Pounds",
     6 => "87 Pounds",
     7 => "93 Pounds",
     8 => "96 Pounds"
  }
  #--------------------------------------------------------------------------
  # ? Customize Profile Information
  #--------------------------------------------------------------------------
  CHARA_INFO = {
    # Profile Information is displayed beneath the actor's graphic file.
    # ActorID => "Information Text"
    5 => "Ryoku, is a brave strong warrior who always needs to save Kione. He is
    a man with great holy powers. In time portals he gets his Jikoku Sword with slots
    for the Jikoku Crystals to fit into. All the girls love Ryoku, for no real reason.",
    6 => "No one knows much about him, but he knows alot about them. Because
    of his weight and size he is able to move swiftly, but is also deadly with his
    hands. He seems to have a connection with Munaca, only talking to and helping her.",
    7 => "Munaca, is a some what shy girl with wind powers. She seems to know
    the mystery guy, she is confused about him and wants to know what goes on in
    his head. Her wind powers also get stronger when the people are in danger.",
    8 => "Kione, is a girl with the ability to manipulate water, she also loves
    the mystery guy who doesn`t even care about her. She is able to heal people,
    but isn`t very strong. She always near the mystery guy... Why does she bother."
  }
  #--------------------------------------------------------------------------
  # ? Customize Face/Profile Image
  #--------------------------------------------------------------------------
  # Image Type Toggle
  #  This toggle allows to use either the default Face graphic that is set up
  #   in the Actor tab in the database, or a custom image of your choosing.
  #  true = Custom images are used.
  #  false = The actor's face graphic is used.
  BSTUP = false
  # Custom Profile Graphics ("Graphics/Face" directory)(If BSTUP = true)
  BSTUP_FILE = {
    # ActorID => "Profile Image" (Without image format extension)
    #  You may also add more images for actors after the fourth line, if needed.
    5 => "actor1",
    6 => "actor1",
    7 => "actor1",
    8 => "actor1"
  }

#----------------------------------------------------------------------------
#   END Customization
#----------------------------------------------------------------------------
end
#==============================================================================
# ? Window_Charactor
#------------------------------------------------------------------------------
#==============================================================================
class Window_Charactor < Window_Base
  #--------------------------------------------------------------------------
  # ? Initialize Profile Window
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, 544, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh(actor)
  end
  #--------------------------------------------------------------------------
  # ? Determine BSTUP Type
  #--------------------------------------------------------------------------
  def refresh(actor)
    self.contents.clear
    return if actor.nil?
    if Chara_Review::BSTUP
      refresh_bstup(actor)  # If BSTUP = true
    else
      refresh_face(actor)   # If BSTUP = false
    end
  end
  #--------------------------------------------------------------------------
  # ? Draw Parameters and Profile Image (BSTUP)
  #--------------------------------------------------------------------------
  def refresh_bstup(actor)
    draw_face_picture(Chara_Review::BSTUP_FILE[actor.id], 0, 0)
    self.contents.font.color = system_color
    self.contents.draw_text(280, 30, 80, WLH, "Name:")
    self.contents.draw_text(280, 60, 80, WLH, "Age:")
    self.contents.draw_text(280, 90, 80, WLH, "From:")
    self.contents.draw_text(280, 120, 80, WLH, "Height:")
    self.contents.draw_text(280, 150, 80, WLH, "Weight:")
    self.contents.font.color = normal_color
    draw_actor_name(actor, 380,  30)
    self.contents.draw_text(380, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id])
    self.contents.draw_text(380, 90, 180, WLH,Chara_Review::CHARA_FROM[actor.id])
    self.contents.draw_text(380, 120 , 200, WLH, Chara_Review::CHARA_H[actor.id])
    self.contents.draw_text(380, 150, 250, WLH, Chara_Review::CHARA_W[actor.id])
    draw_enter_text(20, 300, 500, WLH, Chara_Review::CHARA_INFO[actor.id])
  end
  #--------------------------------------------------------------------------
  # ? Draw Parameters and Profile Image (FACE)
  #--------------------------------------------------------------------------
  def refresh_face(actor)
    if num = 1
    draw_actor_face(actor, 8, 32)
    self.contents.font.color = system_color
    self.contents.draw_text(200, 30, 80, WLH,"Name:")
    self.contents.draw_text(200, 60, 80, WLH, "Age:")
    self.contents.draw_text(200, 90, 80, WLH, "From:")
    self.contents.draw_text(200, 120, 80, WLH, "Height:")
    self.contents.draw_text(200, 150, 80, WLH, "Weight:")
    self.contents.font.color = normal_color
    draw_actor_name(actor, 300,  30)
    draw_actor_age(actor,300,60)
    self.contents.draw_text(300, 90, 180, WLH, Chara_Review::CHARA_FROM[actor.id])
    self.contents.draw_text(300, 120 , 200, WLH, Chara_Review::CHARA_H[actor.id])
    self.contents.draw_text(300, 150, 250, WLH, Chara_Review::CHARA_W[actor.id])
    draw_enter_text(20, 200, 500, WLH, Chara_Review::CHARA_INFO[actor.id])
  end
  end
  end
class Window_Base < Window
  #--------------------------------------------------------------------------
  # ? Draw Entered Text
  #--------------------------------------------------------------------------
    def draw_enter_text(x, y, width, height, text)
    info_box = text.split(/\n/)
    for i in 0...info_box.size
      self.contents.draw_text( x, y+i*WLH, width, WLH, info_box)
      break if (y+i*WLH) > (self.height-WLH)
    end
  end
  #--------------------------------------------------------------------------
  # ? Draw Face Graphic(Graphics/Face)
  #--------------------------------------------------------------------------
  def draw_face_picture(file_name, x, y)
    bitmap = Cache.face(file_name)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x, y, bitmap, src_rect)
  end
 
  def draw_actor_age(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 108, WLH, actor.age)
  end
end

#==============================================================================
# ? Scene_Charactor
#------------------------------------------------------------------------------
# ? Define Methods
#==============================================================================
class Scene_Charactor < Scene_Base
  #--------------------------------------------------------------------------
  # ? Initialize Actor
  #     actor_index : Actor ID
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0)
    @actor_index = actor_index
  end
  #--------------------------------------------------------------------------
  # ? Create Menu Background
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @actor = $game_party.members[@actor_index]
    @status_window = Window_Charactor.new(@actor)
  end
  #--------------------------------------------------------------------------
  # ? Dispose Status Window
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # ? Return Scene
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Status.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # ? Next Actor
  #--------------------------------------------------------------------------
  def next_actor
    @actor_index += 1
    @actor_index %= $game_party.members.size
    $scene = Scene_Charactor.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # ? Previous Actor
  #--------------------------------------------------------------------------
  def prev_actor
    @actor_index += $game_party.members.size - 1
    @actor_index %= $game_party.members.size
    $scene = Scene_Charactor.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # ? Actor Profile Screne Inputs
  #--------------------------------------------------------------------------
  def update
    update_menu_background
    @status_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::R)
      Sound.play_cursor
      next_actor
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      prev_actor
    end
    super
  end
end

# edit by shinji
class Game_Actor < Game_Battler
  attr_accessor :age
  #--------------------------------------------------------------------------
  # * Setup
  #     actor_id : actor ID
  #--------------------------------------------------------------------------
  def setup(actor_id)
    actor = $data_actors[actor_id]
    @actor_id = actor_id
    @name = actor.name
    @age = 0
    @character_name = actor.character_name
    @character_index = actor.character_index
    @face_name = actor.face_name
    @face_index = actor.face_index
    @class_id = actor.class_id
    @weapon_id = actor.weapon_id
    @armor1_id = actor.armor1_id
    @armor2_id = actor.armor2_id
    @armor3_id = actor.armor3_id
    @armor4_id = actor.armor4_id
    @level = actor.initial_level
    @exp_list = Array.new(101)
    make_exp_list
    @exp = @exp_list[@level]
    @skills = []
    for i in self.class.learnings
      learn_skill(i.skill_id) if i.level <= @level
    end
    clear_extra_values
    recover_all
  end
 
  def age
     return @age
   end
end
#==============================================================================
# ? Scene_Status
#==============================================================================
class Scene_Status
  #--------------------------------------------------------------------------
  # ? Update Actor
  #--------------------------------------------------------------------------
  alias update_chara update
  def update
    if Input.trigger?(Chara_Review::CHENGE_KEY)
      Sound.play_decision
      $scene = Scene_Charactor.new(@actor_index)
      end
    update_chara
  end
end

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/  The original untranslated version of this script can be found here:
#http://www4.plala.or.jp/findias/codecrush/material/rgss2/menu/1-menu_chara/menu_char_top.htmll
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
« Letzte Änderung: Januar 28, 2009, 15:24:39 von Shinji »

Re: Hilfe zu Skripten.

Crysis

  • Gast
Re: Hilfe zu Skripten.
« Antwort #68 am: Januar 29, 2009, 14:47:19 »
Hallo, ich bins mal wieder,
Also ich  wollte mal fragen ob es ein Skript gibt, oder überhaupt eine Möglichkeit das Fenster im Kampf zu höher machen, wo alle Actor mit HP und MP angezeigt werden. Ich benutze nämlich mit dem "Large Party"-Skript 5 Actor kann in dem Kampfmenü die Anzeige des 5. Actors nicht sehen.

Für alle die es nicht so richtig verstanden haben hab ich noch einen Screenshot gemacht und das Fenster was ich gerne höher machen will rot markiert:
http://img502.imageshack.us/my.php?image=kampfot2.jpg

Hoffe das jemand eine Lösung dafür finden kann, weil das echt stört wenn man im Kampf die Anzeigen von allen Actor nicht gleichzeitig sehen kann.

Re: Hilfe zu Skripten.

Offline Frost

  • Eventmeister
  • ***
  • Beiträge: 346
Re: Hilfe zu Skripten.
« Antwort #69 am: Januar 29, 2009, 15:10:30 »
Also gehen tuts auf jeden Fall. Ich hab leider noch nicht so viel Ahnung von RGSS aber was man machen muss (denke ich) weiß ich trotzdem. Du müsstest von der Anzeige die Koordinaten finden und diese ändern. Vielleicht findest du ja irgendwo die Koordinaten. (Sind meist mit den Variablen X und Y gekennzeichnet - wie beim Koordinatensystem^^)
« Letzte Änderung: Januar 29, 2009, 15:11:58 von Frost »
http://fernsehkritik.tv/ - Macht dem niveaulosen Fernsehen ein Ende!

Re: Hilfe zu Skripten.

Crysis

  • Gast
Re: Hilfe zu Skripten.
« Antwort #70 am: Januar 29, 2009, 15:36:23 »
Also Frost im Prinzip hast du recht, aber ich bin schon auf die Idee gekommen und hab so etwas leider nicht finden können.
Unter Scene_Battle gibt es diese Stelle die für die Fenster im Kampf zuständig ist:

Spoiler for Hiden:

  #--------------------------------------------------------------------------
  # * Create Information Display Viewport
  #--------------------------------------------------------------------------
  def create_info_viewport
    @info_viewport = Viewport.new(0, 288, 544, 128)
    @info_viewport.z = 100
    @status_window = Window_BattleStatus.new
    @party_command_window = Window_PartyCommand.new
    @actor_command_window = Window_ActorCommand.new
    @status_window.viewport = @info_viewport
    @party_command_window.viewport = @info_viewport
    @actor_command_window.viewport = @info_viewport
    @status_window.x = 128
    @actor_command_window.x = 544
    @info_viewport.visible = false
  end

Hab schon versucht jeden Wert zu ändern, aber das bewirkt im Prinzip nur, dass die Fenster verschoben werden, oder von manchen Fenstern die Breite erhöht wird. Also ich glaube die Fenster haben eine bestimmte Standarthöhe und man muss da noch einen Befehl hinzufügen der das Fenster größer als
Standart macht.

Re: Hilfe zu Skripten.

Shinji

  • Gast
Re: Hilfe zu Skripten.
« Antwort #71 am: Januar 29, 2009, 16:17:48 »
ich gib dir nen tipp,
schau dir mal window_battlestatus an :)

Re: Hilfe zu Skripten.

Crysis

  • Gast
Re: Hilfe zu Skripten.
« Antwort #72 am: Januar 29, 2009, 16:43:34 »
So hab das probiert was du gesagt hast aber des hat leider nicht funktioniert. Das lag aber daran dass mein "Large Party" Script das Battle Fenster verwaltet.
Also wenn ich da height erhöhe und dann und dann den y-Wert des Fensters erhöhe damit es nach oben gezogen wird und ich unten den 5. Actor sehe sieht das ganze folgendermaßen aus:

http://img401.imageshack.us/my.php?image=kampffensterwu8.jpg

Hab mal hier den Teil vom Large Party Script gepostet der die Window verwaltet.
Spoiler for Hiden:
#==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
#  This window displays the status of all party members on the battle screen.
#==============================================================================

class Window_BattleStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias dargor_large_party_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    dargor_large_party_initialize
    height = 128 + (24 * ($game_party.members.size-4))
    self.contents = Bitmap.new(width - 32, height - 32)
    self.height = 128
    refresh
  end
  #--------------------------------------------------------------------------
  # * Update cursor
  #-------------------------------------------------------------------------- 
  def update_cursor
    if @index < 0
      self.cursor_rect.empty
      return
    end
    # Get top row
    row = @index  / @column_max
    if row < self.top_row
      self.top_row = row
    end
    # Reset Top Row if at bottom of list
    if row > self.top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    y = @index / @column_max * 24 - self.oy
    # Draw the cursor
    self.cursor_rect.set(0, y, contents.width, 24)
  end
  #--------------------------------------------------------------------------
  # * Get Top Row
  #-------------------------------------------------------------------------- 
  def top_row
    return self.oy / 24
  end
  #--------------------------------------------------------------------------
  # * Set Top Row
  #     row : row shown on top
  #-------------------------------------------------------------------------- 
  def top_row=(row)
    if row < 0
      row = 0
    end
    if row > row_max - 1
      row = row_max - 1
    end
    self.oy = row * 24
  end
  #--------------------------------------------------------------------------
  # * Get Number of Rows Displayable on 1 Page
  #-------------------------------------------------------------------------- 
  def page_row_max
    return 4
  end
end

Re: Hilfe zu Skripten.

Offline Kasaar

  • Epic Scripter !!
  • Eventmeister
  • ***
  • Beiträge: 305
  • Satanistischer Misantroph... noch Fragen? ]:)
Re: Hilfe zu Skripten.
« Antwort #73 am: Februar 03, 2009, 17:07:08 »
So leute hab mal ne Frage:
Und zwar, weiß jmd wie ich es per Script oder per Event lösen kann, das Dauerhast in der oberen linken Ecke des Screens die Variable[1] angezeigt wird? wirklich permanent! mit Script wärs mir am liebsten
Oder gibt es eine Möglichkeit permanent das Gold anzeigen zu lassen? auch auf der Map?
Hab die sufu benutzt aber nix gefunden :(
« Letzte Änderung: Februar 03, 2009, 18:12:41 von Sartek »
Besucht mich auf


Und gebt Kommentare im Blog =)

Re: Hilfe zu Skripten.

MelekTaus

  • Gast
Re: Hilfe zu Skripten.
« Antwort #74 am: Februar 03, 2009, 22:53:24 »
Kann jemand so nett sein und das woratana nms reinstellen? Iwie funkt die rpgrevolution-Seite nicht.
Wäre echt nice^^ weil ich kann es sonst nirgends finden

Thx im Vorraus,
Grüße

 


 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