Results 1 to 2 of 2

Thread: A small modding question

  1. #1

    Icon5 A small modding question

    I know there are certain places in the world that you can't build almost anything in them or get access to troops there for historical reasons. However, I want to add the ability to recruit some troops in some of those regions. I would just like some pointers to know exactly which files I need to modify to get that. I know this is not historical or realistic, but I just wanna do my own thing you know? Hence why I wanna know how to do it instead of demanding to be changed in the next version.

  2. #2

    Default Re: A small modding question

    All recruitment is in the export_descr_buildings.txt (or EDB). Before you do anything in it, you need to download Notepad++, using Windows Notepad will corrupt the file. You should also be aware that no change you make to it is savegame compatible, you need to start a new campaign for your changes to be applied.

    Recruitment in there is handled through government buildings they're named building gov[faction name] or govallied for the Allied Governments. There is no single recruitment building for all factions (as is the case in vanilla), and all those governments have multiple levels. There are a little over 200 buildings which offer recruitment of some form. Furthermore, all recruitment is regionalised through the use of hidden_resources, and phased with the use of event_counters. That complexity is why the EDB is so big - the vanilla EDB is 268KB, EBII's is just under 6MB.

    Here's an example of one of them, the Makedonian Hellenic Administration (which gives only native levies):

    Code:
    ;;;NATIVE - 4 * 0.04
    ;;; PROPONTIC ANATOLIA
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource anatolian and hidden_resource greek1 and not hidden_resource lydian
    recruit_pool "hellenistic infantry akontistai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource anatolian and hidden_resource greek1 and not hidden_resource lydian
    recruit_pool "hellenistic infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource anatolian and hidden_resource greek1 and not hidden_resource lydian and not hidden_resource thrakia ; Mysia and Paphlagonia
    recruit_pool "thracian infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource anatolian and hidden_resource thrakia ; Bithynia
    ;;; AIGAIAN ANATOLIA
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource lydian and hidden_resource hr_e and not hidden_resource hr_j
    recruit_pool "hellenistic infantry akontistai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource lydian and hidden_resource hr_e and not hidden_resource hr_j
    recruit_pool "hellenistic infantry toxotai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource lydian and hidden_resource hr_e and not hidden_resource hr_i and not hidden_resource hr_j ; Ionia and Lydia
    recruit_pool "hellenistic infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource lydian and hidden_resource hr_i ; Karia
    ;;; MESOGAIAN ANATOLIA
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource anatolian and not hidden_resource greek1 and not hidden_resource satrapy and not hidden_resource pontic
    recruit_pool "eastern infantry anatolikoi phyletai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource anatolian and not hidden_resource greek1 and not hidden_resource satrapy and not hidden_resource pontic
    recruit_pool "hellenistic infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource anatolian and not hidden_resource greek1 and not hidden_resource satrapy and not hidden_resource pontic
    ;;; EUXEIAN ANATOLIA
    recruit_pool "eastern infantry kavakaza sparabara"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource anatolian and not hidden_resource greek1 and not hidden_resource hellen2 and not hidden_resource lydian
    recruit_pool "eastern infantry anatolikoi phyletai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource anatolian and not hidden_resource greek1 and not hidden_resource hellen2 and not hidden_resource lydian
    recruit_pool "eastern infantry thanvare kavakaza"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource anatolian and not hidden_resource greek1 and not hidden_resource hellen2 and hidden_resource hr_j ; Kappadokia/Kappadokia Pontike
    recruit_pool "hellenistic infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource anatolian and hidden_resource greek2 ; Pontos Paralios
    ;;; GALATIA
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource celtic and hidden_resource hyparchia
    recruit_pool "eastern infantry anatolikoi phyletai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource celtic and hidden_resource hyparchia and not event_counter ecThureosReform 1
    recruit_pool "celtic infantry skirmisher"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource celtic and hidden_resource hyparchia and event_counter ecThureosReform 1
    recruit_pool "hellenistic infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource celtic and hidden_resource hyparchia and not event_counter ecThureosReform 1
    recruit_pool "celtic infantry slinger"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource celtic and hidden_resource hyparchia and event_counter ecThureosReform 1
    ;;; KYPROS - special levy addition
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource hr_island and hidden_resource greek2
    ;;; IOUDAIA
    recruit_pool "hellenistic infantry ioudaioi taxeis"  1  0.04  1  0  requires factions { f_makedonia, } and not hidden_resource hellen1 and hidden_resource ioudaioi
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource ioudaioi and hidden_resource hellen2
    recruit_pool "eastern infantry slinger"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource ioudaioi and hidden_resource hellen2
    ;;; SYRIA
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource nabatu_empire
    recruit_pool "hellenistic infantry akontistai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource nabatu_empire
    recruit_pool "hellenistic infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource nabatu_empire
    ;;; MESOPOTAMIA
    recruit_pool "eastern infantry nizagan eranshahr"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_river and not hidden_resource hr_j
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_river and not hidden_resource hr_j
    recruit_pool "hellenistic infantry akontistai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_river and not hidden_resource hr_j
    ;;; MESENE
    recruit_pool "hellenistic infantry pantodapoi"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource arabian
    recruit_pool "arabian east infantry"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource arabian
    recruit_pool "hellenistic infantry akontistai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource arabian
    recruit_pool "arabian missile arab slingers"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource arabian
    ;;; ADIABENE
    recruit_pool "eastern infantry nizagan eranshahr"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_river and hidden_resource hr_j and not hidden_resource arabian
    recruit_pool "eastern infantry hai nizagamartik"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_river and hidden_resource hr_j and not hidden_resource arabian
    recruit_pool "eastern infantry anatolikoi phyletai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_river and hidden_resource hr_j and not hidden_resource arabian
    ;;; PARSA
    recruit_pool "eastern infantry nizagan eranshahr"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_b and hidden_resource hr_i and not hidden_resource hr_river and not hidden_resource nabatu_empire and not hidden_resource daha
    recruit_pool "eastern infantry skirmisher"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_b and hidden_resource satrapy and hidden_resource horde_target and not hidden_resource hr_river and not hidden_resource nabatu_empire ; Elymais
    recruit_pool "eastern infantry archer"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_b and hidden_resource hr_i and not hidden_resource hr_river and not hidden_resource horde_target and not hidden_resource daha ; Persis/Gabiene
    recruit_pool "steppe infantry parthian archers"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_b and hidden_resource hr_g and hidden_resource hr_j and hidden_resource hyparchia and not hidden_resource hr_river ; Khoarene
    recruit_pool "eastern infantry slinger"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_b and hidden_resource hr_i and not hidden_resource hr_river and not hidden_resource nabatu_empire and not hidden_resource daha
    ;;; MEDIA
    recruit_pool "eastern infantry nizagan eranshahr"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource satrapy and hidden_resource hr_b and not hidden_resource hr_river and not hidden_resource nabatu_empire and not hidden_resource hr_i
    recruit_pool "eastern infantry skirmisher"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource satrapy and hidden_resource hr_b and not hidden_resource hr_river and not hidden_resource nabatu_empire and not hidden_resource hr_i
    recruit_pool "eastern infantry slinger"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource satrapy and hidden_resource hr_b and not hidden_resource hr_river and not hidden_resource nabatu_empire and not hidden_resource hr_i
    ;;; MEDIA RHAGIANA
    recruit_pool "eastern infantry nizagan eranshahr"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_e and not hidden_resource hr_b and not hidden_resource hr_c
    recruit_pool "eastern infantry skirmisher"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_e and not hidden_resource hr_b and not hidden_resource hr_c
    recruit_pool "steppe infantry parthian archers"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hr_e and not hidden_resource hr_b and not hidden_resource hr_c
    ;;; HYRKANIA
    recruit_pool "steppe infantry gundi nizagan"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource horde_target and hidden_resource hr_j
    recruit_pool "eastern infantry skirmisher"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource horde_target and hidden_resource hr_j
    recruit_pool "eastern infantry slinger"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource horde_target and hidden_resource hr_j
    ;;; PAHLAVA
    recruit_pool "steppe infantry gundi nizagan"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource daha
    recruit_pool "steppe infantry parthian archers"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource daha
    recruit_pool "eastern infantry slinger"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource daha
    ;;; AREIA
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource satrapy and hidden_resource hr_c and not hidden_resource hr_f
    recruit_pool "eastern infantry kavakaza kofyaren"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource satrapy and hidden_resource hr_c and not hidden_resource hr_f
    recruit_pool "eastern infantry slinger"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource satrapy and hidden_resource hr_c and not hidden_resource hr_f
    ;;; EAST PERSIA
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hyparchia and hidden_resource hr_c and not hidden_resource baktria and not hidden_resource indo
    recruit_pool "eastern infantry skirmisher"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hyparchia and hidden_resource hr_c and not hidden_resource baktria and not hidden_resource indo
    recruit_pool "eastern infantry slinger"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource hyparchia and hidden_resource hr_c and not hidden_resource baktria and not hidden_resource indo
    ;;; RAKHVAD
    recruit_pool "hellenistic infantry peltastai indohellenikoi"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource indo
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource indo
    recruit_pool "eastern infantry slinger"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource eastern and hidden_resource indo
    ;;; EGYPT
    recruit_pool "african infantry machimoi"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource egypt and not hidden_resource ethiopia and not hidden_resource libya
    recruit_pool "hellenistic infantry pantodapoi"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource egypt and not hidden_resource ethiopia and not hidden_resource libya
    recruit_pool "hellenistic infantry pantodapoi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource egypt and hidden_resource libya or hidden_resource ethiopia
    recruit_pool "african infantry machimoi akontistai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource egypt and not hidden_resource libya
    recruit_pool "carthaginian infantry libyan lonchophoroi"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource egypt and hidden_resource libya
    recruit_pool "african infantry machimoi toxotai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource egypt and not hidden_resource ethiopia and not hidden_resource libya
    recruit_pool "african infantry ethiopian archers"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource egypt and hidden_resource ethiopia
    recruit_pool "african infantry slingers"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource egypt and hidden_resource libya
    ;;; COASTAL ILLYRIA
    recruit_pool "illyrian infantry thureophoroi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource illyria and hidden_resource hr_e ; Histria
    recruit_pool "illyrian infantry hoplitai"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource illyria and hidden_resource liburnes and not hidden_resource hr_e and not event_counter ecThureosReform 1 ; Illyria/Illyria Hellenike
    recruit_pool "illyrian infantry thureophoroi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource illyria and hidden_resource liburnes and not hidden_resource hr_e and event_counter ecThureosReform 1 ; Illyria/Illyria Hellenike
    recruit_pool "illyrian infantry peltastai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource illyria and hidden_resource liburnes
    recruit_pool "hellenistic infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource illyria and hidden_resource liburnes
    ;;; INLAND ILLYRIA
    recruit_pool "illyrian infantry thureophoroi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource illyria and not hidden_resource liburnes
    recruit_pool "illyrian infantry peltastai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource illyria and hidden_resource mixed ; Delmatia
    recruit_pool "illyrian infantry peltastai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource illyria and hidden_resource thrakia and not event_counter ecThureosReform 1 ; Dardania
    recruit_pool "celtic infantry galathraikes"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource illyria and hidden_resource thrakia and event_counter ecThureosReform 1 ; Dardania
    recruit_pool "thracian infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource illyria and not hidden_resource liburnes
    ;;; LANDA SKORDISKON
    recruit_pool "getic infantry komatai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource celtic and hidden_resource hr_i and not event_counter ecThureosReform 1
    recruit_pool "celtic infantry galathraikes"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource celtic and hidden_resource hr_i and event_counter ecThureosReform 1
    recruit_pool "illyrian infantry thureophoroi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource celtic and hidden_resource hr_i
    recruit_pool "thracian infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource celtic and hidden_resource hr_i
    ;;; MOISIA
    recruit_pool "celtic infantry uextias"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource celtic and hidden_resource hr_h and not event_counter ecThorakitaiReform 1
    recruit_pool "germanic infantry bastarnae"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource celtic and hidden_resource hr_h and event_counter ecThorakitaiReform 1
    recruit_pool "thracian infantry doryphoroi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource celtic and hidden_resource hr_h
    recruit_pool "thracian infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource celtic and hidden_resource hr_h
    ;;; THRAIKE
    recruit_pool "celtic infantry galathraikes"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource royal_core and not hidden_resource hr_j
    recruit_pool "thracian infantry doryphoroi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource royal_core and not hidden_resource hr_j
    recruit_pool "thracian infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource royal_core and not hidden_resource hr_j
    ;;; BYZANTION
    recruit_pool "celtic infantry galatian raiders"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource greek2 and not event_counter ecThureosReform 1
    recruit_pool "celtic infantry galathraikes"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource greek2 and event_counter ecThureosReform 1
    recruit_pool "thracian infantry doryphoroi"  1  0.08  2  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource greek2
    recruit_pool "thracian infantry sphendonitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource thrakia and hidden_resource greek2
    ;;;	CORE - 4 * 0.04
    recruit_pool "hellenistic infantry phalangitai"  1  0.04  1  0  requires factions { f_makedonia, } and hidden_resource phalangitai
    ;;; SPECIAL
    recruit_pool "hellenistic infantry phalangitai mercenary"  1  1  1  1  requires factions { f_makedonia, } and event_counter ecPike_Recruit_f_makedonia 1
    recruit_pool "hellenistic infantry hoplitai mercenary"  1  1  1  1  requires factions { f_makedonia, } and event_counter ecHoplite_Recruit_f_makedonia 1
    EDIT: It's not just a case of changing recruitment pools in some instances, the buildings themselves have regional limitations. You'll need to check the top line, for example for the Makedonian Hellenic Admin:

    Code:
    makedonia4 requires factions { f_makedonia, } and not building_present govallied and not building_present colony_hellenistic and not building_present_min_level hinterland_hellenistic_polis polis_two and event_counter ecMakedonianKingship 1 and hidden_resource eastern or hidden_resource thrakia or hidden_resource anatolian or hidden_resource egypt or hidden_resource illyria or hidden_resource hyparchia or hidden_resource ioudaioi
    Not only are there pre-requisites in term of other buildings (which may themselves have other restrictions), but there are phase and regional restrictions too. These are sometimes in the main building requirements line like the above, or sometimes in the upgrade path from previous buildings.

    I would note, you can always recruit units anywhere in the world with an Allied Government. Those will, of course, be native units, not your factional ones.
    Last edited by QuintusSertorius; September 20, 2018 at 04:51 AM.

Posting Permissions

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