This tutorial will teach you how to set up Maritime Raids for the player and the AI.
What does this do? Well, everytime that you or the AI blockades a port, you loose some income from the trade but that's it, there's nothing more to gain from that which makes blockades not very interesting, especially when there are scripts that prevent the AI from going bankrupt.
Thanks to this script, you can now get money from blockading the AI ports and loose more money if the AI blockades your ports.
Example 1: Simple maritime raid script just for one faction
With this script, Carthage in EBII, has some chances of either getting 1000 or 2000 everytime they blockade an enemy port which is not a rebel one (If you want to allow this script to also work with the rebels, you need to remove the line that says and not TargetFactionType slave). Beware that the player can abuse this system by continually blockading the enemy ports, therefore the chances for the player should be kept low while the chances for the AI should be higher.
Example 2: Maritime script for all factions (currently used in EBII)
This script used by the EBII team only uses one monitor and uses an already existing event counter to determine which faction is playing so that the amount of money can even be different.
You have now seen that the rebels are not affected by this, why so? Because it would be an even bigger exploit to be able to raid rebel ports since they barely have the capacity to respond.
Instead, I created a different script for them, called the piracy script, this script uses two monitors, clone events, that trigger when the player ports are blockaded by rebel fleets. Then the player has chances of getting a multichoice event asking if he wants to pursue the pirates or let them go. There are two events for this with the first text being the same but will get the player different results depending on what he decides.
I hope you enjoyed this tutorial and use it on your own mods!