Results 1 to 5 of 5

Thread: Buildings, Recruitment by Events

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    No, that isn't a banana
    Join Date
    Aug 2004
    Location
    Ontario, Canada
    Posts
    5,216

    Default Buildings, Recruitment by Events

    Hi all - need some help.

    I have a building that becomes available upon an event. Here's part of the code:

    Spoiler Alert, click show to read: 

    building kalmar_union
    {
    levels kalmar_union_1 kalmar_union_2
    {
    kalmar_union_1 requires factions { denmark, norway, } and event_counter kalmar_union 1 and hidden_resource kalmar
    {
    capability
    {
    recruit_pool "Svenner" 1 0.17 1 0 requires factions { denmark, } and not event_counter end_of_kalmar 1 and region_religion catholic 65
    }
    material wooden


    It shows up in game, after the event, and only in the region with the HR Kalmar. However, the units themselves are not recruitable. They are if I remove the "and not event" code.

    The weird part is that they show up in the building description but are not in the recruitment pool (not even grayed - or after several end turns.)

    Any suggestions as to why this wouldn't work?
    Last edited by OTZ; October 08, 2008 at 11:38 AM.

  2. #2
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Buildings, Recruitment by Events

    and not event_counter end_of_kalmar 1
    Is the problem. The units become available only when the event doesn't fire.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  3. #3
    No, that isn't a banana
    Join Date
    Aug 2004
    Location
    Ontario, Canada
    Posts
    5,216

    Default Re: Buildings, Recruitment by Events

    Hmm, maybe I'm confused.

    So I've got two events. kalmar_union and end_of_kalmar.

    The way I read my text, I've got units becoming available when the kalmar_union event is triggered and the building is contstructed, but then they become unavailable as soon as end_of_kalmar is triggered, no? Or at least that's how I want it to work....

    Even when I add this to the recruit pool line > "and event_counter kalmar_union 1 and not event_counter end_of_kalmar 1" it doesn't work. Should it not work the way I intended?

  4. #4

    Default Re: Buildings, Recruitment by Events

    I'm not to familiar with conditionals in the EDB, but try removing the not and see what happens. I'm thinking that this may be an order of operations error. Use and "event_counter end_of_kalmar 0" instead of "and not event_counter end_of_kalmar 1"

    Dominion of the Sword, a Medieval II: Total War Supermod
    Under the patronage of Archaon. Proud member of the House of Siblesz
    My friend died from chain letters. If you don't post this again 100 times, he will come and kill you in your sleep!

  5. #5
    No, that isn't a banana
    Join Date
    Aug 2004
    Location
    Ontario, Canada
    Posts
    5,216

    Default Re: Buildings, Recruitment by Events

    Problem solved - thanks all!

    I was missing a recruitment line in EDB. Very bizarre.

Posting Permissions

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