Results 1 to 7 of 7

Thread: Custom Trait/Ancillary Attributes + Hidden Attribute

  1. #1
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,741
    Blog Entries
    3

    Default Custom Trait/Ancillary Attributes + Hidden Attribute

    First I'll thank Gigantus for having me look at this phenomenon more closely since I'd thought of investigating it but for various reasons it was put aside to do other more pressing concerns. Anyway, someone made note of a bug in ATVTW (for M2TW) in which the Attribute Combat_V_Faction_Ireland was being recorded as incorrect. Gigantus reminded me that in the exe for M2TW/Kingdoms didn't specifically list the faction and religions for the Combat_V_Faction_XXX and the Comabat_V_Religion_YYY attributes. I already knew this was the case for the Combat_V_ZZZ attributes in Rome.

    So I did an experiment, I create a trait with a custom attribute:

    Code:
    Trait TestCombatTrait
        Characters all
        ;Hidden
    
        Level Immobile
            Description Immobile_desc
            EffectsDescription Immobile_effects_desc
            Threshold 1
    
            Effect Combat_V_adfjeil 1
    And a trigger to test the attribute:

    Code:
    Trigger TestCombatTrigger
        WhenToTest CharacterTurnStart
    
        Condition Attribute Combat_V_adfjeil = 1
    
        Affects BattleScarred  1  Chance 100
    I gave the trait to a starting character in descr_strat, and checked his traits and stuff in game, and he had the first level of the BattleScarred trait. I did a second test by adding the effect to an ancillary (and leaving the trigger in EDCT), removing the trait and adding the ancillary in descr_strat, and again I started the game and he again had the first level of BattleScarred.

    This is very significant as it allows 100% accuracy in seeing if a character has a particular ancillary, and unlike current methods this can be used for all ancillaries by giving them a unique Combat_V_ZZZ attribute.

    This has left me with an interesting and answered question. How does the engine determine if the Combat_V_ attribute corresponds to an actual culture to give a command bonus?

    There's also a hidden attribute that is recognized by the exe: FootInTheDoor, you can assign it as an effect to traits/ancillaries but I haven't figure out what it does.
    Last edited by Squid; January 29, 2010 at 01:52 AM.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  2. #2

    Default Re: Custom Trait/Ancillary Attributes + Hidden Attribute

    Now that's useful, thanks!

  3. #3

    Default Re: Custom Trait/Ancillary Attributes + Hidden Attribute

    Quite useful, this will be great for our trait expert.

    Expand your borders, a mod based on XGM 5.

  4. #4
    Suppanut's Avatar Idea-O-Matic
    Join Date
    Mar 2007
    Location
    Thailand
    Posts
    3,712

    Default Re: Custom Trait/Ancillary Attributes + Hidden Attribute

    Wow! Thank you. I will made a good use of that.
    Is proudly patroned by the Great Balikedes.



  5. #5

    Default Re: Custom Trait/Ancillary Attributes + Hidden Attribute

    Is it just me or are all Combat_V_whatever attributes 'read' as the same thing by the engine? I mean, if an anc gives Combat_V_abc 1, and another one gives Combat_V_xyz 1, then if you hav a trigger that needs Combat_V_abc = 2, then the trigger will be activated. Can someone confirm?

  6. #6
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,741
    Blog Entries
    3

    Default Re: Custom Trait/Ancillary Attributes + Hidden Attribute

    You appear to be correct, I'm investigating more to see if there's a way around the issue or if this find is less than useful.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  7. #7

    Default Re: Custom Trait/Ancillary Attributes + Hidden Attribute

    Quote Originally Posted by Squid View Post
    First I'll thank Gigantus for having me look at this phenomenon more closely since I'd thought of investigating it but for various reasons it was put aside to do other more pressing concerns. Anyway, someone made note of a bug in ATVTW (for M2TW) in which the Attribute Combat_V_Faction_Ireland was being recorded as incorrect. Gigantus reminded me that in the exe for M2TW/Kingdoms didn't specifically list the faction and religions for the Combat_V_Faction_XXX and the Comabat_V_Religion_YYY attributes. I already knew this was the case for the Combat_V_ZZZ attributes in Rome.

    So I did an experiment, I create a trait with a custom attribute: <- this!! how did u do this w/o crashing game?

    Code:
    Trait TestCombatTrait
        Characters all
        ;Hidden
    
        Level Immobile
            Description Immobile_desc
            EffectsDescription Immobile_effects_desc
            Threshold 1
    
            Effect Combat_V_adfjeil 1
    And a trigger to test the attribute:
    Hi, ok so, I am looking for a way to create New traits/ ancillaries without crashing the game. By making this new trait you seem to have mastered this ability, so please let me know how to.

Tags for this Thread

Posting Permissions

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