How to create an espionnage task ?
Could you just clarify that I'm understanding this correctly.
You are playing as Spain (or another country - but just for simplicity sake).
- The anarchist uprising happens in your nation
- Once Portugal's ideology becomes the ruling party/has enough support, they ask to join the war fighting on the anarchist side?
If the above is correct, you could have this as an event. The event would check whether Portugal's ideology is the ruling party/has enough support, then would fire for Anarchist Spain.
This event would have two outcomes, do nothing or send an event to Portugal asking them to join the war.
Portugal's event would then have two options. Join/Stay out of the war.
I'll try to clarify (sorry, my English is not that good, I'm not sure I understood your answer correctly.
- Be anarchist Spain
- Have a neighbooring country that is not anarchist
- If the neighbooring country has enough non-aligned support (but it'll be weird for royalist nations, so maybe a stability condition ? ), you can launch a spy task, costing guns, support equipment, and maybe using some civilians factories for the amount of time of the task.
- succesfully finishing the task triggers an event where the anarchist revolt succeeds and a civil war starts in the country, and the anarchist side asks you to join the war, like Portugal does in Spain's focus "Portuguese Anarchism". But if the revolt fails, , it changes stability (idk if up r down yet)
- If the war is won, you can either annex them, or they can remain independant(they're anarchist, they make their decisions ahah :D )
I hope I was clear enough this time.
Ok, I understand what you mean now. Thank you for clarifying :)
I've not actually tried modding the espionage system, and operations, so not too sure about everything needed.
However, a good place to start would be copying the "operation_coup_government" operation from 00_operations.txt (in [path_to_hoi4_install]/common/operations)
A run down on what some of the things appear to do, and what you may need:
icon = GFX_operations_coup_government #This is the icon which will be used in the espionage menu
map_icon = GFX_operations_coup_government_map #This is the icon which will appear on the map (if it appears on the map)
name = operation_coup_government #The localisation file id for the name (e.g. "operation_coup_government":0 "Government Coup")
desc = operation_coup_government_desc #As above, but for the description
priority = 7 #The priority of this task (I would assume the closer to 0 the higher up the list it appears/more likely for AI to do it)
days = 180 #Base number of days for the task to be complete
network_strength = 70 #Minimum network strength to start the operation? (not too sure)
operatives = 2 #How many spies needed to start the operation
visible = .. #When the task will show in the operations menu
equipment = .. #What equipment is needed to start the operation (so guns/support equipment)
allowed = .. #When you're allowed to do the operation: so for your operation, you would want:
allowed = { FROM = { has_government = neutrality stability > 0.6 } } # I believed, as this would check the government of the nation is non-aligned and the stability is more than 60%
on_start = .. #Anything that needs to happen when the operation begins
risk_chance = 0.3 #How risky is the operation 1.0 = 100%
experience = 2.5 #How much experience will the spies get
cost_modifiers = .. #Anything which may increase the cost of the operation; not too sure on what the cost modifiers are
outcome_execute = .. #What happens when the operation is complete and executed. So for you, start civil war and trigger an event to Spain asking to join the war, or failed to trigger civil war
outcome_potential = .. #What could happen when the operation is complete and executed
phases = .. #This can be added multiple times. Different phases can do different things. Not sure if you could have phases do functional things, e.g. Portugal offers military access as a phase (before committing to the war)
Hopefully this helps a little. If this isn't what you were looking for, let me know.
If you're unsure on what to put in any of the sections, just shout.
Thanks for such an in-depth answer :D
I'll give it a try after my finals ahah :)
Massinissa
Hello,
I'm trying to mod the anarchist uprising, instead of 3 bad unit spawning in a few victory points, I was planning to make an anarchist civil war in a neighbooring country, that you can join, like the Portuguese anarchism focus, once the non aligned ideology is strong enough.
Is there a way to mod this?
Edit : not only for Anarchist Spain, but also another country I'm modding.