Creating Preferences and Dynamic Clothing for Inform 7

I have created a couple of extensions that I am preparing to release for use in Inform 7 and I thought I would mention them here. One is AIF-related and the other semi-related: Preferences, and Dynamic Clothing. In deference to the Code of Conduct I will not link directly to them here, but I will provide a link to my blog (which already has a 18+/NSFW warning on it).

First: I want to set them up on GitHub, but I am not conversant with the development lingo. Is there a repository I should locate? How do I get this set up for others to use/peruse?

Second: these are the two extensions, if anyone is interested:

Preferences is an extension that reads in a file that specifies a variety of the user’s preferences that govern specific types of sexual content, including the starting sex and orientation of the player and whether the player prefers to opt out of other specific activities found in AIF. It also contains a routine to verify whether the game can accommodate all of the user’s preferences and, if it cannot, lists the offending material in a neutral way and asks if the player wishes to proceed. Authors can use this to determine what the player enjoys (or allows) and to skip over material the player objects to. It is designed to help elicit the user’s preferences in a manner that is divorced from a game context, as some users attempt to meta-game their responses when asked within a game. (For instance, the NPC Sally might ask if the player enjoys XYZ, but the player chooses to respond the way he imagines his character would — “I can’t tell her that!” — rather than with what the player himself wishes.) Comes with a stand-alone Inform app full of menus that writes the preferences file.

Edit 1: Here is the link to where you can get the stand-alone Preferences app. Warning: blog is marked NSFW and may contain adult material. This is the app that allows preferences to be saved.

Edit 2: Here is the link to where you can download the Preferences extension in plaintext form. This is the extension that you can include in a title. It is also hosted on my blog and the same warnings apply.

Dynamic Clothing
A large extension that permits the user to define the human body by a number of variables (height, muscle, fatness, shoulder and hip width, breast size, among others), by which other features are calculated (waist size, body weight, etc). A number of clothing types are defined that cover various areas of the body. The author can make use of an automatic description that describes the character by a number of factors (such as body shape and what the character is wearing), and organized by what is most unusual or exotic about that character (nakedness, very tall, very fat, old person with young-looking hairstyle, exotic eye color, etc). The author can define what is considered exotic for his purposes. Certain body types provide a real-world comparison reference, likening the character’s physique to someone similar like Scarlett Johansson, Brigitte Nielsen, Hugh Jackman, and so on.

Clothing is layered and sized. Only visible items are listed. An examination of specific regions of the body (e.g., arms, chest) are generated dynamically. Also includes hair styles, hair colors, eye colors, skin tones, ethnicity and nationality, tattoos/scars, facial hair, pregnancy, fabric types (including armor, transparent and see-through layers like mesh and open weave) and fabric colors. Also allows for the ability to define pronouns based on apparent gender (masculine or feminine hairstyle, height, muscles, shoulder width, breasts, etc) for a character whose true gender is not known to the player. Pursuant to this feature it is possible to stuff both bras and underwear to create the illusion of a different apparent gender (commands are included to allow the player to do this also).

This is not an app specifically for AIF, although it could have applications along those lines. There are other features not yet completed, including the ability to have dyed hair with roots showing and fabrics that become translucent when wet, as well as other features too numerous to mention here. I do not yet have a blog post prepared for this extension.

Edit 1: I’m mostly looking for assistance getting GitHub up and running so I can share these, but if you have clean and family-friendly implementation questions about the extensions, just ask. If your question isn’t G-rated, then send me a PM here or on my blog.

Edit 2: If you want to see what Dynamic Clothing does, you can check out a proof-of-concept “game” here. All the descriptions of the characters are produced dynamically by the extension. The game code only defines the characters and their wardrobes.

Here is a link to my blog where a sample proof-of-concept “game” using Dynamic Clothing can be found. It’s just a couple of rooms, a bunch of characters standing around, and some clothing to try on. All the descriptions are procedurally generated by the extension.

The usual warnings apply about NSFW content. The blog itself has a warning as well. However, the game itself and the extension are not specifically designed as adult content.

The extension itself will be released in due course, when I have finished a few tweaks and wrangled together some documentation on how to use it.

If anybody has any advice for me about getting set up on GitHub, I’d appreciate it.

You can create a github account and then create a repository for your extensions. Or you can create one repository for each extension. I don’t think it matters for small items like extension files.

There is an I7 “organization” ; I believe Dannii has to add you to that.

Z-machine has the Tandy bit and TAVERN has feature code 99, which can be used for censorship preferences, although I don’t know how much they are used, and they clearly don’t do all of the stuff you wanted anyways; also, Glulx lacks this feature.

Another way could be to use X resource database, for more sophisticated user preferences; the story can include its own defaults, and they will then be overridden by the user by whatever method the interpreter supports (possibly by using a X resource file which the interpreter will load).

My implementation of Preferences uses 3 tables: one for the player’s preferences that are saved to disk and loaded in; an identical set of columns where the game specifies what content it includes; and a default table defined by the author that is used, for his game only, when the player’s own preference file cannot be found (that is, if the player did not previously declare his preferences and may be unaware of the game’s content).

The extension allows the author to restore in the preferences from disk into the player table; if it cannot find them, it automatically copies over the default values instead — in memory only, not to disk. Only the stand-alone app writes a new prefs file to disk. (That way, one game isn’t going to set the default preferences file for all games to come.)

Player prefs are stored as a .glkdata file.