UFO:Alien Invasion

Technical support => Feature Requests => Topic started by: wolf-the-white on December 28, 2007, 10:04:51 pm

Title: Updating soldier stats
Post by: wolf-the-white on December 28, 2007, 10:04:51 pm
As the soldiers start with quite low values now they need to get better while playing. (rev 13697)

At the moment  there is a counter for kills for each weapon-type and after a certain amount of kills the skill raises(i think it gets the same points as it needs to triger this).
I made a test and it seems to work, but I am not sure if the counter is kept for the next missions. My test said that it is not the case.(someone should check this)

But I think perhaps it would be nicer to make it more randomly. So for each kill the possibility to raise some skills. e.g. for a kill with close skill
40% to get 2 more points in close skill
15% to get 1 more point in acc
15% to get 1 more point in speed
etc

With this possibiliies it would be easy to make later more complex additions. E.g. higher probablitity for 1st kill of a kind and perhaps less if he killed already a lot of them ... same could apply for the used weapon (less influrnce)

To avoid playing the same mission again and again for higher stats, the random numbers could be made in advance for the next 15 kills? And be part of the savegame.

Well let's hear other opinions


regards
WOLF
Title: Re: Updating soldier stats
Post by: Surrealistik on December 28, 2007, 10:28:39 pm
I don't like the addition of randomness. Ideally the advancement of the accuracy and weapon proficiency stats should depend on:

A: The difficulty of a shot made (as determined by estimates). The more difficult, the greater the 'experience' a successful shot will award for the progression of its respective stats. This makes sense. You should not be awarded a slew of experience in accuracy or weapon use for doing something as skilless as spamming your minigun on full auto at point blank range.
 
B: The type of skill used (of course).

Furthermore a kill should not be a requirement for earning experience towards progression. Successful non-terminal hits should also award experience, although not as much. Experience awarded per hit may also be modified per weapon/fire mode (so low damage full auto weapons and shotties cannot be abused to increase experience excessively).
Title: Re: Updating soldier stats
Post by: wolf-the-white on December 29, 2007, 02:23:54 pm
Well i am not perfecly sure about the current code but, as i undrstood it there is a random in the amount you get if the increase is triggered. And in the same function the progress is made slower for higher skills.

@surrealistik:
 i see there great balancing problems between the diff.weapons ...and in addition i don't want ppl do difficult shot over easy ones just for the skill... i think this kind of training should be placed in the base.

Experience though little on hits alone might be exploitable if the target is healable.

Well perhaps  BTAxis can tell us how he(hope i am right there ;) ) has planned it .
Title: Re: Updating soldier stats
Post by: Surrealistik on December 29, 2007, 06:42:22 pm
The advantage of the realistic approach, awarding more experience for more difficult shots, not only satisfies concerns of plausibility, but also prevents stat progression from occuring overtly quickly. While it is theoretically exploitable if you go through all the trouble to keep a target alive with medikits, and incapacitated with flashbangs, that is a negligible concern, especially if caps are involved on individual missions. Furthermore, medikits may be rendered unusable on the aliens.

Some randomness in so far as the extent or scope of progression is tolerable, especially if it's minor, but the idea that a soldier has only a random chance of honing/developing his skill from a successful attack seems a bit silly, especially when this randomness does not consider the difficulty involved with landing that attack.
Title: Re: Updating soldier stats
Post by: Punkiee on January 03, 2008, 10:27:59 am
The more difficult, the greater the 'experience' a successful shot will award for the progression of its respective stats.

A soldier pelting at his enemies from miles away with shots from the hip will thus learn more (experience) then a soldier sneaking up closer to aim the bullet exactly in the kissers. Does not make sense to me. This method is too simple to represent reality close enough in all possible scenarios while keeping it playable.

Only counting kills is a method complying with KISS (keep it simple, stupid) and archives almost the same. Furthermore it is less exploitable. Calculating with hits/shots/damage might improve balance here.

I doubt that randomness in rewards will improve gameplay.
Title: Re: Updating soldier stats
Post by: brackxs on January 08, 2008, 11:08:15 am
i think rewarding extraordinary good results in a skill with advancement in capabilities is only one side of the coin. more often you learn from failure as much as from success.

(can you imagine to learn a lot from a lucky shot? i can't.)

usually the (unaided) learning speed in some completely new skill is as follows:

* one usually has some "inherent" probability of success, applying the skill untrained
* when new to a skill you experiment rather than train the skill since you don't even know how to perform the skill perfectly. this is rather slow and you learn mostly from success (which is rather rare).
* you find out how to perform the skill. you learn now more rapidly and you learn as much from success as from failure.
* you perfect the skill. you learn mostly from failure (which is rather rare)

so seemingly a realistic function for learning must depend on both success and failure. the easiest way to implement this is the use of two flags for each skill: one flag denoting successfull usage of the skill while the other denotes the faulty usage of a skill. after each usage of the skill check if this was faulty/neutral/successfull and set the according flag to one. if both falgs are one, increase the skill infinitesimally and reset the flags.
Title: Re: Updating soldier stats
Post by: Surrealistik on January 08, 2008, 07:02:37 pm
Quote
A soldier pelting at his enemies from miles away with shots from the hip will thus learn more (experience) then a soldier sneaking up closer to aim the bullet exactly in the kissers. Does not make sense to me. This method is too simple to represent reality close enough in all possible scenarios while keeping it playable.

So, discharging a full auto weapon at close range is supposed to result in more accuracy experience for example, than an aimed shot at a long distance? And the example you've provided does make sense, because the latter isn't going to enhance one's accuracy as it doesn't require any whatsoever, whereas firing at your enemies, and hitting at long range with snap shots is exceptionally skillful, requires accuracy, and contributes to its development. When you hit an opponent at such ranges, you come to recognize associated techniques which will improve one's ability to aim. While the method is simplistic, it is accurate enough.

Quote
Only counting kills is a method complying with KISS (keep it simple, stupid) and archives almost the same. Furthermore it is less exploitable. Calculating with hits/shots/damage might improve balance here.

Only counting kills is grossly inaccurate. While it may be less exploitable, the exploitability of a hit based system can be largely negated by applying weapon/fire mode experience modifiers. This way, high volume of fire weapons (especially those which feature low projectile damage) contribute much less experience per shot, than others such as the sniper rifle.

Quote
so seemingly a realistic function for learning must depend on both success and failure. the easiest way to implement this is the use of two flags for each skill: one flag denoting successfull usage of the skill while the other denotes the faulty usage of a skill. after each usage of the skill check if this was faulty/neutral/successfull and set the according flag to one. if both falgs are one, increase the skill infinitesimally and reset the flags.

I do agree that failed attempts should play a role of some sort. However I'm not so sure if success and failure should be equally weighed like this. Generally, one can learn much more from success than from failure. Failure tells you what not to do. Success tells you what to do. Even if you are successful purely because of luck, careful analysis of that lucky shot will often reveal a number of factors and techniques, inadvertant or otherwise, that contributed to a favourable outcome. Personally I feel that missed shots (assuming you have a viable target and are not just firing at a wall per say) which have a reasonable probability of success (to prevent exploitation) should result in a minor amount of experience.
Title: Re: Updating soldier stats
Post by: Punkiee on January 09, 2008, 08:59:05 pm
So, discharging a full auto weapon at close range is supposed to result in more accuracy experience for example, than an aimed shot at a long distance?
I never said that. And it is not correct too. Spraying does give you experience,.... in spraying. Aiming gives you experience,... in aiming.
Weaponfire mode is a function of the distance and gives you an associated chance to hit. As such the chance to hit someone is associated with the weaponmode you are using in a given situation. And thus the reward shouldnt be related to the probability of the hit, but with the firemode. Because the chance to hit is associated with it, you dont need to take the distance or chance to hit another time into account with the reward, because it already IS related to it.

Quote
Only counting kills is grossly inaccurate. While it may be less exploitable, the exploitability of a hit based system can be largely negated by applying weapon/fire mode experience modifiers.
see my remark above. Because the modifier already is taken into account, adding the factor to equation another time and rebalancing will have the same effect as rebalancing the modifiers the current method, without all the fuzz.
Title: Re: Updating soldier stats
Post by: Surrealistik on January 09, 2008, 10:57:20 pm
Quote
I never said that. And it is not correct too. Spraying does give you experience,.... in spraying. Aiming gives you experience,... in aiming.

Spray and pray at close range does very little to improve one's skill in any respect. Further to cite the specific example you are talking about, aiming at a distance does require more skill, and thus results in more skill when done successfully as opposed to at point blank range. That is undeniable. While my initial response did not address your theoretical situation verbatum, the same idea applies; you are essentially arguing that someone who does something that is much less skill intensive, and that definitively features much less room for improvement should benefit from the same increase in experience as someone who does the inverse. That is nonsensical of course.

Quote
Weaponfire mode is a function of the distance and gives you an associated chance to hit. As such the chance to hit someone is associated with the weaponmode you are using in a given situation. And thus the reward shouldnt be related to the probability of the hit, but with the firemode. Because the chance to hit is associated with it, you dont need to take the distance or chance to hit another time into account with the reward, because it already IS related to it.

Here's the problem with this perspective. It doesn't factor in the shooter's existing skill. The percentage probability does. Obviously, a crackshot doesn't have as much to learn from a particular shooting experience as a greenhorn rookie, regardless of firemode. It is obvious that there isn't much to learn from a shot that features a 95% hit probability as opposed to one which features a 40% hit probability.

Quote
see my remark above. Because the modifier already is taken into account, adding the factor to equation another time and rebalancing will have the same effect as rebalancing the modifiers the current method, without all the fuzz.

I don't see your point here, although this may be due to a lack of clarity in the writing. The existing system certainly does not model skill improvements nearly as accurately as one that awards experience for successful shots and certain misses, even if we factored in modifiers that reflect weapon accuracy. This is precisely because most shots, whether they are hits or misses, whether terminal or not, help develop skill. It is further important if we are going this route, as we should, that in addition to a probability based experience modifier, a weapon specific one applies as well. For example without such modifiers, we might have a grossly inaccurate, but fast firing pea shooter, such as the flechette loaded Riot Shotgun, Grenade Launcher or Minigun, resulting in a great deal of undeserved experience in accuracy and weapon skill. This is because:

A: Experience bonuses are sensibly awarded in an amount proportional to the difficulty of the shot, and these weapons compensate for inaccuracy with their rate of fire.

B: Each missed shot contributes a certain amount of experience.

C: These weapons can be used repeatedly on armored targets.

As a result, weapon and firemode specific experience modifiers must be implimented. Having missed shots contribute an amount of experience inversely proportional to the difficulty of the shot (because you can generally learn more from failures when you are already skilled, whereas when unskilled you learn more from success since you lack understanding of fundamental techniques) may be a sensible approach that would help mitigate this problem from a hit probability perspective, but alone, this measure would be insufficient.
Title: Re: Updating soldier stats
Post by: Punkiee on January 11, 2008, 04:13:50 pm
...you are essentially arguing that someone who does something that is much less skill intensive, and that definitively features much less room for improvement ...
Nope, i cant see it. In what manner did I say that?

Spray and pray at close range does very little to improve one's skill in any respect.
Using spray and pray improves your skill in spraying and praying. Exercise results in mastery. Aiming will result in more skill in aiming, not is spraying and praying. In your example, there are 2 diferent skilltypes (close comat vs accuracy) and 2 different weaponmodes (aimed shot vs auto).

Quote
Here's the problem with this perspective. It doesn't factor in the shooter's existing skill. The percentage probability does. Obviously, a crackshot doesn't have as much to learn from a particular shooting experience as a greenhorn rookie, regardless of firemode. It is obvious that there isn't much to learn from a shot that features a 95% hit probability as opposed to one which features a 40% hit probability.
That a pro learns as much (in xp points) from a kill/shot as a newbie (while you argue it shouldnt) is not a problem if and only if there is another mechanism that compensates for it. And that mechanism might very well be the nonlinear experience required to reach the next level in skill proficiency. 1st level: 500 points, 2nd level 1500 points, 3th level 5000 points, etc. This mechanism is used in almost every game and i cant recall readily a game that features a different approach. Therefore with such a mechanism the shooters existing skill is irrelevant.

Quote
For example without such modifiers, we might have a grossly inaccurate, ...

I see the introduction of this mechanism as a source of unbalanced skilleveling. You see the absence of it as a problem for unbalanced skilleveling. Currently the situation is that there is no such mechanism. Please give us an example that currently results in unbalanced skilleveling. If you think weapon and firemode give rise to unbalanced skilleveling (and thus should have an explicit modifier) then please give an example.
Title: Re: Updating soldier stats
Post by: Surrealistik on January 11, 2008, 11:45:48 pm
Quote
Nope, i cant see it. In what manner did I say that?

Quote
A soldier pelting at his enemies from miles away with shots from the hip will thus learn more (experience) then a soldier sneaking up closer to aim the bullet exactly in the kissers. Does not make sense to me.

Here you are effectively saying that a soldier who does something particularily skill intensive should receive the same amount of experience as a soldier who does not, as it does not make sense to you that the reward for doing the former should be greater than that for the latter.

Quote
Using spray and pray improves your skill in spraying and praying. Exercise results in mastery. Aiming will result in more skill in aiming, not is spraying and praying. In your example, there are 2 diferent skilltypes (close comat vs accuracy) and 2 different weaponmodes (aimed shot vs auto).


There's a reason it's called spray and pray. The reason? Because you effectively give aim and control over to chance largely (hence the 'pray' component), in exchange for superior albeit inaccurate firepower (hence the 'spray' component). Consequently, because of the prominence in chance, skill plays a consequently inferior role. The implication of this of course, is that there's little actual skill development that results. Spray and pray is by no means skill intensive. It's inherant in the name, as well as the practice. The fact that it may or may not draw on differing skills (assault would be more appropriate than close combat) is irrelevant to my statement. The fact remains that the action does not, and should not contribute much to skill development.

Quote
That a pro learns as much (in xp points) from a kill/shot as a newbie (while you argue it shouldnt) is not a problem if and only if there is another mechanism that compensates for it. And that mechanism might very well be the nonlinear experience required to reach the next level in skill proficiency. 1st level: 500 points, 2nd level 1500 points, 3th level 5000 points, etc. This mechanism is used in almost every game and i cant recall readily a game that features a different approach. Therefore with such a mechanism the shooters existing skill is irrelevant.

This solution is insufficient because while it may account for skill discrepancies between various soldiers, it does not account for the skill and improvement potential discrepancies between individual shots. As stated, there is much more to learn from a shot with an estimated 40% success rate, versus one with an 95% success rate. Under this model, a soldier would inappropriately receive an equal amount of experience for succeeding at each.

Quote
I see the introduction of this mechanism as a source of unbalanced skilleveling. You see the absence of it as a problem for unbalanced skilleveling. Currently the situation is that there is no such mechanism. Please give us an example that currently results in unbalanced skilleveling. If you think weapon and firemode give rise to unbalanced skilleveling (and thus should have an explicit modifier) then please give an example.

Actually, what I'm saying is that IF per shot experience rewards are alloted, as they should be, then certain supplimental mechanisms which were introduced in my previous post must be implimented to prevent abuse. In addition, I am also saying that the current system is grossly flawed in that it does not faithfully abstract realistic skill development whatsoever. You are correct in asserting that per shot experience awards are a source of unbalanced skill leveling, assuming that tempering fire mode specific modifiers are not introduced. However, if you adjust experience outputs via this method to factor in such things as fire rates, spread and damage, then these problems will prove largely moot.

To better illustrate what I mean, assume you are awarded experience on a per shot basis for hits, and misses. You are using a riot shotgun loaded with flechette rounds, and your opponent has medium or better armour. There are no experience modifiers save those associated with hit probability. Assuming you have enough flashbangs to keep the alien helpless and immobile, you could effectively milk it for huge quantities of undeserved skill advancement, because each flechette round translates into many shots, and you discharge 7 of them on full auto. Further, each flechette shot does very small amounts of blast damage, which are easily reduced to the minimum of 1 versus the alien's armour, allowing you to fire at it for a considerable period of time. Obviously this is problematic, and clearly demonstrates the need for firemode specific modifiers, ones that would adjust experience yields for such peashooters downwards. There is a realistic aspect to this as well; generally, some weapons and firemodes take more skill to effectively use than others. Full auto versus aimed shots as a prime example, or a minigun versus a sniper rifle.
Title: Re: Updating soldier stats
Post by: brackxs on January 12, 2008, 12:12:17 pm
I think there is an important factor missing in this discussion: What are the soldiers doing in between missions? healing and eating and sleeping? i don't think so. while combat missions are important to make the soldiers understand how their training pays off in appropriate situations the skills a soldier accumulates are mainly from training. so battlefield experiences will maybe result in promotions but most of the time not in skill improvements.

that is why i want to introduce another system of skill improvement: training camps. imagine: training takes time and ressources and the effect depends on some primary skills as e.g. intelligence and physical fitness. in order to make this not overly exploitable restrict the number of training sessions allowed to 1. money available and 2. rank of the tranee (e.g. two training sessions per rank). let these training camps take a week or so. voila.
Title: Re: Updating soldier stats
Post by: Surrealistik on January 13, 2008, 01:43:14 pm
I completely support with the proposal of a training facility or gym of some sort. It's sensible and plausible. The existing team room is more recreational than anything else. Each such training facility would only be able to enroll a maximum # of soldiers (10 perhaps) and each enrollment would count as an additional recurring expense while in effect. In return, enrolled soldiers will gain experience in the speed, health, strength and accuracy skills, and up to two selected weapon skills. Signifigantly injured soldiers obviously would not be able to partake in training.
Title: Re: Updating soldier stats
Post by: Robb77 on January 14, 2008, 04:46:55 pm
great game i do miss the glitch that makes the soldiers stats full what about a cheat code for this
Title: Re: Updating soldier stats
Post by: brackxs on January 19, 2008, 03:22:49 pm
In return, enrolled soldiers will gain experience in the speed, health, strength and accuracy skills, and up to two selected weapon skills. Signifigantly injured soldiers obviously would not be able to partake in training.

plus maybe a shooting range?
Title: Re: Updating soldier stats
Post by: canahari on January 19, 2008, 04:21:54 pm
plus maybe a shooting range?

No. No! The range is weapon-dependent, not man-dependent.
 
Title: Re: Updating soldier stats
Post by: Surrealistik on January 20, 2008, 11:47:29 am
Quote
plus maybe a shooting range?

Do you really mean firing range as in the property? If so, as canahari said, such is weapon dependant. Otherwise if you are referring to the concept of a physical firing range, I'd imagine this to be included in the training facility, alongside a gym.
Title: Re: Updating soldier stats
Post by: brackxs on January 27, 2008, 05:38:48 pm
i meant a physical shooting range (which might need just an extra building..)
Title: Re: Updating soldier stats
Post by: Vyper on March 24, 2008, 05:03:12 am
   Hello. I have recently downloaded ufo-ai 2.2 and have to say, I am impressed. Even with alot of the game not implimented you have a workable and highly enjoyable game. With that said i will throw my opinions around in the hopes of some great revisions in the future.

   I like the idea of a training center to enhance skills. Some can be enhanced on the battlefield but to be honest you learn more in a training enviroment. I can see strength, mind and to a lesser extent speed getting minor enhancements during combat. IE Strength for carrying heavy equipment etc, Mind can come from almost anything and speed from using light equipment and rushing an opponent. Weapon skills can also be enhanced somewhat but by far most points should come from training.
   As a combat vet and a PMI (primary marksmanship instructor) for the US Marines I can tell you. You learn more in the classroom and on the range then you can in actual combat. During combat is where you learn how to implement that training in a effective way. This is especially true for weapon skills. You don't have the time in combat to see how the wind, target cover or movement effected you shot, so little is gleaned from it. All you know is you shot at it and now it's not shooting at you anymore and thats good enough. It's not like your targets going to pop back up and tell you where you hit him like they do on a range.

I personally don't like most of the (in combat) ways stated so far. IMO you learn more from close quarters shots in combat then extreme range simply because you can quickly see the results. At long ranges all you know is he went down. it could have been a center mass hit or you blew off his big toe. Either way he's going down with a difference of at least 4 feet. Although that is effective fire it's not accurate.

My 2 cents worth.
   I would say make some sort of ticker. If your skill is 15 then you need 15 successful engagements to go to 16 skill etc. Bursts and full auto shots still count as 1 engagement. This discourages farming of stats and makes it a more natural and self limiting system.
   Range buildings should be as large as a workshop or bigger. (10 person max)
   A gym facility should be implemented as a separate building (lab sized) (10 person max)
   Troops that are training are removed from the available troops for missions. ( takes X hours to be deployable )
   The same system as the in combat ticker should be used. Make a fixed amount of engagements per hour and that is how many they get.
   Max of 12 hours training per troop per day.

Example
* I have 12 troops at base 4.
* I have a 2 wounded so they can't train.
* I decide to put 2 of my troops into training so I keep my 8 combat ready troops for deployment
* Trooper z and y start training. they are going to get (X) (will use 5) ticks per hour. If I pull them out of training then they lose that hours worth of training and it takes them (X) hours to be combat ready again. "Trooper Z reporting for duty" message or something
* 2 hours later terror mission comes up. My mighty 8 leave and when they return 5 hours later you have 3 WIA.
* Now I have a choice pull the 2 out of training or be ready for a 5 man mission.
* I leave my guys in training. My fighting 5 look tough enough.
* 4 hours go by and a scout UFO has been shot down in the area.
* My fighting 5 need the added support so I pull the 2 out of training to go on the mission.   ((2+5+4)-1)=10 hours of training
* 10 x 5 = 50 ticks in the individual skill. Lets say one close and one HE.
* Trooper z  had a (close) skill of 34 entering training. He needs 34 ticks to go to 35. He's now 35 skill and 16 ticks toward 36
* Trooper y had a (HE) skill of 46. He's now 47 with 4 ticks towards 48
* In (X) hour, (will use 2), I will have 7 combat ready troops plus anyone that has healed by then.

If this is to fast of slow then just adjust the variables

Summary and notes
I have no clue how this would be scripted/programmed into the game or if it's even feasable. Thats up to you. Saved games would have to keep track of each troop and each skills current ticks.  (Close-35`16)
Does time pass on the geoscape while your in a battlescape?
Mind skill comes from combat only is ok with me
Gym would work on the same system but with a lower max time per day I would think.
Building a base for mostly training would be best I think. Transfer troops in and out as needed.
New troops gained thru mission success should, IMO, be better then starting troops. These should be specialists sent from around the world to help the cause.
Difficulty level should play a part in the variables. IE Ticks per hour of training, time until combat redeployment, etc

I am still new to the game and I have no clue what the higher difficulty games and the late game troops skills are like so forgive me or enlighten me.
Title: Re: Updating soldier stats
Post by: BTAxis on March 24, 2008, 01:45:54 pm
Please see this (http://ufoai.ninex.info/forum/index.php?topic=2254.0) thread. It's sunk pretty far, so I don't blame you for missing it.
Title: Re: Updating soldier stats
Post by: Vyper on March 25, 2008, 01:34:59 am
Bah, sorry I missed it. Thanks though.