Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Runtime Docs Version 2.0.77

# MapSettings - Runtime Docs

## MapSettings :: LuaStruct

Various game-related settings. Updating any of the attributes will immediately take effect in the game engine.

## Attributes

### pollution :: Read|Write PollutionMapSettings

### enemy_evolution :: Read|Write EnemyEvolutionMapSettings

### enemy_expansion :: Read|Write EnemyExpansionMapSettings

### unit_group :: Read|Write UnitGroupMapSettings

### steering :: Read|Write SteeringMapSetting

### path_finder :: Read|Write PathFinderMapSettings

### asteroids :: Read|Write AsteroidMapSettings

### max_failed_behavior_count :: Read|Write uint32

If a behavior fails this many times, the enemy (or enemy group) is destroyed. This solves biters getting stuck within their own base.

#### Example

    -- Increase the number of short paths the pathfinder can cache.
    game.map_settings.path_finder.short_cache_size = 15

Concept used in

- LuaGameScript::map_settings