Adventura is an open source Python Text Adventure Engine

Overview

Adventura

Adventura is an open source Python Text Adventure Engine, Not yet uploaded to PyPi (Developer build releasing soon 1-3 days 0.6.2)

Instructions:

LOADING ANIMATION:

to use a loading animation, use a class called cusload, which allows you to create a custom loading animation, powered by tqdm, this is how it works:

first digit must be the length of the loading animation, the second is the time it takes to load the next update. Example:

loading = cusload(3e5, 0.00001)

loading.cusanimation()

===========================================================

ADD ITEM:

to add an item name, just use class "item"

example:

key = Item("key")

===========================================================

ADD A LOCATION:

to add a location, use game.add_location

Example:

game = Game("Enter game title here")

room = Location("Random Room", """Enter description here""")

game.add_location(room)

===========================================================

INVENTORY:

to use the inventory, you can make an input that adds an item in a set called inventory

Example:

game = Game("Enter game title here")

room = Location("Random Room", """Enter description here""")

game.add_location(room)

key = Item("key")

room.add_item(key)

pick_up_key = ItemAction("Take Key", target_item=key)

room.add_activity(pick_up_key)

that was an example of adding an activity, which will auotomatically add an input in the output which will read the first slot in ItemAction(), which in this situation reads "Take Key". If the player chose that input, it will automatically add a key in the inventory

============================================================

Transition Action:

A transition action will make an input go to another room or location, that requires an item to go to the next location, it will check the inventory, if it doesn't have the required item, it wont give the option to leave

Example

this is the location

game = Game("Enter game title here")

room = Location("Random Room", """Enter description here""")

game.add_location(room)

this will add another location for the transition action

roomtwo = Location("Another room", """enter description here""")

game.add_location(roomtwo)

this will add an item in the location

key = Item("key")

room.add_item(key)

here is the item action

pick_up_key = ItemAction("Take Key", target_item=key)

here is the transition action

open_door = TransitionAction("Open Door", target_location=roomtwo, required_items=key)

Activities input

room.add_activity(pick_up_key)

room.add_activity(open_door)

NOTE: IF YOU WISH TO ADD A TRANSITION ACTION WHICH DOESN'T REQUIRE AN ITEM, THE required_item ARGUMENT HAS TO HAVE AN "=None" TO IT

LIKE THIS: required_items=None

You can use that argument multiple times to add multiple required items.

==========================================================

To start the game use game.start()

game.start()

If the final location is equal to the first, it will end the game with a print action.

You might also like...
Redlines produces a Markdown text showing the differences between two strings/text

Redlines Redlines produces a Markdown text showing the differences between two strings/text. The changes are represented with strike-throughs and unde

Paranoid text spacing in Python

pangu.py Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width charact

py-trans is a Free Python library for translate text into different languages.

Free Python library to translate text into different languages.

a python package that lets you add custom colors and text formatting to your scripts in a very easy way!
a python package that lets you add custom colors and text formatting to your scripts in a very easy way!

colormate Python script text formatting package What is colormate? colormate is a python library that lets you add text formatting to your scripts, it

Text Summarizationcls app with python

Text Summarizationcls app This is the repo for the Text Summarization AI Project. It makes use of pre-trained Hugging Face models Packages Used The pa

This is a text summarizing tool written in Python
This is a text summarizing tool written in Python

Summarize Written by: Ling Li Ya This is a text summarizing tool written in Python. User Guide Some things to note: The application is accessible here

ChirpText is a collection of text processing tools for Python 3.

ChirpText is a collection of text processing tools for Python 3. It is not meant to be a powerful tank like the popular NTLK but a small package which

Simple python program to auto credit your code, text, book, whatever!

Credit Simple python program to auto credit your code, text, book, whatever! Setup First change credit_text to whatever text you would like to credit

Parse Any Text With Python

ParseAnyText A small package to parse strings. What is the work of it? Well It's a module to creates parser that helps to parse a text easily with les

Owner
null
The Scary Story - A Text Adventure

This is a text adventure which I made in python 3. This is one of my first big projects so any feedback would be greatly appreciated.

null 2 Feb 20, 2022
box is a text-based visual programming language inspired by Unreal Engine Blueprint function graphs.

Box is a text-based visual programming language inspired by Unreal Engine blueprint function graphs. $ cat factorial.box ┌─ƒ(Factorial)───┐

Pranav 104 Dec 24, 2022
A Python app which can convert normal text to Handwritten text.

Text to HandWritten Text ✍️ Converter Watch Tutorial for this project Usage:- Clone my repository. Open CMD in working directory. Run following comman

Kushal Bhavsar 5 Dec 11, 2022
A python tool to convert Bangla Bijoy text to Unicode text.

Unicode Converter A python tool to convert Bangla Bijoy text to Unicode text. Installation Unicode Converter can be installed via PyPi. Make sure pip

Shahad Mahmud 10 Sep 29, 2022
Open-source linguistic ethnography tool for framing public opinion in mediatized groups.

Open-source linguistic ethnography tool for framing public opinion in mediatized groups. Table of Contents Installing Quickstart Links Installing Pyth

Qualichat 7 Jun 2, 2022
AnnIE - Annotation Platform, tool for open information extraction annotations using text files.

AnnIE - Annotation Platform, tool for open information extraction annotations using text files.

Niklas 29 Dec 20, 2022
Hspell, the free Hebrew spellchecker and morphology engine.

Hspell, the free Hebrew spellchecker and morphology engine.

null 16 Sep 15, 2022
Text to ASCII and ASCII to text

Text2ASCII Description This python script (converter.py) contains two functions: encode() is used to return a list of Integer, one item per character

null 4 Jan 22, 2022
strbind - lapidary text converter for translate an text file to the C-style string

strbind strbind - lapidary text converter for translate an text file to the C-style string. My motivation is fast adding large text chunks to the C co

Mihail Zaytsev 1 Oct 22, 2021
TextStatistics - Get a text file wich contains English text

TextStatistics This program get a text file wich contains English text. The program analyses the text, and print some information. For this program I

null 2 Nov 15, 2021