The git for the Python Story Utility Package library.

Related tags

Miscellaneouspsup
Overview

logo

PSUP, The Python Story Utility Package Module.

Discord server invite

PSUP helps making stories or games with options, diverging paths, different endings and so on.

You can run a story in a minimum of 2 lines of code / 1 terminal command.

from psup import Story

Story("YourStoryName").start()

psup yourstoryname

You can also run stories online without installing them or upload your own for others to play. You can find / upload stories in the GitHub repo's SUSMon folder.

from psup import OnlineStory

OnlineStory("OnlineStoryName").start()

psup onlinestoryname -online

The module has its own file extention (.sus standing for Story Utility Script) where all the other stuff including the story's script, options, endings, attributes and more are in a way designed to be fast and simple with basic syntax that's easy to learn and use for even people with little to no programming knowledge and skill allowing anyone to create their own stories.

Documentation

There is a readthedocs.io documentation which covers all this but with better and greater detail available here, feel free to check it out.

Installation:

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

Check out our pypi page!!

Requirements:

Python 3.8+ and that's it!

Usage:

Here's a basic 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 $$STORY 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 SUSMon 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 attributes to the player.
  • DELATTR Deleted attributes from the player.
  • CHECKATTR Checks if the player has all the specified attribute(s), if so it runs the function supplied by $$.
  • CHECKANYATTR Works similarly to CHECKATTR, difference is that it runs if the player has any of the specified attributes.
  • RANDOM Runs one of the specified functions at random.
  • SAY Says the provided text.

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.

discord
You might also like...
A Python utility belt containing simple tools, a stdlib like feel, and extra batteries. Hashing, Caching, Timing, Progress, and more made easy!
A Python utility belt containing simple tools, a stdlib like feel, and extra batteries. Hashing, Caching, Timing, Progress, and more made easy!

Ubelt is a small library of robust, tested, documented, and simple functions that extend the Python standard library. It has a flat API that all behav

Utility functions for working with data from Nix in Python

Pynixutil - Utility functions for working with data from Nix in Python Examples Base32 encoding/decoding import pynixutil input = "v5sv61sszx301i0x6x

System Information Utility With Python

System-Information-Utility This is a simple utility, for the terminal, which allows you to find out information about your PC. It's very easy to run t

A collection of daily usage utility scripts in python. Helps in automation of day to day repetitive tasks.
A collection of daily usage utility scripts in python. Helps in automation of day to day repetitive tasks.

Kush's Utils Tool is my personal collection of scripts which is used to automated daily tasks. It is a evergrowing collection of scripts and will continue to evolve till the day I program. This is also my first python project.

A Python Based Utility for Processing GST-Return JSON Files to Multiple Formats
A Python Based Utility for Processing GST-Return JSON Files to Multiple Formats

GSTR 1/2A Utility by Shan.tk Open Source GSTR 1/GSTR 2A JSON to Excel utility based on Python. Useful for Auditors in Verifying GSTR 1 Return Invoices

PyPIContents is an application that generates a Module Index from the Python Package Index (PyPI) and also from various versions of the Python Standard Library.

PyPIContents is an application that generates a Module Index from the Python Package Index (PyPI) and also from various versions of the Python Standar

SysCFG R/W Utility written in Swift

MagicCFG SysCFG R/W Utility written in Swift MagicCFG is one of our first, successful applications that we launched last year. The app makes it possib

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

A utility control surface for Ableton Live that makes the initialization of a Mixdown quick

Automate Mixdown initialization A script that transfers all the VSTs on your MIDI tracks to a new track so you can freeze your MIDI tracks and then co

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 Google sheet which keeps track of the locations that want to visit and a price cutoff

FlightDeals Here's how the program works. First, I have a Google sheet which keeps track of the locations that I want to visit and a price cutoff. It

Lynne Munini 5 Nov 21, 2022
Custom python interface to xstan (a modified (cmd)stan)

Custom python interface to xstan (a modified (cmd)stan) Use at your own risk, currently everything is very brittle and will probably be changed in the

2 Dec 16, 2021
A python script developed to process Windows memory images based on triage type.

Overview A python script developed to process Windows memory images based on triage type. Requirements Python3 Bulk Extractor Volatility2 with Communi

CrowdStrike 245 Nov 24, 2022
Remote Worker

Remote Worker Separation of Responsibilities There are several reasons to move some processing out of the main code base for security or performance:

V2EX 69 Dec 05, 2022
Un Assistente Vocale scritto in Python e altamente personalizzabile

Un Assistente Vocale scritto in Python e altamente personalizzabile

Marco 2 May 06, 2022
Academic planner application designed for students and counselors.

Academic planner application designed for students and counselors.

Ali bagheri 2 Dec 31, 2021
A Python script to convert your favorite TV series into an Anki deck.

Ankiniser A Python3.8 script to convert your favorite TV series into an Anki deck. How to install? Download the script with git or download it manualy

37 Nov 03, 2022
Exploiting Linksys WRT54G using a vulnerability I found.

Exploiting Linksys WRT54G Exploit # Install the requirements. pip install -r requirements.txt ROUTER_HOST=192.169.1.1 ROUTER_USERNAME=admin ROUTER_P

Elon Gliksberg 31 May 29, 2022
DRF magic links

drf-magic-links Installation pip install drf-magic-links Add URL patterns # urls.py

Dmitry Kalinin 1 Nov 07, 2021
Blender-3D-SH-Dma-plugin - Import and export Sonic Heroes Delta Morph animations (.anm) into Blender 3D

io_scene_sonic_heroes_dma This plugin for Blender 3D allows you to import and ex

Psycrow 3 Mar 22, 2022
This is a simple SV calling package for diploid assemblies.

dipdiff This is a simple SV calling package for diploid assemblies. It uses a modified version of svim-asm. The package includes its own version minim

Mikhail Kolmogorov 11 Jan 05, 2023
Launcher program to select which version of the Q-Sys software to launch.

QSC-QSYS Launcher Launcher program to select which version of the Q-Sys software to launch. Instructions To use the application simply save the "Q-Sys

Zach Lisko 2 Sep 28, 2022
A MCPI hack with many features.

Morpheus 2.0 A MCPI hack with many features To Use: You will need to install the keyboard, pysimplegui, and MCPI python modules and you will need to e

11 Oct 11, 2022
Interactive class notebooks for ECE4076 Computer Vision, weeks 1 - 6

ECE4076 Interactive class notebooks for ECE4076 Computer Vision, weeks 1 - 6. ECE4076 is a computer vision unit at Monash University, covering both cl

Michael Burke 9 Jun 16, 2022
resultados (data) de elecciones 2021 y código para extraer data de la ONPE

elecciones-peru-2021-ONPE Resultados (data) de elecciones 2021 y código para extraer data de la ONPE Data Licencia liberal, pero si vas a usarlo por f

Ragi Yaser Burhum 21 Jun 14, 2021
importlib_resources is a backport of Python standard library importlib.resources module for older Pythons.

importlib_resources is a backport of Python standard library importlib.resources module for older Pythons. The key goal of this module is to replace p

Python 36 Dec 13, 2022
Projeto job insights - Projeto avaliativo da Trybe do Bloco 32: Introdução à Python

Termos e acordos Ao iniciar este projeto, você concorda com as diretrizes do Código de Ética e Conduta e do Manual da Pessoa Estudante da Trybe. Boas

Lucas Muffato 1 Dec 09, 2021
SmartGrid - Een poging tot een optimale SmartGrid oplossing, door Dirk Kuiper & Lars Zwaan

SmartGrid - Een poging tot een optimale SmartGrid oplossing, door Dirk Kuiper & Lars Zwaan

1 Jan 12, 2022
Hopefully the the next-generation backend server of bgm.tv

Hopefully the the next-generation backend server of bgm.tv

Bangumi 475 Jan 01, 2023
My tools box script for sigma

sigma_python_toolbox My tools box script for sigma purpose My goal is not to replace sigma but to put at disposal the scripts that I think to help me

4 Jun 20, 2022