commit 0ffc5425c33c1f65c7bc2f7319000ba96c97317d Author: Tony Bark Date: Mon Feb 24 21:25:25 2025 +0000 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bee2965 --- /dev/null +++ b/.gitignore @@ -0,0 +1,83 @@ +# ---> VisualStudioCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +# ---> Linux +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +# ---> macOS +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# ---> Windows +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + diff --git a/CC0 b/CC0 new file mode 100644 index 0000000..6ca207e --- /dev/null +++ b/CC0 @@ -0,0 +1,122 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..06d21da --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# Starter Adventure + +This is a Twine starter template with basic settings page and header with a sample prologue to get you started. It uses the default [Harlowe](https://twine2.neocities.org/) 3.x story format. This comes with an intermediate language designed for drafting text adventures known as [ISD format](draft/README.md). + +## License + +I hereby waive this template under the public domain. The code and contents are under [The Unlicense](UNLICENSE) and [Creative Commons Zero v1.0 Universal](CC0), respectively. diff --git a/UNLICENSE b/UNLICENSE new file mode 100644 index 0000000..fdddb29 --- /dev/null +++ b/UNLICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/draft/README.md b/draft/README.md new file mode 100644 index 0000000..cb28c9a --- /dev/null +++ b/draft/README.md @@ -0,0 +1,96 @@ +# Interactive Story Draft v0.5 + +- **File Format:** `.isd` + +The Interactive Story Draft (ISD) format is a story format language designed for drafting interactive fiction before implementation in Twine’s Harlowe or similar engines. It allows authors to structure branching narratives, define conditions, and track variables efficiently. + +--- + +## Specifications + +1. **Passages:** + + - **Syntax:** `# PassageName` + - **Description:** Defines a new passage or section in the story. + +2. **Links:** + + - **Syntax:** `[[Link Text -> TargetPassage]]` + - **Description:** Creates a navigational link to another passage. + +3. **Variables:** + + - **Syntax:** `$variableName` + - **Description:** Represents a variable to track states or information. + +4. **Variable Assignment:** + + - **Syntax:** `(set: $variableName to value)` + - **Description:** Assigns a value to a variable. + +5. **Input Variable**: + + - **Syntax:** `(input: $userVariable, "Placeholder")` + - **Description:** Allows the user to input data. + +6. **Conditional Statements:** + + - **Syntax:** `(if: condition)[Text if true]` + - **Description:** Displays text or content based on a condition. + +7. **Else Clause:** + + - **Syntax:** `(else:)[Text if false]` + - **Description:** Follows an `(if:)` statement to handle the false condition. + +8. **Drop down:** + + - **Syntax:** ``(dropdown: $variableName to "Option 1", "Option 2")`` + - **Description:** Assigns a drop down menu with the given strings as options. + +9. **Random Number Generation:** + + - **Syntax:** `(set: $variableName to (random: min, max))` + - **Description:** Sets a variable to a random number between `min` and `max`. + +10. **Text Styling:** + + - **Syntax:** `''italic''`, `'''bold'''`, `^^superscript^^`, `~~subscript~~` + - **Description:** Applies basic text formatting. + +## Example + +``` +# Introduction +Welcome to your adventure! You find yourself at a crossroads. + +[[Take the left path -> LeftPath]] +[[Take the right path -> RightPath]] + +# LeftPath +You walk down the left path and encounter a mysterious stranger. + +(set: $hasKey to true) +The stranger gives you a key. + +[[Continue -> Crossroads]] + +# RightPath +You walk down the right path and find a locked door. + +(if: $hasKey)[ + You use the key to unlock the door and discover a treasure! +] +(else:)[ + The door is locked. You need a key to open it. +] + +[[Return to the crossroads -> Crossroads]] + +# Crossroads +You're back at the crossroads. + +[[Take the left path -> LeftPath]] +[[Take the right path -> RightPath]] + +``` diff --git a/draft/sample.isd b/draft/sample.isd new file mode 100644 index 0000000..ab94c4b --- /dev/null +++ b/draft/sample.isd @@ -0,0 +1,31 @@ +# Introduction +Welcome to your adventure! You find yourself at a crossroads. + +[[Take the left path -> LeftPath]] +[[Take the right path -> RightPath]] + +# LeftPath +You walk down the left path and encounter a mysterious stranger. + +(set: $hasKey to true) +The stranger gives you a key. + +[[Continue -> Crossroads]] + +# RightPath +You walk down the right path and find a locked door. + +(if: $hasKey)[ + You use the key to unlock the door and discover a treasure! +] +(else:)[ + The door is locked. You need a key to open it. +] + +[[Return to the crossroads -> Crossroads]] + +# Crossroads +You're back at the crossroads. + +[[Take the left path -> LeftPath]] +[[Take the right path -> RightPath]] diff --git a/src/StarterKit.twee b/src/StarterKit.twee new file mode 100644 index 0000000..43845a1 --- /dev/null +++ b/src/StarterKit.twee @@ -0,0 +1,43 @@ +:: StoryTitle +Starter Kit + + +:: StoryData +{ + "ifid": "CCE85936-2D98-4CC8-BFEB-417AA352506C", + "format": "Harlowe", + "format-version": "3.3.9", + "start": "Main Menu", + "zoom": 1 +} + + +:: Header [header] {"position":"450,350","size":"100,100"} +(align:"=><=")+(box:"X")[''Starter Adventure'' | + [[Settings->Settings]]] + +:: Return {"position":"575,350","size":"100,100"} +(align:"=><=")+(box:"X")[(link-goto: + "Return", (history:)'s last)] + + +:: Settings {"position":"450,500","size":"100,100"} +(align:"=><=")+(box:"X")[= + Name: (input-box:2bind $player,"X",1,"Zack") + Location: (dropdown: bind $location, "Sunset Arms", "TPaw HQ") + Class: (dropdown: bind $class, "DJ", "Programmer") + + (display:"Return") + + +:: Main Menu {"position":"325,350","size":"100,100"} +(align:"=><=")+(box:"X")[= + ## [[Play->Prologue]] + + (unless: (history:) contains "Settings")[ + (set: $player to "Zack")] + +:: Prologue {"position":"325,500","size":"100,100"} +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ultrices quam quam, lacinia consequat justo cursus condimentum. Aenean sed rhoncus orci. Donec accumsan ex magna. Nulla tempor egestas eleifend. Sed eget aliquet augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer aliquet quam ut felis tempor, quis tincidunt urna pharetra. Morbi molestie libero id mauris porttitor dapibus. Donec ac ante augue. Duis commodo facilisis mi. Fusce quis enim ante. Praesent vitae est in arcu venenatis molestie nec in arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed commodo erat magna. + +Mauris in ipsum imperdiet, tristique turpis ut, interdum metus. Donec ante quam, aliquet quis pulvinar eu, rhoncus nec ipsum. Sed eget sapien neque. Proin convallis justo lacus, a rhoncus eros condimentum nec. Aliquam erat volutpat. Aliquam eu nulla a odio imperdiet posuere. Pellentesque id ipsum vulputate, accumsan enim nec, dignissim elit. Suspendisse lobortis neque ligula, in faucibus libero rutrum ac. Nunc porta gravida congue. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. \ No newline at end of file