NotQuiteParadise2

Data

class Data(game: Game)

Bases: object

Raw data that doesnt change. Usually pulled from external files.

__init__(game: Game)
create_effect(data: Dict[str, Any], params: Dict[str:Any])

Return Effect from data found in data files

create_item(name: str)

Return Item by name

Parameters

name – Short name, same as the item filename without extension

Returns

New Item entity id

get_combat_occur_rate(id_: str) int

Get the combat occur rate based on the tier. Lower means less often.

get_event_occur_rate(id_: str) int

Get the event occur rate based on the tier. Lower means less often.

get_unit_occur_rate(unit_type: str) int

Get the unit occur rate based on the tier. Lower means less often.

get_units_by_category(factions: List[str], tiers: List[int] = None) List[str]

Return list of unit types for all units with a matching faction and tier.

load_all_data()

Reload all data

load_yaml(path: Union[str, pathlib.Path]) Any

Load YAML data with the SafeLoader