Open NicEastvillage opened 2 weeks ago
spawn_id
still has applications for bot devs, with it being a unique identifier for bots. I don't think it should be removed from GamePacket
even if those other changes go through.
In which cases are the packet index not a unique identifier?
It's not unique between matches (might be helpful for custom match managers that control custom game modes) & between scripts and bots. This gave me significant headache in core when I tried to remove spawn ids completely.
Sure, we can change SetLoadout
to take the the index (can be converted to spawn id internally by core) and add the process's name to ControllableInfo
- not sure how hard that latter one will be to implement, might be tricky or trivial I forgot when that info in congregated - but I'm against removing it from GamePacket
The start-up protocol was reworked in https://github.com/RLBot/core/issues/49 and https://github.com/RLBot/core/pull/48 to use
agent_id
instead of the multi-purposespawn_id
. Theagent_id
allows us to bind processes to bots/scripts without relying on core to start the bot/script process with aRLBOT_SPAWN_ID
env var. We decided to keepspawn_id
as a concept due to their usefulness internally. However,spawn_id
s are still used by bot processes in the current implementation (Bots know theirspawn_id
since it is passed to them in theControllableInfoTeam
message). Externallyspawn_ids
are used for:SetLoadout
message usesspawn_id
.Both of these can be replaced with better alternatives:
ControllableInfo
instead.SetLoadout
message use game packet index instead.With these changes,
ControllableInfo
do not need to includespawn_id
anymore. Additionally,spawn_id
also appears in thePlayerConfiguration
andScriptConfiguration
, but with the above changes I don't think that is necessary anymore either. Let me know if I am wrong on that.