Help - Search - Members - Calendar
Full Version: Read!
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS2
SojaBird
Read!

Version v2.5
Author SojaBird
Release Date
v1.0 > 02-09-08
v1.1 > 03-09-08
v1.2 > 04-09-08
v2.0 > 10-12-08
v2.1 > 11-12-08
v2.2 > 11-12-08
v2.5 > 29-01-09


Introduction
Read! A script that makes your players read something you like! Make books or scrolls with any picture program and make them appear, ready to be read!

Features
v1.0
  • Make the player read a picturebased book.
v1.1
  • Fixed bug with amount to go forward.
v1.2
  • Added sounds setup.
v2.0
  • Read_A_Book! > Read;
  • No more stupid pagessize input, no more stupid .png or .jpg input;
  • Read a scroll, instead of a book;
  • Now a book/scroll can also be read without returning to the itemmenu;
  • Sound setup disapeard!? (will not be included until request);
  • More easy and shorter callscript functions.
v2.1
  • Bug fixed, background is disposed now when a scroll or book is closed.
v2.2
  • Some more easy use of pictures, as well as some extra functions (useing spreads for example).
v2.5
  • Code can be placed in the itemnote field and will be executed;
  • Automaticly read if the code comes from an itemnote;
  • A more clear code;
  • Some extra call script functions.


To come features
- Only on request.


Script
Click to view attachment


Customization
[Show/Hide] How-to-use
Call the next script or make your book/scroll as an item and put the code in the note field of that item. Use the following;
CODE
read_book(book, *back, *draw_style, *from_item)
read_scroll(scroll, *from_item)
For the variables "book" and "scroll", you'll have to set the
name of the book/scroll ('picturename'). For the variable "back", you can setthe name of the back images of a book. If you leave it for what is, it'll use the default settings from the script-setup ("BACK_PIC"). For the "draw_style", you can change the way of how you've set up the pictures. This variable is optional. You do have to set "back" if you want to use this. If you leave it empty, it'll use the default you've set in the script-setup ("DRAW_STYLE"). For the variable "from_item", you can set if you want to return to the item window when you close the book/scroll. But if you leave it for what it is, it'll see for itself if the code came from an item or not (recommented).


[Show/Hide] File-Names
Use correct filenames for your book! First of all check the script-setup and make it to how you want it before making your pictures. Look at the "BOOK_MAP", this is the place where you're going to put your pictures. Now you can make the pictures... Though be aware! You need a to make a background for your pages to show on. Size it (max) 544*416 and name it whatever you want. Go to the scriptsetup and put the name of that background after "BACK_PIC". Next you are going to make the pages with your text and/or pictures and all, that's all up to you since they are
pictures, so everything is possible. Just go and start making your pages with any size you like (change the "DRAW_STYLE" in the script-setup to your style). Every page should have it's own picture! When you're done with a page, and you're going to save and name it, set the name like this; 'bookname-pagenumber'. So if you just created the 2nd page of your book called 'ghost', the name of the picture must be 'ghost-1'. Make sure you see that the second page of the book, has the number 1. So the first page has the number 0.
For the scrolls, first check in wich map the pictures need to come. After that, just go and make some nifty looking pictures that will be shown and can be scrolled by the user in all 4
directions.
PS: RPGMakerVX only supports png/jpg/jpeg picture-files.


[Show/Hide] More Setup
The last 3 settings of the setup; CENTER_OFFSET, NEXT_PAGE and PREV_PAGE, are explaind below.
{CENTER_OFFSET}
The center_offset setting defermens the y-offset of the pages from the middle. So if you want your pages not to be drawn at the very middle of the back-picture, you'll have to set the center_offset to any given number you want the pages to be offset from the middle. For example if you have page-pictures that are sized 270*412, and you want them to be shown, not directly on the center of your background, but in the center of each half, you want to set the center_offset to 2 since this will center them out on every half.
{NEXT_PAGE}
This setting determens wich key needs to be pressed to move the pages to the next. You can only use known inputs by the game. Though, you can extend this by useing various other scripts that will allow you to use all inputs from your whole keyboard.
{PREV_PAGE}
This is actualy the same as the next_page setting, only this will bring the reader to the previous page.
For the scrolling part of the setup, the 4 SCROLL_directions and SCROLL_SPEED remains.
{SCROLL_UP/DOWN/RIGHT/LEFT}
For the directions, just changes the input to what you prefer, though the default are the most usefull (in my opinion).
{SCROLL_SPEED}
The scrollspeed, is the amount of pixels the scroll moves when the player presses one of the directionbutons once.



Compatibility
VX only.


Screenshot
Click to view attachment


DEMO



Installation
Put the script above main.
Customise the script to your needs.
Credit me pls.


FAQ
Comming soon.


Terms and Conditions
Credit me with site, and the script is free for use in NONCOMERCIAL projects.
If anyone want some changes, please pm me or post it here, I'll track the topic.
VileoSufora
Sweet, thanks for this.
jasonicus
This is perfect for what I need. Thanks.
GunZz
will you upload a demo ?
SojaBird
thanks for all the good comments smile.gif nice ya all like it

I'll upload a demo when I've time wink.gif...wel I just could post my project but that have crappy artwork so I'll do that when I've time smile.gif
SojaBird
mmm sorry for the dubble post, but i found some bugs when useing uneven numbers...it seems that it can go 1 page further that it should...working on that!!

Update to v1.1
- Fixed bug when going page's forward.


Also added DEMO!!!
GunZz
Thx :] ;]

LoL awesome script
Xeyla
This is awsome!
I've been wanting to put my own books in this game, just like in Oblivion. I love reading some of the books in that game, and its neat when you have to find the whole series for one subject.

Thank you so much thumbsup.gif
SojaBird
Well thanks...
Anyway to improve? I like to work with picturebased scripts smile.gif

Any requests on the script are more than welcome
maker2008
Thank you very much..
can you make variables appear in the book?
SojaBird
could do ya...but can ya be more spesific?
Mr. Bubble
I think it would be cool to have a customized sound effect for when the page turns or when the book closes. Here's some sound effects I found that might help.

Click to view attachment
Click to view attachment
SojaBird
heya mr. bubble

I indeed discoverd that I didn't include that function


here he goes smile.gif




Update to v1.2
- Sound setup added (did it not in vx self, so sorry if it doesn't work or look right atm).
Rory
So this is like the Ansem Reports in Kingdom Hearts?
SojaBird
don't know that game
GappieMikan
Maybe you can also make one for RMXP, since I wanna use a similar script for Patchouli's Library in my game
SojaBird
Sorry I only can script RGSS2, though perhaps someone could downscript it to RGSS, only with credits that is.
VileoSufora
Maybe the ability to have like, one callscript be a book and another one be a scroll/parchment?
That would be awesome.
EDIT: Like, the ability the scroll up and down freely through the scroll and only one page for the parchment. Also, the ability to change the graphics with a callscript.
leqesai
QUOTE (HotSpot6 @ Oct 8 2008, 04:39 PM) *
Maybe the ability to have like, one callscript be a book and another one be a scroll/parchment?
That would be awesome.
EDIT: Like, the ability the scroll up and down freely through the scroll and only one page for the parchment. Also, the ability to change the graphics with a callscript.


Bug:
If you are using the default installation there is a problem displaying new images.
Because your script calls for graphics/books folder of the finished game folder it does not take into account when you update only the development folders.

Another explanation would be...

1. Downloaded your demo.
2. Created the Graphics/book folder in my common files/enterbrain/... directory.
3. Correctly installed script.
4. Correctly followed the instructions in making new books.
5. Put the appropriate files in the graphics/books directory.
6. Run test.
7. Read book *BUG* Only the background image is displayed.
8. Copy book images to the final build directory.
9. Run test.
10. Read book *BUG FIXED*

Sorry this is all so poorly worded. I'm pretty tired.

~Leqesai

*EDIT*
Awesome script, btw. It is a HUGE asset to my project.
SojaBird
@Hotspot
That's nice, I'll go and try that for ya.

@Legesai
Hey I can't realy understand what you meen, but I guess it has to do something with the new folder you create right? Should it work when I just changed the grapics/book to grapics/pictures (cause this is a standard folder allready?)

Though thanks for the comments and apreciation, I'll continue my work with this wink.gif
lahandi
Mmm...
I tried to downloaded the demo, but the link is broken (object not found)...
Maybe you could upload it again on mediafire...
SojaBird
Oke comming again...soon
SojaBird
Hey some little update (and sory if it is dubble post anyway),

I'll be making a vid or demo for this soon.
I've actualy allready started making the demo maps.
Though I actualy want to put in the new feature Hotspot told me, about the scroll thing. It shouldn't be that diffecult 4 me 2 do.

Anyway,
Ya can expect the new version at like 09-11 (9th of november that is)
Twilight27
Sorry for reviving this topic, but the demo link is broken =p
Can someone upload a new link or something?
SojaBird
hehe yea know, I'll do it in some time wink.gif

also I'll add a new feature, wich is called "read_a_scroll" hehe biggrin.gif
Twilight27
Ok cool then. I'll wait a while for it.
SojaBird
A small bump and update.

I hope I can start tomorrow on updating this script.
Keep 'n sharp eye for those who want the function "Read A Scroll" and all the other users of the script for some bug-fixes.
For those who didn't noticed the script earlyer when released. Have a look at it now and be inspired of what you can do with it.


Greatzz and see ya soon back here (tomorrow),
SojaBird.
SojaBird
UPDATE v2
- Read_A_Book! > Read
- No more stupid pagessize input, no more stupid .png or .jpg input!
- Read a scroll, instead of a book.
- Now a book/scroll can also be read without returning to the itemmenu.
- Sound setup disapeard!? (will not be included until request)
- More easy and shorter callscript functions.


ENJOY
SojaBird
Small bug fixed in new version 2.1.

The background wasn't disposed when you opened a scroll or book directly and not via an item. Now the background DOES go away biggrin.gif
SojaBird
update nr2 today

version 2.2 is launched
Some extra options are added..


Also remind me to update the how-to descriptions and all...I've to do that some time tongue.gif
vandelfan
Are you going to upload a demo soon?
I understand things better with a demo laugh.gif
SojaBird
Yep I will,

Though when I'm making demo's, I alway's come up with new ideas for the script biggrin.gif


Greatzz,
SojaBird.
buny
Where Must I put the book..?
how can we make the book in the scirpts??
where must and what must we insert in the event to read the book?
i don't see any demo here???? give me the link please with comment??
SojaBird
Hey Buny,

There's no demo jet...Though I try to finished it tonight (almost done).
For the call script event, just put the code read_book("name", *from_item) or read_scroll("name", *from_item) in there and it'll works.
For the name, just refer to the filenames wich all have their corrosponding number of page (starting with zero). The *from_item is optional. Set it to false/true (only use when it's not what you've set up in the script) if the thing comes from an item.
Though this feature will be excluded from the script in the next version. Their it'll automaticly scan if the code is executed from the item-database or not (put the code in the item-note for now).

I actualy want to refer you to the start page so that you can read the faq and how to use things. It's all there allready.


Anyway, come back soon.
Their will be a demo waiting for you to download wink.gif


Greatzz,
SojaBird.
SojaBird
BIG BIG UPDATE!!
Version 2.5 is ready to be downloaded.
The Demo is ready to be downloaded.
A screenshot has been added.



Greatzz,
SojaBird.



ps. Have a good look at the new call script functions:
CODE
read_book('name', *'back', *draw_style, *from_item)
read_scroll('name', *from_item)

#Values marked with a *star* are optional.
#The *from_value option is calculated by the script.
#If you want to use a stared option, all previous options must be filled.
somersaultsofa
Sorry if the answer is obvious, but could you not just do this with a regular picture?
SojaBird
Well some of the features that cover this scipt can be done with just a picture...THOUGH!!!
This script contains more than just showing pictures on the screen.
It has the ability to manage and merge multiple pictures together.
As well as scrolling through a big-nonfitting-picture when used as scroll.

Well actialy this script houses more functions than you think smile.gif
Check the first post and look thourgh the features and find out what an amazing script this realy is!! biggrin.gif


Greatzz,
SojaBird.
woahfish
thanks for the script, but the demo download place, er.. 2shared, is real confusing. it took me about ten minutes finding that 'save file to pc' link. it's so tiny!
exkabuto
sorry for very old bum but i cant hold myself anymore.
this "READ" script is the most astounding script i ever seen.
very suitable for my educational project.
thank you soo much SojaBird for this awesome creation!
i gonna use this to its fullest potential to teach my student.
may god bless you happy.gif happy.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.