Multiplayer: Changing a player to AI
Moderator: Forum Moderators
Multiplayer: Changing a player to AI
I host multiplayer games a lot, but I can't work out how to switch a player to AI without reloading the game. If a player quits, surrenders or just wants to leave the game, I don't receive a message with the option of switching the player's faction to AI, so need to reload the game and we all need to log in again.
Is there a solution to this?
Is there a solution to this?
Re: Multiplayer: Changing a player to AI
With Advanced wesnoth wars (fork) it can be done, in the tools section.
Otherwise, you have to code it in the scenario itself. Although I thought that if a player quit, they automatically change to the AI...
Otherwise, you have to code it in the scenario itself. Although I thought that if a player quit, they automatically change to the AI...
Re: Multiplayer: Changing a player to AI
It can be done (by the host or by the player currently controlling that side) with the
:droid
command. It takes two optional arguments:
- the side number
-
on
,off
orfull
, whereon
= enable but retain vision,full
= as if it’s controlled by another player.
-
- Posts: 484
- Joined: August 4th, 2019, 5:27 pm
Re: Multiplayer: Changing a player to AI
You should first assume control over the side in question. Let's say it's side 5, then type
Btw, I actually notice that your games are sometimes in the lobby for several days. I wonder if it's connected with that you don't receive a message about someone of yours leaving
control 5 jdmp
. Then you can droid it with the command droid 5
. To type commands, press ":" or you use this menu buttonBtw, I actually notice that your games are sometimes in the lobby for several days. I wonder if it's connected with that you don't receive a message about someone of yours leaving
Co-founder and current maintainer of IsarFoundation, Afterlife Rated and overall Wesnoth Autohost Project
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
-
- Posts: 484
- Joined: August 4th, 2019, 5:27 pm
Re: Multiplayer: Changing a player to AI
In his situation, I believe, when another player leave, the server doesn't see it and still assumes that player is there, so he couldn't just droid because he'll receive "Can't droid networked side" error
Co-founder and current maintainer of IsarFoundation, Afterlife Rated and overall Wesnoth Autohost Project
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
- Pentarctagon
- Project Manager
- Posts: 5567
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Multiplayer: Changing a player to AI
There should be a notification about players leaving, so it's strange that's not happening. The host should be able to take over the side and then droid it though.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Posts: 484
- Joined: August 4th, 2019, 5:27 pm
Re: Multiplayer: Changing a player to AI
I notice that often the first few games in the lobby are there for days or even weeks, and usually it happens with the same people. Like, jdmp's game (topic starter's) often holds for several days. Right now in the 1.16 lobby the top game is "Afterlife 71735" with ronnybee in it. It's not reloaded (if you observe, it goes from the start). And you may ask the bot, it says the game started on July, 5, so it's on for almost 16 days. In the past I remember there were other people whose games were regularly stuck for days, just they are not there right nowPentarctagon wrote: ↑July 20th, 2023, 7:09 pm There should be a notification about players leaving, so it's strange that's not happening. The host should be able to take over the side and then droid it though.
I think sometimes (or likely with some players) the server just doesn't recognize that the connection is closed or failed and waits for eternity considering the player still online.
Ofc it's possible that some guys just forget to close Wesnoth and it runs 24/7 for several weeks keeping them online. But I doubt it's the case of many
Co-founder and current maintainer of IsarFoundation, Afterlife Rated and overall Wesnoth Autohost Project
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
Re: Multiplayer: Changing a player to AI
Thank you very much for all the helpful replies. I hadn't realised that if I take control of a player I can then switch the player to AI. That will make things much easier.
The main reason our games last a long time is that we use large maps and all the other players have long work days (I'm retired so have a more flexible schedule) and we can sometimes only take one or two turns a day. Computers also occasionally disconnect and we all need to log in again. Being able to replace a player with AI will significantly reduce the disconnects. Your suggestions have solved the problem. Thank you.
The main reason our games last a long time is that we use large maps and all the other players have long work days (I'm retired so have a more flexible schedule) and we can sometimes only take one or two turns a day. Computers also occasionally disconnect and we all need to log in again. Being able to replace a player with AI will significantly reduce the disconnects. Your suggestions have solved the problem. Thank you.
- Pentarctagon
- Project Manager
- Posts: 5567
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Multiplayer: Changing a player to AI
Well, loonycyborg looked and apparently ronnybee's client is still sending keepalive messages every 10 seconds, so apparently he has actually left his game running for 15 daysdwarftough wrote: ↑July 20th, 2023, 10:05 pmI notice that often the first few games in the lobby are there for days or even weeks, and usually it happens with the same people. Like, jdmp's game (topic starter's) often holds for several days. Right now in the 1.16 lobby the top game is "Afterlife 71735" with ronnybee in it. It's not reloaded (if you observe, it goes from the start). And you may ask the bot, it says the game started on July, 5, so it's on for almost 16 days. In the past I remember there were other people whose games were regularly stuck for days, just they are not there right nowPentarctagon wrote: ↑July 20th, 2023, 7:09 pm There should be a notification about players leaving, so it's strange that's not happening. The host should be able to take over the side and then droid it though.
I think sometimes (or likely with some players) the server just doesn't recognize that the connection is closed or failed and waits for eternity considering the player still online.
Ofc it's possible that some guys just forget to close Wesnoth and it runs 24/7 for several weeks keeping them online. But I doubt it's the case of many
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Posts: 484
- Joined: August 4th, 2019, 5:27 pm
Re: Multiplayer: Changing a player to AI
Well, looks like I've underestimated the chance of this scenario
Co-founder and current maintainer of IsarFoundation, Afterlife Rated and overall Wesnoth Autohost Project
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
Re: Multiplayer: Changing a player to AI
I wonder if it's connected with that you don't receive a message about someone of yours leaving download apk
teatv
teatv