Hands-On Usage
transfer_ship is commonly used in historical event mods to simulate realistic naval transfers, such as Britain transferring warships to allied navies or distributing fleets to newly formed nations during civil wars or secessions. The following example simulates Britain transferring the light cruiser "HMS Achilles" to New Zealand:
# In an option within a country_event
ENG = {
transfer_ship = {
prefer_name = "HMS Achilles"
type = light_cruiser
target = NZL
exclude_refitting = yes
}
}
Synergy
[create_ship](/wiki/effect/create_ship) — Create a named ship for the source nation before the transfer to ensure the target ship specified by prefer_name actually exists, avoiding transfers of non-existent fleets.
[destroy_ships](/wiki/effect/destroy_ships) — When the narrative requires "transferring wreckage after sinking" or cleaning up surplus vessels, you can destroy specific ship types after the transfer to maintain realistic fleet sizes.
[has_country_flag](/wiki/trigger/has_country_flag) — Use flags to check conditions before triggering the transfer event (such as diplomatic agreements being signed), preventing duplicate transfer logic execution.
[add_opinion_modifier](/wiki/effect/add_opinion_modifier) — Add relationship modifiers to both parties after the transfer completes, reflecting the diplomatic benefits of military aid.
Common Pitfalls
prefer_name matching failure produces no error and transfers a random ship instead — If the source nation doesn't actually have a ship with that name (for example, the ship has sunk or was never built), the game silently defaults to randomly selecting one by type, resulting in unexpected outcomes. Always pair this with create_ship or verify in advance that the ship exists.
- Scope confusion reverses the transfer direction —
transfer_ship must be written within the source nation's scope; target is the receiving nation. Beginners often mistakenly place the entire block under the receiving nation's scope, causing the transfer direction to be completely reversed.