Please help with capital problems

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Please help with capital problems

mjnagle

Hello,

I have created a map and XML file for two games based on Harry Turtledove's "Timeline 191" series of novels. In that alternate timeline, the CSA, with assistance from the UK and France, won its independence from the USA, and as a result, the USA and CSA fought on opposite sides in both World Wars. The WW1 game is set in 1914 and the WW2 game in 1941.

Both games are Theater Games, restricted to the American Theater. There are five players in the WW1 game, the USA, the CAS, the British, the French, and the Russians. The Americans are allied with the Central Powers and all the others are part of the Quadruple Entente. (The French and Russians play very minor roles in both games.)

However, I have a problem with capitals. When a capital falls, the player losing the capital loses all PUs and the ability to build units at any of his (or her) factories, until he or one of his allies retakes the capital. However, Washington and Richmond are practically next to each other. One or the other will inevitable fall in the first or second round of the game. From that point on, the player with the falling capital will lose, because, despite having nearly all his PU-producing territories and factories in his possession, he will not be able to build new units, while his opponent will be able to build all he needs to crush him. Basically, the game is over by the end of the second round, although mopping up might take three or four more rounds.

It is ridiculous to me that a powerful nation, like the United States, (or the CSA or the UK) should lose the ability to build any units, when more than 95% of its manufacturing capacity is intact, and in its possession. In fact, in the TL-191 novels, Washington fell to the Confederates in the first weeks of the Great War (WW1), and was occupied by the Confederates for three years, yet the USA still fought on and won the war in the end.

I have set the optional values in the player name tags in the XML file to "true", but if I designate capitals anyway, and a capital falls, the player still loses the ability to build. If I do not designate capitals, there is no problem in a human-only game, but any AI-controlled player will crash the program at the beginning of its first turn if no capital has been designated for it, even if the optional value for that player is "true". (I do sometimes need to use AI-controlled players. I am still in the alpha-testing stage.)

I have also tried creating "shadow capitals" in the middle of Greenland (a neutral) for each of the five players. This seems to work for both human-only and Human-AI games, but sometimes an AI player will bid-place units in its shadow capital. Then, the AI will invade and conquer Greenland (neutrals are not impassible, by design), or, even if I make all of the shadow capitals "impassible", invade and conquer a neighboring shadow capital. If I make sure that there are no territory connections to any of the shadow-capital territories and any AI player is used, the game crashes at startup. (Besides, I find shadow capitals an ugly work-around.)

Do you know of any other way for a player to lose his capital and not lose his ability to build?

Or, alternatively, is there a way to not have capitals without having AI players crash?

Thanks in advance,

Mike

By the way, I am using TripleA version 1.8.0.3.

Why search for artificial intelligence when there's such a crying need for the natural kind? — Michael J. Flynn

Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

Irinam
Hi!

Looking into the Wikipedia-Page of "Timeline 191", there is the following Passage:
Wikipedia wrote
"Hoping to emulate General Lee, the Confederate Army of Northern Virginia (ANV) launches a massive invasion of Maryland and Pennsylvania in August,
targeting the northern "de facto" capital of Philadelphia.
The ANV quickly overruns the "de jure" capital of Washington, D.C. and pushes on through Maryland."
Now, just make Philadelphia and Washington BOTH Capitals and one half of your problem is solved, as the CSA will have to get both citys to "win".
I think, the map "Great War" uses this for Russia, but i'm not sure.

For the other half of your problem... give the CSA enough units to be on the winning route at start.
In the books, the CSA occupies Washington and hold it for a long time, so why not in your game?


A complete other Way would be to change your Map:
Make more Territories between Washington.

And make sure to look at the map " Civil War: A House Divided" made by pullicat!
It features the amarican civil war and it solved your Problem with a very nice, special separated map.

Greets,
Irinam
Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

hepster
This post was updated on .
In reply to this post by mjnagle
mjnagle wrote
<p>However, I have a problem with capitals. When a capital falls, the player losing the capital loses all PUs and the ability to build units at any of his (or her) factories, until he or one of his allies retakes the capital. However, Washington and Richmond are practically next to each other. One or the other will inevitable fall in the first or second round of the game. From that point on, the player with the falling capital will lose, because, despite having nearly all his PU-producing territories and factories in his possession, he will not be able to build new units, while his opponent will be able to build all he needs to crush him. Basically, the game is over by the end of the second round, although mopping up might take three or four more rounds.</p>

<p>It is ridiculous to me that a powerful nation, like the United States, (or the CSA or the UK) should lose the ability to build any units, when more than 95% of its manufacturing capacity is intact, and in its possession. In fact, in the TL-191 novels, Washington fell to the Confederates in the first weeks of the Great War (WW1), and was occupied by the Confederates for three years, yet the USA still fought on and won the war in the end.</p>

<p>I have set the optional values in the player name tags in the XML file to "true", but if I designate capitals anyway, and a capital falls, the player still loses the ability to build. If I do not designate capitals, there is no problem in a human-only game, but any AI-controlled player will crash the program at the beginning of its first turn if no capital has been designated for it, even if the optional value for that player is "true". (I do sometimes need to use AI-controlled players. I am still in the alpha-testing stage.)</p>

<p>I have also tried creating "shadow capitals" in the middle of Greenland (a neutral) for each of the five players. This seems to work for both human-only and Human-AI games, but sometimes an AI player will bid-place units in its shadow capital. Then, the AI will invade and conquer Greenland (neutrals are not impassible, by design), or, even if I make all of the shadow capitals "impassible", invade and conquer a neighboring shadow capital. If I make sure that there are no territory connections to any of the shadow-capital territories and any AI player is used, the game crashes at startup. (Besides, I find shadow capitals an ugly work-around.)</p>

<p>Do you know of any other way for a player to lose his capital and not lose his ability to build?</p>
There is the ability to create multiple Capitals per nation.  Simply look at the XMLs for any of  POS, NWO, WAW or TWW.  This will allow you to have a nation loose its main capital but still retain its PU and ability to produce.  This should solve the problems you are having.  The key will be to find a method of balancing that ensures the secondary Capital cannot be eliminated easily within the early parts of the game.  Especially important if (by design) the main Capital is intended to fall almost immediately.
“A man can never have too much red wine, too many books, or too much ammunition”― Rudyard Kipling
Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

eurofabio
I also could use:

destroysPUs values: means that when this player loses their capital, their PUs are destroyed instead of captured (defaults to false = capture the PUs)


The option that Hepster talked about is:

retainCapitalNumber values: means that we do not lose our money if we still control at least this many of our capitals (defaults to 1). If a player has no playerAttachment, then it defaults to X, where X = total number of capitals (ie: you lose your money if a single capital is captured)
Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

mjnagle
This post was updated on .
In reply to this post by Irinam

Hi,

Now, just make Philadelphia and Washington BOTH Capitals and one half of your problem is solved, as the CSA will have to get both citys to "win".
I think, the map "Great War" uses this for Russia, but i'm not sure.

I tried that, but it only extended the game by one additional round. After all, Philadelphia is pretty close to Washington, as well.

And creating more territories between capitals isn't workable, either. My map covers all of North America, to include the British and French colonies in the Caribbean. Without breaking the map up into multiple parts or severely distorting the map it can't be done.

What I'm looking for is a solution that allows any player to fight until he (or she) can't fight any longer. I also want that player to be able to produce units until his last factory is captured.

Oh, well, I guess that using inaccessible shadow capitals may be the only solution.

Thanks anyway,

Mike

Why search for artificial intelligence when there's such a crying need for the natural kind? — Michael J. Flynn

Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

hepster
Then simply make every major territory for each player a Capital. (I don't think there is any limit to the number of Capitals a team has).  Then make sure that the settings in the XML are such that you only need to retain 1 Capital before loosing (or destroying) the teams PU.  In this way each side would need to loose the vast majority of its major territories before being completely out of the game.  Which, if we are being reasonable any given team would likely be done anyway.
“A man can never have too much red wine, too many books, or too much ammunition”― Rudyard Kipling
Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

mjnagle
Hello,

hepster wrote
Then simply make every major territory for each player a Capital. (I don't think there is any limit to the number of Capitals a team has).  Then make sure that the settings in the XML are such that you only need to retain 1 Capital before loosing (or destroying) the teams PU.  In this way each side would need to loose the vast majority of its major territories before being completely out of the game.  Which, if we are being reasonable any given team would likely be done anyway.
OK. that's pretty drastic, but it would work.

Thanks

Why search for artificial intelligence when there's such a crying need for the natural kind? — Michael J. Flynn

Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

Cernel
In reply to this post by mjnagle
Yo mjnagle.

There are 4 ways to create a power not requiring a capital, fighting at full effectiveness till the bitter end:

1) Set this: <player name="Player" optional="true"/>
        This is the oldest and most straightforward and most correct way to do it; sadly, it will make any AI crash, as now. Also, it is something that, as far as I know, no maps (not ever 1) do; so, you have a greater chances to encounter bugs, since you'll adventure in an unexplored field.

2) Putting one (or more) capital per player somewhere (it doesn't matter where, nor who owns it) and setting this:
                                <attatchment name="playerAttatchment" attatchTo="Player1" javaClass="games.strategy.triplea.attatchments.PlayerAttachment" type="player">
                                                <option name="retainCapitalNumber" value="0"/>
                                                <option name="retainCapitalProduceNumber" value="0"/>
                                </attatchment>
        This is kind of a stupid thing, since you put a capital and, then, you say that said capital is totally useless. Someone may ask you why did you even put a capital, then. And the only answer is: not to make the AI crash. It is, also, unfriendly with the AI, since the AI won't crash, but the AI will think that there are capitals (so, the useless capitals around will influence AI moves, making the AI even more stupid). One minor effect of such a thing, is that a power will be considered always alive, even if it has totally disappeared forever, meaning that you will have the history tab cluttered by info like that a totally annihilated power have collected 0 income this turn, and the like (this can be addressed by a set of triggers upping the previous 2 option names to value 1, once a player is gone, not to have useless info about it in history). Finally, the Territory tab will tell you that said territories are capitals, while this is just pointless, confusing people.
        Again, aside from my MEAD (a map I'm making), no maps I know of use this, recently coded, feature.

3) Creating a fake land or sea territory somewhere (a, so called, box), which is totally unreachable and useless (having production 0 etc.), assigning it to the player that you want behaving like it doesn't have nor need any capitals.
        This is a very invasive solution: by creating a box, you're acting outside the mere xml, modifying the core elements of the map. This is pretty popular amongst unconventional maps wanting to have no capitals; for example, ZombieLand, Total Ancient War and Feudal Japan Warlords work this way.
        It doesn't have any problems; just be on the lookout not to place bid on the box; you can totally avoid it by, for example, making sure the box is a sea zone with no sea units in it (sea zones can be capitals too, of course).

4) Assigning, as capital, a not conquerable territory (usually, it is an impassable territory; but it can be anything, as long as noone can actually conquer it; for example, you can assign a sea zone as the capital and, with a full set of <option name="whenCapturedByGoesTo" value="PlayerANY:Player1"/>, assure it will always remain in the hands of Player1)
        This is the usual way to do it in traditional maps, where players with no capitals are the exceptions to the rule. A typical example is China in WW2V3, having its capital in (impassable) Mongolia. Btw, you can declare any territories you want to impassable, you don't need to have all Neutral territories impassable. It can be made in various ways; the two most straightforward ones are with the <option name="isImpassible" value="true"/> option or with terrains.

Moreover, if, in the style of Civil War, a player is supposed to be able to place units only in its originally owned territories, a nice way to implement it is to just have all of its originally owned territories being capitals (of the same player originally owning them). This way, with the normal ownership rules, as long as you have at least 1 of your territories you had start game, you are fine (that very last territory being your actual capital). I advice against such a solution, though, to avoid info cluttering in territory tab. Also, having all originally owned territories being capitals may make the AI more stupid.
       
Just for your information, in my MEAD I've used both points 2 and 3 at the same time (so, each player has a box being its capital, and this capital is useless, anyway) and point 4 for some players (2) present only for game dynamics.

Cheers
History plays dice
Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

mjnagle
Hi,  Cernel:

Thank you for the information. It is exactly what I needed.

As I said in the post starting this thread, I had tried some of these methods.

Using method 1, the AI players crashed.

Using method 3 did work for human and AI players, but I didn't like changing the actual map to accommodate it. And AI players sometimes put bid-purchased units in the "boxes" (which I called "shadow capitals").

Of the four methods you listed, I think that number 2 might be the best for my purposes.

Still, method 4, using Sea Zones for capitals, might be better. It never occurred to me to use Sea Zones for capitals, although, now that I consider it, Sea Zones are territories, just as land territories are.

The Russians and the French each have only one factory, and those factories are in their capitals, (Alaska for the Russians and French Guiana for the French,) so they would be expected to lose all production with the loss of their capitals.

However, I wanted the USA, CSA and UK to be able to produce units to the bitter end. And, as it turns out, there are three isolated Sea Zones on the map, Lake Winnipeg, The Great Salt Lake, and Lake Nicaragua, that really are only there because they make my maps more accurate, geographically. They would do quite well for additional, unconquerable capitals for the UK, the USA and the CSA, respectively. (The Great Lakes are on my maps too, along with the St Lawrence River, but they are navigable, and have access to the Atlantic.)

Thanks again. You have given me more help than I ever expected.

Mike

Why search for artificial intelligence when there's such a crying need for the natural kind? — Michael J. Flynn

Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

Veqryn
Administrator
In reply to this post by Cernel
you probably want option 2
                                <attatchment name="playerAttatchment" attatchTo="Player1" javaClass="games.strategy.triplea.attatchments.PlayerAttachment" type="player">
                                                <option name="retainCapitalNumber" value="0"/>
                                                <option name="retainCapitalProduceNumber" value="0"/>
                                </attatchment>
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

RogerCooper
In reply to this post by mjnagle
In Timeline-191, the capture of Philadelphia results in a Confederate victory, so making Philadelphia a capital is reasonable.

In practical terms, taking Philadelphia would have impossible against competent opposition. The Confederacy lacked the logistical capability to sustain a campaign so far from it supply bases.

(From a tactical point of view, Washington and Philadelphia were potential traps as the Union could put ironclads into the rivers that trisect those cities, preventing the Confederates from crossing the river with men or supplies. The only way out of each city is north, not the best direction for the South to draw supplies from. )

TripleA does not support supply rules. You could achieve the effect by putting strong garrisons in the major cities of the North, except for those close to Confederate home areas.
Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

panguitch
In reply to this post by mjnagle
Pardon the necro, but I've been struggling with the same problem for a couple days. I'm working on a map where I want leader units to be the key to the game, as opposed to capitals (and yes, the AI doesn't know what to do with the leaders...).

This thread has been extremely helpful.  Thanks to all.

In case others also find it helpful in the future, I'll mention that I tried option 4, placing capitals in impassable territories. But this made the AI behave oddly. In some cases bizarrely passive. Since those players were essential, this is not an option for my map.

Since nations in my map do actually have capitals (I just didn't want the game to hinge on them) I ended up using option 2 (setting retainCapitalNumber and retainCapitalProduceNumber to zero). And placing the capitals in their normal territories. With the result that the AI behaves reasonably, placing priority on the capitals in a way that's culturally/historically justified (and works for the map), but without taking all PUs and giving them to the attacker or preventing a player from producing if he's lost his capital.

I think a similar approach would make sense for Timeline 191. The USA should place importance on Washington, but shouldn't be entirely crippled if the CSA takes it.

I also used national objectives to give a small but considerable one-time award for sacking a capital. Now I'm also considering placing multiple "morale" capitals like this, perhaps even beginning under enemy control, in an effort to guide AI priorities.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

Eschelon
Just a quick FYI, in relation to some suggestions made above.

I used the 'sea zone capital' method on one of my maps, although impassable would probably have worked as well.  I had a land only version of 270BC, where I used ten of the sea territories that I had 'deleted' as capitals, with only a single land link to each of them.  I also was using Victory Points for victory calculations.  Each capital was worth 1 VP, each empire had 2 land capitals plus the 'sea capital'.

Each empire had the following attachment:
       <attatchment name="playerAttatchment" attatchTo="Macedonia" javaClass="games.strategy.triplea.attatchments.PlayerAttachment" type="player">
                  <option name="retainCapitalNumber" value="1"/>
                  <option name="retainCapitalProduceNumber" value="1"/> 
        </attatchment>

Since the ten sea zone 'capitals' weren't 'attackable', each empire always retained at least one capital, even if both land capitals were overrun.  This of course did two things - the treasuries weren't sackable, and the AI could continue to build factories in other currently owned territories should both land capitals fall.

FYI, I linked each of these 10 sea zone capitals to one of the land capitals for the player in question (the 10 sea zones were in an unused corner of the map, and the link might reach across the entire map in some cases.  They did NOT link to any other territories, just one of the capital territories).  I think I did this to resolve some AI issue, if I remember right I wanted to 'add weight' one of the land capitals over the other one, so that the AI would prioritize that capital in it's strategy calculations, but it's been a while so I'm not sure.  Also, it likely wouldn't work if you have naval units (the conqueror could build a sea unit to occupy your orphaned sea zone).  I'd suggest looking at more recently updated maps to see what they are doing these days.

A variation of this has already been suggested; i.e. create a few 'land' territories in a map corner or some such, which are non-buildable/impassable and not linked to any other territories.  My info is a bit out of date though.  I haven't updated my maps since 1.5...

If you wanted to put 'decorative' territories on your map, i.e. a 'simple square territory' with each empire's logo in it or something, for those hidden capitals, and say line those up along a map edge, say near the map logo you came up with, that's one way to keep the 'hidden capitals' from otherwise cluttering up the map.
Reply | Threaded
Open this post in threaded view
|

Re: Please help with capital problems

Cernel
That's what I've made in my MEAD.



p.s.: Back then you couldn't put those values at 0. Now you would not need the sea capital at all (0 is now supported).
History plays dice