Page 3 of 3 FirstFirst 123
Results 41 to 54 of 54

Thread: Buildings and AoR

  1. #41

    Default Re: Buildings and AoR

    Quote Originally Posted by Withwnar View Post
    For the record, Belovèse, your original proposed code looks right to me.
    I know, right? And it works in most of the wall levels!

    Maybe just a typo somewhere, I'll have to look more closely at it.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

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

    Default Re: Buildings and AoR

    Sorry, no, it's the wrong way around.

    Code:
    recruitment_slots 2 requires not event_counter freeze_recr_pool 1 and building_present_min_level farms farms+2 or building_present_min_level city_hall council_chambers
    ...gives...

    requires NOT COUNTER AND (BUILDING1 OR BUILDING2)

    ...which is what you're after.

    Whereas yours...

    Code:
    recruitment_slots 2 requires building_present_min_level farms farms+2 or building_present_min_level city_hall council_chambers and not event_counter freeze_recr_pool 1
    ...gives...

    requires BUILDING1 OR (BUILDING2 AND NOT COUNTER)

  3. #43

    Default Re: Buildings and AoR

    Ahhhh, I understood the "read from right to left" wrongly then, it is in fact "resolved from right to left"?
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

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

    Default Re: Buildings and AoR

    Both, as I see it. But yeah, resolved is what I meant.

  5. #45

    Default Re: Buildings and AoR

    Quote Originally Posted by Withwnar View Post
    Both, as I see it. But yeah, resolved is what I meant.
    Thanks, I think I just overcomplicated it in my head!
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  6. #46

    Default Re: Buildings and AoR

    Well, I'm once again lost trying to understand EDB, could you guys give me a hand again?

    I made this coding:
    Code:
        south_italy_building2_stronghold requires factions { hre, england, france, jerusalem, papal_states, } and hidden_resource sicily or factions { sicily, } and not event_counter CONCENTRIC_CASTLES 1
    The way I understand it there is two xay for the building to be buildable:
    - the faction is one of { hre, england, france, jerusalem, papal_states, }, there is the hidden ressource "sicily" and CONCENTRIC_CASTLES didn't happen.
    - the faction is sicily and CONCENTRIC_CASTLES didn't happen

    But the building does never appear for sicily in the building browser, what did I miss? Any help greatly appreciated!
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  7. #47
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,493

    Default Re: Buildings and AoR

    In my notes I've got:

    ; requires factions { xxx, } and condition1 or factions {yyy, } and condition2
    ; is read: ( ( condition2 and factions {yyy, } ) or condition1 ) and factions { xxx, }
    ; this means: if factions { xxx, } is false then the entire result is also false, regardless of what else in there is true
    ; because the engine does NOT give precedence to ANDs before ORs
    ;
    ; this means: it is impossible to code (factions{A} and condition1) or (factions{B} and condition2)

  8. #48

    Default Re: Buildings and AoR

    Yes, that is also what is explained in the thread, but the logic I'm looking for is this one (parenthesis are there to explicit the priority I'm looking for) :
    Code:
     ( factions { hre, england, france, jerusalem, papal_states, } AND hidden_resource sicily AND NOT event_counter CONCENTRIC_CASTLES 1) OR ( factions { sicily, } AND NOT event_counter CONCENTRIC_CASTLES 1 )
    That's why I put the event_counter at the end of my proposed coding: it would be evaluated against everything to it's left.
    Code:
        south_italy_building2_stronghold requires factions { hre, england, france, jerusalem, papal_states, } and hidden_resource sicily or factions { sicily, } and not event_counter CONCENTRIC_CASTLES 1
    I tried the logic with my excel spreadsheet, can't find the flaw. I'm wondering if there's something tricky with conditions we use?
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  9. #49
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,493

    Default Re: Buildings and AoR

    My understanding is: it will always be false for the faction sicily because the most-right condition (list of factions) is always false on the sicilian turn.

  10. #50

    Default Re: Buildings and AoR

    Sorry, I don't understand: isn't the list of faction the left-most condition?
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  11. #51
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,493

    Default Re: Buildings and AoR

    Sorry, I've meant most-left:

    Sicily in the Sicilian lands in 12th century:
    not event_counter CONCENTRIC_CASTLES 1 -> TRUE ->
    OR factions { sicily, } -> TRUE
    AND hidden_resource sicily -> TRUE ->
    factions { hre, england, france, jerusalem, papal_states, } -> FALSE


    Sicily outside South Italy in 12th century:
    not event_counter CONCENTRIC_CASTLES 1 -> TRUE ->
    OR factions { sicily, } -> TRUE
    AND hidden_resource sicily -> FALSE ->
    factions { hre, england, france, jerusalem, papal_states, } -> FALSE


    Sicily in the Sicilian lands in 14th century:
    not event_counter CONCENTRIC_CASTLES 1 -> FALSE ->
    OR factions { sicily, } -> TRUE
    AND hidden_resource sicily -> TRUE ->
    factions { hre, england, france, jerusalem, papal_states, } -> FALSE


    Sicily outside South Italy in 14th century:
    not event_counter CONCENTRIC_CASTLES 1 -> FALSE ->
    OR factions { sicily, } -> TRUE
    AND hidden_resource sicily -> FALSE ->
    factions { hre, england, france, jerusalem, papal_states, } -> FALSE

  12. #52

    Default Re: Buildings and AoR

    Ah yes you're absolutely right, I don't know why I can't get this EDB logic in my head...
    I always twist it and confuse myself, even if your explanations and Whitwnar's are quite clear!

    So I will test the whole tree and post on our subforum, but the coding for level 2 will be:
    Code:
        south_italy_building2_stronghold requires event_counter dummy 1 or not event_counter CONCENTRIC_CASTLES 1 and factions { sicily, } or factions { hre, england, france, jerusalem, papal_states, } and hidden_resource sicily
    IIRC "require not" is buggy so I had to add event_counter dummy 1.
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

  13. #53
    Jurand of Cracow's Avatar History and gameplay!
    Join Date
    Oct 2012
    Location
    Cracovia
    Posts
    8,493

    Default Re: Buildings and AoR

    I don't think this coding would work either. The ( negative + dummy ) solution works at the end of the line, but will it work at the beginning? I doubt.

  14. #54

    Default Re: Buildings and AoR

    Just tried it, it works! Good news for our new building tree
    Belovèse's Toolbox: export text files to spreadsheet, detailed unit stats
    Stainless Steel Historical Improvement Project (SSHIP) team member.
    Mini-mods: diplomacy and relation/reputation - detailled unit stats

Page 3 of 3 FirstFirst 123

Posting Permissions

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