Author Topic: [DONE] New experience award system / accuracy training system  (Read 39900 times)

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #45 on: May 19, 2021, 10:48:53 pm »
Shoot gun exp work that you can grain max 1 point in each exp type per shoot. But each hit can grain this exp point. In case of 100% chance then effective first hit matter, but if you have 2% per hit then every hit matter as they effective "sum up" to max 1 exp.

code that implement this is simple calculate max before hit, then hits happens and each one try add exp, after all shoots hits, result exp is cap by value calculated before hits.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #46 on: May 19, 2021, 10:49:13 pm »
Yes, it was changed in July 2017 in OpenXcom: https://github.com/OpenXcom/OpenXcom/commit/dea958d1cf8f119ca85dcd04c200bff58cdb2cb4
and a bit later in OXCE too

All pellets count, but together they can give you only one experience point (per skill).

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #47 on: May 19, 2021, 10:49:43 pm »
ninjad by Yankes by 5 seconds... figures :)

Offline spectrefps

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #48 on: May 20, 2021, 03:53:46 am »
OH wow thanks both of you!! (I'm excited to get not just 1 but TWO devs to reply to me! :D) Ok so shotguns sound pretty forgiving to train rookies (or just absolute pants shooters) even if most of the scatter misses their mark, as long as any pellet manages to successfully hit the enemy (which I figure is the main saving grace of shotguns vs rifles/cannons?).

Good to know, and this info gives me a good reason to not just slap rifles or cannons on everyone! XD Typically I'd always just use 'normal' single-hit guns on everyone whenever possible (my idea being "Kill FAST = safer mission"), and thus while playing throu X-COM Files I was wary of the shotgun weapons until recently (especially since armor would affect EACH pellet, if I understood ufopedia's damage/armor page correctly :O). But their wide spread and many "hits" per attack should prove handy for my troops that aren't "ready" for bigger guns yet (for fear of decimating their comrades with friendly fire XD). I think shotguns may start to grow on me! :D

Also I like the idea of an inexperienced trooper still being able to contribute by catching a sectoid with a lucky scattershot, when they'd miss or be useless otherwise with a normal rifle. Even if they can't really hurt anything with armor, they can still rough up the little greys for the rest of the team to finish.
« Last Edit: May 20, 2021, 08:23:57 pm by spectrefps »

Offline spectrefps

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #49 on: June 01, 2021, 10:33:39 pm »
Heya! Got 2 more questions:

1: If I understand the first post correctly, incendiary damage *does* give XP now? I remember learning a while back (from the UFOpedia site! :D) that fire damage was "weird" in original x-com, both in how it did damage, and how it handled XP. Apparently, it only gave xp for *reaction* shots that hit, but not "normal" hits... So you've managed to change it to work like "normal" weapon hits too then (giving xp for normal shots that hit, not just reaction fire)? If so, THAT IS AWESOME! That xp-weirdness in the original seemed like another (small) disadvantage to using that ammo/damage, so I feel that fixing that bug/issue helps bring it more in line with other damage/ammo types (plus no more missing out on xp for issuing fire-ammo to troopers! Alien roasting time! >:D).

2: For incendiary-damage, does the*power* value actually affect the "direct-hit power" of the shot/ammo now (with the latest OXCE) or is it still like original x-com (where "power" only changed the *radius* for incendiary, according to the Ufopedia site)? It seemed kind of odd when a big cannon shot did so little "hitting damage" with incendiary (5-10 for a direct-hit, if I understood it correctly?). I'd imagine even getting hit by just a big rock of that size/speed would do more damage (and flatten that cursed sectoid! :P).

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #50 on: August 06, 2021, 01:46:55 pm »
What happens to TrainingMode: 5? After a dozen hits from weapons with TrainingMode: 5, I find this picture in the save file:

Code: [Select]
      expBravery: 0
      expReactions: 0
      expFiring: 0
      expThrowing: 0
      expPsiSkill: 0
      expPsiStrength: 0
      expMana: 0
      expMelee: 0

And the recruit at the end of the first battle does not get any experience, leading extremely active combat operations.
There is a suspicion that TrainingMode: 2\3\6\8\9 they work in the same way - a little worse than just useless. Apparently, these chances work without a accumulating component.

There is no save file left, but this situation can be easily modeled and checked without a save file.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #51 on: August 06, 2021, 03:47:20 pm »
There is no TrainingMode, there is only experienceTrainingMode.

Test on STR_PISTOL:

Code: [Select]
items:
  - type: STR_PISTOL
    experienceTrainingMode: 5

After using all 12 rounds in the clip, save file contains:

Code: [Select]
      expFiring: 4

Offline Ethereal

  • Commander
  • *****
  • Posts: 684
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #52 on: August 06, 2021, 06:29:15 pm »
Strange. Is it always like this? In addition, we are talking about 50%, which means there should be expFiring: 6.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #53 on: August 06, 2021, 07:53:56 pm »
It's a 50% roll every time.
So it can be anywhere between 0 and 12... 6 is just the most probable outcome.

Offline Leprechaun

  • Sergeant
  • **
  • Posts: 45
  • Linux Mint Enthusiast
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #54 on: August 09, 2021, 07:42:46 am »
If I understand correctly, each event that constitutes training has a set percentage chance of increasing the corresponding skill.

I was a member of the 5th Army Rifle team, and as such, I did a lot of quality shooting, However, having already been pretty good, it was hard for me to get better, whereas I could easily add 15 to 30 points (7% to 14%) to the scores of relatively untrained shooters through an hour or so of coaching. What I'm suggesting is that the better you are, the harder it is to get still better.

Pseudo code might look something like this:

For each event which might produce an increase in skill:
      If ( Rnd(100) < (MaxSkill - CurrentSkill) then CurrentSkill++

The higher your current skill is, the less likely you can increase it.

There was an earlier discussion from 5 years ago about whether bravery could increase by killing things.

Even though I was scared of heights, I went to Airborne school, thinking that would be the way to overcome it. Jumping from the 34 foot tower, I had my eyes shut every time and was dogged for it. I finally was so mad I psyched myself into thinking I would plant my feet in the Instructor's chest. Of course, I didn't get within 6 feet of him, but I was able to keep my eyes open. I had 82 parachute jumps over 21 years, and I'm still scared of heights.

I suggest that Bravery increase (limited as above by how close you are to MaxBravery) for each time you are wounded or are psychically attacked. In each case, if you survive, you know it's possible to do things you rightly should be afraid of, which is what bravery is all about. Killing things doesn't increase bravery, any more than shooting targets increases bravery.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #55 on: August 18, 2021, 04:16:55 pm »
The simple (yet not highly effective) way is to use training centers and set the training caps lower than their max. That way they train faster while the training center is still helping them.

If you find a way to do what you're suggesting, let me know.

Offline Leprechaun

  • Sergeant
  • **
  • Posts: 45
  • Linux Mint Enthusiast
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #56 on: November 08, 2021, 10:28:10 pm »
Sorry, I thought I had done that in the pseudo code I posted above.

Let's consider a hypothetical rating of IQ. Let's further say that the average for humans is 100, that a moron is below 70, and that Einstein is at 160. Let's also agree that we aren't allowing any morons into the Agent team, so 70 is the absolute floor for IQ.

How difficult is it for the Moron to increase his IQ? Relatively easy. If he just memorizes that 2+2=4, his IQ might be 71 instead of 70. Likewise how easy is it for Einstein to increase his IQ? What book does he read; who knows enough more than he does to give him a boost?

Programmatically, I might say that the minimum IQ is 70 and the absolute human maximum is 170. (Gotta give Einstein at least some hope for improvement.) For each event where the subject might gain an IQ point:

IF (CurrentIQ-70 < RND(100)) CurrentIQ++;

In English, if the subject's current IQ minus 70 is less than a random number between 1 and 100, then increment his IQ by one.

Examples: Consider a subject with an IQ of 100 who does something that MIGHT raise his IQ. 100 minus 70 is 30. A random number from 1 to 100 has a 70% chance of being greater than or equal to 30, so the subject has a 70% chance of gaining a point.

Consider Einstein. 160 minus 70 is 90. A random number from 1 to 100 has a 10% chance of being greater than or equal to 90, so Einstein has a 10% chance of gaining a point.

The closer you get to perfection, the harder it is to get better.

It just seems to me (and it's been my current experience) that if you send your players to the same training, they tend to look like carbon copies of eachother, hitting the training max value. With a system like I have suggested, there will be some variation, even if you are able to keep the same avatars alive for the entire game.
« Last Edit: November 20, 2021, 03:30:01 am by Leprechaun »

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #57 on: April 23, 2023, 11:30:35 am »
This feature is now optional (since OXCE v7.9).

By default it is turned ON... but later in OXCE v8.0+ it will likely be turned OFF by default.
Modders please update your mods already now during the transition period.

Code: [Select]
constants:
  extendedExperienceAwardSystem: true

For people who want to turn it off and return to vanilla days, here's the summary of differences:

If turned off:
1. throwing anything anywhere gives throwing exp
2. throwing exp doesn't trigger primary stats increase
3. grenades and proxies give firing exp by default
4. firearms give firing exp by default, regardless of max range or arcing
5. you can train on mind-controlled enemies

Offline iodsnips

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #58 on: October 08, 2024, 05:00:25 pm »
I was trying out OXCE 7.14 and looking inside \user\options.cfg
and I could not find "extendedExperienceAwardSystem:" listed anywhere.  Is this variable listed somewhere else that can be changed?

 I would like to train exp by mind controlling the aliens as this was a core playstyle I've always enjoyed.  The new experience window in the latest build is beautiful with ctrl + shift + E.  Thank you for adding the window!

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: [DONE] New experience award system / accuracy training system
« Reply #59 on: October 16, 2024, 02:05:09 pm »
It's a modding variable, not a user option.

So it can be added to mod ruleset files, it's not present in options.cfg.