Skip to content

Latest commit

 

History

History
230 lines (230 loc) · 13.1 KB

todo.org

File metadata and controls

230 lines (230 loc) · 13.1 KB

[66/102] [64%]

Debug output

DOT output

LaTeX output

RTF output

HTML output

Split out template hanlding into separate class from output

Inject Output dependencies

Save section-number mapping and reuse automatically

Add support for custom document templates.

Fixed names and/or command-line options.

Add section links in LaTeX output.

Prettier LaTeX output

Look at how some existing gamebooks are formatted.

Parse wiki-style tags used to mark up sections

New text formatting style for section references

Inventory pick up items

Codewords set

Check if has inventory item

Check if has codeword

Remove item from inventory (forced by instructions)

Enable link if not having an item

Enable link if not having a codeword

Make sure dropped items can not be picked up again

Fix problem with map file from other book sometimes crashing formatter

Keys from formatted book should be added to map file, not replace it

Make inventory and codewords generic

They are the same, sort of, and it might be good to be able to add other similar entities as well, like skills or spells or whatever.

Otherwise/else handling for has.

Redesign otherwise/else to use xor tag on section reference.

Disable all links after finding an auto link (that is enabled).

Default templates. (templates/default?)

Book option to set title

Book option to set author

Book option to set max section number to use

Quote strings to not break formatting.

Include other templates from a template.

Template for book introduction (including rules etc)

Sections with some markup (has number 0?) are added as chapters of introduction, otherwise formatted identical to other sections.

Inserting images

HTML hide intro sections with link to display again

Only accept specific characters in section names

eg [a-z][a-z_0-9]+

Random pick of link to follow from a section.

Possibility to make predictable random numbers and shuffling for testing

Test generate examples and compare to expected output in all formats

Unit tests (finally…)

Save game (ie player) state

Load game (ie player) state

Flag to select what tag(s) to include (eg for demo/preview/short…)

Allow sections with same name as long as only one is included. Add book config for what section to use for references to excluded sections (eg links to outside of demo version can lead to section explaining that)

Counters (life, money, whatever) create and set

count tag to declare new counter, text in tag is display name optional argument sets the starting value of the tag display somewhere on page (in HTML output)

Counters increase/decrease

Counters check

Make sure HTML output works with javascript disabled

and in inferior browsers

Make sure counters start at 0 (not 1).

Remove the counter names from counter-tags output (and templates).

Buy (optionally decrease a counter to add something to a collection)

buy tag to specify what can be bought, eg [buy item]sword[/buy] followed by cost tag to specify what it will cost, eg [cost gold]3[/cost] Implemented by adding cost to the old found tag (put cost tag after it). Might reconsider and make explicit buy tag for clarity?

Add text template used for outputting non-tagged (plain) text.

Named references, when that style is wanted (especially for HTML).

Seems to be a bug in rtf template, inserting image filename.

JavaScript tests running in nodejs (no GUI)

The big scripts in html templates are split out into separate files already (script.html and endscript.html). It should be possible to test those from nodejs?

Make debug output more useful with a stricter format easy to parse.

Will be taken care of when implementing JSON output.

checkgamebook.py script, parse debug file JSON

checkgamebook.py build internal section graph

checkgamebook.py find unreachable sections

Debug output should be called just JSON

Make default templates for more tags

Many tags can default to do the same as a b-tag for bold for instance. Make as many DEFAULT templates as possible and remove format-specific ones. This will make further development so much more nice. Actually not doing this, because the default just showing inner text is the best default anyway.

Paged option

Option -o paged to make each section render on its own page. Add template overrides for at least html, tex, and rtf. Probably change the style for section headers as well.

include templates for generating tags for each section

start, separator, end (probably only for JSON and HTML now)

include templates for generating book config

start, separator, end (probably only for JSON and HTML now)

JavaScript improved design/code for what links to enable

Many strange things can happen when clicking one link changes something that should now enable or disable some link. Instead of the current hacks all links should be re-calculated every time something have been clicked, doing the same checks as when first displaying a section.

Reset tag

Show in dynamic HTML only, and only after something was changed in current section. Eg if player picks something up or buys something, then wants to undo that, there should be a link to do so. Text inside of tags is displayed as the clickable link to reset section.

return-links

Insert reference link to return to most recent section tagged as :RETURNHERE:. This will be based on the order sections are written in the file (for now?). This is probably a special case (ie hack) based on normal references.

:UNIQUE: tag

If a section has a :UNIQUE: tag, every link to it creates a new unique copy with automatically generated name. This is not recursive, so to make entire subtrees that are unique every section in the subtree must be tagged. This is done early in the parsing, so everything will treat the clones as different sections. If a number is given it is applied to first generated clone. That is probably not very useful but whatever.

Pick a specific number of things from those found in a(n intro) section

Used to pick up one or more of something found, or before starting. Create counter and set to how many are allowed to be picked. Add buy (and cost) tags for what can be taken. Need to make sure it is rendered in a good way (might need more tags). This will also work for picking eg starting skills.

Subtract from counter when following link (implies has at least that)

This is the cost tag again, when it immediately follows a reference.

Remove keyword (or item) when picking up something

Trade one thing from a collection to add something else to some collection.

Add keyword (or item) when following link

This is a new tag that follows a reference similar to a cost tag.

Remove keyword (or item) when following link

This is a new tag that follows a reference similar to a cost tag.

Fix bug in HTML with being able to click disabled things

It is possible sometimes to follow a disabled reference or pick something up even when not having enough to pay its price. Seems to only happen with things that do have a price, not those disabled for other reasons.

When buying or trading for something, it can be receievd again

The js code to make sure that something you have had but later dropped can not be picked up again seems to be broken for things that have a price.

automatic configurable explanation for things that were dropped

When disabling something found because it was dropped, display a warning after automatically,eg default “(not available because you already picked it up)” in some good style.

Use points to buy values for counters

Eg to buy starting values for some attributes in introsection.

Counter max values, not leaving a section too early

Use cost tag following inc tag to set price for increasing a counter. Set max for points to 0. Do not allow navigation until all points are spent (ie never allows following links while a counter is above its max value). The same mechanism can of course be used in-game at any section to allow the player to buy increases in different counters.

Tag to remove counter when following link

What if a reference leads back to somewhere that counter is used? In that case will revive the counter automatically. Remove will only hide from GUI really.

Combat

Tag to set config parameters for combat system (probably in introsection). Tag to mark up the link to use to trigger next round. Tag to mark up retreat link. Tag to mark up enemy starting values. JavaScript easy to override parts of system, but quite configurable just using the config parameters. Allow multiple combat systems in the same book.

Some way to insert character sheet in book introduction

Using a PNG image is not nice. Not sure yet what tags are needed. Probably a charactersheet template that is only non-empty for formats it makes sense in. For HTML all the inventory stuff etc could be moved into the character sheet, making it also available in the static HTML.

Defensive removal of any weird unicode not handled by quoting.

Somewhat user-friendly python error messages and always fail early

Somewhat user-friendly js error messages and always fail early

More formatting possibilities in sections

Look at existing gamebooks to get ideas to add to this todo list.

Document Gamebook format Basic gamebook (static, nothing about magic needed for dynamic)

Document Gamebook format Advanced (more complex layout options, but still static)

Document Gamebook format Dynamic (markup needed to make playable (HTML) version)

Document Gamebook format Standard output formats reference

Document Gamebook format Customization (make new output formats or override existing)

Reference documentation (all default template tags)

Make it possible for a modifier tag to refer to any other tag

Currently a modifier (eg cost) always applies to tag on its left or right, and it can be a bit confusing to remember what direction, or awkward to write the text in a good way to follow that rule. Make it possible to add to a tag what it applies to (eg what item or reference the cost should apply to, anywhere in the section).

HTML with javascript active, do not make new URLs (that break history)

JavaScript GUI tests running in a browser

Preferably headless (in nodejs?). Run tests on gamebook html example(s). Work on laptop stashed as zombietest (using zombietest obviously).

HTML CSS

Fix broken references in list option output for some tag

When using the list option, and only including only sections for a tag, there currently has to be a missingto section, and that section is always listed even if it is not tagged.

Add json output file containing sections, counters, collections etc.

This output format down-prioed because requires some changes to handle new-lines. All previously supported formats handles new-lines in text without problems, JSON do not. New-lines are added in ways that can currently not be affected by quoting functions. Made debug format json. Will fix new-line problems when seen (not so far).

Sell (optionally increase a counter to drop something from a collection)

sell tag to specify what can be bought, eg [sell item]sword[/sell] followed by cost tag to specify what it will cost, eg [cost gold]2[/cost] Might want to wait with this and add normal drop function first? This is like payPrice but a negative cost? Sort of.

Tags for current format

Automatic upper-case tags excluded not matching output format, eg when generating a HTML file all sections tagged PDF or TXT are excluded (unless also tagged as HTML of course). Sections with no format tag are always included, so this has to be handled somewhat differently from the normal include/exclude tags unfortunately. Allow multiple sections with the same name, only use one that matches, or treat as any other missing section otherwise.

checkgamebook.py ignore dummy and fake sections

checkgamebook.py trace items to find sections they are needed but can not have been found

tag to generate checkgamebook.py warnings

Some tag that can be set on incomplete sections to trigger warnings as a reminder that the book is not done yet, and show you what sections remain to be written.

Generic MAP section numbers substitution script

Use generated MAP file to insert section numbers in any external file.