Making the Model of a Body for Inform 7

I want to make a body model and Im not really sure where to start, but I want to make a model detailing the different parts of the body, and yes, I kinda want it to be Adult. So for Inform 7 if anyone has any help for it that would be great

In very general terms, just for the sake of getting started, you can create objects that are parts of other objects, and if those “other objects” are the NPCs (or, for that matter, the PC), well, that works fine. For instance, you can do this:

The player is a man called Bob. A hand is part of Bob.

This lets the story know that the PC has a piece called a hand, and that the hand is attached, and that when Bob goes to another room, why, so does his hand. It does not automatically get you any hand-like behavior, though; you have to write your own rules for that.

If you want to make universal declarations that apply to every person in the game, you can say things like

A hand is a kind of thing. A hand is part of every person.

Juanita is a person. The description of Juanita's hand is "Juanita has beautifully manicured nails.".

Note that you have to make it “a kind of thing”; you cannot create a single hand and attach it to everyone. This makes sure that every time you create a character, you also create another object, [name of person]'s hand, at the same time.

Again, Inform doesn’t “know what a hand is”, just that (if you’ve used these lines) every person has an object called that person’s hand. You have to write rules to implement whatever’s going on with hands.

If that was new syntax to you, you might find it helpful to take a quick look at Writing with Inform, section 4.15 – built into the “documentation” tab in the Inform IDE, or available here.

There are libraries out there for dealing with body parts in this way that can help ease the burden have having to create all of the relevant anatomical bits from scratch; a quick Google search turns up this, among other things, though I myself haven’t worked with it.

Does that help?

It does, but that kinda begs the question, since I’m going to make something more akin to a descriptive wearable scenario, that is it possible to make something with that wearable?

If you want something wearable, you shouldn’t also make it part of the body, because then it wouldn’t be possible to take it off and put it back on. However, you can have both wearable things and body parts, and you could in theory make a thing, corresponding to what in the real world would be a body part, but make it wearable instead of being part of someone.

Perhaps the most notorious example of this is in the profoundly misogynistic Stiffy Makane, a mid-nineties piece of adult IF, the original version of which accidentally made the PC’s phallus a detachable item that was, for instance, droppable.

1 Like

Ah I see!
Also, Unrelated to the topic at hand, but just asking.
I wanted to do character creation as well but I need an extension or base for it, and I was wondering if you had a link to anything related?

Oh boy. You mean something to help you configure variable stats on a character at the beginning of play, I assume? Or something similar?

I am not personally aware of any extensions that do that, but would not be surprised to discover there is one (or more) out there. You can browse the “public library” of extensions from within the Inform app and install them from there, or can run a Google search. Hopefully anyone else wandering by will contribute a pointer to whatever they may happen to know.

EDIT for grammar.

There are several “adult” extensions for Inform of various and sundry quality online. Parser/text-only AIF is not as popular as it was perhaps a decade ago. I would suggest checking out AW Freyr’s “AIF Toolkit” - although it appears it hasn’t been updated in a long time and may not work with the current Inform version. Even if it is obsolete, you could read the source text and see what is involved or mine it for useful code. I tested it for AW ages ago and all of his extensions were very thorough and well-documented.

(Note: Top level link is not porn - it is an age-gated blog with Inform Extensions to assist authoring adult/sexual games. Be aware that further links from that site may contain more specifically explicit adult and NSFW content.)

That’s not entirely true; Inform’s idea of what “part of” means is flexible and you can have rules that separate and re-join things. Still, there’s already a separate relation for wearable items, so you’d normally handle those differently from parts anyway.

2 Likes

Thank you, Gavin!

Thanks, Gavin, I didn’t realize that, either, but an example of how a thing can be made a part of something else, and then taken off, can be found under S3.23 of the Inform User’s Manual, in Example #36 ‘Brown’. Thank you for pointing that out!

1 Like

Basic code I’ve used:

A nose is a kind of thing. One nose is part of every man. One nose is part of every woman. Understand "nose" as a nose.

This will automatically furnish body parts to NPCs at the beginning of play, and will name them appropriately for disambiguation. “John’s nose” “Mary’s nose”…

your nose is a nose. your nose is part of the player. Understand "my nose" as your nose.

This gives the player a nose, and will refer to it as “your nose” and sets up that the player will likely refer to it as “my nose”.

Understand "nostril/nostrils" as a nose.

This allows the player to use any synonym you specify.

So clothing gets tricky.

A garment is a kind of thing. A garment is wearable.
A garment can be face-worn.
A mask is a kind of garment. A mask is face-worn.

Check examining a nose (called N):
     if N is incorporated by a person (called P):
          If P wears a face-worn garment (called G):
               say "You can't see [N] through [the G] they are wearing." instead.

“Incorporated” is one way in inform to say “a part of”.

See recipe book regarding clothing also: http://inform7.com/book/RB_9_3.html

1 Like