i just downloaded blizzard's journal script now how would i make that come up by pressing a key on the keyboard. I've been able to make it come up useing a event with the $scene = Scene_Journal.new script but i'd like it to be able to comeup at any time.
also if anyone could reput up the demo as it has been removed that would be helpful too
Just use this add-on.
class Scene_Map
alias upd_journal_hack_later update
def update
upd_journal_hack_later
$scene = Scene_Journal.new if Input.trigger?(Input::A)
end
end
When you press SHIFT, it will come up.
What does that _hack syntax do?
Nothing, it's just a name. I could have left it out and have written _xyz instead.
If you want to learn about aliasing, you can alwasys read my e-book. :)
Okay...I think I'll do that now.
Your E-Book isn't the scripting for intermediate level is it?
my question is : is the :A what makes it the shift key?
Yes, "Input::A" makes it SHIFT. Input::C is ENTER, Input::B is ESC, and so on. There's a list in the RMXP help file.
@Calintz: In fact it is, but people who read it said that you only need some basic knowledge about RMXP to understand it.
Ok...
I already dwnlded and let's hope thats the case, because I've done very many Tutorials on how to script, and I still understand sooo little.
I can understand what I read mainly, but I never know how to get what I want, because I don't ever know what the syntax is, because their isn't a document in my face that explains it...I don't really know how to explain what I mean, except for saying that I don't know what to write to get what outcome I desire.
Here's an example:
I just read in the RMXP help file that using Rect will get the width and heigth of the specified bitmap, but I don't know how to use Rect in the syntax properly to ever get the information, just a bunch of errors...*sigh*
I never thought scripting would be easy to learn, but I didn't think it would be this hard either, because I am a very kowledgable kid in the sense of understanding what information is being given to me...
also you can check the inputs and change them ingame by pressing F1, oh and Calintz you should find his tut useful I understood like all of it :)
And best way to learn is by doing especially in RGSS
Ok thnx...!
Fiddle with the default scripts is how I learnt RGSS mainly. That way, you'll lose fear of syntaxes and you'll get to know the data structure of RMXP (the way all those default scripts work together).
I've been trying that lately, and I'm starting to understand a lot of thigns more clearly.
I have my own question for the journal script
I thought it would be possible if you made a copy of the journal script with the orignal in it that you could in theory change everything of the copy version to I don't know Journal = Jounral2
however when ran it worked for the journal 2 if thats the one I started with but when I went to the Journal (orignal) it crashed.
Reason I need two journals. or something of that line
I want to have herbs and potion making in my game, but at the same token I don't want to have people flipping through their journal to find information so the second one would be the log book and what they learn of the herbs. Of course I know it might be better to have a separate script for that where it could be a scroll down thing and it will say the herbs name and then what the person had unlocked about that herb. but really I don't want to oppose anyone to make a brand new script for me, so I was trying to cut corners.
anyway I got a lot of errors by just changing all the word "Journal" to "herbs"
I don't know what you did wrong but it works fine for me here you go
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Herbs Display by Blizzard
# Version: 2.0
# Type: Herbs Viewer
# Date: 22.1.2008
# Date v2.0: 24.1.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
# 99% compatible with SDK v1.x. 90% compatible with SDK v2.x. Should be
# compatible with everything else. WILL corrupt old savegames.
#
#
# Features:
#
# - define texts that should be displayed
# - easy change of the text that is being displayed
# - returns to the scene that called it
#
# new in 2.0:
#
# - now able to unlock pages during game play
# - display pages in unlocking order or a fixed order
# - add now page title and text instead of text only
#
#
# Explanation:
#
# This script will allow you to use a herb scene that shows some text that
# you define in advance. You can change the text displayed to any other of
# the predefined texts with one command.
#
#
# Configuration:
#
# Set up the configuration below and add your pictures to the folder you
# specified. Call the scene with following syntax:
#
# $scene = Scene_Herbs.new
#
# If you want to unlock another page, simply use a "Call Script" event
# command with following syntax:
#
# $game_system.unlock_herb(PAGE_NUMBER)
#
# PAGE_NUMBER - page number to unlock
#
#
# IMPORTANT NOTE:
#
# If one of your texts is too long to fit in one page, simply split it into
# two pages into two titles and unlock all the pages that you need. You can
# also use something like
#
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#==============================================================================
# module BlizzCFG
#==============================================================================
module BlizzCFG
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# font name in which the herb should be displayed
HERB_FONTNAME = 'Arial'
# font size in which the herb should be displayed
HERB_FONTSIZE = 22
# 0 = left, 1 = center, 2 = right
HERB_FONTALIGN = 0
# if you set this to true, pages will be displayed in the order you unlock them
HERB_ORDER = false
# entries, the template is ["Title", "Text"]
HERB_ENTRIES = [
["Herbs are very good for healing people", "This is the first entry."],
["Herbs are tasty", "Don't forget that the last entry does NOT have a comma after the string."],
["Green Herbs are bitter", "This text repeats itself. This text repeats itself. This text repeats itself. This text repeats itself. This text repeats itself. This text repeats itself. Oh yeah, this is entry 2."],
["Red Herbs are Spicy", "I have copy-pasted a text here that doesn't fit into one page to demonstrate how to split a text that is simply too long to fit in one page. L3X has his own will. He destroyed his own extern controller module due to the fact that his Tech4X AI was developed enough so he could do it. He would have never done it if it wasn't for the Scord virus attack. There is no known way to manipulate this cyborg from within anymore. As a model of the limited L3X1-MU5 series he has close combat abilities beyond those of a mere" +
"human. L3X himself was not originally implement with the Tech4X AI, he was fighting during Scord War 1 with the Tech3 AI. As a reward he was upgraded with the Tech4X AI due to his excellent performance in Scord War 1. Well, since this text"],
["This text is too long (continued)", "actually exactly fits into one page, I have added those last words to simply prolong it."]
]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
#==============================================================================
# Game_System
#==============================================================================
class Game_System
attr_reader :herb
alias init_herb_later initialize
def initialize
init_herb_later
@herb = []
end
def unlock_herb(id)
@herb.push(id-1) unless @herb.include?(id-1)
end
end
#==============================================================================
# Window_HerbsDisplay
#==============================================================================
class Window_HerbsDisplay < Window_Base
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = BlizzCFG::HERB_FONTNAME
self.contents.font.size = BlizzCFG::HERB_FONTSIZE
@index, @herb = 0, $game_system.herb.clone
@herb.sort! unless BlizzCFG::HERB_ORDER
refresh
end
def refresh
self.contents.clear
self.contents.draw_text(4, 416, 252, 32, 'Page', 2)
self.contents.draw_text(4, 416, 292, 32, (@index+1).to_s, 2)
self.contents.draw_text(4, 416, 600, 32, '/', 1)
self.contents.draw_text(312, 416, 292, 32, @herb.size.to_s)
return if @herb.size == 0
self.contents.draw_text(4, 0, 600, 32, BlizzCFG::HERB_ENTRIES[@herb[@index]][0], 1)
text = slice_text(BlizzCFG::HERB_ENTRIES[@herb[@index]][1], 592)
text.each_index {|i| self.contents.draw_text(4, (i+1)*32+16, 600, 32, text[i], BlizzCFG::HERB_FONTALIGN)}
end
def update
super
if Input.repeat?(Input::RIGHT)
if @herb.size == 0
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.cursor_se)
@index = (@index+1) % @herb.size
refresh
end
elsif Input.repeat?(Input::LEFT)
if @herb.size == 0
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.cursor_se)
@index = (@index+@herb.size-1) % @herb.size
refresh
end
end
end
end
#==============================================================================
# Scene_Herbs
#==============================================================================
class Scene_Herbs
def initialize
@scene = $scene.class
end
def main
@window = Window_HerbsDisplay.new
Graphics.transition
loop do
Graphics.update
Input.update
@window.update
break if Input.trigger?(Input::C) || Input.trigger?(Input::B)
end
$game_system.se_play($data_system.cancel_se)
Graphics.freeze
@window.dispose
$scene = @scene.new
end
end
call it with
other instructions inside script and I deleted the slice text window base edit as it's already in the journal script so this herbs one wouldn't work on it own only with the journal as well so put it underneath
try doing an experement with Both the journals up, 4 events, one to unlock herb entery 1, second to unlock journal entery 2, 1 to show journal, and the last to show herb. See if it collides problems >_>
oh you mean you want it on same scene just both the windows appearing? I don't think it would go very well visually wouldn't be that hard to create a new script of it I don't think
is it possible to remove a page at a later time?