Results 1 to 5 of 5

Thread: Tie a unit/building to a trait.

Hybrid View

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

    Default Tie a unit/building to a trait.

    Is it possible to tie a unit on the strat map, with a trait?
    Like if an army have a roman legionary, the commander gained the trait "Legion Commander" or whatever else the name?
    Would this work with this?
    Code:
    Identifier:              UnitType
    Trigger requirements:    resource_description
    Parameters:              unit type ('type' from export_descr_units.txt)
    Sample use:              UnitType roman archer auxillia
    Description:             Tests if a unit is of a particular type
    Battle or Strat:         Either
    Class:                   UNIT_TYPE
    Implemented:             Yes
    Author:                  Guy
    Or this one?
    Code:
    Identifier:              I_NumberUnitsInSettlement
    Trigger requirements:    
    Parameters:              settlement, unit type (UNIT_DESCRIPTION.id), logic token, quantity
    Sample use:              I_NumberUnitsInSettlement Tarquinii roman_city_militia < 5
    Description:             How many units are in the settlement?
    Battle or Strat:         Strat
    Class:                   NUMBER_UNITS_IN_SETTLEMENT
    Implemented:             Yes
    Author:                  Guy
    Also, is it possible to do that a building has a bonus only if a trait is present on the governor.
    Example : The same general with his "Legion Commander" trait is governor of a town. Then you can recruit the legionary in the barracks?
    Under the patronage of apple.
    Patron of ybbon66.

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

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

    Default Re: Tie a unit/building to a trait.

    No and no unfortunately. The second can be done with M2TW though.
    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

  3. #3

    Default Re: Tie a unit/building to a trait.

    I thought the second wouldn't work, but why would the first one not work?
    It seems both triggers are checking whether a certain unit is present or not.
    Under the patronage of apple.
    Patron of ybbon66.

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

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

    Default Re: Tie a unit/building to a trait.

    Because of the trigger requirements and more specifically the events which export them are not events which tell you what units the current army is composed of. The only events which export "resource_description" are unit training events, which only says you've recruited a unit of a certain type, but doesn't tell you anything about army composition.
    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

  5. #5

    Default Re: Tie a unit/building to a trait.

    Alright, thank you Squid.
    Under the patronage of apple.
    Patron of ybbon66.

Posting Permissions

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