collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: hellMinors Simple Questlog  (Gelesen 24896 mal)

Soulstormer

  • Gast
hellMinors Simple Questlog
« Antwort #60 am: Mai 04, 2008, 20:26:28 »
Zitat von: hellMinor
achso , also sobald man per event irgendwie add, update oder complete macht soll ein fenster kommen mit entsprechender quest und der aktion oder sowas

das true und false dient nur zur bestimmung der scene aus der man kommt
Jo genau so, allerdings sollte das an und abschaltbar sein, in dem call.
Eigentlich reicht ein Call Script welches die jeweiligen Fenster aufruft schon.
$scene = Scene_Questlog.new(false) = normales fenster
$scene = Scene_Questlog.new(false).active = Aktive Quests Fenster
$scene = Scene_Questlog.new(false).complete = Abgeschlossene Quests Fenster

hellMinors Simple Questlog

FaG

  • Gast
hellMinors Simple Questlog
« Antwort #61 am: Mai 07, 2008, 19:53:55 »

Also, entweder bin ich zu blöd oder kA ^^

folgendes Problem:

Habe den Code eingefügt
Habe im Szene-menü alles so erändert wie auf der ersten Seite beschrieben


Jetzt habe ich folgendes Problem:

Der Beenden Button ist völlig verschwunden
Der STatus Knopf funktioniert nicht mehr. Man klickt auf Status dann kann man den chara auswählen und dann passiert nichts mehr.
« Letzte Änderung: Mai 07, 2008, 19:54:13 von FaG »

hellMinors Simple Questlog

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
hellMinors Simple Questlog
« Antwort #62 am: Mai 08, 2008, 15:02:21 »
kann nich sagen was du da falsch editiert hast da ichs net sehe^^

auf der ersten seite is noch ein zweites script was eine einbindung des questlogs ins menü zeigt
die änderungen die ich vorgenommen hatte , hatte ich mit |||||| markiert
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


hellMinors Simple Questlog

naibaf91

  • Gast
hellMinors Simple Questlog
« Antwort #63 am: Mai 08, 2008, 15:08:52 »
Hallo Leute habe ein bisschen Rumgegetüftel und dann habe ich bemerkt das im Skript ein bisschen was durcheinander war... Habe das gerade hingebogen.
Also der Skript muss so aussehen, sonst geht das nicht richtig.

Das ist einmal das Scene Menu was man ersetzen muss:
Spoiler for Hiden:
#==============================================================================
# ¦ Scene_Menu
#------------------------------------------------------------------------------
#  ??????????????????
#==============================================================================

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # ? ?????????
  #     menu_index : ?????????????
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # ? ????????????
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = QUESTLOGNAME
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # ??????? 0 ????
      @command_window.draw_item(0, false)     # ????????
      @command_window.draw_item(1, false)     # ???????
      @command_window.draw_item(2, false)     # ??????
      @command_window.draw_item(3, false)     # ?????????
      @command_window.draw_item(4, false)     # Disable status
    end
    if $game_system.save_disabled             # ????????
      @command_window.draw_item(5, false)     # Disable save
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # ????
        $scene = Scene_Item.new
      when 1,2  # Skill, equipment, QUESTLOGNAME
        start_actor_selection
      when 4      # ???
        $scene = Scene_File.new(true, false, false)
      when 5      # ?????
        $scene = Scene_End.new
      when 3                                                      
        $scene = Scene_Questlog.new                              
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # ???
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # ??
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # ?????
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end



Und hier der Questlog Skript den man ersetzen muss:
Spoiler for Hiden:
#==============================================================================
#  Simple Quest-Log
#
#  Version : 1.2 - 02.04.08
#  Created by : hellMinor
#  Do NOT redistribute without my permission
#  Description : A simple script for a Quest-Log
#
#==============================================================================
#==============================================================================
# F.A.Q.
#==============================================================================
# The Global Questlog-Name is $questlog
# To open the Questlog from the menu just do $scene = Scene_Questlog.new
# To open the Questlog from an event $scene = Scene_Questlog.new(false)
#
# To add a quest make a new call script with this Template :
# $questlog.addQuest("Unique ID","Quest Title","Quest Description","State")
#
# To update a Quest description make a new call script with this Template :
# $questlog.updateQuest("unique ID","Quest Description","State")
#
# To move a Quest to Completed Quests make new call script with this Template :
# $questlog.completeQuest("Unique ID")
#
# To delete a Quest from the Active-Questlog make a call script with this
# Template :
# $questlog.deleteQuest("Unique ID")
#
# You can get the current state of a Quest with this Template :
# $questlog.getQuestState("Unique ID")
# This may be useful in a conditional branch if you want to react with a
# special Quest-State
#
# If u want to add a Questmap, create a folder named Questmaps in your
# Graphics folder. The name of the Questmap must be the same as the Quest
# in the Game. Be sure that you set the correct MAP_FORMAT.
# A Quest-Map should have a size of 265*200 px !
# I.E. : If your Quest is named QuestYXZ , the picture in the Questmap folder
# has to be QuestYXZ.png if your map is a .png
#==============================================================================
# Setup
#==============================================================================
QUESTLOGNAME = "Questlog"               # Questlog Menu name
QUEST_MENU_ITEM_1 = "Aktive Quests"     # Active Quest name
QUEST_MENU_ITEM_2 = "Fertige Quests"  # Completed Quest name
SIZE_VAR = 20                           # Character Size
MAP_FORMAT = "png"                      # Quest-Map Ending
#==============================================================================
class Questlog
#==============================================================================
  def addQuest(id,header,description,state = "")
    $activelog << [id,header,description,state]
  end
#------------------------------------------------------------------------------  
  def updateQuest(id,description,state = "")
    for i in 0..$activelog.size-1
      if $activelog[i][0] == id
        $activelog[i][2] = description
        $activelog[i][3] = state
        break
      end
    end
  end
#------------------------------------------------------------------------------
  def completeQuest(id)
    for i in 0..$activelog.size-1
      if $activelog[i][0] == id
        $completedlog << $activelog[i]
        $activelog.delete_at(i)
        break
      end
    end
  end
#------------------------------------------------------------------------------
  def deleteQuest(id)
    for i in 0..$activelog.size-1
      if $activelog[i][0] == id
        $activelog.delete_at(i)
        break
      end
    end
  end
#------------------------------------------------------------------------------
  def getQuestState(id)
    for i in 0..$activelog.size-1
      if $activelog[i][0] == id
        return $activelog[i][3]
        break
      end
    end
  end
  
end
#==============================================================================
class Scene_Questlog < Scene_Base
#==============================================================================
  def initialize(from_menu = true)
    @from_menu = from_menu
  end
  
  def start
    super
    create_menu_background
    @help_window = Window_Help.new
    @help_window.set_text(QUESTLOGNAME,1)
    
    s1 = QUEST_MENU_ITEM_1
    s2 = QUEST_MENU_ITEM_2
    
    @select_window = Window_Command.new(544,[s1,s2],2,1)
    @select_window.y = 55
    @select_window.active = true
    
  end
#------------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @help_window.dispose
    @select_window.dispose
  end
#------------------------------------------------------------------------------  
  def kill_questwindows
    @quest_window.dispose
  end  
#------------------------------------------------------------------------------
  def return_scene
    if @from_menu
      $scene = Scene_Menu.new
    else
      $scene = Scene_Map.new
    end
  end
#------------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @help_window.update
    if @select_window.active
      @select_window.update
      update_select_selection
    elsif @quest_window.active
      @quest_window.update
      update_quest_selection
    end
  end
#------------------------------------------------------------------------------
  def update_select_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::C)
      case @select_window.index
      when 0
        $oldlog = false
        @quest_window = Window_Quest.new(0,110,272,(24*11)+42)
        @select_window.active = false
        @quest_window.active = true
      when 1
        $oldlog = true
        @quest_window = Window_Quest.new(0,110,272,(24*11)+42)
        @select_window.active = false
        @quest_window.active = true
      end      
    end
  end
#------------------------------------------------------------------------------  
  def update_quest_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      kill_questwindows
      @select_window.active = true
    end
  end

end
#==============================================================================
class Scene_Title < Scene_Base
#==============================================================================
  alias create_game_objects_additions create_game_objects
  def create_game_objects
    create_game_objects_additions
    $questlog = Questlog.new
    $activelog = Array.new
    $completedlog = Array.new
  end
  
end
#==============================================================================
class Window_Help < Window_Base
#==============================================================================
  def initialize(x = 0,y = 0, width = 544, height = WLH+32)
    super(x, y, width, height)
  end
  
end
#==============================================================================
class Window_Description < Window_Base
#==============================================================================
  def initialize(x = 0,y = 0, width = 544, height = WLH+32)
    super(x, y, width, height)
    @text = nil
    @contents_x = 0
    @contents_y = 0
    @line_count = 0             # Line count drawn up until now
    update
  end
#------------------------------------------------------------------------------  
  def new_line
    @contents_x = 0
    @contents_y += WLH
    @line_count += 1
    @line_show_fast = false
  end
#------------------------------------------------------------------------------  
  def finish_message
    @text = nil
    @line_count = 0
    @contents_x = 0
    @contents_y = 0
  end
#------------------------------------------------------------------------------  
  def write_text(str)
    if str != nil || str != ""
      create_contents
      update_msg(str)
    end
  end
#------------------------------------------------------------------------------  
  def update_msg(str)
    str.each_line{|str2|iterator(str2)}
    finish_message
  end
#------------------------------------------------------------------------------  
  def iterator(str2)
    contents.font.size = SIZE_VAR
    contents.draw_text(@contents_x, @contents_y, str2.size*40, WLH, str2.delete("\n"))
    c_width = contents.text_size(str2).width
    @contents_x += c_width
    new_line
  end
  
end
#==============================================================================
class Window_Quest < Window_Selectable
#==============================================================================
  def initialize(x, y, width, height)
    super(x, y, width, height)
    @column_max = 1
    self.index = 0
    
    @quest_helper = Window_Description.new(271,110,273,(24*11)+42)
    
    refresh
  end
#------------------------------------------------------------------------------
  def refresh
    @data = []
    if !$oldlog
      for i in (0..$activelog.size-1)
        @data.push($activelog[i])
      end
    else
      for i in (0..$completedlog.size-1)
        @data.push($completedlog[i])
      end
    end
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end
#------------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    item = @data[index][1]
    if item != nil
      rect.width -= 4
      self.contents.draw_text(rect.x, rect.y, 172, WLH, item)
    end
  end
#------------------------------------------------------------------------------
  alias update_addition update
  def update
    update_addition
    update_description(@index)
    update_selection
  end
#------------------------------------------------------------------------------
  def update_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @quest_helper.dispose
      if @quest_map != nil
        @quest_map_bitmap.bitmap.dispose
        @quest_map_bitmap.dispose
        @quest_map.dispose
        @quest_map_viewport.dispose
        @quest_map = nil
      end
    end
  end
#------------------------------------------------------------------------------    
  def update_description(id)
    if defined?(@data[id][2])
      @quest_helper.write_text(@data[id][2])
      if @quest_map == nil
        if File.exist?("Graphics/Questmaps/"+@data[id][1]+"."+MAP_FORMAT)
          self.height /= 3
          @quest_map = Window_Description.new(0,210,272,(24*7)+38)
          @quest_map_bitmap = Sprite.new
          @quest_map_viewport = Viewport.new(3,213,268,(24*7)+35)
          @quest_map_bitmap.viewport = @quest_map_viewport
          @quest_map_bitmap.bitmap = Cache.questmaps(@data[id][1])
          @quest_map_bitmap.viewport.z = 150
        end
      else
        if File.exist?("Graphics/Questmaps/"+@data[id][1]+"."+MAP_FORMAT)
          @quest_map_bitmap.bitmap = Cache.questmaps(@data[id][1])
        else
          self.height *= 3
          @quest_map_bitmap.bitmap.dispose
          @quest_map_bitmap.dispose
          @quest_map.dispose
          @quest_map_viewport.dispose
          @quest_map = nil
        end
      end
    end
  end
  
end
#==============================================================================
class Scene_File < Scene_Base
#==============================================================================
  alias write_save_data_adds write_save_data
  def write_save_data(file)
    write_save_data_adds(file)    
    Marshal.dump($activelog,           file)
    Marshal.dump($completedlog,        file)
    Marshal.dump($questlog,            file)
  end
  
  alias read_save_data_adds read_save_data
  def read_save_data(file)
    read_save_data_adds(file)
    $activelog           = Marshal.load(file)
    $completedlog        = Marshal.load(file)
    $questlog            = Marshal.load(file)
  end
end
#==============================================================================
module Cache
#==============================================================================  
  def self.questmaps(filename)
    load_bitmap("Graphics/Questmaps/", filename)
  end
  
end
« Letzte Änderung: Mai 08, 2008, 15:24:02 von naibaf91 »

hellMinors Simple Questlog

FaG

  • Gast
hellMinors Simple Questlog
« Antwort #64 am: Mai 08, 2008, 15:14:22 »
Zitat von: naibaf91
Hallo Leute habe ein bisschen Rumgegetüftel und dann habe ich bemerkt das im Skript ein bisschen was durcheinander war... Habe das gerade hingebogen.
Also der Skript muss so aussehen, sonst geht das nicht richtig.

Das ist einmal das Scene Menu was man ändern musste:
#==============================================================================
# ¦ Scene_Menu
#------------------------------------------------------------------------------
#  ??????????????????
#==============================================================================

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # ? ?????????
  #     menu_index : ?????????????
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  #--------------------------------------------------------------------------
  # ? ????????????
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = QUESTLOGNAME
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # ??????? 0 ????
      @command_window.draw_item(0, false)     # ????????
      @command_window.draw_item(1, false)     # ???????
      @command_window.draw_item(2, false)     # ??????
      @command_window.draw_item(3, false)     # ?????????
      @command_window.draw_item(4, false)     # Disable status
    end
    if $game_system.save_disabled             # ????????
      @command_window.draw_item(5, false)     # Disable save
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::cool.gif\" style=\"vertical-align:middle\" emoid=\"B)\" border=\"0\" alt=\"cool.gif\" /]
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # ????
        $scene = Scene_Item.new
      when 1,2  # Skill, equipment, QUESTLOGNAME
        start_actor_selection
      when 4      # ???
        $scene = Scene_File.new(true, false, false)
      when 5      # ?????
        $scene = Scene_End.new
      when 3                                                      
        $scene = Scene_Questlog.new                              
      end
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::cool.gif\" style=\"vertical-align:middle\" emoid=\"B)\" border=\"0\" alt=\"cool.gif\" /]
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  # ???
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # ??
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # ?????
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end

So und hier der andere Skript:
#==============================================================================
#  Simple Quest-Log
#
#  Version : 1.2 - 02.04.08
#  Created by : hellMinor
#  Do NOT redistribute without my permission
#  Description : A simple script for a Quest-Log
#
#==============================================================================
#==============================================================================
# F.A.Q.
#==============================================================================
# The Global Questlog-Name is $questlog
# To open the Questlog from the menu just do $scene = Scene_Questlog.new
# To open the Questlog from an event $scene = Scene_Questlog.new(false)
#
# To add a quest make a new call script with this Template :
# $questlog.addQuest("Unique ID","Quest Title","Quest Description","State")
#
# To update a Quest description make a new call script with this Template :
# $questlog.updateQuest("unique ID","Quest Description","State")
#
# To move a Quest to Completed Quests make new call script with this Template :
# $questlog.completeQuest("Unique ID")
#
# To delete a Quest from the Active-Questlog make a call script with this
# Template :
# $questlog.deleteQuest("Unique ID")
#
# You can get the current state of a Quest with this Template :
# $questlog.getQuestState("Unique ID")
# This may be useful in a conditional branch if you want to react with a
# special Quest-State
#
# If u want to add a Questmap, create a folder named Questmaps in your
# Graphics folder. The name of the Questmap must be the same as the Quest
# in the Game. Be sure that you set the correct MAP_FORMAT.
# A Quest-Map should have a size of 265*200 px !
# I.E. : If your Quest is named QuestYXZ , the picture in the Questmap folder
# has to be QuestYXZ.png if your map is a .png
#==============================================================================
# Setup
#==============================================================================
QUESTLOGNAME = "Questlog"               # Questlog Menu name
QUEST_MENU_ITEM_1 = "Aktive Quests"     # Active Quest name
QUEST_MENU_ITEM_2 = "Fertige Quests"  # Completed Quest name
SIZE_VAR = 20                           # Character Size
MAP_FORMAT = "png"                      # Quest-Map Ending
#==============================================================================
class Questlog
#==============================================================================
  def addQuest(id,header,description,state = "")
    $activelog << [id,header,description,state]
  end
#------------------------------------------------------------------------------  
  def updateQuest(id,description,state = "")
    for i in 0..$activelog.size-1
      if $activelog[0] == id
        $activelog[2] = description
        $activelog[3] = state
        break
      end
    end
  end
#------------------------------------------------------------------------------
  def completeQuest(id)
    for i in 0..$activelog.size-1
      if $activelog[0] == id
        $completedlog << $activelog
        $activelog.delete_at(i)
        break
      end
    end
  end
#------------------------------------------------------------------------------
  def deleteQuest(id)
    for i in 0..$activelog.size-1
      if $activelog[0] == id
        $activelog.delete_at(i)
        break
      end
    end
  end
#------------------------------------------------------------------------------
  def getQuestState(id)
    for i in 0..$activelog.size-1
      if $activelog[0] == id
        return $activelog[3]
        break
      end
    end
  end
 
end
#==============================================================================
class Scene_Questlog < Scene_Base
#==============================================================================
  def initialize(from_menu = true)
    @from_menu = from_menu
  end
 
  def start
    super
    create_menu_background
    @help_window = Window_Help.new
    @help_window.set_text(QUESTLOGNAME,1)
   
    s1 = QUEST_MENU_ITEM_1
    s2 = QUEST_MENU_ITEM_2
   
    @select_window = Window_Command.new(544,[s1,s2],2,1)
    @select_window.y = 55
    @select_window.active = true
   
  end
#------------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @help_window.dispose
    @select_window.dispose
  end
#------------------------------------------------------------------------------  
  def kill_questwindows
    @quest_window.dispose
  end  
#------------------------------------------------------------------------------
  def return_scene
    if @from_menu
      $scene = Scene_Menu.new
    else
      $scene = Scene_Map.new
    end
  end
#------------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @help_window.update
    if @select_window.active
      @select_window.update
      update_select_selection
    elsif @quest_window.active
      @quest_window.update
      update_quest_selection
    end
  end
#------------------------------------------------------------------------------
  def update_select_selection
    if Input.trigger?(Input::cool.gif\" style=\"vertical-align:middle\" emoid=\"B)\" border=\"0\" alt=\"cool.gif\" /]
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::C)
      case @select_window.index
      when 0
        $oldlog = false
        @quest_window = Window_Quest.new(0,110,272,(24*11)+42)
        @select_window.active = false
        @quest_window.active = true
      when 1
        $oldlog = true
        @quest_window = Window_Quest.new(0,110,272,(24*11)+42)
        @select_window.active = false
        @quest_window.active = true
      end      
    end
  end
#------------------------------------------------------------------------------  
  def update_quest_selection
    if Input.trigger?(Input::cool.gif\" style=\"vertical-align:middle\" emoid=\"B)\" border=\"0\" alt=\"cool.gif\" /]
      Sound.play_cancel
      kill_questwindows
      @select_window.active = true
    end
  end

end
#==============================================================================
class Scene_Title < Scene_Base
#==============================================================================
  alias create_game_objects_additions create_game_objects
  def create_game_objects
    create_game_objects_additions
    $questlog = Questlog.new
    $activelog = Array.new
    $completedlog = Array.new
  end
 
end
#==============================================================================
class Window_Help < Window_Base
#==============================================================================
  def initialize(x = 0,y = 0, width = 544, height = WLH+32)
    super(x, y, width, height)
  end
 
end
#==============================================================================
class Window_Description < Window_Base
#==============================================================================
  def initialize(x = 0,y = 0, width = 544, height = WLH+32)
    super(x, y, width, height)
    @text = nil
    @contents_x = 0
    @contents_y = 0
    @line_count = 0             # Line count drawn up until now
    update
  end
#------------------------------------------------------------------------------  
  def new_line
    @contents_x = 0
    @contents_y += WLH
    @line_count += 1
    @line_show_fast = false
  end
#------------------------------------------------------------------------------  
  def finish_message
    @text = nil
    @line_count = 0
    @contents_x = 0
    @contents_y = 0
  end
#------------------------------------------------------------------------------  
  def write_text(str)
    if str != nil || str != ""
      create_contents
      update_msg(str)
    end
  end
#------------------------------------------------------------------------------  
  def update_msg(str)
    str.each_line{|str2|iterator(str2)}
    finish_message
  end
#------------------------------------------------------------------------------  
  def iterator(str2)
    contents.font.size = SIZE_VAR
    contents.draw_text(@contents_x, @contents_y, str2.size*40, WLH, str2.delete("\n"))
    c_width = contents.text_size(str2).width
    @contents_x += c_width
    new_line
  end
 
end
#==============================================================================
class Window_Quest < Window_Selectable
#==============================================================================
  def initialize(x, y, width, height)
    super(x, y, width, height)
    @column_max = 1
    self.index = 0
   
    @quest_helper = Window_Description.new(271,110,273,(24*11)+42)
   
    refresh
  end
#------------------------------------------------------------------------------
  def refresh
    @data = []
    if !$oldlog
      for i in (0..$activelog.size-1)
        @data.push($activelog)
      end
    else
      for i in (0..$completedlog.size-1)
        @data.push($completedlog)
      end
    end
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end
#------------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    item = @data[index][1]
    if item != nil
      rect.width -= 4
      self.contents.draw_text(rect.x, rect.y, 172, WLH, item)
    end
  end
#------------------------------------------------------------------------------
  alias update_addition update
  def update
    update_addition
    update_description(@index)
    update_selection
  end
#------------------------------------------------------------------------------
  def update_selection
    if Input.trigger?(Input::cool.gif\" style=\"vertical-align:middle\" emoid=\"B)\" border=\"0\" alt=\"cool.gif\" /]
      Sound.play_cancel
      @quest_helper.dispose
      if @quest_map != nil
        @quest_map_bitmap.bitmap.dispose
        @quest_map_bitmap.dispose
        @quest_map.dispose
        @quest_map_viewport.dispose
        @quest_map = nil
      end
    end
  end
#------------------------------------------------------------------------------    
  def update_description(id)
    if defined?(@data[id][2])
      @quest_helper.write_text(@data[id][2])
      if @quest_map == nil
        if File.exist?("Graphics/Questmaps/"+@data[id][1]+"."+MAP_FORMAT)
          self.height /= 3
          @quest_map = Window_Description.new(0,210,272,(24*7)+38)
          @quest_map_bitmap = Sprite.new
          @quest_map_viewport = Viewport.new(3,213,268,(24*7)+35)
          @quest_map_bitmap.viewport = @quest_map_viewport
          @quest_map_bitmap.bitmap = Cache.questmaps(@data[id][1])
          @quest_map_bitmap.viewport.z = 150
        end
      else
        if File.exist?("Graphics/Questmaps/"+@data[id][1]+"."+MAP_FORMAT)
          @quest_map_bitmap.bitmap = Cache.questmaps(@data[id][1])
        else
          self.height *= 3
          @quest_map_bitmap.bitmap.dispose
          @quest_map_bitmap.dispose
          @quest_map.dispose
          @quest_map_viewport.dispose
          @quest_map = nil
        end
      end
    end
  end
 
end
#==============================================================================
class Scene_File < Scene_Base
#==============================================================================
  alias write_save_data_adds write_save_data
  def write_save_data(file)
    write_save_data_adds(file)    
    Marshal.dump($activelog,           file)
    Marshal.dump($completedlog,        file)
    Marshal.dump($questlog,            file)
  end
 
  alias read_save_data_adds read_save_data
  def read_save_data(file)
    read_save_data_adds(file)
    $activelog           = Marshal.load(file)
    $completedlog        = Marshal.load(file)
    $questlog            = Marshal.load(file)
  end
end
#==============================================================================
module Cache
#==============================================================================  
  def self.questmaps(filename)
    load_bitmap("Graphics/Questmaps/", filename)
  end
 
end

So beide datein einfach einfügen!


Wäre schön wenn du die stellen mal markieren könntest bzw. kurz erläutern.

UNd die SKripte sind ja gar ned ordentlich strukuriert Oo alles linksbündig
« Letzte Änderung: Mai 08, 2008, 15:15:03 von FaG »

hellMinors Simple Questlog

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
hellMinors Simple Questlog
« Antwort #65 am: Mai 08, 2008, 15:47:13 »
was für änderungen ? das questlog script is das selbe und das scnene menu beinhaltet viel zu viel dinge die nich geändert wurden, dh kann man die rausstreichen , bei der scene_menu hab ich nur die änderungen in 30sek vorgenommen die man brauchte damits ins menü passt
« Letzte Änderung: Mai 08, 2008, 15:47:48 von hellMinor »
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


hellMinors Simple Questlog

naibaf91

  • Gast
hellMinors Simple Questlog
« Antwort #66 am: Mai 10, 2008, 11:13:28 »
Ja nur weil bei ein paar Leuten und auch bei mir ein Fehler auftrat, dass beenden weg war und speichern irgend was anderes war. Ich habe das jetzt ein bisschen umgebaut und so geht das bei mir und auch bei anderen Leuten.
Ansonsten ist der Skript Richtig geil den du da gebaut hast.

hellMinors Simple Questlog

Offline Agito Ace

  • Database-Verunstalter
  • **
  • Beiträge: 129
  • © AGITO RPG Game Developement 2005-2012
hellMinors Simple Questlog
« Antwort #67 am: Mai 11, 2008, 10:28:18 »
Danke für deinen Skript^^. Es passt perfekt in mein Game rein und bietet abwechslung happy.gif\" style=\"vertical-align:middle\" emoid=\"^_^\" border=\"0\" alt=\"happy.gif\" /] .
Ich werde jetzt mal die Quests (bei mir: Aufträge) einfügen^^.

Bis dann!

hellMinors Simple Questlog

Lyeaux

  • Gast
hellMinors Simple Questlog
« Antwort #68 am: Mai 11, 2008, 23:30:28 »
Schönes und einfaches Questlog. Gefällt mir und ich habe es auch schon in mein Projekt eingebaut. :)

hellMinors Simple Questlog

Offline SatansRightHand

  • Metzelschnetzelnder Schentzelmetzler
  • Database-Verunstalter
  • **
  • Beiträge: 182
  • jaja...
hellMinors Simple Questlog
« Antwort #69 am: Juni 13, 2008, 15:14:23 »
ich habe es auch in mein game aufgenommen, bis mir etwas aufgefallen ist.
Die Quest bei mir ist:
Töte alle menschen
du hast 0 von 14 Menschen getötet

das problem ist, dass man die menschen in beliebeiger reihenfolge töten, und somit das updatequest unbrauchbar ist...
könntest du das vielleicht so ändern, dass man da auch variablen einfügen kann?
achja und ausserdem ist bei mir der quest name etwas länger, und deshalb ist bei einem der wörter ein viereck vor, dass da nich weggeht...

hellMinors Simple Questlog

Kenshin

  • Gast
hellMinors Simple Questlog
« Antwort #70 am: Juni 13, 2008, 15:56:33 »
bei mir gehts net  sad.gif\" style=\"vertical-align:middle\" emoid=\":(\" border=\"0\" alt=\"sad.gif\" /]

hellMinors Simple Questlog

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
hellMinors Simple Questlog
« Antwort #71 am: Juni 13, 2008, 15:57:06 »
also variablen kann man eignetlich da rein schreiben o_O habs grad nochma getestet und da gings

zudem kasten, der sollte eigentlich nichts mit nem langem namen zu tun haben aber woher der jetz genau kommt kann ich grad nich sagen, hast du den japanischen maker?
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


hellMinors Simple Questlog

War-Raptor

  • Gast
hellMinors Simple Questlog
« Antwort #72 am: Juni 13, 2008, 16:01:35 »
Zitat von: hellMinor
also variablen kann man eignetlich da rein schreiben o_O habs grad nochma getestet und da gings

zudem kasten, der sollte eigentlich nichts mit nem langem namen zu tun haben aber woher der jetz genau kommt kann ich grad nich sagen, hast du den japanischen maker?

Ich habe den Englischen Maker. Wenn ich ein event mache und dann ein scriptschnippsel aufrufe, dann kommen automatisch zeilenumbrüche in das script bei der darstellung. wenn die zeilenumbrüche im titel oder der beschreibung einer quest stehen, dann werden diese später als quadrat dargestellt.

beim namen einer quest ist es egal, dann denkt man sich halt einen kürzeren aus ^^ Nur bei der Beschreibung könnte das etwas störend sein.

Ich probier noch ein bisschen rum und versuche ein screen zu posten wenn ich dran denke XD


hellMinors Simple Questlog

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
hellMinors Simple Questlog
« Antwort #73 am: Juni 13, 2008, 16:51:36 »
@kenshin : was geht bei dir nich?

@raptor : also diese zeilenümbruche wegen dem kleinen script fenster kann man umgehen
$questlog.addQuest("2","Quest 2",
"Beispiel Questbeschreibung
von Quest 2 - Variable 1= "+
$game_variables[1].to_s+"
ich bin auch eine Quest")
das müsste 3 zeilen ergeben und halt den inhalt der variable 1

du kanns strings mit + verketten
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


hellMinors Simple Questlog

Offline SatansRightHand

  • Metzelschnetzelnder Schentzelmetzler
  • Database-Verunstalter
  • **
  • Beiträge: 182
  • jaja...
hellMinors Simple Questlog
« Antwort #74 am: Juni 13, 2008, 16:59:05 »
wo muss ich diesen texblock den du gerade gepostet hast einfügen?

 


 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