-
Notifications
You must be signed in to change notification settings - Fork 14
Help!
Here is a quick way to do a pretty comprehensive help system. When the player types HELP, she is presented with a list of help topics, and can select one to see the relevant help printed to screen.
First modify the command. I am using the showMenuDiag
menu, but you might want to use another version.
findCmd('MetaHelp').script = function() {
showMenuDiag('Help topic?', Object.keys(helpTopics), function(result) {
metamsg("{b:{i:" + result + "}}")
for (const s of helpTopics[result]) metamsg(s)
})
return world.SUCCESS_NO_TURNSCRIPTS
}
If you prefer the help information to appear in a dialog, rather than in the narrative, try this version:
findCmd('MetaHelp').script = function() {
showMenuDiag('Help topic?', Object.keys(helpTopics), function(result) {
showDiag(result, helpTopics[result].join('<br/><br/>'), 'Okay')
})
return world.SUCCESS_NO_TURNSCRIPTS
}
The data is just a dictionary. Each name is the menu item (and needs to be in quotes if it includes spaces).
const helpTopics = {
"Warnings": [ "There are no warning for this game.", ], "About": [ processText("{i:{show:settings:title} version {show:settings:version}} was written by {show:settings:author} using QuestJS (Quest 6) version {show:settings:questVersion}.", {settings:settings}), "With thanks to The Pixie for creating QuestJS.", ], "General Play": [ "This game is played entirely though the buttons top-right and the panels on the left.", "The buttons handle out-of-game interactions, such as this help, which you obviously found. You can also save/load, toggle dark mode and undo.", "On the left are the panels for interacting in the game world. At the top is the compass rose for moving to different locations, with an eye in the middle allowing you to look at the current location.", "The bottom three panes list items and people the player is holding, wearing and can interactive with in the room. Clicking on one will bring a list of associated options.", ], "Objectives": [ "Your main objective is to make money, and stay alive.", ], "Hints": [ 'Get to level 5 before you leave the city.', ], }
Tutorial
- First steps
- Rooms and Exits
- Items
- Templates
- Items and rooms again
- More items
- Locks
- Commands
- Complex mechanisms
- Uploading
QuestJS Basics
- General
- Settings
- Attributes for items
- Attributes for rooms
- Attributes for exits
- Naming Items and Rooms
- Restrictions, Messages and Reactions
- Creating objects on the fly
- String Functions
- Random Functions
- Array/List Functions
- The
respond
function - Other Functions
The Text Processor
Commands
- Introduction
- Basic commands (from the tutorial)
- Complex commands
- Example of creating a command (implementing SHOOT GUN AT HENRY)
- More on commands
- Shortcut for commands
- Modifying existing commands
- Custom parser types
- Note on command results
- Meta-Commands
- Neutral language (including alternatives to "you")
- The parser
- Command matching
Templates for Items
- Introduction
- Takeable
- Openable
- Container and surface
- Locks and keys
- Wearable
- Furniture
- Button and Switch
- Readable
- Edible
- Vessel (handling liquids)
- Components
- Countable
- Consultable
- Rope
- Backscene (walls, etc.)
- Merchandise (including how to create a shop)
- Shiftable (can be pushed from one room to another)
See also:
- Custom templates (and alternatives)
Handing NPCs
- Introduction
- Attributes
- Allowing the player to give commands
- Conversations
- Simple TALK TO
- SAY
- ASK and TELL
- Dynamic conversations with TALK TO
- Following an agenda
- Reactions
- Giving
- Followers
- Changing the player point-of-view
The User Experience (UI)
The main screen
- Basics
- Printing Text Functions
- Special Text Effects
- Output effects (including pausing)
- Hyperlinks
- User Input
The Side Panes
Multi-media (sounds, images, maps, etc.)
- Images
- Sounds
- Youtube Video (Contribution by KV)
- Adding a map
- Node-based maps
- Image-based maps
- Hex maps
- Adding a playing board
- Roulette!... in a grid
Dialogue boxes
- Character Creation
- Other example dialogs [See also "User Input"]
Other Elements
- Toolbar (status bar across the top)
- Custom UI Elements
Role-playing Games
- Introduction
- Getting started
- Items
- Characters (and Monsters!)
- Attributes for characters
- Attacking and guarding
- Skills and Spells
- Limiting Magic
- Effects
- The Attack Object
- Quests for Quest
- User Interface
Web Basics
- HTML (the basic elements of a web page)
- CSS (how to style web pages)
- SVG (scalable vector graphics)
- Colours
- JavaScript
- Regular Expressions
How-to
Time
- Events (and Turnscripts)
- Date and Time (including custom calendars)
- Timed Events (i.e., real time, not game time)
Items
- Phone a Friend
- Using the USE verb
- Display Verbs
- Change Listeners
- Ensembles (grouping items)
Locations
- Large, open areas
- Region,s with sky, walls, etc.
- Dynamic Room Descriptions
- Transit system (lifts/elevators, buses, trains, simple vehicles)
- Rooms split into multiple locations
Exits
- Alternative Directions (eg, port and starboard)
- Destinations, Not Directions
Meta
- Customise Help
- Provide hints
- Include Achievements
- Add comments to your code
-
End The Game (
io.finish
)
Meta: About The Whole Game
- Translate from Quest 5
- Authoring Several Games at Once
- Chaining Several Games Together
- Competition Entry
- Walk-throughs
- Unit testing
- Debugging (trouble-shooting)
Releasing Your Game
Reference
- The Language File
- List of settings
- Scope
- The Output Queue
- Security
- Implementation notes (initialisation order, data structures)
- Files
- Code guidelines
- Save/load
- UNDO
- The editor
- The Cloak of Darkness
- Versions
- Quest 6 or QuestJS
- The other Folders
- Choose your own adventure