Sunday

Mailbox overlay coding

   
In my previous visual novel I made, I featured the mailbox messaging system. Again I am bringing it back to help provide more interactivity and flavour to the atmospheric feel and narrative. Below is the coding used to implement this feature. It displays the mailbox gui and sends that following message into the inbox of the mail system. It is very useful in creating news or logs.

Python coding is the coding language that Ren'Py uses which is quite simple to learn but very tedious to fix if there is the slightest error within the coding. I luckily have a friend that is very fluent with both Python and Ren'Py, so he has provided me with a lot of one on one tutorials and advice in structuring the code of my visual novel.




-----------------------------------------------------------------------------------------------------------


    $ mail = []
    $ mail_later = []
    $ mail_queue = []
    $ contacts = []

    "Ah, she was right. I can access my HoloTab."
   
    show screen mailbox_overlay
   
    $ add_message("Regium Tribute", "Kingdom Newsflash",

"Since the unification amongst the nordic countries of Sweden, Norway, Finland and Denmark, the United Nordic Kingdoms have established a dominance as a global superpower. The Union of Italy has sent a regium envoy to the UNK's Empress Ulpiana I. Hoping to strengthen ties and deter the aggression of the Russian Federation and the United States. " +

     " {i}-=-Subscribe to KN today.-=-{/i}")

-----------------------------------------------------------------------------------------------------------