Unpack files into the \Assets\Python\ folder of your mod. (If you don't have one already you should create this folder path.)
Now, I've only done some testing of the code - not played entire games with it. So there is no telling what it will do in-game. But in theory it should work as intended.
And I've designed the code for use with the standard BtS setup - not any mod or with any custom promotions. But the way the code is structured it should work for practically
any setup. Provided that promotions are also available with experience, that the XML for all promotions make logical sense, and such.
Also, these lines need to be customized for use with any modded setup:
PHP:
# custom settings
leaderTag = "PROMOTION_LEADER"
combatMessage = "%s received the %s Promotion!"
The leaderTag value is the set to the default name of the "Led by Warlord" promotion that comes with attaching a GG to a unit. Change the string to whatever it is that this promotion is labeled as in your mod.
The combatMessage string can be altered to customize what the in-game message should read.
And if you can't get this mod-comp working with your mod, please try it out with a standard BtS setup instead...