Like others before me I was hoping to get information from the savefile of which Indian camp teaches which profession (especially cotton planters and tobacco planters, I usually get enough fur trappers and sugar planters). I tried to look for some pattern myself, but I quickly gave up when the same Inca town in the exact same spot on the America map gave 2 different jobs in 2 different games. (I never get fisherman on the America map, so it could be location related. But it could also be a small sample size.)
It wouldn't be so bad if the self teaching thingy happened more often, but my last viceroy game I've had a colonist plant tobacco for about 200 years and by the time I won he was still a free colonist.
I was also curious about the prime resources location, and I do think I got something there.
Thanks to Pifou42's suggestion about creating a map with nothing but forests I found that there's a repeating pattern going 5, 6, 9, 6, 9, 6, 5, 10, repeat. The non-forest primes follow the exact same pattern, but 4 locations to the left. Giving you something like this (G - ground & ocean, F - forests):
G---F-G---F--G---F-----G---F--G---F-----G---F--G---F-G---F------G---F-G---F--G---F-----G---F--G---F-----G---F--G---F-G---F------G---F
On line 1 of the map you start somewhere in this string based on a seed in the savefile and going down the map it rotates 28 characters, 4, 16, 4, repeat.
If an F is on a non-forest, there's no prime. If a G is in the ocean too far from the coast, there's no prime. If a G is on a forest, it will show up after clearing the forest.
Using pbsite's enc_decode_sav.py utilty I got a field called prime_resource_seed containing two bytes. It looks like the first byte is always 00, I have no idea what the first half of the second byte does (lost city?), the second half of the second byte is some kind of offset for the prime pattern on line 1.
I never use python and had to look up everything, this can probably be done easier and/or faster. Run it with "python3 script.py [0-15] > filename.txt" to get the pattern for the complete map in a textfile. The 0 - 15 matches with 0 - F in the second half of the second byte of the prime_resource_seed field. Any other input probably gives an error.
I checked it with multiple savefiles and I'm pretty sure it's correct.
Since there's only 16 versions of the pattern I thought about just dumping it all here, but 16 patterns times 70 lines would be an awful lot of spam.
For the people who just want to know the trick(s) to find primes hidden in a forest while in a game, there's two (as far as I know):
1. As mentioned by Pifou42, there's always a ground prime 4 steps left from a forest prime.
2. Also mentioned by Pifou42, but a bit more detailed: for every forest prime on an even line (2, 4, 6, etc.) there's a ground prime directly to the south.
In theory both also work the other way around, except you can't plant forests in a regular game.
Python:
import sys
def rotate(input, r):
return input[r:] + input[:r]
offset = 4 * int(sys.argv[1])
pattern = '1 1 1 1 1 1 1 1 '
pattern = rotate(pattern, offset)
for i in range(70):
output = list(' ' * 56)
for f in range(56): # forest prime resource
if pattern[f] == '1':
output[f] = 'F'
pattern = rotate(pattern, 4)
for g in range(56): # ground (and ocean) prime resource
if pattern[g] == '1':
output[g] = 'G'
print(''.join(output))
# rotation is actually 36, 60, 48, 60, repeat, but we already rotated 4
match i % 4:
case 0:
pattern = rotate(pattern, 32)
case 1:
pattern = rotate(pattern, 56)
case 2:
pattern = rotate(pattern, 44)
case 3:
pattern = rotate(pattern, 56)