Results 1 to 10 of 10

Thread: New syntax possibility?

  1. #1
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default New syntax possibility?

    Hi fellow scripters!

    Maybe I'm wrong and make my usual mistake posting stuff unchecked but in fast test this syntax works!

    and PercentageUnitCategory cavalry > 0 factions { denmark, moors, spain, }

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  2. #2

    Default Re: New syntax possibility?

    It's a false positive. So yes it seems to work, but regardless of the content (as long as PercentageUnitCategory is true), like this:
    Code:
    monitor_event PostBattle CharacterIsLocal
        and PercentageUnitCategory cavalry > 0 factions { xxx }
            historic_event test
    end_monitor

  3. #3
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: New syntax possibility?

    Share your doubts. Those syntax with 1 faction in braces used in CA original script from Kingdoms. Americas campaign.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: New syntax possibility?

    My script of the americas has two instances of that condition without any syntax, would be pointless given the other condition:
    Code:
    ;;; Counter - Apachean beat army with cavalry
        monitor_event PostBattle not WonBattle
            and GeneralFoughtFaction apachean
            and PercentageUnitCategory cavalry > 0
            inc_counter apachean_cavalry_killed 1
        end_monitor
    
    ;;; Counter - Chichimeca beat army with cavalry
        monitor_event PostBattle not WonBattle
            and GeneralFoughtFaction chichimeca
            and PercentageUnitCategory cavalry > 0
            inc_counter chichimeca_cavalry_killed 1
        end_monitor
    And given how the faction syntax works you would need a comma at the end anyhow. But as Erken points out: even an invalid entry returns true, meaning the syntax gets ignored, eg no further processing of the condition occurs after the value.
    Last edited by Gigantus; April 03, 2020 at 10:31 PM.










  5. #5
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: New syntax possibility?

    Can't test now because of COVID.

    So this
    monitor_event PostBattle not WonBattle
    and GeneralFoughtFaction apachean
    and PercentageUnitCategory cavalry > 0 factions { norway, spain, }
    inc_counter apachean_cavalry_killed 1
    end_monitor

    will returned true regardless who fought apacheans if had cavalry in stack?

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: New syntax possibility?

    That's my impression. If you want to restrict it to those factions then you will need to do use a FactionType condition or use IF loops with 'custom faction counters'.










  7. #7
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: New syntax possibility?

    Can check it for sure on monday. If it works we can avoid using IFs and FactionType.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  8. #8
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: New syntax possibility?

    Checked it, you absolutely right, it's false positive, it doesn't match faction in braces.

    Small offtop, if you please. I checked this condition for one local forum mate who is making outstanding project named Vinland TW - it's about vikings settling North America in XI-XV centuries. Can you advise any mods with native indian unit models?

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  9. #9
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,121
    Blog Entries
    35

    Default Re: New syntax possibility?

    Reminds me of my team's idea about Romans settling in North America - we intended to build it on the americas campaign for convenience. Can't find the teaser\trailer version with translated titles, so the German version will have to do.

    Even got as far as using the 'playable horde' principle for the Romans and other script gems like getting them ship wrecked at the coast, with storm and stuff. Makes me itch to have a go at it again...

    Last edited by Gigantus; April 06, 2020 at 12:11 AM.










  10. #10
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: New syntax possibility?

    The vanilla Americas campaign has Apache units.

Posting Permissions

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