Auto-translated
To implement the project, we need all the interesting combinations of existing stacks.
We also need the proportions (weights) of the stacks in these combinations.
Algorithm:
1) We collect the names of all creatures on the map and calculate their strength.
mass_creatures = {name_monsters, power}
2) According to the combination table with weights and strength, we replace creatures with others.
(It will be very difficult to create such a table - this is the most challenging part of the mod. It is also necessary to avoid a large number of repetitions).
We can add new creatures with the same strength to each group of monsters, and then remove the old ones.
mass_new_creatures = {name_monsters, mass_stack={ID={...},count={...}}}
3) We wait for the map to load and play)))