[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

Mckye
Posts: 53
Joined: Sun, 12. Mar 06, 11:41
x3tc

Post by Mckye » Tue, 17. Feb 09, 08:03

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 » Tue, 17. Feb 09, 08:34

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 » Tue, 17. Feb 09, 09:09

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 » Tue, 17. Feb 09, 15:48

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 » Wed, 18. Feb 09, 10:33

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

pelador
Posts: 1399
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by pelador » Sat, 14. Mar 09, 08:55

Even though I have modified this for personal use for a more realistic process based on station cost there is still one noticeable design bug in it:

In order for docking to occur I notice you chanage relations on the station. Whilst this makes sense to use the standard scripted process for docking to occur I cant help but think some emulation might be better.

The reason being is if after these relations have been set you issue a stop command to the TP, the boarding task is then interupted but no checking is done to revert the relations of the station, resulting in effectively a free hack.

Also having now got to grips with the editor a little and used marines skills in scripting I'm in a better position to understand their use, I think the process could easily be upgraded to accomodate effectiveness against the boarding teams abilities, thus making it potentially more "balanced". I can offer some pointers here about manipulation of marines skills if you want?

Meltdown
Posts: 337
Joined: Wed, 6. Nov 02, 20:31

Post by Meltdown » Mon, 1. Jun 09, 06:37

Ickle question: if I cap a pirate station, or some other station that has items that spontaneously pop up in it (without producing them from resources or buying them from other stations), will those items keep popping up?

Or, in other words: will a capped pirate station keep giving me the ability to outfit my ships with pirate gear?

It'd be great to have two or three pirate stations of my very own, so I can wipe out the rest of them without worrying about pirate equipment becoming harder to find.

Thanks.
Eat, drink and be merry, for tomorrow you may die.

xiriod
Posts: 1131
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by xiriod » Mon, 1. Jun 09, 12:04

Meltdown wrote:Ickle question: if I cap a pirate station, or some other station that has items that spontaneously pop up in it (without producing them from resources or buying them from other stations), will those items keep popping up?

Or, in other words: will a capped pirate station keep giving me the ability to outfit my ships with pirate gear?

It'd be great to have two or three pirate stations of my very own, so I can wipe out the rest of them without worrying about pirate equipment becoming harder to find.

Thanks.

I think pirate stations work like AI EQ-docks in that fashion. Upgrades are stocked like any other ware, except if the player owns it I don't think you can get them any more or maybe only get them once and then the stock runs out.

furstukin
Posts: 179
Joined: Sat, 19. Nov 05, 21:36
x3

Post by furstukin » Thu, 16. Jul 09, 18:41

Anyone else have problems with stations losing thier owner if you need to cancel the boarding for some reason? Once I had docked while the ship was docked and the marines were in combat after I undocked it said ship destroyed and I reloaded and told him to undock before that happened. I still had all 5 marines, but the station id lost the "S", at the start of it, which indicated split station. Now I can't target it to take it over anymore. So I moved onto a new station ordered it to be boarded and this time I changed my mind and told the ship to do something else only it happened again. The station id lost the "S" and I can no longer target it to board. Any thoughts?
Don't make me slap Ye!

Ratlaw
Posts: 317
Joined: Fri, 8. Jan 10, 03:39
x3tc

Post by Ratlaw » Sat, 27. Feb 10, 01:38

IT WONT LET ME CAP A WEAPONS FORGE. Is there any reason why not?

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

Post by Nividium » Sat, 27. Feb 10, 10:49

No, can't say that there is any reason for that type of station to be excluded. Or any station for that matter.

Ratlaw
Posts: 317
Joined: Fri, 8. Jan 10, 03:39
x3tc

Post by Ratlaw » Fri, 26. Mar 10, 22:48

I cant board the xenon staion. it says I need remote command mode. What is that?

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

Post by Nividium » Fri, 26. Mar 10, 23:13

Ratlaw wrote:I cant board the xenon staion. it says I need remote command mode. What is that?
That is not part of my script. I don't know what that is.

zorroazteca5
Posts: 6
Joined: Sun, 13. Aug 06, 21:37
x3tc

Post by zorroazteca5 » Thu, 9. Sep 10, 16:07

remote command mode -> means that you dont have to be on board the ship that makes the boarding. :D

User avatar
Sesk
Posts: 441
Joined: Fri, 17. Nov 06, 21:09
x4

Post by Sesk » Wed, 10. Nov 10, 17:41

I've modified the script to just oppose 2 amounts of marines (instead of marines * 10, half a marine is a dead marine imo, but still debating) and have both sides suffer loss at the 2nd and 3rd stage (between 0 and 3).

Just added this after the 1rst and 2nd force check (forceCheck -> lose -> forceCheck -> lose -> result)

Code: Select all

$maxloss = $resistance - $max.loss.per.tick
$resistance = random value from $maxloss to $resistance - 1
inc $resistance =
$maxloss = $force - $max.loss.per.tick
$force = random value from $maxloss to $force - 1
inc $force =
So the station starts with a resistance of 5 to 15, you start with a force of 10. You or the station can lose up to 6 marines. So if you are unlucky/lucky (in that order), you can end up with a 10v15 and win (10v9) and on the flip side, start out with 10v5 and lose (4v5). And of course you can win with 1 marine (1v-1).

black2906
Posts: 4
Joined: Sat, 25. Dec 10, 12:45

I cannot download it, would you send it to me ?

Post by black2906 » Sat, 25. Dec 10, 12:53

deleted

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

Re: I cannot download it, would you send it to me ?

Post by Nividium » Sat, 25. Dec 10, 16:37

black2906 wrote:deleted
No it's not deleted and the link works just fine.

black2906
Posts: 4
Joined: Sat, 25. Dec 10, 12:45

Re: I cannot download it, would you send it to me ?

Post by black2906 » Sun, 26. Dec 10, 09:58

Nividium wrote:
black2906 wrote:deleted
No it's not deleted and the link works just fine.
No, I mean, I want deleted that reply(I don't know how~), not your link.

your link is fine, my network does not work fine, I'v got it now, Fortunately(I tried a hundred times).

Any way, this is a useful script, thanks for your work.

User avatar
LizardCor
Posts: 256
Joined: Sat, 19. Mar 11, 02:57
x3tc

Post by LizardCor » Sat, 17. Dec 11, 06:34

Yep. Link does not work :/

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

Post by Nividium » Sat, 17. Dec 11, 13:39

LizardCor wrote:Yep. Link does not work :/
It's been another year and my website host has been cracking down on offsite file linking links, so they changed something to prevent direct linking. Try right-mouse-clicking on the link and select "save target as" and see if that saves the file for you.

Post Reply

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