Войти на сайт

Авторизация, ждите ...
×

ТЕМА: Friends Journal Rpg Maker ace

Friends Journal Rpg Maker ace 9 года 3 мес. назад #77521

  • I_LORD
  • I_LORD аватар
  • Вне сайта
  • Светлый дракон
  • ;)
  • Сообщений: 775
  • Спасибо получено: 728
  • Проект года 2 местоПроект месяца 3 местоПроект месяца 1 местоПроект месяца 2 местоВетеранПаладинРазработчикОратор
Есть на Rpg maker vx вот такой скриптик,который добавляет в меню раздел "Друзья" или "Персонажи". Вообщем, все важные персонажи добавляются туда и всегда можно открыть и посмотреть, где кого искать. Очень хорошо,когда много персонажей(НПС), как у меня. :)
Вызывался скрипт так:
new_friend(

22,
"Севернее арены. Трилбург",
100,
9,
["Организатор боёв на арене"]


)

А теперь в чём я ищу помощь! Может ли кто-нибудь из действующих скриптёров перенести всё это на Rpg maker ace?
Или аналогичный скрипт мож кто подскажет?
# ---------------------------------------------------------------------------- #
#                    Friends Journal - Menu Compatibility                      #
#                         Not recommended to use                               #
#                                                                              #
# This 'script' adds the Friends Journal option to the menu. Altough the       #
# compatibility with the menu (this 'script') is not recommended to use,       #
# because it overwrites to original menu calls, so when you have other         #
# feature's in your menu else tham the friends journal, this won't be          #
# recommended to use.                                                          #
# ---------------------------------------------------------------------------- #

module Vocab
 
    # ------------------------------------------------------------------------ #
    #                           Start Configuration                            #
    # ------------------------------------------------------------------------ #
  
      FRIENDS_JOURNAL = "Персонажи" # The Friends Journal option in the menu.
    
    # ------------------------------------------------------------------------ #
    #                             End Configuration                            #
    # ------------------------------------------------------------------------ #
  
end
 
class Scene_Menu < Scene_Base
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    s7 = Vocab::FRIENDS_JOURNAL
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s7,s5, s6])
    @command_window.index = @menu_index
    if $game_party.members.size == 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)  
    end
    if $game_system.save_disabled    
      @command_window.draw_item(4, false)
    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,3 
        start_actor_selection
      when 4
        $scene = Scene_FriendsJournal.new(Scene_Menu)
      when 5 
        $scene = Scene_File.new(true, false, false)
      when 6 
        $scene = Scene_End.new
      end
    end
  end
end
Последнее редактирование: 9 года 3 мес. назад от I_LORD.
Администратор запретил публиковать записи гостям.

Friends Journal Rpg Maker ace 9 года 3 мес. назад #77524

  • DeadElf79
  • DeadElf79 аватар
  • Вне сайта
  • Звездный Страж
  • Сообщений: 3147
  • Спасибо получено: 2650
  • Проект месяца 2 местоПрограммист RubyПисатель 3 местоОрганизатор конкурсовВетеранУчитель3 место1 место в ГотвПроект месяца 1 место
Это не тот скрипт. Этот скрипт отвечает только за совместимость скрипта друзей с менюшками, не более того. Проще говоря, это всего лишь аддон. Поставь вначале скрипт на эйс, потом аддон этот приложи и все будет работать ^_^
Администратор запретил публиковать записи гостям.
За этот пост поблагодарили: I_LORD, Dprizrak1

Friends Journal Rpg Maker ace 9 года 3 мес. назад #77525

  • I_LORD
  • I_LORD аватар
  • Вне сайта
  • Светлый дракон
  • ;)
  • Сообщений: 775
  • Спасибо получено: 728
  • Проект года 2 местоПроект месяца 3 местоПроект месяца 1 местоПроект месяца 2 местоВетеранПаладинРазработчикОратор
Точно! Вот скрипт, но опять же на vx...
# ---------------------------------------------------------------------------- #
#                            Friends Journal                                   #
#                             by HungrySnake                                   #
#                                                                              #
# Requested by: Eris                                                           #
#                                                                              #
# Version History: DD/MM/YYYY - Version - Update                               #
#                  23/07/2012 - 1.0     - Started and Finished                 #
#                                                                              #
# Introduction:                                                                #
#                                                                              #
# This is a Friends Journal script. The player can record                      #
# friends in this journal. The user had to add friends from an                 #
# event script call. The user can also increase the frienliness                #
# level of certain actors. By doing this, the user can set                     #
# triggers like: If Ulrika's friendliness is equal to 50, the                  #
# player unlocks other talking options or when Ulrika's                        #
# friendliness is at it's max, Ulrika can join the player's                    #
# party. The instructions are given below.                                     #
#                                                                              #
# Instructions:                                                                #
#                                                                              #
# Adding a new friend (from the script):                                       #
# To add a new friend, the correct construction is like this:                  #
# key => [age, city, max_friendmeter_val, ID, description]                     #
#                                                                              #
# key = The index, this'll just be the continuing value before the last friend #
#       So let's say the friend before this one had a key of 2, this key would #
#       be 3.                                                                  #
# age = Obviously, the friend's age.                                           #
# city = The friend's city. Where the friend comes from.                       #
# max_friendmeter_val = The maximum value of the friendliness meter.           #
# ID = The friend's actor ID. So let's say the friend is Ulrika, then the ID   #
#      would be 2.                                                             #
# description = A (short) description of the friend. These must be between     #
#               square brackets ( ["description"] ). To make a new line, you'd #
#               split the lines with a comma. So it would turn out like this:  #
#               ["Line 1 description","Line 2 description"]                    #
# Example: 3 => [30, "My Town", 100, 5, ["Damn this guy is old"]]              #
#          The key of this one is 3, since the last key configured below was 2 #
#          Here, we're adding a friend with an age of 30, living in My Town,   #
#          with a max_friendliness_value of 100, has an actor ID of 5          #
#          (Lawrence) and with a description of "Damn this guy is old."        #
#                                                                              #
# Adding a new friend (from an event):                                         #
# > Go to the place whenever you want to add a new friend (in an event)        #
# > New Action                                                                 #
# > Third Tab                                                                  #
# > Advanced - Script                                                          #
# > Write: new_friend(age,city,max_friendmeter_val,id,description)             #
#   ---- Don't write from here on ----                                         #
#   age = Obviously, the friend's age.                                         #
#   city = The friend's city. Where the friend comes from.                     #
#   max_friendmeter_val = The maximum value of the friendliness meter.         #
#   ID = The friend's actor ID. So let's say the friend is Ulrika, then the ID #
#        would be 2.                                                           #
#   description = A (short) description of the friend. These must be between   #
#                 square brackets ( ["description"] ). To make a new line,     #
#                 you'd  split the lines with a comma. So it would turn out    #
#                 like this: ["Line 1 description","Line 2 description"]       #
# Example: new_friend(30, "My Town", 100, 5, ["Damn this guy is old"])         #
#          Here, we're adding a friend with an age of 30, living in My Town,   #
#          with a max_friendliness_value of 100, has an actor ID of 5          #
#          (Lawrence) and with a description of "Damn this guy is old."        #
#                                                                              #
# Adding a value to the friendliness of a certain actor:                       #
# > Go to the place whenever you want to add the frienliness (in an event)     #
# > New Action                                                                 #
# > Third Tab                                                                  #
# > Advanced - Script                                                          #
# > Write: add_friendliness(actor_id,add_dec_flss)                             #
#   ---- Don't write from here on ----                                         #
#   actor_id = The actor's ID to add friendliness for (in the database).       #
#   add_dec_flss = The value to add/substract to/from the actor's friendliness #
# Example: add_friendliness(3,20)                                              #
# We're now adding an amount of 20 friend points to Benett ($game_actors[3])   #
#                                                                              #
# Triggering when a certain amount of friend points is reached (event):        #
# > Conditional Branch                                                         #
# > Fourth Tab                                                                 #
# > Script                                                                     #
# > Write: $game_actors[actor_id].friendliness == trigger_value                #
#                               -- OR --                                       #
#       $game_party.members[actor_id].friendliness == trigger_value            #
#   ---- Don't write from here on ----                                         #
#   actor_id = The actor's ID. When used the first method ($game_actors),      #
#              it'll be the ID of the actor in the database. When used the     #
#              second method ($game_party.members), you'll use the id of the   #
#              actors in the party (0 = Current active member, 1 = Second      #
#              member etc.                                                     #
#   trigger_value = The value which triggers the actions below when a certain  #
#                   amount of friend points is reached.                        #
# Example: $game_actors[3].friendliness == 30                                  #
#          We're making here a trigger, so when the amount of friend points of #
#          the third actor in the database (Benett) equals to 30, it'll run    #
#          the actions given by the eventer.                                   #
#                                                                              #
# Calling the Scene:                                                           #
# To call this friend journal from an event, you'll have to do this:           #
# > New Action                                                                 #
# > Third Tab                                                                  #
# > Advanced - Script                                                          #
# > Write: $scene = Scene_FriendsJournal.new(Scene_Map)                        #
#                                                                              #
# To call this journal from the menu, you'd ask any scripter to implement this #
# script into your menu. Just say that he has to call this:                    #
# $scene = Scene_FriendsJournal.new(Scene_Menu)                                #
# And (s)he should be able to know what to do.                                 #
#                                                                              #
# Credit: HungrySnake                                                          #
# ---------------------------------------------------------------------------- #

 
module FJ
  module CONFIG
 
    # ------------------------------------------------------------------------ #
    #                           Start Configuration                            #
    # ------------------------------------------------------------------------ #
    
    KNOWN_TEXT = "Всего" # Text for the amount of known friends
    AGE_TEXT = "Возраст" # Text for the age of the friend
    CITY_TEXT = "Место" # Text for the city of the friend
    DRAW_PARAMETERS = true # Draw the parameters of the friend?
    # String which stands on the friendliness bar
    
    FRIENDS = { # << Don't delete
    
    # INDEX => [AGE, CITY, MAX_FRIENDMETER_VAL, ID, DESCRIPTION]
    # The configuration format is given above, in the instructions.
    0 => [18,"Башня Ксардаса",100,1,["Обычный странник. Главный герой"]]
 
    # The next key would be 3, the one after that 4 and the one after that 5 etc.
    
    } # << Don't delete
    
    # ------------------------------------------------------------------------ #
    #                             End Configuration                            #
    # ------------------------------------------------------------------------ #
    
  end
end
 
class Window_KnownFriends < Window_Base
  def initialize(x,w)
    super(x,0,w,WLH+32)
    refresh
  end
 
  def refresh
    self.contents.clear
    draw_known
  end
 
  def draw_known
    known_text = FJ::CONFIG::KNOWN_TEXT
    known_friends = FJ::CONFIG::FRIENDS.size
    self.contents.draw_text(0,0,self.width-32,WLH,"#{known_text}: #{known_friends}",1)
  end
end
 
class Window_InfoFriend < Window_Base
  def initialize(x,w)
    super(x,WLH+32,w,Graphics.height-(WLH+32))
  end
 
  def refresh(actor,index)
    self.contents.clear
    draw_actor_info(actor,index) if actor != nil
  end
 
  def draw_actor_parameters(actor)
    draw_actor_parameter(actor,0,WLH*6+10,0)
    draw_actor_parameter(actor,0,WLH*7+10,1)
    draw_actor_parameter(actor,190,WLH*6+10,2)
    draw_actor_parameter(actor,190,WLH*7+10,3)
  end
 
 
  def draw_actor_origin(index,x,y)
    city_text = FJ::CONFIG::CITY_TEXT
    actor_city = FJ::CONFIG::FRIENDS[index][1]
    self.contents.draw_text(x,y,self.width,WLH,"#{city_text}: #{actor_city}")
  end
 
  def draw_friend_meter(actor,index,x,y,width=120)
    draw_friend_meter_gauge(actor,index,x,y,width)
    self.contents.font.color = system_color
  end
 
  def draw_friend_meter_gauge(actor,index,x,y,width=120)
    max_val = FJ::CONFIG::FRIENDS[index][2]
    cur_val = actor.friendliness >= max_val ? max_val : actor.friendliness
    gw = width * cur_val / max_val
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
  end
 
  def draw_friend_description(actor,index,x,y)
    for i in 0..FJ::CONFIG::FRIENDS[index][4].size
      self.contents.draw_text(x,y+WLH*i,self.width,WLH,FJ::CONFIG::FRIENDS[index][4][i])
    end
  end
 
  def draw_actor_info(actor,index)
    draw_actor_face(actor,0,WLH*0)
    draw_actor_name(actor,100,WLH*0)
    draw_actor_origin(index,100,WLH*2)
    draw_actor_graphic(actor,40,WLH*2+30)
    draw_friend_description(actor,index,0,WLH*4+15)    
  end
end
 
class Scene_FriendsJournal < Scene_Base
  include FJ::CONFIG
 
  def initialize(scene)
    @called_scene = scene
  end
 
  def start
    super
    create_menu_background
    any_friends
    create_friendcommand_window
    create_known_window
    create_friend_info
    refresh_f_time_fi
  end
 
  def refresh_f_time_fi
    sel_act = $game_actors[FRIENDS[@friends_window.index][3]]
    @friendinfo_window.refresh(sel_act,@friends_window.index)
  end
 
  def any_friends
    if FRIENDS.size > 0
      @any_friends = true
    else
      @any_friends = false
    end
  end
 
  def create_friendcommand_window
    friends_selectable = []
    for indx in 0...FRIENDS.size
      friends_selectable.push $game_actors[FRIENDS[indx][3]].name if @any_friends 
    end
    @friends_window = Window_Command.new(150,friends_selectable)
    @friends_window.y =  56
    index = @any_friends ? 0 : -1
    @friends_window.index = index
    @friends_window.height = Graphics.height - @friends_window.y
  end
 
  def create_known_window
    @known_window = Window_KnownFriends.new(0,Graphics.width)
  end
 
  def create_friend_info
    friendinf_wind_globx = @friends_window.width
    @friendinfo_window = Window_InfoFriend.new(friendinf_wind_globx,Graphics.width-friendinf_wind_globx)
  end
 
  def update_friends_window
    @friends_window.update
    if Input.trigger?(Input::B)
      $scene = @called_scene.new
    end
    if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
      sel_act = $game_actors[FRIENDS[@friends_window.index][3]]
      @friendinfo_window.refresh(sel_act,@friends_window.index)
    end
  end
 
  def update
    super
    update_menu_background
    update_friends_window
    @known_window.update
    @friendinfo_window.update
  end
 
  def terminate
    super
    dispose_menu_background
    @friends_window.dispose
    @known_window.dispose
    @friendinfo_window.dispose
  end
end
 
class Game_Interpreter
 
  def new_friend(age,city,max_friendmeter_val,id,description)
    origin_hash = FJ::CONFIG::FRIENDS
    temp_key =  FJ::CONFIG::FRIENDS.size
    temp_array = [age,city,max_friendmeter_val,id,description]
    FJ::CONFIG::FRIENDS[temp_key] = temp_array
  end
 
  def add_friendliness(actor_id,add_dec_flss)
    $game_actors[actor_id].added_friendliness += add_dec_flss
  end
end
 
class Game_Battler
  attr_accessor :added_friendliness
 
  alias hsnake_fjga_init initialize unless $@
  def initialize
    hsnake_fjga_init
    @added_friendliness = 0
  end
 
  def friendliness
    @flss = 0
    @flss += @added_friendliness
    return @flss
  end
end
Администратор запретил публиковать записи гостям.

Friends Journal Rpg Maker ace 9 года 3 мес. назад #77529

  • DeadElf79
  • DeadElf79 аватар
  • Вне сайта
  • Звездный Страж
  • Сообщений: 3147
  • Спасибо получено: 2650
  • Проект месяца 2 местоПрограммист RubyПисатель 3 местоОрганизатор конкурсовВетеранУчитель3 место1 место в ГотвПроект месяца 1 место
Две ошибки замечены конкретно в аддоне.
Первое
class Scene_Menu < Scene_Base
заменить на
class Scene_Menu < Scene_MenuBase
Второе - заменить построение списка в командом окне на VXAce-style, то есть вот этот код переписать начисто:
s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    s7 = Vocab::FRIENDS_JOURNAL
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s7,s5, s6])
    @command_window.index = @menu_index
    if $game_party.members.size == 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)  
    end
    if $game_system.save_disabled    
      @command_window.draw_item(4, false)
    end

Так как в программировании окошек эйса я копаться не люблю, то скорее всего, тебе кто-нибудь еще поможет)
Администратор запретил публиковать записи гостям.
За этот пост поблагодарили: Dprizrak1, MaltonTheWarrior
Модераторы: NeKotZima
Время создания страницы: 0.357 секунд