nmmo.core.config module#

class nmmo.core.config.AllGameSystems#

Bases: Terrain, Resource, Combat, NPC, Progression, Item, Equipment, Profession, Exchange, Communication

COMBAT_DAMAGE_FORMULA(offense, defense, multiplier)#

Damage formula

COMBAT_MAGE_DAMAGE = 30#

Mage attack damage

COMBAT_MAGE_REACH = 3#

Reach of attacks using the Mage skill

COMBAT_MELEE_DAMAGE = 30#

Melee attack damage

COMBAT_MELEE_REACH = 3#

Reach of attacks using the Melee skill

COMBAT_RANGE_DAMAGE = 30#

Range attack damage

COMBAT_RANGE_REACH = 3#

Reach of attacks using the Range skill

COMBAT_SPAWN_IMMUNITY = 20#

Agents older than this many ticks cannot attack agents younger than this many ticks

COMBAT_STATUS_DURATION = 3#

Combat status lasts for this many ticks after the last combat event. Combat events include both attacking and being attacked.

COMBAT_SYSTEM_ENABLED = True#

Game system flag

COMBAT_WEAKNESS_MULTIPLIER = 1.5#

Multiplier for super-effective attacks

COMMUNICATION_NUM_TOKENS = 50#

Number of distinct COMM tokens

COMMUNICATION_SYSTEM_ENABLED = True#

Game system flag

EQUIPMENT_AMMUNITION_BASE_DAMAGE = 15#

Base ammunition damage

EQUIPMENT_AMMUNITION_LEVEL_DAMAGE = 15#

Added ammunition damage per level

EQUIPMENT_ARMOR_BASE_DEFENSE = 0#

Base armor defense

EQUIPMENT_ARMOR_LEVEL_DEFENSE = 10#

Base equipment defense

EQUIPMENT_SYSTEM_ENABLED = True#

Game system flag

EQUIPMENT_TOOL_BASE_DEFENSE = 30#

Base tool defense

EQUIPMENT_TOOL_LEVEL_DEFENSE = 0#

Added tool defense per level

EQUIPMENT_WEAPON_BASE_DAMAGE = 15#

Base weapon damage

EQUIPMENT_WEAPON_LEVEL_DAMAGE = 15#

Added weapon damage per level

EXCHANGE_BASE_GOLD = 1#

Initial gold amount

EXCHANGE_LISTING_DURATION = 5#

The number of ticks, during which the item is listed for sale

EXCHANGE_SYSTEM_ENABLED = True#

Game system flag

property INVENTORY_N_OBS#

Number of distinct item observations

ITEM_ALLOW_GIFT = True#

Whether agents can give gold/item to each other

ITEM_INVENTORY_CAPACITY = 12#

Number of inventory spaces

ITEM_N = 17#

Number of unique base item classes

ITEM_SYSTEM_ENABLED = True#

Game system flag

property MARKET_N_OBS#

Number of distinct item observations

NPC_BASE_DAMAGE = 15#

Base NPC damage

NPC_BASE_DEFENSE = 0#

Base NPC defense

NPC_LEVEL_DAMAGE = 30#

Bonus NPC damage per level

NPC_LEVEL_DEFENSE = 30#

Bonus NPC defense per level

NPC_LEVEL_MAX = 10#

Maximum NPC level

NPC_LEVEL_MIN = 1#

Minimum NPC level

NPC_N = None#

Maximum number of NPCs spawnable in the environment

NPC_SPAWN_AGGRESSIVE = 0.8#

Percentage distance threshold from spawn for aggressive NPCs

NPC_SPAWN_ATTEMPTS = 25#

Number of NPC spawn attempts per tick

NPC_SPAWN_NEUTRAL = 0.5#

Percentage distance threshold from spawn for neutral NPCs

NPC_SPAWN_PASSIVE = 0.0#

Percentage distance threshold from spawn for passive NPCs

NPC_SYSTEM_ENABLED = True#

Game system flag

PRICE_N_OBS = 99#

Number of distinct price observations This also determines the maximum price one can set for an item

static PROFESSION_CONSUMABLE_RESTORE(level)#
PROFESSION_CRYSTAL_CAPACITY = 1#

Maximum number of harvests before a crystal tile decays

PROFESSION_CRYSTAL_RESPAWN = 0.1#

Probability that a harvested crystal tile will regenerate each tick

PROFESSION_FISH_CAPACITY = 1#

Maximum number of harvests before a fish tile decays

PROFESSION_FISH_RESPAWN = 0.01#

Probability that a harvested fish tile will regenerate each tick

PROFESSION_HERB_CAPACITY = 1#

Maximum number of harvests before an herb tile decays

PROFESSION_HERB_RESPAWN = 0.01#

Probability that a harvested herb tile will regenerate each tick

PROFESSION_ORE_CAPACITY = 1#

Maximum number of harvests before an ore tile decays

PROFESSION_ORE_RESPAWN = 0.1#

Probability that a harvested ore tile will regenerate each tick

PROFESSION_SYSTEM_ENABLED = True#

Game system flag

PROFESSION_TREE_CAPACITY = 1#

Maximum number of harvests before a tree tile decays

PROFESSION_TREE_RESPAWN = 0.105#

Probability that a harvested tree tile will regenerate each tick

PROGRESSION_AMMUNITION_XP_SCALE = 1#

Multiplier on top of XP_SCALE for Prospecting, Carving, and Alchemy

PROGRESSION_BASE_DEFENSE = 0#

Base defense

PROGRESSION_BASE_LEVEL = 1#

Initial skill level

PROGRESSION_BASE_XP_SCALE = 1#

Base XP awarded for each skill usage – multiplied by skill level

PROGRESSION_COMBAT_XP_SCALE = 1#

Multiplier on top of XP_SCALE for Melee, Range, and Mage

PROGRESSION_CONSUMABLE_XP_SCALE = 5#

Multiplier on top of XP_SCALE for Fishing and Herbalism

PROGRESSION_LEVEL_DEFENSE = 5#

Bonus defense per level

PROGRESSION_LEVEL_MAX = 10#

Max skill level

PROGRESSION_MAGE_BASE_DAMAGE = 0#

Base Mage attack damage

PROGRESSION_MAGE_LEVEL_DAMAGE = 5#

Bonus Mage attack damage per level

PROGRESSION_MELEE_BASE_DAMAGE = 0#

Base Melee attack damage

PROGRESSION_MELEE_LEVEL_DAMAGE = 5#

Bonus Melee attack damage per level

PROGRESSION_RANGE_BASE_DAMAGE = 0#

Base Range attack damage

PROGRESSION_RANGE_LEVEL_DAMAGE = 5#

Bonus Range attack damage per level

PROGRESSION_SYSTEM_ENABLED = True#

Game system flag

RESOURCE_BASE = 100#

Initial level and capacity for food and water

RESOURCE_DEHYDRATION_RATE = 10#

Damage per tick without water

RESOURCE_DEPLETION_RATE = 5#

Depletion rate for food and water

RESOURCE_FOILAGE_CAPACITY = 1#

Maximum number of harvests before a foilage tile decays

RESOURCE_FOILAGE_RESPAWN = 0.025#

Probability that a harvested foilage tile will regenerate each tick

RESOURCE_HARVEST_RESTORE_FRACTION = 1.0#

Fraction of maximum capacity restored upon collecting a resource

RESOURCE_HEALTH_REGEN_THRESHOLD = 0.5#

Fraction of maximum resource capacity required to regen health

RESOURCE_HEALTH_RESTORE_FRACTION = 0.1#

Fraction of health restored per tick when above half food+water

RESOURCE_STARVATION_RATE = 10#

Damage per tick without food

RESOURCE_SYSTEM_ENABLED = True#

Game system flag

TERRAIN_FLIP_SEED = False#

Whether to negate the seed used for generation (useful for unique heldout maps)

TERRAIN_FOILAGE = 0.85#

Noise threshold for foilage (food tile)

TERRAIN_FREQUENCY = -3#

Base noise frequency range (log2 space)

TERRAIN_FREQUENCY_OFFSET = 7#

Noise frequency octave offset (log2 space)

TERRAIN_GRASS = 0.7#

Noise threshold for grass

TERRAIN_LOG_INTERPOLATE_MAX = 0#

Maximum interpolation log-strength for noise frequencies

TERRAIN_LOG_INTERPOLATE_MIN = -2#

Minimum interpolation log-strength for noise frequencies

TERRAIN_SYSTEM_ENABLED = True#

Game system flag

TERRAIN_TILES_PER_OCTAVE = 8#

Number of octaves sampled from log2 spaced TERRAIN_FREQUENCY range

TERRAIN_VOID = 0.0#

Noise threshold for void generation

TERRAIN_WATER = 0.3#

Noise threshold for water generation

WEAPON_DROP_PROB = 0.025#

Chance of getting a weapon while harvesting ammunition

class nmmo.core.config.Combat#

Bases: object

Combat Game System

COMBAT_DAMAGE_FORMULA(offense, defense, multiplier)#

Damage formula

COMBAT_MAGE_DAMAGE = 30#

Mage attack damage

COMBAT_MAGE_REACH = 3#

Reach of attacks using the Mage skill

COMBAT_MELEE_DAMAGE = 30#

Melee attack damage

COMBAT_MELEE_REACH = 3#

Reach of attacks using the Melee skill

COMBAT_RANGE_DAMAGE = 30#

Range attack damage

COMBAT_RANGE_REACH = 3#

Reach of attacks using the Range skill

COMBAT_SPAWN_IMMUNITY = 20#

Agents older than this many ticks cannot attack agents younger than this many ticks

COMBAT_STATUS_DURATION = 3#

Combat status lasts for this many ticks after the last combat event. Combat events include both attacking and being attacked.

COMBAT_SYSTEM_ENABLED = True#

Game system flag

COMBAT_WEAKNESS_MULTIPLIER = 1.5#

Multiplier for super-effective attacks

class nmmo.core.config.Communication#

Bases: object

Exchange Game System

COMMUNICATION_NUM_TOKENS = 50#

Number of distinct COMM tokens

COMMUNICATION_SYSTEM_ENABLED = True#

Game system flag

class nmmo.core.config.Config#

Bases: Template

An environment configuration object

Global constants are defined as static class variables. You can override any Config variable using standard CLI syntax (e.g. –NENT=128).

The default config as of v1.5 uses 1024x1024 maps with up to 2048 agents and 1024 NPCs. It is suitable to time horizons of 8192+ steps. For smaller experiments, consider the SmallMaps config.

Notes:

We use Google Fire internally to replace standard manual argparse definitions for each Config property. This means you can subclass Config to add new static attributes – CLI definitions will be generated automatically.

BASE_HEALTH = 10#

Initial Constitution level and agent health

EMULATE_CONST_HORIZON = False#

Emulate a constant HORIZON simulations steps

EMULATE_CONST_PLAYER_N = False#

Emulate a constant number of agents

EMULATE_FLAT_ATN = False#

Emulate a flat action space

EMULATE_FLAT_OBS = False#

Emulate a flat observation space

IMMORTAL = False#

Debug parameter: prevents agents from dying except by void

LOG_ENV = False#

Whether to log env steps (expensive)

LOG_EVENTS = True#

Whether to log events (semi-expensive)

LOG_FILE = None#

Where to write logs (defaults to console)

LOG_MILESTONES = True#

Whether to log server-firsts (semi-expensive)

LOG_VERBOSE = False#

Whether to log server messages or just stats

MAP_BORDER = 16#

Number of void border tiles surrounding each side of the map

MAP_CENTER = None#

Size of each map (number of tiles along each side)

MAP_FORCE_GENERATION = True#

Whether to regenerate and overwrite existing maps

MAP_GENERATE_PREVIEWS = False#

Whether map generation should also save .png previews (slow + large file size)

MAP_GENERATOR#

Specifies a user map generator. Uses default generator if unspecified.

alias of MapGenerator

MAP_N = 1#

Number of maps to generate

property MAP_N_OBS#

Number of distinct tile observations

MAP_N_TILE = 16#

Number of distinct terrain tile types

MAP_PREVIEW_DOWNSCALE = 1#

Downscaling factor for png previews

property MAP_SIZE#
PATH_CWD = '/workspaces/PufferTank/nmmo-beta-docs'#

Working directory

PATH_MAPS = None#

Generated map directory

PATH_MAP_SUFFIX = 'map{}/map.npy'#

Map file name

PATH_RESOURCE = '/workspace/nmmo-environment/nmmo/resource'#

Resource directory

PATH_ROOT = '/workspace/nmmo-environment/nmmo'#

Global repository directory

PATH_TILE = '/workspace/nmmo-environment/nmmo/resource/{}.png'#

Tile path – format me with tile name

PLAYERS = [<class 'nmmo.core.agent.Agent'>]#

Player classes from which to spawn

PLAYER_BASE_HEALTH = 100#

Initial agent health

PLAYER_DEATH_FOG = None#

How long before spawning death fog. None for no death fog

PLAYER_DEATH_FOG_FINAL_SIZE = 8#

Number of tiles from the center that the fog stops

PLAYER_DEATH_FOG_SPEED = 1#

Number of tiles per tick that the fog moves in

PLAYER_LOADER#

Agent loader class specifying spawn sampling

alias of SequentialLoader

PLAYER_N = None#

Maximum number of players spawnable in the environment

PLAYER_N_OBS = 100#

Number of distinct agent observations

property PLAYER_POLICIES#

Number of player policies

PLAYER_SPAWN_TEAMMATE_DISTANCE = 1#

Buffer tiles between teammates at spawn

property PLAYER_TEAM_SIZE#
property PLAYER_VISION_DIAMETER#

Size of the square tile crop visible to an agent

PLAYER_VISION_RADIUS = 7#

Number of tiles an agent can see in any direction

PROVIDE_ACTION_TARGETS = False#

Flag used to provide action targets mask

game_system_enabled(name) bool#
items()#
keys()#
override(**kwargs)#
print()#
set(k, v)#
values()#
class nmmo.core.config.Default#

Bases: Medium, AllGameSystems

BASE_HEALTH = 10#

Initial Constitution level and agent health

COMBAT_DAMAGE_FORMULA(offense, defense, multiplier)#

Damage formula

COMBAT_MAGE_DAMAGE = 30#

Mage attack damage

COMBAT_MAGE_REACH = 3#

Reach of attacks using the Mage skill

COMBAT_MELEE_DAMAGE = 30#

Melee attack damage

COMBAT_MELEE_REACH = 3#

Reach of attacks using the Melee skill

COMBAT_RANGE_DAMAGE = 30#

Range attack damage

COMBAT_RANGE_REACH = 3#

Reach of attacks using the Range skill

COMBAT_SPAWN_IMMUNITY = 20#

Agents older than this many ticks cannot attack agents younger than this many ticks

COMBAT_STATUS_DURATION = 3#

Combat status lasts for this many ticks after the last combat event. Combat events include both attacking and being attacked.

COMBAT_SYSTEM_ENABLED = True#

Game system flag

COMBAT_WEAKNESS_MULTIPLIER = 1.5#

Multiplier for super-effective attacks

COMMUNICATION_NUM_TOKENS = 50#

Number of distinct COMM tokens

COMMUNICATION_SYSTEM_ENABLED = True#

Game system flag

EMULATE_CONST_HORIZON = False#

Emulate a constant HORIZON simulations steps

EMULATE_CONST_PLAYER_N = False#

Emulate a constant number of agents

EMULATE_FLAT_ATN = False#

Emulate a flat action space

EMULATE_FLAT_OBS = False#

Emulate a flat observation space

EQUIPMENT_AMMUNITION_BASE_DAMAGE = 15#

Base ammunition damage

EQUIPMENT_AMMUNITION_LEVEL_DAMAGE = 15#

Added ammunition damage per level

EQUIPMENT_ARMOR_BASE_DEFENSE = 0#

Base armor defense

EQUIPMENT_ARMOR_LEVEL_DEFENSE = 10#

Base equipment defense

EQUIPMENT_SYSTEM_ENABLED = True#

Game system flag

EQUIPMENT_TOOL_BASE_DEFENSE = 30#

Base tool defense

EQUIPMENT_TOOL_LEVEL_DEFENSE = 0#

Added tool defense per level

EQUIPMENT_WEAPON_BASE_DAMAGE = 15#

Base weapon damage

EQUIPMENT_WEAPON_LEVEL_DAMAGE = 15#

Added weapon damage per level

EXCHANGE_BASE_GOLD = 1#

Initial gold amount

EXCHANGE_LISTING_DURATION = 5#

The number of ticks, during which the item is listed for sale

EXCHANGE_SYSTEM_ENABLED = True#

Game system flag

HORIZON = 1024#
IMMORTAL = False#

Debug parameter: prevents agents from dying except by void

property INVENTORY_N_OBS#

Number of distinct item observations

ITEM_ALLOW_GIFT = True#

Whether agents can give gold/item to each other

ITEM_INVENTORY_CAPACITY = 12#

Number of inventory spaces

ITEM_N = 17#

Number of unique base item classes

ITEM_SYSTEM_ENABLED = True#

Game system flag

LOG_ENV = False#

Whether to log env steps (expensive)

LOG_EVENTS = True#

Whether to log events (semi-expensive)

LOG_FILE = None#

Where to write logs (defaults to console)

LOG_MILESTONES = True#

Whether to log server-firsts (semi-expensive)

LOG_VERBOSE = False#

Whether to log server messages or just stats

MAP_BORDER = 16#

Number of void border tiles surrounding each side of the map

MAP_CENTER = 128#

Size of each map (number of tiles along each side)

MAP_FORCE_GENERATION = True#

Whether to regenerate and overwrite existing maps

MAP_GENERATE_PREVIEWS = False#

Whether map generation should also save .png previews (slow + large file size)

MAP_GENERATOR#

alias of MapGenerator

MAP_N = 1#

Number of maps to generate

property MAP_N_OBS#

Number of distinct tile observations

MAP_N_TILE = 16#

Number of distinct terrain tile types

MAP_PREVIEW_DOWNSCALE = 16#

Downscaling factor for png previews

property MAP_SIZE#
property MARKET_N_OBS#

Number of distinct item observations

NPC_BASE_DAMAGE = 15#

Base NPC damage

NPC_BASE_DEFENSE = 0#

Base NPC defense

NPC_LEVEL_DAMAGE = 30#

Bonus NPC damage per level

NPC_LEVEL_DEFENSE = 30#

Bonus NPC defense per level

NPC_LEVEL_MAX = 10#

Maximum NPC level

NPC_LEVEL_MIN = 1#

Minimum NPC level

NPC_LEVEL_SPREAD = 1#
NPC_N = 128#

Maximum number of NPCs spawnable in the environment

NPC_SPAWN_AGGRESSIVE = 0.8#

Percentage distance threshold from spawn for aggressive NPCs

NPC_SPAWN_ATTEMPTS = 25#

Number of NPC spawn attempts per tick

NPC_SPAWN_NEUTRAL = 0.5#

Percentage distance threshold from spawn for neutral NPCs

NPC_SPAWN_PASSIVE = 0.0#

Percentage distance threshold from spawn for passive NPCs

NPC_SYSTEM_ENABLED = True#

Game system flag

PATH_CWD = '/workspaces/PufferTank/nmmo-beta-docs'#

Working directory

PATH_MAPS = 'maps/medium'#

Generated map directory

PATH_MAP_SUFFIX = 'map{}/map.npy'#

Map file name

PATH_RESOURCE = '/workspace/nmmo-environment/nmmo/resource'#

Resource directory

PATH_ROOT = '/workspace/nmmo-environment/nmmo'#

Global repository directory

PATH_TILE = '/workspace/nmmo-environment/nmmo/resource/{}.png'#

Tile path – format me with tile name

PLAYERS = [<class 'nmmo.core.agent.Agent'>]#

Player classes from which to spawn

PLAYER_BASE_HEALTH = 100#

Initial agent health

PLAYER_DEATH_FOG = None#

How long before spawning death fog. None for no death fog

PLAYER_DEATH_FOG_FINAL_SIZE = 8#

Number of tiles from the center that the fog stops

PLAYER_DEATH_FOG_SPEED = 1#

Number of tiles per tick that the fog moves in

PLAYER_LOADER#

alias of SequentialLoader

PLAYER_N = 128#

Maximum number of players spawnable in the environment

PLAYER_N_OBS = 100#

Number of distinct agent observations

property PLAYER_POLICIES#

Number of player policies

PLAYER_SPAWN_TEAMMATE_DISTANCE = 1#

Buffer tiles between teammates at spawn

property PLAYER_TEAM_SIZE#
property PLAYER_VISION_DIAMETER#

Size of the square tile crop visible to an agent

PLAYER_VISION_RADIUS = 7#

Number of tiles an agent can see in any direction

PRICE_N_OBS = 99#

Number of distinct price observations This also determines the maximum price one can set for an item

static PROFESSION_CONSUMABLE_RESTORE(level)#
PROFESSION_CRYSTAL_CAPACITY = 1#

Maximum number of harvests before a crystal tile decays

PROFESSION_CRYSTAL_RESPAWN = 0.1#

Probability that a harvested crystal tile will regenerate each tick

PROFESSION_FISH_CAPACITY = 1#

Maximum number of harvests before a fish tile decays

PROFESSION_FISH_RESPAWN = 0.01#

Probability that a harvested fish tile will regenerate each tick

PROFESSION_HERB_CAPACITY = 1#

Maximum number of harvests before an herb tile decays

PROFESSION_HERB_RESPAWN = 0.01#

Probability that a harvested herb tile will regenerate each tick

PROFESSION_ORE_CAPACITY = 1#

Maximum number of harvests before an ore tile decays

PROFESSION_ORE_RESPAWN = 0.1#

Probability that a harvested ore tile will regenerate each tick

PROFESSION_SYSTEM_ENABLED = True#

Game system flag

PROFESSION_TREE_CAPACITY = 1#

Maximum number of harvests before a tree tile decays

PROFESSION_TREE_RESPAWN = 0.105#

Probability that a harvested tree tile will regenerate each tick

PROGRESSION_AMMUNITION_XP_SCALE = 1#

Multiplier on top of XP_SCALE for Prospecting, Carving, and Alchemy

PROGRESSION_BASE_DEFENSE = 0#

Base defense

PROGRESSION_BASE_LEVEL = 1#

Initial skill level

PROGRESSION_BASE_XP_SCALE = 1#

Base XP awarded for each skill usage – multiplied by skill level

PROGRESSION_COMBAT_XP_SCALE = 1#

Multiplier on top of XP_SCALE for Melee, Range, and Mage

PROGRESSION_CONSUMABLE_XP_SCALE = 5#

Multiplier on top of XP_SCALE for Fishing and Herbalism

PROGRESSION_LEVEL_DEFENSE = 5#

Bonus defense per level

PROGRESSION_LEVEL_MAX = 10#

Max skill level

PROGRESSION_MAGE_BASE_DAMAGE = 0#

Base Mage attack damage

PROGRESSION_MAGE_LEVEL_DAMAGE = 5#

Bonus Mage attack damage per level

PROGRESSION_MELEE_BASE_DAMAGE = 0#

Base Melee attack damage

PROGRESSION_MELEE_LEVEL_DAMAGE = 5#

Bonus Melee attack damage per level

PROGRESSION_RANGE_BASE_DAMAGE = 0#

Base Range attack damage

PROGRESSION_RANGE_LEVEL_DAMAGE = 5#

Bonus Range attack damage per level

PROGRESSION_SPAWN_CLUSTERS = 64#
PROGRESSION_SPAWN_UNIFORMS = 256#
PROGRESSION_SYSTEM_ENABLED = True#

Game system flag

PROVIDE_ACTION_TARGETS = False#

Flag used to provide action targets mask

RESOURCE_BASE = 100#

Initial level and capacity for food and water

RESOURCE_DEHYDRATION_RATE = 10#

Damage per tick without water

RESOURCE_DEPLETION_RATE = 5#

Depletion rate for food and water

RESOURCE_FOILAGE_CAPACITY = 1#

Maximum number of harvests before a foilage tile decays

RESOURCE_FOILAGE_RESPAWN = 0.025#

Probability that a harvested foilage tile will regenerate each tick

RESOURCE_HARVEST_RESTORE_FRACTION = 1.0#

Fraction of maximum capacity restored upon collecting a resource

RESOURCE_HEALTH_REGEN_THRESHOLD = 0.5#

Fraction of maximum resource capacity required to regen health

RESOURCE_HEALTH_RESTORE_FRACTION = 0.1#

Fraction of health restored per tick when above half food+water

RESOURCE_STARVATION_RATE = 10#

Damage per tick without food

RESOURCE_SYSTEM_ENABLED = True#

Game system flag

TERRAIN_FLIP_SEED = False#

Whether to negate the seed used for generation (useful for unique heldout maps)

TERRAIN_FOILAGE = 0.85#

Noise threshold for foilage (food tile)

TERRAIN_FREQUENCY = -3#

Base noise frequency range (log2 space)

TERRAIN_FREQUENCY_OFFSET = 7#

Noise frequency octave offset (log2 space)

TERRAIN_GRASS = 0.7#

Noise threshold for grass

TERRAIN_LOG_INTERPOLATE_MAX = 0#

Maximum interpolation log-strength for noise frequencies

TERRAIN_LOG_INTERPOLATE_MIN = -2#

Minimum interpolation log-strength for noise frequencies

TERRAIN_SYSTEM_ENABLED = True#

Game system flag

TERRAIN_TILES_PER_OCTAVE = 8#

Number of octaves sampled from log2 spaced TERRAIN_FREQUENCY range

TERRAIN_VOID = 0.0#

Noise threshold for void generation

TERRAIN_WATER = 0.3#

Noise threshold for water generation

WEAPON_DROP_PROB = 0.025#

Chance of getting a weapon while harvesting ammunition

game_system_enabled(name) bool#
items()#
keys()#
override(**kwargs)#
print()#
set(k, v)#
values()#
class nmmo.core.config.Equipment#

Bases: object

Equipment Game System

EQUIPMENT_AMMUNITION_BASE_DAMAGE = 15#

Base ammunition damage

EQUIPMENT_AMMUNITION_LEVEL_DAMAGE = 15#

Added ammunition damage per level

EQUIPMENT_ARMOR_BASE_DEFENSE = 0#

Base armor defense

EQUIPMENT_ARMOR_LEVEL_DEFENSE = 10#

Base equipment defense

EQUIPMENT_SYSTEM_ENABLED = True#

Game system flag

EQUIPMENT_TOOL_BASE_DEFENSE = 30#

Base tool defense

EQUIPMENT_TOOL_LEVEL_DEFENSE = 0#

Added tool defense per level

EQUIPMENT_WEAPON_BASE_DAMAGE = 15#

Base weapon damage

EQUIPMENT_WEAPON_LEVEL_DAMAGE = 15#

Added weapon damage per level

WEAPON_DROP_PROB = 0.025#

Chance of getting a weapon while harvesting ammunition

class nmmo.core.config.Exchange#

Bases: object

Exchange Game System

EXCHANGE_BASE_GOLD = 1#

Initial gold amount

EXCHANGE_LISTING_DURATION = 5#

The number of ticks, during which the item is listed for sale

EXCHANGE_SYSTEM_ENABLED = True#

Game system flag

property MARKET_N_OBS#

Number of distinct item observations

PRICE_N_OBS = 99#

Number of distinct price observations This also determines the maximum price one can set for an item

class nmmo.core.config.Item#

Bases: object

Inventory Game System

property INVENTORY_N_OBS#

Number of distinct item observations

ITEM_ALLOW_GIFT = True#

Whether agents can give gold/item to each other

ITEM_INVENTORY_CAPACITY = 12#

Number of inventory spaces

ITEM_N = 17#

Number of unique base item classes

ITEM_SYSTEM_ENABLED = True#

Game system flag

class nmmo.core.config.Large#

Bases: Config

A large config suitable for large-scale research or fast models

BASE_HEALTH = 10#

Initial Constitution level and agent health

EMULATE_CONST_HORIZON = False#

Emulate a constant HORIZON simulations steps

EMULATE_CONST_PLAYER_N = False#

Emulate a constant number of agents

EMULATE_FLAT_ATN = False#

Emulate a flat action space

EMULATE_FLAT_OBS = False#

Emulate a flat observation space

HORIZON = 8192#
IMMORTAL = False#

Debug parameter: prevents agents from dying except by void

LOG_ENV = False#

Whether to log env steps (expensive)

LOG_EVENTS = True#

Whether to log events (semi-expensive)

LOG_FILE = None#

Where to write logs (defaults to console)

LOG_MILESTONES = True#

Whether to log server-firsts (semi-expensive)

LOG_VERBOSE = False#

Whether to log server messages or just stats

MAP_BORDER = 16#

Number of void border tiles surrounding each side of the map

MAP_CENTER = 1024#

Size of each map (number of tiles along each side)

MAP_FORCE_GENERATION = True#

Whether to regenerate and overwrite existing maps

MAP_GENERATE_PREVIEWS = False#

Whether map generation should also save .png previews (slow + large file size)

MAP_GENERATOR#

alias of MapGenerator

MAP_N = 1#

Number of maps to generate

property MAP_N_OBS#

Number of distinct tile observations

MAP_N_TILE = 16#

Number of distinct terrain tile types

MAP_PREVIEW_DOWNSCALE = 64#

Downscaling factor for png previews

property MAP_SIZE#
NPC_LEVEL_MAX = 15#
NPC_LEVEL_SPREAD = 3#
NPC_N = 1024#
PATH_CWD = '/workspaces/PufferTank/nmmo-beta-docs'#

Working directory

PATH_MAPS = 'maps/large'#

Generated map directory

PATH_MAP_SUFFIX = 'map{}/map.npy'#

Map file name

PATH_RESOURCE = '/workspace/nmmo-environment/nmmo/resource'#

Resource directory

PATH_ROOT = '/workspace/nmmo-environment/nmmo'#

Global repository directory

PATH_TILE = '/workspace/nmmo-environment/nmmo/resource/{}.png'#

Tile path – format me with tile name

PLAYERS = [<class 'nmmo.core.agent.Agent'>]#

Player classes from which to spawn

PLAYER_BASE_HEALTH = 100#

Initial agent health

PLAYER_DEATH_FOG = None#

How long before spawning death fog. None for no death fog

PLAYER_DEATH_FOG_FINAL_SIZE = 8#

Number of tiles from the center that the fog stops

PLAYER_DEATH_FOG_SPEED = 1#

Number of tiles per tick that the fog moves in

PLAYER_LOADER#

alias of SequentialLoader

PLAYER_N = 1024#

Maximum number of players spawnable in the environment

PLAYER_N_OBS = 100#

Number of distinct agent observations

property PLAYER_POLICIES#

Number of player policies

PLAYER_SPAWN_TEAMMATE_DISTANCE = 1#

Buffer tiles between teammates at spawn

property PLAYER_TEAM_SIZE#
property PLAYER_VISION_DIAMETER#

Size of the square tile crop visible to an agent

PLAYER_VISION_RADIUS = 7#

Number of tiles an agent can see in any direction

PROGRESSION_SPAWN_CLUSTERS = 1024#
PROGRESSION_SPAWN_UNIFORMS = 4096#
PROVIDE_ACTION_TARGETS = False#

Flag used to provide action targets mask

game_system_enabled(name) bool#
items()#
keys()#
override(**kwargs)#
print()#
set(k, v)#
values()#
class nmmo.core.config.Medium#

Bases: Config

A medium config suitable for most academic-scale research

BASE_HEALTH = 10#

Initial Constitution level and agent health

EMULATE_CONST_HORIZON = False#

Emulate a constant HORIZON simulations steps

EMULATE_CONST_PLAYER_N = False#

Emulate a constant number of agents

EMULATE_FLAT_ATN = False#

Emulate a flat action space

EMULATE_FLAT_OBS = False#

Emulate a flat observation space

HORIZON = 1024#
IMMORTAL = False#

Debug parameter: prevents agents from dying except by void

LOG_ENV = False#

Whether to log env steps (expensive)

LOG_EVENTS = True#

Whether to log events (semi-expensive)

LOG_FILE = None#

Where to write logs (defaults to console)

LOG_MILESTONES = True#

Whether to log server-firsts (semi-expensive)

LOG_VERBOSE = False#

Whether to log server messages or just stats

MAP_BORDER = 16#

Number of void border tiles surrounding each side of the map

MAP_CENTER = 128#

Size of each map (number of tiles along each side)

MAP_FORCE_GENERATION = True#

Whether to regenerate and overwrite existing maps

MAP_GENERATE_PREVIEWS = False#

Whether map generation should also save .png previews (slow + large file size)

MAP_GENERATOR#

alias of MapGenerator

MAP_N = 1#

Number of maps to generate

property MAP_N_OBS#

Number of distinct tile observations

MAP_N_TILE = 16#

Number of distinct terrain tile types

MAP_PREVIEW_DOWNSCALE = 16#

Downscaling factor for png previews

property MAP_SIZE#
NPC_LEVEL_MAX = 10#
NPC_LEVEL_SPREAD = 1#
NPC_N = 128#
PATH_CWD = '/workspaces/PufferTank/nmmo-beta-docs'#

Working directory

PATH_MAPS = 'maps/medium'#

Generated map directory

PATH_MAP_SUFFIX = 'map{}/map.npy'#

Map file name

PATH_RESOURCE = '/workspace/nmmo-environment/nmmo/resource'#

Resource directory

PATH_ROOT = '/workspace/nmmo-environment/nmmo'#

Global repository directory

PATH_TILE = '/workspace/nmmo-environment/nmmo/resource/{}.png'#

Tile path – format me with tile name

PLAYERS = [<class 'nmmo.core.agent.Agent'>]#

Player classes from which to spawn

PLAYER_BASE_HEALTH = 100#

Initial agent health

PLAYER_DEATH_FOG = None#

How long before spawning death fog. None for no death fog

PLAYER_DEATH_FOG_FINAL_SIZE = 8#

Number of tiles from the center that the fog stops

PLAYER_DEATH_FOG_SPEED = 1#

Number of tiles per tick that the fog moves in

PLAYER_LOADER#

alias of SequentialLoader

PLAYER_N = 128#

Maximum number of players spawnable in the environment

PLAYER_N_OBS = 100#

Number of distinct agent observations

property PLAYER_POLICIES#

Number of player policies

PLAYER_SPAWN_TEAMMATE_DISTANCE = 1#

Buffer tiles between teammates at spawn

property PLAYER_TEAM_SIZE#
property PLAYER_VISION_DIAMETER#

Size of the square tile crop visible to an agent

PLAYER_VISION_RADIUS = 7#

Number of tiles an agent can see in any direction

PROGRESSION_SPAWN_CLUSTERS = 64#
PROGRESSION_SPAWN_UNIFORMS = 256#
PROVIDE_ACTION_TARGETS = False#

Flag used to provide action targets mask

game_system_enabled(name) bool#
items()#
keys()#
override(**kwargs)#
print()#
set(k, v)#
values()#
class nmmo.core.config.NPC#

Bases: object

NPC Game System

NPC_BASE_DAMAGE = 15#

Base NPC damage

NPC_BASE_DEFENSE = 0#

Base NPC defense

NPC_LEVEL_DAMAGE = 30#

Bonus NPC damage per level

NPC_LEVEL_DEFENSE = 30#

Bonus NPC defense per level

NPC_LEVEL_MAX = 10#

Maximum NPC level

NPC_LEVEL_MIN = 1#

Minimum NPC level

NPC_N = None#

Maximum number of NPCs spawnable in the environment

NPC_SPAWN_AGGRESSIVE = 0.8#

Percentage distance threshold from spawn for aggressive NPCs

NPC_SPAWN_ATTEMPTS = 25#

Number of NPC spawn attempts per tick

NPC_SPAWN_NEUTRAL = 0.5#

Percentage distance threshold from spawn for neutral NPCs

NPC_SPAWN_PASSIVE = 0.0#

Percentage distance threshold from spawn for passive NPCs

NPC_SYSTEM_ENABLED = True#

Game system flag

class nmmo.core.config.Profession#

Bases: object

Profession Game System

static PROFESSION_CONSUMABLE_RESTORE(level)#
PROFESSION_CRYSTAL_CAPACITY = 1#

Maximum number of harvests before a crystal tile decays

PROFESSION_CRYSTAL_RESPAWN = 0.1#

Probability that a harvested crystal tile will regenerate each tick

PROFESSION_FISH_CAPACITY = 1#

Maximum number of harvests before a fish tile decays

PROFESSION_FISH_RESPAWN = 0.01#

Probability that a harvested fish tile will regenerate each tick

PROFESSION_HERB_CAPACITY = 1#

Maximum number of harvests before an herb tile decays

PROFESSION_HERB_RESPAWN = 0.01#

Probability that a harvested herb tile will regenerate each tick

PROFESSION_ORE_CAPACITY = 1#

Maximum number of harvests before an ore tile decays

PROFESSION_ORE_RESPAWN = 0.1#

Probability that a harvested ore tile will regenerate each tick

PROFESSION_SYSTEM_ENABLED = True#

Game system flag

PROFESSION_TREE_CAPACITY = 1#

Maximum number of harvests before a tree tile decays

PROFESSION_TREE_RESPAWN = 0.105#

Probability that a harvested tree tile will regenerate each tick

class nmmo.core.config.Progression#

Bases: object

Progression Game System

PROGRESSION_AMMUNITION_XP_SCALE = 1#

Multiplier on top of XP_SCALE for Prospecting, Carving, and Alchemy

PROGRESSION_BASE_DEFENSE = 0#

Base defense

PROGRESSION_BASE_LEVEL = 1#

Initial skill level

PROGRESSION_BASE_XP_SCALE = 1#

Base XP awarded for each skill usage – multiplied by skill level

PROGRESSION_COMBAT_XP_SCALE = 1#

Multiplier on top of XP_SCALE for Melee, Range, and Mage

PROGRESSION_CONSUMABLE_XP_SCALE = 5#

Multiplier on top of XP_SCALE for Fishing and Herbalism

PROGRESSION_LEVEL_DEFENSE = 5#

Bonus defense per level

PROGRESSION_LEVEL_MAX = 10#

Max skill level

PROGRESSION_MAGE_BASE_DAMAGE = 0#

Base Mage attack damage

PROGRESSION_MAGE_LEVEL_DAMAGE = 5#

Bonus Mage attack damage per level

PROGRESSION_MELEE_BASE_DAMAGE = 0#

Base Melee attack damage

PROGRESSION_MELEE_LEVEL_DAMAGE = 5#

Bonus Melee attack damage per level

PROGRESSION_RANGE_BASE_DAMAGE = 0#

Base Range attack damage

PROGRESSION_RANGE_LEVEL_DAMAGE = 5#

Bonus Range attack damage per level

PROGRESSION_SYSTEM_ENABLED = True#

Game system flag

class nmmo.core.config.Resource#

Bases: object

Resource Game System

RESOURCE_BASE = 100#

Initial level and capacity for food and water

RESOURCE_DEHYDRATION_RATE = 10#

Damage per tick without water

RESOURCE_DEPLETION_RATE = 5#

Depletion rate for food and water

RESOURCE_FOILAGE_CAPACITY = 1#

Maximum number of harvests before a foilage tile decays

RESOURCE_FOILAGE_RESPAWN = 0.025#

Probability that a harvested foilage tile will regenerate each tick

RESOURCE_HARVEST_RESTORE_FRACTION = 1.0#

Fraction of maximum capacity restored upon collecting a resource

RESOURCE_HEALTH_REGEN_THRESHOLD = 0.5#

Fraction of maximum resource capacity required to regen health

RESOURCE_HEALTH_RESTORE_FRACTION = 0.1#

Fraction of health restored per tick when above half food+water

RESOURCE_STARVATION_RATE = 10#

Damage per tick without food

RESOURCE_SYSTEM_ENABLED = True#

Game system flag

class nmmo.core.config.Small#

Bases: Config

A small config for debugging and experiments with an expensive outer loop

BASE_HEALTH = 10#

Initial Constitution level and agent health

EMULATE_CONST_HORIZON = False#

Emulate a constant HORIZON simulations steps

EMULATE_CONST_PLAYER_N = False#

Emulate a constant number of agents

EMULATE_FLAT_ATN = False#

Emulate a flat action space

EMULATE_FLAT_OBS = False#

Emulate a flat observation space

HORIZON = 128#
IMMORTAL = False#

Debug parameter: prevents agents from dying except by void

LOG_ENV = False#

Whether to log env steps (expensive)

LOG_EVENTS = True#

Whether to log events (semi-expensive)

LOG_FILE = None#

Where to write logs (defaults to console)

LOG_MILESTONES = True#

Whether to log server-firsts (semi-expensive)

LOG_VERBOSE = False#

Whether to log server messages or just stats

MAP_BORDER = 16#

Number of void border tiles surrounding each side of the map

MAP_CENTER = 32#

Size of each map (number of tiles along each side)

MAP_FORCE_GENERATION = True#

Whether to regenerate and overwrite existing maps

MAP_GENERATE_PREVIEWS = False#

Whether map generation should also save .png previews (slow + large file size)

MAP_GENERATOR#

alias of MapGenerator

MAP_N = 1#

Number of maps to generate

property MAP_N_OBS#

Number of distinct tile observations

MAP_N_TILE = 16#

Number of distinct terrain tile types

MAP_PREVIEW_DOWNSCALE = 4#

Downscaling factor for png previews

property MAP_SIZE#
NPC_LEVEL_MAX = 5#
NPC_LEVEL_SPREAD = 1#
NPC_N = 32#
PATH_CWD = '/workspaces/PufferTank/nmmo-beta-docs'#

Working directory

PATH_MAPS = 'maps/small'#

Generated map directory

PATH_MAP_SUFFIX = 'map{}/map.npy'#

Map file name

PATH_RESOURCE = '/workspace/nmmo-environment/nmmo/resource'#

Resource directory

PATH_ROOT = '/workspace/nmmo-environment/nmmo'#

Global repository directory

PATH_TILE = '/workspace/nmmo-environment/nmmo/resource/{}.png'#

Tile path – format me with tile name

PLAYERS = [<class 'nmmo.core.agent.Agent'>]#

Player classes from which to spawn

PLAYER_BASE_HEALTH = 100#

Initial agent health

PLAYER_DEATH_FOG = None#

How long before spawning death fog. None for no death fog

PLAYER_DEATH_FOG_FINAL_SIZE = 8#

Number of tiles from the center that the fog stops

PLAYER_DEATH_FOG_SPEED = 1#

Number of tiles per tick that the fog moves in

PLAYER_LOADER#

alias of SequentialLoader

PLAYER_N = 64#

Maximum number of players spawnable in the environment

PLAYER_N_OBS = 100#

Number of distinct agent observations

property PLAYER_POLICIES#

Number of player policies

PLAYER_SPAWN_TEAMMATE_DISTANCE = 1#

Buffer tiles between teammates at spawn

property PLAYER_TEAM_SIZE#
property PLAYER_VISION_DIAMETER#

Size of the square tile crop visible to an agent

PLAYER_VISION_RADIUS = 7#

Number of tiles an agent can see in any direction

PROGRESSION_SPAWN_CLUSTERS = 4#
PROGRESSION_SPAWN_UNIFORMS = 16#
PROVIDE_ACTION_TARGETS = False#

Flag used to provide action targets mask

TERRAIN_LOG_INTERPOLATE_MIN = 0#
game_system_enabled(name) bool#
items()#
keys()#
override(**kwargs)#
print()#
set(k, v)#
values()#
class nmmo.core.config.Template#

Bases: object

items()#
keys()#
override(**kwargs)#
print()#
set(k, v)#
values()#
class nmmo.core.config.Terrain#

Bases: object

Terrain Game System

TERRAIN_FLIP_SEED = False#

Whether to negate the seed used for generation (useful for unique heldout maps)

TERRAIN_FOILAGE = 0.85#

Noise threshold for foilage (food tile)

TERRAIN_FREQUENCY = -3#

Base noise frequency range (log2 space)

TERRAIN_FREQUENCY_OFFSET = 7#

Noise frequency octave offset (log2 space)

TERRAIN_GRASS = 0.7#

Noise threshold for grass

TERRAIN_LOG_INTERPOLATE_MAX = 0#

Maximum interpolation log-strength for noise frequencies

TERRAIN_LOG_INTERPOLATE_MIN = -2#

Minimum interpolation log-strength for noise frequencies

TERRAIN_SYSTEM_ENABLED = True#

Game system flag

TERRAIN_TILES_PER_OCTAVE = 8#

Number of octaves sampled from log2 spaced TERRAIN_FREQUENCY range

TERRAIN_VOID = 0.0#

Noise threshold for void generation

TERRAIN_WATER = 0.3#

Noise threshold for water generation

nmmo.core.config.validate(config)#