|
|
 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
Nividium

Joined: 21 Aug 2007
 |
Posted: Wed, 10. Oct 07, 11:13 Post subject: [SCRIPT] Asteroid Relocator v1.00 by Nividium 10/10/2007 |
|
|
Nividium Asteroid Relocator for X3 Reunion, Script Package.
Name of Script Package Asteroid Relocator
Version Number 1.00
Date Released 10/10/2007
Last Updated n/a
Script Created For X3 Reunion v 2.0.02
File Package Available X3 Script Installer "SPK"
Download the "SPK" file format package here: Asteroid Relocator v1.00
Description:
The Asteroid Relocator was created in response to a forum member user by the name of Thraxwhirl who came up with this idea. The idea is not mine. I volunteered to write the code to turn Thraxwhirl's vision into useable form.
Any of your ships equiped with a Transporter Device and Mineral Scanner can use the Asteroid Relocator software. Except the Playership, you personally cannot use this software.
Select one of your ships (doesn't matter if you are In or Out of Sector), choose the [Piracy]-[Containerize Asteroid] then a pop-up will appear asking you to select an Asteroid. The ship that is executing this command must be within 10km of the desired Asteroid or you will get a "beep" error. So, select the rock. The Asteroid will be de-moleculorized and placed into a "container" within that ship's cargo hold. You can see this "container" in the ship's cargo bay now. Ok, so you can move that ship to another Sector or you can drop the rock in the same Sector. The ship must be at least 10km away from the intended drop position in order for the command to execute, else you will hear another "beep". Choose the [Piracy]-[Unload Asteroid] command and a pop-up will appear asking you to select a Sector Position. Use your key-pad directional keys 4,8,6,2 to move the cursor to the desired positon and press [Enter]. The "containerized" Asteroid will now be unloaded in the exact position you specify. So, be careful where that position is and remember Asteroids are big mothers and you could easily drop it on a station or gate etc. There is no anti-collision code to prevent you from doing just that in this script, so use caution. Hey, if you make a mistake, just "containerize" it again and move it over some. No big whoop I suppose.
A ship can only carry one "container" Asteroid at a time. Yes, I know, I could code a ship to carry the entire Universe in it's cargo bay, but this is the way this particular script is going to work, ok. To prevent you from trying to "containerize" more than one Asteroid at a time, I have coded in a safety ie: the command [Containerize Asteroid] will be greyed - out when you are already carrying one Asteroid. Don't lose that container either, as if you do, you will not be able to unload/get the Asteroid out of it. Do not try to transfer the "container" onto another ship and then try to make that ship "unload" the Asteroid. It will not work. Why? Because I said so. No, because the container is emgram stamped with the Transporter Device serial number, so no other ships can use the container. Helps deter pirates wanting to kill your ship in order to steal the container. Doesn't mean they won't kill your ship anyhow, but for a dif reason.
NOTE: Usual warning applies. This script may not be compatible with other scripts/mods. This script package should not be used when playing the game for the first time or a Plot-Based game. Make a backup of your saves before installing using this script package.
Required Equipment:
- Transporter Device
- Mineral Scanner
Installation: Use the X3 Plugin Manager.
Uninstall: Use the X3 Plugin Manager. There is no internal uninstaller for this.
Version History: Version 1.00 Initial Release.
Command Slots Used:
<t id="657">COMMAND_TYPE_PIRACY_57</t>
<t id="658">COMMAND_TYPE_PIRACY_58</t>
Text File Used: 448091.pck
Last edited by Nividium on Wed, 10. Oct 07, 20:57; edited 1 time in total |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
killuminati-ita
Joined: 28 Aug 2006
|
Posted: Wed, 10. Oct 07, 11:51 Post subject: |
|
|
Wow this is a fantastic script!
BTW Nividium.. do you get some sleep sometimes??
Great job indeed!

_________________ E POI IL PYTHON E' SGRAVO!! ^^ |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
xxbluedragonxx
Joined: 29 Aug 2007
|
Posted: Wed, 10. Oct 07, 13:00 Post subject: |
|
|
you must read my mind! Because I was just thinking of wanting a script like this since it is perfect to work with your mining script too! Thanks! Why is it in piracy though? Can you make new menu and put your mining script and this one in the same menu?? Maybe the mining base one too? Then all in same menu nice 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Thraxwhirl
Joined: 17 Feb 2006
|
Posted: Wed, 10. Oct 07, 13:02 Post subject: |
|
|
Thanks for this one, Nividium. Groovy.
Sounds to me like you read the thread I started last night, Sir, in which I asked for this very facility.
I am endebted to you, Nividium, and will test this out later this evening when I get home... from the dreaded dentist. Gaaaahhhhh!!
Wish me luck, people; think I'd rather face the Kha'ak. 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Thraxwhirl
Joined: 17 Feb 2006
|
Posted: Wed, 10. Oct 07, 13:04 Post subject: |
|
|
| xxbluedragonxx wrote: |
you must read my mind! Because I was just thinking of wanting a script like this since it is perfect to work with your mining script too! Thanks! Why is it in piracy though? Can you make new menu and put your mining script and this one in the same menu?? Maybe the mining base one too? Then all in same menu nice  |
If I may say so, I personally would rather we DON'T have it moved out of Piracy and into another menu, simply because Piracy is one of the least used, and therefore least likely to have any conflicts.
You should see how many commands I have under Combat, Custom and General. 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Bertone

Joined: 15 Jun 2007 Posts: 847 on topic

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
dpadula
Joined: 15 Aug 2006 Posts: 170 on topic

|
Posted: Wed, 10. Oct 07, 13:55 Post subject: |
|
|
This sounds really cool and I am going to try it out. I thought it interesting that I could destroy stations with it though. Might make some of the XI missions much easier. 
_________________ -----
MacBook Pro i7 2.66ghz
4 gb ram
runs like a dream in Win 7 64-bit |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
DeadZone

Joined: 26 Sep 2003 Posts: 57 on topic Location: England

|
Posted: Wed, 10. Oct 07, 18:02 Post subject: |
|
|
With no anti-collision in it, could be an interesting weapon to place next to gates or stations docks... 
_________________
 |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Pogi
Joined: 13 Apr 2006 Posts: 517 on topic

|
Posted: Wed, 10. Oct 07, 18:46 Post subject: |
|
|
..Outstanding!
_________________ X3..The most fun a man can have...With his clothes on. |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Gammel
Joined: 10 Jul 2007
Location: Launceston, Australia
|
Posted: Wed, 10. Oct 07, 22:53 Post subject: |
|
|
Oooh, with this script my ideas to do incursions into Kha'ak space to steal their roids may well just be on again. 
_________________ Forum Lurker.
Pest.
Fledgling Shipbuilder.
I don't have X3:TC, yet. So if I ask a dumb and blatantly obvious question about it. That's the reason.  |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Nividium

Joined: 21 Aug 2007
|
Posted: Wed, 10. Oct 07, 22:57 Post subject: |
|
|
| dpadula wrote: |
This sounds really cool and I am going to try it out. I thought it interesting that I could destroy stations with it though. Might make some of the XI missions much easier.  |
"Despite my peaceful and well intention intent", you managed to turn a peaceful harmless function into a deadly weapon! Nice one.
Got any competitors that are in your way, Asto em, Xenon K getting you down Asto em 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Thraxwhirl
Joined: 17 Feb 2006
|
Posted: Thu, 11. Oct 07, 01:18 Post subject: |
|
|
Hi, Nividium.
Just trying out the script now. Like an idiot, the very first thing I did was get into the TL and go to the Piracy menu only to find it greyed out. Then I re-read your post and noted the "no Playership" capability. Doh! Lol!
May I ask why that is? Would it be a problem if one collected 'roids whilst IN the ship? Just wondering, as I quite like to do these things "hands on" if at all possible, but obviously if it's something likely to break the game, I can live with it how it is.
Second question: You were saying that once you've collected a 'roid, that same ship can never collect another(and no OTHER ship can unload it) until that same TL has re-deployed it.
Again, I have been wondering if it MIGHT be at all possible to have a work-around for this, as I had a quite revolutionary(well, quite new at least) idea about using 'roids as tradeable wares, both as a source of minerals AND for ship-building.
I wrote a post on it, which you may find interesting, and I could show you what I've had in mind. I've been doing quite a bit of thinking in this regard, and I know that SOME of the coding(the ship-based mineral yield part) is stuff I could write(indeed I already have), if you're up for a bit of discussion about it?
The plan is to allow the player to build Mobile Nividium Mines, that are actually M1s or TLs, with weapons, that can fly/jump from sector to sector and deliver Nividium wherever needed.
It would require use of a ship model(I use Balogt's Privateer-style Mining Base), Shovinus' Player-owned Shipyards script(with a slight adjustment, I can approach him about this), and the ability to use collected 'roids as tradeable wares, very much like stations that are still in "kit" form at SYs.
What do you think?
As I say, I wrote another post on it which elaborated on some of my thoughts.
If you like the idea, we could have a talk about it. Potentially it COULD utterly revolutionise and enhance the X economy(particularly the Player's part in it), because you could not only make your Mines(the bedrock of X's industry) more productive and mobile(not to mention well-defended) but also trim down the number of 'roids needed throughout your galaxy maps(thus saving some fps-lag).
Sound interesting? As I say, I could script SOME of this.
Fancy chatting about it?
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Nividium

Joined: 21 Aug 2007
|
Posted: Thu, 11. Oct 07, 04:52 Post subject: |
|
|
| Thraxwhirl wrote: |
Hi, Nividium.
Just trying out the script now. Like an idiot, the very first thing I did was get into the TL and go to the Piracy menu only to find it greyed out. Then I re-read your post and noted the "no Playership" capability. Doh! Lol!
May I ask why that is? Would it be a problem if one collected 'roids whilst IN the ship? Just wondering, as I quite like to do these things "hands on" if at all possible, but obviously if it's something likely to break the game, I can live with it how it is.
Second question: You were saying that once you've collected a 'roid, that same ship can never collect another(and no OTHER ship can unload it) until that same TL has re-deployed it.
Again, I have been wondering if it MIGHT be at all possible to have a work-around for this, as I had a quite revolutionary(well, quite new at least) idea about using 'roids as tradeable wares, both as a source of minerals AND for ship-building.
I wrote a post on it, which you may find interesting, and I could show you what I've had in mind. I've been doing quite a bit of thinking in this regard, and I know that SOME of the coding(the ship-based mineral yield part) is stuff I could write(indeed I already have), if you're up for a bit of discussion about it?
The plan is to allow the player to build Mobile Nividium Mines, that are actually M1s or TLs, with weapons, that can fly/jump from sector to sector and deliver Nividium wherever needed.
It would require use of a ship model(I use Balogt's Privateer-style Mining Base), Shovinus' Player-owned Shipyards script(with a slight adjustment, I can approach him about this), and the ability to use collected 'roids as tradeable wares, very much like stations that are still in "kit" form at SYs.
What do you think?
As I say, I wrote another post on it which elaborated on some of my thoughts.
If you like the idea, we could have a talk about it. Potentially it COULD utterly revolutionise and enhance the X economy(particularly the Player's part in it), because you could not only make your Mines(the bedrock of X's industry) more productive and mobile(not to mention well-defended) but also trim down the number of 'roids needed throughout your galaxy maps(thus saving some fps-lag).
Sound interesting? As I say, I could script SOME of this.
Fancy chatting about it? |
This is required, because you cannot assign a local variable to the Playership. This script uses 1 local variable to hold the "containerized" Asteroid data.
EDIT: I worded that badly. It's not that you cannot assign a local variable to the Playership, it is just that I, in this case, did not want the Player to be involved with the function (personal pref). You can make it run on the Playership if you want. Sorry, for the screw up in my writing.
This is required, because the Asteroid data is stored in a local variable which is created by the ship that "containerized" the Asteroid.
EDIT: You could transfer the container and the value of the local variable over to another ship, but I did not in this case because it requires more code than I cared to apply to this excercise. You can of course transfer the values and the container over to another ship if you write the code to do that. Sorry to mislead you there on this point as well.
Why do you need a dif Shipyard arrangement?
A problem with that though is there is no real way to "valuate" an Asteroid. If you have a Nividium/Ore/Silicon Asteroid of say Yield 40, what is it's equivalent ware numbers...100, 500, 1000, 10,000 ?? I know when I wrote the Auto Debris Harvestors, I examined and spent the day shooting apart Rock Debris Clusters of all kinds in order to come up with some sort of "equivalent" per unit ware numbers. But, big mother Asteroids, I have no clue what their "equivalent" might be with the dif Yields involved etc. You see if a big Asteroid is actually 100,000 units or more, you would be hard pressed to put that many Silicon/Ore/Nividium into a TL. Could be done using equal value "containers" though, say 1 container = 10,000 units of ware and when needed, you decompress them etc. Then you could store millions of individual "containers" on one ship no problem.
But, all in all. This is your "baby" Thraxwhirl and it would probably be best if you work the project yourself. Post a new forum posting and then just add threads with any questions you have along the way. Then all the great scripter here can post their response to your questions ie: broader involvement with the community, but it is your project alone. I will try to help if I can and post suggestions, but I must decline from personally getting involved with your wonderful idea. Best of luck to you Thraxwhirl, I know this is going to be a great script from you. 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Thraxwhirl
Joined: 17 Feb 2006
|
Posted: Thu, 11. Oct 07, 15:15 Post subject: |
|
|
Hi again.
Well I've read your reply and that all sounds fine. If you're fairly confident that it won't break the game for me to allow the [PLAYERSHIP] to run the command(s), I think I'll make that minor change if that's ok with you.
Now then, on the subject of this idea of mine. Well, yes, I think I'll be able to code it myself, given a bit of time, BUT...
...I can only envisage one way of doing it, and I have two important considerations:
1) Obviously I want it to be compatible with your scriptset, because the ability to collect and use asteroids will be paramount to the entire process. So, effectively, if I'm able even to start on this, your Asteroid Relocator will be a "Requirement" scriptset.
I hope that's ok, as I don't see any other way I could script it.
2) As a result of point 1, I would need to ask you first of all if you would be at all willing to make a little adjustment to it. This is kind of vital, as I need the "Collected" 'roids to be differentiated.
Allow me to explain:
In order to use collected 'roids for this purpose, it is vital that we have not one but three different wares. At present, any collected 'roid is simply stored as "Container" in the Cargo Hold, and has a volume of 1.
Could that be changed so that what you actually find in your hold is this:
"Asteroid (Nividium)", "Asteroid (Ore)" or "Asteroid (Silicon)"...
...with a Ware Class of XL(unless EQdocks can stock ST, but I don't think they can), and a much higher Volume(maybe 20,000).
I appreciate that this is asking for more work, but it is vital for me that the three different 'roid types are three different wares, based on their resource.
What I then envisage is that such 'roids can be sold at Eqdocks, where they become tradeable commodities(this way, I can write an AL Plugin which will keep stocking them up at eqdocks every now and again)...
...OR, should they be deposited at HQs(and I'll be AL-spawning some random AI-owned HQs), the Plugin will, whenever it finds one in stock, break it down into its minerals.
The quantity that is generated from breaking down the 'roid will just have to be a SEMI-random calculation, since the AI will produce tradeable 'roids at Eqdocks and these will NEVER have been REAL 'roids, and never held any resource value. Thus they couldn't be redeployed.
Once the 'roids are a tradeable ware, they could then be placed in Player-SYs and used as resources for building Mobile Mines.
Thing is, would you be willing to make the different 'Roids 3 different wares whilst in the cargo hold?
If you are, I believe I can write this. 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Nividium

Joined: 21 Aug 2007
|
Posted: Thu, 11. Oct 07, 22:43 Post subject: |
|
|
| Thraxwhirl wrote: |
Hi again.
Well I've read your reply and that all sounds fine. If you're fairly confident that it won't break the game for me to allow the [PLAYERSHIP] to run the command(s), I think I'll make that minor change if that's ok with you.
Yes, it is fine with me. Within the "setup" file, you will need to replace the command that makes ref to the check scripts. One of the check scripts checks to see if "ship" is the Playership. Remove that command and the corresponding "plugin.asteroid.relocator.check or check2 (don't remember). Then you will need to modify the scripts by taking out arguments named "ship". Then you will need to add one line at the top of scripts like this: $ship = [THIS] (this will save you from changing all ref to the variable $ship and changing it to [THIS] )
Now then, on the subject of this idea of mine. Well, yes, I think I'll be able to code it myself, given a bit of time, BUT...
...I can only envisage one way of doing it, and I have two important considerations:
1) Obviously I want it to be compatible with your scriptset, because the ability to collect and use asteroids will be paramount to the entire process. So, effectively, if I'm able even to start on this, your Asteroid Relocator will be a "Requirement" scriptset. I hope that's ok, as I don't see any other way I could script it.
Yes, you can use the code, modify/strip/change or whatever to suit your needs. But, given the objectives or goal you have in mind. That code or scriptset is probably not going to work with your goal. The code is narrow focused and limits the user to only 1 Asteroid and 1 container. This is not going to work with your idea. So, it would be best to write a "new" script based upon your overall goals rather than try to make something into something else.
2) As a result of point 1, I would need to ask you first of all if you would be at all willing to make a little adjustment to it. This is kind of vital, as I need the "Collected" 'roids to be differentiated.
Allow me to explain:
In order to use collected 'roids for this purpose, it is vital that we have not one but three different wares. At present, any collected 'roid is simply stored as "Container" in the Cargo Hold, and has a volume of 1.
Could that be changed so that what you actually find in your hold is this:
"Asteroid (Nividium)", "Asteroid (Ore)" or "Asteroid (Silicon)"...
Not using conventional means. There are no existing wares with those names. So, you would have to use Cycrows stuff to do that or the EMP. I have not used any of those external devices and cannot comment on thier suitability for your purpose. But, I am sure they would work just fine. But, I cannot help this those, because I have never used them and shy away from the EMP as I heard people get odd "ReadText" showing up in their game etc.
...with a Ware Class of XL(unless EQdocks can stock ST, but I don't think they can), and a much higher Volume(maybe 20,000).
I appreciate that this is asking for more work, but it is vital for me that the three different 'roid types are three different wares, based on their resource.
What I then envisage is that such 'roids can be sold at Eqdocks, where they become tradeable commodities(this way, I can write an AL Plugin which will keep stocking them up at eqdocks every now and again)...
...OR, should they be deposited at HQs(and I'll be AL-spawning some random AI-owned HQs), the Plugin will, whenever it finds one in stock, break it down into its minerals.
I would not use an Artificial Life script approach to this. Just use a Global Process to watch the Stations. Also, you are talking about searching for a ware within a Station and then replacing it with another ware that has huge quantities associated with it. You would need to check the Stations empty cargo hold limits before unpacking etc. I can easily see this goal becomeing extremely complicated and the level of code writing becoming very high level and demanding to make it work safely and properly.
The quantity that is generated from breaking down the 'roid will just have to be a SEMI-random calculation, since the AI will produce tradeable 'roids at Eqdocks and these will NEVER have been REAL 'roids, and never held any resource value. Thus they couldn't be redeployed.
Once the 'roids are a tradeable ware, they could then be placed in Player-SYs and used as resources for building Mobile Mines.
Thing is, would you be willing to make the different 'Roids 3 different wares whilst in the cargo hold?
As mention above, this cannot be done using conventional means. You would need to introduce a Custom ware and or EMP and I don't use them and cannot advise you on them. Sorry.
If you are, I believe I can write this.  |
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
 |
|
|
|
|
|