Open thmsndk opened 4 years ago
Do we want it to stick around a room untill the battle is finished? when is a battle "boring" enough to swap to another room?
currently we stick around for 30 seconds, even when the room is empty. should probably switch rooms if it is empty. usuakky because the combatants move to anothrer room, or one of them runs away
Perhaps utilize the data of the world map to determine how many players are in a room, we can't just call the pvp endpoint all willy nilly :)
Because ags is a hero, admin-utils now have a "warpath" websocket we can subscribe too.... ❤️ https://github.com/ScreepsMods/screepsmod-admin-utils/compare/bca074ca23de...98d0ab6edddc
{
"channel": "warpath",
"id": "battles",
"type": "warpath",
"data": [{
"room": "W14S6",
"shard": "screepsplus2",
"classification": 0,
"defender": "false or username",
"attackers": ["username1", "username2"],
"lastPvpTime": 3328660,
"powerCreeps": [{
"name": "x",
"className": "operator",
"level": 1,
"powers": {
"power": "PWR",
"level": 0
}
}
],
"stronghold": 0,
}
],
}
can subscribe to either warpath:battle to get individual records, or warpath:battles to get an array, both are sent out at the end of each tick
Ags also mentioned loan battles for use on MMO, we would be able to fetch data from here instead of the websocket for the same, albeit delayed functionality on official server ,https://www.leagueofautomatednations.com/vk/battles.json
as a note, the battle format is slightly different from the warpath battles endpoint that we have for mmo on loan, I added room and shard to each entry and made it an array rather than a keyed object. I find arrays easier to work with in many cases. otherwise, its identical (literally copied the vk class used for battle classifications)
Side note on that quote, the formats are different, since the socket is sending the internal format and the battles.json is a different db format.
gathering input / ideas about pvp spectate to make streams more interesting
So when streaming swc, and it jumping betweem rooms, are their any particular rules you would want for room selecting, what is interesting to watch during peacetime, what kind of pvp is more interesting?
Comments from slack:
for battles I'd say more creeps involved = more interesting to watch
warpath bot?
you can probably rank confrontations by # of military parts in the room
so count up all of the ATTACK, HEALand RANGED_ATTACK parts of all creeps in the room combined
the issue is you don't have the number of bodyparts unless you subscribe to the room :confused: and we are limited to 2 subscriptions for detail room info
but should be doable to do a rotating subscribe on the rooms I guess
so first make a list of rooms based on # of creeps, then filter only those rotating subscribe on those rooms and only switch the main viewer if one of those rooms has a military value that is higher than the room currently being viewed