Skip to content

prestosilver/IP-Mod-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Infinite Progression Mod Docs

API Classes

BigNumber

import BigNumber

BigNumber(number)
# returns a BigNumber object with the value number

SeededRand

import SeededRand

Perlin(at)
# returns a random number from the seed, at position at

Word(num)
# gets a random word from rng at num

GameController

import GameController

GetRandOf(kind, defaultId, before)
# gets a random module of kind
# before the module id before
# defaults to defaultId if tries more than 100 times
# returns a GenericController object

GetAllOf(kind)
# gets a list of all modules of kind

GetSlider(id)
# gets a SliderController from the object id

GetData(id)
# gets the data from the module with id id

SetChance(name, chance)
# sets the chance of the mod name

GetChance(name)
# returns the chance of the mod name
# returns -2 if mod isn't loaded

Json

info.json

the fields are:

"name": the name of the module displayed in game
"description": the description of the module displayed in game
"main_file": the python file containing the data class and functions
"ui_file": the ui.json file name
"requires": a list of mods required by this one
"chance": the chance for the module to show, the actual chance is chance / total_chance, slider chance is always 10 total chance is the sum of all chances

ui.json

the fields are:

"buttons": a list of buttons each surrounded in {}
"slider": a list of sliders each surrounded in {}

ui.json button

the fields are:

"x", "y", "w", "h": the position of the button
"onClick": the name of the function to be called when the button is clicked, in python
"enable": the name of the function in python that returns wether the button is enabled

ui.json slider

the fields are:

"x", "y", "w", "h": the position of the slider
"variable": the name of the variable that shows progress between 0 and 1 of the bar

ui.json text

the fields are:

"x", "y", "w", "h": the position of the text
"dynamic_text": a name of a function that returns a string containing the text
"static_text": the text the text shows, overwrites dynamic_text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages