Results 1 to 6 of 6

Thread: [solved] FactionType ... (!!!)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    SpyrosM91's Avatar Despotes
    Join Date
    Aug 2010
    Location
    Patras, Greece
    Posts
    3,675

    Default [solved] FactionType ... (!!!)

    i know it is a long shot... BUT i wanted to ask...

    can FactionType be used with cultures (for the campaign_script....)... like the " factions { england, greek, } " in EDB??


    and if no, is there any other way, to make it possible to group factions together for conditions??
    Last edited by SpyrosM91; October 27, 2012 at 08:01 AM.
    Proud Tsardoms Total War: Historian - Coder - Scripter - Mapper

  2. #2
    Vegas_Bear's Avatar Biarchus
    Join Date
    Sep 2005
    Location
    Las Vegas, NV
    Posts
    605

    Default Re: FactionType ...

    You can use something like this-

    CharacterReligion catholic
    This is used in playing the video for a speific religion who captures Jerusalem.

    monitor_event GeneralCaptureSettlement SettlementName Jerusalem
    and CharacterReligion catholic
    and I_CompareCounter jerusalem_catholic = 0

    historic_event jerusalem_catholic event/Christians_Capture_Jerusalem.bik
    set_counter jerusalem_catholic 1
    set_counter jerusalem_islam 0
    end_monitor
    VB

  3. #3
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: FactionType ...

    From docudemos_conditions:
    ---------------------------------------------------
    Identifier: FactionCultureType
    Trigger requirements: faction
    Parameters: culture type (roman, barbarian, carthaginian, greek, egyptian, eastern)
    Sample use: FactionCultureType greek
    Description: Test the faction's culture type
    Battle or Strat: Either
    Class: FACTION_CULTURE
    Implemented: Yes
    Author: Guy

    ---------------------------------------------------
    Identifier: FactionReligion
    Trigger requirements: faction
    Parameters: faction religion
    Sample use: FactionReligion catholic
    Description: Test the faction religion
    Battle or Strat: Either
    Class: FACTION_RELIGION_CHECK
    Implemented: Yes
    Author: ScottL

    ---------------------------------------------------
    Identifier: FactionType
    Trigger requirements: faction
    Parameters: faction type
    Sample use: FactionType romans_julii
    Description: Test the faction type
    Battle or Strat: Either
    Class: FACTION_TYPE_CHECK
    Implemented: Yes
    Author: Lee
    Cheers

    EDIT if you mean something like FactionTipe England, France, no it's not possible. Don't know if it turns in error, but cannot work anyway (would always turn false) 'couse if a faction is England, it cannot be france. use theese ones in campaign_script.
    Last edited by Kiliç Alì; February 06, 2012 at 04:38 AM.

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  4. #4
    SpyrosM91's Avatar Despotes
    Join Date
    Aug 2010
    Location
    Patras, Greece
    Posts
    3,675

    Default Re: FactionType ...

    thank you both! (+rep)

    Kilic Ali, you just saved me 22 monitors from a single script with the "FactionCultureType" condition !!! thanks!!!
    Proud Tsardoms Total War: Historian - Coder - Scripter - Mapper

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: FactionType ...

    For tricky stuff like that I use a faction monitor like the one underneath:

    Code:
    declare_counter reichs_fraktion
    declare_counter katholisch
    ;--- England ---
        declare_counter england_turn
        monitor_event PreFactionTurnStart FactionType england
            set_counter england_turn 1
          set_counter reichs_fraktion 0
          set_counter katholisch 1
        end_monitor
        monitor_event FactionTurnEnd FactionType england
            set_counter england_turn 0
        end_monitor
        declare_counter england_dead
        monitor_event LeaderDestroyedFaction FactionType england
            set_counter england_dead 1
        terminate_monitor
        end_monitor
    It basically assigns counters to a faction's turn. In this case the mod starts with factions belonging to one of two groups (reichs_fraktion or not) and within these groups have one of two religions (katholisch or not). Additionally it sets a counter with the faction's name which comes very handy when chasing errors and if determining if a certain faction has done something that requires an if monitor. Last not least a counter to check if the faction still exists.

    The major advantage of this is the use of the counters within an if monitor. Example, the first section\option requires England to be the attacker when capturing a settlement. The second section\option requires that faction NOT to have the catholic religion (which England has):

    Code:
    declare_counter trier_spawn
    monitor_event GeneralCaptureSettlement SettlementName Trier
        if I_CompareCounter england_turn == 1
            set_counter trier_spawn 1
        end_if
        if I_CompareCounter katholisch < 1
            set_counter trier_spawn 1
        end_if
    
        terminate_monitor
    end_monitor
    I am open to suggestions how that could have been handled otherwise...
    Last edited by Gigantus; February 07, 2012 at 01:13 AM.










  6. #6
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: FactionType ...

    maybe this?

    monitor_event GeneralCaptureSettlement SettlementName Trier
    and not CharacterReligion = catholic
    and CharFactionType = england

    But I prefer the use of if_ calls and counters, 'couse it allows you to have a same monitor with different factions. In this case if you wanted this to work for France also, you'd have to duplicate the monitor, while in your way you can use the same monitor for different factions.

    Post 666 ! Sacrifice is going on tonight...
    Last edited by Kiliç Alì; February 08, 2012 at 08:20 AM.

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

Posting Permissions

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