Author Topic: Auto finish mission  (Read 11108 times)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Auto finish mission
« Reply #15 on: December 22, 2018, 04:23:43 pm »
Another argument for Auto-combat: in every game there always some thing that is boring to at list one person in the world.
Imaging, that you here and now just don`t  like this mission: you don`t like this race, you`ve already seen this ship may times, you killed all the powersources, you just are thinking now about your research...whatever, that can be called 'NOT NOW!' But still you don`t want to lose rank for assault of UFO, you want to get some minimum loot, but you want it to finish as quick as possible. Why not to skip it and not to go to things that you like to do more now?

So, what's wrong with using Ctrl+K ?
It's basically an auto-combat with zero losses on your side.

If you want something else, you must describe it in detail... if you just say "auto combat", I don't know what to do... there are thousands of different auto-combat possibilities.

You made auto-sell function, didn`t you? Because you believed that there is someone who thinks that selling stuff by hands is boring. You can do the same with missions.

No, I didn't.
It was done by someone else... I don't like it and I don't use it.

Offline DiamondJack

  • Sergeant
  • **
  • Posts: 20
    • View Profile
Re: Auto finish mission
« Reply #16 on: December 23, 2018, 09:26:11 am »
Ctrl + K kills feeling of playing game. What I want is sort of more gentle and complicated.

I`ve tried to describe what it should be as exact as i can:

AutoCombat
(can be activated any time during mission, disabled on Base Assaults):

1. Our Soldiers kill Aliens as many as they can.
2. Aliens kill our Soldiers as many as they can.
3. Aliens kill Civillians as many as they can (on Terror Missions).

4. Mission Score (Victory or Defeat) - as usual.

5. If Victory - we gain loot:
5.1. Alien Weapons,
5.2. Alien Corpses,
5.3. Alien Alloys, UFO Navigations (depends of UFO type),
5.4. Elerium, UFO Power Sources (depends of UFO type minus destroyed by Interceptors).
Alien Entertainment and other furniture - ignored.

Optional (XComUtil have it, but I think it's too easy):
6. Soldiers who killed some aliens, grow their stats and ranks.


Who wins?

Ability to kill (both, Soldiers and Aliens) depends on:
1. Rank,
2. Damage Value of loaded Weapon (Ammo for launchers) in right hand (Modders can make new weapons with new values),
3. Bravery,
4. Accuracy,
5. Reaction,
6. Ability to fly.

Ability not to be killed/wounded depends on:
1. Rank,
2. Side Defence (not Frontal) of equipped Armor (Modders can make new armors with new values),
3. Reaction,
4. Time Units.

Also the contribution to  victory make:
1. Psionic Skills (Soldiers must have Psi-Amps),
2. Darkness (neutralised by Flares),
3. Chryssalids on Terror missions counts for two.

NO contribution to  victory make:
1. Alien Race:
Etherials already have this bonus as psionics, Mutons already have this bonus as armored soldiers etc. New races, introduced by modders, can have any unpredictable abilities, all of which can be counted in tactical parameter terms.


Here is quote from original XComUtil.txt and XComUtil.cfg
Spoiler:
------------------------------------------------------------------------------
Automatic Combat Resolution (AutoCombat):

Beginning with XcomUtil 9.0, you can also invoke the AutoCombat feature by
saving your combat as the 10th saved game with the name AutoCombat.  This
tells XcomUtil to fight the battle for you and can be used to save you the
tedium of fighting battles that are just too easy or as a way to play an
entirely combatless game.  See the AutoCombat section for more details.

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.

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.

------------------------------------------------------------------------------
XcomUtil.cfg (AutoCombat Section)
------------------------------------------------------------------------------
AutoCombat
AbortThreshold=25
StatStrings

+50  u:3-3                      // Tanks

+5   u:-2 R:1-1 W:-             // Armed Squaddie/Able Seaman
+10  u:-2 R:2-2 W:-             // Armed Sergeant/Ensign
+15  u:-2 R:3-3 W:-             // Armed Captain/Lieutentant
+20  u:-2 R:4-4 W:-             // Armed Colonel/Commander
+25  u:-2 R:5-5 W:-             // Armed Commander/Captain

+5   u:-2 A:1-                  // Effective Armor
+5   u:-2 W:2-                  // Effective Auto Weapon
+10  u:-2 W:3-                  // Effective Snap/Aimed Weapon

+100 u:-2 W:-25                 // Effective Psi w/PsiAmp
+5   u:-2 r:60-                 // Human w/Reactions 60+
+5   u:-2 r:50- W:3-            // Human w/Effective Snap/Aimed Weapon and Reactions 50+
+10  u:-2 f:60- W:3-            // Human w/Effective Snap/Aimed Weapon and Accuracy 60+

+10  L:-9 u:-2 W:-27            // Human in Darkness w/Flare
-20  L:-9 u:4-14                // Alien in Darkness

-50  u:11-11 U:-                // Chryssalid/Tentaculat
-50  u:17-17 U:-                // Zombie

-50  u:4-14 W:-25               // Effective Psi

-5   u:4-14 A:1-                // Effective Armor
-5   u:4-14 W:2-                // Effective Auto Weapon
-15  u:4-14 W:3-                // Effective Snap/Aimed Weapon

-10  u:4-14 r:60-               // Alien w/Reactions 60+

/StatStrings
/AutoCombat
------------------------------------------------------------------------------

AutoCombat in XCOMUTIL.CFG:

XCOMUTIL.CFG contains the StatStrings which define the AutoCombat algorithm.
Instead of defining StatIds or movement directions, the strings define the
probability modifiers associated with the conditions of the battlefield and
the combatants.  To support this, new statids have been added:

        A = armor superiority ( 0 = ineffective, 1 = greater than avg damage)
        T = Terror from the Deep (0 = XCOM, 1 = TFTD)
        u = unit type:  XCOM                    TFTD

                 0    = Human                   Human
                 1    = Human/Personal Armor    Human/Aqua Armor
                 2    = Human/Power Armor       Human/Ion Armor
                 3    = Tank                    Tank
                 4    = Sectoid                 Aquatoid
                 5    = Snakeman                Gill_Man
                 6    = Ethereal                Lobster_Man
                 7    = Muton                   Tasoth
                 8    = Floater                 Calcinite
                 9    = Celatid                 Deep_One
                10    = Silacoid                Bio_Drone
                11    = Chryssalid              Tentaculat
                12    = Reaper                  Triscene
                13    = Sectopod                Hallucinoid
                14    = Cyberdisc               Xarquid
                15    = Civilian1               Civilian1
                16    = Civilian2               Civilian2
                17    = Zombie                  Zombie

        U = remove unit from further consideration, if StatString is true
        W = weapon superiority and type
                lower = when weapon damage exceeds average enemy health
                      0/none = ignore, 1 = never, 2 = auto, 3 = snap/aimed,
                      255    = no item of that type is present
                upper = weapon type
                      n = index in OBDATA.DAT, 255/none = most powerful

The W statid is very complicated.  It is used to evaluate the
effectiveness of your weapons against the enemy.  The upper value
determines the specific kind of weapon, if necessary, while the lower
value can be used to judge the effectiveness against your average
opponent.  Although these values are not handled in the usual fashion as
ranges, use of this format allowed me to conveniently parse this with the
other statids.

W:2- indicates that the most powerful weapon can inflict damage exceeding
the average enemy health only when using a burst of three shots on auto.
W:3- indicates that it can exceed the average enemy health with just a
single shot.  W:1- indicates that all normal weapons are virtually useless
against the enemy.  W:-40 indicates that the soldier has a blaster
launcher, ignoring the average alien health.  W:- merely indicates the
presence of some aimed weapon, without regard to its effectiveness.
W:255- indicates that the unit has no aimed weapon.

If the weapon type is unspecified, only aimed weapons will be considered.
W:-25 is handled uniquely and indicates that the soldier has a PsiAmp and
has Psi Skill vs Psi Strength superiority.  The lower value is meaningless
because this particular weapon is not effected by the health of the
target.  Since the aliens do not use PsiAmps, any alien with PsiSkill is
automatically assumed to be carrying one.
« Last Edit: December 23, 2018, 05:28:24 pm by DiamondJack »

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Auto finish mission
« Reply #17 on: December 23, 2018, 01:11:22 pm »
And how it will handle mods where enemies are vulnerable only to special weapons?
Melee weapons? Or weapons that can kill everything everywhere in one blast (your soldiers included).
Not mentions things that was added in OXCE like camouflage/heat vision/special damage types/scipts.

This is impossible to implement this correctly there is too many factors to consider to make it work and even if you do it correctly will will always need arguing with some people if it right because he lost some solders where he should not.

Offline DiamondJack

  • Sergeant
  • **
  • Posts: 20
    • View Profile
Re: Auto finish mission
« Reply #18 on: December 23, 2018, 05:39:35 pm »
The problems you mentioned are unnatural and inessential.

Autocombat is for those who want the change of scene and don`t want to repeat the same movements waiting for these decorations to change.

The one who downloaded new mod with new weapon, new alien races, new ships and other things - will NEVER want to skip it.

Those who wish not to play do not press "AutoCombat" button inside the game, they press "Power Off" button on their computer.
Those who press "AutoCombat" wish to increase their pleasure from the game.

Now about all these 'terrible difficulties'

Spoiler:

Quote
Or weapons that can kill everything everywhere in one blast (your soldiers included).

If any person has such "Atomic", he has no difference between one mouse click on hand with this weapon and one mouse click on Autocombat button.
1 Click -- 1 Kill'em all effect. Both ways.
Nothing to think about.

Quote
And how it will handle mods where enemies are vulnerable only to special weapons?
Way A: ignore all this specials and immunities. Autocombat calculations based on very few parameters:
Number of fighters, their ranks and fighting abilities (bravery, accuracy, etc.)
Good idea add here psionics, armors and power of wielded weapons.
Very bad idea to clutter up this calculations with every rule exist in game, original or highly modded.

Way B:
if (number of Aliens with special immunity) > 0 then
  if (number of Soldiers can harm this immunity) = 0 then
    (AutoCombat result) = defeat.

Nothing to think about. If you encounter unvulnerable enemy you have to find how to kill it with your own head and hands. And it's very interesting, fresh and exciting process to skip it.

Quote
things that was added in OXCE like camouflage/heat vision/special damage types/scipts.
Way A: Not count them at all. The same way XComUtil ignores grenades.

Way B: Count them the same way as psionics, flying ability, darkness (vs flares) etc.
AutoCombat is instrument for very crude and simple approximation, not for detailed dublication of manual combat. (20 high ranked flying suited veterans with heavy plasma no doubt overwhelm 5 disarmed paniced psionicless mutons. 2 etherial commanders with high psionic, blaster launchers anf flying ability no doubt kill 20 unarmored recruits.)

Quote
This is impossible to implement this correctly there is too many factors
Excellent! "Too many factors" can raise whole new game or at least a good mod for an old one, not one simplification feature, needed for skipping things already done many times.

Quote
always need arguing with some people if it right because he lost some solders where he should not.
Nobody MUST apply AutoCombat at first round. If any person dislike the calculated results (too weak Soldiers, too strong or too many Aliens, too many ignored super weapons...), he always can kill all aliens by previos way, and press this button only after killing all such *Special* Aliens or never press this button at all.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Auto finish mission
« Reply #19 on: December 23, 2018, 06:28:32 pm »
You do not get it, is AutoCombat is not accurate then is useless.
If it give you advantage then this is only correct way to play (immune enemies? auto resolve to kill them off-camera).
If it give you dis-advantage then you should never use it.
I do not see worth wasting month of work on feature that will have big chance to not working.

Meridian already give correct solution for this problem, in OXCE some enemies can surrender if they morality drop to much.
This reduce in most cases most boring parts.

Offline BlackStaff

  • Colonel
  • ****
  • Posts: 336
    • View Profile
Re: Auto finish mission
« Reply #20 on: December 23, 2018, 06:33:16 pm »
Auto-combat.... self-management of objects... what else is there in "automatic"?
I'm going to ask for the "self-play" version!
You start a new game... you activate the "self-play" and watch the game do itself... a movie actually!
And after a few days I throw the game away and take a book!

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: Auto finish mission
« Reply #21 on: December 23, 2018, 06:42:01 pm »
The problems you mentioned are unnatural and inessential.

Autocombat is for those who want the change of scene and don`t want to repeat the same movements waiting for these decorations to change.

The one who downloaded new mod with new weapon, new alien races, new ships and other things - will NEVER want to skip it.

Those who wish not to play do not press "AutoCombat" button inside the game, they press "Power Off" button on their computer.
Those who press "AutoCombat" wish to increase their pleasure from the game.

You know, I was actually considering doing something for you.

But after reading this... no thank you.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Auto finish mission
« Reply #22 on: December 26, 2018, 07:48:50 am »
Ctrl + K kills feeling of playing game. What I want is sort of more gentle and complicated.

I have a solution for you:
https://imgur.com/gallery/oIyli

I don't know how to link to a specific part of the gallery, so just scroll down to the last two images.