Add/Remove Players/Bots in-game

Add/Remove Players/Bots in-game

Requests for features in the spring code.

Moderator: Moderators

Post Reply
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Add/Remove Players/Bots in-game

Post by gajop »

I can't seem to find any reference about adding players through lua while in game, so how about adding that?
Personally, I'd use it for my mission/scenario editor, but I can imagine it being useful when someone disconnects, f.e to transfer control temporary to an AI, and then give it back to the player when he reconnects.

I'd be fine if we could at least add AIs and new teams.
Also, while I'm at it, is there a way to modify alliances/teams in game?
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Add/Remove Players/Bots in-game

Post by SirMaverick »

ZK does transfer units from afk/disconnected players to active ones and back when they are back.

You could setup an AI team for each alliance without any units from the beginning and transfer the units there. But I think it's better to transfer the units to another human player than AI.
gajop wrote:Also, while I'm at it, is there a way to modify alliances/teams in game?
Afaik adding/modifying is not possible.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Add/Remove Players/Bots in-game

Post by CarRepairer »

Unless you count temporary alliances using the /ceasefire command.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Add/Remove Players/Bots in-game

Post by Google_Frog »

LuaAI is just a gadget so it can control anything. It could take control of a dropped player easily.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Add/Remove Players/Bots in-game

Post by abma »

trough the autohost interface you can already add players:

https://github.com/spring/spring/commit ... 6f4e2f7c74

do you know:
/aikill
/ailist
/aireload
/aicontrol

?

and when luasockets gets intergrated, you could make a hack-around :-O

i know this was a bit off-topic, as it was requested to add a new player trough lua. (but as the functionality in general seems to be already there, it should't be so hard to add the lua-callin)
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Add/Remove Players/Bots in-game

Post by gajop »

nah, it's great info
Good to know it exists even if it's not callable through lua. Also I didn't know about those commands either. Is there any place where they are documented? It seems like I'm missing a lot of useful stuff hidden there.
Post Reply

Return to “Feature Requests”