@Name 30 players is certainly an ambitious plan. I can't even fathom what the XML would even look like with that kind of political landscape... let alone how to make it AI compatible.

That's why I'm leaning towards fixed alliances, but I prefer adding some triggered changes to better represent the era (see previous post). The AI won't handle it perfectly, it might invade triggering territories at times it won't have the strength to deal with an additional enemy or two. But I think it's an acceptable middle ground solution. And those territories won't be too many so no extensive coding added to the large task (many factions and total territories).

Just the Garrison unit alone with it max units per territory is likely already beyond its comprehension level.

Even with overpurchasing garrisons the hard AI isn't a pushover so far. It can even use them later to quickly replentish it's defenses. But I'm interested in an alternative defense system. The first idea I was using was "factories" having some defense, which has impact (but only if friendly troops are present). Could consider falling back to that or use some new suggestion.

Decent AI compatibility is a must. I want to be able to play the game solo or hotseat with a few friends. So far it works rather well, besides a couple of issues.

For what I've read so far, I've a hard time believing this map plays rather well with any AI, but you have the map, so I guess I should take your word.

In this case, you should definitely follow a Feudal Japan style setup, in which every power is on its own (FFA) and you have a simple politics set of rules, then the map being played by taking 1 power per each person in the game, assigning all remaining ones to Hard AI.

You can have the politics working not too badly as long as you don't use any archetype alliance and allows downgrading from any relationships directly to war (for something like alliance, just use the archetype Neutral, but allowing moving into territories, and be sure that you can directly go from that to war).

I strongly suggest not doing any extreme hacks like the ones you described. We already have maps that were tailored around the limits of the old AI, and now that AI is completely gone, and the maps are there broken. Rather, make some chance triggers to give some of the units the AI doesn't buy, removing the resources that would be needed to purchase them, before such a phase (basically, random purchasing for part of the money). You would need adding something to tell the triggers if the player is AI or not, for example like Feudal Japan does with its various triggers adding Ashigarus, et cetera, for AI powers, depending on having placed stuff on boxes, at start game.

For what I've read so far, I've a hard time believing this map plays rather well with any AI, but you have the map, so I guess I should take your word.

Don't exactly take my word. I'm a tripleA newbie, even though a rather experienced TBS/RTS/Grand Strategy player. I actually haven't played much of any map to have a good comparison, but can usually beat HardAI in my map with relatively unfavorable conditions, not without a challenge though. Most of it's functions work well I think (minus garrisons and maybe negative isMarine?). I haven't edited much from the core gameplay and alliances are still fixed. Maybe the map having multiple resources (several of them used for upkeep besides purchace, one of them also fuel) could be a downgrade on the AI?

In this case, you should definitely follow a Feudal Japan style setup, in which every power is on its own (FFA) and you have a simple politics set of rules, then the map being played by taking 1 power per each person in the game, assigning all remaining ones to Hard AI.

You can have the politics working not too badly as long as you don't use any archetype alliance and allows downgrading from any relationships directly to war (for something like alliance, just use the archetype Neutral, but allowing moving into territories, and be sure that you can directly go from that to war).

This system seems very tedious to code, especially with so many players, and I'd like true alliances since they are appropriate for the setting. I think I'll go with fixed alliances and probably add some conditions to change them as I described. If this works badly I'll probably revert to just fixed alliances or consider your suggestion.

I strongly suggest not doing any extreme hacks like the ones you described. We already have maps that were tailored around the limits of the old AI, and now that AI is completely gone, and the maps are there broken. Rather, make some chance triggers to give some of the units the AI doesn't buy, removing the resources that would be needed to purchase them, before such a phase (basically, random purchasing for part of the money). You would need adding something to tell the triggers if the player is AI or not, for example like Feudal Japan does with its various triggers adding Ashigarus, et cetera, for AI powers, depending on having placed stuff on boxes, at start game.

I'll consider that among the options, not sure yet on how to handle this.

"Garrisons" (0/3/0), maximum of 4 per territory are a central part of the gameplay. But the AI won't buy them or I have to use "hacks" giving them 1 movement (triggered movement change during purchase, requiresUnitsToMove, or the best it seems, givesMoment -1 from factory type units). But if I use those hacks, the AI often buys more Garrisons than it can place.

Yeah, the AI currently doesn't support purchasing non-factory 0 movement units. This is something that I'll probably look to add soon as enough maps have them that its probably worth it.

I'm under the impression (could be wrong though), that the AI doesn't consider nevative isMarine when launching naval invasions and I have the majority of land units at isMarine -1 or -2.

Not sure on this one. Very few if any maps use negative isMarine so I can't remember if the AI handles that or not. I'll have to take a closer look.

If you want a sort of fixed with some triggers system, I would probably model it after something like Global 40. Where based on certain conditions, nations can/will declare war on each other but that generally there are fixed alliances just that maybe some of them don't start out as at war.

What I meant by that is that when a trigger to (potentially) change relationship is activated (say Player1 captured region X )
- If Player2 is AI it is given a set reaction (declare war on Player1) or a chance (say 1:6 to declare war - maybe increasing by further 1:6 each passing turn).
- If Player2 is Human, they are given a choice (User/Political Action I guess), to declare war if they want.

This should be possible though you may need to create a prompt like in Greyhawk Wars to set a flag whether each player is human or AI to then be used to determine which action or trigger is fired.

"Garrisons" (0/3/0), maximum of 4 per territory are a central part of the gameplay. But the AI won't buy them or I have to use "hacks" giving them 1 movement (triggered movement change during purchase, requiresUnitsToMove, or the best it seems, givesMoment -1 from factory type units). But if I use those hacks, the AI often buys more Garrisons than it can place.

Yeah, the AI currently doesn't support purchasing non-factory 0 movement units. This is something that I'll probably look to add soon as enough maps have them that its probably worth it.

I'm under the impression (could be wrong though), that the AI doesn't consider nevative isMarine when launching naval invasions and I have the majority of land units at isMarine -1 or -2.

Not sure on this one. Very few if any maps use negative isMarine so I can't remember if the AI handles that or not. I'll have to take a closer look.

That's great:) Do you have estimate on when the update could be?

If you want a sort of fixed with some triggers system, I would probably model it after something like Global 40. Where based on certain conditions, nations can/will declare war on each other but that generally there are fixed alliances just that maybe some of them don't start out as at war.

What I meant by that is that when a trigger to (potentially) change relationship is activated (say Player1 captured region X )
- If Player2 is AI it is given a set reaction (declare war on Player1) or a chance (say 1:6 to declare war - maybe increasing by further 1:6 each passing turn).
- If Player2 is Human, they are given a choice (User/Political Action I guess), to declare war if they want.

This should be possible though you may need to create a prompt like in Greyhawk Wars to set a flag whether each player is human or AI to then be used to determine which action or trigger is fired.

If one player is supposed to change from a fixed/starting alliance to another one, is that doable? I guess only by using relationshipInitialize instead? Can alliancesCanChainTogether help in some way?

Say Aetolia is allied to Rome (+Roman Allies). Seleucids invades a territory in Greece, triggering war with Rome (+Roman Allies). (How) can I have Aetolia switch sides to being at war with Rome (+Roman Allies) and allied to Seleucids (+Seleucid Allies)?

Edit2: Before making a map thread to showcase things and get better informed feedback I'd like to know if it's ok to use 2d art from other (commercial) games. I've seen a couple of downloadable maps do it, but just to be sure, should I avoid screenshots due to "my" (possibly placeholder) icons?

For images, its really up to each map maker on what they use. TripleA primarily just asks that you don't use any profanity or controversial images. There is no way for us to check all your images and where you get them from so its up to you on what you are comfortable using in regards to copyright and other laws. Outside of some A&A images/terminology a long time ago, I haven't seen any issues around this.

My issue is that I plan to have some players that will have fixed alliances (say "alliance leaders") for the whole game and others changing on conditions. If a changeable one gets to an alliance with a new "alliance leader", will alliancesCanChainTogether have them ally the alliance leader's allies and war their enemies, including past allies of the changeable player? Or do I have to include at least one past ally of the changeable as enemy? Or do I have to cover all possible combinations of player alliances in my triggers? I hope this time my description makes more sense.

For images, its really up to each map maker on what they use. TripleA primarily just asks that you don't use any profanity or controversial images. There is no way for us to check all your images and where you get them from so its up to you on what you are comfortable using in regards to copyright and other laws. Outside of some A&A images/terminology a long time ago, I haven't seen any issues around this.

I believe alliancesCanChainTogether looks at the current allies/enemies of the nation its relationship changed with (nothing that isn't current). So in your example, if your changed the relationship of Aetolia and Seleucids to Allied then Aetolia would become allied with all the Seleucid Allies and go to war with all its enemies (and vice versa).

I believe alliancesCanChainTogether looks at the current allies/enemies of the nation its relationship changed with (nothing that isn't current). So in your example, if your changed the relationship of Aetolia and Seleucids to Allied then Aetolia would become allied with all the Seleucid Allies and go to war with all its enemies (and vice versa).

Nice that's desired and potentially saves a lot of work, but now I'm trying to understand if it covers all my cases.

If Macedon was allied to both of them but declares war on the Seleucids, Aetolia will stay with the Seleucid alliance right? Desired

If Aetolia makes peace with Rome, will the Seleucids also do the same? Undesired

I'm a little puzzled on this, if anyone can come up with/inform me of more scenarios, applications and potential issues with alliancesCanChainTogether it would be great.

This seems perfectly reasonable to me, if I understand correctly that the territory is taken over upon exiting like it would be upon entering, but only as long as at least one of the involved units is able to blitz.

This seems perfectly reasonable to me, if I understand correctly that the territory is taken over upon exiting like it would be upon entering, but only as long as at least one of the involved units is able to blitz.

Seems to be the case, indeed there's a unit with blitz as well. But why is capture on exit intended?

@Name LoE: \L-o-E abbreviation (2020) Language of origin; Nerd. HOBBY, ACTION1Lack of Energy. To be in a perpetual state of lethargy. 2Limits of Espousal. The constraints placed on an individual based on the waning patience of a spouse.

@Name So glancing at the code this is how alliancesCanChainTogether works when a relationship is changed (in this order):

Leave Alliance: if I'm allied with a nation and a trigger changes that relationship to not allied then change all current allies to that new relationship

Alliances Make Peace: if I'm at war with a nation and a trigger changes that relationship to not at war then change all of my current allies to that new relationship with all of my former enemy's allies

Chain Allies: Make sure any allied nations are also allied with all of each other's allies

Chain Enemies: Make sure any allied nations are also at war with all of each other's enemies

If Macedon was allied to both of them (Seleucids & Aetolia?) but declares war on the Seleucids, Aetolia will stay with the Seleucid alliance right?So I believe this would meet the first condition as they are essentially leaving their alliance (declaring war or any non-allied relationship with a current ally) and cause Macedon to declare war on both Seleucids and Aetolia who will both stay allied to each other.

If Aetolia makes peace with Rome, will the Seleucids also do the same?I'm assuming this is indicating that both Aetolia and Seleucids are allied together and at war with Rome. If so then yes this meets condition 2 where Aetolia is essentially making peace for its entire alliance with Rome's entire alliance. If you didn't want the entire alliances to make peace then instead you would want to have Aetolia leave its alliance by declaring war or neutral relationship with Seleucids (become essentially its own alliance) and then make peace with Rome.

@Name So glancing at the code this is how alliancesCanChainTogether works when a relationship is changed (in this order):

Leave Alliance: if I'm allied with a nation and a trigger changes that relationship to not allied then change all current allies to that new relationship

Alliances Make Peace: if I'm at war with a nation and a trigger changes that relationship to not at war then change all of my current allies to that new relationship with all of my former enemy's allies

Chain Allies: Make sure any allied nations are also allied with all of each other's allies

Chain Enemies: Make sure any allied nations are also at war with all of each other's enemies

If Macedon was allied to both of them (Seleucids & Aetolia?) but declares war on the Seleucids, Aetolia will stay with the Seleucid alliance right?So I believe this would meet the first condition as they are essentially leaving their alliance (declaring war or any non-allied relationship with a current ally) and cause Macedon to declare war on both Seleucids and Aetolia who will both stay allied to each other.

If Aetolia makes peace with Rome, will the Seleucids also do the same?I'm assuming this is indicating that both Aetolia and Seleucids are allied together and at war with Rome. If so then yes this meets condition 2 where Aetolia is essentially making peace for its entire alliance with Rome's entire alliance. If you didn't want the entire alliances to make peace then instead you would want to have Aetolia leave its alliance by declaring war or neutral relationship with Seleucids (become essentially its own alliance) and then make peace with Rome.

Being as lazy as impacient I already started testing those and managed to figure some things out. I have both allies and enemies chained so could this explain differences on what you describe and what I found?

If I changed only one player's relationship, in the first example, Macedon would be forced back to alliance with the Seleucids, since the are both allied to Aetolia. So the way I'm doing it is make Macedon at war to both. Extra work and will need to be careful to include many conditions on similar following triggers, but I don't know how else to handle it.

So on the second example I guess I'd have to make Aetolia neutral (or war) every member of the Seleucid alliance on one trigger, and then on a second one have it peace Rome.

This seems perfectly reasonable to me, if I understand correctly that the territory is taken over upon exiting like it would be upon entering, but only as long as at least one of the involved units is able to blitz.

Seems to be the case, indeed there's a unit with blitz as well. But why is capture on exit intended?

I don't know, but it seems to me being clearly the most reasonable behaviour. Why do you think that blitzing a territory you are already inside should be harder than blitzing a nearby one, for example? Because I assume you realize that, if you would not be able to blitz it upon exiting, then you would need to do 2 moves (going out, then back into) to blitz a territory you are in, as opposite to only 1 move for blitzing a territory you are next to.

However, I believe that:

The territory should not bet conquered upon exiting if all the units making this move are unable to blitz.

The territory should not bet conquered upon exiting if in it there are any hostile units that, under the rules, would block blitz.

The territory should also be conquered in case the units stay in it, without moving during the Combat Move phase, then the units should be unable to move, during the subsequent Non Combat Move phase (no matter if able to blitz).

Are the above three behaviours exactly what you are experiencing or not. If not, what not, and I would say that is where the bug (or bugs) would be.

@Name Interesting. I can only tell you what I think its supposed to do without seeing your XML. If what you describe is happening then the first condition of leaving the alliance isn't really working properly. The only thing I can think of without seeing them is you want to make sure that the "attachTo" is set to the player that is taking the action (in your first example Macedon since they are leaving the alliance).

@Cernel Hard to say without seeing the example. Once you get to changing relationships and having troops in existing territories, things get a bit questionable. I would probably argue that whenever Macedon's troops came to be in Corinth and they met the other conditions for taking it over, it should switch immediately. But because the way the engine only triggers these during combat move related to those territories, this behavior is probably a result of that.

Or is isDefaultWarPosition the problem? I'm not sure I get what it means.If true, any players that reach an alliance chaining relationship, will have their enemies who are not yet at war with, set to this relationship.