Digest of technical information re: pilot skill levels

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

Post Reply
zakaluka
Posts: 521
Joined: Sat, 16. Nov 13, 19:47

Digest of technical information re: pilot skill levels

Post by zakaluka » Thu, 3. Dec 20, 15:54

Hi,

Every time this comes up I just want to refer someone to the source material, which is mostly located in the skill and training feedback thread, here. But it's a 100 page thread filled mostly with complaints, conjecture, suggestions, and opinion. This thread here is a digest only including technical facts and dev statements. I hope this is a place I can link back to for some reference material that's a little bit easier to understand.

Thanks Mackan for reading the AI scripts for us, explaining them, and making some visuals. Thanks j.harshaw for dealing with bugs.

Not intended for discussion, unless you think I missed a key post, feel free to suggest additions below. To discuss the topic, skill and training feedback thread is still a totally appropriate place, or, if it gets a bit too old, you can always create another thread.

Background: prior to game version 3.0, we were able to get some skilled pilots randomly from shipyards. Keep buying ships, you could build a fleet of highly skilled pilots, no training. In 3.0 egosoft fixed the bug - to a lot of playerbase frustration. Discussion here

Digest below is from 3.0 onward:
----------------------------------------
CBJ wrote:
Wed, 1. Apr 20, 13:30
Cabrelbeuk wrote:
Wed, 1. Apr 20, 13:17
I don't understand how they thought it was a good idea and good game design, especially when they got feedback about it.
The feedback was mixed. Many people understood, and agreed, that not everything in the game should happen quickly, or be tied to the amount of money you have. We will continue to iterate on this feature to try and strike the right balance between there being too little and too much work involved in building up the experience of your crews. Just don't expect easy linear progress from one star to five, or to be able to completely skip this progression just by having large amounts of cash, as this is completely contrary to how experience progression is intended to work, and indeed works in many, if not most, games.
CBJ wrote:
Wed, 1. Apr 20, 13:57
Cabrelbeuk wrote:
Wed, 1. Apr 20, 13:45
Mid/end game meant you already progressed in game, and the very nature of the game should allow those to go faster as your empire grow. You can't micro manage those forever. Hence why for me investing huge cash (for people in mid-end game) would have been a solution but seems like it not the one prefered :D .
The problem with using credits to solve micro- vs macro-management problems is that credits grow almost exponentially. Instead of it a linear progression or even one that gets harder as you progress further, it gets drastically easier and for advanced players means that everything is available at a click. What happens then is that people complain that there is nothing for advanced players to do! Unfortunately whenever this is pointed out, the answer from some players is always "ah yes, but THIS thing should be an exception because I don't like doing it manually", regardless of what game activity is being discussed. :)

As I said, we are aware that skill progression for crews will probably require further iteration, but we are not going to just make it something that becomes a non-activity for anyone with enough credits.
regarding seminars: in response to a comment - Why are you forcing me to attend to every ship I own?! Do you even know how hard is to manualy direct traders and miners around the map?
CBJ wrote:
Thu, 2. Apr 20, 14:40
Please at least take the time to read the full discussion. There is more on it here and some responses here, here and here. We're actively discussing ways to simplify the process of applying the skill training that you have available through seminars.
Over time following these comments, Egosoft added the two-pane navigation in the map screen (making it many times easier to browse pilots), and changed seminars to add full stars (instead of thirds of a star), and re-factored quests involving seminar rewards. In 4.0 beta (as of now) they have greatly increased the number of missions on offer in the universe.

Mackan is a modder who wrote some mods for pilot skill level, he explains some game scripts:
Mackan wrote:
Sun, 5. Apr 20, 20:46
The problem with the experience gain system is that, well, there is none... Experience does not exist. What we instead have is a roll-based system where certain actions have a chance to increase your crew's level by 1.

The formula for level rolls is (basevalue * falloff^currentlevel) and can be found in /libraries/experiences.xml. So a level 14 (4.67 stars) pilot winning against a ship considered stronger than them gives the pilot a chance of 1 * 0.43^14 to level up to 15 (5 stars). Roughly 0.0007%. And that's assuming a factor of 1 which is not guaranteed. Because it's completely RNG the level up can happen in 1 kill, or half a million kills.

In the table below are some stats I took from leveling up a pilot from 1 to 15 a hundred times faking hard kills (function used for posterity: <apply_experience entity="$pilot" experience="'ship_kill_hard'" factor="1.0" />) It is not entirely accurate from level 1 to 9 though as from what I can tell pilots with less than 3 stars in piloting gain double rolls from hard kills.

Code: Select all

Pilot        Average    Percent
Skill          Rolls     Chance

{2}     =       2.45   (~40.8%)
{3}  1* =       4.68   (~21.4%)
{4}     =      11.02      (~9%)
{5}     =      32.03    (~3.1%)
{6}  2* =      66.42    (~1.5%)
{7}     =     138.00   (~0.72%)
{8}     =     362.78   (~0.28%)
{9}  3* =     776.76   (~0.13%)
{10}    =    2148.75   (~0.05%)
{11}    =    4403.12   (~0.02%)
{12} 4* =   10499.32   (~0.01%)
{13}    =   25192.12  (~0.004%)
{14}    =   64724.24  (~0.002%)
{15} 5* =  142095.19 (~0.0007%)
I mean wtf? Do I completely misunderstand the code or is this for real? Trading is even worse btw with a falloff of 0.32 on piloting ASSUMING A FACTOR OF 1!!!
j.harshaw wrote:
Mon, 6. Apr 20, 14:53
Gregorovitch wrote:
Mon, 6. Apr 20, 14:48
station trader's ability to fly through gates to complete deals is apparently controlled exclusively by the station managers management skill level.
Small correction: the manager's management skill or the pilot's piloting skill, whichever is higher. Same for station-based mining ships' range for the purpose of determining where to mine resources.
Mackan wrote:
Wed, 8. Apr 20, 15:43
Auto miners are extremely unlikely to level past 2 stars in vanilla. ~0.1% chance.

With how leveling currently is, auto miners and auto traders aren't feasible. The best alternative is to build trade stations with miner/trader subordinates as managers can still level up and miner/trader range is based on their manager's skill.
Mackan wrote:
Wed, 8. Apr 20, 16:30
Here's what the leveling curve roughly looks like for auto traders/miners and station managers (chance per trade):

Image
(see further down, a bug he explains here is fixed by now)
Mackan wrote:
Thu, 9. Apr 20, 15:41
Sirilius wrote:
Thu, 9. Apr 20, 10:44
Also Mackan found that miners rarely rank up either. They don’t gain any skills from mining only from the trading but because they end up doing “bad trades” (selling at a price the game deems mon profitable) results in miners levelling up very slowly. No XP from “bad trades” even though it’s all profits from a miners viewpoint.
Miners are actually supposed to be gaining experience from mining, but it seems all kinds of broken right now:

Code: Select all

      <do_if value="not this.assignedcontrolled.cargo.{$ware}.free and (this.assignedcontrolled.cargo.{$ware}.max - $startcapacity)">
        <!-- we have duration, amount collected, max capacity. nothing sensible and consistent to compare duration with so sticking with amount. useful since ratio between amount collected and max capacity can be influenced. -->
        <set_value name="$XP_factor" exact="[(this.assignedcontrolled.cargo.{$ware}.max - $startcapacity)f / [(this.assignedcontrolled.cargo.{$ware}.max)f, 1.0].max, 1.0].min"/>
        <debug_text text="'applying mining XP. factor: %s, start capacity: %s, max capacity: %s'.[$XP_factor, $startcapacity, this.assignedcontrolled.cargo.{$ware}.max]" chance="$debugchance"/>

        <apply_experience entity="this" experience="'ship_mine_full'" factor="$XP_factor"/>
        <apply_experience object="this.assignedcontrolled" role="entityrole.service" experience="'ship_mine_full'" factor="$XP_factor"/>
      </do_if>
There are two conditions for applying mining experience. The first one is for the cargo to be full, which is fine. The second condition however is for (max capacity - start capacity) to return non-zero. Which it won't do if the cargo was empty at start of mining. Don't know why there's an if-statement at all though, seems unnecessary considering how factor is handled.

Next problem is the factor. The idea seems to be to lower the level up chance based on start capacity. So if mining was started with empty cargo, chance factor would be 100%. If cargo was half full, chance factor would be 50% etc. Right now the code does the exact opposite. It's set to ((max capacity - start capacity) / max capacity). This has the funny effect of increasing level up chance the less resources the miner mined. It's probably supposed to be (start capacity / max capacity) instead, someone just made a mistake.
Kane Hart wrote:
Thu, 9. Apr 20, 08:43
Just a question would help with this as well. There any chance you be willing to expand this to say all the different behaviors?

Might give people a chance to try new ones out but maybe even also find some better methods or help balance it for the devs when people talk about it.
I'm hesitant to do this as I simply don't yet understand how every activity actually works. Experiences.xml only sets (partially) how level up is applied. When and why is defined in a bunch of other scripts so there's a lot of code and testing I would have to go through as to not overly misrepresent findings.

I made the graph of auto trading and station managing as I am fairly confident in my understanding of the rates of those activities.
Mackan wrote:
Thu, 9. Apr 20, 16:41
Cormyr wrote:
Thu, 9. Apr 20, 16:22
Big if true. This explains everything. No wonder my damn miners won't level up - even after 10 hours of gameplay. Please devs, fix this asap.
Even if this was fixed, miners would still be very unlikely to level past 2 stars. :)
j.harshaw wrote:
Thu, 9. Apr 20, 16:50
Mackan wrote:
Thu, 9. Apr 20, 15:41
The second condition however is for (max capacity - start capacity) to return non-zero. Which it won't do if the cargo was empty at start of mining.
Correct. Thanks for spotting this. Fixed in a future update.
Mackan wrote:
Thu, 9. Apr 20, 15:41
Don't know why there's an if-statement at all though, seems unnecessary considering how factor is handled.
Because this particular experience gain is for ships mining a cargo hold full of $ware.
Mackan wrote:
Thu, 9. Apr 20, 15:41
Next problem is the factor. The idea seems to be to lower the level up chance based on start capacity. So if mining was started with empty cargo, chance factor would be 100%.
Would be 0, actually, for the same reason you stated above. Although it wouldn't get in here in the first place because of that if condition.

If you want to play around with it with your mod, $startcapacity is effectively the amount of $ware that was collected at that point in the script. So the condition should simply be:

<do_if value="not this.assignedcontrolled.cargo.{$ware}.free and $startcapacity">

and the factor calc should be:

<set_value name="$XP_factor" exact="[($startcapacity)f / [(this.assignedcontrolled.cargo.{$ware}.max)f, 1.0].max, 1.0].min"/>

Anyway, fixed in a future update. Thanks again for spotting this.
j.harshaw wrote:
Wed, 29. Apr 20, 19:47
Admiral Sausage wrote:
Wed, 29. Apr 20, 18:35
It's not clear which skills are actually relevant to a particular role.
All of the roles use only one skill plus Morale.

Pilots use Piloting,
Managers use Management,
Ship crew use Engineering,
Marines use Boarding,

All of the above plus Morale. Skills are not relevant for any other roles including ship traders.

The only exception is for ships working for stations which can use their manager's Management skill if it is higher than their Piloting skill.
TekDragon wrote:
Wed, 29. Apr 20, 17:20
I mean, who thinks of this garbage?
That would be me.
TekDragon wrote:
Wed, 29. Apr 20, 17:20
Is that insane mechanic still in-place where skill-gain is inversely tied to how much you transport?
Correction: how much of your cargo hold you fill or empty per transaction.
Andrey12y wrote:
Wed, 29. Apr 20, 19:21
Also its logical that trader on a small fast ship has more chances to get XP, due to more operations he made (if that chances are rng).
Correct. The sheer number of transactions increases the chances over time of increasing skill. That's mostly why managers gain skill so quickly.

EDIT: fixed wrong quote. the first one.
j.harshaw wrote:
Wed, 29. Apr 20, 20:14
Keep in mind that there's a bug at the moment with miners gaining skill. (Shout out to Mackan for finding that bug.) They only gain skill when they go in to trade the resources they've mined. Don't think the fix for that is out yet.
Axeface wrote:
Wed, 29. Apr 20, 19:59
Ships are on sector mining duty or distribute wares for a disproportionately long time without improving compared to other activities.
Distribute wares is actually particularly bad at improving pilots since it's the buy-once-sell-many script so mechanically doesn't offload full cargo holds worth of wares. Easiest way I've found via trading is by setting up a station that trades in high-volume wares in an area where those wares move quickly. Imperial Good described an even more efficient way in one of his posts, but I personally never felt the need to resort to something like that.
(to close this out I'm trying to find one of Mackan's old posts, where he described how combat pilots level up; will make an edit)
Mackan explains how pilots level up in combat from the thread for one of his mods
Note where he says that combat assists against a hard target credit an easy kill with a factor of 1 to every assisting pilot, and their share of the credit for a hard kill - this gives a hint to the most effective way you can directly level pilots in the present game (4.0 is in beta when I post this)
Mackan wrote:
Sun, 12. Apr 20, 13:53
Sirilius wrote:
Sat, 11. Apr 20, 12:53
If and when you have the time, would you be able to explain how ranks affect combat? Is there some sort of increase in damage or are they given better AI (this would suck as the AI already seems pretty dumb).
Higher skill mostly increases reaction time, better positioning calculations and such. Higher skilled pilots are also less likely to bail. As for stats, there are modifiers to maneuverability based on skill. Starts at 0.2 at 0 stars and ends at 1.0 at 5 stars. It's not linear, the increase is higher at lower levels.

Code: Select all

      <skill level="0" strafespeed="0.2" strafeacc="0.2" steeringspeed="0.2" steeringacc="0.2" reactiontime="0.0">
...
      <skill level="1" strafespeed="0.5" strafeacc="0.5" steeringspeed="0.5" steeringacc="0.5" reactiontime="0.0">
...
      <skill level="2" strafespeed="0.7" strafeacc="0.7" steeringspeed="0.7" steeringacc="0.7" reactiontime="0.0">
...
      <skill level="3" strafespeed="0.8" strafeacc="0.8" steeringspeed="0.8" steeringacc="0.8" reactiontime="0.0">
...
      <skill level="4" strafespeed="0.85" strafeacc="0.85" steeringspeed="0.85" steeringacc="0.85" reactiontime="0.0">
...
      <skill level="5" strafespeed="1.0" strafeacc="1.0" steeringspeed="1.0" steeringacc="1.0" reactiontime="0.0">
There are some combat maneuvers that seem to be locked behind skill level as well but none of those require more than 2 2/3 stars from what I can tell.

zakaluka wrote:
Sun, 12. Apr 20, 05:17
I've been wondering about this. You know how, as the player, if you assist a kill, you get full credit? Is it possible the same applies to AI pilots?

Don't get me wrong, leveling is absurdly slow. But I have fleets guarding some important exits from Xenon space, each one of them with 10+ asps and 2 or more destroyers. It seems like my pilots are leveling faster than they should be if ONLY a killing blow counts as a kill. Given the graph and percentages you showed us for combat and leveling.
Levels aren't given only for killing blows, no. However, chance factor of leveling is based on an arbitrary calculation of the ship's contribution to the the battle. The script basically pools the combined hull of all enemies and the combined dps of all allies in the battle, then checks the ship's dps against that.

This is only for hard kills though, easy kills always give the same chance factor regardless of contribution. In addition, hard kills also give an extra easy kill roll. So the "competition" for experience won't be as noticeable until the ship hits the level cap for easy kills (Vanilla: 3 stars piloting, 4 stars morale. This mod: 4 stars piloting, 5 stars morale).
Last edited by zakaluka on Thu, 3. Dec 20, 19:50, edited 6 times in total.

zakaluka
Posts: 521
Joined: Sat, 16. Nov 13, 19:47

Re: Digest of technical information re: pilot skill levels

Post by zakaluka » Thu, 3. Dec 20, 15:54

reserved for future use.

zakaluka
Posts: 521
Joined: Sat, 16. Nov 13, 19:47

Re: Digest of technical information re: pilot skill levels

Post by zakaluka » Thu, 3. Dec 20, 16:16

.

Post Reply

Return to “X4: Foundations”