[Script][AP] Station Boarding v1.1 (upd. June 08 2021)

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
Mokunen
Posts: 31
Joined: Fri, 24. May 13, 01:42
xr

[Script][AP] Station Boarding v1.1 (upd. June 08 2021)

Post by Mokunen » Mon, 7. Jun 21, 02:34

Description:

This script is a thorough reworking of the original Capture Stations mod by Nividium, following the same concept of allowing the player to capture other races' stations, while attempting to be mechanically similar to vanilla ship-boarding.

Installation:

Image Station Boarding

This script has been built for X3: Albion Prelude v.3 or higher. The version for Farnham's Legacy can be found here.
Cycrow's Hotkey Manager is highly recommended but not mandatory. Using it will make uninstalling a breeze.
Install using Plugin Manager.

Features:
  • Board factories, docks, or even shipyards. Whether you're a dread pirate hated by everyone, want to get yourself one of those pirate-only stations, or just want to put those elite marines to use in cheapening the growth of your manufacturing empire, if it's a station then you can board it, and capture it along with any goods in their holds (minus some specific things, see Limitations).
  • Use any of your ships for boarding, IS and OOS. Both your own playership and remote-controlled ships can be used for boarding, as this script functions from both a hotkey and an autopilot command. You can command any of your ships to board any station anywhere in the universe, and carry out several boarding operations at once. Only requirement is that the ship can carry marines, has Fight Command Software Mk.2 installed, and optionally...
  • Teleporter-aided station boarding. You can initiate boarding by betraying your allies and docking at their stations with a hold full of Rambos ready for action... or, if everyone hates you and docking isn't an option, bring their shields down and just beam them in with your Transporter Device. You'll need to keep your ship in range, protect it, and keep the target's shields down while the Transporter locks in and charges up; having a marine with high Mechanical skill will accelerate this process, emulating the use of this skill in vanilla hull-cutting. Gotta love percussive maintenance :)
  • Variable boarding difficulty. Simply, more expensive stations are better guarded, and equipped with mainframe cores that are better shielded against hacking. The most heavily-guarded of all are central commercial and military installations such as trading docks, military docks, and shipyards among others. The total of your marines' fighting skill will be matched against the defensive forces; if you want to board an expensive or secure installation, nothing short of lots of the best will cut it. Bring a TP.
  • Keep your marines (if they live to tell about it). The original Capture Stations removed the marines from existance due to the game's limitations (you can't really board a station). This script will return them to you after factoring in the losses against the defending force, and give them a bonus to their fighting skill.
  • M7M frigates still get bonuses, no pods required. If it's a frigate and it can launch boarding pods, this script will give it a boost to both transporter range and beaming speed, following the vanilla boarding features these ships have of being able to engage boarding from further away and making entry into the target easier.
  • Once the marines are in, your ship is free. about 98% of the script is actually ran on the station. Once the marines are aboard the station, the boarding will proceed on its own, and you can recall your ship to safety or give it new orders. Just don't lose it or make it leave the sector, because if the marines finish their mission without a base to return to, they'll call it quits.
  • Target hull damage. Just like in vanilla boarding, the average of your marines' engineering skill has an impact on the damage sustained by the station during the combat stage. If the hull integrity falls under a certain threshold, your marines will give up and return to their ship. You can get lucky with unskilled marines in this area, but don't count on it, and the better their engineering skills are, the less repairs you'll have on your hands afterwards.
  • Mostly deterministic. If you have a TP full of SEALs, you can successfully board your target. I think you earned it. In other words, the boarding requirements will never get so high that boarding is impossible or a lucky dice's throw. With cheap stations, you can even have a flawless boarding without casualties. For the more expensive or secure targets however, you'll still lose a few in even the best teams.
  • Highly configurable. The T-file contains a range of options that the user can tweak to match their particular modded environment (balancing difficulty against altered station prices) or their personal taste. Too easy? Too hard? You can adjust it.
Limitations and/or balancing:

Capturing docks and shipyards will require large numbers of elite marines, bring a TP full of your very best. Shipyards will not produce ships, but you will acquire them with one unit of each station they were selling, which can amount to a nice sum.

Captured docks won't sell you free software or ship upgrades, as these are services and not goods (and they are buggy when acquired this way; the script will clean them up upon successfully capturing them). If you'd like to use your own captured docks for this, look into Enhanced Equipment Research And Development by UbuntuFreakDragon.
On the other hand, captured factories will retain their secondary resource, and slowly consume it too. I didn't remove them because their stock could be used by the player, and there's no advantage in the station still having the secondary resource trickling down (as you can't sell to yourself).

At the moment it is not possible to send additional waves of marines to support boarding efforts; the first wave is the only one. As well, the combat stage is simplistic, there are no simulated decks with gradual losses, and if boarding fails, the station regains its original level of defenses. This might be improved on in the future, but given that it's a rather daunting-looking task, don't wait on it.

Required Equipment:
  • Marines.
  • A ship that can carry them.
  • Fight Command Software Mk.2
  • Optionally, a Transporter Device.
  • Optionally, if Improved Boarding is installed, the player can choose its own teleport-boarding-enabling ware to be used instead.
Version History:
  • Version 1: Initial release.
  • Update 1.1:
    Changed handling of reputation loss to make it closer to vanilla values for boarding ships.
    Added loss of police license for the target station's owner race.
    Added configuration option in the T-file to adjust reputation loss.
    Improved script safety checks and task handling.
  • Potential future updates: Better combat, reinforcements, in-game configuration.
Command Slots Used: <t id="656">COMMAND_TYPE_PIRACY_56</t> (This is an intentional conflict with the original Capture Stations mod by Nividium)

Text File Used: 8720-L044.xml

CREDITS:

Nividium, for making the original mod that inspired this.
Cycrow, for Plugin Manager, useful libraries, advice and help with troubleshooting.
X2-Illuminatus, for his help with troubleshooting.
Kurt Fitzner, for the MSCI Handbook.
Made in X-Studio 1.08
And of course, Egosoft, and so many authors of scripts and mods that improve and expand upon their work (and whose scripts i peeked into to find out how to do things).

Permissions: Everyone has permission to alter and use these scripts and text files, whole or in part, for their own projects, and publish the results.

Final words: this is my first serious and full scripting project, previously only having tinkered with other people's works. I tried to ensure it's as failproof and solid as I can make it, taking into account all the things that could misfire, and I actually learned quite a few things on the way. However, there's bound to be issues, so send me all your feedback and bug reports :)
Last edited by Mokunen on Sun, 27. Jun 21, 01:04, edited 3 times in total.

Taylor2008
Posts: 287
Joined: Fri, 20. Mar 09, 17:38
x4

Re: [Script][AP] Station Boarding v1

Post by Taylor2008 » Mon, 7. Jun 21, 03:14

Awesome !!!
Thank you !!

User avatar
laux
Posts: 2285
Joined: Sun, 7. Mar 04, 12:39
x3tc

Re: [Script][AP] Station Boarding v1

Post by laux » Mon, 7. Jun 21, 09:33

Sounds fantastic, I'll give this a try in FL. Or do you see any restrictions?

Mokunen
Posts: 31
Joined: Fri, 24. May 13, 01:42
xr

Re: [Script][AP] Station Boarding v1

Post by Mokunen » Mon, 7. Jun 21, 23:36

Taylor2008 wrote:
Mon, 7. Jun 21, 03:14
Awesome !!!
Thank you !!
You're welcome, hope you enjoy this! :)
laux wrote:
Mon, 7. Jun 21, 09:33
Sounds fantastic, I'll give this a try in FL. Or do you see any restrictions?
I honestly have no idea, I haven't looked into scripting for FL yet, and also didn't play the game too much, so I have no idea if the scripting or boarding gameplay/balance has changed much or at all.

I do plan to support FL eventually, once all the extra things I have in mind for this are finished and I've played that game a bit more, since the improved menus look like a dream. But if you're feeling adventurous, give it a try! Just backup your saves just in case :D

EDIT: I took a look at it and it simply will not work. Do not attempt to use this script in Farnham's Legacy until a specific version for it is linked in the main post.
Last edited by Mokunen on Mon, 21. Jun 21, 22:37, edited 1 time in total.

150147
Posts: 319
Joined: Mon, 31. Mar 08, 13:50
x3tc

Re: [Script][AP] Station Boarding v1.1 (upd. June 08 2021)

Post by 150147 » Mon, 21. Jun 21, 10:11

Just spotted this.
To date I have used the excellent StationBoarding script by Uberex. This reads like an improvement and I would like to try it in my current game FL but Plug in Manager does not allow - get a warning "for the wrong game".
Would be good if this were made available for FL.

Mokunen
Posts: 31
Joined: Fri, 24. May 13, 01:42
xr

Re: [Script][AP] Station Boarding v1.1 (upd. June 08 2021)

Post by Mokunen » Mon, 21. Jun 21, 22:35

150147 wrote:
Mon, 21. Jun 21, 10:11
Just spotted this.
To date I have used the excellent StationBoarding script by Uberex. This reads like an improvement and I would like to try it in my current game FL but Plug in Manager does not allow - get a warning "for the wrong game".
Would be good if this were made available for FL.
I was unaware of that script during the development of mine. I somehow managed to miss it when I first looked for a script that'd let me board stations, and now it's amusing that there's been so many different attempts at this concept each with a different focus.

I'm sorry, but after looking at the new tools and the changes in the scripting language for FL I've decided that support for the new game won't be coming in the short term. Both the game and the tools seem to be getting frequent updates and I want to wait until they have stablilized. Meanwhile there are still things in this script that I want to improve upon, so I also want to reach the point where I'm satisfied with it before trying to convert it to work in FL.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 22702
Joined: Sun, 2. Apr 06, 16:38
x4

Re: [Script][AP] Station Boarding v1.1 (upd. June 08 2021)

Post by X2-Illuminatus » Tue, 22. Jun 21, 20:16

Are you referring to specific changes? X3FL mostly received additions to the scripting engine. While there are a couple of bigger additions, like the new custom menu system, the 'old' way of doing things should still work.

Also feature-wise X3FL is complete with the current update 1.2. Upcoming updates should only see the addition of more localisations, hopefully a linux version, and maybe some bug fixes. There's also a NoSteam.exe for X3FL now.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Mokunen
Posts: 31
Joined: Fri, 24. May 13, 01:42
xr

Re: [Script][AP] Station Boarding v1.1 (upd. June 08 2021)

Post by Mokunen » Tue, 22. Jun 21, 20:55

X2-Illuminatus wrote:
Tue, 22. Jun 21, 20:16
Are you referring to specific changes? X3FL mostly received additions to the scripting engine. While there are a couple of bigger additions, like the new custom menu system, the 'old' way of doing things should still work.

Also feature-wise X3FL is complete with the current update 1.2. Upcoming updates should only see the addition of more localisations, hopefully a linux version, and maybe some bug fixes. There's also a NoSteam.exe for X3FL now.
Then I must be doing something wrong; are you saying that a script I write for X3:AP in the 1.08 X-Editor I've been using should run just fine in X3:FL? The new X-Editor2 for FL errors out when I try to import some of my scripts (for example the main script in this mod), and when copying the code over some commands have to be reformatted or adapted. For example "send incoming message <var/string> to player: display it=<var/number>" is not accepted, the closest is "send incoming message <var/string> to player: type: <var/number>, display it: <var/boolean>", and I wasn't able to find what goes in "type" there, the in-editor description doesn't mention it, and the MSCI reference board entry only has the old version.

Because of this, I figured the scripting language had been changed to accomodate all the new features and improvements in the new game, and that it'd take me time to get used to the new tools and environment and migrate my scripts (time I find myself a tad short on lately, which is why I didn't dig further into it).

In any case, thanks for letting me know it should be stable from now on. I had also not hoped for a linux version, to be honest, that's pretty nice news! :)

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 22702
Joined: Sun, 2. Apr 06, 16:38
x4

Re: [Script][AP] Station Boarding v1.1 (upd. June 08 2021)

Post by X2-Illuminatus » Tue, 22. Jun 21, 21:22

You're right, in this case the script command was changed to accomodate the new feature, namely the addition of different message sections in the player logbook. That's what the type argument is for. It accepts constants from the Player Log section, but can also simply be set to null. Then the command should work like the old one.

Your script will still be loaded by X3FL (if installed to the addon2/scripts folder), but the input values will probably be switched to fit the position of the new command's input values, which may cause some unwanted results.

So the X3AP script command:

Code: Select all

send incoming message 'text' to player: display it=1

will turn into the following in X3FL:

Code: Select all

send incoming message 'text' to player: type: 1, display it: null
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Mokunen
Posts: 31
Joined: Fri, 24. May 13, 01:42
xr

Re: [Script][AP] Station Boarding v1.1 (upd. June 08 2021)

Post by Mokunen » Sat, 26. Jun 21, 05:34

X2-Illuminatus wrote:
Tue, 22. Jun 21, 21:22
You're right, in this case the script command was changed to accomodate the new feature, namely the addition of different message sections in the player logbook. That's what the type argument is for. It accepts constants from the Player Log section, but can also simply be set to null. Then the command should work like the old one.

Your script will still be loaded by X3FL (if installed to the addon2/scripts folder), but the input values will probably be switched to fit the position of the new command's input values, which may cause some unwanted results.

So the X3AP script command:

Code: Select all

send incoming message 'text' to player: display it=1

will turn into the following in X3FL:

Code: Select all

send incoming message 'text' to player: type: 1, display it: null
Thanks for the info, I'll look into releasing an early version this weekend.

EDIT: Initial release for Farnham's Legacy is out. That took more work than I had hoped.

Post Reply

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