Open hugeblank opened 3 months ago
To my knowledge, AI that connect to the server are supposed to be another process (client as opposed to server), and so you have to run them separately, and that's why you cannot combine --server-config
and --connect-now
.
I agree that it would be slightly more convenient in some situations if STK managed that itself, but on the other hand, with what happens now, bots can be connected and disconnected at any desired moment, which can also be useful.
with what happens now, bots can be connected and disconnected at any desired moment, which can also be useful.
Yeah I agree with this, but I don't see why both features cannot exist at the same time. The particular use case I have in mind is with the ai-handling
tag in the server config. Since my server handles AI by itself and is not accepting AI from anywhere, I'd just like to always have the max amount (minus connected players), which doesn't feel like a situation that should demand 2 processes. Heck maybe the feature could be implemented in a way that could be a tie-in value with that tag. Something like:
<ai-handling auto-balance="true" auto-join="true" />
(where auto-balance
is what is currently value
)
Apparently there's an option --server-ai
which seems to do exactly what you wanted. I'm not really sure about when exactly it can/cannot be used, it was added long ago and maybe even doesn't work completely now (e.g. for me server with --server-ai=1
crashes upon second join, I can make an issue if the option is planned to be supported).
ooh! The --server-ai
option appears to (mostly) work , though I can't test multiple joins at the moment. The only other issues:
--help
and definitely should be.Edit - by "second join" I thought you meant two players joining at the same time. I see now you meant joining, then leaving, then joining again, as I just was able to reproduce the crash.
Description
I'd like to be able to merge the two commands necessary to get AI onto a server into one. It looks like this is possible, the only hitch being that the AI joining the server takes precedence over the server listener. I feel like the current behavior is more of a bug, and that the two required steps are out of order.
Steps to reproduce
./bin/supertuxkart --server-config=server_config.xml --disable-polling --unlock-all --network-console --connect-now=localhost:2759 --network-ai=11
Expected result: Server starts listener then AI joins the server. The behavior could even be extended to drop the
--connect-now
and--server-password
arguments and just directly join the server with the providedserver_config.xml
information. Actual result: AI eternally attempts joining while the server arguments are presumably ignored.Configuration
STK release version: e6d0df3
STK Source: git
System: Arch Linux 6.10.2-arch1-1
Graphics card: Radeon RTX 6600 XT
CPU: Ryzen 5800 X3D
Additional information
stdout.log: