Auto-translated
// Exception #2. Magic Schools (15, 16, 17, 18 - school numbers)
The initial value of R depends on the tree number N and the hero's level.
Please explain what this "tree number" is. Is it a pseudo-random number R that existed when the hero was level 1, or something else?
Also, a reasonable question: does visiting objects, as we used to say, that "reset" the skill tree, leave R unchanged? If so, what does the phrase "...and the hero's level" mean?
P.S. Thank you for the excellent work! It's a pity that I don't know how to find the necessary parts of the code myself.