Books

I have a statue that is holding a book - I want the player to be able to pick it up (got that working) I want the examine different from the read (got that ) does anyone have a good example of how to make the book have 10 pages with a different story on each page.

Do you want the player to be able to choose individual pages (READ PAGE 1), or does ‘read book’ just go through all the pages one at a time, so that you get a different story each time you read it?

ahh good question i want the player to choose the page they read, but list the table of contents

maybe do both read book dumps all pages but read page just reads that pages -

Here is my code (my first attempt ever and I have not fully corrected the room descriptions and spelling) - I a righting a study guide for law school - The main problem I have run into is that each book needs several pages with info on each page - if I put all the text in quotes for the whole book it errors out saying to many characters in quotes - For example the article 1 book has 10 sections as follows: Example of first two sections then the code I have so far

================

Article 1 Constitution -

Section 1: All legislative powers are given to the Congress, which will consist of two
houses, the Senate and the House of Representatives.

Section 2: Rules regarding the selection of members of the House of Representatives
-Members of the House will be chosen every 2 years. Representatives must be at least
25 years old, a citizen of the United States for at least 7 years, and a resident of the state
from which

==============================
Volume - Core

Part - Definitions & Setup

The story headline is “Legem Terre”.
The story genre is “Education”.
The release number is 1.
The story description is “A Journey of Discovery in the World of Law.”
The story creation year is 2013.

A thing has some text called printing. The printing of a thing is usually “blank”.
Understand the command “read” as something new. Understand “read [something]” as reading. Reading is an action applying to one thing, requiring light. Check reading: if the printing of the noun is “blank”, say “Nothing is written on [the noun].” instead. Carry out reading: say “You read: [printing of the noun][line break]”. Report reading: do nothing.

Part - The Court Room

When play begins: say “You are standing in what appears to be a court room. Everything is slightly off kilter as if you just finished doing 100 multiple choice questions or perhaps still asleep and dreaming.”

The Court Room is a room. [ So we start in this room.] “The Court Rooom is both familiar and strange to you. A strange mist hangs in the air and the edges of the wall seem fade into blackness above you. An imposing figure sits behind the bench to the north of you. A large name plate sits on the bench before the fiigure which reads - THE GRAND INQUISITOR. There are exits from here leading East and South.”

The Bench is scenery in The Court Room. Instead of opening or entering the Bench, say “The Bench is where the Grand Inquisitor sits.” The description is “The Grand Inquisitor sits upon the bench - Gavel in hand awaiting your presentation of the law.”

The Gavel is in The Court Room. The description is “Large, wood and all business.” The gavel is a supporter in The Court Room.

Instead of taking the gavel, say “The Grand Inquisitor Bonks you in the head with his Gavel and tells you to keep your grimey little law student hands off of it.”

Instead of opening or entering the Gavel, say “Um yeah its a gavel, so no.”

The bench is a supporter in The Court Room.
Understand “furniture” as the bench.

The Grand Inquisitor is a man in the Court Room. “The Grand Inquisitor sits upon the bench.” The description of grand inquisitor is “The Grand Inquisitor is dressed in a resplendant Black robe with a might gavel in his hands he waits for you to speak.”

understand “Judge” as The Grand Inquisitor

Part - The Chambers

The Chambers is east of the glowing door. The description is “The Judges Chambers.”

The glowing door is a door. The glowing door is east of the court room and west of the chambers. The glowing door is locked.

The brass key is carried by the Grand Inquisitor. It unlocks the glowing door.

Part - Hall of Law

The Court Room Entrance is south of the court room. The description is “Through two grand wooden doors to the north stands the Court Room of the Grand inquisitor. Directly South and Across the hall from the Court Room is a door Labeled The Constitution Room.”

Part - The Constitution Room

The Constitution Room is south of the court room entrance. The description is “The room is filled with statues in various poses around the room. Each statue is holding an ornate leather book.”

Article 1 Statue is in the constitution room. The description is “A Statue holding a great book. As you stare, it seems to come to life and turns the Book towards you - It booms - ARTICLE 1 OF THE US CONSTITUTION!”

Article 1 Book is a thing on the Article 1 Statue. Article 1 book is a supporter. The description is “A grand leather tome embossed in gold which reads [bold type] Article 1 of the U.S. Constitution [roman type].” The printing of article 1 book is “Section 1: The Legislative Branch This section stated that congress was to be made up of two parts, the Senate and the House of Representatives.”

Okay. Well, there’s a whole section in the Recipe Book section of the Inform 7 docs on books: in particular, Example 292: Pages does pretty much what you want. (You’d probably want to tweak it a bit - for instance, you might want >READ BOOK to read the next entry, rather than picking a random one. Also, that example isn’t generalised: it only works for a single book. If you’re going to have lots of books like this in your game, as seems likely, you’ll need to modify the code to work for any of them. See Example 94: Costa Rican Ornithology for an idea of how a much simpler, generalised system works.)

I saw that sinister book example - i tried to use it but could not get it to work yet - I could not tell if all the blue was code or just some of it - it looked like commands were intermixed by i am not sure