1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-03 07:24:58 +03:00
inform7/docs-src/extensions.inweb

43 lines
2.1 KiB
Plaintext
Raw Normal View History

2020-03-19 02:11:25 +02:00
Title: Extensions and Kits
Author: Graham Nelson
2020-04-14 19:56:54 +03:00
@h Extensions.
An "extension" is a supplementary piece of Inform 7 source text. Inform
programs sometimes explicitly ask for these, with sentences like so:
>> Include Locksmith by Emily Short.
Their presence can also be implicitly required by the use of certain kits.
For example, if //BasicInformKit// is used (and it always is), then the
extension Basic Inform by Graham Nelson (//basic_inform//) is auto-included.
Similarly, use of either //WorldModelKit// or //CommandParserKit// mandates
the inclusion of the Standard Rules for interactive fiction (//standard_rules//).
The Inform GUI apps come with numerous other built-in extensions besides these
two, but all are smaller and easier to read, and they are not provided as webs.
See: https://github.com/ganelson/inform
@h Kits.
The middle phase of the Inform 7 compiler turns source text into a low-level
2020-03-19 02:11:25 +02:00
abstract program in a format called inter. The final phase merges this with
2020-04-14 19:56:54 +03:00
pre-compiled inter libraries called "kits".
2020-03-19 02:11:25 +02:00
2020-04-14 19:56:54 +03:00
Every source text needs a kit called //BasicInformKit//, and a kit associated
2020-03-19 02:11:25 +02:00
with the natural language it will eventually read or write, such as
2020-04-14 19:56:54 +03:00
//EnglishLanguageKit//; but then one of two things can happen:
2020-03-19 02:11:25 +02:00
(a) If the user explicitly declares other kits to use, those are used;
2020-04-14 19:56:54 +03:00
(b) Otherwise, //WorldModelKit// and //CommandParserKit// are used;
(c) If neither //WorldModelKit// nor //CommandParserKit// is used, then
//BasicInformExtrasKit// is used.
2020-03-19 02:11:25 +02:00
In effect, Inform by default assumes it is making an interactive fiction
of some kind, and must be explicitly told if it's to make a "basic" program
with no world model or command parser.
2020-04-14 19:56:54 +03:00
@ Each kit is a web. Inter code is highly verbose, very low-level and not at
2020-03-19 02:11:25 +02:00
all legible, so these webs do not contain textual Inter code: instead, they
2020-04-14 19:56:54 +03:00
are written in Inform 6 syntax. The //inter// tool then converts these to
2020-03-19 02:11:25 +02:00
binary inter code in a process called "assimilation". This means that to
create or edit kits, you need to be able to write Inform 6 code, but it's a
2020-04-14 19:56:54 +03:00
simple C-like language to learn if all you're doing is writing functions.