Skip to content

parameters.xml

libraries/parameters.xml is the per-class tuning + behaviour-tweaks file — the “constants of the universe”. It defines NPC role tags (which role plays which animation, what tag identifies a missionactor, etc.), ship/station defaults, friendly-fire tolerance per ship class, and many other engine-side knobs.

Vanilla parameters.xml is 2597 lines — second-largest config file after god.xml. Modders touching combat balance or NPC placement diff here.

<?xml version="1.0" encoding="utf-8"?>
<parameters xmlns:xsi="..."
xsi:noNamespaceSchemaLocation="parameters.xsd">
<playerflight>
<!-- player-flight tuning -->
</playerflight>
<classes>
<class id="ship">
<!-- class-specific defaults -->
</class>
<class id="station">
<!-- ... -->
</class>
</classes>
<slots>
<!-- NPC placement slot definitions -->
<slot tag="npc_missionactor">
<macros>
<macro name="character_x_missionactor_macro"/>
</macros>
</slot>
</slots>
</parameters>
Key tagTunes
<turnratecap>Max turn rate
<accelerationcap>Max acceleration
<boostpenalty>Boost shield-recharge penalty

Friendly-fire response, alert-level transitions, hull regen per ship class are defined here.

Maps NPC role tags (e.g. npc_missionactor, npc_aipilot) to character macros. Vanilla <slot tag="npc_missionactor"> defines what missionactor NPCs look like.

This is also where the two-layer entity icon distinction documented elsewhere applies: the character-head floater is set_entity_overrides icon=, but the ship-level marker is per-role here (e.g. missionactor → npc_missionactor).

”Soften friendly-fire response per ship class”

Section titled “”Soften friendly-fire response per ship class””
<replace
sel="//classes/class[@id='ship_m']/friendlyfire/@reactiondelay">
2.0
</replace>
<replace
sel="//classes/class[@id='ship_m']/friendlyfire/@reactiondecay">
2.0
</replace>

Pattern from mlog_friendly_fire_tweaks mod. Doubles delay and decay so NPCs don’t immediately turn hostile on accidental hits.

<add sel="//slots">
<slot tag="mlog_my_npc_type">
<macros>
<macro name="character_mlog_x_macro"/>
</macros>
</slot>
</add>

Adds a new NPC tag the mod can reference from MD.

<replace sel="//playerflight/turnratecap">
<turnratecap>5.0</turnratecap>
</replace>

For “faster turn for player ship” mod (rarely needed; usually balance-relevant).

  • reactiondelay and reactiondecay are friendly-fire tunables. Default values trigger combat too aggressively on accidental hits. mlog_friendly_fire_tweaks doubled both for player-friendly response. (Memory: x4_mod_defaults_xml_ff_softening.)
  • NPC ship-marker icon is global per-role. Setting set_entity_overrides icon= on a specific NPC only changes the head floater. The ship marker comes from parameters.xml’s slot definition and is shared across all NPCs of that role.
  • <slot tag=> references engine-side tag definitions. Adding a new tag without engine awareness leaves the entries inert. Most NPC-content mods reuse existing tags.
  • Friendly-fire tuning is X4-version-specific. Vanilla balance evolves; mods tuning these need to retest each version.
  • Removing default macros from a <slot> can break NPC spawning. Engine needs at least one macro per slot. Test thoroughly after macro removals.
  • NPC_Placement_Manager assertions reference parameters.xml. If your MD spawns NPCs and they’re invisible, check that the role tag has a <slot> entry. (Memory: x4_md_npc_placement_manager_requires_slottags.)
  • Loaded at game start. Like god.xml, parameters are baked into the running session.
  • Mod compatibility: Different mods often touch the same <class> entries. Use precise <replace sel="..."> selectors to avoid stepping on each other.
  • Balance mods diff parameters.xml heavily. Friendly-fire mods, combat-feel mods, and player-physics mods all live here.