Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> +Advance Text Reader+ version 1.0, *Text File Reader + Easy Text Decoration!!
woratana
post Feb 16 2008, 11:34 PM
Post #1


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




Advance Text Reader
Version 1.0
by Woratana
Release Date: 16/02/2008


Introduction
This script will allow you to read text file,

and decorate it to make text more interesting! smile.gif


Features
CODE
+[Features in Version 1.0]+

** Start Read Text File by call script:
$scene = Text_Reader.new("filename with file type")

** Custom Folder for Text File
You can change Text File's folder at line:
TEXT_FOLDER = "folder you want"


Screenshot


This is text file I used for this screenshot:
CODE
[cen][b]Show Text in Center

[/b]No Bold Text here!! *O*
[i][right]Try italic text...
[left][b]Italic with bold ^w^

[cen]Advance Text Reader
by
[/i]Woratana
[b][woratana@hotmail.com]



Script
Place it above main.

Version 1.0
Attached File  advtextreader10.txt ( 5.14K ) Number of downloads: 447


Instruction

QUOTE
** Start Read Text File by call script:
$scene = Text_Reader.new("filename with file type")

* For example, you want to read file "test.txt", call script:
$scene = Text_Reader.new("text.txt")

* If your text file is save as UTF-8 encoding
(This encoding is for other languages)
You have to call script like this:
$scene = Text_Reader.new("filename with file type",1)

** Custom Folder for Text File
You can change Text File's folder at line:
TEXT_FOLDER = "folder you want"

"" << for no folder, text file should be in your game's folder.
"Files/" << for folder "Your Game Folder > Files"
"Data/Files/" << for folder "Your Game Folder > Data > Files"


CODE
+[Configuration]+

OPEN_SPEED = Speed when Reader Window is Opening/Closing
SCROLL_SPEED = Speed when player Scroll Reader Window up/down

TEXT_FOLDER = Folder for Text Files
e.g. "Data/Texts/" for Folder "Your Project Folder > Data > Texts"


CODE
+[Decorate Text]+

You can decorate your text by following features:

[b] << Bold Text
[/b] << Not Bold Text

[i] << Italic Text
[/i] << Not Italic Text

[s] << Text with Shadow
[/s] << Text without Shadow

[cen] << Show Text in Center
[left] << Show Text in Left side
[right] << Show Text in Right side

* Note: Don't put features that have opposite effects in same line...
For example, [b] that make text bold, and [/b] that make text not bold

* Note2: The decoration effect will be use in the next lines,
Until you use opposite effect features... For example,

[b]text1
text2
[/b]text3

text1 and text2 will be bold text, and text3 will be thin text.



Author's Notes
Free for use in your non-commercial work if credit included. If your project is commercial, please contact me.

Please do not redistribute this script without permission. If you want to post it on any forum, please link to this topic.


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies (1 - 16)
Endzeit
post Feb 16 2008, 11:53 PM
Post #2


Level 6
Group Icon

Group: Member
Posts: 80
Type: Event Designer
RM Skill: Skilled




Ooooo this is nice. Something you could add is... oooohh the I don't know how to put it..... 'Block Recognition.'??? lol Like have the script be able to select a specific block within the text file. A search I guess.

like

[block=1]
<text reader stuff>
[/block]

then search for block 1. *shrug*

This post has been edited by Endzeit: Feb 16 2008, 11:54 PM


__________________________




"All that's left are my memories, pictures of unworried days. But no ones there to save my legacy. It will perish; fade with me..."
Go to the top of the page
 
+Quote Post
   
Denko
post Feb 16 2008, 11:54 PM
Post #3


Level 4
Group Icon

Group: Member
Posts: 48
Type: None
RM Skill: Undisclosed




I'm confused... what exactly does this do?
Does it display a text file in the game?
Go to the top of the page
 
+Quote Post
   
woratana
post Feb 17 2008, 12:09 AM
Post #4


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




@Endzeit
Ah, that's hard =[]@!

(Not really smile.gif, but it's just not so easy.)

Nice Idea! Thanks

@Denko
Yep, display text file in game, and you can decorate it to make a better look laugh.gif


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
shaman666
post Feb 17 2008, 05:26 AM
Post #5


Level 2
Group Icon

Group: Member
Posts: 26
Type: Event Designer
RM Skill: Advanced




that's an amazing script
you should make something that writes on a file, and make the window size customizable

I would probably use on my project if those worked
like some kind of in-game notepad... would be amazing


__________________________
Go to the top of the page
 
+Quote Post
   
Diedrupo
post Feb 17 2008, 03:27 PM
Post #6


Level 10
Group Icon

Group: Revolutionary
Posts: 150
Type: Event Designer
RM Skill: Undisclosed




Question, since it is reading from text files, does it work if the project is encrypted? I remember that this sort of thing failed in RMXP because text files would be within the encryped rgssd file and the game could not access them.
Go to the top of the page
 
+Quote Post
   
woratana
post Feb 17 2008, 04:29 PM
Post #7


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




@Shaman666
Window customizable will not be hard, but to make notepad in game needs pretty much work smile.gif

@Diedrupo
That's good point.

I tried that with this script in RMXP version (because I cannot encrypt project in VX trial), and it works fine.

When you encrypt project, text file will not include in rgssad file, so the game will be able to read it laugh.gif


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
lahandi
post Feb 18 2008, 02:51 AM
Post #8


Level 8
Group Icon

Group: Revolutionary
Posts: 111
Type: Artist
RM Skill: Skilled




Mr. Warotana, this is great. This is what I'm looking for. But I cant try it now.

I wonder, how you create a wide and tall message window like that (is it autofit)? And is it automatically in the center of the game screen if we call the script ($) ?


__________________________
Go to the top of the page
 
+Quote Post
   
Rory
post Feb 18 2008, 04:30 AM
Post #9


GFX Pro
Group Icon

Group: +Gold Member
Posts: 409
Type: Artist
RM Skill: Skilled




Hey, nice script. It could come into good use.


__________________________

THE SAVAGE NYMPH
Note: this is Magdreamer, I'm using my real name for my forum name now.
Go to the top of the page
 
+Quote Post
   
woratana
post Feb 18 2008, 06:35 PM
Post #10


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




@lahandi

It's not message window, and it will always in screen size. (544*416)

Because of it's not message window, so you cannot use the features in normal message window tongue.gif.

@Magdreamer

Thanks smile.gif


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
spazta666
post Mar 20 2008, 04:10 AM
Post #11


Level 2
Group Icon

Group: Member
Posts: 15
Type: Scripter
RM Skill: Beginner




sorry for a semi-bump, but does this script get rid of the B button in-game? cos now when i test i cant access the menu (0/B button) ? just a Q

~Spaz


__________________________
Go to the top of the page
 
+Quote Post
   
woratana
post Mar 20 2008, 10:04 AM
Post #12


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




I don't think so.

Try take out this script from your game and see if you can use B now.


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
spazta666
post Mar 20 2008, 10:44 AM
Post #13


Level 2
Group Icon

Group: Member
Posts: 15
Type: Scripter
RM Skill: Beginner




nah dw, i fixed it, Was nothing to do with the script, Just something non scientists would call a coincidence.

~Spaz


__________________________
Go to the top of the page
 
+Quote Post
   
Guest_From_Ariel_*
post Mar 21 2008, 02:13 AM
Post #14





Guests





If I had A very large text file can this message display system auto scroll the text up the screen so this could be used to display an intro story to the game or end credits?

If that feature doesn't exist could you add that functionality maybey a command like

auto scroll = (0 - 100)

You could put this in the text file possibly even several times if you wanted it to speed up and slow down for some reason


1 being so slow it barely moves and 100 being so fast you can't read it?


Also while I'm at it could you add a pause command that waits for the action button to move again?


Thnx just another freindly suggestion for you Wortana biggrin.gif rolleyes.gif thumbsup.gif

wub.gif Ariel
Go to the top of the page
 
+Quote Post
   
Guest_From_Ariel_*
post Mar 21 2008, 03:09 AM
Post #15





Guests





I reread the script and realized i think it can scroll

just an fyi re: encrypted files....... this is from the help

Possibly you could set a config flag in the script

encrypted = true / false

if true it uses load_data instead of file open

load_data(filename)


Loads the data file indicated by filename and restores the object.

$data_actors = load_data("Data/Actors.rvdata")
This function is essentially the same as:

File.open(filename, "rb") { |f|
obj = Marshal.load(f)
}


However, it differs in that it can load files from within encrypted archives.

save_data(obj, filename)
Saves the object obj to the data file indicated by filename.

save_data($data_actors, "Data/Actors.rvdata")

This function is the same as:
File.open(filename, "wb") { |f|
Marshal.dump(obj, f)
}



it is defined as a counterpart to load_data.


Ariel

This post has been edited by From_Ariel: Mar 21 2008, 03:39 AM
Go to the top of the page
 
+Quote Post
   
Senpuu
post Apr 1 2008, 01:21 AM
Post #16


Level 1
Group Icon

Group: Member
Posts: 14
Type: Developer
RM Skill: Beginner




Good one, Woratana! biggrin.gif I have some suggestions, if that OK with you. Maybe you can make the window transparent, and the text can scrolled automatically just like From_Ariel said. smile.gif


__________________________
Reppuu! Shippuu!! Senpuu!!!
Go to the top of the page
 
+Quote Post
   
Michael
post Jan 24 2009, 06:44 PM
Post #17


Level 33
Group Icon

Group: Revolutionary
Posts: 838
Type: Writer
RM Skill: Skilled




Yay!
Worked, thanks man I really need it!
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 21st May 2013 - 08:14 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker