Results 1 to 6 of 6

Thread: Faction capability and restriction

  1. #1
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Faction capability and restriction

    Hi, I have a little problem to do this. What I want to do is to provide a global effect in the faction but only restricted to specific settlements. My example is the villages will be able to build farms that will provide global health bonus but only to settlements with the "urban hidden_resource", here's my attempt

    Export_Descr_Building.txt
    Spoiler Alert, click show to read: 
    building hinterland_farms
    {
    levels farms farms+1
    {
    farms requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and hidden_resource agriculture
    {
    capability
    {

    }
    faction_capability
    {
    population_health_bonus bonus 10 requires hidden_resource urban_region
    }
    material wooden
    construction 2
    cost 1500
    settlement_min village
    upgrades


    Descr_region.txt
    Spoiler Alert, click show to read: 
    Oxford_Region
    Oxford
    england
    English_Rebels
    193 145 65
    atlantic, explorers_guild, woodsmens_guild, agriculture
    5
    5
    religions { catholic 100 welsh 0 scottish 0 irish 0 norwegian 0 heretic 0 }

    London_Region
    London
    england
    English_Rebels
    232 41 46
    atlantic, explorers_guild, woodsmens_guild, urban_region
    5
    6
    religions { catholic 100 welsh 0 scottish 0 irish 0 norwegian 0 heretic 0 }


    The farm building was available only to Oxford (the agriculture village) which is a good step but when I built the farm, nothing at all, no bonus to either Oxford, London (The Urban Region) or other regions. Anyone have an idea?

    Regards.

  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: Faction capability and restriction

    You'll need to do it in combination with a script. The script will have an event_counter, say farms_built, which is true if the faction has a farm building, which since it can only be built by regions with the agriculture hidden resource.

    In your core_building and core_castle have a capability line similar to the faction capability you currently have in farms with the condition requires event_counter farms_built 1 and hidden_resource urban.
    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
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Re: Faction capability and restriction

    Quote Originally Posted by Squid View Post
    You'll need to do it in combination with a script. The script will have an event_counter, say farms_built, which is true if the faction has a farm building, which since it can only be built by regions with the agriculture hidden resource.

    In your core_building and core_castle have a capability line similar to the faction capability you currently have in farms with the condition requires event_counter farms_built 1 and hidden_resource urban.
    Thanks for clarifying, will give feedback about the final results.

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

    Default Re: Faction capability and restriction

    The way it's set up in the OP it will only grant a factionwide bonus if the settlement it is constructed in has urban_region.

  5. #5
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Re: Faction capability and restriction

    Quote Originally Posted by Taiji View Post
    The way it's set up in the OP it will only grant a factionwide bonus if the settlement it is constructed in has urban_region.
    It is what Squid sugges to combine this with a script? What would be the proper way to make the bonus restricted only to urban_region?

  6. #6
    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: Faction capability and restriction

    Quote Originally Posted by Taiji View Post
    The way it's set up in the OP it will only grant a factionwide bonus if the settlement it is constructed in has urban_region.
    That's not what he's after, he wants a building built in regions with hidden resource agriculture to have an effect on all regions with hidden resource urban, hence the need for EDB + script to make it happen.
    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

Posting Permissions

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