aliens

Author Topic: Auto-Battle  (Read 341 times)

Offline OmniscientQ

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Auto-Battle
« on: May 31, 2020, 05:06:23 am »
X-COM Auto-Battle

One of the few features of the old xcomutil by Scott Jones yet to be implemented in OpenXcom is the auto-battle feature. For those who don’t remember, it was an option that would allow the player to automate tactical combat.

It didn’t hand control of your troops off to the AI to finish the battle. Instead, it reduced the participants on both sides to a couple of abstracted numbers, and then rolled some dice. If I’m recalling correctly, it made some sweeping assumptions. Ammunition wasn’t actually consumed. Fire rates didn’t matter. You had a basic 5% chance to capture rather than kill. Night missions applied a huge penalty that was partially offset for any soldier carrying a flare. Psionics basically amounted to an “I win” button. The xcomutil feature could also be invoked mid-battle. Once you had cleared the bulk of the alien forces, tipped the score in your favor, you could leave the clean-up to the grunts.

Some people might be tempted to say that an auto-battle function is cheating, or it defeats the whole point of the game, but I have a few reasons for thinking that OpenXcom would benefit from having one. In no particular order:

1 – One of the self-imposed challenges proposed in the xcomutil readme, and one I enjoyed, was to run auto-battle on every mission, and never assume direct control (Insert Mass Effect meme here). Being unsure of whether you’ll get the live Navigator or Deep One in your first month means having to change things up, and poses some new challenges.

2 – Sometimes, you just can’t stomach the thought of going through the motions to retrieve a medium scout full of Floaters, or to track down the last alien who's hiding in a closet. Even when you don’t have the flying power armor and psionic amplifiers to make such a mission risk-free, it’s just a chore to go after another wreck. Then there are the wonderful mods that border on being total-conversions, like X-Piratez and X-COM Files, where a single campaign *will* last for several years. Two years into a Piratez game, I feel guilty about letting Warehouse Wars missions despawn, but they feel like a chore just like the hypothetical medium scout full of floaters.

3 – The Android port of OpenXcom is wonderfully done, but a touchscreen is sometimes a pain in the ass. For some reason, it feels forgivable to me when I’m doing anything on the strategic level, but the tactical side leaves me frustrated at the lack of a mouse. If I could automate combat while on my tablet, I would.

If an auto-battle feature were to be created for OpenXcom, how would you want it to work? Would you want something fairly vague like the xcomutil version, or would you want the game to track every single movement and shot? A more abstract system might make it easier to work with mods in the mix, though the results might not reflect how difficult the mission would have been if it were played out manually. Would you want a status screen that shows the relative strengths of each side as the battle progresses, perhaps with simple buttons to influence it (something along the lines of Cautious, Standard, Aggressive, Retreat), or should it jump straight to the battle summary? Should it be made interruptible, so that the player can step back in if something goes horribly wrong (Much harder to implement. Where do you place all the units?)

I realize this falls outside the scope of OpenXcom, or even OXCE. The OXC mission statement was to faithfully recreate X-COM without the bugs and limitations imposed by hardware of the time. Adding an auto-battle feature means designing an entirely new system for which there's no canonical reference, so I want to get some input and feedback, and maybe even some semblance of consensus on what it should look like.

Offline vadracas

  • Colonel
  • ****
  • Posts: 279
  • Just another player/modder combo.
    • View Profile
Re: Auto-Battle
« Reply #1 on: May 31, 2020, 08:12:20 pm »
If an auto-battle feature were to be created for OpenXcom, how would you want it to work? Would you want something fairly vague like the xcomutil version, or would you want the game to track every single movement and shot? A more abstract system might make it easier to work with mods in the mix, though the results might not reflect how difficult the mission would have been if it were played out manually. Would you want a status screen that shows the relative strengths of each side as the battle progresses, perhaps with simple buttons to influence it (something along the lines of Cautious, Standard, Aggressive, Retreat), or should it jump straight to the battle summary? Should it be made interruptible, so that the player can step back in if something goes horribly wrong (Much harder to implement. Where do you place all the units?)



Actually, if the same AI that the enemies use could just be substituted in as the player, the difficulty of implementation would be similar(but in a different area) to balancing out an abstract points system.

Offline OmniscientQ

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: Auto-Battle
« Reply #2 on: May 31, 2020, 11:24:45 pm »

Actually, if the same AI that the enemies use could just be substituted in as the player, the difficulty of implementation would be similar(but in a different area) to balancing out an abstract points system.

One of my biggest concerns was how to get an auto-battle feature to incorporate mods, and do justice to the intended balance of the mods. That's one of the best arguments I can find in favor of turning the X-COM units over to the same AI that runs the aliens, and just let it play out. Then the auto-battle would be running by exactly the same rules that the mod author already balanced towards. The AI would be dumb as hell, but that'd just be the trade-off the player accepts by using it. Would you want to be able to watch the battle play out? It'd be useful, if the player were allowed to interrupt and take control back. On the other hand, if you just want the battle to be done, being forced to watch half a dozen turns of "Hidden Movement" flash across your screen could get annoying fast. I do think I'd personally prefer that the game get to the battle summary as fast as possible once I hit the button.

I think I recall a post by Meridian stating that turning X-COM units over to the AI wasn't possible, but a quick forum search didn't find it. It may be the case that this isn't possible.

Offline vadracas

  • Colonel
  • ****
  • Posts: 279
  • Just another player/modder combo.
    • View Profile
Re: Auto-Battle
« Reply #3 on: June 01, 2020, 01:10:41 am »
Currently, you can't turn them over to the AI, all of these suggestions require changes to source code. By the way, no matter what you would see the long-hidden movement times if you turn the player over to the AI do to most of that being the AI figuring out LOS and what to do. The ability to interrupt would probably be pretty doable by using the right-click functionality that can already interrupt movement, but that's all that you would be able to interrupt.

The abstraction is a completely different matter.



By the way, I am certainly not asking ANYONE to do this unless they are very interested as this would be a challenging task.

Offline NashGold

  • Captain
  • ***
  • Posts: 99
    • View Profile
Re: Auto-Battle
« Reply #4 on: July 06, 2020, 08:01:00 pm »
It didn’t hand control of your troops off to the AI to finish the battle. Instead, it reduced the participants on both sides to a couple of abstracted numbers, and then rolled some dice.
Given that aliens always have numerical and firepower superiority, that wont ever work in a fair playground. So yeah, it has to make assumptions. Moreover, players always has a chance to retreat, taking away some stuff. For me it was always Chryssalid present = instant retreat.

Some people might be tempted to say that an auto-battle function is cheating, or it defeats the whole point of the game, but I have a few reasons for thinking that OpenXcom would benefit from having one. In no particular order:
Yeah. It makes a totally different game, similar to Civilization, or more precisely to Emperor of the Fading Suns, which had stack autocombat, with different type units getting different initiative (i.e. artilery goes before tanks).

The whole point of XCOM is tactical combat, while the strategic world map is here just to glue the tactical missions into a coherent story.

In my XCOM inspired game I do have autocombat, but it is used only for AI vs AI battles, since properly simulating battle scape would take some time and annoy human players.