two questions

I'm making a focus tree for Albania. I want to implement a system where the player has the option to have border wars against Yugoslavia. and when the player wins. instead of annexing outright, they have a peace conference. I was thinking the best way to accomplish this is when the player wins the border war, the player annexes the province, then the mod immediately releases the province from the player, the same way that you release nations from the occupied territory screen. then force capitulating them to the player. problem is, I have not the slightest idea how to accomplish any of this. 

the other thing that I want to do is have a focus that activates a tooltip decision that works mostly like the war plans from the us focus tree. temporarily buffing the army in various ways. 

pls respond asap.



For the former, you can use similar code to the decision Japan has:

start_border_war = {

change_state_after_war = no

attacker = {

state = 527

num_provinces = 4

on_win = japan_border_conflict.2

on_lose = japan_border_conflict.3

on_cancel = japan_border_conflict.4

}

defender = {

state = 408

num_provinces = 4

on_win = japan_border_conflict.3

on_lose = japan_border_conflict.2

on_cancel = japan_border_conflict.4

}

}


So in this case, on_win for the attacker (Albania) will trigger an event which gives the option to annex. But I don't think it's possible to trigger a peace deal, unless you do something funky like:

  1. Create a custom nation
  2. Give it just the state that was targetted by the conflict
  3. Have Albania & Yugoslavia both declare war on it
  4. Give the victorious nation in the border conflict the higher war score
  5. Then have the newly created nation capitulate

Then when the next day ticks over, the peace conference should fire.

It may be easier to give the winning nation an event with the options to leave the state alone, annex the state, or set as a puppet nation.


As for the war plans, like the USA, you add something like the following in the reward:

unlock_decision_tooltip = { 

decision = USA_execute_war_plan_crimson 

show_effect_tooltip = yes 

show_modifiers = yes 

}


The decision is the ID for your decision, which is just the name of the decision made lowercase with all non-alphanumeric characters stripped out, and spaces replaced with _.

For example, if your decision is "Let's Do It!" the decision ID is "lets_do_it".

Thanks man.