Interesting idea, and quite something different than what is available!
Since you know already how to create special script checks, I assume you are no stranger to the module system. A good thing, for that's what you'll be needing

.
1. Make it so that the new troop trees are a selectable option when you start a new game (as a 4th option of course, Native/Reworked/Expanded/<my troop tree that I haven't yet named>).
To make the new troop tree selectable, you'll need to look at the Character Creation (In the source you find the files in ./Source/Source Kits/Character Creation/). This is a separate modmerger kit created by Windyplains. In ccp_presentations.py you must search for the following line:
####### TROOP TREE SELECTION MENU #######This is obviously the place where you can select which troop tree you use. You find the following:
(try_begin),
(eq, ":value", 0),
(assign, "$troop_trees", troop_trees_0),
(else_try),
(eq, ":value", 1),
(assign, "$troop_trees", troop_trees_1),
(else_try),
(eq, ":value", 2),
(assign, "$troop_trees", troop_trees_2),
(else_try),
(display_message, "@ERROR: No valid troop tree selection found."),
(try_end),
This is an important part of code to understand, for this structure is used on hundreds of places in the source. You see that the three troop trees are numbered 0 till 2. Your new troop tree will be numbered '3' (even tough it's the 4th tree). Keep this in mind, for you will need it. To add the new tree to the list, add it like this:
(try_begin),
(eq, ":value", 0),
(assign, "$troop_trees", troop_trees_0),
(else_try),
(eq, ":value", 1),
(assign, "$troop_trees", troop_trees_1),
(else_try),
(eq, ":value", 2),
(assign, "$troop_trees", troop_trees_2),
(else_try),
(eq, ":value", 3),
(assign, "$troop_trees", troop_trees_3),
(else_try),
(display_message, "@ERROR: No valid troop tree selection found."),
(try_end),
But that's just the option in the menu, and the tree itself hasn't been defined yet, let alone named.
2. Make sure the game loads my troops for all cases, so that my version of the other troops like Mercenaries, Sword Sisters, bandits and Manhunters will load.
You already know how to make new troop entries, so you know to look into module_troops.py. Keep in mind tough that it's preferable to do this in both the Expanded source as in the Gameplay source, so that people who play the gameplay version also can use your tree. When looking into the troops file, you see the following naming convention for the troop ID's:
mercenary_n_townsman
mercenary_r_townsman
mercenary_e_townsman
These are of course the ID's for the Mercenary townsmen in the Native (n), Reworked (r) and Expanded (e) tree. Pick a name for your tree before you start creating one, so that you can continue in this naming convention. If you are to name your tree 'Classes Troop Tree', you could name your mercenary townsman ID like this:
mercenary_c_townsman
For the ease of comparing troops in the source, I kept the ID's in the different trees similar. The Native 'Mercenary Cavalry' has as ID mercenary_n_komtur_ritter, which is comparable to the Reworked tree troop 'C5 Mercenary Komtur Ritter' with the ID mercenary_r_komtur_ritter, which is comparable to the Expanded 'C5 Mercenary Komtur Ritter' with the ID mercenary_e_komtur_ritter.
Keep in mind that any added mercenaries must be put before 'mercenaries_end'.
Don't forget to add the custom troops (which are the freelancer troops, but they have an old ID from before we thought of them as freelancers), bandits, women and Top tier units as heroes for your new tree.
Also, at the beginning of the troops file, you find the following troops:
["troop_tree_0","{!}native_troop_tree","{!}native_troop_tree", 0, 0, 0, fac_kingdom_1, [], 0, 0, 0, 0, 0],
["troop_tree_1","{!}reworked_troop_tree","{!}reworked_troop_tree", 0, 0, 0, fac_kingdom_1, [], 0, 0, 0, 0, 0],
["troop_tree_2","{!}expanded_troop_tree","{!}expanded_troop_tree", 0, 0, 0, fac_kingdom_1, [], 0, 0, 0, 0, 0],
["troop_tree_3","{!}extra1_troop_tree","{!}extra1_troop_tree", 0, 0, 0, fac_kingdom_1, [], 0, 0, 0, 0, 0],
["troop_tree_4","{!}extra2_troop_tree","{!}extra1_troop_tree", 0, 0, 0, fac_kingdom_1, [], 0, 0, 0, 0, 0],
["troop_tree_5","{!}extra3_troop_tree","{!}extra2_troop_tree", 0, 0, 0, fac_kingdom_1, [], 0, 0, 0, 0, 0],
["troop_tree_6","{!}extra4_troop_tree","{!}extra3_troop_tree", 0, 0, 0, fac_kingdom_1, [], 0, 0, 0, 0, 0],
["troop_tree_7","{!}extra5_troop_tree","{!}extra4_troop_tree", 0, 0, 0, fac_kingdom_1, [], 0, 0, 0, 0, 0],
["troop_tree_8","{!}extra6_troop_tree","{!}extra5_troop_tree", 0, 0, 0, fac_kingdom_1, [], 0, 0, 0, 0, 0],
["troop_tree_9","{!}extra7_troop_tree","{!}extra6_troop_tree", 0, 0, 0, fac_kingdom_1, [], 0, 0, 0, 0, 0],
Since you'll be using troop_tree_3, you need to rename 'extra1_troop_tree' to the name of your tree, for example 'classes troop tree'.
And also don't forget to edit the upgrade paths if needed, which can be found at the bottom of the troops file.
Then you'll need to go to module_party_templates.py. Here the different parties and reinforcements are defined. You'll need to add everywhere where there's multiple entries, like:
village_defenders
village_defenders_r
village_defenders_e
new entries for your tree. In this case you would be adding
village_defenders_c
Keep in mind that each party can have a maximum of 6 different troops, but there's no maximum or minimum to the amount of troops each kind has.
Also, you'll see that there are six types of reinforcements instead of the native three, like:
kingdom_1_reinforcements_a
kingdom_1_reinforcements_b
kingdom_1_reinforcements_c
kingdom_1_reinforcements_d
kingdom_1_reinforcements_e
kingdom_1_reinforcements_f
a = low level reinforcements for villages and castles.
b = low level reinforcements for towns.
c, d and e = midlevel reinforcements for castles and towns, with e being better than c.
f = highlevel reinforcements for towns.
3. Make the presentation for the Upgrade Trees pages in Reports, so players can view what the troops look like (even if they don't have "upgrade paths".
Read
this post in the FAQ, especially the part 'Creating a new tree using the source files' on how to edit the troop tree presentations in the troop tree viewer.
When you search in module_presentations.py for
#Floris: The ingame viewable upgrade treeyou see that each presentation is named like "upgrade_tree_1". 1 till 10 are the Native presentations, 11 till 20 are the Reworked presentations and 21 till 30 are the Expanded presentations. So your new troop tree presentations will be named "upgrade_tree_31" till "upgrade_tree_40".
4. Anything else I may be forgetting... D:
Throughout the source you can find all parts of the
Multiple
Troop
Trees (MTT) by simply searching for:
Floris MTTThere are hundreds of places which you must edit, but luckily they are all marked.
In module_scripts there is a script called "initialize_troop_tree_sets". This is an important script. When you start a new game, the game already makes new parties and such, before you have selected which troop tree you use. tandard parties from the Expanded tree are chosen. This script corrects that in case of the other trees. Make sure you also correct for your tree. And don't forget to put your troop_trees_3 corrections
before this:
(else_try),
(eq, "$troop_trees", troop_trees_2),
(try_end),
Don't forget to add constants for your specific troop tree. Just search in module_constants.py for the MTT constants and add your own

.
Please note: This post is by no means a manual. I just point some things out, and hopefully I pointed you into the right direction. I probably have forgotten to mention quite some other important scripts, but you'll encounter them when searching for the places to edit MTT.
Also, adding a new tree will be quite some work. Maybe it's wise to first use one of the existing trees (for example, the Native tree) and edit it to include your own tree. That way you can get relatively fast your tree released as a submod, so that you can get feedback on - for example - balancing. If you create such a tree, and if we like it or if it gets extremely popular, and if it differes enough from the other trees (which it will be judging by your description) we are prepared to incorporate it into the main mod.
[edit] Heh, Windy, you ninja'd me![/edit]