Foxaroo project #1: TARDIS Adrift

I don’t think it’s officially deprecated. But it’s hard to customize. (E.g., it’s hard to make a scenery object which can be eaten, because the “carried” designation really, really wants to kill the action when the implicit take fails.)

Thanks Felix and Capmikee! :slight_smile:Breaking it with is an action applying to one touchable thing and one carried thing” has stood up to all the tests I’ve thrown at it. For the time being I’ve also amended it to “Breaking it with is an action requiring light applying to one touchable thing and one carried thing.” At this stage I haven’t yet decided whether it’s advantageous for the player to break things in the dark, but I’ll have a chance to find out because after the player extinguishes the fire on the TARDIS console all the rooms will be darkened.

Again, I may be wrong, but I think you only need “requiring light” if you want to disallow even objects in your inventory when it is dark.

That sounds about right. I’ve checked in Chapter 12.17 - “Visible vs touchable vs carried”

At a later stage in the development of my project I’ll work out which best suits the command to break objects.

New problem:
I want to assign an electric charge (or energy level) to certain objects in the game, particularly the gadgets and power tools. I’ve tried doing so with the following:

A PoweredGadget is a kind of thing.  A PoweredGadget has a number called PowerCharge.  The Powercharge of a PoweredGadget is usually 0.  The frost projector, small battery-powered torch, size AA battery and personal force field pendant are PoweredGadgets.

It’s most important for the torch, where 1 unit of PowerCharge equates to illuminating a room for 1 move.

I’ve encountered a conflict with those objects that I’ve marked as devices in the game.

Error: “Problem. You wrote ‘The small battery-powered torch and personal force field pendant are devices’, but that seems to contradict ‘The frost projector, small battery-powered torch, size AA battery and personal force field pendant are PoweredGadgets’, as a device and a poweredgadget are incompatible. (If a device were a kind of a poweredgadget or vice versa there’d be no problem, but they aren’t.)”

Devices in Inform7 are things that can be switched on and off. Some of the powered objects in my game will be devices, others such as the battery have a charge but cannot themselves have an on/off state. Equally not every device in my game will require a power charge, for example an oil lamp (similar to the one used by the 3rd Doctor and Sarah Jane Smith at the start of “Death to the Daleks”).

Question: Is there a way to assign the power charge to specific objects, regardless of whether they are devices or not?

(Aside to the Dr Who fans: Rather than a battery I’ll probably be using an optical energy crystal similar to the much larger crystals in the story Dragonfire. I’ve identified it above as a battery for sake of clarity for everyone in the forum not familiar with the Dr Who lore).

I think the easiest way to do this would be to separately define two kinds that both have a PowerCharge. At least that seems to be how the Standard Rules gives both supporters and containers a carrying capacity.

[code]A PoweredGadget is a kind of device. A PoweredGadget has a number called PowerCharge. The Powercharge of a PoweredGadget is usually 0.
The frost projector, small battery-powered torch and personal force field pendant are PoweredGadgets.

A PoweredGimmick is a kind of thing. A PoweredGimmick has a number called PowerCharge. The Powercharge of a PoweredGimmick is usually 0.
The size AA battery is a PoweredGimmick.[/code]

EDIT: And it should also be possible to have code that says that The optical energy crystal has a number called PowerCharge. , without making the crystal either a PoweredGadget or PoweredGimmick (I think).

Excellent! Thanks Felix!

There’s why I’m such a poor student; I make bad deductions - I assumed that a number property would be unique to a particular kind of thing. :unamused:

Cheers! :slight_smile:

Offtopic a bit:

RIP Elisabeth Sladen.

atvtoday.co.uk/index.php?opt … i&Itemid=5

Even more offtopic:

Eldrad, King of Nothing (a track by my old band, featuring samples from The Hand of Fear)

eyeballsun.org/yearone.html#eldrad

Yes my friends and I also grieved. At 65 I regard this as still too young to depart this world, and I feel for her husband Brian and her daughter Sadie Miller who at the mere age of 26 has lost her mother. The world has lost a great actress who created a memorable character.

PS I don’t mind people discussing Dr Who in this thread, so long as the moderators approve.

Progress update: Was stuck for a while trying to design the code that actually allows the player to pass a charge from one device to another, however I have now solved it.

Meanwhile I’ve been accumulating a list of leser problems that I haven’t been able to figure out on my own. These aren’t actually interfering with my current project, but I’m keen to hear advice from anyone on these.

Three problems, all of these fairly minor in terms of my current project

Problem #1:
I recently upgraded to the version of Inform7 “24th December 2010” when I started using my new PC. While looking for answers in one of my experimental maps I received an error on code which had been accepted previously. The newer version of Inform7 didn’t like the fact that have a door which is situated between both north & south as well as between inside & outside.

North of Delta Street Alleyway and south of the Musty Foyer is the scratched wooden door.  Inside of Delta Street Alleyway and outside of the Musty Foyer is the scratched wooden door.  The scratched wooden door is a door.  The scratched wooden door is closed.

Error: “scratched wooden door seems to be a door with three ways out (specified ‘North of Delta Street Alleyway and south of the Musty Foyer is the scratched wooden door’ , ‘North of Delta Street Alleyway and south of the Musty Foyer is the scratched wooden door’ and ‘Inside of Delta Street Alleyway and outside of the Musty Foyer is the scratched wooden door’ ), but you can only have one or two sides to a door in Inform: a one-sided door means a door which is only touchable and usable from one side, and an example might be a window through which one falls to the ground below. If you really need a three-sided cavity, best to make it a room in its own right.”

Worked fine in the old version. I guess it’s not really essential to provide “Inside” and “Outside” as supplementary to the compass directions, but if there’s a workaround to this I’ll be very keen to know. In TARDIS adrift it will be handy to offer the player “Inside” and “Outside” for egress through the TARDIS door rather than having to remember which direction the TARDIS is facing at a particular location.

Problem #2:
How do you override the text for when the player is left in darkness? Saying “It is now pitch dark in here!” doesn’t work if night falls, or if the player steps out of the TARDIS onto a planet with a permanently dark region.

Problem #3:
Follows on from the one above. Can you illuminate or darken regions instead of individual rooms?

A TARDIS (like many inter-stellar spaceships) is vast and fully lit when powered up, but fully dark when powered down. Power will be on and off several times during the game. I’ve tried the below, but it produces a run-time error:

[code]The TARDIS Interior is a region. The Console Room, TARDIS Kitchen, Fore end of TARDIS Broadway, Your Bedroom and Boot Cupboard 12 are in the TARDIS Interior.

To Darken the TARDIS:
Now the TARDIS Interior is dark.

To Illuminate the TARDIS:
Now the TARDIS Interior is lit.[/code]
The rough approach would be a full list:

To Darken the TARDIS: [Now the Console Room is dark; Now the TARDIS Kitchen is dark; Now the Fore end of TARDIS Broadway is dark; Now Your Bedroom is dark; Now Boot Cupboard 12 is dark.
However I’d like to avoid that if possible, so that I can more freely add or delete rooms inside the TARDIS.

I don’t know the other answers off the top of my head, but I think you should just be able to do:

To darken the TARDIS: now all rooms in the TARDIS Interior are dark.

In the first example you could try something like this (untested):

Instead of going outside in the Musty Foyer: try going south. Instead of going inside in the Delta Street Alleyway: try going north.

(I think it’s “in” and not “from.”)

In the general case you could maybe say something like this:

Instead of going outside in the Tardis Entryway [or whatever it's called]: try entering the Tardis Door. Instead of going inside when the location is the front side of the Tardis Door or the location is the back side of the Tardis Door: Try entering the Tardis Door.

though I’m particularly not entirely sure about that last bit. Anyway, 3.12 of the documentation might give you some ideas; another thing you can play around with is “the direction of the Tardis Door from the location.”

I do recommend including this; it always bothers me when I’m in a building or something and I can’t use “out” to leave.

That worked a treat, thanks shammack!

Approaches such as these occured to me, but are they able to be re-mapped later in the game? The TARDIS will relocate to different places as the game progresses. I’ve read through chapter 3.12 of the manual and this type of situation doesn’t appear to be covered. I’m sure though that other game designers have had a need for this though. Any large vehicle such as a train, riverboat, ocean liner, submarine, aircraft or other spaceship type would incurr this situation (or maybe they took the easy way out and had the door face the same compass direction each time).

(BTW the name of the location immediately inside the TARDIS door is ‘The Console Room’.)

Same here. :slight_smile:

Well, poop.

OK, here’s what I got [EDIT: Someone with more of a clue might have something better]:

[code]The Console Room is a room. Og is a room. Bog is a room. Log is a room. Nog is a room.

The big dial is in the Console Room. The big dial has a room called the destination. The destination of the big dial is usually Og. The initial appearance of the big dial is “A big dial with a pointer is in the middle of the room.” The description of the big dial is “It can be set to Og, Bog, Log, or Nog. It is currently set to [destination of the big dial].”

The Tardis Door is a door. The Tardis door is open. The Tardis Door is not openable. [Because I don’t want to mess around with “open door”. You might want to, depending on your puzzles.] The Tardis Door is north of the console room. “The Tardis door sits in its usual place, always to the north, thank Zog.”
Instead of entering the Tardis door: [This is the easy part]
move the Tardis-door-prop to the destination of the big dial;
move the player to the destination of the big dial.
.
[And we have to set up a fake door to allow you to return. You could write some code to give the door a direction in each of these places, too, if you like.]
The Tardis-door-prop is a container. The Tardis-door-prop is privately-named. The Tardis-door-prop is enterable. The printed name of the Tardis-door-prop is “Tardis door.” Understand “Tardis” and “door” as the Tardis-door-prop. The description of the Tardis-door-prop is “The Tardis door mysteriously sits in the middle of this trackless wilderness.” The initial appearance of the Tardis-door-prop is “The Tardis door mysteriously sits in the middle of this trackless wilderness.”
Instead of entering the Tardis-door-prop:
move the player to the Console Room;
remove the Tardis-door-prop from play.
Instead of inserting something into the Tardis-door-prop: [It would be a huge mess if you could do this, though it’s probably wiser just to block this completely]
say “You bestow [the noun] to the safety of the Tardis.”;
move the noun to the console room.

The fort is a container in the Console Room. The fort is enterable. The description of the fort is “You’re not sure exactly why you built this fort.”

Instead of setting the big dial to:
if the topic understood matches “Og”:
now the destination of the big dial is Og;
say “You set the dial to Og.”;
otherwise if the topic understood matches “Bog”:
now the destination of the big dial is Bog;
say “You set the dial to Bog.”;
otherwise if the topic understood matches “Log”:
now the destination of the big dial is Log;
say “You set the dial to Log.”;
otherwise if the topic understood matches “Nog”:
now the destination of the big dial is Nog;
say “You set the dial to Nog.”;
otherwise:
say “You have to set it to Og, Bog, Log, or Nog.”

[Here’s the stuff you were actually interested in.]
Instead of going outside in the Console Room: try entering the Tardis Door.
Instead of exiting when the player is in the Console Room: try entering the Tardis Door. [You have to say “the player is in the console room” rather than “the location is the console room” to cover cases where the player is exiting something that’s in the console room – “in the console room” is only true when the player isn’t inside anything else. I think. The fort is there to test this.]
Instead of going inside when the Tardis-Door-Prop is in the location: try entering the Tardis-Door-Prop.

The player carries an ordinary whatsit. [For putting into the Tardis-Door-Prop.][/code]

It’s quite possible I’m misunderstanding the situation, but have you considered creating the TARDIS as an enterable container, and then just doing something like:

instead of entering the TARDIS, now the player is in the Console Room; instead of exiting when the location is the Console Room, now the player is in the location of the TARDIS; instead of going inside when the TARDIS is in the location, try entering the TARDIS;
That way:

  • you could move the TARDIS object wherever you want during the game
  • in/out should always go between the interior and wherever the TARDIS is
  • you wouldn’t have to worry about moving rooms and doors around
  • you’d have an automatic “You can see the TARDIS here” (or whatever) message wherever the TARDIS is

If you need a door on it, you could make the TARDIS object itself openable and understand “TARDIS door” as the TARDIS, which should cover entering from the outside. For the inside, put a separate door adjacent to the Console Room, and instead of going in that direction when the location is the console room, try exiting? (not sure if I have the right syntax for going through a door there, but you get the idea) You would of course also want to check for putting things into the TARDIS, looking inside/outside it, etc. and respond appropriately.

I’m not sure how well that solution fits with your existing world layout, but if I were implementing a TARDIS that’s how I’d do it.

I like it…

[code]Space is a scene.

When Space begins:
move the TARDIS to the Console Room.

[/code]

Inspired by this discussion, I’ve submitted my updated version of Conditional Backdrops to the i7 site. Unless and until it is accepted there, you can find it at:

eyeballsun.org/i/Conditional%20Backdrops.i7x

“An extension to allow a single rulebook to determine the presence of multiple backdrops.”

shammack’s solution seems very nice and much more true to the TARDIS than having a door in the middle of nowhere. Not sure what I was thinking with that description.

Thanks guys. I’ll have a play around with both matt w’s and shammack’s suggestions as soon as I can. Hopefully this weekend.

To clarify: Yes there will definitely be a door on the TARDIS, one that has a key. The door will be pivotal (pun not intended) to several puzzles, the first being how the player will find their way out of the TARDIS having no power available to operate the door mechanism (which forces the player to explore the TARDIS a little before being able to venture outside). They’ll be doing so using the crank handle that appeared in the 3rd Doctor Story “Death to the Daleks” where the TARDIS was left completely without power due to an energy-absorbing tower on the Exxilon city.

The 2nd puzzle I haven’t fully fleshed out the details yet. The TARDIS will still be unpowered when the player has catapulted it into space via the mag-lev rail. While in space the player encounters something (another spaceship, space station, etc - I haven’t yet decided) and gains entry by spacewalking using a personal force field generator (similar to the one used by Borusa in The Invasion of Time, but also able to contain a bubble of breathable air) and gloves so that their hands don’t freeze onto the exterior hull of said spaceship/station. To prevent the TARDIS’ entire reserve of air being drawn out into space, the player has to apply a temporary resin to the internal doors as an air seal before opening the external door.

I also had another idea. Is it possible to have a null room outside the TARDIS acting as a go-between? IE when the player moves through the TARDIS doorway they enter this never-seen room and are transported either inside or outside the TARDIS (depending which way they were going). That way the door could function as a normal door, never needing to actually be moved, and I could easily re-map the movement directions of the null room to suit the current location of the TARDIS? I’ll experiment with that too.

Movable doors will be a vital component when I go to work on my intended project #3, based on The Goon Show where this is very typical of the show’s brand of cartoon physics.
Examples:
The Red Fort. Seagoon’s raiding party steal the door to the Red Bladder’s fort and carry it back to their base, only to have Major Bloodnok abducted through the door when he opens it.
The Vanishing Room. Partway through a murder investigation that Seagoon is bumbling his way through as the detective, the room with the deceased is suddenly shifted to a hotel in Paris, along with Eccles who emerges thinking that he is still in London.
The Treasure in the Lake. In an effort to escape two men he believes to be the police, Seagoon and Willium [SIC] fold up the walls of a house, hide the floor in a sack and put the door up on the (unsuported) ceiling.

(I’m sure there are others, but I need to get to work right now).

It was my bandmate Jim who was the real Dr. Who fan… he named another one of his bands “Invasion of Time!”

Jim’s also really into the Goon Show. Please make sure you announce when these projects are finished because I want to show them to him…

I expect he would have wanted to go with “Ned’s Atomic Dustbin” if it hadn’t already been taken? :smiley:

I’ll be sure to make an announcement when each is ready. There will be a long wait for each however; as a labour of love I’m only able to work on these in my spare time (I’ve even written parts of the code while going to & from work on the train) and as this thread shows, I have a lot to learn before I’m proficient in Inform.