Minor query: I've been doing some minor modding of the... well, mod to make it so finishing the Russian nuclear program will actually give your Russian state some nukes instead of just sitting there for an eternity sucking money from your budget for nothing. Here's what I did:
First, I punched open the RUS_generic_decisions in the decisions folder and took a look at how it was laid out and compared it with relevant trigger for Burgundy's events and decisions to deduce how it'd work out. For the custom tooltip trigger, I basically added the following:
AND = {
has_country_flag = RUS_nuclear_program_phase_5
check_variable = { RUSNukesRefineProgress = 100 }
}
Based on my understanding of the code, this would basically be a continuation of the prior coding: lets the player to actually be able to press the button again when the last phase reaches 100%. Then under the complete effect I added the following:
else_if =
{
limit = {has_country_flag = RUS_nuclear_program_phase_5}
clr_country_flag = RUS_nuclear_program_phase_5
clr_country_flag = RUS_started_nukes
tno_improve_nuclear_stockpile = yes
modifier = {nuclear_stockpile_monthly_rate = 4}
}
Again, if my understanding of the codetalk is correct, this is supposed to instantly set the nuclear stockpile to single warhead and give the progress a monthly increase of four (a figure chosen based on a combination of my interpretation of what each "level" of nuclear stockpile seems to mean measured against the historical growth of the Soviet nuclear stockpile) while simultaneously removing the program from the decisions menu since it's served it's purpose and is now complete.
So what worked in my test game:
- Clicking the button a fifth time set the nuclear stockpile to "single warhead".
- The program cleared out of the decisions menu after clicking the button a fifth time.
What didn't work:
- The button became available RIGHT as we entered the fifth stage/weapon manufacturing. That is, I didn't have to wait for it the stage to actually finish and for it to reach 100%.
- The monthly progress didn't change one bit, so I'm stuck at just a single-warhead (or a couple of dozen, based on my interpretation of what that means) for eternity.
After rexamining the code, I figured out the reason for the first problem. It shouldn't be "RUSNukesRefineProgress", since that is for phase 4 rather than phase 5, but "RUSNukesWeaponsProgress". But can anyone tell me what went wrong with the second?