Future Scenario: AI /take

Future Scenario: AI /take

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Future Scenario: AI /take

Post by REVENGE »

Possible? Load an AI library midgame and have it take control of a player's units?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Future Scenario: AI /take

Post by imbaczek »

currently not possible; probably doable, but would require mod support (mods need to tell the engine which AI to load when somebody drops.)
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Future Scenario: AI /take

Post by Auswaschbar »

More important is it needs AI support.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Future Scenario: AI /take

Post by imbaczek »

AIs already support UnitGiven events, so that's not a problem I guess, only need to fake unit transfer.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Future Scenario: AI /take

Post by hoijui »

yeah, i see no big problem in this.
we already discussed that once.
game would be paused, ai loaded, all units be added to it with UnitGiven, then unpause.
so AI or AI Interface wise, ther would not have to be anything added, i just dont know, how much would have t ochange engine internally, if one team changes from human to AI controll, or i a new team would be created mid-game. but that should be solvable too, if it was a problem.
we could first make the command like this:

Code: Select all

/aitake [shortName] [version] [teamToTake]
shortName nad version(optional) woudl specify the skirmish AI to use
which would not need mod support, and later mod support could be added simply by making the shortName optional, when the mod supplies a default shortName.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Future Scenario: AI /take

Post by imbaczek »

I see one problem with anything other than synced LuaAIs - they need to work on only one machine, and when that drops, the whole process has to be repeated. You can't count on the host to load the AI because it can be an autohost.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Future Scenario: AI /take

Post by zwzsg »

REVENGE wrote:Possible? Load an AI library midgame and have it take control of a player's units?
Totally possible with Lua AIs.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Future Scenario: AI /take

Post by hoijui »

if the AI host drops, the same should happen to that team like when a player drops -> units beeing available for take. then a player could take them or someone else could issue an /aitake. autohosts could have a setting to auto-aitake a dropped team after x seconds.
... hmm, i just repeated what imbaczek wrote, mor ebloated kind of :D
the thing is.. i do not know where you see a problem in this.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Future Scenario: AI /take

Post by imbaczek »

/aitake is a solution, yes. I was thinking about scenarios where /aitake is implicit.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Future Scenario: AI /take

Post by REVENGE »

Actually, this brought to mind another idea. Would it be possible to transfer hosting in the scenario that the host loses his connection?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Future Scenario: AI /take

Post by imbaczek »

yes, the plan to do this exists for quite some time, but as usual it needs someone to do the typing.
Post Reply

Return to “Feature Requests”