[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: 817
Joined: Sat, 14. Oct 06, 01:01
x3tc

[SCRIPT] Force NPC Undocking

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

Force NPC Undocking

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

REQUIRED: Cycrow's Community Configuration Menu

[ external 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
[ external image ]

RAR archive
[ external image ]
Last edited by Graxster on Wed, 26. Nov 08, 18:26, edited 1 time in total.

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

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

Ohh, looks like fun! Also helpful if you are trying to get that one guy to undock for that terran plot

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

Post by Beej315 » Sun, 28. Dec 08, 13: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, 19:47

Post by aquemnun » Sun, 28. Dec 08, 13: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, 15: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, 19:47

Post by aquemnun » Sun, 28. Dec 08, 16: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, 15: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, 05: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: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Post by argon_emperor » Mon, 2. Mar 09, 07: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, 05: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: 952
Joined: Sun, 15. Feb 04, 08: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: 1131
Joined: Wed, 6. Nov 02, 20: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, 20: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: 22197
Joined: Sun, 14. Nov 04, 23: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: 16999
Joined: Mon, 5. Mar 07, 22: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.

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

Post by Cobra_mkII » Thu, 18. Jun 09, 11:12

I have gone to Kingdom End to talk to Mahi Ma.

He is supposed to eject from the station and I collect him. Except he won't, the mission is broken and he stays on the station and there are no further plot conversations.

I read on a post somewhere (can't find it now!) of the same problem and one suggestion was to run the "Force NPC Undocking " script to kick him off.

I have avoided scripts and mods so far as it seems quite convoluted to install and run but had to bite the bullet to continue the Hub Mission.

Plodded through all the help forums, installed Cycrow's Community Configuration Menu and Force NPC Undocking and ran Thereshallbewings.

This works because the console now shows "scripts" running it shows "Force NPC Undocking " but I cannot work out how to get it running and hiting the Kingom End Military outpost to eject Mahi Ma.

So, need help, I'm way out of my comfort zone as I never know if fettling a game will trash it, I would hate a restart.

Of course if you know of another way of kicking his ass off the station let me know :)

I suspected I was going about this all wrong so thanks for your courteous replies so far :thumb_up:

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

Post by Carlo the Curious » Thu, 18. Jun 09, 11:17

Merged.

User avatar
Schultski
Posts: 273
Joined: Sat, 12. Aug 06, 21:15

Post by Schultski » Mon, 3. Aug 09, 08:03

Cobra_mkII wrote:Plodded through all the help forums, installed Cycrow's Community Configuration Menu and Force NPC Undocking and ran Thereshallbewings.
This is what causing the problem...

First, install Cycrow's Community Configuration Menu script,
Then, load your game file and SAVE it for a brief moment, then I urge you to RESTART the game by loading your after-saved-game file.

And then you would have a properly working script...

Other than that, I believe GOD is currently in HATE with you... :evil: :evil:
:lol: :lol:
[=] Matsu-Taka [=]
Matsuhiko Takagawa / Schultski Rheindland

Know how to best the X-Universe by one shot?
Push the little 'REBOOT' button on your PC, that should do it...
Try it... it works for me... believe it... it works...

User avatar
Scion Drakhar
Posts: 932
Joined: Wed, 27. Oct 10, 03:15
x3ap

Post by Scion Drakhar » Sun, 14. Nov 10, 16:43

Hi there.

Thanks Graxter. I've had these split traders camping in my megaplex for ages. Sometimes there are so many traders sitting in my docking clamps that my own freighters can't dock ... even when I'm not trading with other races!

So this worked wonders.

I have a question, though. I have an ... ahem ... aquired TL that has two Yaki refusing to leave the hangar bay. If I were them I wouldn't want to leave either since they're in Argon Prime AND in the middle of my fleet, but still ... It's MY ship now and I want the space for MY ships.

Is there a way to simply march on down to the flight deck with my marines, confiscate the ships and either throw the pilots in the brig until I can drop them off at a pirate base or simply throw them out the nearest airlock?

:twisted:
A Pirate's Story.pdf(KIA) by _Zap _ From Nothing.PDF(complete) by _Zap _ Prodigal Son(active) Original Thread, Prodigal Son_PDF

User avatar
Scion Drakhar
Posts: 932
Joined: Wed, 27. Oct 10, 03:15
x3ap

Post by Scion Drakhar » Tue, 16. Nov 10, 06:22

Got help and if anyone is having the same problem there is actually a vanilla solution. Carrier Command Software: Combat - Launch fighter Attack.

Cheers
A Pirate's Story.pdf(KIA) by _Zap _ From Nothing.PDF(complete) by _Zap _ Prodigal Son(active) Original Thread, Prodigal Son_PDF

Post Reply

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