ZMail - Sending you spam since 2013

Zalerinian

Jack of all Errors
Veteran
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

  • 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.
Reading Mail

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.
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

Added an option to have the mail visible through the main menu.
V 1.2.0 - May 5th, 2013

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.
V 1.1.1 - April 24th, 2013

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.
V 1.1.0 - April 22nd, 2013

* 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 1.0.0 - April 21st, 2013

* Initial release of the script

~ZF
 
Last edited by a moderator:

hyde9318

RMC Coordinator
Veteran
Joined
Apr 1, 2012
Messages
2,593
Reaction score
680
First Language
English
Primarily Uses
RMMV
Screenshots?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
So basically I could have events sending me mail at certain points in the game, and then I would just get some notification that I've got new mail, and it might contain clues to how to proceed in the game, or develop plot, or hint that there may be some bonus if I follow what the mail says, etc.
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Screenshots?
Sorry, getting to that!

Added them. I'm looking for opinions on how people think it should look, as it's very minimalistic right now.

So basically I could have events sending me mail at certain points in the game, and then I would just get some notification that I've got new mail, and it might contain clues to how to proceed in the game, or develop plot, or hint that there may be some bonus if I follow what the mail says, etc.
Yes, that's the idea.

Also, funny story, I forgot a colon in there for a symbol. Whoops~, let me fix that.

Fixed It. It shouldn't explode in your face now. Anyway, I was thinking, and I realized something. I should have included regex's for the things that you normally get, such as \V for variables, and the like. I'll add that into is tomorrow. 

But yes, Tsukihime, that's pretty much the entire idea. You can add the mail to be 'sent' to the player. As for a notification, the script doesn't do that itself, but it can tell you when a piece of mail is ready to be read. My idea for including that is kind of like the mailman in The Legend of Zelda: Twilight Princess. He just shows up and gives you the mail. You'd have to make that event yourself, but it can tell you that it's ready.

I'll improve on it tomorrow, thanks for any feedback :)
 
Last edited by a moderator:

OffeNDer

Veteran
Veteran
Joined
Jan 15, 2013
Messages
80
Reaction score
2
Primarily Uses
question:

we can use it like if player reach level 30, he will get email with code that can be used to claim the reward.. 

^ will this work!?

Thanks for this script
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
question:

we can use it like if player reach level 30, he will get email with code that can be used to claim the reward.. 

^ will this work!?

Thanks for this script
Yes, you should be able to, but i won't be able to verify it until i get home (Im in school currently)
 

ninjalex

Veteran
Veteran
Joined
Aug 15, 2012
Messages
252
Reaction score
55
First Language
English
Primarily Uses
Script looks great. I can see a lot of uses for this. 

I plan on downloading and testing it. :)
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
question:

we can use it like if player reach level 30, he will get email with code that can be used to claim the reward.. 

^ will this work!?

Thanks for this script
Yes, It will. Just put your condition in as "$game_actors.[](actor_id).level > 30"

Script looks great. I can see a lot of uses for this. 

I plan on downloading and testing it. :)
Thanks, I just updated the script. It now supports the control characters that you can use in a normal text box made by using the Show Text event command. How to use them is listed in the version history or the usage paragraph in the script.

If you have any more suggestions or requests for the script, please let me know :)
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
is there a scene where you can see the list of your 'mail' title. it's better if the mail layout have sender and mail title. like real mail. then in that scene we have list of the mail we have.

i'm currently writing EST - PHONE MENU. inspired by Necrozard Phone script. but i didn't really create the phone like him. but i change it to menu engine but look like phone. :D . the menu can call scene/common event. so people can customize their phone by linking the scene to the menu engine. it's almost finished. i planned to release it soon. so maybe i can link to your script for the 'mail' part :D . since i'm a little bit lazy to write my own mail system :D .

screenshot of phone menu :D

 
Last edited by a moderator:

Internetakias

RPG Maker VX Ace Noob :P
Member
Joined
Aug 26, 2012
Messages
67
Reaction score
8
First Language
Greek
Primarily Uses
Get read for an overly long suggestions post!

First of all, I'd really like it if you could attach presents to letters and stuff, as well as allowing the player to attach items of their own to recieved letters so he/she can use them as extra storage.

Second, it'd also be cool if the player could reply or write new letters to services or NPCs in the game, so they can later show you the letter you've send them (assuming it's an NPC) or/and reply back to it by letter (assuming it's a service or an NPC)
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Get read for an overly long suggestions post!

First of all, I'd really like it if you could attach presents to letters and stuff, as well as also allowing the player to attach presents to recieved letters so he/she can use them as extra storage.

Second, it'd also be cool if the player could reply or write new letters to services or NPCs in the game, so they can later show you the letter you've send them (assuming it's an NPC) or/and reply back to it by letter (assuming it's a service or an NPC)
that's not a long suggestion post at all, but I love it!

It'll take me a while to get this done, though, so for now, have this bug fix:

V 1.1.1

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.

Please re-download the script from the original post. Thank you :) .
 
Last edited by a moderator:

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
Now if you could have them send mail say from a notepad file or something else that would be cool.

Can they write back...LOL!
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Now if you could have them send mail say from a notepad file or something else that would be cool.

Can they write back...LOL!
If you really want, I can try to add support for adding mail via notepad file. It'll be your responsibility to keep the file hidden so they can't change it, though :p .

As for responses, it may be possible, but it'd require a lot more code. I suppose I can look into it after I make the next script on my list. I'm going to finish the next one (The one I'm currently working on), then I'm going to try to add some suggestions onto this, so I can look into that for you if you'd like.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
you could grab the note from txt files and then write it to rvdata2 files in data folder. so it will be encrypted.

(that technique is from Jet notebook menu which i also implement in my EST - NOTEBOOK SYSTEM)

if you want you could look at my EST - NOTEBOOK SYSTEM

http://pastebin.com/ryjyH2vK

just skip to class Scene_Title on how to convert the txt files to rvdata2. and in class Text_Reader - def start on how to load the files.

using that method. when we develop the game. we could change the txt files when we want to change what the mail said. then when we finish the game. before we encrypt the project. make sure to playtest it once so the rvdata2 is updated to the latest txt files. then delete all the txt files. then encrypt the game for the player. the player will access the rvdata2 files for the mail. and CANNOT change that since it's encrypted :D .
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
just skip to class Scene_Title on how to convert the txt files to rvdata2. and in class Text_Reader - def start on how to load the files.

using that method. when we develop the game. we could change the txt files when we want to change what the mail said. then when we finish the game. before we encrypt the project. make sure to playtest it once so the rvdata2 is updated to the latest txt files. then delete all the txt files. then encrypt the game for the player. the player will access the rvdata2 files for the mail. and CANNOT change that since it's encrypted :D .
I know how to load files, and that is a good idea, but I need to finish my console script first :p . I've run into a huge, huge issue with it though, so I'm not sure how long it will take. Thanks for your suggestion, though. I'll look into adding it in when I get the chance :)
 
Last edited by a moderator:

Internetakias

RPG Maker VX Ace Noob :P
Member
Joined
Aug 26, 2012
Messages
67
Reaction score
8
First Language
Greek
Primarily Uses
that's not a long suggestion post at all, but I love it!

It'll take me a while to get this done, though, so for now, have this bug fix:

V 1.1.1

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.

Please re-download the script from the original post. Thank you :) .
Alright, in case you didn't realise, I copypasted my suggestions from Animal Crossing's mailing system which works exactly like the suggestions I made.
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
No, I didn't know that. I haven't played animal crossing. Thanks for the suggestion anyway, i should be able to start working on it tomorrow or Wednesday.
 

MyLordRobinson

Emperor of Carnelia
Veteran
Joined
May 13, 2012
Messages
881
Reaction score
84
First Language
English
Primarily Uses
Is there any way to clean up the font?
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
What do you mean by clean up the font?
 

MyLordRobinson

Emperor of Carnelia
Veteran
Joined
May 13, 2012
Messages
881
Reaction score
84
First Language
English
Primarily Uses
In your screenshots, the font is really close together.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top