XaiJu
Zaggy Norse
Zaggy Norse

patreon


Using the Porn Director

The Porn Director (PD) is a feature introduced in build 0.6 to enable dynamic content delivery in Lord of the Manor. It also allows people - you! - to create your own content to run inside the game for others to enjoy, with some limitations. The PD can only serve up content from after the end of the game as it stands in build 0.5; you cannot use it to create an entirely standalone experience. It may also have some bugs currently; it has a lot of options, and I have not used all of them fully myself, thus they have not all been tested. You are encouraged to report anything you think is a bug, and I will fix it as soon as I can replicate it.

Note: using the Porn Director requires you to create content in .rpy format. Thus, you will need some understanding of Ren'Py in order to make use of it. You can begin that journey here: https://www.renpy.org/doc/html/quickstart.html

How It Works

The PD is a state machine that uses heuristics to select content to show from a pool of available content. Such content is injected into the PD with a Python function call (which should be executed in an init 1 python or python early block):

register_content(label, **kwargs)

On each loop, the PD generates a set of eligible content from the full set of registered content, calculates a weighting for the content based on factors including certain player choices (only really relevant for official content) and prior content seen, and then picks one item at random from the set. The content executes to completion, and control then returns to the PD and the process continues until there is no more eligible content, at which point the "To Be Continued" screen is shown and the game ends.

The label parameter is the only required parameter. It must be a string corresponding to a global/local label pair inside the game (inside the content you're creating, typically). An example is "foo.bar". A local label MUST be part of the provided label to enforce local label use and reduce the chance of a name clash.

The global label you choose should be chosen to be unique; if your global label ends up clashing with another down the line, the PD's behaviour is undefined. When the PD executes your content, it does so by executing a renpy.call() to the label you provide. When a return statement is reached, control returns to the PD. Failure to include a return statement will result in the game ending prematurely.

Labels are also used to determine what series some content is part of. Content that is part of a series is given a greater weighting against non-series content if the player has previously played one or more chapters of the same series. So if you register two pieces of content as "foo.bar1" and "foo.bar2", they will internally be considered part of the series "foo". You will also need to define label dependencies for them to always play in the correct order, but for that see the next section.

Additional Arguments

There is also a large number of optional parameters to the content registration function, the main ones of which are documented here:

title: the title that will be shown for the content in the DLC menu. Defaults to "Untitled Content".

description: a short piece of text that will show under the title on the DLC menu. Defaults to "No description provided."

kinks: a solely descriptive set of strings that will be shown underneath the description on the DLC menu. Kinks must be all lowercase and use spaces, not underscores, eg: ("moaning", "size difference"). These kinks are not shown or considered for the Kinks filter in the Options menu. Defaults to "set()"

dependencies: a data structure defining the content that this content depends on. Content will not be considered eligible until its dependencies have been played (or it has no dependencies). A dictionary with two properties, "any" and "all". Both are sets of strings corresponding to labels. Either or both can be provided, but all requirements must be met for eligibility. Defaults to {"any": set(), "all": set()})

fitness: a custom function called with two parameters, the director state and the currently active kinks, to allow content to self-reject itself if some condition is not met. The director state primarily gives access to a "played" set, which is a set of all labels the director has previously invoked. Defaults to None.

author: the name of the author of the content. Not currently shown. Used to determine official content. Defaults to None.

version: the version of this content, shown at the end of the description on the DLC menu. Allows users to determine if they have a newer version of some content or not. In future versions of the game, the PD will automatically detect multiple clashing versions of the same content and use the newest version. Defaults to None.

Loading Content

Once you have created your content and any associated media, you need to make it available for users to download (probably as a zip). It must be packaged in such a way that extracting it to the /game folder of someone's LotM installation will place the .rpy files at the top level, with all other required files also present. Starting the game should then make your content appear in the DLC menu, and turning it on before loading a v0.6+ save should begin executing it as defined. As this content is entirely up to you, you may include anything a Ren'Py game includes: custom backgrounds, music, sprites, and so forth. You may use backgrounds from the game itself, but the names of these are subject to change and will not be documented yet.

Disclaimer

While I hope people might enjoy the PD for the creation of fan fiction and such, it is primarily intended for enabling Lord of the Manor to function. Until such a date as the 1.0 release, I reserve the right to modify how the PD functions (including function names, arguments to functions, and limitations on what such custom content can do) without prior warning or explanation. Any changes to the PD will be noted in the changelog in each version.


More Creators