[Script] Capture Stations v1.0 by Nividium 13/02/09

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

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

User avatar
Nividium
Posts: 800
Joined: Tue, 21. Aug 07, 01:31

[Script] Capture Stations v1.0 by Nividium 13/02/09

Post by Nividium »

Name of Script Package: Capture Stations
Version Number: 1.00
Date Released: 13/02/2009
Last Updated: n/a
Script Created For: X3 Terran Conflict v 1.4+
File Package Available: X3 Plugin Manager "SPK"

Download Capture Stations

Description:

This script will enable you to capture NPC stations/factories. You need a TP class ship and marines or Mercs to take a station by force. It doesn't matter what training a marine/merc has, as long as he can fire a rifle, he's good enough. The more Marines/mercs you have the better, so get at least 10 for your TP ship. There is a 50% chance that you will be outnumbered and lose a battle for a station. Stations don't have that much in the way of armed security so for the most part capture is common. You will suffer a sizeable loss of rep or notoriety with the race of the station whether you win or lose the battle. If you win the battle, any remaining marines/mercs will stay behind and form the new security force for the newly acquired station. You can capture both blue and red stations ie friend or foe. For foe stations, the marines will use a carrier wave feedback loop to hack the station's docking computer which will allow them to dock at the foe station. You need to have the TP in the target sector where the target station is before using the [Capture Stations] command. Desirable indications for those who want to play as Pirates and cannot buy stations from a shipyard or cannot afford to buy stations, but, can afford to buy 10 marines or mercs from time to time. DONOT use on a plot enabled station, a race HQ, stations that sell jumpdrives or transporter devices. DONOT use your own personal [PLAYERSHIP] TP class ship to try and capture stations!

Once your TP and marines are in the correct sector, activate the command. You will be prompted for a sector and station so input that. That's it. The TP will dock at the victom station and the battle will begin.


Required Equipment:

- TP class ship
- Marines or Mercs

Installation: Use the X3 Plugin Manager.

Uninstall: Use the X3 Plugin Manager.

Version History: Version 1.00 Initial Release.

Command Slots Used: <t id="656">COMMAND_TYPE_PIRACY_56</t>

Text File Used: 7233-L044.xml
User avatar
Krewzur
Posts: 725
Joined: Mon, 16. Jun 08, 20:14
x4

Post by Krewzur »

If your marines have a higher combat skill level does that raise the chance of capturing the station, or is it a 50% chance no matter how good they are?

Also when you capture the station does it keep all the wares it had on board before capture?

And will it work on NPC EQ docks?
Corsair 400c // Intel i7 8700k // H100i v2 // ASUS Maximus X Code // ASUS 1080ti Strix OC // 2x8GB Corsair Vengeance 3200MHz // Samsung 960 Evo 250GB // 960GB SanDisk Ultra II // Corsair RM850i
User avatar
Nividium
Posts: 800
Joined: Tue, 21. Aug 07, 01:31

Post by Nividium »

amurph0 wrote:If your marines have a higher combat skill level does that raise the chance of capturing the station, or is it a 50% chance no matter how good they are?
No, their skill level is irrelevant. But, their numbers are relevant, the more the better the chances.
amurph0 wrote:Also when you capture the station does it keep all the wares it had on board before capture?
Yes, it keeps all the wares it had onboard before capture and it also maintains the secondary wares, well not maintain but "keeps" them as is.
amurph0 wrote:And will it work on NPC EQ docks?
Yes, it works on all NPC stations except shipyards, but will not maintian the level of tunings for engine and rudder optimizations etc.
Last edited by Nividium on Fri, 13. Feb 09, 18:20, edited 1 time in total.
X420TokeAlot
Posts: 52
Joined: Sun, 10. Dec 06, 03:56

Post by X420TokeAlot »

Very nice will have to try it out when finished downloading. :)
Chavve84
Posts: 56
Joined: Sat, 7. Feb 09, 14:24
x4

Post by Chavve84 »

This is very nice Nividium, can't figure out why someone hasn't done it before. So good is it.

Here is a suggestion for next update if it can be done, let npc's do the same xD

Cheers
touchstone.
Posts: 3
Joined: Sun, 2. Sep 07, 12:07
x3

Post by touchstone. »

Many thanks, should have been part of the original game. :)
pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador »

Nice.

I cant help but think the relative chance of capturing stations is a bit high.

Excluding the cost of the ship: 10 average marines untrained equates to about 150,000 cr (50% chance) so multiply by 2 gives average cost of capturing a station at 300,000 cr.

Considering the cost of stations relative to this it seems cheap. Admittedly, you have to potentially give the new station credits, trading ships etc. But capturing XL solar plants this way just smarts a little easy to me. When you combine that with having to have adequate race rank required for purchases where this process avoids.

Any chance you can make the relative odds assocated to station size. Though S size ones would need to be beefed up due to the costs of high tech. I think this can be justified when ships use sentry guns.

e.g:

S = 10%, relative marine costs: 1.5 mil.
M = 25%, relative marine costs: 0.6 mil.
L = 15%, relative marine costs: 1.0 mil.
XL = 5%, relative marine costs: 3.0 mil.

I realise the rep loss involved might act as a balancing aid to avoid overuse. But considering how easy it is to regain (and I'm unsure how much rep is lost in the process) it could result in some overuse if the process is seen as a periodic coin toss. Capturing red stations has its own difficulties anyhow due to the obvious threat of its location so even spamming the capture here due to the fact the rep loss is virtually meaningless.

But take the example of fringe pirate building:

You get slightly pally with a pirate station due to localised settings, whose pirate station is in a race sector since pirate relocate themselves, do a build mission for them, capture the station, nuke the base. Relatively consequence free process as stands. Or does the rep loss work itself on sector owner as opposed to faction owner of the station? Though i have to admit fringe building for pirates is less opportunity but I think you see the problem.

The above also adds a scale of difficulty based to cost of the station whose owners would no doubt invest in better security, making it more rewarding a challenge to gain some stations.

--------------------

Another suggestion could be to ensure the TP is fitted with system override software to allow for foe stations to be hacked in the way you describe for this process?
-Villain-
Posts: 396
Joined: Fri, 14. Jan 05, 03:19
x2

Post by -Villain- »

This is great, i just restarted with a pirate mood in mind. Couple of questions though.
If i capture an enemy station in enemy space, will my new station be red to them and suddenly come under fire? I ask because i am going to pillage the Boron and maybe the Split as well in my eye patched themed game.
Is there a way in future updates of this script for the A.I to do it or for it to be a mission....a pirates version of the build missions?
Mckye
Posts: 53
Joined: Sun, 12. Mar 06, 11:41
x3tc

Question

Post by Mckye »

a question that is a little off topic, if i were to capture a xenon shipyard, does it allow for the creation of xenon ships or is it just a filler while a script spawns xenon in the area? and what exactly do xenon stations do? beyond that, would this have any conflicts with the [repackage station] script?
User avatar
Nividium
Posts: 800
Joined: Tue, 21. Aug 07, 01:31

Post by Nividium »

pelador wrote:...I cant help but think the relative chance of capturing stations is a bit high...
I will wait and see what others have to say. I can adjust the chance of capture down if feedback says it is too easy. I know I have failed to capture a station 3 or more times in a row back to back before being able to successfully capture one, so it seemed reasonably balanced to me. If others say it is too easy than I can adjust it downwards easy enough.
User avatar
Nividium
Posts: 800
Joined: Tue, 21. Aug 07, 01:31

Post by Nividium »

-Villain- wrote:This is great, i just restarted with a pirate mood in mind. Couple of questions though.
If i capture an enemy station in enemy space, will my new station be red to them and suddenly come under fire? I ask because i am going to pillage the Boron and maybe the Split as well in my eye patched themed game.
Is there a way in future updates of this script for the A.I to do it or for it to be a mission....a pirates version of the build missions?
Yes, it would be red to them and could come under fire. As for future updates, I have no plans to expand this script to anything other than what it currently is ie a station capture script.
User avatar
Nividium
Posts: 800
Joined: Tue, 21. Aug 07, 01:31

Re: Question

Post by Nividium »

Mckye wrote:a question that is a little off topic, if i were to capture a xenon shipyard, does it allow for the creation of xenon ships or is it just a filler while a script spawns xenon in the area? and what exactly do xenon stations do? beyond that, would this have any conflicts with the [repackage station] script?
I don't think the script will let you capture a shipyard. You could capture a Xenon station though, but they are useless and don't produce anything.
I don't know about the [station repackage] script and how it would react to my station capture script. Sounds like there could be a probem with it ie the secondary resources for NPC stations might not get transferred properly after repackaging the station, but I am just speculating. Can't advise on that though.
pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador »

Nividium wrote:
pelador wrote:...I cant help but think the relative chance of capturing stations is a bit high...
I will wait and see what others have to say. I can adjust the chance of capture down if feedback says it is too easy. I know I have failed to capture a station 3 or more times in a row back to back before being able to successfully capture one, so it seemed reasonably balanced to me. If others say it is too easy than I can adjust it downwards easy enough.
I'm only going by the maths you offered, as to unlucky streaks well thats the roll of the dice. How many stations did you capture first try?

Is a pity, because others like myself may not wish to use it in it's current form due to the relative ease of gaining stations.

Any potential of having "easy" and "realistic" modes you can toggle?
Mckye
Posts: 53
Joined: Sun, 12. Mar 06, 11:41
x3tc

heres a thought

Post by Mckye »

or pelador, you can accept this as the amazing script that it is. realize that not everyone has your exact taste in gaming, download it, spend probably less than an hour figuring out how it works, change some numbers around and get it exactly how you want. as for me, I think self control is the best safety check to prevent breaking something.
pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Re: heres a thought

Post by pelador »

Mckye wrote:or pelador, you can accept this as the amazing script that it is. realize that not everyone has your exact taste in gaming, download it, spend probably less than an hour figuring out how it works, change some numbers around and get it exactly how you want. as for me, I think self control is the best safety check to prevent breaking something.
Sure, or you can work co-operatively with the original developer to make a version more "paletable" to more people. Not everyone has the time or inclination to modify scripts and having one source means you enrich it for everyone not just for yourself.

I'm keen to add this kind of functionality to my game but with the given functionality I wouldn't use it for reasons I've already justified. If Nividium says no, I'll ask if its ok to make a modification for self use. However, considering my personal limitations as a beginner in scripting are likley limiting, having to invest time into someone elses work who understands it already when you can work with them seems the logical step to me.

Also the modifications I require are not generic to the original script as I want it to vary off of station size, again without scripting experience how to do this doesn't (I would assume) make it a "quick tweak". Sure someone might be willing to spend some time to help me learn whats involved, but I'm hoping that person is Nividium. And at the present moment I wouldnt know where to begin converting a "SPK" file into an editable version to convert back.

I'm not placing any expectations on Nividium to do the work, I'm hopefully just asking if it is possible to improve on the original. Is this so bad?

I can appreciate that due to limitations in scripting (overheard/read on forums) you cannot utilise marines skills so readily, so can understand why Nividium has adopted the method he's using. Hence my suggestion above wasnt so drastic a proposal as it could have been and am trying to work within the parameters he's chosen to use. And as such as a suggestion I don't see it as the ultimate solution to my perceived problem with using it.

I also realise this might entail more work to achieve and can appreciate Nividiums need to wait to see if others wish to enrich their game in a similar way, even if logically by the numbers it can be viewed as a gratifying technique to gain stations in game.

I really do appreciate the work Nividium has put into developing this feature to add another game element of fun. I wouldn't be showing such direct interest if not.
Mckye
Posts: 53
Joined: Sun, 12. Mar 06, 11:41
x3tc

Post by Mckye »

the internet has tainted me... I read your entire post waiting for the moment when you would stop explaining your motives and start berating me. there ARE people out there who can have adult conversations still!

I understand where you are coming from with the asking for it to be a little more difficult, I personally would also like it to add to the game, not break it by being a source of cheap stations.

However, being an active reader of the board here, I have seen the tens of posts requesting the ability to capture stations and the varied responses from our own modding superstars. Most of them were daunted by the amount of work it would take to create an even functional script that captured stations and they said as much in their posts. that said, I was thrilled when I saw this script available, regardless of it being a bit of a cheat.

I only spoke up because it seemed like you were requesting a lot and thanking little. now I can see that wasn't really the case.
pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador »

Yes, I was a bit lazy in showing my appreciation to begin with. No excuses really.
User avatar
mostlikely
Posts: 157
Joined: Sat, 29. Nov 03, 23:20
x4

Post by mostlikely »

Nividium: Nice work adding this feature. I always thought someone would make a 'magical marine-transport to station = instant capture' script. But I guess I was pleasantly surprised this time. ;)


Pelador: If your in any way interested in altering the script yourself to adjust it to your liking (I do this to a good number of scripts I use myself).
From plugin.capture.stations.xml

Code: Select all

054   $resistance =  = random value from 50 to 150 - 1
055   $force = $marines * 10
You could alter this to:

Code: Select all

054   $resistance =  = random value from 50 to 550 - 1
055   $force = $marines * 10
To make it a 10% chance when you have 10 marines.
You can pretty much tweak this to your liking.

(I'm happy to PM you more details if your unsure how to do this)

As for making it depend on the size of a station, I'm unsure there is a direct way to get S/M/L/XL through scripting. I know of at least 2 ways to get it in a indirect way (see the complex cleaner script) but that's more complex.[/code]
pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador »

Support would be appreciated. I'll PM you for continuence for personal "tweaking".
pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador »

With much props and kudos to "mostlikely" to helping getting to grips with the script editor I have now done my first script tweak, very basic and am sure isnt probably best method or optimised, but hopefully as an alternative suggestion for those who want to have a more difficulty orientated aspect to boarding stations using Nividiums process.

If Nividium wants to accomodate it or tweak it to fit in a manner more befitting his liking feel free of course, but I'm sure he could probably devise a better system anyhow:

This is what I'm using:

[ external image ]

This I hope means any station with a price and using 10 marines:

< 1,500,000 will have a 50 % of capture
1,500,000 = 45.45%
2,000,000 = 38.46%
2,500,000 = 33.33%
3,000,000 = 29.41%
5,000,000 = 20.00%
7,500,000 = 14.29%
>= 9,000,000 will have a 12.50% of capture.

(And that difficulty is increased for every 1/2 mil in value).

A much more "realistic" process imho for just a few lines of code.

Edit: code didnt show too well on img so here are the modified bits:

Code: Select all

$ware = $target.station -> get ware type code of object
$avgprice = get average price of ware $ware

$difficulty = ( 100 + ( ( $avgprice / 500000 ) * 20 ) ) ...

if $difficulty < 150 ...
   $difficulty = 150 ...
end

if $difficulty > 450 ...
   $difficulty = 450 ...
end

$resistance = random value from 50 to $difficulty - 1
Post Reply

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