Results 1 to 12 of 12

Thread: Trait help

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Trait help

    Just wondering if I can have some help with this trigger - will this trigger fire?

    Trigger:
    Code:
    Trigger LondonBasedGeneral_0001
        WhenToTest CharacterComesOfAge
    
        Condition IsGeneral
              and SettlementName London
    
        Affects LondonBasedGeneral  1  Chance  100
    For some reason, it doesn't seem to be working in game, but there are no errors, and the traits are all perfectly aligned with their ingame texts. I'd appreciate the help. Thanks for your time.

    [ Cry Havoc:: ] - [ link ] - [ An Expanded World Submod for Call of Warhammer ]
    My turban brings all the muslims to the yard and they're like العنصرية ش

  2. #2
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Trait help

    No, it won't work:

    Identifier: CharacterComesOfAge
    Event: A Character has come of age
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_COMING_OF_AGE
    Author: Lee

    You can see the event exports a region_id but not a settlement.

    Maybe this can be used:

    Identifier: IsRegionOneOf
    Trigger requirements: region_id
    Parameters: list of regions given by label or number
    Sample use: IsRegionOneOf 0 Caribbean_Isles
    Description: Test is a region in given region list?
    Battle or Strat: Strat
    Class: IS_REGION_ONE_OF
    Implemented: Yes
    Author: Grig

    And so something like this might work:

    Code:
    Trigger LondonBasedGeneral_0001
        WhenToTest CharacterComesOfAge
    
        Condition IsGeneral
              and IsRegionOneOf 0 London_Province
    
        Affects LondonBasedGeneral  1  Chance  100
    Looking at it I guess the 0 indicates the amount of regions to be checked. Perhaps the amount in excess of the first region specified.

    Or maybe this is how it should be:


    Code:
    Trigger LondonBasedGeneral_0001
        WhenToTest CharacterComesOfAge
    
        Condition IsGeneral
              and IsRegionOneOf London_Province
    
        Affects LondonBasedGeneral  1  Chance  100
    And so perhaps the example in docudemons is confusing me by showing the 2 choices.
    Last edited by Taiji; August 06, 2010 at 05:10 PM.

  3. #3

    Default Re: Trait help

    Ah, so if we change the region to be labelled as London, we could replace that with IsRegionOneOf 1 London?

    Are there any other limitations to labelling regions?

    [ Cry Havoc:: ] - [ link ] - [ An Expanded World Submod for Call of Warhammer ]
    My turban brings all the muslims to the yard and they're like العنصرية ش

  4. #4
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Trait help

    Do you mean the region name? I can't see why you'd want to change that for this.

    Look in descr_regions.txt (I think those are the regions refered to), maybe it will help.
    Last edited by Taiji; August 06, 2010 at 07:52 PM.

  5. #5

    Icon1 Re: Trait help

    That number is the province’s ID number. You can use the ‘show_cursorstat’ console command to get that, and then you just need to get the province’s name from the ‘imperial_campaign_regions_and_settlement_names’ file.

    Trigger LondonBasedGeneral_0001
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
    and IsRegionOneOf 0 London_Province

    Affects LondonBasedGeneral 1 Chance 100

  6. #6

    Default Re: Trait help

    Ahh thank you! Looks so simple. +Rep each .

    [ Cry Havoc:: ] - [ link ] - [ An Expanded World Submod for Call of Warhammer ]
    My turban brings all the muslims to the yard and they're like العنصرية ش

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

    Default Re: Trait help

    The region name, BTW, is not needed:

    IsRegionOneOf 0

    works the same. You can also list a couple of regions that way:

    IsRegionOneOf 0, 3, 117, 92

    It will fire in any those provinces.


    Attention: Changing province borders might change region_IDs; so either implement this kind of trigger only on 100% finished maps or check each of them after having changed the map.

    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

  8. #8

    Default Re: Trait help

    Quote Originally Posted by konny View Post
    Attention: Changing province borders might change region_IDs; so either implement this kind of trigger only on 100% finished maps or check each of them after having changed the map.
    Konny I think region IDs change when we shuffle the settlements in descr_regions.txt file and it has nothing to do with map_regions.tga.

  9. #9
    Amon Amarth 930's Avatar Artifex
    Join Date
    Nov 2008
    Location
    Germany, North-Rhine Westphalia
    Posts
    466

    Default Re: Trait help

    Konny I think region IDs change when we shuffle the settlements in descr_regions.txt file and it has nothing to do with map_regions.tga.
    Nope, the map_regions.tga is important, descr_regions hasn´t anything to do with the region-ID.
    A region get his ID from the position on the map, and it count from the left top corner to the right bottom.

    And because this, this is very important (what konny already says):

    Attention: Changing province borders might change region_IDs; so either implement this kind of trigger only on 100% finished maps or check each of them after having changed the map.

    Third Age Member (Fellowship-Scripter)
    Under the Patronage of MasterBigAb

  10. #10

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

    Default Re: Trait help

    Oh yes, I learned this the very hard way: After implementing several hundred local titles with triggers based on region IDs, after some minor changes on province borders I suddenly had a Bishop of Valencia available in England, no bishop in Milan, and stuff like that.

    Follows:
    If somehow possible always use settlement names, even if that requires to make two or three triggers where region_IDs would have only required one. Use region_ID triggers only where the trigger urgently has to (also) fire outside the settlement in a certain province.

    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

  12. #12

    Default Re: Trait help

    Quote Originally Posted by konny View Post
    Follows:
    If somehow possible always use settlement names, even if that requires to make two or three triggers where region_IDs would have only required one. Use region_ID triggers only where the trigger urgently has to (also) fire outside the settlement in a certain province.
    Check. Damn where is my pen and note book?

Posting Permissions

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