Start with the task#

libraries/ holds data tables. MD consumes data and performs actions; Lua displays it in the interface. Editing a table and running a script are separate steps. This X4 9.00 map helps you choose a file to investigate first.

File map#

What to change Start here
Prices and recipes wares.xml
Available ships and selection groups ships.xml, shipgroups.xml
Station plans constructionplans.xml, stationgroups.xml
Equipment compatibility equipmentcompatibilities.xml
Drone and consumable selection loadoutrules.xml
NPC ship replenishment jobs.xml
Initial station placement god.xml
Factions, races and relations factions.xml, races.xml, diplomacy.xml
Player starting conditions gamestarts.xml
Main-menu background scene startmenu.xml
Resource areas regionyields.xml, mapdefaults.xml
Dropped items drops.xml
Game-system parameters parameters.xml
Terraforming and feature unlocks terraforming.xml, unlocks.xml

These are search pointers, not a promise that one file is enough. A new ship, for example, connects a macro, ware, indexes and text.

Read the file you found#

Extract matching data with X Catalog Tool. Identify the document root, entry and ID. Check its schema where declared, then other tables using that ID. Some tables gather full extension files; other changes use diff patches. Choose the form for that particular file and a working analogue, not merely its directory name.

Independent exercise: outline the dependencies of a fictional patrol.

TEXT
wiki_patrol_job -> ship group -> ship macro
                -> default AI order
                -> quota + location

Result: a list of references to find and validate. This reasoning diagram creates no ship and prints nothing in game.

Next steps#

NPC ships and stations, game starts and menu backgrounds, wares and prices, resource areas. The source covers people, stats, quotas and missiongroups in more detail; this wiki does not yet provide complete courses on them.