Wiki

effect · set_naval_oob

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Registers an Order of Battle (OOB) file to be loaded for a country at game start, replacing any previously registered OOB (with key "naval") on that country.
Only intended to be used within history files.

Example:
set_naval_oob = "ENG_1936_Naval"

Hands-On Notes

Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.

Hands-On Usage

set_naval_oob is primarily used in historical mods to assign a naval OOB file for a specific nation at game start. It is commonly applied when modifying default naval compositions, adding historical nations, or completely restructuring a nation's initial fleet. The specified file path is relative to the history/units/ directory, and the filename does not require a file extension.

# In history/countries/ENG - United Kingdom.txt
set_naval_oob = "ENG_1936_Naval_Custom"

Synergy

  • [create_ship](/wiki/effect/create_ship): When ship variants in the OOB file require additional initial variant definitions, you can pre-create ship variants using this command within the same history file to ensure the variants exist when the OOB is loaded.
  • [create_equipment_variant](/wiki/effect/create_equipment_variant): Equipment variants referenced in naval OOB files must be registered beforehand. This command typically appears in the same history file block as set_naval_oob and is responsible for declaring ship models.
  • [has_capitulated](/wiki/trigger/has_capitulated): Before dynamically adjusting naval composition in events or decisions, you can use this trigger to check whether the target nation remains in an active state, avoiding invalid assignments.
  • [destroy_ships](/wiki/effect/destroy_ships): If you need to clear a nation's existing fleet before rebuilding it with a new OOB, you can use this command in conjunction within the same execution block.

Common Pitfalls

  1. Using outside history files: This command is officially documented for use only within history/ files. If placed in the effect block of events, decisions, or focuses, the game will have already completed initial loading, and the OOB will not be parsed correctly, resulting in no fleet generation.
  2. Incorrect OOB file path or case mismatch: Filenames are case-sensitive and must exactly match the actual filename under history/units/. Typos will result in the nation having no navy at game start, and error messages in the game log are easily overlooked.