The git for the Python Story Utility Package library.

Related tags

General Utilitiessup
Overview

SUP

The git for the Python Story Utility Package library.

Installation:

Install SUP by simply running pip install psup in your terminal.

Check out our pypi page!!

Requirements:

Python 3.8+

Usage:

Here's a basic story:

from sup import Story

story = Story("story")
story.run()

That's all the code you have to type to make a terminal based text story / game. As for the actual story script, options paths and more that's all handled automatically from what you've written in your Story Utility Script (sus) file.

An example of a story

[STORY main]
Once upon a time a boy named Jack was strolling by the river.
Suddenly he heard something move in the bushes.
Jack was scared as he had no idea what the thing in the bushes could be.
- OPTION {{
	 Run away $$JUMP running-away,
	 Go towards the Bush $$STAY,
	 Do nothing $$SKIP 5
	 }}
As Jack slowly moved towards the Bush the sound became louder.
The Bush started shaking violently, Leaves scattered everywhere.
Jack grabs a stick from the ground to defend himself.
- ADDATTR stick
Suddenly, a giant boar emerged from the Bush.
The Boar started shouting, nearby birds started flying away and animals slowly emptied the area.
Even the fish in the river had become restless.
Upon hearing the Boar's shout Jack fell on his feet and started trembling.
The boar approached Jack.
- OPTION {{
	 Attack the Boar $$CHECKATTR stick $$JUMP fight,
	 Jump in the river $$STORY the-river
	 }}
Jack tried to attack the Boar with his fists but alas, it was useless.
The boar slowly approached Jack, it's shouts becoming louder and louder.
Jack started to shed tears of fear. 
The Boar rushed at Jack.....
...
It took the meat from Jack's bag and then left him alone.
Jack returned to his house while still trembling in fear.
- END
- TAG fight
Jack immediately started swinging his stick around, trying to get the Boar to run away.
The Boar was un-phased by Jack's attacks and started running towards him, now angrier than before.
The Boar attacked Jack...
Luckily a man with an axe appeared in the last moment and struck the Boar.
Jack saw the man and ran away to his house.
- END

[STORY running-away]
Jack ran away from the Bush.
As he ran away he bumped into a man with an axe.
- TAG hunter
That man was a hunter, he was looking for a Giant Boar that had escaped from him.
The hunter told Jack to stay safe and what the route out of the forest was.
Jack returned home safely. 
- END

[STORY the-river]
Jack jumped into the river.
The river swept Jack away.
Jack started to slowly drown but a man helped him get out of the river safely.
- JUMP hunter

more examples can be found in the atlas folder.

This might look like a bit too much to understand at once but I'll break it bit by bit.

The Syntax:

So there are a set of functions you can use in a sus file, being:

  • TAG Creates a tag at the line that it's on.
  • JUMP Jumps to a tag ignoring which sub-story it exists in.
  • SKIP Skips a provided amount of lines.
  • RETURN Goes back a provided amount of lines.
  • OPTION Makes options, each option has some text and the function ran when that option is selected separated by $$.
  • STAY Does nothing, used with other functions to do nothing.
  • END Ends the whole story.
  • ADDATTR Adds an attribute to the player.
  • DELATTR Deleted an attribute from the player.
  • CHECKATTR Checks if the played has an attribute, if so it runs the function supplied by $$.
  • CHECKNOTATTR does the opposite of CHECKATTR.

You can also specify sub stories by typing [STORY sub-story-name]. lines that are empty or start with # are regarded as comments and are treated as if they don't exist.

You might also like...
This utility lets you draw using your laptop's touchpad on Linux.
This utility lets you draw using your laptop's touchpad on Linux.

FingerPaint This utility lets you draw using your laptop's touchpad on Linux. Pressing any key or clicking the touchpad will finish the drawing

A small utility that sorts your files.

FileSorter A small utility that sorts your files. TODO: Scan directory to find files(thanks @corruptmemry for this!) Split extensions to determine fil

Utility to play with ADCS, allows to request tickets and collect information about related objects.

certi Utility to play with ADCS, allows to request tickets and collect information about related objects. Basically, it's the impacket copy of Certify

jfc is an utility to make reviewing ArXiv papers for your Journal Club easier.
jfc is an utility to make reviewing ArXiv papers for your Journal Club easier.

jfc is an utility to make reviewing ArXiv papers for your Journal Club easier.

Modest utility collection for development with AIOHTTP framework.

aiohttp-things Modest utility collection for development with AIOHTTP framework. Documentation https://aiohttp-things.readthedocs.io Installation Inst

Collection of code auto-generation utility scripts for the Horizon `Boot` system module

boot-scripts This is a collection of code auto-generation utility scripts for the Horizon Boot system module, intended for use in Atmosphère. Usage Us

Build capture utility for Linux

CX-BUILD Compilation Database alternative Build Prerequisite the CXBUILD uses linux system call trace utility called strace which was customized. So I

MongoDB utility to inflate the contents of small collection to a new larger collection

MongoDB Data Inflater ("data-inflater") The data-inflater tool is a MongoDB utility to automate the creation of a new large database collection using

A utility tool to create .env files

A utility tool to create .env files dump-env takes an .env.template file and some optional environmental variables to create a new .env file from thes

Comments
  • Format Python code with black

    Format Python code with black

    There appear to be some python formatting errors in 2711e4576fffbe5d0a141cdfa4163642537a8447. This pull request uses the black formatter to fix these issues.

    enhancement 
    opened by github-actions[bot] 0
  • SKIP function skips 1 lins less than it's supposed to.

    SKIP function skips 1 lins less than it's supposed to.

    Bug Description

    The SKIP function skips one line less then it's meant to.

    ie.

    SKIP 1
    some text
    some other text
    

    here it jumps to "some text".

    Reproduction Steps

    Type SKIP 1 Type 2 more lines after it. behold the result

    Expected Result

    SKIP entirely ignores the first text line.

    Actual Result

    SKIP does nothing leading it to end at line 1.

    Attachments

    Additional Info

    bug 
    opened by EnokiUN 0
  • Add a @custom_function decorator to the Story class

    Add a @custom_function decorator to the Story class

    Add a @custom_function decorator to the Story class that works by adding the function to the Story object's local function_dict to be more flexible and help with customization.

    enhancement 
    opened by EnokiUN 0
  • TODO

    TODO

    TODO v0.5.0

    No Current Ideas for what to do

    TODO v0.4.0

    Features:

    • [x] Adding a function function and a function system

    • [ ] Expanding Utils & Math

    • [ ] Adding Something Like UTILS ADD {{arg1, arg2}} while UTILS ADD arg1, arg2 can still be used

    Bug Fixes:

    • [x] Fixing Chain Functions

    • [x] Make Utils Work Better and Properly "how utils works is bad and sometimes errors out because it doesn't properly run the functions if supplied functions that is"

    bug documentation enhancement help wanted good first issue question 
    opened by VincentRPS 2
Releases(v1.0-rc1)
  • v1.0-rc1(Jan 11, 2022)

  • v0.4.0-rc1(Dec 13, 2021)

    Candidate

    Since this is a candidate you have to install it abnormally:

    pip install -U git+https://github.com/EnokiUN/psup/tree/v0.4.0-rc1
    

    What's Changed

    • SUP - > PSUP (Review it) by @GreenArron in https://github.com/EnokiUN/psup/pull/25
    • discord logo by @GreenArron in https://github.com/EnokiUN/psup/pull/26
    • Ehm by @VincentRPS in https://github.com/EnokiUN/psup/pull/28
    • We aren’t alpha males by @VincentRPS in https://github.com/EnokiUN/psup/pull/29
    • Mam I use pycharm by @VincentRPS in https://github.com/EnokiUN/psup/pull/30
    • minimal changes to text by @GreenArron in https://github.com/EnokiUN/psup/pull/33
    • Adding Typed by @VincentRPS in https://github.com/EnokiUN/psup/pull/37
    • MANIFEST by @VincentRPS in https://github.com/EnokiUN/psup/pull/36
    • Resuning To change by @VincentRPS in https://github.com/EnokiUN/psup/pull/35
    • proudly show our discord server at top by @GreenArron in https://github.com/EnokiUN/psup/pull/39
    • logos hermanos by @GreenArron in https://github.com/EnokiUN/psup/pull/40
    • PSUP v0.4.0 by @VincentRPS in https://github.com/EnokiUN/psup/pull/41
    • Adding Contributing Guidelines by @VincentRPS in https://github.com/EnokiUN/psup/pull/27
    • Fix API Docs by @VincentRPS in https://github.com/EnokiUN/psup/pull/42
    • New Docs Theme by @VincentRPS in https://github.com/EnokiUN/psup/pull/44
    • Format Python code with black by @github-actions in https://github.com/EnokiUN/psup/pull/45
    • v0.4.0-rc1 by @VincentRPS in https://github.com/EnokiUN/psup/pull/46

    New Contributors

    • @github-actions made their first contribution in https://github.com/EnokiUN/psup/pull/45

    Full Changelog: https://github.com/EnokiUN/psup/compare/v0.2a...v0.4.0-rc1

    Source code(tar.gz)
    Source code(zip)
  • v0.2a(Nov 21, 2021)

    Added a cli for quick use Added doccumentation at readthedocs.io Added some new features.

    What's Changed

    • adding logo.png by @GreenArron in https://github.com/EnokiUN/sup/pull/16
    • adding placeholder main.py by @GreenArron in https://github.com/EnokiUN/sup/pull/17
    • Adding CLI to the package by @GreenArron in https://github.com/EnokiUN/sup/pull/18
    • changing "--online-story" to "-online" by @GreenArron in https://github.com/EnokiUN/sup/pull/19
    • Pollos Hermanos by @GreenArron in https://github.com/EnokiUN/sup/pull/20

    Full Changelog: https://github.com/EnokiUN/sup/compare/v0.1.1a...v0.2a

    Source code(tar.gz)
    Source code(zip)
  • v0.1.1a(Nov 19, 2021)

    The first release

    Added all the basic SUP and SUS functionality including the functions.

    read the README.md file for more info

    v0.1.2a release & features planned.

    What's Changed

    • endorsement by @sexnine in https://github.com/EnokiUN/sup/pull/1
    • yes by @GreenArron in https://github.com/EnokiUN/sup/pull/2
    • sussy story for testing added by @GreenArron in https://github.com/EnokiUN/sup/pull/3
    • Rename sup.py to main.py by @VincentRPS in https://github.com/EnokiUN/sup/pull/4
    • Totally not stealing discord’s.pys setup by @VincentRPS in https://github.com/EnokiUN/sup/pull/5
    • Finished the sussystory + minor changes to main by @GreenArron in https://github.com/EnokiUN/sup/pull/6

    New Contributors

    • @sexnine made their first contribution in https://github.com/EnokiUN/sup/pull/1
    • @GreenArron made their first contribution in https://github.com/EnokiUN/sup/pull/2
    • @VincentRPS made their first contribution in https://github.com/EnokiUN/sup/pull/4

    Full Changelog: https://github.com/EnokiUN/sup/commits/v0.1.1a

    Source code(tar.gz)
    Source code(zip)
Owner
Enoki
Just a weeb who has a gaming addiction and likes to code stuff.
Enoki
A Python package for floating-point binary fractions. Do math in base 2!

An implementation of a floating-point binary fractions class and module in Python. Work with binary fractions and binary floats with ease!

10 Oct 29, 2022
This is discord nitro code generator and checker made with python. This will generate nitro codes and checks if the code is valid or not. If code is valid then it will print the code leaving 2 lines and if not then it will print '*'.

Discord Nitro Generator And Checker ⚙️ Rᴜɴ Oɴ Rᴇᴘʟɪᴛ 🛠️ Lᴀɴɢᴜᴀɢᴇs Aɴᴅ Tᴏᴏʟs If you are taking code from this repository without a fork, then atleast

Vɪɴᴀʏᴀᴋ Pᴀɴᴅᴇʏ 37 Jan 07, 2023
Customized python validations.

A customized python validations.

Wilfred V. Pine 2 Apr 20, 2022
Rabbito is a mini tool to find serialized objects in input values

Rabbito-ObjectFinder Rabbito is a mini tool to find serialized objects in input values What does Rabbito do Rabbito has the main object finding Serial

7 Dec 13, 2021
A simple tool to move and rename Nvidia Share recordings to a more sensible format.

A simple tool to move and rename Nvidia Share recordings to a more sensible format.

Jasper Rebane 8 Dec 23, 2022
Cardano Stakepools: Check for scheduled blocks in current epoch.

ReLeaderLogs For Cardano Stakepool Operators: Lightweight Scheduled Blocks Checker for Current Epoch. No cardano-node Required, data is taken from blo

SNAKE (Cardano Stakepool) 2 Oct 19, 2021
This repository contains scripts that help you validate QR codes.

Validation tools This repository contains scripts that help you validate QR codes. It's hacky, and a warning for Apple Silicon users: the dependencies

Ryan Barrett 8 Mar 01, 2022
Random Number Generator

Application for generating a random number.

Michael J Bailey 1 Oct 12, 2021
Password generator

Password generator technologies used What is? It is Password generator How to Download? Download on releases Clone repo git clone https://github.com/m

Miek 1 Nov 02, 2021
Brainfuck rollup scaling experiment for fun

Optimistic Brainfuck Ever wanted to run Brainfuck on ethereum? Don't ask, now you can! And at a fraction of the cost, thanks to optimistic rollup tech

Diederik Loerakker 48 Dec 28, 2022
Multipurpose Growtopia Server tools, can be used for newbie to learn things.

Information Multipurpose Growtopia Server tools, can be used for newbie to learn things. Requirements - Python 3.x - Operating System (Recommended : W

Morphias 2 Oct 29, 2021
Gradually automate your procedures, one step at a time

Gradualist Gradually automate your procedures, one step at a time Inspired by https://blog.danslimmon.com/2019/07/15/ Features Main Features Converts

Ross Jacobs 8 Jul 24, 2022
A python tool give n number of inputs and parallelly you will get a output by separetely

http-status-finder Hello Everyone!! This is kavisurya, In this tool you can give n number of inputs and parallelly you will get a output by separetely

KAVISURYA V 3 Dec 05, 2021
Use generator for range function

Use the generator for the range function! installation method: pip install yrange How to use: First import yrange in your application. You can then wo

1 Oct 28, 2021
UUID version 7, which are time-sortable (following the Peabody RFC4122 draft)

uuid7 - time-sortable UUIDs This module implements the version 7 UUIDs, proposed by Peabody and Davis in https://www.ietf.org/id/draft-peabody-dispatc

Steve Simmons 22 Dec 20, 2022
pydsinternals - A Python native library containing necessary classes, functions and structures to interact with Windows Active Directory.

pydsinternals - Directory Services Internals Library A Python native library containing necessary classes, functions and structures to interact with W

Podalirius 36 Dec 14, 2022
A pythonic dependency injection library.

Pinject Pinject is a dependency injection library for python. The primary goal of Pinject is to help you assemble objects into graphs in an easy, main

Google 1.3k Dec 30, 2022
Create password - Generate Random Password with Passphrase

Generate Random Password with Passphrase This is a python code to generate stron

1 Jan 18, 2022
Library for processing molecules and reactions in python way

Chython [ˈkʌɪθ(ə)n] Library for processing molecules and reactions in python way. Features: Read/write/convert formats: MDL .RDF (.RXN) and .SDF (.MOL

16 Dec 01, 2022
ticktock is a minimalist library to view Python time performance of Python code.

ticktock is a minimalist library to view Python time performance of Python code.

Victor Benichoux 30 Sep 28, 2022