[SCRIPT] Force NPC Undocking

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

User avatar
Graxster
Posts: 815
Joined: Sat, 14. Oct 06, 01:01
x3tc

[SCRIPT] Force NPC Undocking

Post by Graxster » Sat, 8. Nov 08, 22:28

Force NPC Undocking

:arrow: Forces all NPC ships to undock from the selected station.

REQUIRED: Cycrow's Community Configuration Menu

Image

Tired of waiting around to dock at a shipyard, equipment dock, or other station? Believe it or not, the game has a default behavior to "idle in station". This can be annoying if you're trying to get 3 or more ships docked at a shipyard. This script will force all docked NPC ships to undock from the selected station. Enjoy!

-Grax

Update - v2

Added RAR download. Changed script to work more effectively.
Note that at times you may get one or two "stubborn" ships that
don't want to undock. Just run the command a second time and
it should work.


SPK
Image

RAR archive
Image
Last edited by Graxster on Wed, 26. Nov 08, 19:26, edited 1 time in total.

Lancefighter
Posts: 2936
Joined: Sun, 19. Dec 04, 03:41
xr

Post by Lancefighter » Sat, 8. Nov 08, 22:31

Ohh, looks like fun! Also helpful if you are trying to get that one guy to undock for that terran plot
in the market for a new sig, willing to pay 1 billion credits for a proper sig...

Beej315
Posts: 7
Joined: Wed, 1. Jun 05, 21:26
x2

Post by Beej315 » Sun, 28. Dec 08, 14:18

Thanks for this as I need to get NPC's off my complex so that I can pack it up..

However, NOOB question.. How do you get the plugin screen that you have.. I have tried looking everywhere and cannot find it for the life of me..

I have the plugin installed but cannot find the script for the sake of looking..

Thanks for any help.

aquemnun
Posts: 247
Joined: Sun, 26. Oct 08, 20:47

Post by aquemnun » Sun, 28. Dec 08, 14:33

is this for other race stations or just yours? I'm sure that you can undock npc ships from your stations by changing "other races can dock at this station" to no and then back to yes again.
There once was a buggy AI
who decided her subject must die
when the plot was uncovered,
the subject discovered
that sadly the cake was a lie.

Beej315
Posts: 7
Joined: Wed, 1. Jun 05, 21:26
x2

Post by Beej315 » Sun, 28. Dec 08, 16:34

Yea I set it to not trade but some ships just idle there for ages, I put seta on 1000% and waited and waited but the darn ship just would not undock.

aquemnun
Posts: 247
Joined: Sun, 26. Oct 08, 20:47

Post by aquemnun » Sun, 28. Dec 08, 17:34

ah ok, fair enough.
There once was a buggy AI
who decided her subject must die
when the plot was uncovered,
the subject discovered
that sadly the cake was a lie.

Beej315
Posts: 7
Joined: Wed, 1. Jun 05, 21:26
x2

Post by Beej315 » Tue, 30. Dec 08, 16:24

Figured it out eventually and all sorted now.. Works a charm..

jogar
Posts: 27
Joined: Sat, 10. Jul 04, 17:41
x3tc

Post by jogar » Mon, 2. Mar 09, 06:25

How big a deal would it be to make this script run in a loop on a specific station or complex?

I like the NPCs to buy my stuff, but eventually they fill up all my valuable docking spaces and I have to flip the "NPCs can trade" toggle off and on again. It'd be great if the station could do this on its own like every hour or so.
For great justice.

argon_emperor
Posts: 1221
Joined: Mon, 12. Dec 05, 08:41
x4

Post by argon_emperor » Mon, 2. Mar 09, 08:54

Well, to get it to run on a specific station in a loop would probably require the use of a command slot (station command), and some sort of a wait function/while loop. The while loop would allow it to continually be run until the command was terminated, and the wait function would mean it would only happen periodically, not as many times a second that the computer could process it (which would mean that the NPC's would be forcibly undocked the moment they docked). But change a line of code or two, and this could be used to simulate B-O'F's Station Clamper from X3:R. How I miss that script...

sazanami
Posts: 187
Joined: Mon, 12. Jan 09, 06:49
x3tc

Post by sazanami » Tue, 31. Mar 09, 12:35

Would it be possible to get this to work on player owned M1s with NPC ships still aboard?

Like, when you capture an M1 with ships still in the hangar. I hear SOS can claim them, but haven't got it to work yet.

brekehan
Posts: 897
Joined: Sun, 15. Feb 04, 09:33
x4

Post by brekehan » Sun, 24. May 09, 08:32

Ships remain docked at my station after reapidly trying this script to get them to undock. My supply transports can't land at my own station :(
To understand recursion you must first understand recursion.

xiriod
Posts: 1102
Joined: Wed, 6. Nov 02, 21:31
x3tc

Post by xiriod » Sun, 24. May 09, 10:19

There was a Ship Clamp/Impound script for X3:R once, did it get ported to TC? :) You could impound AI ships that stayed too long time in your base. Nice income on the side.

User avatar
Cobra_mkII
Posts: 8
Joined: Mon, 12. Jan 09, 21:06
x3tc

Baffled on running a script

Post by Cobra_mkII » Thu, 18. Jun 09, 00:58

What an appallingly clunky system this is!

I have activated the script with Thereshallbewings

I can see it in the console

I can see the "eject NPC from station" command (That Mahi Ma bloke won't leave the station so I can continue the Hub mission)

But nothing I select appears to run the script, he is still super glued into the station!

Talk slowly to me and tell me what to do please

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20602
Joined: Mon, 15. Nov 04, 00:26
x4

Post by Cycrow » Thu, 18. Jun 09, 01:02

what scripts are you trying to run exactly ?

and what are you actually trying to do ?

User avatar
Carlo the Curious
Posts: 15622
Joined: Mon, 5. Mar 07, 23:03
x4

Post by Carlo the Curious » Thu, 18. Jun 09, 01:04

You should ask in the trhead for the scrip concerned, but in general you would select the script and press 'r' to run it directly.

Post Reply

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