collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

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

Offline Cloud Crescent

  • Mortiferus Anima
  • Ralph
  • *
  • Beiträge: 17
  • … and a smile will be my mask forever ...
Re: Hilfe zu Skripten.
« Antwort #360 am: März 16, 2010, 17:51:10 »
Das verstehe ich jetzt nicht, habe doch oben ein Script gepostet, dass ich gefunden habe?

Hier noch einmal:
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"
     1 => "17",
     2 => "18",
     3 => "15",
     4 => "16",
     5 => "16"
  }
  #--------------------------------------------------------------------------
  # ? Customize Actor's Origin
  #--------------------------------------------------------------------------
  CHARA_FROM = {
   # "From" or Origin is the second field to the right of the profile image.
   # ActorID => "Place"
     1 => "Al'thon",
     2 => "Embrasia",
     3 => "Arbolia",
     4 => "Kitra",
     5 => "Lago"
  }
  #--------------------------------------------------------------------------
  # ? Customize Height
  #--------------------------------------------------------------------------
  CHARA_H = {
   # Height is the third field to the right of the profile image.
   # ActorID => "Height"
     1 => "5 Feet 6 Inches",
     2 => "6 Feet 4 Inches",
     3 => "6 Feet 1 Inch",
     4 => "5 Feet 5 Inches",
     5 => "5 Feet 8 Inches"
  }
  #--------------------------------------------------------------------------
  # ? Customize Weight
  #--------------------------------------------------------------------------
  CHARA_W = {
   # Weight is the fourth field to the right of the profile image.
   # ActorID => "Weight"
     1 => "87 Pounds",
     2 => "125 Pounds",
     3 => "150 Pounds",
     4 => "96 Pounds",
     5 => "100 pounds"
  }
  #--------------------------------------------------------------------------
  # ? Customize Profile Information
  #--------------------------------------------------------------------------
  CHARA_INFO = {
    # Profile Information is displayed beneath the actor's graphic file.
    # ActorID => "Information Text"
    1 => "Elbinez is a caring young woman who control the powers of Water. She
    lives in a small fishing village along with her friend and The Elder after
    the death of her Parents when she was Six years old.",
    2 => "Berethir is a solum Daemon living along in a deserted church. His
    early life was filed with turmiol after the murder of all his family by
    an unown entity. Berethir controls the power of Fire.",
    3 => "Tobryn is a creative and talented musican who controls the power of
    Forest. He lives a lonely live, choosing to wander the forests and distance
    himself from his royal roots. He is amoung one of the only Centaurs living
    in Corazor.",
    4 => "Silwest is a wild and adventurous Harpy settling in the snowy mountains
    of Kitra along with Grouchuck, a petit Sky Drake. Silwest controls the
    powers of wind and had tremendous magikal abilities.",
    5 => "Rufus is a young and inexperienced warrior living with his friend
    Elbinez in Al'thon. Rufus dosent have control over any element but is
    capable of using healing charms and Enhancement charms."
  }
  #--------------------------------------------------------------------------
  # ? 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.
    1 => "actor1",
    2 => "actor1",
    3 => "actor1",
    4 => "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, "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
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_

Da wo der Smiley ist (Zeile 267) gehört ein B und ) hin aber das forum ändert es zu einem Smiley. B)

Vermute du hast es einfach übersehen.

           Cloud crescent
« Letzte Änderung: März 18, 2010, 13:33:03 von Cloud Crescent »

Re: Hilfe zu Skripten.

Offline Kvote

  • Angehender Tutorinator :D
  • Mr. MACK-Tile
  • ***
  • Beiträge: 219
  • Change the Set, change the World!
    • My Senseless World - Enter it!
Re: Hilfe zu Skripten.
« Antwort #361 am: März 16, 2010, 17:58:11 »
Ne das nich aber es ist jetzt da ^^ ( inet lahmt hier xD)
naja ich danke nochmal fürs posten. Wie gesagt wenns geht, oder nicht geht poste ich hier xD


Kvote

Re: Hilfe zu Skripten.

Offline Cloud Crescent

  • Mortiferus Anima
  • Ralph
  • *
  • Beiträge: 17
  • … and a smile will be my mask forever ...
Re: Hilfe zu Skripten.
« Antwort #362 am: März 16, 2010, 22:12:51 »
@ Kvote20
Hier ist noch das 2te von HBGames, dass mir besser gefällt.
Der Link zur Site funktioniert wieder.
Probiere einfach beide aus.

Spoiler for Hiden:
#===============================================================================
#     *[VX]Character Biography
#  Displays a biography screen for each character by pressing the C decision
#  key while in the Status menu.
#-------------------------------------------------------------------------------
#     Author: Obsidian
#     obsidian_moonwolf@yahoo.com
#     Original Author for XP: Claimh
#     Orignial translation/edits to XP version: TruthfulTiger & Italianstal1ion
#===============================================================================

# Set the key to open the biography screen
CHANGE_KEY = Input::C

# Set the Characters' ages.
CHAR_AGE = ["19", "17", "20", "16"]

# Set the Characters' Homelands
CHAR_HOMELAND = ["Elmwood", "Elmwood", "Valens", "Unknown"]

# Set the Characters' Heights
CHAR_HEIGHT = ["5'10", "5'8", "6'", "5'4"]

# Set the Characters' Weights
CHAR_WEIGHT = ["160", "110", "225", "102"]

# Set the Characters' Races
CHAR_RACE = ["Human", "Human", "Human", "Elf"]

# Set the Characters' Genders
CHAR_GENDER = ["Male", "Female", "Male", "Female"]

# Set the Characters' Weapon Styles
CHAR_WEAPON = ["Swords", "Staves", "Spears", "Wands"]

#===============================================================================
#   Character Descriptions
#===============================================================================

#-------------------------------------------------------------------------------
# Character 1 Description
#-------------------------------------------------------------------------------
D1 = "Insert the first line of descriptive text here."
D2 = "Insert the second line of descriptive text here."
D3 = "Insert the third line of descriptive text here."
D4 = "Insert the fourth line of descriptive text here."
D5 = "Insert the fifth line of descriptive text here."
DESC_SET1 = [D1, D2, D3, D4, D5]

#-------------------------------------------------------------------------------
# Character 2 Description
#-------------------------------------------------------------------------------
D1 = "Insert the first line of descriptive text here."
D2 = "Insert the second line of descriptive text here."
D3 = "Insert the third line of descriptive text here."
D4 = "Insert the fourth line of descriptive text here."
D5 = "Insert the fifth line of descriptive text here."
DESC_SET2 = [D1, D2, D3, D4, D5]

#-------------------------------------------------------------------------------
# Character 3 Description
#-------------------------------------------------------------------------------
D1 = "Insert the first line of descriptive text here."
D2 = "Insert the second line of descriptive text here."
D3 = "Insert the third line of descriptive text here."
D4 = "Insert the fourth line of descriptive text here."
D5 = "Insert the fifth line of descriptive text here."
DESC_SET3 = [D1, D2, D3, D4, D5]

#-------------------------------------------------------------------------------
# Character 4 Description
#-------------------------------------------------------------------------------
D1 = "Insert the first line of descriptive text here."
D2 = "Insert the second line of descriptive text here."
D3 = "Insert the third line of descriptive text here."
D4 = "Insert the fourth line of descriptive text here."
D5 = "Insert the fifth line of descriptive text here."
DESC_SET4 = [D1, D2, D3, D4, D5]

CHAR_DESCRIPTION = [DESC_SET1, DESC_SET2, DESC_SET3, DESC_SET4]

#===============================================================================
#     Start Window_Character
#===============================================================================

#-------------------------------------------------------------------------------
# Initialize
#-------------------------------------------------------------------------------
class Window_Character < Window_Base
  def initialize(actor)
   super(0, 0, 544, 416)
   self.contents = Bitmap.new(width - 32, height - 32)
   @actor = actor
   refresh
# Ends initialize
end

#-------------------------------------------------------------------------------
#  Refresh
#-------------------------------------------------------------------------------
def refresh
   self.contents.clear
   # Draw the characters' faces
   draw_actor_face(@actor, 2, 2, 96)
   # Set the category name colors
   self.contents.font.color.set( 150, 150, 255)
   # Draw the category names
   self.contents.draw_text(150, 10, 80, 32, "Name:")
   self.contents.draw_text(320, 10, 100, 32, "Class:")
   self.contents.draw_text(150, 50, 80, 32, "Race:")
   self.contents.draw_text(150, 90, 80, 32, "Age:")
   self.contents.draw_text(150, 130, 80, 32, "Height:")
   self.contents.draw_text(150, 170, 80, 32, "Homeland:")
   self.contents.draw_text(320, 90, 100, 32, "Weapon:")
   self.contents.draw_text(320, 50, 100, 32, "Gender:")
   self.contents.draw_text(320, 130, 100, 32, "Weight:")
   # Sets the Info listed to normal color
   self.contents.font.color = normal_color
   # Draw the Info for each category
   draw_actor_class(@actor, 420, 10)
   draw_actor_name(@actor, 240, 10)
   draw_actor_race(@actor, 240, 50)
   draw_actor_age(@actor, 240, 90)
   draw_actor_height(@actor, 240, 130)   
   draw_actor_homeland(@actor, 240, 170)
   draw_actor_weapon(@actor, 420, 90)
   draw_actor_gender(@actor, 420, 50)
   draw_actor_weight(@actor, 420, 130)
   draw_actor_description(@actor, 10, 200)
# Ends refresh
end
# Ends Window_Character
end

#===============================================================================
#   Class Window_Base
#===============================================================================
class Window_Base < Window
 
#-------------------------------------------------------------------------------
#  Defines draw_actor_age
#-------------------------------------------------------------------------------
  def draw_actor_age(actor, x, y)
   self.contents.draw_text(x, y, 80, 32, CHAR_AGE[actor.id-1])
end

#-------------------------------------------------------------------------------
#  Defines draw_actor_homeland
#-------------------------------------------------------------------------------
def draw_actor_homeland(actor, x, y)
   self.contents.draw_text(x, y, 180, 32, CHAR_HOMELAND[actor.id-1])
end

#-------------------------------------------------------------------------------
#  Defines draw_actor_height
#-------------------------------------------------------------------------------
def draw_actor_height(actor, x, y)
   self.contents.draw_text(x, y , 200, 32, CHAR_HEIGHT[actor.id-1])
end

#-------------------------------------------------------------------------------
# Defines draw_actor_weight
#-------------------------------------------------------------------------------
def draw_actor_weight(actor, x, y)
   self.contents.draw_text(x, y, 250, 32, CHAR_WEIGHT[actor.id-1])
end

#-------------------------------------------------------------------------------
#  Defines draw_actor_race
#-------------------------------------------------------------------------------
def draw_actor_race(actor, x, y)
   self.contents.draw_text(x, y, 280, 32, CHAR_RACE[actor.id-1])
end

#-------------------------------------------------------------------------------
#  Defines draw_actor_weapon
#-------------------------------------------------------------------------------
def draw_actor_weapon(actor, x, y)
   self.contents.draw_text(x, y, 540, 32, CHAR_WEAPON[actor.id-1])
end

#-------------------------------------------------------------------------------
#  Define draw_actor_gender
#-------------------------------------------------------------------------------
def draw_actor_gender(actor, x, y)
   self.contents.draw_text(x, y, 600, 32, CHAR_GENDER[actor.id-1])
end

#-------------------------------------------------------------------------------
#  Define draw_actor_description
#-------------------------------------------------------------------------------
def draw_actor_description(actor, x, y)
   info = CHAR_DESCRIPTION[actor.id-1]
   self.contents.draw_text(x, y, 600, 32, info[0])
   self.contents.draw_text(x, y+40, 600, 32, info[1])
   self.contents.draw_text(x, y+80, 600, 32, info[2])
   self.contents.draw_text(x, y+120, 600, 32, info[3])
   self.contents.draw_text(x, y+160, 600, 32, info[4])
end
end

#===============================================================================
#  Scene_Character
#===============================================================================
class Scene_Character
 
#-------------------------------------------------------------------------------
#  Initialize
#-------------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
   @actor_index = actor_index
end

#-------------------------------------------------------------------------------
#  Main
#-------------------------------------------------------------------------------
def main
   @actor = $game_party.members[@actor_index]
   @status_window = Window_Character.new(@actor)
   Graphics.transition
   # Begin loop
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   # Dispose window
   @status_window.dispose
end

#-------------------------------------------------------------------------------
#  Update
#-------------------------------------------------------------------------------
def update
   # If cancel button pressed(B)
   if Input.trigger?(Input::B)
     # Play decision SE
     Sound.play_decision
     $scene = Scene_Menu.new(3)
     return
   end
   # If Right button pressed(W)
   if Input.trigger?(Input::R)
     #Play decision SE
     Sound.play_decision
     # Swith to next actor in list
     @actor_index += 1
     @actor_index %= $game_party.members.size
     $scene = Scene_Character.new(@actor_index)
     return
   end
   # If Left button pressed(Q)
   if Input.trigger?(Input::L)
     # Play decision SE
     Sound.play_decision
     # Switch to previous actor in list
     @actor_index += $game_party.members.size - 1
     @actor_index %= $game_party.members.size
     $scene = Scene_Character.new(@actor_index)
     return
   end
end
end # End Scene

#===============================================================================
# Scene_Status
#===============================================================================
class Scene_Status
 
alias update_chara update
def update
   # If activation button pressed(Set at top of script)
   if Input.trigger?(CHANGE_KEY)
     # Play decision SE
     Sound.play_decision
     $scene = Scene_Character.new(@actor_index)
     return
   end
   update_chara
end
end

                            Cloud

Re: Hilfe zu Skripten.

Offline Felsendrache

  • Ralph
  • *
  • Beiträge: 15
Re: Hilfe zu Skripten.
« Antwort #363 am: März 16, 2010, 22:20:11 »
@ PDM
vielen dank dafür
werd mal versuchen ob ich es jetzt hin bekomme :)
Erstes Spiel in Planung!

Re: Hilfe zu Skripten.

Vylf

  • Gast
Re: Hilfe zu Skripten.
« Antwort #364 am: März 18, 2010, 11:31:06 »
hallo ich hab mal ne frage, also folgendes:

ich möchte das bei mir in einem kampf ein bestimmter hintergrund erscheint und das nicht überall der selbe hinter grund sondern in bestimmten ebenen verschiedene nur ich weiß nicht wie das geht. Hat jemand vllt dazu ein Skript?
Ich wäre dem sehr dankbar der mir helfen könnte...

MFG Vylf

Re: Hilfe zu Skripten.

Offline Kvote

  • Angehender Tutorinator :D
  • Mr. MACK-Tile
  • ***
  • Beiträge: 219
  • Change the Set, change the World!
    • My Senseless World - Enter it!
Re: Hilfe zu Skripten.
« Antwort #365 am: März 18, 2010, 12:17:44 »
@ Deity: Ich hoffe du kannst damit was anfangen ;D
Hier die Fehlermeldung


http://yfrog.com/4wprofilescriptfehlerp

und das Skript

#===============================================================
# ?         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).
#==============================================================================
#
# Edit by KVOTE:   Merke -> um das Alter über eine variable ändern zu können
# (eigene Variable aus einem Event z.B.) habe ich folgende Zeile ersetzt:
# Zeile 157 voher:      
#                  
# self.contents.draw_text(300, 60, 80, WLH, Chara_Review::CHARA_AGE[actor.id])  
# und nacher :    
# self.contents.draw_text(300, 60, 80, WLH, $game_variables[deinevariablennummer])  
#==============================================================================
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 => "1,90 Meter",
     6 => "1,60 Meter",
     7 => "1,75 Meter",
     8 => "1,83 Meter"
  }
  #--------------------------------------------------------------------------
  # ? Customize Weight
  #--------------------------------------------------------------------------
  CHARA_W = {
   # Weight is the fourth field to the right of the profile image.
   # ActorID => "Weight"
     5 => "62 Kilo",
     6 => "44 Kilo",
     7 => "53 Kilo",
     8 => "48 Kilo"
  }
  #--------------------------------------------------------------------------
  # ? 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, "Alter:")
    self.contents.draw_text(280, 90, 80, WLH, "Herkunft:")
    self.contents.draw_text(280, 120, 80, WLH, "Größe:")
    self.contents.draw_text(280, 150, 80, WLH, "Gewicht:")
    self.contents.font.color = normal_color
    draw_actor_name(actor, 380,  30)
    self.contents.draw_text(300, 60, 80, WLH, $game_variables[deinevariablennummer])
    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, "Alter:")
    self.contents.draw_text(200, 90, 80, WLH, "Herkunft:")
    self.contents.draw_text(200, 120, 80, WLH, "Größe:")
    self.contents.draw_text(200, 150, 80, WLH, "Gewicht:")
    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
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_


mfg Kvote :)

EDIT: Der Fehler taucht auf sobald ich im Statusmenü eine Taste drücke!

EDIT 2: Okay ich hab jetzt das Skript getestet was Cloud gepostet hat, es funktioniert :D
           Dennoch würde ich mich über Hilfe bei der nun von mir geposteten Version freuen ^^
« Letzte Änderung: März 18, 2010, 12:26:29 von Kvote20 »

Re: Hilfe zu Skripten.

Offline Cloud Crescent

  • Mortiferus Anima
  • Ralph
  • *
  • Beiträge: 17
  • … and a smile will be my mask forever ...
Re: Hilfe zu Skripten.
« Antwort #366 am: März 18, 2010, 13:52:06 »
Hi Kvote20,
bin zwar nicht Ðeity aber ich versuch
trotzdem dir zu helfen. :)

Der Fehler taucht nur auf wenn man einen
Charakter auswählt der kein Profil hat.

Die ID's fangen bei dir erst ab Actor 5 an.
    5 => "20",
     6 => "22",
     7 => "24",
     8 => "16"


Warum genau der Fehler auftritt wenn der Charakter
kein Profil hat, kann ich dir leider auch nicht sagen.

             Cloud
« Letzte Änderung: März 18, 2010, 13:55:45 von Cloud Crescent »

Re: Hilfe zu Skripten.

Offline Kvote

  • Angehender Tutorinator :D
  • Mr. MACK-Tile
  • ***
  • Beiträge: 219
  • Change the Set, change the World!
    • My Senseless World - Enter it!
Re: Hilfe zu Skripten.
« Antwort #367 am: März 18, 2010, 14:57:43 »
@Cloud: Danke für den Hinweis aber ich glaube du beziehst dich damit auf das "Alte" Skript oder ?
denn das was du als letztes gepostet hast funktioniert einwandfrei ^^
Ich muss es nurnoch auf die Kompalibität mit meinem derzeitigen Projekt testen (da ich sehr viele Skripte verwende xD)
Aber ansonsten bin ich zufrieden ^^

Danke nochmals.


Kvote

Re: Hilfe zu Skripten.

Offline Ðeity

  • No Pain, no gain!
  • Administrator
  • Eventmeister
  • ****
  • Beiträge: 427
  • No Pain, no Gain!
    • Deity-VX
Re: Hilfe zu Skripten.
« Antwort #368 am: März 18, 2010, 15:58:46 »
Hay Kvote,
ich denke, dass Cloud Crescent recht hat, die Actor-ID ist entweder zu hoch oder zu tief und kommt in den Settings einfach nur nicht vor. ^^
Die ID kannst du dir in der Database anschauen, sprich die Zahl neben dem Namen des Actors.
Was mich eher wundert ist die Tatsache, dass die Fehlermeldung erst so spät auftaucht, denn eigentlich müsste sie schon beim Aufruf der Methode Alarm geben.
Der Fehler liegt in der Zeile text.split(\/n\), weil "text" ja bei dem Aufruf der Methode eigentlich "nil" ist und für "nil" ist keine Methode mit dem Namen "split" definiert, da "nil" ja eigentlich einfach "nichts" ist. :D

Ändere die Actor-ID's in den Settings, und der Fehler verschwindet. ;)

MfG
Deity
« Letzte Änderung: März 18, 2010, 16:19:55 von Ðeity »



Re: Hilfe zu Skripten.

Offline Felsendrache

  • Ralph
  • *
  • Beiträge: 15
Re: Hilfe zu Skripten.
« Antwort #369 am: März 18, 2010, 21:27:14 »
Ich meld mich auch mal wieder :D

das mit den zusätzlichen Rüstungs-slots hab ich nicht hin bekommen :( aber hab jetzt ein anderes Problem!
Ich hab das Sphärobrett von Kyoshiro eingebaut Link: http://www.rpgvx.net/index.php/topic,2363.0.html

Läuft auch echt super so weit bis auf eine sache die mich noch stört! kann man in einer Bedingung auch Zahlen
Angeben? Weil sonst muss man für jede Aktivierung nur eins zahlen. Also für die die es nciht haben oder kennen.
Kann man in eine Bedingung die ein Item im Inventar abfragt auch hinzufühgen das sie bei einer bestimmten Menge
dieses Items erst los geht?
z.B. du benötigst 3 Eier 1l Milch 1 sack Mehl um einen Kuchen zu backen. Bei der Bedingung 3 Eier wie bekomm ich das hin?

Aber jetzt zurück zu meinem eigentlichen Problem.

Hab das Sphärobrett eins zu eins übernommen hab ansonsten noch im Script die Vocab eingedeutscht.
So jetzt bekomme ich immer bei Testkämpfen und wenn ich im Spiel die Skills aufrufen will diese Fehlermeldung:

Script 'Game_Actor' line102: NameError occurred.

undefined local veriable or method`add_skillacc' for
#<Game_Actor:0x2424c80>

Weiß einer wie ich gegen diesen Fehler vorgehen kann?

schon mal vielen dank

Felsendrache
Erstes Spiel in Planung!

Re: Hilfe zu Skripten.

Offline Ðeity

  • No Pain, no gain!
  • Administrator
  • Eventmeister
  • ****
  • Beiträge: 427
  • No Pain, no Gain!
    • Deity-VX
Re: Hilfe zu Skripten.
« Antwort #370 am: März 19, 2010, 00:34:45 »
Hay.
Für die Mengenabfragen des Inventars musst du einfach nur eine Variable der Itemanzahl zuordnen, und dann ein Conditional Branch mit einer simplen Abfrage ob die Variable größer gleich einer Zahl ist vervollständigen.
Wegen dem Script kann ich dir so ichts sagen, in line 102 steht beim standart Script nichts von add_skillacc. Liegt wahrscheinlich an einem Customscript.

MfG
Deity



Re: Hilfe zu Skripten.

Offline Felsendrache

  • Ralph
  • *
  • Beiträge: 15
Re: Hilfe zu Skripten.
« Antwort #371 am: März 19, 2010, 21:17:57 »
Ok, hab das Script ausgetauscht und noch mal bearbeitet. Jetzt läufts wieder. Weiß aber nicht wo der
Fehler war.

Schon mal danke für die Hilfe wegen der Bedingungshilfe.
Aber ich kleiner blöd man komm damit nicht so ganz klar.

Aber ich versuchs mal.
Also eine Variable einbauen mit dem Itemnamen,
dann in der bedingen die Zahl angeben
und dann reißt es bei mir ab.
Was ist ein Conditional Branch?

Gibts für meine Frage eigentlich ein Tuturiel??
würde glaube einigen an dieser stelle das Haare rumpfen erleichtern ;)

Sorry wegen meinen echt blöden Fragen!
Aber ich kenn mich echt nicht gut in dieser Materie aus. Hab eine tolle idee für ein Game aber
es harpert etwas an der Umsetzung da ich mich mit denn ganzen Eventeinstellungen nicht so auskenne.
bin schon froh das ich so einiges langsam auf die Reihe bekomme. :)

MFG

Felsendrache
Erstes Spiel in Planung!

Re: Hilfe zu Skripten.

Offline Ðeity

  • No Pain, no gain!
  • Administrator
  • Eventmeister
  • ****
  • Beiträge: 427
  • No Pain, no Gain!
    • Deity-VX
Re: Hilfe zu Skripten.
« Antwort #372 am: März 19, 2010, 22:38:08 »
Zitat
Aber ich versuchs mal.
Also eine Variable einbauen mit dem Itemnamen,
dann in der bedingen die Zahl angeben
und dann reißt es bei mir ab.


Ist nicht das was ich meinte. ^^

Zitat
Was ist ein Conditional Branch?

Das ist die "Bedingung" nur eben auf Englisch.

Hier mal ein Pic wie das ganze aussehen könnte. Es ist ganz simpel aufgebaut.


MfG
Deity



Re: Hilfe zu Skripten.

Offline Felsendrache

  • Ralph
  • *
  • Beiträge: 15
Re: Hilfe zu Skripten.
« Antwort #373 am: März 20, 2010, 09:07:04 »
Super Vielen vielen dank :)

Jetzt versteh ich was du meinst.

Nochmals Danke


mfg
Felsendrache
Erstes Spiel in Planung!

Re: Hilfe zu Skripten.

Offline PDM

  • Bibliothekar
  • Global Mod
  • VX-Kenner
  • ****
  • Beiträge: 468
    • Mein Blog
Re: Hilfe zu Skripten.
« Antwort #374 am: März 27, 2010, 14:43:31 »
Ich habe ein kleines Problem. Ich möchte gerne im Menü unten ein Face anzeigen lassen, nämlich das Face von dem Charakter mit dem man läuft. Jetzt zu meinen Fragen: Dieser Charakter soll nicht in der Party sein! (so wie bei Pokemon, die Monster kämpfen, du läufst) Wie mache ich das? Und was muss ich in den SCript schreiben um ein Face anzeigen zu lassen, von jemandem der nicht in der normalen Party ist?
PDM's Gameplays
Skype-Name: lordpdm

 


 Bild des Monats

rooftop party

Views: 3583
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