Project Update: Rolling On

I’m working on the roll system. It’s taken me a while to get happy with my design document for rolls, which I’ve entirely scrapped several times because it doesn’t work nicely with XMI and the action outcome functionality. I think this most recent version, however, will be more friendly and have a better outcome. I still haven’t made much progress on implementing prepared statements, either, but I did get sidetracked into working on an XML editor, which I’ll include the very unfinished code for (i.e. doesn’t edit, doesn’t handle all the child nodes like the final version will, but can write new blank files and directories as well as load up finished XMI files) in the next release.A brief note: XMICAE has had working random number generators since day two of development. The roll system I’m currently working on is a middle-man for XMI functions that allows for randomness in narrative elements.

The rolling module I’m working on is perhaps the most complex part of XMICAE so far, and may very well be the most complex module of XMICAE for the foreseeable future. It merges three action and XMI prompts into a single module (these are stored as xmipromptroll# and actionpromptroll#, then referenced in a single rollprompt that simply contains the success, failure, and universal outcomes for each roll). Players usually get to sign off on the skill test (making the roll themselves), with the option to return back to the previous XMI file that was loaded, but adding the <rapid /> element to a roll will cause it to bypass this, taking effect transparently (unless there is a notification that pops up with the roll).

The roll system utilizes a number of functions for maximum control. Rolls are a special sub-object type similar to actions. They implement an additional variable that tracks the XMI file that they came from, so you could have the same roll two places. Due to the incredible potential length of a single roll, which can be equivalent to three actions and some pocket change, you can also load a roll from file, which functions identically to loading any other XMI document but allows for recycled rolls. There will be a part in Act 1 that utilizes this feature to allow a character to search for a cave. Potentially, one could add specific sub-requirements for each of the criteria in the roll, allowing certain successes only in certain cases, but that’s a post-1.0.0 feature, and I’m not even sure if it has any use in the wild. Successes by margin also should be added eventually, but I don’t need them for my purposes and I want to get as much functionality done so I can work on the SQL prepared statements for 1.0.0, so they’ll be for another day.

Rolls can have the function to be used defined for each roll using an element for this purpose, or you can simply leave this unused to utilize the default roll.

Leave a Reply

Your email address will not be published. Required fields are marked *