- Joined
- Dec 17, 2012
- Messages
- 4,696
- Reaction score
- 935
- First Language
- English
- Primarily Uses
- N/A
ZMail V 1.3.0
By: ~Zalerinian
I will be rewriting this script when I have the time, as this was made a long time ago, and can be rewritten to be significantly neater and better. There is currently no ETA on a completion time.
Introduction
ZMail is a script that will let you send mail to the player. You can add mail to the mail file at any point in the game. It is a lightweight script, it is highly unlikely that this will be the source of any lag. This script is "plug 'n play", but you need to manually add the mail to the mail file, as it will not do this for you.
Features
Usage:
Reading Mail
Call the scene for reading mail by using SceneManger.call(Scene_ZMail)
Screenshots
Download:
Due to the size of the script, please get it here: http://pastebin.com/raw.php?i=ydTk2hPd
FAQ
-None! No one has asked anything yet!
Crediting and Usage
You ARE NOT required to credit me for this script. You may also use this in both commercial and non-commercial games alike. All I ask is that you do not take credit for the creation of the script.
Authors Notes
I am looking for some recommendations on the UI portion of the script, as well as any other ways you think I can make this more useful to you.
Thank you for your interest in my script
Update History
V 1.3.0 - May 10th, 2013
V 1.2.0 - May 5th, 2013
V 1.1.1 - April 24th, 2013
V 1.1.0 - April 22nd, 2013
V 1.0.0 - April 21st, 2013
~ZF
By: ~Zalerinian
I will be rewriting this script when I have the time, as this was made a long time ago, and can be rewritten to be significantly neater and better. There is currently no ETA on a completion time.
Introduction
ZMail is a script that will let you send mail to the player. You can add mail to the mail file at any point in the game. It is a lightweight script, it is highly unlikely that this will be the source of any lag. This script is "plug 'n play", but you need to manually add the mail to the mail file, as it will not do this for you.
Features
- Create mail and send it to the player based on certain conditions.
- A self-resizing window that will try to fit your text.
- Conditions and content are editable.
- Name the mail
- Let the player choose to keep it or to discard it.
- Get the readability state for a key so that you can use an event or other way to notify the player.
Usage:
* To add mail to the list:
* ZMail.add_mail(key, message, condition(s), name, attachments, sender)
* 'key' The way you access the mail.
* 'message' The message content.
* 'condition(s)' The test run for the mail. This should be an array of
* string. Editable.
* 'name' The displayed name of the mail. Editable. Default: Null_Name.
* 'attachments' is an array of strings that will give the player items.
* Items need to look like: "001|5". This will give the player 5 of item 1.
* Leading zeros are optional. "1|5" works the same.
* 'sender' is a string representing who sent the mail.
*
* To change the conditions of a piece of mail:
* ZMail.edit_cond(key, condition, check)
* 'key' The key for the piece of mail. 'condition' The conditions that
* determine readability. This should be an array of strings
* 'check' is a true or false value that will determine if you want to
* check the conditions immediately.
*
* To change the display name of a piece of mail:
* ZMail.rename(key, name)
* 'key' The key for the piece of mail. 'name' is the displayed name.
*
* To add more to a piece of mail:
* ZMail.add_to_mail(key, space, mail)
* 'key' The key for the piece of mail. 'space' True or false value. If
* true, a space will be inserted between the end of the previous entry
* and the beginning of the addition. 'mail' is the additional text.
*
* To see the contents of the entire mail file:
* ZMail.dump_mail_file
* Will print out the contents of the mail file to the console. This is
* not visible without using a console.
*
* To wipe the mail file and create a new one:
* ZMail.init(true)
* Call the init method with true as its parameter. This will force-create
* a new mail file. There is no chance of recovery after using this.
*
* To let the player read the mail:
* SceneManager.call(Scene_ZMail)
* The above script call will run the ZMail scene.
*
* To find out if a piece of mail is readable:
* ZMail.is_readable(key)
* This will return true or false, true for readable and false for not.
*
* To change the attachments later in the game"
* ZMail.edit_attachments(key, attachments)
* 'key' is the key associated with the mail.
* 'attachments' is an array of strings using the same format as add_mail.
* To get a list of the attachments on a piece of mail:
* ZMail.get_attachments(key)
* 'key' is the key associated with the mail.
* To clear the attachments off of a piece of mail:
* ZMail.wipe_attachments(key)
* 'key' is the key associated with the mail.
* To get the sender name of a piece of mail:
* ZMail.get_sender_name(key)
* 'key' is the key associated with the piece of mail.
* To change the sender's name of a piece of mail:
* ZMail.edit_sender(key, name)
* 'key' is the key associated with the piece of mail.
* 'name' is the new name to be given.
* To use Control Characters in your mail:
* The available Control Characters are:
* \\V[#] where '#' is a number. This will display the value of
* the variable in the brackets.
* \\P[#] where '#' is a number. This will display the display
* name of the #th actor in your party.
* \\N[#] where '#' is a number. This will display the display
* name of the #th actor in the database. Do not use leading 0's.
* To use these, make sure you put two backslashes before the letter.
* If you do not, the character will NOT be converted. This is an issue
* with the Ace engine.
Call the scene for reading mail by using SceneManger.call(Scene_ZMail)
Screenshots
Page one of ZMail's 100% legitimate history. *** OUTDATED ***
Page 2, still entirely real.
After you finish a piece of mail, it will display the first page (or only page if that's all there is) and display this menu.
(After you archive the mail the 'keep' option is not displayed, as you have already kept it.)
It is a bit minimalistic, but I plan to change it based on how people would like to see it most, as well as possibly include a few layouts for more diversity.
Page 2, still entirely real.
After you finish a piece of mail, it will display the first page (or only page if that's all there is) and display this menu.
(After you archive the mail the 'keep' option is not displayed, as you have already kept it.)
It is a bit minimalistic, but I plan to change it based on how people would like to see it most, as well as possibly include a few layouts for more diversity.
Due to the size of the script, please get it here: http://pastebin.com/raw.php?i=ydTk2hPd
FAQ
-None! No one has asked anything yet!
Crediting and Usage
You ARE NOT required to credit me for this script. You may also use this in both commercial and non-commercial games alike. All I ask is that you do not take credit for the creation of the script.
Authors Notes
I am looking for some recommendations on the UI portion of the script, as well as any other ways you think I can make this more useful to you.
Thank you for your interest in my script
Update History
V 1.3.0 - May 10th, 2013
Added an option to have the mail visible through the main menu.
Added the ability to attach items or money to mail. See above.
Mail names can now be changed. See above for details
A sender's name can now be specified, and will be displayed on top of the mail. You can enable/disable this.
Fixed an issue where mail with multiple pages would cut off early.
Fixed players being able to return from a piece of mail before deciding whether or not to keep it.
Mail names can now be changed. See above for details
A sender's name can now be specified, and will be displayed on top of the mail. You can enable/disable this.
Fixed an issue where mail with multiple pages would cut off early.
Fixed players being able to return from a piece of mail before deciding whether or not to keep it.
Fixed several bugs dealing with saving. The script now properly saves when you delete a piece of mail, archive one, or edit it with a script call.
* Added support for Control Characters:
\V
\P
\N
\G
In order to use these, use two backslashes when adding the piece of mail. Not doing so will cause the control character to be displayed simply as 'V[1]', or 'P[1]'. To display a normal backslash, you need to put in four in a row into the file. This is due to how Ace will input the mail into the mail file.
\V
\P
\N
\G
In order to use these, use two backslashes when adding the piece of mail. Not doing so will cause the control character to be displayed simply as 'V[1]', or 'P[1]'. To display a normal backslash, you need to put in four in a row into the file. This is due to how Ace will input the mail into the mail file.
* Initial release of the script
~ZF
Last edited by a moderator:


