FANDOM


This article is updated for Update 14.

Modding Map Locations Edit

Map locations are defined in Objects.txt.

In this file you can define what kinds of map locations are available, their difficulty multiplier, enemy types and possible loot.

Note: Every map location must have a display name defined in the localization file Texts.txt using the following format:

objects.hospital.name=Hospital

Parent Edit

All map locations must have "objects.base.worldobject" as their parent:

objects.entity.church.parents=objects.base.worldobject

 Location Icon Edit

You may define the name of the icon to represent the map location in the toolbar. This value is optional, and defaults to "worldobject_hospital" where "hospital" is the location's ID.

Format:

objects.entity.school.sprite=worldobject_school

In the example above, the image named "worldobject_school" will be used to represent the "school" world object. This is also the default value for "school", so is not really needed.

Map location images are normally 128x128 pixels.

See Modding: Adding Images to Mods for more information on how to add new images.

Map Sets Edit

Map locations should define which combat map sets should be used for combat taking place in these locations using the following format:

objects.entity.school.mapsets.default.urban=true
objects.entity.school.mapsets.default.suburbs=true
objects.entity.school.mapsets.default.slums=true

In the example above, combat taking place in the "school" will select a combat map from one of the sets "urban", "suburbs" or "slums".

See Modding: Map Sets for more information on defining combat map sets.

Map Location Properties Edit

Map location may have the following properties:

Property Description Comments
misisons Missions available at this location.

Use "scavenge" to enable scavenging at this location.

Scavenge LootEdit

You may define static loot and random loot for every location. If both options exist at a location, they will be added together.

Random Loot Edit

Random loot is defined using the following format:

objects.entity.factory.loot.0.boards=15
objects.entity.factory.loot.0.bricks=40
objects.entity.factory.loot.200.scraps=15
objects.entity.factory.loot.200.metals=40

The numbers "0" and "200" represent the mission difficulty level. A "factory" with difficulty 0, but under 200, may contain bricks and boards. A "factory" with difficulty above 200, may contain scraps or metals. This way you can define different sets of items for different difficulty levels. This is in addition to an item's own minimum and maximum difficulty ratings, as explained in Modding: Items.

The value of each item (15 for boards, 40 for bricks, etc) represents the chance that the location will contain that item. The chances are all relative, so when choosing an item, an item with a chance of "2" will be chosen twice as often as an item with a chance of "1".

See Modding: Items for more information on defining items.

Preferred Loot Edit

Preferred loot works like random loot, except that at least one stack of this loot will always be found in this location type (minimum/maximum difficulty permitting).

objects.entity.hospital.preferredloot=researchkit

In this example, hospital locations will always have one researchkit, taking up one slot of random loot.

Static Loot Edit

Define static loot that is added to the random loot at this location using the following format:

objects.entity.hellgate.harvest.occult3=10

A "hellgate" location will always have 10 of the "occult3" item, regardless of the random generated items.

Enemy Generation Edit

Enemies are generated based on a difficulty level (see Modding: Enemies), which is determined by the biome, distance from the base and location type (with a random element). The difficulty formula itself is defined in the Config.txt file.

You can control the difficulty per location type using the following format:

objects.entity.hospital.difficultymul=1.5

This defines a "difficulty multiplier". A location type with multiplier 2 will generally have a difficulty level twice as high as a location type with multiplier of 1.

Enemy Types Edit

You can define what kind of enemies will be randomly generated per location using enemy tags. By default, all locations will have demons but not human enemies.

objects.entity.settlement.enemytags.demon=false
objects.entity.settlement.enemytags.human=true

In the example above we override the default values, and define that enemies tagged with "demon" will not occupy the settlement location, while enemies tagged with "human" will.

Static Enemies Edit

Define a list of static enemies for a location using the following format:

objects.entity.hellgate.enemygen=StaticEnemies
objects.entity.hellgate.staticenemies.1.possessed=4
objects.entity.hellgate.staticenemies.1.legion=3
objects.entity.hellgate.staticenemies.1.darkangel=2
objects.entity.hellgate.staticenemies.1.succubus=3
objects.entity.hellgate.staticenemies.2.succubus=3
objects.entity.hellgate.staticenemies.2.demon=3
objects.entity.hellgate.staticenemies.2.lich=2
objects.entity.hellgate.staticenemies.2.legion=2
objects.entity.hellgate.staticenemies.3.hellhound=4
objects.entity.hellgate.staticenemies.3.legion=3
objects.entity.hellgate.staticenemies.3.darkangel=3
objects.entity.hellgate.staticenemies.3.succubus=2

The first line configures this location to generate enemies statically from a list instead of using the regular formula described above.

The following lines define groups of enemies. The first group in the example above will consist of 4 possessed, 3 legions, 2 dark angels and 3 succubus. Groups patrol the map and become aggressive separately of each other.

Generating Map Locations Edit

See Modding: World Map Generation for more information on adding new map locations to the world map generation algorithm.