Skip to main content

A package for creating modd.io games using python!

Project description

Pymodd is a python package allowing for the creation of modd.io games in python!

Features

  • generate modd.io scripts with python

  • more coming soon? (pls help)

Installing

Python 3.8 or higher is required (i think)

To install the library run the following command:

# Linux/macOS
python3 -m pip install -U pymodd

# Windows
py -3 -m pip install -U pymodd

Getting Started

Export your modd game json file from the website and then generate a project by running this command:

generate-game {PATH TO GAME JSON FILE}

Quick Script Example

view examples/sample_scripts.py in the github repo for the full example

class EverySecond(Script):
    def __init__(self):
        self.triggers = [Trigger.EVERY_SECOND]
        self.actions = [
            IncreaseVariableByNumber(Variables.BOSS_TIMER, Number(1)),
            While(Condition(NumberOfUnitsOfUnitType(UnitTypes.FROG), '<', Number('5')), [
                CreateUnitForPlayerAtPosition(UnitTypes.FROG, Variables.AI, RandomPositionInRegion(EntireMapRegion()), Number(0)),
            ])
        ]
        self.order = 1

write_to_output(EverySecond())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymodd-0.1.4.tar.gz (15.2 kB view hashes)

Uploaded Source

Built Distribution

pymodd-0.1.4-py3-none-any.whl (17.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page