This command will make a specified empire declare war on another specified empire with a war goal of your choice.
war [declarer empire id] [subject empire id] [war goal id]
|Declarer Empire ID||The ID of the empire you wish to declare war.|
|Subject Empire ID||The ID of the empire you wish to have war declared upon.|
|War Goal ID||The ID of the war goal you wish to have for this war - see our war goals list for IDs.|
war 9 0 wg_humiliation
This command would make the empire with ID 9 declare war on the empire with ID 0 with the war goal 'humiliation'. Your starting empire ID is always 0, so this would cause empire with ID 9 to declare war on your empire.
war 9 4 wg_conquest
Executing the above command would make the empire with an ID of 9 declare war on the empire with ID 4. The war goal with be "Conquer".