Page 11 of 11 FirstFirst ... 234567891011
Results 201 to 217 of 217

Thread: A Guide for Guilds

  1. #201
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,287

    Default Re: A Guide for Guilds

    Once, when they become excom'd. There is also a FactionExcommunicated condition, which could be used for ongoing state tests.

  2. #202
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,406

    Default Re: A Guide for Guilds (MAJOR UPDATE 3/9/07)

    Quote Originally Posted by Withwnar View Post
    This is true. Not as hidden_resource conditions in EDB nor when added in descr_regions hoping to use the 'hardcoded' mechanism which was suggested here might exist - I don't think there is any hardcoded stuff for this, it's simply the case that you cannot tell the game where a guild is allowed to be offered.

    I also tried a building_present_min_level and that had no effect either - the guild was offered in a settlement which did not have that building, despite the condition saying it needs to be there.

    Fortunately the factions{} condition DOES work in EDB. I don't know about other condition types.

    EDIT: I was only testing the explorers_guild. I don't know if the above applies to all.
    It does apply for hanseatic guild as well. I got hanseatic guild in Vienna that has no access to sea (so no port), and no hidden_resource hanse, and even event_counter hanseatic_league was at 0. It seems the city amassed the required number of points of the guild and it was offered.

    Code:
    building guild_hanseatic_guild{
      convert_to guild_hanseatic_guild
      levels hanseatic_guild
      {
        hanseatic_guild requires factions { northern_european, eastern_european, } and port and event_counter hanseatic_league 1 and hidden_resource hanse
        {
          convert_to 0
          capability
          {
    		population_growth_bonus bonus 1 requires factions { northern_european, southern_european, eastern_european, greek, middle_eastern, } and not event_counter OSTSIEDLUNG 1
    		population_growth_bonus bonus 2 requires factions { northern_european, southern_european, eastern_european, greek, middle_eastern, } and event_counter OSTSIEDLUNG 1
    		trade_base_income_bonus bonus 1 requires factions { northern_european, southern_european, eastern_european, greek, middle_eastern, } and not event_counter HANSEATIC_LEAGUE_EXPANDS 1
    		trade_base_income_bonus bonus 3 requires factions { northern_european, southern_european, eastern_european, greek, middle_eastern, } and event_counter HANSEATIC_LEAGUE_EXPANDS 1
    		navy_bonus 1  requires factions { northern_european, southern_european, eastern_european, greek, middle_eastern, } and event_counter HANSEATIC_LEAGUE_EXPANDS 1
          }
          material wooden
          construction  1
          cost  5000
          settlement_min large_town
          upgrades
          {
          }
        }
      }
      plugins
      {
      }
    }
    If you want to play a historical mod in the medieval setting the best IMO are:
    Stainless Steel Historical Improvement Project and Broken Crescent.
    Read my opinions on other mods here.
    ........................................................................................................................................
    Reviews of the mods (all made in 2018): SSHIP, Wrath of the Norsemen, Broken Crescent.
    Home rules for playing a game without exploiting the M2TW engine deficiencies.
    Hints for Medieval 2 moders: forts, merchants, AT-NGB bug.
    Thrones of Britannia: review, opinion on the battles, ideas for modding. No good mod yet, alas!
    Dominant strategy in Rome2, Attila, ToB and Troy: “Sniping groups of armies”. Still there, alas!
    .................................................................................................................................................................................
    Mod leader of the SSHIP: traits, ancillaries, script, historical improvements, fixes everywhere.

  3. #203

    Default Re: A Guide for Guilds

    I cannot rightly remember how the guild point mechanics work, but would it be possible to have it simply be the case that any city without the hidden resource hanse receives like -100 guild points for the Hanseatic League each turn? Is that a parameter that could be used for the issuing of guild points?
    Spoiler Alert, click show to read: 

    E.g. very roughly:

    Trigger hanse-not
    whentotest TurnEnd
    if not hidden_resource hanse
    -100 guildpoints hanseatic_league


    (I know I have butchered the language of the triggers; the point is just to get the general idea across )
    | Community Creative Writing
    | My Library
    | My Mapping Resources
    | My Nabataean AAR for EBII
    | My Ongoing Creative Writing

  4. #204
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,406

    Default Re: A Guide for Guilds

    Yes, solving a particular case is possible (and in the SSHIP will be done for the Hanse) with other means. But it's worth to know the mechanism that's a kind of modding trap.

  5. #205

    Default Re: A Guide for Guilds

    True enough! Having a general solution to the problem would indeed be good.
    | Community Creative Writing
    | My Library
    | My Mapping Resources
    | My Nabataean AAR for EBII
    | My Ongoing Creative Writing

  6. #206
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,406

    Default Re: A Guide for Guilds

    Can anybody tell if a conquest of a settlement (one faction takes the settlement from another one) sets all the points to 0, or they stay as they were before?

  7. #207
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,176
    Blog Entries
    26

    Default Re: A Guide for Guilds (MAJOR UPDATE 3/9/07)

    Quote Originally Posted by Jurand of Cracow View Post
    It does apply for hanseatic guild as well. I got hanseatic guild in Vienna that has no access to sea (so no port), and no hidden_resource hanse, and even event_counter hanseatic_league was at 0. It seems the city amassed the required number of points of the guild and it was offered.

    Code:
    building guild_hanseatic_guild{
      convert_to guild_hanseatic_guild
      levels hanseatic_guild
      {
        hanseatic_guild requires factions { northern_european, eastern_european, } and port and event_counter hanseatic_league 1 and hidden_resource hanse
        {
    Your results may be misleading as the conditions are faulty, 'port' will require a building definition, eg 'building_present_min_level' - but as withnwar points out that didn't work anyhow. Check your hanseatic triggers - here is a the default set up from teutonic:
    Code:
    Trigger 0286_Hanseatic_Control_[settlement name]
        WhenToTest SettlementTurnStart
    
        Condition SettlementName [settlement name]
              and I_EventCounter hanseatic_constructed = 0
    
        Guild hanseatic_guild s  5 
        Guild hanseatic_guild a  5
    Following the discussion in this thread I have come to the following conclusion:

    • the only valid requirements for EDB buildings with the guild prefix is 'factions'
    • any other requirements need to be defined in the triggers in export_descr_guilds

    This makes the guild system rather versatile as the triggers can be highly customized. Keeping in mind that the 's' score in connection with a WhenToTest settlement event defines where the guild will be offered.
    Last edited by Gigantus; October 29, 2020 at 11:27 PM.




  8. #208
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,287

    Default Re: A Guide for Guilds (MAJOR UPDATE 3/9/07)

    Quote Originally Posted by Gigantus View Post
    'port' will require a building definition
    "port" is also a condition in its own right, reported here. It means a region with a port tile, regardless of whether any port building is currently constructed.

  9. #209
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,406

    Default Re: A Guide for Guilds

    Thanks, Guys, I also find the guilds very versatile. Could you as well tell this one loud and clear: a conquest of a settlement (one faction takes the settlement from another one, or sells a settlement, or it's bribed) sets all the guild points for this settlement to 0, or they are retained (=stay as they were before)?

    This is the way I've dealt with my proble.
    I also don't know:
    - how many IsRegionOf conditions are a max in a line (so I made 4 trigger - if 20 conditions are allowed, I'd do with 1 trigger)
    - if it's possible to "terminate monitor" in the EDG, as we do in the script.txt.
    - how does the points behave at extreme values (like 1000), so I've made it with 150 points for 10 turns

    Code:
    ;=============================================================================;-------------- Hanseatic -----------------
    ;=============================================================================
    ; in v.097 the non-hanseati-related points may accrue to 200 (required for the building) in 45 turns
    
    
    ;============================================================================= 
    ; The problem: points given to all guilds make the Hanseatic available in in-land and far-away settlements.
    ; It cannot be restricted in EDB with conditions related to hidden resources or buildings.
    ; Using GovernorPlugInExists condition is not possible - it works only if there's a governor.
    
    
    ;----------------------------------------------------- Deny
    Trigger Deny_Hanseatic_Guild_To_All_Settlements
     WhenToTest FactionTurnStart
    
    
     Condition I_TurnNumber < 10
    
    
     Guild hanseatic_guild a -150
     
    ;------------------------------------------
     Trigger Allow_Hanseatic_Guild_To_1
        WhenToTest SettlementTurnEnd
    
    
     Condition I_TurnNumber < 15
    	and IsRegionOneOf 1 2 3 4 5 9 13
    
    
     Guild hanseatic_guild s 150
    
    
    ;------------------------------------------
     Trigger Allow_Hanseatic_Guild_To_2
        WhenToTest SettlementTurnEnd
    
    
     Condition I_TurnNumber < 15
    	and IsRegionOneOf 14 15 16 18 22 26 28
    
    
     Guild hanseatic_guild s 150
    
    
    ;------------------------------------------
     Trigger Allow_Hanseatic_Guild_To_3
        WhenToTest SettlementTurnEnd
    
    
     Condition I_TurnNumber < 15
    	and IsRegionOneOf 29 31 33 34 35 50 53
    
    
     Guild hanseatic_guild s 150
    
    
    ;=============================================================================
    ;------------------------------------------
    Trigger Hanseatic_Exists_City_Plugin01
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorPlugInExists = hansa
           and I_EventCounter hanseatic_count >= 0
           and I_EventCounter hanseatic_constructed = 0
    
    
     Guild hanseatic_guild s 8
    
    
    ;------------------------------------------
    Trigger Hanseatic_Exists_City_Plugin02
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorPlugInExists = hansa
           and I_EventCounter hanseatic_count >= 1
           and I_EventCounter hanseatic_constructed = 0
    
    
     Guild hanseatic_guild s 5
    
    
    ;------------------------------------------
    Trigger Hanseatic_Exists_City_Plugin03
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorPlugInExists = hansa
           and I_EventCounter hanseatic_count >= 2
           and I_EventCounter hanseatic_constructed = 0
    
    
     Guild hanseatic_guild s 3
    
    
    ;------------------------------------------
    Trigger Hanseatic_Exists_City_Plugin04
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorPlugInExists = hansa
           and I_EventCounter hanseatic_count >= 3
           and I_EventCounter hanseatic_constructed = 0
    
    
     Guild hanseatic_guild s 2
    
    
    ;------------------------------------------
    Trigger Hanseatic_Exists_Castle_Plugin01
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorPlugInExists = c_hansa
           and I_EventCounter hanseatic_count >= 0
           and I_EventCounter hanseatic_constructed = 0
    
    
     Guild hanseatic_guild s 8
    
    
    ;------------------------------------------
    Trigger Hanseatic_Exists_Castle_Plugin02
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorPlugInExists = c_hansa
           and I_EventCounter hanseatic_count >= 1
           and I_EventCounter hanseatic_constructed = 0
    
    
     Guild hanseatic_guild s 5
    
    
    ;------------------------------------------
    Trigger Hanseatic_Exists_Castle_Plugin03
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorPlugInExists = c_hansa
           and I_EventCounter hanseatic_count >= 2
           and I_EventCounter hanseatic_constructed = 0
    
    
     Guild hanseatic_guild s 3
    
    
    ;------------------------------------------
    Trigger Hanseatic_Exists_Castle_Plugin04
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorPlugInExists = c_hansa
           and I_EventCounter hanseatic_count >= 3
           and I_EventCounter hanseatic_constructed = 0
    
    
     Guild hanseatic_guild s 2
    
    
    ;------------------------------------------
    Trigger Hanseatic_Loyalty_Level_Bonus_City
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorLoyaltyLevel = loyalty_happy
           and GovernorPlugInExists = hansa
    
    
     Guild hanseatic_guild s 5
     
    ;------------------------------------------
    Trigger Hanseatic_Loyalty_Level_Bonus_Castle
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorLoyaltyLevel = loyalty_happy
           and GovernorPlugInExists = c_hansa
    
    
     Guild hanseatic_guild s 5
    Last edited by Jurand of Cracow; October 30, 2020 at 02:50 AM.

  10. #210
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,176
    Blog Entries
    26

    Default Re: A Guide for Guilds (MAJOR UPDATE 3/9/07)

    Quote Originally Posted by Withwnar View Post
    "port" is also a condition in its own right, reported here. It means a region with a port tile, regardless of whether any port building is currently constructed.
    Thanks, wasn't aware of that.

    Terminating EDG triggers - not in the sense of 'never to be used again and removed from memory', but you could use event counters to enable\disable them.
    Last edited by Gigantus; October 30, 2020 at 03:10 AM.




  11. #211
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,287

    Default Re: A Guide for Guilds

    Quote Originally Posted by Jurand of Cracow View Post
    - how many IsRegionOf conditions are a max in a line (so I made 4 trigger - if 20 conditions are allowed, I'd do with 1 trigger)
    Not sure. I've used about 10 in the past with no problem. Try 20 and check if the first and last region in that 20 list are working correctly, if they are then it's a safe bet that they all are.

    No idea on the max points allowed or the resetting to 0 upon capture.

  12. #212
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,406

    Default Re: A Guide for Guilds

    Thanks, Guys, for advices. Given that we don't know if the points reset, I've made it in such a way:
    In the script:
    Spoiler Alert, click show to read: 
    Code:
        ;======================================================================================================
        ;------- Hanseatic System
        ;======================================================================================================
    
    
        ;----------------- (I) Prevent non-eligible provices from getting it ----------------------
        ; counter is used in EDG
        
        declare_counter hanseatic_guild_allowed
        set_event_counter hanseatic_guild_allowed 0
        
        monitor_event FactionTurnStart FactionType slave
    
    
            inc_counter hanseatic_guild_allowed 1
            
            if I_EventCounter hanseatic_guild_allowed > 20 
                set_event_counter hanseatic_guild_allowed 0
            end_if    
            
        end_monitor
    
    
    
    
        ;----------------- (II) Allow giving points in EDG ----------------------
        
        monitor_event PreFactionTurnStart TrueCondition
            set_event_counter hanseatic_count -1
        end_monitor
    
    
        monitor_event CharacterTurnStart GovernorPlugInExists = hansa
            and I_EventCounter hanseatic_league = 1
    
    
            inc_event_counter hanseatic_count 1
        end_monitor
    
    
        monitor_event CharacterTurnStart GovernorPlugInExists = c_hansa
            and I_EventCounter hanseatic_league = 1
    
    
            inc_event_counter hanseatic_count 1
        end_monitor
    
    
    
    
        set_event_counter hanseatic_constructed 0
    
    
        monitor_event GuildUpgraded BuildingName = hanseatic_guild
            set_event_counter hanseatic_constructed 1
            reset_guild_standing hanseatic_guild
        end_monitor
    
    
        monitor_event BuildingDestroyed BuildingName = hanseatic_guild
            set_event_counter hanseatic_constructed 0
            reset_guild_standing hanseatic_guild
        end_monitor

    In the EDG:
    Spoiler Alert, click show to read: 
    Code:
    ;=============================================================================
    ;---  Prevention of Hanse in the non-eligible provinces ----------------------
    ;
    ; The problem: points that are given to all guilds make the Hanseatic available in in-land and far-away provinces.
    ; It cannot be restricted in EDB with conditions related to hidden resources, event counters or buildings.
    ; Using Plugin condition is not possible - GovernorPlugInExists works only if there's a governor.
    ; The solution: subtract 100 points every 20 turns in all settlements, then add those point to the eligible settlements.
    ; This also solves the problem of possible re-set of the points.
     
    ;------------------------------------------  
    Trigger Deny_Hanseatic_Guild_To_All_Settlements
     WhenToTest FactionTurnStart
    
    
     Condition I_EventCounter hanseatic_guild_allowed > 19
        and I_EventCounter hanseatic_guild_allowed < 21            ; redundant but in case of a bug
                
     Guild hanseatic_guild a -100
     
    ;------------------------------------------
     Trigger Allow_Hanseatic_Guild_To_Prussian_Quarter
        WhenToTest SettlementTurnEnd
    
    
     Condition I_EventCounter hanseatic_guild_allowed > 19
         and I_EventCounter hanseatic_guild_allowed < 21
        and IsRegionOneOf 3 4 5 9 13
        
     Guild hanseatic_guild s 100
    
    
    ;------------------------------------------
     Trigger Allow_Hanseatic_Guild_To_Wendic_Quarter
        WhenToTest SettlementTurnEnd
    
    
     Condition I_EventCounter hanseatic_guild_allowed > 19
         and I_EventCounter hanseatic_guild_allowed < 21
        and IsRegionOneOf 14 15 16 18 22 26 28 29 31 
        
     Guild hanseatic_guild s 100
    
    
    ;------------------------------------------
     Trigger Allow_Hanseatic_Guild_To_Saxon_Quarter
        WhenToTest SettlementTurnEnd
    
    
     Condition I_EventCounter hanseatic_guild_allowed > 19
         and I_EventCounter hanseatic_guild_allowed < 21
         and IsRegionOneOf 1 2 33 34 35 50 53
    
    
     Guild hanseatic_guild s 100
    
    
    
    
    ;=============================================================================
    ;---  Special points for special settlements
    
    
    ;------------------------------------------ Lubeck
    Trigger Hanse_For_Lubeck
     WhenToTest SettlementTurnEnd
    
    
     Condition IsRegionOneOf 29
            and I_EventCounter hanseatic_league = 1
            and I_EventCounter hanseatic_guild_allowed > 19
            and I_EventCounter hanseatic_guild_allowed < 21    
    
    
     Guild hanseatic_guild s 100
    
    
    ;------------------------------------------ Hamburg
    Trigger Hanse_For_Hamburg
     WhenToTest SettlementTurnEnd
    
    
     Condition IsRegionOneOf 33
            and not SettlementBuildingExists = hanseatic_guild
            and I_EventCounter HANSEATIC_LEAGUE_EXPANDS = 1
            and I_EventCounter hanseatic_guild_allowed > 19
            and I_EventCounter hanseatic_guild_allowed < 21    
    
    
     Guild hanseatic_guild s 100
     
     
    ;=============================================================================
    ;---  Standard points for the guild
    
    
    ;------------------------------------------
    Trigger Hanseatic_Exists_City_Plugin01
     WhenToTest CharacterTurnEnd
    
    
     Condition GovernorPlugInExists = hansa
           and I_EventCounter hanseatic_count >= 0
           and I_EventCounter hanseatic_constructed = 0
    
    
     Guild hanseatic_guild s 8
    
    AND THE SIMILAR STANDARD TRIGGERS AS BEFORE
    Last edited by Jurand of Cracow; November 01, 2020 at 08:40 AM.

  13. #213
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,176
    Blog Entries
    26

    Default Re: A Guide for Guilds

    declare_counter hanseatic_guild_allowed
    set_event_counter hanseatic_guild_allowed 0

    1. You do not need to declare an event_counter - it always exists in a zero state.
    2. Having the same name for a regular counter and an event counter can easily lead to issues.

    I don't know why you don't use the port condition in the EDG triggers to avoid inland hansa guilds, as well as NOT using 'a' - that gives points to every settlement, so only use 's':
    Code:
    Trigger 0286_Hanseatic_Control_[settlement name]
        WhenToTest SettlementTurnStart
    
        Condition SettlementName [settlement name] ; alternatively use IsRegionOneOf
              and I_EventCounter hanseatic_constructed = 0
              and port ; alternatively use SettlementBuildingExists
    
        Guild hanseatic_guild s  5




  14. #214
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,406

    Default Re: A Guide for Guilds

    Hi Gig,
    ad counters - that's a mistake, indeed the declare_counter is redundant.
    ad port condition - it doesn't prevent the other non-eligible (ie coastal but not Hanseatic) provices from getting the points.
    ad a <> s - I use "a" in the first trigger (all provinces have -100 pts.), but then I add in certain (Hanseatic-eligible) provinces ("s" plus list of provinces) that 100 pts.

    I would have been easier if one could use "hidden resources" in EDG, but I don't know if it's allowed.

  15. #215
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,176
    Blog Entries
    26

    Default Re: A Guide for Guilds

    port condition - that would mean the condition isn't valid\is ignored outside the EDB, in that case a "SettlementBuildingExists >= port" should do the deed for a global trigger:
    Code:
    Trigger 0666_Hanseatic_port_settlement
        WhenToTest SettlementTurnStart
    
        Condition SettlementBuildingExists >= port  ; c_port for castle
              and I_EventCounter hanseatic_constructed = 0
    
        Guild hanseatic_guild s  5




  16. #216
    Jadli's Avatar The Fallen God
    Citizen

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    6,766

    Default Re: A Guide for Guilds

    Nice to see other people are delving into guilds as well

    Wouldnt perhaps the completely easiest solution be, that you create a hinterland "hanse" building, that would be used as a condition for getting guild points in EDG? (and also for drastically decreasing hanse guild points in case a region doesnt have it?)

  17. #217
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    4,406

    Default Re: A Guide for Guilds

    Quote Originally Posted by Jadli View Post
    Nice to see other people are delving into guilds as well

    Wouldnt perhaps the completely easiest solution be, that you create a hinterland "hanse" building, that would be used as a condition for getting guild points in EDG? (and also for drastically decreasing hanse guild points in case a region doesnt have it?)
    There're many ways to skin a cat. One may also go through all the triggers and add negative points for hanseatic guild in each case. I'd go for the simplest

Page 11 of 11 FirstFirst ... 234567891011

Posting Permissions

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