Indeed there is. First you have to create an Iberian Union-country using one of the available tags - UZ9, for instance. That entails adding an entry for UZ9 in world_names (avoid using Excel - text editors work fine, though. This goes in general), creating a minister-file, a tech-teams file and a leader file. Given the country in question, it is probably best to copy Spain's files, paste in Portugal's counterparts, and edit the IDs to make them unique. The country also needs a flag and a shield (gfx\map\flags and gfx\map\shields, that is), which is somewhat harder - unless you already have an Iberian Union flagset for the Europa Engine, I'm afraid you'll have to ask someone else for instructions if you want something better than Spain's or Portugal's flag.
Unless you take on of the UXX-tags (er... the one with a U and two numbers, that is), IIRC, you'll also have to make entries for the tag in db\airnames, armynames, navynames, countries unitnames and randomleaders). Finally, you need to make an entry in revolt.txt, so the game knows where the capital is supposed to be, and which cores it is supposed to have.
That is what you
need to create an Iberian Union-tag. If you want it ministers, leaders and tech-teams to disappear when they should, you'll also have to track down all the death-events for Portugal and Spain, copy them and change the id of the events to something unique and the ids in the command to the Iberian Union's counterpart-ministers/team/leader's id.
This wouldn't have worked in Arma, but thankfully the country-changing command has been fixed in AOD.
Lastly, you need the event to create the Union. For example, something like this:
Code:
event = {
id = XXXXX #insert an unused id here
random = no
country = SPA
name = EVT_13_NAME
desc = EVT_13_DESC
picture = "partition_of_england"
style = 0
trigger = {
control = { province = 336 data = SPA } #Lisbon
NOT = {
exists = POR
}
}
date = { day = 0 month = january year = 1936 }
offset = 10
deathdate = { day = 29 month = december year = 1963 }
action_a = {
ai_chance = 50
name = EVT_13_ACTA
command = { type = country which = UXX } #replace UXX with your chosen tag
}
action_b = {
ai_chance = 50
name = EVT_13_ACTB
command = { type = dissent value = -1 }
}
}
If it works as I think it does - not a given - within ten days of the requirements - Lisbon under Spanish control and Portugal not existing - being fulfilled the event should trigger, and if action a is chosen, SPA will be changed to UXX. Erm, though the description and event-name will talk about England's surrender to Germany, so you might want to change that.