Results 1 to 6 of 6

Thread: AOR concept: 199+ AOR with just 8 resources

  1. #1
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default AOR concept: 199+ AOR with just 8 resources

    This tutorial explains only a concept that may be used when making AORs

    In order to make an unit recruitable only in one (or another) settlement you put an hidden resource in it, and then you use the presence of the resource as a condition in EDB.

    Now, the hardcoded limit for those resources is about 64, meaning "only" 64 AORs are avaiable, if you use all hidden_resources for this purpose. But hidden resources can be used also for others purposes, and waste them (at least, lot of them) in AORs is evil.
    To bypass this limit, the hidden resource Power set must be used, meaning that with n resources, you can make up 2n AORs.
    Example
    Spoiler Alert, click show to read: 

    with just 4 resources (A, B, C, D) you can make 16 differents AOR:
    1 - nothing
    2 - only A
    3 - only B
    4 - only C
    5 - only D
    6 - A & B
    7 - A & C
    8 - A & D
    9 - B & C
    10 - B & D
    11 - C & D
    12 - A, B & C
    13 - A, B & D
    14 - A, C & D
    15 - B, C & D
    16 - A, B, C & D

    with just 9 hidden resources put in this way, you can make 512 AOR - far more than the EDU possibility, since hard-coded units limit is 500.
    and, remembering hard-coded region limit is 199, you will need only 8 of them (256 AORs) - leaving the other 56 for other purposes.

    Hope this to be useful
    Last edited by Gigantus; May 13, 2012 at 11:04 PM. Reason: title edited for clarification

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  2. #2
    Cobi Wan Kenobi's Avatar Centenarius
    Join Date
    Aug 2007
    Location
    Virgin Islands
    Posts
    885

    Default Re: [Tutorial]AOR concept: 199+ AOR with just 8 resources

    Hey bud, I think you meant to post this in the tutorials section

  3. #3
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: [Tutorial]AOR concept: 199+ AOR with just 8 resources

    Indeed... please can an admin move this?

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  4. #4
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: [Tutorial] AOR concept: 199+ AOR with just 8 resources

    This is hardly unknown, its called binary encoding of the regions and has been used in RTW. The major drawback of course is that to identify a particular region takes 9 hidden resource conditions, hardly ideal for quick coding. The easier way to do it is to use ~29 hidden resources, which allows you identify a region uniquely with only 2 hidden resource conditions, much more ideal for ease of coding while still leaving plenty of hidden resources for other things. The basic concept is the same, split the map into 15 zones each of which has no more than 14 regions in it. Each zone has a corresponding hidden resource (15 HRs), also create 14 hidden resources to uniquely identify regions within each zone. Now each region in a zone gets the zone specific hidden resource and one of the 14 region specifying hidden resources. So a condition to uniquely specify a region would consist of the zone hidden resource and the region hidden resource.
    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

  5. #5
    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,125
    Blog Entries
    35

    Default Re: AOR concept: 199+ AOR with just 8 resources

    Moved to tutorial section










  6. #6
    jirisys's Avatar Senator
    Join Date
    Mar 2010
    Location
    In the town where I was born
    Posts
    1,015

    Default Re: AOR concept: 199+ AOR with just 8 resources

    Isn't it easier to do a combination?
    10C4 gives you 210 possible combinations, no repetition, combinations with same numbers but different order are unaccounted. So you have all regions with a specific and unique set.

    It's not useful when you are using it for large groups of regions. But it's the most easier to code (You always write 4 hidden region ids and you can do it like a binary count).

    And with the one you posted, there's the problem that the sets 2,6,7,8,etc. contain A, but the first one only has one hidden region, so you have to check if it has A, and if it doesn't have B, C or D.

    ~Jirisys ()
    Signature
    Because we all need to compensate...

Posting Permissions

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