[X3TC/AP] [SCR] Ship Services

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
terodil
Posts: 149
Joined: Sat, 12. Aug 17, 22:13
x4

[X3TC/AP] [SCR] Ship Services

Post by terodil » Thu, 2. Jul 20, 00:02

shipServices
by terodil


Current version: 1.1

Use cases:
  1. You want ships to be able to slowly repair their own hull over time, and/or carriers to be able to repair their docked fighters.
  2. You think expert engineers should be able to reduce repair costs.
  3. You want special ships, like the Aran or (via mods) the Mobile Repair Ship, to do their name justice and act as actual mobile repair bases.
  4. You want to be able to train marines on your flagships.
  5. You want to use excess generator energy to create energy cells on ships.
  6. You want drone carriers to do their name justice and produce their own drones.
  7. You want to pick and choose among these options and to make this as cheaty or as punishing as you want.
Download Link (and screenshots):
https://www.nexusmods.com/x3terranconflict/mods/112

How do I use this mod?
Any ship that wants to use these services needs to have the 'Supply Command Software' upgrade installed (available from Argon Equipment docks and some Terran/ATF installations). The new functionality is then accessible via 'Special' -> 'Ship Services'. That will open the local menu.

Local Menu
In the local menu, you can enable or disable each protocol individually, as long as it's available for the given ship. As a general note, bigger ships have better performance than smaller ships, i.e. they can produce more energy cells per time, and they can repair faster. Obviously, they also take longer to repair.
  1. Energy Cell generator: Once enabled, the ship's on-board generators will store excess energy in the form of Energy Cells in their cargo bay. You can either accept the default for the ship's class, or set an individual quantity up to which the generator should stock ECs. The generator is the only protocol that operates for free (apart from buying the Supply Software).
  2. Self-repair: Once enabled, the ship will slowly repair its own hull over time. How long that takes and how much it costs depends on your choices in the global settings (see below), and the details will be shown here. Marines (if available, and if this mechanic is enabled) can reduce the cost. That will also be shown here.
  3. Dock repair: Once enabled, the ship will slowly repair ships docked to it. Obviously, this requires the ship to be able to dock other ships. The options are the same as for the self-repair protocol.
  4. Area-of-effect repair: Two ships, the Aran and the Mobile Repair Base (the latter being unobtainable in vanilla, but in the game files and made available by a few mods), really scream 'lost tactical opportunity'. If you enable this option, these lumbering behemoths will repair vessels parked in space in their vicinity, as long as no enemies are nearby. They are also particularly efficient and repair with twice the speed of an M1.
  5. Marine training: M1s and TLs are large enough to host dedicated marine training facilities. Once enabled, your marines will slowly level up their skills while on board. Credit cost and the time required are, again, defined in the global settings.
  6. Drone carrier support: The drone carriers with their drone haulers were unfinished in the game. I decided I wanted to give them a little more functionality. Now they can produce their own drones, should you wish to enable this. How much this costs and how fast they can do it depends on the global settings.
If you change any of the settings, be sure to hit 'apply and close'. Escaping the menu will quit without saving any changes.
You can also access the global menu from here.

Global Menu
In the global menu, you can tweak almost all aspects of this mod, as well as make changes across all your ships.
  1. You can see a global summary of expenses for the different protocols here.
  2. You can set a credit limit for ship services. While you don't have enough money in your account, they will suspend operations (bar the EC Generator, which is free) until more credits become available, at which point they will resume automatically.
  3. You can set the general performance of the EC Generator by setting a benchmark value for an M1, the highest-performing ship class. All other ships derive their EC Generator performance from this value (see below).
  4. You can set how long it takes an M1 to repair an M3, again, this is a benchmark value. If a lower-class ship repairs itself (or another), it will take longer. It will take even longer if it's not an M3 to be repaired, but an M6 or an M2, for example (see below).
  5. You can set how much this service costs you. You can make this as cheaty or as punishing as you like by changing the multiplier which is given as percent of the (approximate) purchase price. 100 = a repair costs about as much as it would to buy the ship, 50 = it costs only half, 200 = it costs double.
  6. You can set by how much, in percent, on-board marines highly skilled in engineering can reduce repair costs. The effective reduction scales by their skill, noname engineers will hardly save anything, while a near-full complement of five-star engineers will reach this value.
  7. Large ships (M1, TL) can install training facilities for marines. This includes basic skill seminars as well as a holodeck for combat training. You can set both how long it would take to train a marine from 0 to 100 in all skills, and how much it would cost you.
  8. Dedicated drone carriers (e.g., the Argon Griffon or the Teladi Cormorant) can produce fighter drones in sets of 10, 7 of which are Mk. 1 and 3 are Mk. 2. You can set cost and production performance here.
  9. If you wish, you can globally suspend operations of specific modules, until you order them to resume again.
  10. In Mass Operations, you can order all your ships to activate or deactivate certain modules at once. This can save a lot of time if you just bought a ton of traders that should generate EC, or if you decide that you don't want any of your ships to repair themselves any more.
  11. You can also enable/disable a script that activates the desired modules automatically for all new ships (purchased or captured). This is an experimental feature, not really optimised and can slow down the game if you have a lot of ships, hence the red warning text regarding performance.
  12. The advanced settings allow an experienced user to set certain options with potentially high performance impact. You really should not need to use any. The debugging feature also sits here (0 = default, none, 4 = full debug logging), if things should go wrong. You can also issue order 66 here, which stops all running scripts and frees all memory used by this mod.
A (rather technical) note on the performance of ship services
The higher the ship class, the better its performance in general, and the higher the effort required to repair it. If you are interested in the details, carry on reading; otherwise you can skip the rest of this section without missing anything.

This is implemented via a matrix of multipliers that affect the time required to complete an operation. The first multiplier depends on the ship doing the job, the 'subject'. If you go by the defaults that come with this mod, a M1 has a subject multiplier of 100, whereas a M3 has a subject multiplier of 1000, i.e. the M3 would take 10 times as long to repair itself than it would take the M1 to repair the same M3 (if docked).

The second multiplier depends on the ship having the job done to it, the 'object'. If you go by the defaults, a M3 has an object multiplier of 100, whereas an M2 has an object multiplier of 5000, i.e. if an Aran had both to repair, the M2 would take 50 times as long to get repaired than the M3.

Combined with the reference value given in the global options ('how long does it take an M1 to repair an M3'), you get a matrix of repair times that you can fit entirely to your liking. The multipliers can be changed in the t-file, if you want, I couldn't be bothered making an in-game menu for them... yet. Or maybe forever.

Code: Select all

t-file ID   default      description
*  10         1000      How much longer it takes a small ship compared to an M1 to repair an M3 (usually, self only), in percent
*  11          500      How much longer it takes a medium ship (M6, TP) compared to an M1 to repair an M3, in percent
*  12          250      How much longer it takes a larger `carrier` (M7, M2, TL) compared to an M1 to repair an M3, in percent
*  13          100      Reference scalar (should really be 100), how long it should take an M1 to repair an M3, in percent
*  14           50      How much longer it takes a Mobile Repair Base / Aran compared to an M1 to repair an M3, in percent
*  15          100      Reference scalar (should really be 100), how long it should take to repair a small ship, in percent
*  16          500      How much longer, in percent, a medium ship takes compared to an M3 to be repaired
*  17         2500      How much longer, in percent, an M7 takes... etc.
*  18         5000      How much longer, in percent, a large ship (M1, M2, TL) takes... etc.
Why this mod? There's already <X>.
I am exceedingly grateful for the inspiration by Logain Abler (esp. his capital ship ec generator and the drone carrier scripts) and by tatakau and Dr. Bullwinkle (for the marine repair and training scripts), but I wanted to offer a one-stop solution with less frills, more adaptability, and better management options. (It's also a watered down version of my replicator script which implemented actual ware production and ware consumption on ships, which, while nice to watch, wasn't sufficiently practical to release due to cargo space issues.)

This is a cheat!
Yes and no. You can make it into a cheat by setting the global options in a certain way, or you can make it exceedingly punishing (and not actually worth using) by setting them in a different way. My objective was to give you the options and the tools to play the game the way you want. The default is what I like to play with, slightly in my favour but still reasonable; pick, choose and adjust the way you like.

How large is the impact on PC performance?
Low, although ultimately that depends on how many of your ships have one or more of the protocols running. In my tests with hundreds of ships I have been fine, but if you really run into performance issues, you can always reduce the number of ships using any of the protocols (e.g., just use a carrier with the dock repair option instead of the self-repair option on every individual fighter, which really doesn't make much sense anyway).

Note that the auto-enable protocol function available in the global options can potentially put a significant strain on performance, which is why it's switched off by default. You can use it, but if you run into issues, this is the first switch I'd disable, especially since the functionality is readily available with the mass operation options at a far lower impact (though no longer automatic).

How do I install this mod?
There are two folders in the zip file. Extract both ('t' and 'scripts') and copy them into the base game directory (in the case of X3TC) or into the addon folder under the base game directory (in the case of X3AP).
You need to have tagged your game as ***modified*** (a lot of other mods do this already), otherwise check the web for instructions (keyword 'Thereshallbewings').

How can I activate or deactivate specific services?
When installed, nothing actually happens until you start a protocol on one of your ships. You can disable the protocols the same way, or by using the mass operations in the global menu.

How can I deinstall this mod?
This script can be safely removed from your savegame if you take the following steps:
  1. Via the global administration menu, issue order 66 (under 'advanced options'). This will stop all running scripts and free all memory, but may need a little time to finish.
  2. Wait around 1.5 minutes (at the default interval of 30s, correspondingly longer if you increased it) to be sure everything is truly gone.
  3. Save the game, and quit the game.
  4. Delete the files you copied during installation.
  5. Start the game, and load your savegame. Done.
Halp! I discovered a bug!
Congratulations! You can keep it! ... no, in seriousness, I'm sorry that it happened, and I'd be grateful if you could report it here so I can fix it. To help me analyse the situation, it would be ideal if you could set the debug level to 4 (global menu -> advanced options) and keep the game running for a minute or two, then find the log07770.txt file in your documents folder (usually users\yourusername\documents\Egosoft\X3AP) and copy its content either into your post or store it somewhere online where I can access it.

Compatibility
Usable with X3TC and AP, regardless of version.
I tried not to step on anybody's toes and consulted the reference lists to find free slots. I use pageID 7770 and command slot 554, if another script uses those too, there will be issues. Problems might also arise if you have mods altering the game on a fundamental level, e.g. how marine skills work.

Special thanks
All my work is original. Nevertheless, I wish to specifically thank a few modders for their inspiration and fantastic work in general:
Logain Abler (ec cap ship generator, drone carrier, LPN)
tatakau (marine repairs and training)
Dr. Bullwinkle (has kept so many scripts alive and updated/bugfixed them. Seriously, thank you.)
Cycrow and especially SirNukes for helping me cope with a very annoying DATATYPE bug in XStudio. SirNukes, you are an angel for writing that python script for me.
Last edited by terodil on Fri, 15. Jan 21, 11:13, edited 2 times in total.
My X3 mods: Ship Autoclaimer - Ship Services - Friendlier War Sectors - in development: Logistics Centre

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: [X3TC/AP] [Script] Ship Services

Post by Joubarbe » Thu, 2. Jul 20, 02:29

Well presented and serious script, congrats!
Out of curiosity, what is the DATATYPE bug you're talking about?

terodil
Posts: 149
Joined: Sat, 12. Aug 17, 22:13
x4

Re: [X3TC/AP] [Script] Ship Services

Post by terodil » Thu, 2. Jul 20, 10:09

Hi Joubarbe, thank you! If just a few people use and like it, I'd be quite glad.

Re: the datatype bug: XStudio treats datatype constants as shorts, apparently, leading to the bug that [DATATYPE_PASSENGER], which is something like 65538 or so, is wrapped around and stored as 2 in the 'compiled' code. This means that if you use that constant in a conditional to find out if what you're looking at is a passenger, it will always fail. Caused me a bit of a headache, and unfortunately it's a bug that's only mentioned on one or two russian sites and never got fixed. SirNukes wrote a python script for fixing this bug in compiled scripts: viewtopic.php?f=94&t=297825&p=4866387#p4866412
My X3 mods: Ship Autoclaimer - Ship Services - Friendlier War Sectors - in development: Logistics Centre

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: [X3TC/AP] [Script] Ship Services

Post by Joubarbe » Thu, 2. Jul 20, 11:00

Ok. I personally use "if $passenger -> exists", then the datatype command for other objects, if any.

terodil
Posts: 149
Joined: Sat, 12. Aug 17, 22:13
x4

Re: [X3TC/AP] [Script] Ship Services

Post by terodil » Thu, 2. Jul 20, 12:47

Yes, the $passenger -> exists method has its uses, and I do use it quite often. My problem arose when in a previous version, I would have an array of objects that needed stuff done (in this case, be repaired or be trained). The array would contain objects of either DATATYPE_SHIP or DATATYPE_PASSENGER, hence my need to identify the datatype to determine what kind of job was needed (repair or training). (The situation was slightly more complex there, as I was using a multitude of filters to determine what objects would be affected, self/docked/in passenger bay/ships in area/ships docked to ships in area/passengers in passenger bays of ships in area, so I needed a degree of abstraction to be somewhat efficient. The released version is much simpler with no second-level objects, so I no longer need it. But it was still an annoying bug that cost me a few hairs.)
My X3 mods: Ship Autoclaimer - Ship Services - Friendlier War Sectors - in development: Logistics Centre

terodil
Posts: 149
Joined: Sat, 12. Aug 17, 22:13
x4

Re: [X3TC/AP] [Script] Ship Services

Post by terodil » Fri, 15. Jan 21, 11:11

Updated to v1.1: Minor bugfix; fuel settings now observe the debug setting appropriately and will no longer spam the logfile.
My X3 mods: Ship Autoclaimer - Ship Services - Friendlier War Sectors - in development: Logistics Centre

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Re: [X3TC/AP] [SCR] Ship Services

Post by Brinnie » Fri, 15. Jan 21, 18:28

Thanks

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Re: [X3TC/AP] [SCR] Ship Services

Post by Brinnie » Tue, 19. Jan 21, 15:44

Hi, I am quite happily using Ship Services (very useful script, cheers) but I would like to install CODEA .
Are the two scripts going to clash as they both deal with ship repairs?

terodil
Posts: 149
Joined: Sat, 12. Aug 17, 22:13
x4

Re: [X3TC/AP] [SCR] Ship Services

Post by terodil » Fri, 22. Jan 21, 22:15

Brinnie wrote:
Tue, 19. Jan 21, 15:44
[...]I would like to install CODEA . Are the two scripts going to clash as they both deal with ship repairs?
Hi, sorry, I was afk for a couple of days. No, they won't clash. The worst that could happen is that if you activate repairs in both scripts, they'll both repair at the same time, i.e. much faster than you would probably like.

I'm not sure if CODEA allows you to disable their repair functionality. If not, or if you like how they handled repairs better than this script, you can simply switch off repairs in my script (easily done via the mass change function in 'general settings') and keep using its remaining functionality. CODEA only has carriers repair their docked ships, correct? If you still want repairs on your non-carrier playership, or if you like having your ARAN/MRS as mobile repair bases, you can just use those bits of functionality from my script on top of the rest CODEA does. It's your call really. Tweak the combination however you like. My script was designed to allow the player to pick and choose.
My X3 mods: Ship Autoclaimer - Ship Services - Friendlier War Sectors - in development: Logistics Centre

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Re: [X3TC/AP] [SCR] Ship Services

Post by Brinnie » Sat, 23. Jan 21, 21:21

terodil wrote:
Fri, 22. Jan 21, 22:15
Hi, sorry, I was afk for a couple of days. No, they won't clash...
Hi, no need to apologize and I thank you for your reply.


Anyway, I went ahead and installed CODEA while still having your script running and from what I can tell you are right in saying that the two do not clash.

It is my intention to use CODEA's repairs facilities for its fighters not because I prefer it that way but simply to integrate it with the rest of Lucike's scripts that I have installed, like the personnel aspect of it.

I think the two scripts take a total different approach to deal with repairs and I reckon they cannot be compared, they are both equally useful to me. Ship Services is unbeatable for simplicity of use and peace of mind not

to mention it's ready "out of the box". I fire it up on the ships that I want to use it on and I can forget about refueling and repairs (these are the 2 functions I have been using for so far) while I can carry on with other things.


The only thing I have noticed is that the fighters that are damaged get tagged with asterisks by CODEA to indicate the level of damage sustained and that remains even after your script has fixed them. I will find out by playing if

with time that gets refreshed by the game and the asterisks removed, for example after taking the fighters out and docking them.

Like I said I will use CODEA to do repairs on its ships while I'll use yours for other carriers and ships, that is when I figure out how to setup the tenders and CLSs for CODEA to automatically restock its carrier with the microchips

and ores required for the repairs, until then I shall run your script on CODEA carriers too. If I run into problems I will post here, in case it could be of interest to others.


Cheers.

terodil
Posts: 149
Joined: Sat, 12. Aug 17, 22:13
x4

Re: [X3TC/AP] [SCR] Ship Services

Post by terodil » Sat, 23. Jan 21, 21:41

Thanks, Brinnie, for your report. I hope the Asterisk issue fixes itself; unfortunately that is too deep in Lucike's script for me to fix on my end.

I'm relatively new to modding X3 and you cannot imagine how glad I am that a) people actually use my scripts and b) they get mentioned in the same sentence as the mythic titans like CODEA. You made my day :)
My X3 mods: Ship Autoclaimer - Ship Services - Friendlier War Sectors - in development: Logistics Centre

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Re: [X3TC/AP] [SCR] Ship Services

Post by Brinnie » Mon, 25. Jan 21, 12:04

Don't lose sleep over the asterisks, it's only cosmetics, the fighters get fixed regardless of how many asterisks are shown. A bit of a case of "false positives".

However, I don't know what triggers it but I can tell you that they disappear, seemingly at random, all by themselves.

Besides, who cares? :)

I am too busy doing my head in trying to figure out how to manage CODEA and the resupply of its battlegroups in particular, MEFOS, the personnel management, etc.. to notice a few asterisks on the paintwork of a few fighters.

ps.It is certainly not evident that you are new to modding, this script is very polished and, in my opinion, is lacking nothing at all.

dantebelmondo
Posts: 17
Joined: Sun, 22. Mar 15, 22:32
x4

Re: [X3TC/AP] [SCR] Ship Services

Post by dantebelmondo » Wed, 7. Apr 21, 22:39

Being use this scripts for some time now, effective and efficient. Also after looking at your codes, nicely done!

dantebelmondo
Posts: 17
Joined: Sun, 22. Mar 15, 22:32
x4

Re: [X3TC/AP] [SCR] Ship Services

Post by dantebelmondo » Fri, 20. Aug 21, 20:35

Looked like I double posted.
I fixed and tweaked this wonderful script.

1. Fixed plugin.tero.repl.menu.global: $droneCostPerInt = $globalData[42] => $droneCostPerInt = $globalData[44]. A typo really.
2. Fixed t file: "A set of 10 drones costs" => "Total cost". This number is actually the total cost of all the drones. I double checked with debug log file.
3. Tweaked the check for drone carrier: Check the drone hauler in cargo space => Check the ship type. The drone hauler check does not work for me.
4. Tweaked the marine training ship requirements: [TL] or [M1] to [TL] or [M7]. I always put my marines in M7M.
5. Tweaked the default EC gen. to 30 jumps for each ship category.
6. Tweaked the default drone production to be 300 per hour and cost 3 mil. in total (around avg. price).

For version 1.1 only
Spoiler
Show
Download:
https://www.mediafire.com/file/xw3l8lbq ... es.7z/file
Only contains the fixed files, you still need the original files.
Tested on AP 3.3
Last edited by dantebelmondo on Sun, 22. Aug 21, 04:37, edited 1 time in total.

terodil
Posts: 149
Joined: Sat, 12. Aug 17, 22:13
x4

Re: [X3TC/AP] [SCR] Ship Services

Post by terodil » Sat, 21. Aug 21, 12:02

dantebelmondo wrote:
Fri, 20. Aug 21, 20:35
1. Fixed plugin.tero.repl.menu.global: $droneCostPerInt = $globalData[42] => $droneCostPerInt = $globalData[44]. A typo really.
Thank you for your posts, dantebelmondo, and for tracking down this bug :star: -- a fix will be included in the upcoming version.
2. Fixed t file: "A set of 10 drones costs" => "Total cost". This number is actually the total cost of all the drones. I double checked with debug log file.
Correct. English is not my native language, but in my understanding 'a set of 10 drones costs X' means that all 10 drones together cost X. I used this slightly unwieldy phrase to account for the fact that the drone set could be composed of different drones in different quantities. I'm unconvinced that this wording is better.
3. Tweaked the check for drone carrier: Check the drone hauler in cargo space => Check the ship type. The drone hauler check does not work for me.
This is more than a tweak, this could potentially be a bug. Could you please let me know which M7C you were using, if you are using any mods that might renumber or modify drone carriers and/or drone haulers in the tships file, or if any mods remove the vanilla haulers from M7C inventories?
4. Tweaked the marine training ship requirements: [TL] or [M1] to [TL] or [M7]. I always put my marines in M7M.
5. Tweaked the default EC gen. to 30 jumps for each ship category.
6. Tweaked the default drone production to be 300 per hour and cost 3 mil. in total (around avg. price).
In the future, I might include different t-files for different presets (e.g. player-friendly - realistic - punishing). I'll keep your personal tweaks in mind.

ETA: Any other ideas to round off functionality? Anything you felt was missing?
My X3 mods: Ship Autoclaimer - Ship Services - Friendlier War Sectors - in development: Logistics Centre

dantebelmondo
Posts: 17
Joined: Sun, 22. Mar 15, 22:32
x4

Re: [X3TC/AP] [SCR] Ship Services

Post by dantebelmondo » Sun, 22. Aug 21, 04:31

terodil wrote:
Sat, 21. Aug 21, 12:02
Correct. English is not my native language, but in my understanding 'a set of 10 drones costs X' means that all 10 drones together cost X. I used this slightly unwieldy phrase to account for the fact that the drone set could be composed of different drones in different quantities. I'm unconvinced that this wording is better.
On the Local Administration Menu, the texts are:
The ship could construct 200 drones per hour, at a cost of 660000 credits.

On the Global Administration Menu, the texts are:
The drone carrier can construct 20 set(s) of drones per hour.
A set of 10 drones cost 660000 to produce.

The problem is whether this 660000 is the total amount or the per set amount. Thanks to your debug codes:
Spoiler
Show
[task.ship] Time: 101 -- Ship: YM7GM-59 -- (produceDrones) Moved fighter drones to cargo bay: Mk. 1: 1, Mk. 2: 0. Charged 5500 credits.
Details: droneMk1Amount = 1, droneMk2Amount = 0, shipFreeVolume = 2500, effectiveVolMultPC = 100
Details: droneMk1EffectiveAmount = 1, droneMk2EffectiveAmount = 0, droneMk1CurrentPC = 17, droneMk2CurrentPC = 50
[task.ship] Time: 131 -- Ship: YM7GM-59 -- (produceDrones) Moved fighter drones to cargo bay: Mk. 1: 1, Mk. 2: 1. Charged 5500 credits.
Details: droneMk1Amount = 1, droneMk2Amount = 1, shipFreeVolume = 2498, effectiveVolMultPC = 100
Details: droneMk1EffectiveAmount = 1, droneMk2EffectiveAmount = 1, droneMk1CurrentPC = 34, droneMk2CurrentPC = 0
[task.ship] Time: 161 -- Ship: YM7GM-59 -- (produceDrones) Moved fighter drones to cargo bay: Mk. 1: 1, Mk. 2: 0. Charged 5500 credits.
Details: droneMk1Amount = 1, droneMk2Amount = 0, shipFreeVolume = 2492, effectiveVolMultPC = 100
Details: droneMk1EffectiveAmount = 1, droneMk2EffectiveAmount = 0, droneMk1CurrentPC = 51, droneMk2CurrentPC = 50
[task.ship] Time: 192 -- Ship: YM7GM-59 -- (produceDrones) Moved fighter drones to cargo bay: Mk. 1: 1, Mk. 2: 1. Charged 5500 credits.
Details: droneMk1Amount = 1, droneMk2Amount = 1, shipFreeVolume = 2490, effectiveVolMultPC = 100
Details: droneMk1EffectiveAmount = 1, droneMk2EffectiveAmount = 1, droneMk1CurrentPC = 68, droneMk2CurrentPC = 0
[task.ship] Time: 222 -- Ship: YM7GM-59 -- (produceDrones) Moved fighter drones to cargo bay: Mk. 1: 1, Mk. 2: 0. Charged 5500 credits.
Details: droneMk1Amount = 1, droneMk2Amount = 0, shipFreeVolume = 2484, effectiveVolMultPC = 100
Details: droneMk1EffectiveAmount = 1, droneMk2EffectiveAmount = 0, droneMk1CurrentPC = 85, droneMk2CurrentPC = 50
[task.ship] Time: 252 -- Ship: YM7GM-59 -- (produceDrones) Moved fighter drones to cargo bay: Mk. 1: 2, Mk. 2: 1. Charged 5500 credits.
Details: droneMk1Amount = 2, droneMk2Amount = 1, shipFreeVolume = 2482, effectiveVolMultPC = 100
A set of 10 drones cost 33000. So this user input number is actually the total cost rather than the per set cost. So I suggested change the Global Settings text to "In total they cost".
This is more than a tweak, this could potentially be a bug. Could you please let me know which M7C you were using, if you are using any mods that might renumber or modify drone carriers and/or drone haulers in the tships file, or if any mods remove the vanilla haulers from M7C inventories?
Your implementation is fine. I started a new game in vanilla and my Griffon Sentinel is recognizable as DC. I think that's my own WareLists problem for my current playthrough. Yours is more robust indeed.

Everything else is great!

I recently posted all my fixes to the inactive threads. I'm glad you are still active! I will use spoiler tag to hide my link for now.

terodil
Posts: 149
Joined: Sat, 12. Aug 17, 22:13
x4

Re: [X3TC/AP] [SCR] Ship Services

Post by terodil » Thu, 26. Aug 21, 14:17

Awesome, that must be one of the best bug reports I've ever seen. Thank you, I see the inconsistency now and will fix it with the next release as well.

Speaking of which, the new version will take a few days, because I've decided to also expand the service offering -- I feel that the delay is acceptable as neither of the bugs are critical, and your fixes can tide people over if they need them.

I'm currently planning to include (as per the objective of my mod, all features will be optional and configurable):
- [Playership Only] Derelict Appropriation Service (already have that as a separate script, just need to merge this)
- [Playership Only] Life Insurance Subscription Service
- [Playership Only] Vessel Scanning Service
- [Playership Only] Asteroid Scanning Service
- [All ships] Lasertower Remote Rebooting Service (just to fix the age-old 'erratically hostile lasertower in friendly sector' bug)
- [All ships] [just an idea, not decided] Ware Cloaking Service (hide illegal goods from police, kinda like Software Signature Scrambler, but for wares)

More ideas would be very welcome.
My X3 mods: Ship Autoclaimer - Ship Services - Friendlier War Sectors - in development: Logistics Centre

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”