IntCyoaEnhancer

QoL improvements for CYOAs made in IntCyoaCreator

目前为 2022-01-23 提交的版本。查看 最新版本

作者
agreg
评分
0 0 0
版本
0.4.1
创建于
2022-01-22
更新于
2022-01-23
大小
19.4 KB
许可证
MIT
适用于

This little script has the purpose of enhancing your experience with CYOAs made in IntCyoaCreator.

Features

  • Detects when project.json is being downloaded and displays information on loading progress (unless it's been already added by the deployer)
  • Keeps track of the game state in the URL hash (using the internal format of IntCyoaCreator), offers to import the state when page is loaded; this allows you to bookmark or share your builds, and also prevents you from losing your state if you accidentally refresh the page
    • this import feature can be also invoked manually (via menu)
    • in some cases this import feature works better than builtin import dialog (less bugs)
  • Allows for altering page title (makes it easier to distinguish the browser tab/window with your build)
    • this is also retained in the URL hash, with the same benefits
    • can be removed at any time to revert to default title
  • Includes an overview/dice roll screen (toggleable from menu or with a button in bottom-left corner)
    • preview active items (choices/buttons), with description/cost & image displayed on hover
    • quick scroll navigation for visible rows (sections), additional information also shown on hover
    • also has a utilitary section which allows rolling for a random number
    • the dialog can be closed by clicking outside or hitting Escape
  • Allows for downloading project data (in current state)
  • Includes a cheat engine (doesn't affect save data)
    • supports point editing (for all point types, visible and hidden)
    • has a reset button which reverts all changes
  • Adds debug functions to the browser console (collected in a $dbg variable as well as globally)
    • store accessor ($store)
    • state accessors ($state, $pointTypes, $rows, $activated)
    • state aggregators ($items for all cards, $getItem to get a card by ID, $hiddenActivated lists activated multi-select & image cards – as they're excluded from the $activated list)
    • helper function ($clone makes a deep copy of state collection which makes it easier to examine)

Usage notes

  • By default, the script is applied to websites hosted on neocities.org (and attempts to detect if it's running IntCyoaCreator player app); this can be adjusted in script settings (add CYOA URL into User Matches/Includes to have it work there, or add a website URL into User Excludes to prevent it from running there)
  • Loading progress can't be detected if project.json is embedded in sourcefile (app.*.js)
  • The script keeps track of the exact same data that the app does (meaning that if something isn't exported by the app, it won't be stored by the script either – like image tooltips and some of multi-value fields, possibly depending on IntCyoaCreator version used in player app)
  • Modifying build state triggers an import (unless you hit cancel)
  • Entering an empty title resets it (same goes for the state)
  • Not all items/rows have readable names or even IDs, so you might have to tell them apart by hover information.
  • Due to how points are implemented in IntCyoaCreator, cheat points are added independently of the state. (Meaning, if you do a reset/import – regardless whether through Enhancer or builtin import dialog – point changes done with cheats will stay.)
  • In similar vein, anything you do affects project data (which is actually just an exported app state), which means if you've selected any option this selection will be included in the data as well.
    On the other hand, this means you can use debug functions to fix problems with data my directly modifying it.

This script appears to work in every IntCyoaCreator app I've tried it on (or at least as well as builtin import dialog does), but I haven't checked it with every IntCyoaCreator version.