i7 / kerkerkruip

Kerkerkruip - the interactive fiction roguelike game
kerkerkruip.org
82 stars 13 forks source link

Mapping scrolls #54

Closed ektemple closed 11 years ago

ektemple commented 11 years ago

I've created two scrolls that provide functionality to go with the map. One of them is essentially a blueprint of the dungeon--it shows every room, but it doesn't name them or indicate contents. The other shows the locations of the enemies whose souls you can steal, without revealing the rooms themselves; if you haven't been to the room (or haven't found the blueprint), you'll just see the enemy's avatar floating in space. The code for the scrolls is below.

A few questions arise, both design and technical:

  1. Do you like these scrolls?
  2. These scrolls don't make sense if the player doesn't have an interpreter capable of graphics. How do you feel about their being included in the game only if the graphics are available?
  3. How can I put scrolls in the player's inventory for testing at the beginning of the game?
  4. Can a scroll be called something other than "scroll of ...."? I'd prefer to call the scroll of mapping simply "a blueprint", since there's nothing really magical about it.
Chapter - Scroll of mapping

Table of Scroll Names (continued)
scroll name
mapping
psycholocation

A scroll of mapping is a kind of scroll.
A scroll of mapping is mapping.
The description of a scroll of mapping is "Reading this scroll will instantaneously reveal the plan of the entire dungeon, including secret rooms (check the MAP to see it).".
The plural of scroll of mapping is scrolls of mapping.

Carry out reading a scroll of mapping (this is the reveal the map rule):
    now all placed not nogo rooms are map-revealed;
    say "The scroll is not a spell at all! It is a magically obfuscated blueprint of the Kerkerkruip dungeon! Type MAP to see the dungeon's complete floor plan."

Chapter - Scroll of psycholocation

A scroll of psycholocation is a kind of scroll.
A scroll of psycholocation is psycholocation.
The description of a scroll of psycholocation is "Reading this scroll will grant you the ability to sense all of the creatures whose souls you might be able to absorb (check the MAP to see their locations).".
The plural of scroll of psycholocation is scrolls of psycholocation.

Carry out reading a scroll of psycholocation (this is the reveal enemies rule):
    let adversary-count be 0;
    repeat with place running through placed not nogo rooms:
        repeat with adversary running through persons in place:
            if the adversary is not the player and the level of the adversary is greater than 0 and the level of the adversary is less than 6:
                now place is enemy-revealed;
                increment adversary-count;
    if the adversary-count is greater than 0:
        say "You enter a weird clairvoyant state: The psyche[if adversary-count is greater than 1]s[end if] of your enemies call[if adversary-count is less than 2]s[end if] out to you. For a short time, you will be able to sense the presence and location of creatures whose souls you can absorb. If there are other creatures in the same space, you will see them via soul-reflection. Type MAP to psycholocate.";
        psycholocator peters out in 10 turns from now;
    otherwise:
        say "The scroll's magic enfolds you, but you cannot sense the souls of any enemies. Perhaps there are none remaining."

At the time when the psycholocator peters out:
    now all enemy-revealed rooms are not enemy-revealed;
    say "Your clairvoyant sensation fades; you can no longer sense the psyches of your enemies."
curiousdannii commented 11 years ago
  1. Yep!
  2. The Scroll of psycholocation would still work without the map if it impacted the remember command.
  3. When play begins: the player carries a ...
  4. Should the blueprint be a scroll at all? The distinguishing feature of scrolls is their undecipherable initial name. Perhaps it should just be a readable item, or maybe a tome.
ektemple commented 11 years ago

Yeah, psycholocation could be a temporary boost to SENSE, where it works on all level 1-5 creatures, not just Malygris.

I do want the blueprint to be scroll and have an obfuscated name, but when you read it, you discover that it's just a magically encrypted map. So after reading it, any other scroll of the same type is "a blueprint". The idea is a little bit of commentary on the standard "scroll of magic mapping" in roguelikes--there's nothing magic, usually, about the mapping--it's just a map of the level. But it doesn't have to be that way.

"Now the player carries a scroll of psycholocation" doesn't compile--it has to be "a random...". But that results in a run-time error ("can't move nothing"). The "copy scroll of psycholocation to player" language that can be seen in story.ni also doesn't work (unrecognized phrase). Is there something else I have to do in defining the scrolls that isn't included in the code I posted in this issue?

curiousdannii commented 11 years ago

It wouldn't make much sense to have more than one blueprint (though perhaps you could pull one out of the pile of body parts.) I can't see any problem with calling it a parchment or map. Only tricky thing might be if there's more than one, which is easy to test.

Does saying "the player carries..." outside of a rule work? Otherwise you have to make an instance of the kind for it to be selectable by random: "there are two scrolls of.."

If you're after a bit more flavour, the Marauder's Map could be some inspiration... I think it could be good if the two powers were combined: a base level (reveal all) and a secondary temporary effect (sense all). The second level could be hinted at, without explaining how to do it (ment maybe?). There could even be some false effects, like the Marauder's mocking you! What do you think?

ektemple commented 11 years ago

I had the same thought, that it makes sense to have only one blueprint. BUT, depending on where that spawns, it might be of zero use to the player by the time he finds it, because he's already mapped most or all of the dungeon by exploration. So if the game does spawn more than one, that is not without use.

Using "the player carries..." outside of a rule does work, but of course it doesn't reveal the name of the scroll. I was looking for a phrase specifically for testing, like the old "copy to" for scrolls. If there isn't one, that's fine.

I did have a marauder's map type scroll, but I thought it was a little too awesome. The idea of a single scroll with an additional ment-dimension is cool.

Here's what the psycholocation scroll looks like when read early on:

Psycholocation on a pretty tight map

Possibly unseen monsters should be avatared w/question marks rather than their actual letters, to make it a little less powerful?

VictorGijsbers commented 11 years ago

To test scrolls, I simply use:

"The player carries ten scrolls of alteration."

You can of course have them start out identified by having a when play begins rule containing "let item be a random scroll carried by the player; identify item".

Having these scrolls not turn up in non-graphical games would not be elegant. Saved games don't even record whether they are graphical or non-graphical! For the scroll of psycholocation (note that this object is called "X of telepathy" in other roguelikes, do we have a reason not to adopt that?), improving the sense command sounds good. Does anyone have a good idea for the scroll of the map? Just making all rooms "visited" is NOT a good idea, of course.

ektemple commented 11 years ago

I feel like calling it "scroll of telepathy" in a text game is kind of lame--surely in interactive fiction, telepathy should allow me to hear the thoughts of the characters? So, "psycholocation" is more honest about what the scroll does. I also thought that focusing on enemies with exploitable souls was a good way to both center on that thematic focus, and to limit the scroll a bit--as written, anyway, you can only see enemies who have a suckable soul, or who are in the same room with an enemy with a soul (e.g. Fafhrd and Mouser). A scroll of telepathy in the roguelike style would also show the Nameless Horror, for example. But I'm not wedded to the psycholocation functionality, or to the name, it could equally well be "scroll of soul seeking" or (punningly) "soul searching" or probably 10 other things!

(I'm not sure how AI works in Kerkerkruip, but a true scroll of telepathy might be one that gives a hint about whether the enemy will attack or concentrate on the next round, say. Combined with the ¡labor-intensive! writing of mental communications in each enemy's voice, that would be pretty cool.)

I agree that having scrolls appear only in graphical games is inelegant, but to be clear, the saved game doesn't need to know whether a game is graphical. This would be handled by a quick sanity check whenever a game is restored; if the terp doesn't support graphics, any graphics-dependent content would be removed from the game.

Anyway, I thought of a way to implement a text version of the blueprint. In the output for the REMEMBER command, or possibly in a textual MAP command, you could have a description like this:

Based on the blueprint you found and on your own explorations, you calculate that you are on the third floor of a three-story dungeon, in the northwest part of the complex. There seems to be a secret room somewhere to the south.

Combined with what the REMEMBER command already produces, this sort of thing would provide a lot of information for spatial inferences.

An alternative idea would to have just one scroll, in a version of what Dannii suggested (the "Marauder's Map"): if you have graphics, you can see, for a limited time, both the full blueprint of the dungeon and the enemies therein. When the spell wears off, you're back to seeing only what you've actually encountered. If you're on a graphics-incapable interpreter, however, you only get the second part, i.e. a globally effective SENSE command--there's no attempt to communicate the shape of the dungeon.

By the way, there are other ways to chop things up. For example: Assuming that there is a way to reliably identify hidden rooms (the connectable property, maybe?), then we could have secret rooms not appear on the blueprint, and have a special "scroll of architectural secrets" to identify those.

ektemple commented 11 years ago

Closed via https://github.com/i7/kerkerkruip/commit/20d8c05eeef3bcb260a45c20c8daee6721b05d3f. Once I've merged everything up, though, you guys might want to include mapping scrolls in scroll packages, treasure packages, etc.