OpenXcom Forum

OpenXcom => Suggestions => Topic started by: Nightwolf on June 17, 2014, 01:14:08 pm

Title: Auto-calc battles?
Post by: Nightwolf on June 17, 2014, 01:14:08 pm
Not quite sure if there is an option to that, or just can be suggested. Is there any way to do some auto-quick-battle. So you dont need to mess with battles? Sometimes im not in a mood to battle, so a quick battle might be very useful.
Title: Re: Quick Battle?
Post by: Falko on June 17, 2014, 01:37:28 pm
get flying suits
and throw this around
Code: [Select]
items:
  - type: STR_HIGH_EXPLOSIVE
    power: 1500
    blastRadius: 500
destroys everything in a map throwing 1-2 per level neatly levels everything (if you increase the explosion height game option is could be difficult to find a save place)
Title: Re: Quick Battle?
Post by: Nightwolf on June 17, 2014, 01:42:10 pm
Thanks, but its not like im asking for. Just a fast battle simulation :)
Title: Re: Quick Battle?
Post by: Jstank on June 17, 2014, 02:20:48 pm
Have you tried the New Battle Option on the first screen. It is quite enjoyable for a quick xcom fix.
Title: Re: Quick Battle?
Post by: Warboy1982 on June 17, 2014, 02:37:02 pm
he means auto-resolving battles, and yes, it IS possible. but HOW should it be done? just give XCom soldiers AI and let the computer have at it? :P
Title: Re: Quick Battle?
Post by: Nightwolf on June 17, 2014, 03:35:58 pm
Yeah, something like Heroes Of Might and Magic. You had an option to skip battles with: Quick Battles (no auto-battle where IA controls your unit but also could be great too)
Title: Re: Quick Battle?
Post by: Shoes on June 17, 2014, 03:54:02 pm
he means auto-resolving battles, and yes, it IS possible. but HOW should it be done? just give XCom soldiers AI and let the computer have at it? :P

Option 1 : Assign values to items (perhaps simply cost), give soldier/ranks values, give alien/race/rank values and throw in some modifiers in case numbers still don't line up. Display a "12% to win 0 casualties, 100% to win with at least 5 casualties" that can be decided with some sort of distribution or some other math.

Option 2 : like Xenonauts, allow to airstrike the area to get money but no loot/experience. Might be the easiest way to do this ;p add a button to the UI, a money value in the rulesets to UFOs, clicking erases the UFO and adds money to the bank.
Title: Re: Quick Battle?
Post by: Nightwolf on June 17, 2014, 04:19:48 pm
Yeah, something like Heroes Of Might and Magic. You had an option to skip battles with: Quick Battles (no auto-battle where IA controls your unit but also could be great too)

An easy way to simulate the combat: How many enemies and their level equipment, vs how many Xcoms and their equipment and stats. Then a random number to know who will fire first and if will die his objetive. Do after either aliens or xcom wins.

Dunno if you can do the battle controlling the xcom, but on background, in a faster way...

So, could be great if you work where you can give Xcom an IA control, and let the player to control Alien. So at the end, you can give a Player Vs Player in same machine!!

Also, i like what Shoes said. Just Nuke the ufo!!! :D But for that you need to develop some kind of Nuclear Weapon... (why to use an interceptor if you can hit them hard XD)
Title: Re: Auto-calc battles?
Post by: pmprog on June 17, 2014, 06:03:43 pm
If you implement it in Battlescape you could watch the AI fight each other... Following on, you could implement a Geoscape AI and turn the whole game into a movie
 :)
Title: Re: Auto-calc battles?
Post by: Nightwolf on June 17, 2014, 06:30:25 pm
If you implement it in Battlescape you could watch the AI fight each other... Following on, you could implement a Geoscape AI and turn the whole game into a movie
 :)

Yeah, and play if you prefer just battles, or only Geoscape :-)
Title: Re: Auto-calc battles?
Post by: Solarius Scorch on June 17, 2014, 07:05:31 pm
Option 2 : like Xenonauts, allow to airstrike the area to get money but no loot/experience. Might be the easiest way to do this ;p

No, in Xenonauts it actually costs $20,000 to bomb the UFO. (Unless they changed it recently; I stopped playing Xenonauts when I discovered OpenXCom). The only gain you get is the points (in OpenXCom, if you shoot down the UFO but don't do the mission, you only get half the points, or something like that.)

And I would actually like to have this option. BTW a nuke would be a total overkill. ;)
Title: Re: Auto-calc battles?
Post by: Shoes on June 17, 2014, 08:14:10 pm
No, in Xenonauts it actually costs $20,000 to bomb the UFO. (Unless they changed it recently; I stopped playing Xenonauts when I discovered OpenXCom). The only gain you get is the points (in OpenXCom, if you shoot down the UFO but don't do the mission, you only get half the points, or something like that.)

And I would actually like to have this option. BTW a nuke would be a total overkill. ;)

It's been changed. I think small scouts are 10k, scouts are 15k, medium 25k or something. It's roughly half of the money you would make if you actually fought the fight.
Title: Re: Auto-calc battles?
Post by: Solarius Scorch on June 17, 2014, 08:21:16 pm
It's been changed. I think small scouts are 10k, scouts are 15k, medium 25k or something. It's roughly half of the money you would make if you actually fought the fight.

Ah, fair enough.

Back to the OP, I don't really think we need such a feature. Sure, I'd also be tempted to use it, but since ground combat is the main feature of the game, this option carries the risk of making OpenXCom unbalanced in terms of entertainment value.
Title: Re: Auto-calc battles?
Post by: MKSheppard on June 18, 2014, 08:18:32 am
I'd actually use autocombat a decent amount.

This was a major feature of XCOMUTIL later on, allowing automatic combat resolution.

There are times when you just don't feel like doing "one more" battle, particularly if it's a milk run where you know you'll triumph over the aliens (cleaning up a small scout with flying armor, etc); so autocombat could be good for bulking up the stats of your fresh rookie class to replenish your veteran ranks without having to fight 25 more battles again.
Title: Re: Auto-calc battles?
Post by: niculinux on June 18, 2014, 10:33:29 am
Jagegd Allince 2 (of which I'm an eager fan laso) impemented such feature, but I'm unsure on havin it in openxcom...since these ended 90% times in a playes slaughter  :o
Title: Re: Auto-calc battles?
Post by: Jstank on June 18, 2014, 02:33:59 pm
Although auto ground combat would be undesirable, how about auto interception?
Title: Re: Auto-calc battles?
Post by: kkmic on June 18, 2014, 05:01:43 pm
Where would be the fun in all that "auto" thing?
Title: Re: Auto-calc battles?
Post by: Nightwolf on June 18, 2014, 07:14:54 pm
Where is the fun after too many long combat? At the very first is not needed, but after that, i always want that feature. Its like Heroes Of Might and Magic. The very first battles are very important and you play them, then, only the ones are really important, the lesser ones you can use the auto-battle. And after all, I think is not very hard to think that some one can enjoy more Geoscape part of the game.
Title: Re: Auto-calc battles?
Post by: Jstank on June 22, 2014, 04:26:39 am
With the auto interception thing, I'm thinking only after you gain some advanced command center that costs a whole mess load of money and elierium. And all it does is auto scramble your jets to intercept UFO's. Just so you can get through to the end game a little quicker because intercepting 5000 UFO's which appear every 2 secs can be quite tedious. However intercepting a few UFO's every so often is very enjoyable. Maybe decrease the number of garbage UFO's that aliens send you. For instance I'm in month say... 7 very far in the game with plasma blasters on avengers and interceptors. Why couldn't I set my interceptors to auto scramble against 3mall and very small UFO's only. That way I'm not bothered with these ones and can concentrate my playing on things that matter like shooting down incoming battle ships and intercepting supply ships. or maybe even find some way to run the interception process and still be able to do other things while that one is playing out.
And to clarify I hate streamlining. So if there was some way where you could be intercepting that is faster but retains the same level of micromanagement I'm all ears.
Title: Re: Auto-calc battles?
Post by: Recruit69 on June 22, 2014, 10:48:03 am
Maybe auto calc battle feature would be useful in battles where you killed all but one last pesky alien hiding somewhere that you spent forever trying to hunt it down....?
Title: Re: Auto-calc battles?
Post by: Solarius Scorch on June 22, 2014, 04:27:00 pm
Why couldn't I set my interceptors to auto scramble against 3mall and very small UFO's only.

Now that's an idea I like. Of course, as long as it's properly configurable, so you can designate which types of fighters react to which types (or sizes) of UFOs.
Title: Re: Auto-calc battles?
Post by: yrizoud on June 22, 2014, 05:52:47 pm
All interceptions can be solved in 10 seconds. Auto-calc battles is relevent because even a trivial battle needs 5-20 minutes. (Though XComutil and OpenXcom help a lot using re-equipment)
Title: Re: Auto-calc battles?
Post by: MKSheppard on June 22, 2014, 07:37:25 pm
I wonder how long it would take the AI to fight out against another AI player if it was done at computer speed; with no pauses for the player?

I think part of the problem is that people are used to autocombat being just literally that -- auto combat.

But what if autocombat was slightly more detailed than just "see odds, click proceed yes/no" then get results?

Just spitballing ideas out here; but try approaching it from the point of view of a XCOM commander overseeing a routine mission from XCOMHQ:

When you've decided to do an AutoCombat Mission: you get shown a AutoCombat Mission screen; giving you three main choices (you could set preferences for each choice):

1.) What type of mission are we going to do here? Is it a standard search and clear mission with 100% alien fatalities expected, or do we need to capture an alien?

2.) Rules of engagement: Do we go for high explosive spray and pray; or precision rifle fire? Do you push for extremely aggressive movements or do you go for a methodical search and clear movement with lots of overwatch?

3.) Acceptable loss rate: How far does XCOM Push before a decision to initiate a tactical withdrawal to the transport is made?

You hit GO; and the mission starts and plays to first contact -- then you get a popup saying: "SIR, the team in the field is reporting that CRYSSALIDS have been encountered. Continue Mission or ABORT."

If you tell them to abort; they do a fighting retreat back to the transport.

This gets around the issue of an autocombat team made up of rookies and equipped with moderate gear suddenly finding themselves against Ethereals and getting killed dead because they continued to blindly push forward; when if you were playing normally; you would abort the mission the moment you noticed you were going up against aliens way out of your team's weight class.
Title: Re: Auto-calc battles?
Post by: yrizoud on June 22, 2014, 09:32:42 pm
For reference, here's XComutil's take on Autocombat: (from XComutil.txt)
Automatic Combat Resolution (AutoCombat):

Automatic combat resolution is provided to eliminate the tedium of battles that you think are just too easy.  It also allows you to play a new kind of game, AutoXcom, where you never actually fight any battles, but play every battle using AutoCombat.

Using AutoCombat, XcomUtil will update the files with an approximation of the results, rather than requiring you to actually fight the battle.  To reduce the complexity of the algorithm, I have imposed a few simplifications.  Hand-to-hand weapons, grenades, and extra clips are ignored.  Whenever you capture Elerium-115 or Zrbite, you automatically capture a power source.  Whenever you capture a ship, you capture some alien alloys and navigation, based on the size of the ship.  All other items that are part of the map, such as alien entertainment, are ignored.  However, you do capture any equipment carried by the aliens if you win.  If you find this to be too restrictive, don't activate AutoCombat until after you have done what you wanted to do or simply play the entire battle yourself.

To activate AutoCombat at any time during combat, just save your game as game number 10 with the name AutoCombat, then immediately abort combat.  You can optionally add a number which will be used as a probability threshold for aborting AutoCombat, which defaults to 25%.  For example, AutoCombat75 will indicate that you want to activate AutoCombat, but only if you have at least a 75% chance of success, as determined by the AutoCombat algorithm defined in XCOMUTIL.CFG.  XcomUtil will verify that the name of the saved game in the GAME_10 directory starts with AutoCombat and that the game date and time match.  AutoCombat can only be activated after saving the game, because that is the only way that all of the information about the battle is available for use by XcomUtil.

Saving the game also allows you to reload the battle and fight it yourself, if you don't like the results you got from AutoCombat.  If you reload the game and immediately abort combat again, you will get exactly the same results.  To really abort, just save the game again as GAME_10, but use a name that does not start with AutoCombat.

The rules on wounding and killing soldiers are designed to allow you to protect your most valuable soldiers.  However, they are also designed to make it very difficult to win complicated battles without using a large number of well equipped, experienced troops.  Don't expect rookies with pistols to come home.  It is possible to gain combat experience from AutoCombat, but it will be distributed randomly.

AutoCombat Algorithm:

The basic success percentage for each soldier with a loaded weapon is 5% for each rank above rookie or seaman.  Thus, each soldier contributes from 0% to 25% to your total chance of success in combat.

High reactions and firing accuracy add even more when the damage of your weapons is greater than the average health of the aliens.  Similarly, soldiers with Psi/MC skill greater than the Psi/MC Strength of the aliens add to your chance of success.  Aliens and other factors, like darkness, reduce your chances of success.  To reduce the penalty for darkness, soldiers who carry flares in darkness get a bonus.

All of these factors and the amount they effect your chances of success are specified using StatStrings in the AutoCombat section of XCOMUTIL.CFG.  The default abort threshold is also defined there.

If the final success percentage is less than the abort threshold, there will be no combat.  If the percentage is 100 or greater you win.  Otherwise, your success is randomly determined.

If you lose, the number of aliens killed is based on the amount by which you missed your success percentage.  If you win, all aliens are killed or stunned.  The soldier credited with the kill is selected randomly.  If that soldier is using a small launcher loaded with a stun bomb, the alien is always stunned.  Otherwise, the chances are only 1 in 32 that the alien will be stunned.  You earn 20 points for each alien you kill and 10 points or each corpse you recover.  All alien ammo clips are captured as full clips.  Human ammo clips are emptied according to how much they are used, just as in normal combat.

The algorithm to determine who gets wounded is as follows.  Each alien can wound one human.  The probability of each alien actually hitting a human is the difference between the total success percentage and the success roll, a number between 1 and 100.  If the difference is more than 90, the maximum chance that the alien misses the soldier is 90%.  If the difference is more than 200, the maximum chance is 95%.  Thus, the more overwhelming your force, the fewer soldiers will be killed or wounded.

The probability that any given soldier will be wounded is based on the order defined by the SortStats in XCOMUTIL.CFG.  The last soldier in the craft, has one chance of being selected.  The next to the last soldier has 2 chances, the one before that has 3 chances, and so on.  The Nth soldier from the back, the first one off the craft, has N chances to be selected.  That is, if you have 4 soldiers in the craft, their chances of being the one wounded are 10%, 20%, 30%, and 40%, respectively.  The last soldier on a full Skyranger has less than a 1% chance of being selected.

By default, soldiers with high Psi/MC skill or very high firing accuracy are moved to the back of the craft to protect them.  Thus, it is highly unlikely that they will be wounded if there are many soldiers in the battle.  However, any soldier can be killed, regardless of where he or she is placed in the craft.

Tanks are always considered to be the first units into combat and the first units wounded or killed.  Each tank receives the wounds that would have gone to the four soldiers it replaces, but tank armor greatly reduces the amount of damage taken.  Compared to soldiers, tanks do not significantly improve the chances of success.  However, if they are not destroyed in combat, they are immediately repaired when you return to your base.

The damage inflicted by each wound is the average weapon damage of the aliens.  The damage reduces armor first.  When it is gone, it reduces health, until the human is dead.  If a dead human is selected for wounding, another is selected in its place.  If a live human has not been found after three tries, the potential wound is ignored.

During AutoCombat, the XCOMUTIL.LOG file records a summary of the battle, along with all Hits (armor damaged, but no wounds), Wounds, and Kills.  It also reports Healed when a Medi-Kit is successfully used after a soldier is wounded.  The victory points lost because a soldier is killed in combat is 20 plus 10 for each rank above rookie/seaman.
Title: Re: Auto-calc battles?
Post by: Stephanov on April 26, 2021, 06:50:34 pm
I'm terribly sorry for the necro, but how does one activate the feature, seeing as openXcom has a totally different save system, where there is no game_10 save?
Title: Re: Auto-calc battles?
Post by: Meridian on April 26, 2021, 07:52:23 pm
There is no auto-calc battles feature in OpenXcom.