The main file ( Event Handler class, Lexer system and even an Information Screen )
A sample script.rpy with a very basic game showcasing some of the features available Some Notes on the Sample Script file
Please let me know if the font size in the Info Panel (click top left button) is iffy... I think I altered font sizes in gui.rpy and did not include that
This is a drop-in script that runs itself in the background and allows inline Ren'py-esque code to manage the instantiation of the handler and subsequent registering of labels as events.
It basically allows you to do:
Code: Select all
# Minimal Sample Script using very few features and relying mostly on default values
label start:
# Initialize the Event Handler
event setup:
start = "7:30 Apr 1"
"It is [event_handler]"
# this would actually output 'It is 07:30 on Monday the 1st April'
return
label an_event:
event register:
hour range(8, 11)
weekday "Monday" "Tue" "Wed"
repeat 3
"Ooh, this label has been registered as an event"
event time "1 hour 30 mins"
"Ooh, time passed... it is now [event_handler]"
There are numerous facilities available to tweak the handler to just about any situation wanted, most supported through simple lexer based input, including:
- Setup: Define start moment, the default step, weekday names, month names and lengths
- Setup: Define input and output string formats to use as defaults
- Event: Register conditions, including: Minutes, hours, days, months, set timespans, external functions, minimum repeat intervals, maximum repeats
- Event: Test validity. Get all valid. Get duration until next valid. Get reasons why it failed tests.
- Time: Advance the internal minute, manually or automatically
- Log: Retrieve logging output and interpreted values for both the handler setup and any named label
Setting up the handler
(input variables, syntax etc)
Registering a label as an Event
(input variables, syntax, advanced features)
Testing Events
Advancing Time
Additional Features / Further Information
FAQs
(and maybe answers too)
Caveats and Todo List (an overview of what needs doing)
- Proper translation support
# Currently it lists 'event setup:' as a
# translatable... Also need weekday/month
# names to import/register using English
# then output using pref language
- Lexer alter event code
# Mostly there, just not tested and could do
# with syntax changes
- Lexer lint sanity
- Clean up the screen code
# Eww, it is nasty
- Refactor class to use event classes and
# those event classes to use test classes
# for sectors like time, functions, etc
- Integrate refactoring with lexer - might
# mean initializing in a python early though