Results 1 to 8 of 8

Thread: How to make an event

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default How to make an event

    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

    Code:
    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\dilemmas_tables

    Code:
    "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_option_junctions_tables

    Code:
    "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"    ""
    db\cdir_events_dilemma_payloads_tables

    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"
    This code is for .tsv files to be imported in to the correct tables with PFM 2.0.5 or newer.


    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!
    Last edited by zowrath; April 10, 2012 at 05:11 PM. Reason: Update
    Maratha Light Infantry - http://www.sendspace.com/file/ibfygu

    Col. Michael Kováts Hussars
    - United States - http://www.sendspace.com/file/j272k5

    Norske Geworbne & Trondhjemske Regiment - Norway -
    http://www.sendspace.com/file/tmvpk6


    Links updated 06.05.13

  2. #2

    Default Re: How to make an event

    +rep. but I have problem. I've accepted their offer but I can't build trading district.

  3. #3

    Default Re: How to make an event

    Quote Originally Posted by Vladman96 View Post
    +rep. but I have problem. I've accepted their offer but I can't build trading district.
    Remember to start a new game, as said it is not savegame compatible.
    Maratha Light Infantry - http://www.sendspace.com/file/ibfygu

    Col. Michael Kováts Hussars
    - United States - http://www.sendspace.com/file/j272k5

    Norske Geworbne & Trondhjemske Regiment - Norway -
    http://www.sendspace.com/file/tmvpk6


    Links updated 06.05.13

  4. #4

    Default Re: How to make an event

    Quote Originally Posted by zowrath View Post
    Remember to start a new game, as said it is not savegame compatible.
    yeah, didn't read. good mod, 1000 thanks

  5. #5

    Default Re: How to make an event

    So does this make it easier to get the western event thing? Because I've played through two campaigns and didn't get the event until near the end of both using this mod. The first time was my own following your directions and the second was with the one you've uploaded.

  6. #6

    Default Re: How to make an event

    My default setting is that it will fire some time after 80 turns, and that you have built a Trade Port and researched Foreign Affairs in the Civil branch. This can be edited with PFM in the tools section if you want it to happen earlier in the game.
    Maratha Light Infantry - http://www.sendspace.com/file/ibfygu

    Col. Michael Kováts Hussars
    - United States - http://www.sendspace.com/file/j272k5

    Norske Geworbne & Trondhjemske Regiment - Norway -
    http://www.sendspace.com/file/tmvpk6


    Links updated 06.05.13

  7. #7

    Default Re: How to make an event

    is there any way to build more than one british (or french or american) ports in the same game ?

  8. #8

    Default Re: How to make an event

    Quote Originally Posted by Count von Orlok View Post
    is there any way to build more than one british (or french or american) ports in the same game ?
    Yes, but it is not covered in this tutorial as it deals with just events. There are some other threads and mods that address this, though I can't remember where and which ones.
    Maratha Light Infantry - http://www.sendspace.com/file/ibfygu

    Col. Michael Kováts Hussars
    - United States - http://www.sendspace.com/file/j272k5

    Norske Geworbne & Trondhjemske Regiment - Norway -
    http://www.sendspace.com/file/tmvpk6


    Links updated 06.05.13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •