Defines

Version

This article has been verified for the current PC version (3.10) of the game.

**Defines** are variables used by the engine. They regulate basic game behaviors and settings that are not opened to scripting (the number of ethic points, camera field-of-view, …).

Defines are static and global: they apply to the whole game and cannot be changed dynamically.

Vanilla values are configured primarily in the file Stellaris/common/defines/00\_defines.txt, which contains more than 2000 variables affecting many areas of the game. Additional defines are found in Stellaris/common/defines/00\_defines\_additional\_content.txt and Stellaris/unchecked\_defines/00\_interface.txt.

## Modding Defines

### Setting up

In order to start modding defines in your mod, add a defines folder under common:

`common/defines`

1. Then copy 00\_defines.txt from the game folder
2. *rename the copy* (for example to 'example\_defines.txt') **Note: This is a crucial step you can not leave it as 00\_defines.txt or the game will crash.**
3. delete all content in your *copy*.

This ensures the file has the correct encoding (one of those nasty tripping stones one can encounter in modding Stellaris).

### Changing Properties

for **Version 1.8x**
Now, in order to change a property, all it takes is a single line per property. For example, let's assume you want to increase the number of leaders in the leader pool.

Looking through the original 00\_defines.txt file,

```
NGameplay = {
    LEADER_POOL_SIZE                   = 4           # Each leader pool will consist of this many leaders
}
```

And that's it.

For each additional property under the same section, simply add another line. For example, let's say we want to change the time leaders spend in pool, in that case, the whole text file could look like this:

```
NGameplay = {
    LEADER_POOL_SIZE                   = 4           # Each leader pool will consist of this many leaders
    LEADER_POOL_LEAD_TIME              = 5           # Years leaders will remain in the leader pool until replaced
}
```

It is also possible to add comments, same as in the original file - everything behind "#" will be ignored.

Here a full example of editing multiple places:

```
NGameplay = {
    LEADER_POOL_SIZE                   = 4           # Each leader pool will consist of this many leaders
    LEADER_POOL_LEAD_TIME              = 5           # Years leaders will remain in the leader pool until replaced
    LEADER_HIRING_COST                 = 50
    LEADER_BASE_CAP                    = 12          # Base or Starting Quantity of Assigned Leaders Allowed for your Empire

    GENERAL_DAMAGE_EXP_MULT            = 1.2         # Multiplier of how much damage translates into experience.
    GENERAL_DEFENSE_EXP_MULT           = 1.25        # Multiplier of how much defense translates into experience.

    TECH_COST_MULT_NUM_COLONIES        = 0.000       # Each Planet adds +X% tech cost
    TECH_COST_FREE_POPS                = 25          # First X pops do not add any tech cost
    TECH_COST_MULT_NUM_POPS            = 0.001       # Each non-free Pop adds +X% tech cost
}

NSpecies = {
    MAX_ETHIC_POINTS                   = 5           # Max Ethic Points (Allows me to use 5 instead of 3)
    MAX_TRAIT_POINTS                   = 2           # Max racial trait points
}

NPop = {
    PURGE_EXTERMINATION_MONTHS         = 120         # Number of months it takes to exterminate a population when using extermination purging
}
```

As you can see you can edit multiple lines of Various Sections by adding in that section the lines you want to edit.

## 00\_defines

### Camera

The following defines determine various camera elements.

### Graphics

The following defines determine various graphical elements.

### Gameplay

The following defines determine various game mechanics.

### Species

The following defines determine various species stats.

### Ship

The following defines determine various ship stats.

### Combat

The following defines determine various fleet combat stats.

### Pop

The following defines determine various pop stats.

### Army

The following defines determine various army stats.

### Economy

The following defines determine costs of various actions and other economy elements.

### AI

The following defines determine various base AI decision making.

## Unchecked defines

Defines in this folder are not considered for the checksum, and thus can be modified without affecting ironman or multiplayer compatibility.

### 00\_interface

#### Interface

The following defines determine various interface elements.