When using "multiple alien forces" there are ALIEN_FORCES=8 and PLAYER_FORCES=8. Is it correct that the force 'enemy_1' is close to player_force_1
, 'enemy_2' is close to player_force_2
and so on? If so, I could simply calculate the research progress of the players of team 1 (player_force_1) and then just overwrite the evolution for 'enemy_1' force. That way I do not even have to calculate which one is the closest enemy near the current player spawn point. Do you see any problem?
/c myteamnumber = ""..game.player.force.name game.player.print ("My own force: " .. string.sub(myteamnumber ,14,15))
give me "6" when I am in Team 6 using your mod.
So for that player the evolution of "enemy"..myteamnumber should be altered when something is researched.