While helping Radious with his Western Units unlock I made an event that is actually pretty good as a tutorial as it is simple, and works. This tutorial expects you to have a general idea of how PFM 2.0.5 or later works, as it is the tool we will use. It also expects that you are somewhat familiar with pack-files, how to extract them and add them to a new pack and edit.
Prepare an empty work directory on your harddrive, we will use C:\temp\ as an example here. In this directory extract the following files from the .pack's and make sure it is the latest and make a new pack, lets say zw_tut_event.pack and set it to Movie for ease:
text\db\dilemmas.loc
db\dilemmas_tables
db\cdir_events_dilemma_option_junctions_tables
db\cdir_events_dilemma_payloads_tables
Add them to your new pack, then delete the files in your C:\temp\ folder so there's nothing there. Now, under C:\temp\ create four empty files and name them:
dilemmas.loc.tsv
dilemmas.tsv
cdir_events_dilemma_option_junctions.tsv
cdir_events_dilemma_payloads.tsv
The following is the code that goes in to these files, put each code in to their corresponding file and save:
text\db\dilemmas.loc
db\dilemmas_tablesCode:dilemmas_localised_first_choice_title_d_bos_treaty_units_all Accept True dilemmas_localised_second_choice_title_d_bos_treaty_units_all Refuse True dilemmas_localised_title_d_bos_treaty_units_all Western Military Missions True dilemmas_localised_first_choice_label_d_bos_treaty_units_all Such a military understanding will be a great asset to our cause. We accept. True dilemmas_localised_description_d_bos_treaty_units_all Having had long relation with all western powers, they now offer you the chance to recruit their units if you have built a port dedicated to trade with them.\n\n\By accepting, you may now wield unprecedented power in Japan. True dilemmas_localised_second_choice_label_d_bos_treaty_units_all We cannot accept. Convey our regrets to the foreign ambassadors. True
db\cdir_events_dilemma_option_junctions_tablesCode:"True" "d_bos_treaty_units_all" "Having\ had\ long\ relation\ with\ all\ western\ powers,\ they\ now\ offer\ you\ the\ chance\ to\ recruit\ their\ units\ if\ you\ have\ built\ a\ port\ dedicated\ to\ trade\ with\ them\.\\n\\n\\By\ accepting,\ you\ may\ now\ wield\ unprecedented\ power\ in\ Japan\." "Such\ a\ military\ understanding\ will\ be\ a\ great\ asset\ to\ our\ cause\.\ We\ accept\." "We\ cannot\ accept\.\ Convey\ our\ regrets\ to\ the\ foreign\ ambassadors\." "Western\ Military\ Missions" "bos_message_diplomacy_positive_active\.tga" "bos_westerner\.TGA" "Accept" "Refuse" "True"
db\cdir_events_dilemma_payloads_tablesCode:"d_bos_treaty_units_all" "30200" "0" "CND_CAMPAIGN" "jap_boshin" "d_bos_treaty_units_all" "30201" "0" "CND_FIRST_ROUND" "80" "d_bos_treaty_units_all" "30202" "0" "CND_TECHNOLOGY_RESEARCHED" "boshin_civil_foreign_affairs" "d_bos_treaty_units_all" "30203" "0" "CND_BUILDING_LEVEL" "bos_port_3_trading_port" "d_bos_treaty_units_all" "30204" "0" "CND_DILEMMA_NOT_CHOSEN_FIRST" "d_bos_treaty_units_all" "d_bos_treaty_units_all" "30205" "0" "CND_UNIQUE" "" "d_bos_treaty_units_all" "30206" "0" "VAR_CHANCE" "7" "d_bos_treaty_units_all" "30207" "0" "GEN_TARGET_NONE" ""
This code is for .tsv files to be imported in to the correct tables with PFM 2.0.5 or newer.Code:"FIRST" "d_bos_treaty_units_all" "30208" "0" "p_bos_military_mission_american" "True" "DURATION\[0]" "FIRST" "d_bos_treaty_units_all" "30209" "0" "p_bos_military_mission_british" "True" "DURATION\[0]" "FIRST" "d_bos_treaty_units_all" "30210" "0" "p_bos_military_mission_french" "True" "DURATION\[0]" "FIRST" "d_bos_treaty_units_all" "30211" "0" "BUILDING_LEVEL_EVENT_RESTRICTION" "True" "BUILDING_LEVEL\[bos_port_4_french_trading_district];ENABLE" "FIRST" "d_bos_treaty_units_all" "30212" "0" "UNIT_EVENT_RESTRICTION" "True" "UNIT\[Boshin_Ironclad_USS_Roanoke];ENABLE" "FIRST" "d_bos_treaty_units_all" "30213" "0" "UNIT_EVENT_RESTRICTION" "True" "UNIT\[Boshin_Inf_Elite_United_States_Marines];ENABLE" "FIRST" "d_bos_treaty_units_all" "30214" "0" "BUILDING_LEVEL_EVENT_RESTRICTION" "True" "BUILDING_LEVEL\[bos_port_4_british_trading_district];ENABLE" "FIRST" "d_bos_treaty_units_all" "30215" "0" "UNIT_EVENT_RESTRICTION" "True" "UNIT\[Boshin_Ironclad_HMS_Warrior];ENABLE" "FIRST" "d_bos_treaty_units_all" "30216" "0" "UNIT_EVENT_RESTRICTION" "True" "UNIT\[Boshin_Inf_Elite_Royal_Marines];ENABLE" "FIRST" "d_bos_treaty_units_all" "30217" "0" "BUILDING_LEVEL_EVENT_RESTRICTION" "True" "BUILDING_LEVEL\[bos_port_4_american_trading_district];ENABLE" "FIRST" "d_bos_treaty_units_all" "30218" "0" "UNIT_EVENT_RESTRICTION" "True" "UNIT\[Boshin_Ironclad_L'Ocean];ENABLE" "FIRST" "d_bos_treaty_units_all" "30219" "0" "UNIT_EVENT_RESTRICTION" "True" "UNIT\[Boshin_Inf_Elite_Infanterie_de_marine];ENABLE"
Now, have your pack ready in PFM and then Import TSV to the corresponding file inside the pack. Example, dilemmas.loc.tsv needs to be imported over text\db\dilemmas.loc and so forth.
When you have imported all four files in to your pack, look for these entries:
d_bos_treaty_america_initial
d_bos_treaty_american_repeat
d_bos_treaty_britain_initial
d_bos_treaty_britain_repeat
d_bos_treaty_france_initial
d_bos_treaty_france_repeat
and find the value CND_FIRST_ROUND in all of them, it's 24. Change it from 24 to some high number like 777 or higher if you wish. Save your pack, and start your game.
What this does is when you have build your Trade Port and have researched Foreign Affairs in the Civil branch, you will get an event that lets you have trade ports and units from all western nations. Now, this will make you somewhat more powerful but then again, this is just a tutorial. You also need to start a new game for this to work, it is not savegame-compatible.
Normally I'd offer some more insights in the the different variables, but as events go they are pretty straight forward. If there's any questions, I will do my best to answer them when I'm here. Solution, as in finished result, for comparison can be found as an attachment to this post.
Have fun!![]()




Reply With Quote






