User Tools

Site Tools


user:loggy:scoutreports

Loggy's RE: Scout reports

Inaccuracy

The function that generates scout numbers does the following:

  1. It accepts an inaccuracy percent. I'm still investigating what alters this
  2. Counts units in the province, including something which looks suspiciously like the glamour and invisible interaction with spirit sight on the map
  3. Adds false army and obfuscate (they are technically the same ability, only difference is their positive/negative magnitude)
  4. It then fudges the total number of units
    1. Generates a random number 0-199, subtracts 100 from it (so it is now -100 to +99)
    2. Adds (the above number * inaccuracy percent * number of units)/10000, rounded down, to the unit count - effectively this is adding (-100 to 99% of the inaccuracy percent and rounding the result down)
    3. If the unit count is now less than 10 it is set to 10*?floor((units + 5)/10)
    4. If fata morgana is in play, there is a 50% chance to hide ALL the units in a province. Otherwise, multiply the number of units by a random number between 0 and 499, divide by 100, then round down.

Then the next question is what the inaccuracy percent for various types of scouting is.

  1. With eyes of god, it is 0%
  2. With arco scry dominion it is 40%
  3. With some other conditions (default)? it is 50%
  4. With scrying spells it is 0%
  5. With a spy in the province it is 10%
  6. With a scout it is 30%

Other observations

  • "The army appears to be commanded by <Leader>" only appears if the inaccuracy value is less than 30
  • What does and doesn't radiate power is done by a complex function I don't really understand, it needs a radiate power score of >100 to get the text. Magic paths count for 10

addscoutinfo

v5.58

Why not go through the whole thing?

  • Count the number of units there are in the province. If the player has spirit sight in the province, count invisible units as well, otherwise omit them.
  • Add all sources of obfuscate/false army (and the negative magnitude that hides things) to that count.
  • If there is an inaccuracy percentage, add ((closed d200 - 101) * inaccuracy percentage * unit count) to the unit count. If the result is greater than 10, it is set to ((old value + 5)/10)*10 rounding down after the division
  • If Fata Morgana is active for the province owner, there's a 50% chance to hide everything, otherwise multiply by (closed d500 - 1), divide by 100 and round down.
  • If there are no units, your message is simply "The province is free from %s military units." [in these, %s should be one of "allied" or "enemy", with enemy being the normal one and allied shown for allies in disciples only]
  • If there is no besieging going on in the province…
    • If there is no inaccuracy, you see the real value. "The province contains %d %s units. "
    • If the above unit calculation resulted in exactly 1, "The province seems to contain only one %s unit. "
    • Otherwise, "The province contains about %d %s units. "
  • If there IS besieging going on in the province…
    • If the province owner is the person who is besieged…
      • No inaccuracy: "The besieging army consists of %d %s units. "
      • Exactly one unit: "The besieging army seems to contain only one %s unit. "
      • Otherwise: "The besieging %s army is about %d units large. "
    • If the province owner is not the person who is besieged…
      • No inaccuracy: "The besieged %s army consists of %d units. "
      • Exactly one unit: "The besieged %s army seems to contain only one unit. "
      • Otherwise: "The besieged %s army is about %d units large. "
  • Count all the different unit types. Different unit types with the same names get their counts merged. In the case of two different unit types with the same name, the unit type ID recorded is whichever one is checked first (which is the with the lower ingame unit IDs). Invisible units are ignored unless the person doing the scouting has spirit sight in the province.
  • Find the largest commander chassis value. On top of the normal chassis value calculation, add 10x all the commander's magic skills, including holy magic skill. Invisible commanders are ignored unless the scouter has spirit sight in the province.
  • Work out what the six most common of the above found unit types are. Sort them, with most numerous first.
  • If Fata Morgana is active:
    • If there are 4 or more unit types found, there's a 50% chance to swap the 3rd and 4th.
    • If there are 3 or more unit types found, there's a 50% chance to swap the 2nd and 3rd.
    • If there are 2 or more unit types found, there's a 50% chance to swap the 2nd and 1st.
    • [These are done in sequence, and each is rolled independently]
  • Go through these most common unit types in order. If any are size 4 or larger, there is a 15% chance per base unit size (not modified by things like enlargement) to "notice" the larger size. Record the highest size "noticed" this way, as well as which unit type this was.
  • Go through them again, this time looking for some kind of "power score". This is calculated as:
    • Hitpoints
    • Add hitpoints again if innately ethereal
    • Add (fear * 10) + (awe * 5)
    • If a commander, add (sum of all non-holy path levels) * 15
  • As with the fear, only scores above 100 are noticed, and the chance to notice a new score is (score/2)%. Remember the unit type of the highest noticed score again.
  • Go through them again. This time, looking for units that can fly (respecting things like perpetual storm). In order to be noticed, the unit…
    • Needs to have a higher power score than the last unit noticed, or 2+ if none were noticed by this check before
    • Must not be the unit type noticed by either the power score or size checks
    • Any unit type also has only a (power score)% chance to be noticed
  • In the presence of the fool scouts ability:
    • If there are 2+ unit types found in the province, erase all data for the second unit type.
    • This will stop subsequent checks finding anything except the first unit type
  • If Fata Morgana is or fool scouts is active:
    • Forget about all those units you remembered from high power score, flying or size checks
user/loggy/scoutreports.txt · Last modified: 2022/12/03 22:51 by loggy