Transforming the player

Gosh, thought I could figure this out with on-stage and off-stage, but simply cannot. I want to be able to transform my player into other things (defined as persons). It would be helpful if they could be off-stage, so that I did not need to put them in every room, but would put the copy/paste work in regardless.

Starts with the basic:

Being is an action applying to one thing. Understand “be [someone]” as being.

And it works, if the someone is in the room undescribed. But cannot get it to work with folks off-stage. Anytime the someone is off-stage, I get the “I can’t see any such thing.” parser error. I can keep putting them in the rooms undescribed, but then need to hide them every time also. Would be great if the freedom of off-stage versus on-stage could work. How to get around this parser error, and bring the on-stage first?

Please help.

2 Likes

I’d probably do this via a topic lookup, since messing around with keeping all the potential players always in scope seems like it could create issues if players try to do something other than being them. Here’s a quick and dirty version of that. Obviously you’d need a lot more code to clean this up – in particular, I wasn’t sure whether you want to whisk the old player-character offstage, or if you’d want them to stick around – but hopefully this is enough to show how the approach could work:

The Bookstore is a room.  Backstage is a room.  

Bookseller is a woman in the bookstore.  The description of Bookseller is "You like big books and you cannot lie."

Lord Tennyson is a man in backstage.  The description of Lord Tennyson is "You're rather depressed, in a 19th-century sort of way."   Lord Tennyson is carrying In Memoriam.

Sylvia Plath is a woman in backstage.  The description of Sylvia Plath is "You're rather depressed, in a 20th-century sort of way."  Sylvia Plath is carrying Colossus.

The player is Bookseller.

Becoming is an action applying to a topic.  Understand "be [text]" as becoming.
	
Carry out becoming:
	Repeat through Table of Immanent Beings:
		If the topic understood includes topic entry:
			Now the person entry is in the location;
			Now the player is the person entry;
			Say "In a swirl of magic, suddenly you are transformed!";
			Rule succeeds;
	Say "Who?";

Table of Immanent Beings
topic	Person
"Alfred/lord/tennyson/fred"	Lord Tennyson
"the/-- bookseller"	bookseller
"sylvia/-- plath"	Sylvia Plath

2 Likes

Give Sylvia Plath hit points, throw in some weapons and this is starting to look like a pretty good game.

-Wade

2 Likes

I started sketching this out but can’t figure out how to avoid Byron being OP without some deeply unrealistic nerfing.

1 Like

“An action applying to a topic” Oh, wow, let me try that out. And correct, I do not want the prior person to stick around. I would like them whisked backstage, but I can handle that. It was the summoning of someone ‘out of scope’ that was getting me. Let me try this out.

It does not like my Table. Am I missing some punctuation?

Table of Changelings
Topic Person
“Turtle” Turtle
“Selvyn/yourself/player/human” Selvyn

You need a tab between the columns – sorry, looks like that bit of formatting didn’t make it through the pasting in!

I’m not sure if you’ve checked out the bit about Tables in the documentation, but passing that along in case it’s helpful, especially 16.13 on topic columns, and the related examples at the bottom.

Yep, that was it!!! Okay, I think I have something to work with. Give me a few days!

Is there a term for the prior player, so that I can move them, or everyone else to nowhere?

Or what are the other entries called aside from the person of entry. I could send any of those to nowhere. thanks!

Do you mean the default player? Inform creates them as a person called “yourself” (you can type SHOWME ME in the IDE to see what object pops up).

EDIT: oh, just saw your second post – if you want to move everyone else in the table somewhere, you can just do that as part of the Repeat loop, just adding a set of commands under an “otherwise” condition that matches the current “if topic understood includes topic entry” condition.

This would be the conventional way to do this:

"____Backstage" by PB

The Bookstore is a room.  Backstage is a room.  

The Bookseller is a woman in the bookstore.  The description of Bookseller is "You like big books and you cannot lie."

Lord Tennyson is a man in backstage.  The description of Lord Tennyson is "You're rather depressed, in a 19th-century sort of way."   Lord Tennyson is carrying In Memoriam.

Sylvia Plath is a woman in backstage.  The description of Sylvia Plath is "You're rather depressed, in a 20th-century sort of way."  Sylvia Plath is carrying Colossus.

The player is Bookseller.

Becoming is an action applying to one visible thing.
Understand "be [any person]" as becoming.
	
Carry out becoming:
	Now the noun is in the location;
	Now the player is the noun;
	Say "In a swirl of magic, suddenly you are transformed!".

Making the action applicable to a visible thing allows it to refer to any object in scope, not just those which are touchable (the default).

Using the the token [any person] effectively brings off-stage or out-of-scope people into scope for this phrase only.

If you want to limit which persons the phrase can refer to, define a kind, e.g.

An NPC is a kind of person.

The cat is a person in the bookstore.

The Bookseller is an NPC in the bookstore.

Becoming is an action applying to one visible thing.
Understand "be [any NPC]" as becoming.
4 Likes

If you didn’t make the player someone else in your original setup (like the Bookseller), the default player object becomes ‘your former self’ when you switch the player’s perspective to a different object.

One way to switch all NPCs out of scope in the above example, would be:

now every NPC that is not the player is in backstage.

If you decide not to keep your off-stage characters in a room designed for the purpose (backstage), you could just use nowhere:

now every NPC that is not the player is nowhere.
1 Like

These both worked great, thanks! I will try both for awhile, and see which I prefer. Sad that I was trying to code it myself for so long, and right away, you both solved it, two different ways!