Modern, i use Yem and many other script and your Diary 1.0 work fine.
But i'm Italian so it taked to me around 2 hours to figure out how to set the 2nd diary [a cookbook] and call it. So if you dont mind, i will post here the complete code for those who, like me, had same problem to set the diary cause they didnt get well with english or script. Hope to be of help to other newbie like me. Your work is awesome as alwais Modern! The code, is set like this:
#==============================================================================
# Multiple Diaries
# Addon to Diary 1.0
# Version: 1.0
# Author: modern algebra (rmrk.net)
# Date: January 17, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Description:
#
# This allows for an built-in way to create and access multiple diaries.
# Unlike the main diary, this is a little simpler as it does not allow for
# access through the menu or anything fancy, so it has to be called through
# an event. Entries for these diaries are also set up in the default way
# through the main script
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Instructions:
#
# Place this script below the main Diary script, but keep it above Main
#
# To create the new diaries, go down to line 66 and read the instructions
# located there. Keep in mind what order you creat them, as that is how you
# will access them. The main diary will always have the ID 0, so each of the
# new diaries you create will have IDs starting from 1. So, the first one you
# make has ID 1, the second one ID 2, and so on.
#
# You can then write entries or call the diaries by using their IDs in these
# codes, which you put in the call script event command:
#
# write_diary_entry (entry_id, diary_id)
# entry_id : this is an ID of an entry set up in the database, or it
# could be an entry object itself if you have set one up in an
# event (which is NOT recommended, btw).
# diary_id : this is the ID of the diary you want to call. It could also
# be the diary object itself, if you wanted, but I don't see any
# reason why that would be easier than the ID. If left blank, it
# defaults to the main diary that you set up through the main script.
#
# call_diary (diary_id)
# diary_id : this is the ID of the diary you want to call. It could also
# be the diary object itself. If left blank, it defaults to the main
# diary that you set up through the main script.
#==============================================================================
#==============================================================================
# ** Game System
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# new instance variable - diaries
# aliased method - initialize
#==============================================================================
class Game_System
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Public Instance Variables
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
attr_reader :diaries
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Object Initialization
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias ma_joy_cokbok_diry_4kw1 initialize
def initialize (*args)
# Run Original Method
ma_joy_cokbok_diry_4kw1 (*args)
@diaries = [@diary]
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# EDITABLE REGION
#``````````````````````````````````````````````````````````````````````````
# Make new diaries Like this:
# name = "name of diary"
# font_name = "name of font" OR ["font_1", "font_2", ..., "font_n"]
# back_pic = "name of Background Image
# page_rects = [Rect.new (x, y, w, h), Rect.new (x, y, w, )]
# w, h : width, height
# num_rects = [[Rect.new (x, y, w, h), align], [Rect.new (x, y, w, h), align]]
# align : 0 => Left, 1 => Middle, 2 => Right
#
# You must define all of the following, and then you can make it:
# @diaries.push (Diary.new (name, font_name, back_pic, page_rects, num_rects))
#
# I should note, if you do not define arguments, then they resorts to
# the default setting you've set up. However, you can't "skip" arguments.
# If you want back_pic to be default but want to change page_rects, then
# you will need to define back_pic anyway. However, if you wanted back_pic,
# page_rects, and num_rects all to be default, then you would only need to
# define name and font_name and create it like this:
# @diaries.push (Diary.new (name, font_name))
name = "Ricettario"
font_name = ["Garamond", "Verdana", "Arial"]
back_pic = "Diary Back"
page_rects = [Rect.new (20, 20, 200, 360), Rect.new (260, 20, 200, 360)]
num_rects = [[Rect.new (110, 384, 20, 24), 1], [Rect.new (350, 384, 20, 24), 1]]
@diaries.push (Game_Diary.new (name, font_name, back_pic, page_rects, num_rects))
#``````````````````````````````````````````````````````````````````````````
# END EDITABLE REGION
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
end
end
#==============================================================================
# ** Game_Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Summary of Changes:
# aliased methods - call_diary, write_diary_entry
#==============================================================================
class Game_Interpreter
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Write Diary Entry
# entry : either an Game_DiaryEntry object or an entry ID
# diary : the Game_Diary object to write it to
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias ma_mult_diry_writeentry_6hf2 write_diary_entry
def write_diary_entry (entry, diary = $game_system.diary, *args)
diary = $game_system.diaries[diary] if diary.is_a? (Integer)
ma_mult_diry_writeentry_6hf2 (entry, diary, *args)
end
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Call Diary
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias mjoy_clldiry_multiples_8kd2 call_diary
def call_diary (diary = $game_system.diary, *args)
diary = $game_system.diaries[diary] if diary.is_a? (Integer)
mjoy_clldiry_multiples_8kd2 (diary, *args)
end
end
and to call the 2nd Diary, you just need to create one Item, give it to the player and ser his use "only from the menĂ¹", no consume.
it must call a "common event" and in the common event you need just the
"Script" command, the last in the 3rd page, below "advanced"
and put there, this:
call_diary (1)
for the entryies you simpli use the first script, the Diary 1.0 and if you will like to have an ordered list, use the entryes from 1 to 100 [just to say] for the diary, and the entryes from 101 to 200 for the coockbook.
To add other diarys, just add another time the first quote and change name and picture and to make the call of other diaries you will make another item same as the first but the call will be...
call_diary (2)
then call 3..4...5 as many as you want. easy to configure.
Our problem was just to figure out where we need to edit eheh
my first time i messed up all because i misunderstand this line
@diaries.push (Game_Diary.new (name, font_name, back_pic, page_rects, num_rects))
i used it like this:
@diaries.push (Game_Diary.new (
cookbook, font_name, back_pic, page_rects, num_rects))
Fon non-scripter like me is easy make those kind of mistake...but i read your comments many time, doing some change and at least figured out how to configure properly.
Now it work perfect! And i'm starting making my event-cooking part of the game heheh "sweeet"
Thanks a lot Algebra. More the tima passes, more i think you are truly blessed with genius.
I just remind you about my question, if you dont mind.
I will like to change font to a smaller size if can be done.
For now, i'm simply avoiding the problem using "Garamond" Font that is smaller than Verdana or the others, but if there is a way to change the font-size, i will like to know ^^
Thanks for your time, sorry for my talkative habits...i hope this post will be of some help ^^