Точно! Вот скрипт, но опять же на 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