Mining skills vs actually mining

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Browser_ice
Posts: 231
Joined: Sun, 5. Feb 06, 18:15

Mining skills vs actually mining

Post by Browser_ice » Tue, 3. Oct 17, 17:40

(doing a seperate thread specifically about skills vs mining to maybe help others to understand)

In my current trying to understand what goes on when my warehouse's ships are supposed to mine, I found that some actions in mining.ship.collect.xml are using a chance factor that I am trying to understand.

do something chance=(this.combinedskill - 50) * 3 (what I use in my debug_text as Skills= value)

How is this combined skills calculated exactly ?

in my debut_text it shows it can be negative or positive.

For example, I have two ships:

1) Miner-Small-Vrak: Navigation=0, Combat=1, Moral=1

its extract from the log:
Line 425: [Scripts] 26689.86 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] homebase Entrepôt I [0x1185f] has 5 offers for [ware.crystals,ware.ice,ware.nividium,ware.ore,ware.silicon]
Line 426: [Scripts] 26689.86 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] Entrepôt I wants 42450(want 62450, expecting 20000) units of Cristaux
Line 427: [Scripts] 26689.86 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] Entrepôt I wants 38376(want 73032, expecting 34656) units of Glace
Line 428: [Scripts] 26689.86 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] Entrepôt I wants 61421(want 61421, expecting 0) units of Nividium
Line 429: [Scripts] 26689.86 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] Entrepôt I wants 47706(want 47706, expecting 0) units of Minerai
Line 430: [Scripts] 26689.86 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] Entrepôt I wants 45132(want 45132, expecting 0) units of Silicium
Line 431: [Scripts] 26689.86 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] now looking for Nividium...
Line 432: [Scripts] 26689.86 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] going to mine Nividium in zone My Testing Sector, sector La Carrière, 25000m away.
Line 433: station in My Testing Sector, Miner-Small-Vrak0.
Line 437: [Scripts] 26689.86 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] there is Nividium in zone My Testing Sector
Line 441: [Scripts] 26691.28 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] destination reached
Line 442: [Scripts] 26691.28 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] miner not interested in Ions
Line 443: [Scripts] 26691.28 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] miner not interested in Plasma
Line 444: [Scripts] 26691.28 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] miner not interested in Hydrogène
Line 445: [Scripts] 26691.28 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] miner not interested in Nividium
Line 446: [Scripts] 26691.28 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] miner not interested in Minerai
Line 447: [Scripts] 26691.28 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] miner not interested in Silicium
Line 448: [Scripts] 26691.28 *** aicontext<mining.ship.station,0x1179f>: [Ship=Miner-Small-Vrak, Mining] miner not interested in Glace
Line 449: [Scripts] 26691.28 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 945: [Scripts] 26814.33 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 994: [Scripts] 26834.45 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 1342: [Scripts] 26930.93 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 1519: [Scripts] 27007.06 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 1753: [Scripts] 27090.01 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 1979: [Scripts] 27213.13 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 2210: [Scripts] 27336.25 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 2540: [Scripts] 27459.35 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 2849: [Scripts] 27582.46 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 2947: [Scripts] 27612.79 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 3214: [Scripts] 27735.92 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 3425: [Scripts] 27858.93 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 3597: [Scripts] 27982.07 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 4025: [Scripts] 28105.24 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 4561: [Scripts] 28228.26 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 4980: [Scripts] 28351.38 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position
Line 5354: [Scripts] 28474.40 *** aicontext<mining.ship.collect,0x1179f>: [Ship=Miner-Small-Vrak, Skills=-120, Mining] no resources found, flying to random position

It is just flying around without fininding anything. Is this related to its skills ?



2) Miner-XL-Vrak: Navigation=1, Combat=2, Moral=0

The Issue I see is that it is taking a long time flying before actually doing anything (look at time diff first 2 lines and last 2 lines):
Line 301: [Scripts] 26683.97 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] now looking for Glace...
Line 302: [Scripts] 26683.97 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] going to mine Glace in zone My Testing Sector, sector La Carrière, 25000m away.
Line 303: station in My Testing Sector, Miner-XL-Vrak0.
Line 307: [Scripts] 26683.97 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] there is Glace in zone My Testing Sector
Line 1620: [Scripts] 27038.07 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] destination reached
Line 1621: [Scripts] 27038.07 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] miner not interested in Ions
Line 1622: [Scripts] 27038.07 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] miner not interested in Plasma
Line 1623: [Scripts] 27038.07 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] miner not interested in Hydrogène
Line 1624: [Scripts] 27038.07 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] miner not interested in Nividium
Line 1625: [Scripts] 27038.07 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] miner not interested in Minerai
Line 1626: [Scripts] 27038.07 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] miner not interested in Silicium
Line 1627: [Scripts] 27038.07 *** aicontext<mining.ship.station,0x113e7>: [Ship=Miner-XL-Vrak, Mining] miner not interested in Glace
...
Line 1636: [Scripts] 27038.13 *** aicontext<mining.ship.collect,0x113e7>: [Ship=Miner-XL-Vrak, Skills=-84, Mining] flying to asteroid:
Line 3695: [Scripts] 28019.80 *** aicontext<mining.ship.collect,0x113e7>: [Ship=Miner-XL-Vrak, Skills=-84, Mining] movement stopped [pickup count: 30, asteroid count: 0 (0)]
Line 3696: [Scripts] 28019.80 *** aicontext<mining.ship.collect,0x113e7>: [Ship=Miner-XL-Vrak, Skills=-84, Mining] drone launched [pickup count: 30, asteroid count: 0 (0)]
Line 3699: [Scripts] 28022.89 *** aicontext<mining.ship.collect,0x113e7>: [Ship=Miner-XL-Vrak, Skills=-84, Mining] movement stopped [pickup count: 39, asteroid count: 0 (0)]
Line 3700: [Scripts] 28022.89 *** aicontext<mining.ship.collect,0x113e7>: [Ship=Miner-XL-Vrak, Skills=-84, Mining] drone launched [pickup count: 39, asteroid count: 0 (0)]

Is this also caused by its skills?
Steam X-Superbox, playing XR
WIndows-7
Intel I5
16Gb Memory
Nvgidia GT 960

w.evans
Posts: 2954
Joined: Tue, 18. Nov 14, 17:23

Re: Mining skills vs actually mining

Post by w.evans » Tue, 3. Oct 17, 22:23

Browser_ice wrote:do something chance=(this.combinedskill - 50) * 3 (what I use in my debug_text as Skills= value)

How is this combined skills calculated exactly ?
combinedskill is a composite of an entity's primary skills and is always a number from 0 - 100. The weight that each skill has differs depending on role. Can't remember the percentages exactly, but according to the wiki, it's:

Leadership 40%
Navigation 35%
Morale 25%

More info here:

https://www.egosoft.com:8444/confluence ... +and+roles

Post Reply

Return to “X Rebirth - Scripts and Modding”