For the skirmish ability, you'll make use of the xExtraLev field. The value of xExtraLev is added to the level of the class an ability is added to, to determine whether a class is eligible for that ability and what level the ability is calculated at.
So, here's how to modify the xExtraLev field of skirmish:
Phase: PreLevels, Timing: 10000
Code:
~how many levels of ranger will we be adding to skirmish?
var bonus as number
bonus = #levelcount[Ranger]
~Add those effective levels to skirmish
hero.childfound[cScoSkirm1].field[xExtraLev].value += bonus
hero.childfound[cScoSkirm2].field[xExtraLev].value += bonus
I'm just guessing as to the Ids of the various copies of skirmish, so fix those, and continue the list with all the other copies of Skirmish that are present on the scout.
For the favored enemies, first you'll have to figure out how favored enemies are stored. Start by adding a level of ranger to a blank character.
Go to the develop menu, make sure that the first item, "Enable Data File Debugging" is checked, then at the bottom of the develop menu, select "Floating Info Windows" and then "Show Selection List". That's a list of everything that's been added to your character. Right at the top, you'll see "2nd favored enemy" through "5th favored enemy". Down in the "f"'s, you'll find "Favored Enemies" and "First Favored Enemy".
Okay, we have some good candidates. Now to see how they function.
Close the "Show Selection List" window, go back to the develop menu, floating info windows, then select "Show Selection Fields" In the list of picks that pops up there, select all the candidates that were identified earlier.
Rearrange all the windows that pop up so that you can see them all, and start adding and subtracting ranger levels (especially the thresholds when the number of favored enemies change). You can also add or remove favored enemy choices to see where those are recorded.
You'll find that the most important one is the one labeled "Favored Enemies". The feTotal field appears to store the number of favored enemy selections available, and feUpTotal stores the number of upgrades (and it's always 1 less than feTotal).
Okay, now to calculate the bonus favored enemies.
We can't directly alter the number of levels on the "Favored Enemies" pick - it only stores the calculated results. So, we'll compute how much the extra levels make the count of favored enemies change.
Phase: Post-Levels, Priority: 10000
Code:
~how many favored enemies do we currently have
var currfavor as number
currfavor = round(#levelcount[Ranger]/5,0,-1) + 1
~how many favored enemies should we have
var newfavor as number
newfavor = #levelcount[Ranger] + #levelcount[Scout]
newfavor = round(newfavor/5,0,-1)
~by adding newfavor and subtracting currfavor from the existing favored
~enemies, we'll end up adding only the difference
hero.child[cFavEnemy].field[feTotal].value += newfavor - currfavor
hero.child[cFavEnemy].field[feUpTotal].value += newfavor - currfavor