• Stars
    star
    149
  • Rank 248,619 (Top 5 %)
  • Language
    JavaScript
  • License
    The Unlicense
  • Created over 7 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of systems and macros for Twine.

Chapel's Custom Macro Collection (v2.10.0)

Documentation

Installation Guide

To install these macros, all you need is the code. You can get the code by copy and pasting from the repo, or by generating a custom download using the download utility. If you use the downloader, select the scripts you want and click the Create Download button. Extract the files from the downloaded zip file and install the bundle.js and bundle.css files (see below).

If you opt to get the files from GitHub, It is highly recommended that you install the minified versions (found in the scripts/minified/ directory of the repo), as these versions will have improved performance. You will only need the non-minified versions if you plan to edit the code in some way. Links to both the minified and pretty scripts are available on the individual documentation pages for each macro / system.

[!WARNING] To install these macros, you will need to be using the most recent version of SugarCube 2 in most cases, and this is almost never the version that comes with Twine 2. See SugarCube's website for updating / installation instructions.

  • For Twine 2 users: copy and paste the JavaScript code into your story JavaScript area. Some macros may also require CSS code, which goes in your story stylesheet.
  • For Twine 1, you'll need to copy and paste the JavaScript portions into a script-tagged passage, and the CSS portions (if any) into a stylesheet-tagged passage. You can create new passages and add the tags yourself, or right-click on a blank spot in the editor and select new script here and new stylesheet here to generate each passage.
  • For Twee2, refer to its documentation for how to create the tagged passages you need.
  • For Tweego, simply place the code in .js and .css files as appropriate and include them in your directory / command line options just as you would any other code files.

[!NOTE] If you're using Cyrus Firheir's excellent Twee3 Language Tools for VSCode you can find macro definitions in the chapel.twee-config.yaml file in the root of this repository. You can copy the whole file over and remove the macros you don't have installed. You don't have to remove the macros you aren't using, but they will make the tool that much more effective if you do. More on where to put the file and how to use the language tools can be found at the above link.

Installation: Troubleshooting

If you're having issues, please try some of these solutions.

  • If you're getting the code from GitHub, before copying the script you want from GitHub, you can find a button above the code on the right called raw. Try using this code instead, as it takes you to a page with only the code allowing you to copy it and paste it much more easily, and preventing potential encoding issues.

  • If you downloaded the files with the download utility, make sure to open the files and copy them with a text editor, not a word processor.

  • Make sure you're using the latest version of SugarCube 2 and of your preferred compiler.

  • Make sure that any code above my scripts in your JavaScript is correct, particularly in ending with a semicolon and with regard to closed parens, quotation marks, brackets, braces, etc. Try testing without my code again to make sure you didn't overwrite a chunk of whatever code was already there, which is easy to do in the tiny boxes you get from the Twine apps.

If none of those common solutions help you with the problem, open an issue here on the repo. Be sure to tell me the exact version of SugarCube (found in the Change story format menu option in Twine 2) and the exact version of your compiler (for Twine 2, the bottom right on the story list).

[!NOTE] Please try to screen grab or copy/paste any specific error messages, and provide sample code or steps to reproduce the issue if possible.

General Troubleshooting

If a script doesn't seem to be working right, remember:

  • Everything is case-sensitive--<<message>> and <<MESSAGE>> are not going to point to the same macro.

  • Follow the instructions carefully. There are a few places where my macros break with traditional SugarCube things, like the orders of arguments and stuff. I'm trying to hew closer to SugarCube's standards moving forward, though.

  • Make sure you're using SugarCube 2, the most recent version you can. This is very rarely the same as the version packaged with Twine 2 or the other compilers.

If you're reasonably sure you've read the docs and are using the right version and such, feel free to open an issue.

Suggestions

Have ideas? I'm open to contributions, both in the form of ideas and code. Open an issue or pull request if you want to help out or make suggestions for new macros or systems.

I Need Help!

If you're having an issue with these macros and suspect that it's operator error rather than a bug, you can still open an issue, but a faster way to get help would be to post in one of these Twine communities:

[!TIP] Regardless of where you seek help, you'll want to provide links to the scripts you're using for your potential answerers. Don't expect people to know what "Chapel's fading macros" are or how they work just from that.

You Don't Write Good...

Please take a minute and help me out by reporting any errors in the documentation via an issue, or pull request a fix if you've got the time and know-how. Both are greatly appreciated.

Credit and Attribution

This code is dedicated to the public domain. You don't need to provide credit, attribution, or anything else if you don't want to.

[!NOTE] If you do wish to credit me, which I always appreciate, you can credit me as Chapel, but please do not imply that I directly worked on your game.

[!TIP] If you have any questions or concerns about this, refer to the license or reach out to me.

This macro set features contributions from these awesome folks, among others:

Donations

[!NOTE] Note: I suggest donating to Twine development or SugarCube development if you really want to help out, but I'd welcome a few dollars if you feel like it.

ko-fi

More Repositories

1

tweego-setup

A Tweego project boilerplate.
JavaScript
50
star
2

harlowe-audio

An audio library for use with the Twine 2 story format Harlowe (v2.x or higher).
JavaScript
25
star
3

twine-resources

A list of Twine resources. Intended for publication at TwineLab.net
24
star
4

noble-avatar-js

An avatar generator for the SugarCube 2 format of Twine.
JavaScript
19
star
5

tweego-installer

An installer for Tweego that sets all the environment variables for you.
Inno Setup
16
star
6

harlowe-macro-api

Adds an accessible, simplified framework to Harlowe for creating custom macros in JavaScript.
JavaScript
11
star
7

simple-inventory

An inventory system for Twine 2/SugarCube 2.
JavaScript
10
star
8

poof

A proofing format for Twine 2.
JavaScript
10
star
9

volume-slider-for-sugarcube2

A simple volume slider for Twine.
JavaScript
8
star
10

ggz

Experience the story of Guns Girl Z in a visual-novel format.
JavaScript
4
star
11

spellbook

A D&D 5e spell management app.
HTML
3
star
12

dice-notation

Parses dice notation and returns the result of a dice roll.
JavaScript
3
star
13

serious

Generate serialized fiction for the web.
JavaScript
3
star
14

poetry-parser

Turns poems into JSON.
JavaScript
2
star
15

tw-analytics

Quickly add Google analytics to Twine games (and other web apps) from the command line.
HTML
2
star
16

custom-macros-demo

The custom macros demo repo.
CSS
2
star
17

spellbook-source

The source code for the Spellbook app.
JavaScript
2
star
18

serious-npm

The Serious command line package and API for NPM.
JavaScript
1
star
19

fairmath

A fairmath implementation for node and the web.
JavaScript
1
star
20

css-bin

it's the css bin
CSS
1
star