# 使用Inform7创作交互式小说

## 什么是交互式小说(Interactive Fiction, IF)

Interactive fiction, often abbreviated IF, is software simulating environments in which players use text commands to control characters and influence the environment. Works in this form can be understood as literary narratives and as video games.In common usage, the term refers to text adventures, a type of adventure game where the entire interface can be "text-only"

IF 的历史我就不多说了，毕竟我也不太清楚。

IF 中，通常可以用 go 指令来移动，用 takeget 来获取物品，用 look 来查看周围环境。 IF 的魅力在于，世界的面貌除了靠作者的描写，还需要玩家用自己的记忆和联想使其丰富，它玩起来更不方便，但更有代入感。以下是我玩 adventure 时的的一个记录：

## Inform

Inform 又是什么呢？

Inform is a design system for interactive fiction based on natural language. It is a radical reinvention of the way interactive fiction is designed, guided by contemporary work in semantics and by the practical experience of some of the world's best-known writers of IF.

### 开始创作

Magi is a room.

The box is in the Magi. The box is a container. The box contains a sword.


player is in the Magi.


player wears a top hat.


Before taking the sword:
if the player is wearing the hat:
now the hat is in the box;
say "As you stoop down, your hat falls into the box."

After taking the sword:
say "The sword was ever owned by a hero in history."


## 后记

Inform是个很棒的工具，不过对我来说，它并不能实现我需要的全部功能，有些功能，终究要我自己去实现。不过没关系，通过Inform，我可以先熟悉 IF 的创作方式。