Results 1 to 17 of 17

Thread: RegionIsOneOf for ancillary - no go?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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 RegionIsOneOf for ancillary - no go?

    I am trying to define a trigger for an ancillary where the character (a merchant) has to be in specific region for two rounds at least.
    The example underneath does not work in that form, but it fires without "RegionIsOneOf".

    WhenToTest CharacterTurnEnd
    Condition AgentType = merchant
    and not EndedInSettlement
    and IsRegionOneOf Region_Name
    and TimeInRegion > 2
    AcquireAncillary Ancillary_Name chance 100

    Any ideas on how to handle it?










  2. #2
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: RegionIsOneOf for ancillary - no go?

    WhenToTest CharacterTurnEnd
    Condition AgentType = merchant
    and not EndedInSettlement
    and TimeInRegion > 2
    AcquireAncillary Ancillary_Name chance 100
    this should do it (just remove that line)
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  3. #3
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: RegionIsOneOf for ancillary - no go?

    It works but requires the region_id (number). I have found that it doesn't matter whether or not you add the name too, but the name alone doesn't work.

    Code:
    WhenToTest CharacterTurnEnd
    Condition AgentType = merchant
    and not EndedInSettlement
    and IsRegionOneOf Region_ID
    and TimeInRegion > 2
    AcquireAncillary Ancillary_Name chance 100

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  4. #4
    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: RegionIsOneOf for ancillary - no go?

    this should do it (just remove that line)
    I hope that wasn't sarcastic:
    The example underneath does not work in that form, but it fires without "RegionIsOneOf".
    @konny
    Curious, it works only with the region name in the script. Will try just with the number.










  5. #5
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: RegionIsOneOf for ancillary - no go?

    Quote Originally Posted by gigantus View Post
    Curious, it works only with the region name in the script. Will try just with the number.
    Don't know for the script, but I use it frequently that way in EDA

    EndedInSettlement + IsRegionOneOf 71, 123, 99

    and the like. This saves me from making one trigger for each settlement. It definitly works.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  6. #6
    Pnutmaster's Avatar Dominus Qualitatium
    Join Date
    Jan 2006
    Location
    Brooklyn, NY
    Posts
    1,572

    Default Re: RegionIsOneOf for ancillary - no go?

    Quote Originally Posted by konny View Post
    Don't know for the script, but I use it frequently that way in EDA

    EndedInSettlement + IsRegionOneOf 71, 123, 99

    and the like. This saves me from making one trigger for each settlement. It definitly works.
    Have I misread this, or can I write a single trigger like such...

    WhenToTest CharacterTurnEnd
    Condition AgentType = merchant
    and not EndedInSettlement
    and IsRegionOneOf 99, 123, 50
    and TimeInRegion > 2
    AcquireAncillary Ancillary_Name chance 100
    Checking for EITHER regions 99, 123, or 50?
    Under the patronage and bound to the service of the
    artist formerly known as Squeakus Maximus
    Stoic Pantheist of S.I.N

  7. #7
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: RegionIsOneOf for ancillary - no go?

    I hope that wasn't sarcastic:
    The example underneath does not work in that form, but it fires without "RegionIsOneOf".
    sorry i missed that line :S


    i dont have the ''RegionIsOneOf'' condition/event on my docudemons... why do you have it?
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  8. #8
    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: RegionIsOneOf for ancillary - no go?

    It worked for the EDA, thanks a lot.
    I usually prefer the region name as it is a pain defining the Region IDs. No problem if it is just for two or three, after that it gets tedious. (And working with Geomod you might just shuffle the order in the descr_regions file)

    @swagger
    M2TW Ultimate Docudemons 4.0
    see conditions
    Last edited by Gigantus; December 15, 2009 at 10:21 AM.










  9. #9
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: RegionIsOneOf for ancillary - no go?

    Quote Originally Posted by gigantus View Post
    It worked for the EDA, thanks a lot.
    I usually prefer the region name as it is a pain defining the Region IDs. No problem if it is just for two or three, after that it gets tedious. (And working with Geomod you might just shuffle the order in the descr_regions file)
    Oh wait, are you able to define region IDs with Geomod? We have the problem that I have coded hundreds of titles based on those region IDs, but now changing anything on the map throws about those numbers.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  10. #10
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: RegionIsOneOf for ancillary - no go?

    oh ok, i still use the old one
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  11. #11
    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: RegionIsOneOf for ancillary - no go?

    One has to go with the times, how else can one be glad?










  12. #12
    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: RegionIsOneOf for ancillary - no go?

    No, you can't determine region ids with Geomod, it is determined by the order in the descr_regions file. But you can shuffle the order in the descr_regions file with Geomomd. That is needed for the definition of the starting capital:
    Geomod takes the first city of the faction in descr_regions and puts it at the beginning of the city list in descr_strat, thereby making it the capital. Only way to beat that, is to move the desired settlement (region) in the list (descr_region) sufficiently toward the top of the list. Personally, I put all the capitals into the first slots of descr_regions, then I start with those traits and triggers.










  13. #13
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: RegionIsOneOf for ancillary - no go?

    Quote Originally Posted by gigantus View Post
    No, you can't determine region ids with Geomod, it is determined by the order in the descr_regions file.
    Actually I think region_id is based on how the map is created. The top left corner will always be region 0. Then it moves left on the top row, when it hits a new region it gives it a new region_id. Then it moves to the next row down and again goes left to right.

  14. #14
    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: RegionIsOneOf for ancillary - no go?

    That is correct.










  15. #15
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: RegionIsOneOf for ancillary - no go?

    Yup, this is very helpful when you have a trait or ancillary to be acquired in several settlements or provinces, so you don't need to make a trigger for each of it (also works the other way round, of course).

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  16. #16

    Default Re: RegionIsOneOf for ancillary - no go?

    I've done a lot of work with a regional combat mod based on this.
    Son of PW

  17. #17
    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: RegionIsOneOf for ancillary - no go?

    Just checked - it is correct.

    Which means that once the regions on the map are established, no shuffling in descr_regions or descr_strat will change the Region_ID order. Only changing of the region border or the region itself will do that. That should give relief!










Posting Permissions

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