Results 1 to 4 of 4

Thread: Destroying building and a new assassin skill

Hybrid View

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

    Default Destroying building and a new assassin skill

    Good day, I was wondering if there's a coding that destroy buildings when you build a specific building in the EDB?

    My plan is I have created two new buildings that act skill tree but for buildings; like choosing path. There's one path called "Urban Path" that will further develop the settlement into an urban center but once build, you will destroy all the level of farms.

    And the second question, I would like to give an ability to assassin, I will call it plagues Spread. Basically, if the assassin succeed to destroy a building, there's a chance that they will unleash a plague. And don't know if that's possible but to "tag" specific buildings that are good target for sabotaging and to spread plague (basically, the tagged buildings will be health related buildings such as well and food storage, etc.)

    Thank you.

  2. #2
    RollingWave's Avatar Praepositus
    Join Date
    Feb 2005
    Location
    Taiwan
    Posts
    5,083

    Default Re: Destroying building and a new assassin skill

    No, destroy building script will result in all the same building in the same faction to be destroyed, unless that's the effect you want to achieve your stuck.

    You can however, use the "building_present" tag to prevent another building being built onces a building is built (or example if the urban planning building is present then you can build farms etc..) and you can have the farms effect be nulled if that building is present by adding a monitor tag to that urban planning building as a event counter (say event_counter urban_planning 1) and then for all your farm effects you add "and not event_counter urban_planning 1" for example.
    1180, an unprecedented period of peace and prosperity in East Asia, it's technology and wealth is the envy of the world. But soon conflict will engulf the entire region with great consequences and lasting effects for centuries to come, not just for this region, but the entire known world, when one man, one people, unites.....

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

    Default Re: Destroying building and a new assassin skill

    The destroy_building script will remove all the buildings in all the settlement? If so, it's not what I aim but only one settlement when I build the specific building.

    I use building_present a lot in my setting..Unless I keep the lowest level of farm for the urban path. Thanks mate.

    That event you said, didn't remember to create one , do you have an example?

  4. #4
    RollingWave's Avatar Praepositus
    Join Date
    Feb 2005
    Location
    Taiwan
    Posts
    5,083

    Default Re: Destroying building and a new assassin skill

    something like this

    monitor_event FactionTurnStart FactionIsLocal
    set_event_counter blacksmith 1
    end_monitor

    monitor_event SettlementSelected TrueCondition
    and SettlementBuildingExists >= blacksmith
    set_event_counter blacksmith 1
    end_monitor

    monitor_event SettlementSelected TrueCondition
    and not SettlementBuildingExists >= blacksmith
    set_event_counter blacksmith 0
    end_monitor
    and then for example you can do your farms like

    farms requires factions { all, }
    {
    convert_to 0
    capability
    {
    farming_level 1 requires event_counter blacksmith 1
    }
    material wooden
    construction 3
    cost 800
    settlement_min town
    upgrades
    {
    farms+1
    }
    }
    if you do this, the farm's bonus will only be in effect if that condition is met. so basically what you can do is..

    a. for example once you built that building you can nolonger upgrade farms
    b. once you build that building all the current farms' effect will no longer be active.
    1180, an unprecedented period of peace and prosperity in East Asia, it's technology and wealth is the envy of the world. But soon conflict will engulf the entire region with great consequences and lasting effects for centuries to come, not just for this region, but the entire known world, when one man, one people, unites.....

Posting Permissions

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