hack

Simple scene library for Ren'Py

While some visual novels offer a way to play back scenes after completion of the game, Ren'Py doesn't offer a scene player in its standard menus. However, it is possible to add such a feature, as the code here demonstrates.

  1. # Copyright (c) 2010 Karl Knechtel, Chris Charabaruk
  2. # Licensed under the zlib/libpng license
  3. # see http://www.opensource.org/licenses/zlib-license.php
  4.  
  5. # Documentation is in-line with the source, or visit
  6. # http://labs.coldacid.net/code/simple-scene-library-renpy
  7. # for further details.
  8.  
  9. init python:
  10.    
  11.     # show_scene_ actually plays the scene, show_scene lets us use it
  12.     # from a button.
  13.     def show_scene_(scene_id):
  14.        
  15.         # Put a halt to music, in case the scene starts without any
  16.         renpy.music.stop(fadeout=0.0)
  17.        
  18.         # Now we actually star

Automatic directories for audio in Ren'Py

This is an idea I had for Ren'Py, which saves visual novel developers from having to type out a complete path for any music, sound or voice files they want to play in their project. If implemented, it will make for less cluttered project directories and less redundancy in play and queue statements.

  1. # No code yet, may add later

Anti-Telus filter

A Perl script which removes the tag added by Telus in mobile e-mail, so that various services can work properly when using mobile e-mail from a Telus phone.

  1. #!/usr/bin/perl
  2.  
  3. $user = 'REDIR@EXAMPLE.ADDRESS';
  4. $pass = 'PASSWORD';
  5. $host = 'POP3.SERVER.ADDRESS';
  6.  
  7. %redir = (
  8.     'sender@example.address' => 'reciever@example.address'
  9. );
  10.  
  11. $sendmail = '/usr/sbin/sendmail -t';
  12. #DEBUG $sendmail = 'cat >>test2.txt';
  13.  
  14. use Mail::POP3Client;
  15.  
  16. # connection
  17. $pop = new Mail::POP3Client(HOST => $host);
  18. $pop->User($user);
  19. $pop->Pass($pass);
  20.  
  21. $pop->Connect() >= 0 || die $pop->Message();
  22.  
  23. # loop through messages
  24. for ($i = 1; $i <= $pop->Count(); $i++) {
  25.     %head = ();
  26.  
  27.     foreach ($pop->Head($i)) {
  28.         /^(From|Subject|Content-type):\s+(
Syndicate content