Mattfriends's Diary System Script
Authors: Mattfriends
Type: Diary System
Authors: Mattfriends
Type: Diary System
Introduction
This script allow you to create a great simple diary.
Features
- Add an event into a diary with one short script.
- Easily to call the script.
Screenshots
None
Demo
None
Script
Version 1
CODE
#=============================================================================
#
# Mattfriends's Diary
#
# Introduction:
# Place the script above Main.
#
# How to use:
# You need to call this script once and at the start of the game.
# Diary.setup()
#
# Use this to call the script,
# $scene = Scene_Diary.new
#
# To add event into the diary use this,
# Diary.add("TEXT")
#
# Examples:
# Diary.add("Went to bed.")
#
# Credit:
# mattfriends for making it
#
# PLEASE GIVE CREDITS AFTER USING IT
#
#=============================================================================
class DiaryBox < Window_Base
def initialize
super(0, 0, 640, 70)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 25
cx = contents.text_size("Diary").width
self.contents.draw_text(0, 0, cx, 37, "Diary")
end
end
class DiaryMain < Window_Base
def initialize
super(0, 70, 640, 410)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 20
cx = contents.text_size($dln1).width
self.contents.draw_text(0, 0, cx, 32, $dln1)
cx = contents.text_size($dln2).width
self.contents.draw_text(0, 32, cx, 32, $dln2)
cx = contents.text_size($dln3).width
self.contents.draw_text(0, 64, cx, 32, $dln3)
cx = contents.text_size($dln4).width
self.contents.draw_text(0, 96, cx, 32, $dln4)
cx = contents.text_size($dln5).width
self.contents.draw_text(0, 128, cx, 32, $dln5)
cx = contents.text_size($dln6).width
self.contents.draw_text(0, 160, cx, 32, $dln6)
cx = contents.text_size($dln7).width
self.contents.draw_text(0, 192, cx, 32, $dln7)
cx = contents.text_size($dln8).width
self.contents.draw_text(0, 224, cx, 32, $dln8)
cx = contents.text_size($dln9).width
self.contents.draw_text(0, 256, cx, 32, $dln9)
cx = contents.text_size($dln10).width
self.contents.draw_text(0, 288, cx, 32, $dln10)
end
end
class Scene_Diary
def main
@windowDesc = DiaryBox.new
@windowMain = DiaryMain.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
break
end
end
Graphics.freeze
@windowDesc.dispose
@windowMain.dispose
end
def update
@windowDesc.update
@windowMain.update
end
end
class Diary
def self.setup()
$dln1 = ""
$dln2 = ""
$dln3 = ""
$dln4 = ""
$dln5 = ""
$dln6 = ""
$dln7 = ""
$dln8 = ""
$dln9 = ""
$dln10 = ""
end
def self.add(text)
$dln10 = $dln9
$dln9 = $dln8
$dln8 = $dln7
$dln7 = $dln6
$dln6 = $dln5
$dln5 = $dln4
$dln4 = $dln3
$dln3 = $dln2
$dln2 = $dln1
$dln1 = text
end
end
#
# Mattfriends's Diary
#
# Introduction:
# Place the script above Main.
#
# How to use:
# You need to call this script once and at the start of the game.
# Diary.setup()
#
# Use this to call the script,
# $scene = Scene_Diary.new
#
# To add event into the diary use this,
# Diary.add("TEXT")
#
# Examples:
# Diary.add("Went to bed.")
#
# Credit:
# mattfriends for making it
#
# PLEASE GIVE CREDITS AFTER USING IT
#
#=============================================================================
class DiaryBox < Window_Base
def initialize
super(0, 0, 640, 70)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 25
cx = contents.text_size("Diary").width
self.contents.draw_text(0, 0, cx, 37, "Diary")
end
end
class DiaryMain < Window_Base
def initialize
super(0, 70, 640, 410)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 20
cx = contents.text_size($dln1).width
self.contents.draw_text(0, 0, cx, 32, $dln1)
cx = contents.text_size($dln2).width
self.contents.draw_text(0, 32, cx, 32, $dln2)
cx = contents.text_size($dln3).width
self.contents.draw_text(0, 64, cx, 32, $dln3)
cx = contents.text_size($dln4).width
self.contents.draw_text(0, 96, cx, 32, $dln4)
cx = contents.text_size($dln5).width
self.contents.draw_text(0, 128, cx, 32, $dln5)
cx = contents.text_size($dln6).width
self.contents.draw_text(0, 160, cx, 32, $dln6)
cx = contents.text_size($dln7).width
self.contents.draw_text(0, 192, cx, 32, $dln7)
cx = contents.text_size($dln8).width
self.contents.draw_text(0, 224, cx, 32, $dln8)
cx = contents.text_size($dln9).width
self.contents.draw_text(0, 256, cx, 32, $dln9)
cx = contents.text_size($dln10).width
self.contents.draw_text(0, 288, cx, 32, $dln10)
end
end
class Scene_Diary
def main
@windowDesc = DiaryBox.new
@windowMain = DiaryMain.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
break
end
end
Graphics.freeze
@windowDesc.dispose
@windowMain.dispose
end
def update
@windowDesc.update
@windowMain.update
end
end
class Diary
def self.setup()
$dln1 = ""
$dln2 = ""
$dln3 = ""
$dln4 = ""
$dln5 = ""
$dln6 = ""
$dln7 = ""
$dln8 = ""
$dln9 = ""
$dln10 = ""
end
def self.add(text)
$dln10 = $dln9
$dln9 = $dln8
$dln8 = $dln7
$dln7 = $dln6
$dln6 = $dln5
$dln5 = $dln4
$dln4 = $dln3
$dln3 = $dln2
$dln2 = $dln1
$dln1 = text
end
end
Version 2
CODE
#=============================================================================
#
# Mattfriends's Diary v2
#
# Introduction:
# Place the script above Main.
#
# How to use:
# Use this to call the script,
# $scene = Scene_Diary.new
#
# To add event into the diary use this,
# Diary.add("TEXT")
#
# Examples:
# Diary.add("Went to bed.")
#
# Credit:
# mattfriends for making it
#
# PLEASE GIVE CREDITS AFTER USING IT
#
#=============================================================================
$dln1 = ""
$dln2 = ""
$dln3 = ""
$dln4 = ""
$dln5 = ""
$dln6 = ""
$dln7 = ""
$dln8 = ""
$dln9 = ""
$dln10 = ""
class DiaryBox < Window_Base
def initialize
super(0, 0, 640, 70)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 25
cx = contents.text_size("Diary").width
self.contents.draw_text(0, 0, cx, 37, "Diary")
end
end
class DiaryNewestText < Window_Base
def initialize
super(0, 70, 130, 70)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 25
cx = contents.text_size("Newest -").width
self.contents.draw_text(0, 0, cx, 37, "Newest -")
end
end
class DiaryBlank < Window_Base
def initialize
super(0, 140, 130, 270)
self.contents = Bitmap.new(width - 32, height - 32)
end
end
class DiaryLastestText < Window_Base
def initialize
super(0, 410, 130, 70)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 25
cx = contents.text_size("Lastest -").width
self.contents.draw_text(0, 0, cx, 37, "Lastest -")
end
end
class DiaryNewest < Window_Base
def initialize
super(130, 70, 510, 70)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 25
cx = contents.text_size($dln1).width
self.contents.draw_text(0, 0, cx, 37, $dln1)
end
end
class DiaryMain < Window_Base
def initialize
super(130, 140, 510, 340)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 20
cx = contents.text_size($dln2).width
self.contents.draw_text(0, 0, cx, 32, $dln2)
cx = contents.text_size($dln3).width
self.contents.draw_text(0, 32, cx, 32, $dln3)
cx = contents.text_size($dln4).width
self.contents.draw_text(0, 64, cx, 32, $dln4)
cx = contents.text_size($dln5).width
self.contents.draw_text(0, 96, cx, 32, $dln5)
cx = contents.text_size($dln6).width
self.contents.draw_text(0, 128, cx, 32, $dln6)
cx = contents.text_size($dln7).width
self.contents.draw_text(0, 160, cx, 32, $dln7)
cx = contents.text_size($dln8).width
self.contents.draw_text(0, 192, cx, 32, $dln8)
cx = contents.text_size($dln9).width
self.contents.draw_text(0, 224, cx, 32, $dln9)
cx = contents.text_size($dln10).width
self.contents.draw_text(0, 256, cx, 32, $dln10)
end
end
class Scene_Diary
def main
@windowDesc = DiaryBox.new
@windowNewT = DiaryNewestText.new
@windowBlank = DiaryBlank.new
@windowLastT = DiaryLastestText.new
@windowNew = DiaryNewest.new
@windowMain = DiaryMain.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
break
end
end
Graphics.freeze
@windowDesc.dispose
@windowNewT.dispose
@windowBlank.dispose
@windowLastT.dispose
@windowNew.dispose
@windowMain.dispose
end
def update
@windowDesc.update
@windowNewT.update
@windowBlank.update
@windowLastT.update
@windowNew.update
@windowMain.update
end
end
class Diary
def self.add(text)
$dln10 = $dln9
$dln9 = $dln8
$dln8 = $dln7
$dln7 = $dln6
$dln6 = $dln5
$dln5 = $dln4
$dln4 = $dln3
$dln3 = $dln2
$dln2 = $dln1
$dln1 = text
end
end
#
# Mattfriends's Diary v2
#
# Introduction:
# Place the script above Main.
#
# How to use:
# Use this to call the script,
# $scene = Scene_Diary.new
#
# To add event into the diary use this,
# Diary.add("TEXT")
#
# Examples:
# Diary.add("Went to bed.")
#
# Credit:
# mattfriends for making it
#
# PLEASE GIVE CREDITS AFTER USING IT
#
#=============================================================================
$dln1 = ""
$dln2 = ""
$dln3 = ""
$dln4 = ""
$dln5 = ""
$dln6 = ""
$dln7 = ""
$dln8 = ""
$dln9 = ""
$dln10 = ""
class DiaryBox < Window_Base
def initialize
super(0, 0, 640, 70)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 25
cx = contents.text_size("Diary").width
self.contents.draw_text(0, 0, cx, 37, "Diary")
end
end
class DiaryNewestText < Window_Base
def initialize
super(0, 70, 130, 70)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 25
cx = contents.text_size("Newest -").width
self.contents.draw_text(0, 0, cx, 37, "Newest -")
end
end
class DiaryBlank < Window_Base
def initialize
super(0, 140, 130, 270)
self.contents = Bitmap.new(width - 32, height - 32)
end
end
class DiaryLastestText < Window_Base
def initialize
super(0, 410, 130, 70)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 25
cx = contents.text_size("Lastest -").width
self.contents.draw_text(0, 0, cx, 37, "Lastest -")
end
end
class DiaryNewest < Window_Base
def initialize
super(130, 70, 510, 70)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 25
cx = contents.text_size($dln1).width
self.contents.draw_text(0, 0, cx, 37, $dln1)
end
end
class DiaryMain < Window_Base
def initialize
super(130, 140, 510, 340)
self.contents = Bitmap.new(width - 32, height - 32)
update
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 20
cx = contents.text_size($dln2).width
self.contents.draw_text(0, 0, cx, 32, $dln2)
cx = contents.text_size($dln3).width
self.contents.draw_text(0, 32, cx, 32, $dln3)
cx = contents.text_size($dln4).width
self.contents.draw_text(0, 64, cx, 32, $dln4)
cx = contents.text_size($dln5).width
self.contents.draw_text(0, 96, cx, 32, $dln5)
cx = contents.text_size($dln6).width
self.contents.draw_text(0, 128, cx, 32, $dln6)
cx = contents.text_size($dln7).width
self.contents.draw_text(0, 160, cx, 32, $dln7)
cx = contents.text_size($dln8).width
self.contents.draw_text(0, 192, cx, 32, $dln8)
cx = contents.text_size($dln9).width
self.contents.draw_text(0, 224, cx, 32, $dln9)
cx = contents.text_size($dln10).width
self.contents.draw_text(0, 256, cx, 32, $dln10)
end
end
class Scene_Diary
def main
@windowDesc = DiaryBox.new
@windowNewT = DiaryNewestText.new
@windowBlank = DiaryBlank.new
@windowLastT = DiaryLastestText.new
@windowNew = DiaryNewest.new
@windowMain = DiaryMain.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
break
end
end
Graphics.freeze
@windowDesc.dispose
@windowNewT.dispose
@windowBlank.dispose
@windowLastT.dispose
@windowNew.dispose
@windowMain.dispose
end
def update
@windowDesc.update
@windowNewT.update
@windowBlank.update
@windowLastT.update
@windowNew.update
@windowMain.update
end
end
class Diary
def self.add(text)
$dln10 = $dln9
$dln9 = $dln8
$dln8 = $dln7
$dln7 = $dln6
$dln6 = $dln5
$dln5 = $dln4
$dln4 = $dln3
$dln3 = $dln2
$dln2 = $dln1
$dln1 = text
end
end
Instructions
Inside the script.
Compatibility
Every script. 100% sure.
Credits and Thanks
- Me - For doing it.
Author's Notes
I made this script because I haven't seen much of them and I made it easier to use. Hope you like it.
