Results 1 to 19 of 19

Thread: Experiments with the "name_faction" feature of the Americas Campaign

  1. #1
    Centenarius
    Join Date
    Aug 2012
    Location
    Italy
    Posts
    806

    Default Experiments with the "name_faction" feature of the Americas Campaign

    Hello modders of TWC!

    During these days i have been brainstorming about some features used in the Americas Campaign. Since i haven't found a thread about this topic i decided to show you my findings.

    Opening the descr_strat.txt file and looking at the european faction section i have noticed a particular string:

    Code:
    faction    spain, balanced smith
    ai_label         default
    denari    30000
    denari_kings_purse    5000
    name_faction spy aztecs
    settlement
    ;;;;;;;;;;;;;;;;;;;;;;;
    faction    england, balanced smith
    ai_label    default
    dead_until_resurrected
    denari    10000
    denari_kings_purse    1000
    name_faction spy aztecs
    ;;;;;;;;;;;;;;;;;;;;;
    faction    france, balanced smith
    ai_label    default
    dead_until_resurrected
    denari    10000
    denari_kings_purse    1000
    name_faction spy aztecs
    Look at the string in red; every time these factions recruit a spy, the name of the agent will be picked from the aztec name list in descr_names.txt

    At this point I wondered if this feature works with other characters too; so i did a couple of tests on a fresh install of Gigantus's Bare Geomod:

    The first try was with the Holy Roman Empire faction (hre) to see if the feature works with other factions:

    My example code:

    Spoiler Alert, click show to read: 
    Code:
    faction    hre, balanced smith
    ai_label        catholic
    denari    6000
    denari_kings_purse    1500
    name_faction spy timurids


    Running a campaign i found that the code actually works as seen in the Americas Campaign; in this case every spy recruited by the HRE will spawn with a random name from the timurids name list in descr_names.txt

    Then i tried to replace "spy" with other character types:
    Spoiler Alert, click show to read: 
    Code:
    ;Spy
    name_faction spy timurids
    ;Merchant
    name_faction merchant timurids
    ;Assassin
    name_faction assassin timurids
    ;Diplomat
    name_faction diplomat timurids
    ;Captain (not a family member)
    name_faction general timurids
    ;Admiral
    name_faction admiral timurids
    ;Priest
    name_faction priest timurids


    In my tests i have chosen the timurids but i guess that every faction name listed in descr_sm_faction.txt will work.

    With additional testing i found that more than one string can be added to a faction in descr_strat.txt

    For example:
    Spoiler Alert, click show to read: 
    Code:
    faction    hre, balanced smith
    ai_label        catholic
    denari    6000
    denari_kings_purse    1500
    name_faction spy timurids
    name_faction merchant timurids
    name_faction assassin timurids
    name_faction diplomat timurids
    name_faction general timurids
    name_faction admiral timurids
    name_faction priest timurids
    settlement


    The game seem also to accept diffent entries as well:

    Spoiler Alert, click show to read: 
    Code:
    faction    hre, balanced smith
    ai_label        catholic
    denari    6000
    denari_kings_purse    1500
    name_faction spy milan
    name_faction merchant france
    name_faction assassin england
    name_faction diplomat spain
    name_faction general sicily
    name_faction admiral denmark
    name_faction priest portugal
    settlement


    I haven't tested these character types: princess, inquisitor, heretic, witch

    A special case is the "named character" type:

    Spoiler Alert, click show to read: 
    If you add a string like this one "name_faction named character timurids", the game will load but when starting a campaign you will be sent back to the main menu screen. The log will report that an "unknown character type" is found in descr_strat.

    I tried replacing it with "name_faction named_character timurids", the campaign map will start loading but then it crashes beacuse of errors found in the family tree. Additional tests here to see if the feature works even for family members.


    Important note: If you link the name of a specific character type to a different faction and there is a character of the same type already coded in descr_strat.txt it must have a name picked from that specific faction, otherwise it will appear in game but it won't have a name.

    For example in the Americas Campaign as i showed you the spy names are linked to the aztec names, because of this the starting spy assigned to spain is coded with an aztec name:

    Code:
    name_faction spy aztecs
    
    character    Cocozca, spy, male, age 23, x 101, y 30
    traits GoodSpy 3 , NaturalGuide 1
    I hope i was clear, if you have questions just ask

    What do you think about this feature?

    Greetings,

    Warcrafthero
    Temporarily retired from modding.

  2. #2
    alhoon's Avatar Comes Rei Militaris
    took an arrow to the knee

    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,763

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Good find
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  3. #3
    Razor's Avatar Licenced to insult
    Join Date
    Apr 2004
    Location
    Deventer, The Netherlands
    Posts
    4,075

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    That's an interesting find. I never knew that this was possible. I've never really investigated the Americas campaign that much.
    Too bad that it only allows you to use the names of other factions and not their portraits for that agent type.

  4. #4
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    I saw mention about this feature on local Russian forum and seems that it doesn't work for named character. Anyway + rep to you!

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  5. #5
    Centenarius
    Join Date
    Aug 2012
    Location
    Italy
    Posts
    806

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Thanks everyone
    Temporarily retired from modding.

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Thanks for doing a detailed research for it.

    It does seem to work for all agents, I suppose 'named character' won't work as it is made up of two words, parenthesis doesn't work either - it simply results in a CTM.

    Not really much use for it other then for spies for obvious reasons. Or limited agents using a name list of a faction not present in the game (but listed in descr_sm_factions).

    Just for giggles - using moors faction for captain, every time you split off a unit from an army that's gonna happen:

    Last edited by Gigantus; June 19, 2020 at 03:34 AM.










  7. #7
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    interesting find Warcraftero!

  8. #8
    Razor's Avatar Licenced to insult
    Join Date
    Apr 2004
    Location
    Deventer, The Netherlands
    Posts
    4,075

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Quote Originally Posted by Gigantus View Post
    Thanks for doing a detailed research for it.

    It does seem to work for all agents, I suppose 'named character' won't work as it is made up of two words, parenthesis doesn't work either - it simply results in a CTM.

    Not really much use for it other then for spies for obvious reasons. Or limited agents using a name list of a faction not present in the game (but listed in descr_sm_factions).

    Just for giggles - using moors faction for captain, every time you split off a unit from an army that's gonna happen:

    Do priests not also have two names, in which case it wouldn't work for them either?

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    I am talking about the names of character\agent types, eg princess, merchant etc as listed in descr_characters. Here 'named character' is the only one that has a space in the name, hence the game crashes to menu (descr_strat error).










  10. #10
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Don't want to start a new thread. Find it in .exe - spawned_on_revolt and spawned_by parameters for descr_sm_factions are still pesist in M2TW. Any thoughts how it may work?

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  11. #11
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Never heard of those, never mind seen them being used.










  12. #12
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    https://wiki.twcenter.net/index.php?...tions_-_RTW/BI

    Seems that it was functional in RTW. And still persists in kindoms.exe

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  13. #13

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Quote Originally Posted by bitterhowl View Post
    https://wiki.twcenter.net/index.php?...tions_-_RTW/BI

    Seems that it was functional in RTW. And still persists in kindoms.exe
    If some text appears in the file, this does not necessarily mean that it is used

    P.S. but it is quite possible that these two parameters can be used, I think it needs to be checked.
    People always have been the foolish victims of deception and self-deception in politics, and they always will be, until they have learned to seek out the interests of some class or other behind all moral, religious, political and social phrases, declarations and promises
    medieval 2 total war engine overhaul project

  14. #14
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Quote Originally Posted by bitterhowl View Post
    https://wiki.twcenter.net/index.php?...tions_-_RTW/BI

    Seems that it was functional in RTW. And still persists in kindoms.exe
    One does not stop learning....

    Interesting concept that a particular faction gets spawned on revolt via this setting. In M2TW that is already done via the 'faction creator' entry in descr_regions and hence seems obsolete, in fact it allows for a more flexible application.

    Come to think of it: I do remember in vanilla RTW a region in Central Anatolia revolting to a Barbarian (Goth) faction, but I think it was also descr_region based.

    Quote Originally Posted by Gigantus View Post
    [...] If you want to go a bit more dedicated read on:

    data\world\maps\base\descr_regions.txt
    There are a couple of lines that need to be filled sensibly for the game to work properly.
    Line one: region name
    Line two: city name
    Line three: faction creator (determines the loyalty of the city, eg whom it will rebel to), independent from descr_strat entry, this cannot be the slave faction!
    Line four: Rebel type (see data\descr_rebel_factions.txt)
    Line five: RGB numericals (color code, duh)
    Line six: hidden resources, multiple listing does not have a comma,, trading resources have no effect!
    Line seven: triumph value (left over from RTW unless someone can tell me otherwise) has to be 5, else CTD
    Line eight: level of farming\pop increase – anything above 6 is ridiculous: 5000 city with no farming will grow at 4.5% at level 10.
    Line nine: religions – must total 100 (percent), else another CTD
    Last edited by Gigantus; June 29, 2020 at 04:25 AM.










  15. #15
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    I launched campaign with this parameter and got no CTD. But have no time for testing myself if particular faction apperas on revolt - that's why I posted it here, maybe someone has enough time for tests. In my experience I always got only rebels revolting. Seems that they're set as default for this parameter.

    Also I find working parameter for descr_sm_factions that never heard before - periods_unavailable_in_custom_battle. (If we're started a lesson for me here about functionality of .exe findings).

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  16. #16
    Centenarius
    Join Date
    Aug 2012
    Location
    Italy
    Posts
    806

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Hello bitterhowl, i vahe tested the "periods_unavailable_in_custom_battle" in descr_strat; it seems to work fine

    My examples:

    Spoiler Alert, click show to read: 
    Code:
    faction                        byzantium
    culture                        greek
    religion                    orthodox
    symbol                        models_strat/symbol_byzantium.CAS
    rebel_symbol                    models_strat/symbol_rebels.CAS
    primary_colour                    red 133, green 18, blue 137
    secondary_colour                red 239, green 239, blue 239
    loading_logo                    loading_screen/symbols/symbol128_byzantium.tga
    standard_index                    15
    logo_index                    FACTION_LOGO_BYZANTIUM
    small_logo_index                SMALL_FACTION_LOGO_BYZANTIUM
    triumph_value                    5
    custom_battle_availability            yes
    periods_unavailable_in_custom_battle        late
    can_sap                        yes
    prefers_naval_invasions                yes
    can_have_princess                yes
    has_family_tree                    yes
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    faction                        aztecs
    culture                        mesoamerican
    religion                    pagan
    symbol                        models_strat/symbol_aztecs.CAS
    rebel_symbol                    models_strat/symbol_rebels.CAS
    primary_colour                    red 65, green 159, blue 255
    secondary_colour                red 255, green 210, blue 0
    loading_logo                    loading_screen/symbols/symbol128_aztecs.tga
    standard_index                    7
    logo_index                    FACTION_LOGO_AZTEC
    small_logo_index                SMALL_FACTION_LOGO_AZTEC
    triumph_value                    5
    custom_battle_availability            yes
    periods_unavailable_in_custom_battle        early, high
    can_sap                        yes
    prefers_naval_invasions                no
    can_have_princess                no
    has_family_tree                    yes
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    faction                        mongols, spawned_on_event
    culture                        middle_eastern
    religion                    islam
    symbol                        models_strat/symbol_mongols.CAS
    rebel_symbol                    models_strat/symbol_rebels.CAS
    primary_colour                    red 244, green 231, blue 170
    secondary_colour                red 0, green 0, blue 0
    loading_logo                    loading_screen/symbols/symbol128_mongols.tga
    standard_index                    8
    logo_index                    FACTION_LOGO_MONGOLS
    small_logo_index                SMALL_FACTION_LOGO_MONGOLS
    triumph_value                    5
    custom_battle_availability            yes
    periods_unavailable_in_custom_battle        early, high
    horde_min_units                    10
    horde_max_units                    20
    horde_max_units_reduction_every_horde        10
    horde_unit_per_settlement_population        250
    horde_min_named_characters            2
    horde_max_percent_army_stack            80
    horde_disband_percent_on_settlement_capture    0
    horde_unit                    Mongol Infantry
    horde_unit                    Mongol Foot Archers
    horde_unit                    Mongol Heavy Archers
    horde_unit                    Mongol Heavy Lancers
    horde_unit                    Mongol Light Lancers
    horde_unit                    Mongol Horse Archers
    can_sap                        yes
    prefers_naval_invasions                no
    can_have_princess                no
    has_family_tree                    yes
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    faction                        timurids, spawned_on_event
    culture                        middle_eastern
    religion                    islam
    symbol                        models_strat/symbol_timurids.CAS
    rebel_symbol                    models_strat/symbol_rebels.CAS
    primary_colour                    red 0, green 0, blue 0
    secondary_colour                red 215, green 0, blue 0
    loading_logo                    loading_screen/symbols/symbol128_timurids.tga
    standard_index                    22
    logo_index                    FACTION_LOGO_TIMURID
    small_logo_index                SMALL_FACTION_LOGO_TIMURID
    triumph_value                    5
    custom_battle_availability            yes
    periods_unavailable_in_custom_battle        early, high
    horde_min_units                    10
    horde_max_units                    20
    horde_max_units_reduction_every_horde        10
    horde_unit_per_settlement_population        250
    horde_min_named_characters            2
    horde_max_percent_army_stack            80
    horde_disband_percent_on_settlement_capture    0
    horde_unit                    Mongol Heavy Lancers
    horde_unit                    Mongol Heavy Archers
    horde_unit                    Sabadar Militia
    horde_unit                    ME Halberd Militia
    horde_unit                    Turkomans
    can_sap                        yes
    prefers_naval_invasions                no
    can_have_princess                no
    has_family_tree                    yes


    In order to avoid confusion, wouldn't be better to start a new thread about your findings? So we can test them and report the results; what do you think?
    Temporarily retired from modding.

  17. #17
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Quote Originally Posted by Warcrafthero View Post
    Hello bitterhowl, i vahe tested the "periods_unavailable_in_custom_battle" in descr_strat descr_sm_factions; it seems to work fine










  18. #18
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    My excuses to topic-starter, meant no harm. I think another way, tha t separating threads is a way to loose information.

    I know that feature for periods working and know how it works. Also seems that revolt feature works too in a way as intended - in my hotseat tests faction that set as spawns_on_revolt appeared deep in enemy territory.

    Now moderator may separate those posts or even delete them, do as you like.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  19. #19
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Experiments with the "name_faction" feature of the Americas Campaign

    Yay, this thread is full of surprises!

    Quote Originally Posted by bitterhowl View Post
    My excuses to topic-starter, meant no harm. I think another way, tha t separating threads is a way to loose information.

    I know that feature for periods working and know how it works. Also seems that revolt feature works too in a way as intended - in my hotseat tests faction that set as spawns_on_revolt appeared deep in enemy territory.

    Now moderator may separate those posts or even delete them, do as you like.
    Very intetesting, but where did you write "spawned_on_revolt"? I mean can you set a region/faction it revolts from?

Posting Permissions

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