project-navigation
Personal tools

Author Topic: New autobattle  (Read 24605 times)

Offline morse

  • Rookie
  • ***
  • Posts: 23
    • View Profile
New autobattle
« on: June 01, 2012, 04:33:57 pm »
Hi. This is the thread about my new autobattle proposal (http://ufoai.org/wiki/index.php/Proposals/New_autobattle)
For those of you who do not know, I'll describe how autobattle works right now: two teams stand against each other and fire at each other in turn, with the probability to hit calculated entirely from magic numbers and dice rolls. By saving just before the battle and reloading several times, you can as well win without a single casualty, or totally loose.
The system that I propose is of course not perfect, moreover, I myself already found a big flaw in it, which needs a bit of thinking. But I think that it's still better than what we have now in every way possible. For some reason the idea was fiercely rejected, with the reasons, which will much more apply to the current system than to the proposed.
Anyway, I was looking at the code, and I think I'm ready to do my bit in a noble task of making UFOAI better. The only question remains: how do you like the autobattle to be improved? I do not want to spent my time writing the code which won't be accepted, so we need to think of a system which will satisfy everyone. Or do you, seriously, think that what you have now is the best simulation possible?

Offline ShipIt

  • Project Artist
  • Captain
  • ***
  • Posts: 906
    • View Profile
Re: New autobattle
« Reply #1 on: June 01, 2012, 05:29:40 pm »
Or do you, seriously, think that what you have now is the best simulation possible?

No.

Offline Salvo

  • Rookie
  • ***
  • Posts: 37
    • View Profile
Re: New autobattle
« Reply #2 on: June 01, 2012, 09:40:59 pm »
Things that should be taken into account:

For Phalanx:
- The number of Phalanx soldiers involved
- Soldiers' average or combined rank, because rank reflects soldier's overall skill level. Perhaps grant bigger bonuses for the top three ranks.
- Soldier equipment: armor and weapon on hand.
- This calls for numerical values to be set for each weapon and armor to reflect their general effectiveness on the battlefield. This number shouldn't be a static number but more like 1-3 for a 7.62mm pistol and 4-6 for an Assault Rifle, and maybe 1-10 for a Laser Rifle. And so on.
- Check for the number of Medkits on the team. The more Medkits, the less wounds after the battle, up to a point.
- Optionally check for IR goggles if it's night. Lack of worn IR goggles during nighttime should be considered a penalty.
- Optionally check for other equipment in inventory, specifically hand grenades and extra magazines for the weapon. Ideally there should be a low probability that some of this stuff is consumed during autobattles, but if an item IS consumed, it should give a bonus to the outcome, i.e. less wounds.


For Aliens:
- The number of Aliens involved
- Alien types: Ortnoks are more deadly than Tamans. The lethality order needs to be figured out.
- Aliens get an advantage if a battle involves Aliens which autopsies are yet to be conducted by Phalanx, or alternatively, Phalanx gains bonuses after autopsies.
- Alien weaponry autobattle values need to be decided as well.


The autobattle mechanics:
- Individual soldiers and aliens are sorted into two lists. Aliens on one list and Phalanx soldiers on the other. Combatants are placed in random order in their respective lists.
- The starting side is selected randomly.
- Combatants shoot in turns, and in order, starting from the top of the list.
- For each soldier and alien there is a base 5% chance that he's able to interrupt on opponent's turn, aiming and firing at a random opponent. For Phalanx soldiers, this chance goes up with rank. For Aliens... I don't know. Shots are fired simultaneously. If the last two combatants kill off each other this way, the battle is considered a defeat.
- The side that gets to shoot at any time (with the exception of the first turn) is determined by probability, and the probability is determined by the number of combatants on each side. The larger the team, the larger the probability. This probability changes throughout the battle as combatants get killed.
- Higher soldier rank increases the chance to hit an alien, and the chance to NOT get hit by an alien (increased evasion and increased damage reduction), on top of the increased chance to interrupt (i.e. fire back) as described above.
- Each Medkit that a surviving Phalanx soldier carries has a 20% chance of reviving a dead Phalanx soldier, healing up to 20% of max health. Each Medkit also has a 20% chance of healing 40% of any wounded soldier's maximum health instantly after battle.
- Optionally involve the Mind stat of each individual surviving soldier carrying a Medkit to determine the healing chance or the amount of hit points healed.
- A 5% chance exists on each turn that a soldier or an alien uses a grenade from his inventory on his turn, wounding 0-3 opponents. If interrupt and grenade chance happen at the same time, one is selected randomly, in order to prevent both from activating.
- Phalanx soldiers gain double critical chance AND damage bonus if an autopsy has been conducted on the target alien's race. (note: implement critical hits)


One Colonel rank soldier in Nano armor, armed with a Heavy Laser should be able to wipe out a team of 5 unarmored Tamans all armed with Plasma Pistols, while sustaining only minimal damage.
One armored Ortnok, armed with a Plasma Rifle, should be able to wipe out 5-8 Phalanx Rookies (out of a team of 8 ), assuming their weapons aren't very advanced.


The big idea is that the Aliens have initially way more force and firepower on their side simply due to the deadlier weapons and the element of surprise, by which I mean that the Aliens know human physiology and capabilities but the Phalanx doesn't know anything about any of the Alien species. Until autopsies have been conducted, that is. Over time Phalanx gains bonuses on their side via research, better weaponry and battle experience (soldier ranks). This would mean that in the early stages the player is practically forced to manually handle the tactical combat, while in the late stages of the game, the player would have the best team with best weapons, and he's then able to autoresolve even the largest battles successfully, with minimal casualties (severe wounds at most but no soldier deaths).


More work needs to be done so that the player can make an educated guess if it's worth it to risk autobattle. Currently it's impossible to check the crashed UFO type, unless the player memorized it earlier. The exact number and composition of the UFO troops should be made visible to the player at some point as well, in my opinion.




Just my 2 cents...

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Re: New autobattle
« Reply #3 on: June 01, 2012, 10:08:56 pm »
Frankly, I'd simulate the battle with both sides starting at large distance and moving closer while shooting.

2 (+-1) turns of long-range combat
2 (+-1) turns of mid-range combat
2 (+-1) turns of close-range combat

The number of each is a bit randomized...or could depends on the type of map. Large open maps could trigger more long-range turns, etc..

Next, during each turn aliens and soldiers take shots at eachother, with each soldier per side having a 25% chance to be behind cover (can't be shot at) and 25% chance to not have a LoS (can't shoot) every turn.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: New autobattle
« Reply #4 on: June 01, 2012, 11:03:57 pm »
Morse: I have two top priorities in any ideal autoresolve system. If you can find good, simple mechanisms for addressing these priorities I'd be more inclined to support your proposal.

First, it should seek to mimic the game mechanisms and principles which lead to success in the battlescape. This is an extraordinarily difficult task and I don't have a good idea how to do this. But I feel that all attempts to model weapon effectiveness by giving each weapon a rating, measuring the number of shots made/available, or gauging soldier effectiveness through skills/abilities/rank/kills will fall short.

A successful tactical battlescape mission is all about having the proper mixture of weapon capabilities in your team and learning how to deploy these differently-capable soldiers to support one another. Individualizing weapons, soldiers or soldier performance (shots/kills/rank) undermines this aspect of the gameplay, as I would be more inclined to simply equip weapons with high ratings. But a rocket launcher is a bad weapon to clear a building.

Your general approach of using past success and failure to model automission outcomes has some potential for addressing this problem, but it really risks introducting autoresolve as a macro-strategic gameplay mechanism: the player will learn it is in his interest to play easy missions and autoresolve difficult missions.

This intrudes on my second major priority: to ensure that the game provides consistent results that do not unbalance the gameplay. This will never be completely avoided. Any automated outcomes in the game will be exploitable by players that wish to save and reload until they get a good outcome. I'm not worried about this. Our game is just the type of game to attract save-loaders and that's fine. But what I want to avoid is introducing a mechanic that entices the player to use autoresolve to his advantage. This is also a very difficult problem and I don't have good answers for it.

But if you want your autoresolve mechanism to be considered more carefully, I would suggest trying to think about how you can address these critical issues in a simple mechanic that is understandable to those who won't be coding it.

Nokim

  • Guest
Re: New autobattle
« Reply #5 on: June 01, 2012, 11:24:10 pm »
All this automissions are hell too much random. I should be very unlucky to lose all 8 soldiers to 5 aliens on Fighter in one manual fight. But auto mission gives me easily both result: losing all and killing all. Result should be more stable and predictable (given you know both teams and map).

Right now i'm using autobattle only to avoid things like this:
Quote
2012/06/01 23:35:28 ERROR: Could not find tile: '+craft_crash_fighter' in assembly 'alienlandingnature' (maps/frozen.ump)

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: New autobattle
« Reply #6 on: June 02, 2012, 12:27:07 am »
phew...

-geever

Offline Salvo

  • Rookie
  • ***
  • Posts: 37
    • View Profile
Re: New autobattle
« Reply #7 on: June 02, 2012, 09:57:14 am »
I say we (you, coders) assign each map autobattle difficulty ratings as well, reflecting how hard it is to root out aliens in a given map. In some maps, the defending party simply just has an advantage. The player should be informed of this difficulty then before making the decision whether to resort to autobattle or not. The whole point of autobattle is that the player doesn't have to play the same maps a thousand times over. Perhaps the inherent map defense bonus should go down the more times the player has cleared the map? Or perhaps the autobattle option for a given map should be unlocked only after the player has cleared that map a certain number of times?

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Re: New autobattle
« Reply #8 on: June 02, 2012, 01:05:57 pm »
That kinds fits with what I siad, doesn't it?

Given alien weapons are mostly plasma, close combat is what they would favor.

Offline morse

  • Rookie
  • ***
  • Posts: 23
    • View Profile
Re: New autobattle
« Reply #9 on: June 02, 2012, 11:41:18 pm »
Your general approach of using past success and failure to model automission outcomes has some potential for addressing this problem, but it really risks introducting autoresolve as a macro-strategic gameplay mechanism: the player will learn it is in his interest to play easy missions and autoresolve difficult missions.
Well, first of all - define "difficult mission". If we could express a "difficultiness" of the mission in a floating point value then it'll be really simple to make autobattle results really unsatisfactory for such missions. Or just disable this button completely, like: button is enabled only if expected autobattle result is very good. Also the results of "difficult" missions can go into the statistics with higher weight. This way it will be to player's advantage to play difficult missions manually (faster statistics improvement) and to not autoplay it (bad results which will ruin the statistics in no time, as auto results also go there, and this time even with higher weight).

So let's summarize: you likes the idea of using player's statistics to calculate the mission's outcome, but have concerns about player using it too much, so if I will come with some simple way of preventing player autoplaying too much missions - that'll do. Did I miss anything?

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: New autobattle
« Reply #10 on: June 03, 2012, 12:06:42 am »
If we could express a "difficultiness" of the mission in a floating point value then it'll be really simple to make autobattle results really unsatisfactory for such missions.

The difficultiness depends entirely on the player's play style. Some will do well in confined areas, some better in open areas. There's no magical value here.

So let's summarize: you likes the idea of using player's statistics to calculate the mission's outcome, but have concerns about player using it too much, so if I will come with some simple way of preventing player autoplaying too much missions - that'll do. Did I miss anything?

Not exactly. The player can automission everything if that's what they want to do. I don't care about the frequency of its use. Your plan to decay automission performance actually forces the player to play the battlescape even if they don't want to. What I don't want is to put a smart player in the position of knowing that he ought to choose automission even if he wants to play the battle himself.

Example scenario: I know the fighter_crash map has a high likelihood of my guys dying because they spawn without time to find cover. I don't want to autoresolve, but I know I'll get a better outcome, so I do it anyway.

I'm not sure I like the idea of using player's statistics to calculate the mission's outcome. But I will admit I like the way the general concept addresses the undefinable strategic environment of the battlescape -- the way in which successful performance is not easily reduced to soldier/weapon/map/alien ratings.

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Re: New autobattle
« Reply #11 on: June 03, 2012, 12:15:06 am »
Waht about my proposal H?

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: New autobattle
« Reply #12 on: June 03, 2012, 01:15:26 am »
Maybe we should remove the automission possibility completely. neither XCOM 1/2 or 3 had them.... Why do we need it?

-geever

Offline Jon_dArc

  • Squad Leader
  • ****
  • Posts: 134
    • View Profile
Re: New autobattle
« Reply #13 on: June 03, 2012, 03:02:04 pm »
Maybe we should remove the automission possibility completely. neither XCOM 1/2 or 3 had them.... Why do we need it?
There are three reasons I can think of, only one of which is a clear necessity.

1) To work around map bugs during development, like Nokim mentions. This is critical, and really demands more of an "auto-win" kind of automission. I've only skimmed the console commands, though, so maybe one of them has the ability to delete a mission without impacting nation happiness (though ideally you'd be able to collect the stuff, too, so you don't need to wait for a second Corruptor if the first one happens to spawn a bugged mission).

2) To work around the fact that the missions can get pretty dull during the long stretches during which neither the aliens nor Phalanx are introducing any new species or equipment. This is better served by addressing pacing issues.

3) To address the (apparently non-zero) playerbase that prefers the geoscape game to the tactical game. This one's really just a question of audience choice.

~J

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: New autobattle
« Reply #14 on: June 03, 2012, 06:11:59 pm »
Waht about my proposal H?

I can see what you're trying to accomplish, but I think it makes some pretty big assumptions. I'm not really in favor of a system in which we are supposed to give an arbitrary rating for a map, though I admit that some kind of arbitrary ratings may be unavoidable.

Maybe we should remove the automission possibility completely. neither XCOM 1/2 or 3 had them.... Why do we need it?

On a personal level, I'm a fan of removing it. But as Jon_dArc pointed out, it may serve a large proportion of our players. That's why my main concern is to prevent it from negatively impacting those (like myself) who don't want it. In some ways, the very random outcomes of the current system might actually be a good thing, turning the feature into a liability for those who want to use it but something to be safely avoided for those who don't. This puts the feature's burden on those who use it most -- an outcome that is not ideal but is at least less intrusive on the intended game mechanics.