[Script] Scrap Ship at Carrier v1.01 1-Mar-09

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

[Script] Scrap Ship at Carrier v1.01 1-Mar-09

Post by eladan » Thu, 4. Oct 07, 11:15

Scrap Ship at Carrier v1.01


Version 1.01 - Download here (Xai-corp - thanks again, moggy)

Modification of my Scrap Ship at Player HQ script to allow scrapping of ships at a carrier. Now in 1.01 also allows scrapping the entire contents of a carrier via a command in the Special Command menu of the carrier.

The readme:
Readme wrote:Scrap Ship at Carrier v1.01 by eladan
-------------------------------------

This is a quick and dirty modification of my Scrap Ship at Player HQ script to allow ships to be recycled into parts when docked at any ship of type 'carrier' - this basically means any ship capable of docking another ship (TL, M1, M7)

It works the same way as the bonus pack script for Scrap Ship at Player HQ - the command is only available on the ship to be recycled if docked at another ship. Running it causes the ship name to change to a status report on how long until the process is complete. If the command is rerun, or if another command is run on the ship being recycled, the process will abort, and will need to start from scratch if it is still desired. The command will also abort if there isn't enough room in the carrier for the recycled wares.

The wear/inefficiency of the process has been increased to 15% to indicate a less efficient field process compared to the HQ operation.

The command uses the same command slot as the unsigned (non-BP) version of Scrap Ship at Player HQ - COMMAND_TYPE_SPECIAL_56, and additionally uses COMMAND_TYPE_SPECIAL_57. It also uses page id and t file 8236 (not the same as Scrap at HQ.)


Changelog:
----------

v1.01
- Added ability to scrap all ships at a carrier with one command. Command is available in the Special Commands menu on the carrier.
- Added check that carrier isn't docked at the end of the scrapping process. Weird things happen otherwise... (double-docked ships give the game engine a headache.)

v1.00
- Initial release.
(Previous release, Version 1.00 - Available here if desired.)
Last edited by eladan on Sun, 1. Mar 09, 06:40, edited 1 time in total.

Pogi
Posts: 522
Joined: Thu, 13. Apr 06, 12:35
x2

Post by Pogi » Thu, 4. Oct 07, 14:18

Working fantastic in my game! Thanks a bunch Eladan :thumb_up: :thumb_up:
X3..The most fun a man can have...With his clothes on.

Senator Vrax
Posts: 230
Joined: Tue, 18. Sep 07, 06:57
x3tc

Post by Senator Vrax » Thu, 4. Oct 07, 14:50

Working fine for me too. Nice job 8) :D

RaGodofTehSun
Posts: 417
Joined: Thu, 23. Dec 04, 03:02
x3

Post by RaGodofTehSun » Thu, 4. Oct 07, 22:23

Does this work with XTM?

Senator Vrax
Posts: 230
Joined: Tue, 18. Sep 07, 06:57
x3tc

Post by Senator Vrax » Thu, 4. Oct 07, 22:35

Yes it does. 8)

Gammel
Posts: 668
Joined: Tue, 10. Jul 07, 08:07

Post by Gammel » Fri, 5. Oct 07, 00:37

:o
Sweet. Nice work.
Its exactly what I was looking for!
!!! Caution!!!
Signature lost!
Please contact your Admin!

RaGodofTehSun
Posts: 417
Joined: Thu, 23. Dec 04, 03:02
x3

Post by RaGodofTehSun » Fri, 5. Oct 07, 00:38

Hehe now i just need to make a raggity looking ship to fit this with to make a mobile pirate scrapyard... :D

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Fri, 5. Oct 07, 03:23

Cheers guys - nice to hear it's useful.

Thraxwhirl
Posts: 683
Joined: Fri, 17. Feb 06, 20:54
x3ap

Post by Thraxwhirl » Sat, 6. Oct 07, 02:23

Forgive me if I'm missing something obvious, but why would you want the ability to scrap an unwanted ship when you could sell it, for money, to the AI?

What benefit is there to scrapping a ship at one of your own ships or stations?

Sorry if I sound derogatory - I certainly don't mean to - I'm just not really sure what purpose this serves.

Can you explain?

User avatar
Matt Armada
Posts: 205
Joined: Mon, 21. Mar 05, 13:46
x4

Post by Matt Armada » Sat, 6. Oct 07, 03:57

Thraxwhirl wrote:Forgive me if I'm missing something obvious, but why would you want the ability to scrap an unwanted ship when you could sell it, for money, to the AI?

What benefit is there to scrapping a ship at one of your own ships or stations?

Sorry if I sound derogatory - I certainly don't mean to - I'm just not really sure what purpose this serves.

Can you explain?
If you have the player HQ added in X3 version 2.0 or above, or your running XTM and have the mobile goner shipyard, you can reverse engineer ships to get their blueprints..from then on you can build the ship if you have enough resources and a small ammount of credits...
This script lets you, instead of going and BUYING the necessary resources, take captured ships and turn them into fuel..break them down then reconstruct them into whatever vessels you require...

User avatar
Matt Armada
Posts: 205
Joined: Mon, 21. Mar 05, 13:46
x4

Post by Matt Armada » Sat, 6. Oct 07, 23:50

I'v found a single problem with this though :P If your running Xtended, the goner Aran dosent use resources, only credits to make these....oh well...This iss till useful if you have a LOT of ships to transport and cant hold them all....

Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 » Wed, 17. Oct 07, 02:44

Nice. This will make a fine addition to the Exodus Mod. Now, to rewrite the ship building scripts to use the 'corrected' resources (ie. HQ style), and I'll be set.
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Wed, 17. Oct 07, 04:36

Cheers Jake, enjoy.

User avatar
digdug83
Posts: 277
Joined: Tue, 22. Aug 06, 22:33
x4

Post by digdug83 » Wed, 17. Oct 07, 07:33

Is there a list of what resources a given ship will produce? Is it dictated by ship type, race, health, some other factor or some combination? Can I ask more questions in a single post :roll:

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Wed, 17. Oct 07, 09:38

digdug83 wrote:Is there a list of what resources a given ship will produce? Is it dictated by ship type, race, health, some other factor or some combination? Can I ask more questions in a single post :roll:
Well, all those are aspects of the same question, really... :wink:

The resources you get are essentially the resources you would need to build a ship of the same type at the PHQ, less a flat 15% (inefficiency/wear) + any damage percentage of the ship. If you'd like a list of what resources are required to build each ship, check Dave Toome's HQ production cost calculator - all my in-script calcs are based on that.

Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 » Wed, 9. Jan 08, 23:52

Something I'd thought you'd like to check out. Increases the accuracy of the calculations significantly:

Floating Point Math Lib

I've been hosting the files, but never checked them till recently.
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©

wga
Posts: 34
Joined: Thu, 19. Feb 09, 15:04

How about add additional command for carrier to scrap all docked ships ?

Post by wga » Thu, 26. Feb 09, 04:28

It will be much better to simply one command to scrap all docked ships. :)

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Re: How about add additional command for carrier to scrap all docked ships ?

Post by eladan » Fri, 27. Feb 09, 03:41

wga wrote:It will be much better to simply one command to scrap all docked ships. :)
It would be trivial to write a wrapper script which simply calls this for each docked ship... I'll look at it this weekend.

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Sun, 1. Mar 09, 06:43

New release 1.01 to allow scrapping of entire contents of carrier. The command is available under the Special Command menu of the carrier.

Link and readme in first post.

Katorone
Posts: 378
Joined: Thu, 12. Oct 06, 10:49
x3tc

Post by Katorone » Sat, 7. Mar 09, 05:18

Would it also be possible to automagically transfer all items in the cargo bay of those ships, to the cargo bay of the carrier?

Return to “X³: Reunion - Scripts and Modding”