[SCRIPT] BOF - Ship Clamper
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 522
- Joined: Thu, 13. Apr 06, 12:35
-
- Posts: 724
- Joined: Sat, 21. Feb 04, 02:15
Hi Pogi,
I have tried to re-create your problem, but no luck - it just took the money from my account and left the station money alone.
I started a new game, cheated in a station and some money, gave the station 500k, and I had just over 1 million. Bought the licences, I was nearly broke, and the station still had the 500k. Tried the same thing with another station (after giving myself more money), same result - it all worked as it should.
Can you try again with another station (save before, just in case you still lose money).?
Boron - Ol Fh'art
I have tried to re-create your problem, but no luck - it just took the money from my account and left the station money alone.
I started a new game, cheated in a station and some money, gave the station 500k, and I had just over 1 million. Bought the licences, I was nearly broke, and the station still had the 500k. Tried the same thing with another station (after giving myself more money), same result - it all worked as it should.
Can you try again with another station (save before, just in case you still lose money).?
Boron - Ol Fh'art
-
- Posts: 8344
- Joined: Sat, 14. Feb 04, 23:07
Been using this script for the past few days - very useful for keeping docking bays clear.
Most of my complexes, docks & trade stations have several ships assigned (+ a fleet of Caimen Tankers to fly round topping up jumpdrive E-cell reserves) so those docking bays are exceptionally busy & too many NPC ships loitering at the docking bays can completely screw up the logistics.
Clamping script sorted all that out - cheers
However, do have one humble suggestion - would be very handy if you could add an 'open ship menu' button to the message about ships being impounded, so I could send the ships to HQ without having to open the map.
No idea how difficult that would be - script writing is a bit of a dark art to me (Commodore PETs were state of the art last time I did any programming) so no problem if it's not practical - still a damn useful script as it is.
Most of my complexes, docks & trade stations have several ships assigned (+ a fleet of Caimen Tankers to fly round topping up jumpdrive E-cell reserves) so those docking bays are exceptionally busy & too many NPC ships loitering at the docking bays can completely screw up the logistics.
Clamping script sorted all that out - cheers

However, do have one humble suggestion - would be very handy if you could add an 'open ship menu' button to the message about ships being impounded, so I could send the ships to HQ without having to open the map.
No idea how difficult that would be - script writing is a bit of a dark art to me (Commodore PETs were state of the art last time I did any programming) so no problem if it's not practical - still a damn useful script as it is.
-
- Posts: 1141
- Joined: Sun, 7. May 06, 03:53
well been useing the impounder and ive (conviently aquired) over 200 ships that have inconviently screwed up all my logistics for my freighters, mainly my super freighters that pull things off my personial mega freighters....
ever since I got the clamper to begin impounding thoes ID10T errors of pilots things have been running alot smoother....but I agree I wish thier was a way to send all impounded ships (one at a time or all at once, maby even by station too?) to my HQ (or where ever I wish) included...
ever since I got the clamper to begin impounding thoes ID10T errors of pilots things have been running alot smoother....but I agree I wish thier was a way to send all impounded ships (one at a time or all at once, maby even by station too?) to my HQ (or where ever I wish) included...
Teladi Next Minute Shipping®
-
- Posts: 938
- Joined: Sat, 20. Mar 04, 19:06
I have a question:
After impounding the ships, will they be recreated by the AI (GOD-engine?)?
A week ago I installed this script and works perfectly.
But I've noticed that there are fewer ships coming to my SpaceFuel complex.
In the beginning, there were ships coming too fast (I couldn't produce enough SpaceFuel to supply all those ships).
Now it takes several minutes (on SETA x6), sometimes 10mins, between 2 incoming ships, my stock grows to 1000+ units before some TS comes to buy it all.
If those ships aren't recreated (by GOD or whatever), the player could slowly impound all ships in the universe, until there are only a few left.
Or am I wrong about this?
After impounding the ships, will they be recreated by the AI (GOD-engine?)?
A week ago I installed this script and works perfectly.
But I've noticed that there are fewer ships coming to my SpaceFuel complex.
In the beginning, there were ships coming too fast (I couldn't produce enough SpaceFuel to supply all those ships).
Now it takes several minutes (on SETA x6), sometimes 10mins, between 2 incoming ships, my stock grows to 1000+ units before some TS comes to buy it all.
If those ships aren't recreated (by GOD or whatever), the player could slowly impound all ships in the universe, until there are only a few left.
Or am I wrong about this?
GamePC: 64bit Quad-core i5-3450 @ 3.1GHz, 12GB RAM, nVidia GeForce RTX2070 8GB, 22" LG Full-HD LED-monitor, Windows 7 Home 64bit
-
- Posts: 724
- Joined: Sat, 21. Feb 04, 02:15
H PowerPC603,
I hope you are wrong........
I have (obviously) been running this script for a long time. I have also noticed that there are times when my Fuel/Weed complex is not as profitable (shipwise)... If I check any NPC Fuel or Weed suppliers - they are undercutting my prices.. time for a bulk buy, and deliver to my complex for re-sale.... then the ship collection starts again...
I have not noticed any lack of God created ships, I don't think that I could impound all of the NPC ships in the universe... but it could be profitable trying...
Boron - Ol Fh'art
I hope you are wrong........
I have (obviously) been running this script for a long time. I have also noticed that there are times when my Fuel/Weed complex is not as profitable (shipwise)... If I check any NPC Fuel or Weed suppliers - they are undercutting my prices.. time for a bulk buy, and deliver to my complex for re-sale.... then the ship collection starts again...
I have not noticed any lack of God created ships, I don't think that I could impound all of the NPC ships in the universe... but it could be profitable trying...
Boron - Ol Fh'art
-
- Posts: 938
- Joined: Sat, 20. Mar 04, 19:06
I really hope that those impounded ships will be replaced by GOD, otherwise the area around my complexes will be almost empty soon.
One nice effect is that I'm building SpaceFuel complexes now and most of the time the impounded ships had lots of SpaceFuel onboard, sometimes 500+ units.
Talk about a really drunk pilot
Whenever a ship is impounded, I check their cargohold and every unit of SpaceFuel is transferred to my complex for resale
This doubles or triples my income of that complex, together with the profits I make from selling those impounded ships.

One nice effect is that I'm building SpaceFuel complexes now and most of the time the impounded ships had lots of SpaceFuel onboard, sometimes 500+ units.
Talk about a really drunk pilot

Whenever a ship is impounded, I check their cargohold and every unit of SpaceFuel is transferred to my complex for resale

This doubles or triples my income of that complex, together with the profits I make from selling those impounded ships.

GamePC: 64bit Quad-core i5-3450 @ 3.1GHz, 12GB RAM, nVidia GeForce RTX2070 8GB, 22" LG Full-HD LED-monitor, Windows 7 Home 64bit
-
- Posts: 4293
- Joined: Wed, 21. Feb 07, 17:46
Question: line 23 of bof.ship.clamper shouldn't there be more to the command then just this?
Code: Select all
0023 = 8897
-
- Posts: 724
- Joined: Sat, 21. Feb 04, 02:15
Hi draffutt,
It's been a while since you last complained.....
In my copy of the script (in the uploaded zip file) it has:-
$page.id = 8897
Other people (well, at least one) have had the script working correctly. If they had the same problem with that line of code, then there would be no messages.
Have you been editing it?
Boron - Ol Fh'art
It's been a while since you last complained.....
In my copy of the script (in the uploaded zip file) it has:-
$page.id = 8897
Other people (well, at least one) have had the script working correctly. If they had the same problem with that line of code, then there would be no messages.
Have you been editing it?
Boron - Ol Fh'art
-
- Posts: 4293
- Joined: Wed, 21. Feb 07, 17:46
i have been away and now i am back. as for editing nope it appears there is a small problem with the new script editor sorry.B-O'F wrote: It's been a while since you last complained.....
In my copy of the script (in the uploaded zip file) it has:-
$page.id = 8897
Have you been editing it?
Boron - Ol Fh'art

-
- Posts: 724
- Joined: Sat, 21. Feb 04, 02:15
Hi draffutt,
I have been watching the new script editor with great interest - but have not used it (no scripting and not much playing due to RL troubles) - and have seen your entries there, which was why I asked if you had been editing it.... I could not say that there was a problem with the new editor because I have not tested it (and I did not want it to have problems as it looks too useful)..
So I am glad that it is not my problem, sorry that it is a problem with the script editor, as a lot of good work has gone into the editor.
Anyway, glad to see you back, and I expect you to continue your good work on breaking scripts....
Have fun,
Boron - Ol Fh'art
I have been watching the new script editor with great interest - but have not used it (no scripting and not much playing due to RL troubles) - and have seen your entries there, which was why I asked if you had been editing it.... I could not say that there was a problem with the new editor because I have not tested it (and I did not want it to have problems as it looks too useful)..
So I am glad that it is not my problem, sorry that it is a problem with the script editor, as a lot of good work has gone into the editor.
Anyway, glad to see you back, and I expect you to continue your good work on breaking scripts....
Have fun,
Boron - Ol Fh'art
-
- Posts: 1225
- Joined: Mon, 12. Dec 05, 07:41
You mentioned in an earlier post about describing the process of changing which command slot is used for a command, I was wondering if you could do that please? I have no idea when it comes to command slots, and I checked the Plugin Manager, and XTM is taking up STATION_47, used for the "Equipment Upgrades Installer" command, and I really liked the idea of your script, so I was wanting to change one (or the other) so I could get rid of the conflict.
Anyways, it'd be great if you could put a quick rundown of how to change it in please.
Cheers
Anyways, it'd be great if you could put a quick rundown of how to change it in please.
Cheers
-
- Posts: 3029
- Joined: Fri, 18. Nov 05, 00:41
This script sounds like a lot of fun, albeit making it a little too easy to make money 
How about another version that instead fines ships for staying too long? And then after a long time of them being docked they get clamped? eg, after 20 minutes they are charged 5000 credits per further 20 minutes of being docked, After 2 hours the ship gets clamped?

How about another version that instead fines ships for staying too long? And then after a long time of them being docked they get clamped? eg, after 20 minutes they are charged 5000 credits per further 20 minutes of being docked, After 2 hours the ship gets clamped?
-
- Posts: 724
- Joined: Sat, 21. Feb 04, 02:15
Hi argon_emperor,
Changing which slot is used is fairly easy.
First, find an empty slot in the COMMAND_TYPE_STATION range, I can't tell you which one is free on your machine, you will have to check that out.. one way is to check all the t-files in your t directory. I use Agent Ransack for quick searches of the t directory. For example, search for 1147 - you should get 448897.xml and the script that clashes with this Clamper script.
Try the next number up - 1148 - if anything is found, try the next number all the way up to 1163. If you still get scripts found, try from 1116 to 1146.
If you cannot find a free slot, then you have a problem.
Note the number that does not find any scripts.
First the easy bit - open 448897 in Notepad (the easiest editor to use), you will see the four entries for 1147:-
Change all four occurrences of 1147 to your new number. [There are four entries in this script, quite a few only use three - I normally include the id 2022 entry to show a quick description when the 'i' key is pressed.]
Save the changed file - that's most of the work done, just one awkward change to do - this depends on how familiar you are with the script editor.
All you have to do now is change the setup script..
In the script editor, open 'setup.bof.ship.clamper'.
Line 6 is the one you need to change, it will show as:-
006 $key = COMMAND_STATION_47
or whatever the conflicting script has called the command.
Select the line, and move along to the COMMAND_STATION_ with the right arrow key.
Hit Enter, scroll down to 'Select Command/Signal' and hit Enter.
Scroll down till you find COMMAND_STATION_SHIPCLAMP, hit Enter
You should now see the line as:-
006 $key = COMMAND_STATION_SHIPCLAMP
Hit Escape, you will be asked if you want to save the script, select Yes
Job done.
Select 'Reinit Script Caches' or reload to set the script working.
Hi Axeface,
Nice (and naughty) sig.
Well change it - add a counter after each 20 minute test, add 5000 credits to your account - you can't deduct it from the ship's account as NPC ships don't use money. When the counter reaches 6, use the rest of the existing clamp script.
You are quite welcome to change the script as much as you like, so that it fits in with your current game-playing role.
I may re-write the script to incorporate such changes, but at the moment RL (the certainties - death and taxes) is preventing scripting and limiting game playing.
Have fun,
Boron - Ol Fh'art
Changing which slot is used is fairly easy.
First, find an empty slot in the COMMAND_TYPE_STATION range, I can't tell you which one is free on your machine, you will have to check that out.. one way is to check all the t-files in your t directory. I use Agent Ransack for quick searches of the t directory. For example, search for 1147 - you should get 448897.xml and the script that clashes with this Clamper script.
Try the next number up - 1148 - if anything is found, try the next number all the way up to 1163. If you still get scripts found, try from 1116 to 1146.
If you cannot find a free slot, then you have a problem.
Note the number that does not find any scripts.
First the easy bit - open 448897 in Notepad (the easiest editor to use), you will see the four entries for 1147:-
Code: Select all
<page id="2008" title="Script Object Commands" descr="0">
<t id="1147">COMMAND_STATION_SHIPCLAMP</t>
</page>
<page id="2010" title="Commands" descr=" ">
<t id="1147">Ship Clamper</t>
</page>
<page id="2011" title="Commands" descr=" ">
<t id="1147">ShipClamp</t>
</page>
<page id="2022" title="Command Info" desc="0" >
<t id="1147">Ship Clamper. v1.0\n
Impound ships that park for too long.</t>
</page>
Save the changed file - that's most of the work done, just one awkward change to do - this depends on how familiar you are with the script editor.
All you have to do now is change the setup script..
In the script editor, open 'setup.bof.ship.clamper'.
Line 6 is the one you need to change, it will show as:-
006 $key = COMMAND_STATION_47
or whatever the conflicting script has called the command.
Select the line, and move along to the COMMAND_STATION_ with the right arrow key.
Hit Enter, scroll down to 'Select Command/Signal' and hit Enter.
Scroll down till you find COMMAND_STATION_SHIPCLAMP, hit Enter
You should now see the line as:-
006 $key = COMMAND_STATION_SHIPCLAMP
Hit Escape, you will be asked if you want to save the script, select Yes
Job done.
Select 'Reinit Script Caches' or reload to set the script working.
Hi Axeface,
Nice (and naughty) sig.
Well change it - add a counter after each 20 minute test, add 5000 credits to your account - you can't deduct it from the ship's account as NPC ships don't use money. When the counter reaches 6, use the rest of the existing clamp script.
You are quite welcome to change the script as much as you like, so that it fits in with your current game-playing role.
I may re-write the script to incorporate such changes, but at the moment RL (the certainties - death and taxes) is preventing scripting and limiting game playing.
Have fun,
Boron - Ol Fh'art
-
- Posts: 1225
- Joined: Mon, 12. Dec 05, 07:41
Thanks for the help, got it working (eventually) and now know something else about scripting (very slowing makings a little bit of sense of it, more used to scripting in MATLAB than this language, whatever it even is).
For some stupid reason, I kept forgetting to change the setup script to use the new command slot, even though I changed all the other occurrences of it. So I kept wondering why the command was listed as "Equipment Upgrades Installer", but still seemed to do the right job...
Anyways, thanks again, and I've now been able to remove all command conflicts in my game (the whole 3 or so of them
).
Must say, I love this though. Changed the times to slightly less (5 min for short and 15 min for long) and have already impounded 5 or 6 ships (mostly M5 couriers coming to sample from my 6xBliss Place L and 6x Dream Farm L complex, which makes a tidy profit). And a couple of TS's which seemed to wait for too long at one of my various XL SPP lying around the universe...
For some stupid reason, I kept forgetting to change the setup script to use the new command slot, even though I changed all the other occurrences of it. So I kept wondering why the command was listed as "Equipment Upgrades Installer", but still seemed to do the right job...
Anyways, thanks again, and I've now been able to remove all command conflicts in my game (the whole 3 or so of them

Must say, I love this though. Changed the times to slightly less (5 min for short and 15 min for long) and have already impounded 5 or 6 ships (mostly M5 couriers coming to sample from my 6xBliss Place L and 6x Dream Farm L complex, which makes a tidy profit). And a couple of TS's which seemed to wait for too long at one of my various XL SPP lying around the universe...
-
- Posts: 724
- Joined: Sat, 21. Feb 04, 02:15
Hi argon_emperor,
Glad that you are now in the lucrative clamping business and managed to sort out the other scripts.
If you want to learn the scripting language, the MSCI handbook is good - but was written for X2, so does not have all the commands listed.
Otherwise, have a look at a few scripts. Download any of mine, especially those written for other scripters (Sorts, String Maths, Numeric Entry - all in my sig) you don't have to install them, there are straight zip'd files in there, and read them. Yes, read them - most are pretty well documented, and are meant to be re-used or start off ideas.
Whatever, have fun,
Boron - Ol Fh'art
Glad that you are now in the lucrative clamping business and managed to sort out the other scripts.
If you want to learn the scripting language, the MSCI handbook is good - but was written for X2, so does not have all the commands listed.
Otherwise, have a look at a few scripts. Download any of mine, especially those written for other scripters (Sorts, String Maths, Numeric Entry - all in my sig) you don't have to install them, there are straight zip'd files in there, and read them. Yes, read them - most are pretty well documented, and are meant to be re-used or start off ideas.
Whatever, have fun,
Boron - Ol Fh'art
-
- Posts: 83
- Joined: Thu, 4. Nov 04, 20:44
I have the sort of the same problem, I have made the changes to the 448897 file to use free slot 1148 and to setup.bof.ship.clamperargon_emperor wrote:So I kept wondering why the command was listed as "Equipment Upgrades Installer", but still seemed to do the right job...
When I choose clamp in select command (from the station) it starts, but shows as Equipment Upgrades Installer under station commands when it's running.

-
- Posts: 724
- Joined: Sat, 21. Feb 04, 02:15
Hi Meros,
Have you done the same as argon-emperor?
You need to make the four changes to the 448897 text file, and then change the setup file.
If you don't change all four occurrences in the text file, don't change the setup file, or change the setup file first - then you may see those symptoms.
Did you renit the script cache or restart from a saved game - this is also needed.
Have fun,
Boron - Ol Fh'art
Have you done the same as argon-emperor?
You need to make the four changes to the 448897 text file, and then change the setup file.
If you don't change all four occurrences in the text file, don't change the setup file, or change the setup file first - then you may see those symptoms.
Did you renit the script cache or restart from a saved game - this is also needed.
Have fun,
Boron - Ol Fh'art