Open Neptune3215 opened 1 year ago
I have been researching this, testing it, basically trying anything from my little book of .lua and moddings.. its been mentioned in main AOE discord as well as the unofficial discord.
Of the thousands of games using AGS setts and mostly Forest Nothing, this is by far the worst. Wish I could contribute and from studying lua commands I would think a clever script could be made that would remove all entities idle/defeared on a map...
It's not that complicated to kill off remaining units. Moment player is eliminated is well known and as long as he was not yet killed by C++ calls, you can gather information about player units and buildings. EGroup/SGroup get all player entities / squads exists if I remember correctly. Only thing left is to find exact place where you want to invoke this, for AGS that would be right here:
function AGS_SetPlayerDefeated(player_id, presentation_function, defeat_reason, opt_objective_pop)
-- most likely as first call, might work as second or third
AGS_SetOnePlayerDefeated(player_id, presentation_function, defeat_reason, opt_objective_pop)
Core_CallDelegateFunctions("OnPlayerEliminated", Core_GetPlayersTableEntry(player_id), defeat_reason)
end
But as any other change to this mod, I don't have time & motivation to do it currently.
Can an enhancement be made so all remaining traders and villagers instantly die when a player is eliminated?