Results 1 to 20 of 40

Thread: KH being able to build military colonies and Hellenistic poleis

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Roma_Victrix's Avatar Call me Ishmael
    Join Date
    Sep 2010
    Location
    Virginia, USA
    Posts
    15,249

    Default KH being able to build military colonies and Hellenistic poleis

    ANNOUNCEMENT, 12 May 2017: these instructions below are outdated for the current campaign script, according to Melvidh, who has provided new and much more simplified copy-and-paste instructions in his post here.

    Before the TWC forums got rolled back to 25 Dec 2015, I started a thread on this very topic, which QuintusSertorius was kind enough to answer in full. Unfortunately his posts as well as all of mine are now lost, but I can gladly fill in the blanks. If anyone else is interested in allowing Koinon Hellenon the ability to create military settler colonies ("colony_hellenistic", "levels helcol_one helcol_two helcol_three helcol_ref") and at least the first level of the Hellenistic polis ("hinterland_hellenistic_polis", "levels polis_one polis_two polis_three"), then you've come to the right place for instructions on how to do exactly that. You'll need to edit two particular files: "export_descr_buildings" found in EB II's main "data" folder, and the "campaign_script" file found in the following folder pathway: "EBII/data/world/maps/campaign/imperial_campaign".

    Just remember that this is not save-game compatible, but if you start a new Koinon Hellenon campaign, or any other campaign for that matter, it will work like a charm. Just remember to copy and back up both of the text files that will be edited, just in case you make a silly clerical mistake that causes your game to crash and no longer work. Such mistakes are easily undone if you have a backup handy. These files should also be edited with the software program Notepad++. If you don't already have Notepad++, then download it right now, because it will be useful to you with other projects later on, no doubt.

    In the "campaign_script" folder, simply copy and paste this wall of text right between the end of section 11 called "Colony Management" and just above the beginning of section 12 labelled as "Faction Missions". It's okay to leave a blank line or two between this text and the beginning of section 12.

    Spoiler Alert, click show to read: 

    Code:
    	;;; Special KH polis-building script ;;;			
    	set_event_counter ecKoinonColonistsOn 0
    	declare_counter KoinonColonyPoints
    	
    	monitor_event PreFactionTurnStart
    		if I_CompareCounter FactionTurnInProgress = 5			;;; it is the KH turn
                and I_IsFactionAIControlled f_kh
                set_event_counter ecKoinonColonistsOn 1
           end_if
    	end_monitor
    	
    	;; Test how many Metropoleis Koinon Hellenon controls:
        monitor_event SettlementTurnStart FactionType f_kh
            and I_EventCounter ecOlympicYear = 1
            and I_EventCounter ecSpring = 1
            and SettlementBuildingExists = polis_three
            inc_counter KoinonColonyPoints 1
            if I_IsFactionAIControlled f_kh					;;; for the AI it is not needed
                terminate_monitor
            end_if
        end_monitor
    	
    	 monitor_event FactionTurnStart FactionType f_kh
            if I_IsFactionAIControlled f_kh					;;; for the AI it is not needed
                terminate_monitor
            end_if
            ;
            if I_CompareCounter KoinonColonyPoints > 0
                set_event_counter ecKoinonColonistsOn 1
            end_if
        end_monitor
    	
    	monitor_event AddedToBuildingQueue FactionType f_kh
            and BuildingName = polis_one
            inc_counter KoinonColonyPoints -1
            if I_IsFactionAIControlled f_kh					;;; for the AI it is not needed
                terminate_monitor
            end_if
            ;
            if I_CompareCounter KoinonColonyPoints = 0
                set_event_counter ecKoinonColonistsOn 0
            end_if
        end_monitor
    	
    	monitor_event AddedToBuildingQueue FactionType f_kh
            and BuildingName = helcol_one
            inc_counter KoinonColonyPoints -1
            if I_IsFactionAIControlled f_kh					;;; for the AI it is not needed
                terminate_monitor
            end_if
            ;
            if I_CompareCounter KoinonColonyPoints = 0
                set_event_counter ecKoinonColonistsOn 0
            end_if
        end_monitor
        ;
        monitor_event AddedToBuildingQueue FactionType f_kh
            and BuildingName = helcol_two
            inc_counter KoinonColonyPoints -1
            if I_IsFactionAIControlled f_kh					;;; for the AI it is not needed
                terminate_monitor
            end_if
            ;
            if I_CompareCounter KoinonColonyPoints = 0
                set_event_counter ecKoinonColonistsOn 0
            end_if
        end_monitor
        ;
        monitor_event AddedToBuildingQueue FactionType f_kh
            and BuildingName = helcol_three
            inc_counter KoinonColonyPoints -1
            if I_IsFactionAIControlled f_kh					;;; for the AI it is not needed
                terminate_monitor
            end_if
            ;
            if I_CompareCounter KoinonColonyPoints = 0
                set_event_counter ecKoinonColonistsOn 0
            end_if
        end_monitor
        ;
        ;   Re-enable the event counter after the player has clicked the end turn button. If this isn't done, the colony building will never complete.
        ;
        monitor_event ButtonPressed ButtonPressed end_turn
            if I_IsFactionAIControlled f_kh					;;; for the AI it is not needed
                terminate_monitor
            end_if
            ;
            if not I_IsFactionAIControlled f_kh
                set_event_counter ecKoinonColonistsOn 1
            end_if
        end_monitor
        ;
        ;   Disable the event counter at the end of faction turn - applies for both the player as well as the AI.
        ;
        monitor_event FactionTurnEnd FactionType f_kh
            set_event_counter ecKoinonColonistsOn 0
        end_monitor


    Now comes the part that for you would have been a lot of work (it was for me), but if you'd like, instead of entering the following information manually, you can simply copy the following text and paste over nearly the entire section in the "export_descr_buildings" file labelled as "EBII POLEIS / COLONIES". Notice how I stopped short of including all the text below "building colony_eastern" if you open the file and have a look at where this all exists. Therefore, don't copy over the entire section; only copy and paste over the lines of text that are displayed in the spoiler window in the post below.

    EDIT: Unfortunately, the amount of text is so massive, I'm going to have to split it into four parts, but don't worry, just copy and paste the first part from the first spoiler window below, then, once you're done with that, copy and paste the second part from the second spoiler window below that, and then do the same with the third and fourth parts. Mind you, these are consecutive, so line them up exactly and leave no spaces between them.

    ==INSTRUCTIONS FOR MANUAL EDITING OF THE EXPORT_DESCR_BUILDINGS FILE==

    If you're a crazy person and you'd rather enter the text manually (instead of copying and pasting each consecutive part in the spoiler windows below), you can probably see what's been added by comparing this text above to what already exists in your unmodded, untouched, unmolested virgin "export_descr_buildings" file. Firstly, in each line at the beginning of each sub-section where it says "helcol...requires", followed by brackets listing various factions, you need to add "f_kh," at the end of the list, making sure in each case to leave a blank space between the comma in "f_kh," and the closing bracket ("}"). Then, at the end of each of these lines, along with the "polis_one requires" line, you need to add the following text: "or event_counter ecKoinonColonistsOn 1". Make sure to leave a space between the word "or" and the previous text (e.g. "...or event_counter ecBosporanColonistsOn 1 or event_counter ecKoinonColonistsOn 1").

    Make sure not to do this with every line that says "helcol_one" or "helcol_two" or "helcol_three requires", because at the end of each sub-section is a field called "upgrades" with a similar line called "helcol_one" or "helcol_two" or "helcol_three requires". Just like before, you'll need to add the "f_kh," text in the brackets ("{ }"), yet after that you'll notice the text differs from the other "requires" lines. At the end of these, the following text must be pasted: "or building_present_min_level govkh kh3". Make sure to leave a space between this text and the previous last word of each line. For instance, it should look something like this: "...or building_present_min_level govbospor bosptyra or building_present_min_level govkh kh3".

    Hold on to your horses, because you're not done yet! You still need to make sure all the units can now be recruited from these new buildings that KH can now build. In each sub-section, in each line where it says "recruit_pool", you're going to need to add "f_kh," manually to the end of each list. You can do that the old fashioned way. Alternatively, if you want to go easy on yourself, then do the following:

    1) Open up a new tab in Notepad++ or, if you must, a separate Word document
    2) Copy and paste one "recruit_pool" subsection at a time from the "EBII POLEIS / COLONIES " section into this new tab or document, for temporary use.
    3) Open the "finder" (usually just hitting "ctrl" + "F" on your keyboard will open it up for you)
    4) Go to the "replace all" tab
    5) Replace every instance where it says "f_baktria," with "f_baktria, f_kh, " instead. Make sure to have a comma at the end of "f_kh" and to leave a small blank space at the end of "f_kh," as well, since there needs to be a space between it and the closing bracket ("}") in each line. Each line should look something like this: "recruit_pool "hellenistic cavalry hippeis" 1 0.04 1 0 requires factions { f_makedonia, f_epeiros, f_seleukid, f_ptolemaioi, f_pontos, f_pergamon, f_bosporan, f_baktria, f_kh, } and not event_counter ecThorakitaiReform 1"
    6) Copy and paste each sub-section you've edited in your temporary tab or Word document back into the original "export_descr_unit" file.

    Once you're done doing that to every line where it says "recruit_pool", then pat yourself on the back, because voila! You're finished!

    Now you can just enjoy the fruits of thine labor, and build Hellenistic poleis and colonies as Koinon Hellenon! Do your thing, kick back, relax, have a party, whatever floats your boat, pal. I won't judge you.


Posting Permissions

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