Results 1 to 2 of 2

Thread: What is the logical sequence of EDB requirements?

  1. #1

    Default What is the logical sequence of EDB requirements?

    As the title says, I'm interested in how EDB requirements are being read, especially the bulding requirements. While you can have many "and" "and not" and "or" conditions set I haven't managed to figure out in what sequence these conditions are read by the game when setting more complicated requirements. For example I want a building to be buildable in regions A and B. rA has hidden resources 1 and 2 and rB has hr 3 and 4. I have tried some combinations and while some work as they should (but don't give the outcome I want) others seem to not have any particular logical explanation. An example of this would be a situation where a building had requirements ... and hidden_resource 1 or hidden_resource 3 and hidden_resource 4. In this case the building should not be available to be built in region A (only hr 1 and 2) as it does not have the required hidden resource (4). Well, my question would be "Is there a certain sequence the game follows when reading these requirements?" I know that in vanilla there were no complex hidden resources made up of multiple other hidden resources (an example: identifying a region with two hidden resources hr1 and hr2, while another region has hr1 and hr3, ...) so maybe it wasn't even set up to properly process such conditions?

  2. #2

    Default Re: What is the logical sequence of EDB requirements?

    Hi! You can have a look here for a full explanation by Withmar.

    If I did understand this subject correctly (and that's not yet certain!) the game resolves the conditions from right to left without priorities between AND and OR. So if you do this:
    Code:
    and hr1 and hr2 or hr3 and hr4
    it will be solved like this:
    Code:
    and hr1 and (hr2 or (hr3 and hr4))
    wich gives, step by step:
    Code:
    and TRUE and (TRUE or (FALSE and FALSE))
    and TRUE and (TRUE or FALSE)
    and TRUE and TRUE
    and TRUE
    Well, if I did not confuse myself with this special logic!
    I'm not sure it can be done the way you want it, but I'm bot very experienced with EDB.
    Last edited by Belovèse; May 08, 2021 at 12:41 PM.
    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

Posting Permissions

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