Preventing AI getting not-AI-useable factions in multiplayer

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
markm
Posts: 157
Joined: August 13th, 2008, 3:53 pm
Location: Halifax Nova Scotia Canada

Preventing AI getting not-AI-useable factions in multiplayer

Post by markm »

I have finally started checking out multiplayer mode.

I have not noticed any method of preventing factions the AI cannot handle from being given to AI players.

Is there a method?

If not, how about an after the fact method, maybe filter sides on whether they are AI and check which faction they have chosen / been assigned?

Is faction recorded somewhere in the side or did it just set recruits list and leader and vanish so one cannot later ask what the faction name was?


EDIT: relatedly, can one specify in a scenario "this side should not use this that or the other faction" ? Or a list of factions for that side's choices ?

-MarkM-
Developing Between the Worlds campaign portmanteau.
Have you eaten today?

User avatar
Ken_Oh
Moderator Emeritus
Posts: 2176
Joined: February 6th, 2006, 4:03 am
Location: Baltimore, Maryland, USA

Re: Preventing AI getting not-AI-useable factions in multipl

Post by Ken_Oh »

It's in the era config what factions are available (start with data/multiplayer/eras.cfg to see mainline), but there isn't a way to differentiate the player from AI in this section, AFAIK. You'd have to do some sort of hack where you switch a faction out if there isn't a human player, if you wanted to do something like this. How you should do that all depends on the circumstances (do you know which side is going to be AI or is that side freely interchangeable for a human player?).

#2, just specify a different era. If you don't want Drakes to be used in a scenario, just make an era called The Drake-less era and include all of the factions except Drakes. However, you can't use more than one era to a scenario (again, AFAIK), so you'd have to manually set the factions yourself at the start. You can use a start event, do a random choice and then swap the leader and the recruit list.

User avatar
markm
Posts: 157
Joined: August 13th, 2008, 3:53 pm
Location: Halifax Nova Scotia Canada

Re: Preventing AI getting not-AI-useable factions in multipl

Post by markm »

Thanks. Maybe I'll start by simply leaving not-AI-useable factions out of the random-faction-choices list. That way players can still select them if the other players aren't insisting everyone has a accept a random pick, they can even be forced upon AI sides by the host, but normal default startup without messing with any settings and with allowing random sides at least to AI players won't end up giving them to AIs.

The specific faction that led me into this line of thought is proving interesting in other ways too because although it cannot use keeps what it can use seems way more powerful that keeps, provided of course it can find the kinds of places that it does use. In the long term on persistent worlds though maybe that will turn out to be balanced by the fact when they leave an AI to hold their territory while they sleep that AI will not be able to recruit. Maybe that is actually nicely suited to the kinds of barbarians and pirates I was thinking of using them for. (Actually most random walk-in players probably, at least until various factions decide upon criteria for officially joining their faction and assigning to such joiners the ability to recruit certain units belonging to the faction...)

-MarkM-
Developing Between the Worlds campaign portmanteau.
Have you eaten today?

Post Reply