Results 1 to 10 of 10

Thread: "FactionIsLocal" or the equivalent

Hybrid View

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

    Default "FactionIsLocal" or the equivalent

    I don't know if anyone here remembers the Minor Mod "Conqurable Units". It use a script which add an event to the game when a specific city is captured to activate the recruitment of some elite units of the subdued faction. For example, when London is captured by a HRE general, in the campaign_script.txt the following code is executed:

    monitor_event GeneralCaptureSettlement SettlementName London
    and FactionType hre
    add_events
    event historic hre_conquers_england
    date 0 0
    end_add_events
    end_monitor
    so this line in EDB
    recruit_pool "Yeoman Archers" 1 0.7 6 0 requires factions { hre, } and event_counter hre_conquers_england 1
    would work, enabling the player to recruit Yeoman Archers.

    But when I re-read its code, I become quite puzzled: If an AI HRE general captures London, will the player be able to recruit Yeoman Archers as well? I remember in Rome there was a "FactionisLocal" to assure that the script works only for the player.Is necessary to add that or something similar to the original code if I the code work only for player?? If so, can anyone post the modded script here? Any suggestion is welcomed........

  2. #2
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: "FactionIsLocal" or the equivalent

    You would just add:

    and FactionIsLocal

    after the and FactionType hre (after a line break)

    Currently it works if any HRE faction captures it. It also would enable the recruitment of Yeomans in every HRE settlement with that setup, unless the building the pool is attached to is settlement specific. As well if the player loses London it would not set it back. That is of course if there isn't another section of the script which handles these factors.

  3. #3

    Default Re: "FactionIsLocal" or the equivalent

    Thanks!
    Another problem...In the building browser I can see that specific unit in the recruitable units list..but in the recruitment tab, I can't find it! How come that would happen?? Any suggestions? (By the way, according to edb the recruitment of that unit should be activated when event_counter *** =1, and it was right after I triggered the event that I checked the recruitmen tab in a city..so the recruitment requirements are already met..)

  4. #4
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: "FactionIsLocal" or the equivalent

    The recruit pools in a city take a turn to update. If you set up an event counter to flip between two recruitment pools by clicking a button for instance, it seems to not recognize the switch immediately but only either at the Turn End or Turn Start. It's possible it just hadn't populated that list yet if the event fired during that turn.

  5. #5

    Default Re: "FactionIsLocal" or the equivalent

    At first I guess so, but after a few turns it still doesn't work..I restarted a campaign and tested the same..and still the same result.

    To make things clear, perhaps I should post codes involved here ...

    1. event trigger in campaign_script
    monitor_event GeneralCaptureSettlement SettlementName Edinburgh
    and FactionIsLocal
    add_events
    event historic conquer_scotland
    date 0 0
    end_add_events
    end_monitor
    2. edb,"drill square" (started campaign as england)
    recruit_pool "Galloglaich" 1 0.5 4 0 requires factions { england, } and event_counter conquer_scotland 1

  6. #6

    Default Re: "FactionIsLocal" or the equivalent

    Try this script.

    monitor_event GeneralCaptureSettlement SettlementName Edinburgh
    and FactionIsLocal
    set_event_counter conquer_scotland 1
    end_monitor

  7. #7

    Default Re: "FactionIsLocal" or the equivalent

    seems don't work。。recuitable units list had updated, but you just can't recruit..

  8. #8

    Default Re: "FactionIsLocal" or the equivalent

    Silly question, but is England specified in the EDU ownership line for the Galloglaich?

  9. #9

    Default Re: "FactionIsLocal" or the equivalent

    My fault, i'm sorry............It is not that I didn't remember to change the ownership of Galloglaich in edu...In this version I'm working on, there are two units using the same screen-name "Galloglaich",and the one I modified is not the one in edb..Indeed silly question

    Thanks anyway!

  10. #10
    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: "FactionIsLocal" or the equivalent

    Have you ended the turn, or is it the same turn still as the capture, since apparently the recruitment/construction lists won't update until the next turn, even if descriptions do.
    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
  •