[MOD] Mobile Ship Repairs - v1.6

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Dreamwind99
Posts: 73
Joined: Mon, 20. Oct 08, 10:45
x3tc

Post by Dreamwind99 » Sun, 2. Nov 08, 00:01

Any chance of doing something like this with the actual mobile repair ship?

The hull is in game etc and works fine.

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

Post by Graxster » Sun, 2. Nov 08, 00:11

Dreamwind99 wrote:Any chance of doing something like this with the actual mobile repair ship?

The hull is in game etc and works fine.
I checked that tub out, lol. Have you looked at the stats or tried to fly it? It takes about 15 minutes just to make a 90 degree turn. I suppose it could be modded though. Interesting ship.

Speaking of modding, I've already got the Repair Lasers all modded up. Cost is quite high now, ware size is Medium, volume 6, required notoriety is fairly significant, and I have some pretty good production values for when I add factories. Have only slept about 4 hours in the last 2 days, so I must apologize for the problems with the scripts/packages. Pretty sure at this stage that the scripts are stable and fully functional.

Probably won't release any more script updates at this point. The next version will be a MOD package, looks like.

-Grax

Dreamwind99
Posts: 73
Joined: Mon, 20. Oct 08, 10:45
x3tc

Post by Dreamwind99 » Sun, 2. Nov 08, 00:14

Yes I have it can dock 'carry' 1 capital ship and 30 yes 30 M6's. :)

It moves just fine with a few extra tunings and rudder.

Pity it's XL cargo not ST that would just rock but it'd be nice as a mobile base repair ship.

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

Post by Graxster » Sun, 2. Nov 08, 00:25

Dreamwind99 wrote:Yes I have it can dock 'carry' 1 capital ship and 30 yes 30 M6's. :)
Holy smokes! I'm gonna load up X3 right now and take a second look at that. Didn't notice it can dock so many ships, and a capital ship too, no less.

On another note, anyone have any suggestions/ideas about who I can sell repair lasers to? If I add Repair Laser Factories, I can still have Repair Lasers bought and sold at Trading Stations (like BoGas and whatnot are), but I really need a bigger market for them, don't you agree?

I suppose I could add them as a secondary resource at some factories, like a Laser Fac (where they use them for repairs and/or parts?). What would use them as a primary resource? You'd think Shipyards, since they do so many repairs, but AFAIK, the only thing you can sell to shipyards is ships, and those get destroyed (and it's only 1 item at a time anyway).

-Grax

Dreamwind99
Posts: 73
Joined: Mon, 20. Oct 08, 10:45
x3tc

Post by Dreamwind99 » Sun, 2. Nov 08, 00:41

Market for em not really.

Keep it simple, if the aim is to have mobile repair then do just that, if it's going to be player only, a player fab would be enough with them being bought at eq docks and mil bases perhaps.

Which is why I sugested that ship, it's what it was made for, isn't too cheaty and script wise you don't have to bother about beams etc, with the ofshoot of being able to dock anything so it also helps with supplying cap ships with e cells etc, as it can dock ts's and has a massive cargobay, and is mobile.

If you reallly wanted to be flash you could set it up so that ships emergency jump or retreat to it for supply/repair.

Though the ship should cost a bucket. :)

Khaak_Slayer
Posts: 403
Joined: Sun, 18. Apr 04, 17:04
x4

Post by Khaak_Slayer » Sun, 2. Nov 08, 00:45

Good lord, you absolute legend! Thankyou so much for this! So very much!!
Rawr.

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

Post by Graxster » Sun, 2. Nov 08, 01:03

How did you get that ship? Cheat it in, plot mission, or is if for sale somewhere?

I checked it out more thoroughly, and I thought since it's called a repair ship, that it would repair any damaged ship that docked at it. But I tried docking a damaged K and nothing happened. I haven't really gotten very far in the game, aren't there ships that repair damaged hulls when other ships are docked at them? Pretty sure I remember that from X3R.

That ship wouldn't work with this script/mod however, since it doesn't have any laser bays and wouldn't be very good at maneuvering or catching up to other ships anyway. It should be modded so that docked ships are repaired (on a timer) though.

-Grax

abretey
Posts: 6
Joined: Wed, 31. Oct 07, 18:25
x4

Post by abretey » Sun, 2. Nov 08, 01:29

I can't seem to get the command to enable. At this time I have installed the latest manual version. The only thing I do not have is a jumpdrive installed. I see the command to repair ships, but it is greyed out.

Dreamwind99
Posts: 73
Joined: Mon, 20. Oct 08, 10:45
x3tc

Post by Dreamwind99 » Sun, 2. Nov 08, 01:38

I cheated it but also found one in game kinda...
Spoiler
Show
There's one in the unfocused jump area hidden although you can't target it etc.
XTM it was a mobile shipyard if I remember right like a few others like the minatuar drone frigate and teladi mine frigate they are in game work but not in stock game just need a talented person like ya self to make a script for em, or convert the XTM scripts to work in TC for em and add em to shipyards.

It has turrets but no weps assigned TShips quick edit should fix that.

Thing is script wise they'd be pretty easy to put back but add alot more to the game.

There's a lot you could do with this if your game, prolly get it signed too if you set it to be balanced.

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

Post by Graxster » Sun, 2. Nov 08, 01:50

abretey wrote:I can't seem to get the command to enable. At this time I have installed the latest manual version. The only thing I do not have is a jumpdrive installed. I see the command to repair ships, but it is greyed out.
If you do not have a Repair Laser installed in one of your main (front) gun slots, the command will be unavailable. Hopefully that's the problem.

-Grax

Edit: I just uninstalled the whole thing from my game, including removing the repair lasers from the trading docks. Saved, quit, then installed the latest Manual version and started the game, and it's working for me. Triple check the following:

1. Your ship has Special Command Software MK1 (which I'm assuming it does, since you say the command is greyed out).

2. You have a Repair Laser in your front gun slot(s)

abretey
Posts: 6
Joined: Wed, 31. Oct 07, 18:25
x4

Post by abretey » Sun, 2. Nov 08, 02:05

Ah, that seems to be the issue. Even though the Magnetar can equip the repair lasers, it has no main guns, only turrets.

Teladidrone
Posts: 644
Joined: Tue, 24. Aug 04, 11:41
x3tc

Post by Teladidrone » Sun, 2. Nov 08, 02:24

How about allowing repair lasers in turrets, too?
There are a couple TS around that could mount them and would be perfectly for a dedicated repair ship.
Also makes more sense that some freighter is doing the dirty repair works and not a shiny corvette... ;)

amirite
Posts: 243
Joined: Thu, 23. Oct 08, 22:01

Post by amirite » Sun, 2. Nov 08, 03:09

Yeah, if we could put these on Turrets, and maybe like a 'Repair Friendlies' Command to auto-repair damaged ships that fly within range. That would be godly.
-TEVE

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

Post by Graxster » Sun, 2. Nov 08, 05:14

Working on that now to see if it's feasible. Also, I think I messed up again, lol. May have overwritten the script that had the repair ship manually buying e-cells after repairs. Give me a few minutes to sort everything out. God, I need some sleep!

-Grax

I've taken the links down temporarily until I fix a couple of things.

Edit: Links are down until I get some sleep. I fixed the scripts now so that ships with turrets but no main guns can be used as repair ships. Re-added the code to have the repair ship pilot buy energy cells and fly to home base. (found that one in my recycle bin...geez) I think I'm going to have to stop supporting 2 different versions. It's too confusing.

amirite
Posts: 243
Joined: Thu, 23. Oct 08, 22:01

Post by amirite » Mon, 3. Nov 08, 02:51

Awesommme, thanks. I don't think anyone will be opposed to manual cell pickups for their pilots - it's how literally every other cell-requiring mod works.
-TEVE

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

Post by Graxster » Mon, 3. Nov 08, 05:59

Well, got my sleep and been working on this for the last 12 hours. Everything should be working now. There's only one issue that just came to my mind. With the automatic Energy Cell purchasing after each repair, if you have more than one ship that needs repair it could be a pain in the butt. If the repair ship has Energy Cells and a Jumpdrive, as soon as repairs are complete it will jump to a sector to buy Energy Cells (unless there's a SPP with a good price in the current sector). Not sure if this is going to be an issue or not.

-Grax

Teladidrone
Posts: 644
Joined: Tue, 24. Aug 04, 11:41
x3tc

Post by Teladidrone » Mon, 3. Nov 08, 07:09

I say just leave it.
No auto resupply with energy cells; if the player wants the repair ship to be able to jump, he needs to take care for enough fuel manually.
Dont automate too much... ;)

//Edit:
Hm, mod package.
Can this be used as a false patch, too?

ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh » Mon, 3. Nov 08, 07:29

Teladidrone wrote:I say just leave it.
No auto resupply with energy cells; if the player wants the repair ship to be able to jump, he needs to take care for enough fuel manually.
Dont automate too much... ;)?
Actually, thinking about it, I totally agree with Teladidrone. There is already the autojump and fuel resupply settings, along with the Resupply Software. So jumping and resupplying with ecells is already done for you. I would focus on the actual repair scripts instead of bothering with refueling. Couple of ideas: Repair wing, Repair formation, Repair nearby ships, Repair all ships in sector, Repair all ships docked at station/carrier - to name a few.

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

Post by Graxster » Mon, 3. Nov 08, 08:00

Teladidrone wrote:Hm, mod package. Can this be used as a false patch, too?
False patches don't work in X3TC, unfortunately. Why don't you want a mod package? If you need to merge Mods, just use the Mod Manager.

And yeah, I agree with both of you (insomnia again, so I came back on, lol). Was laying in bed thinking about it, and since the game has the autojump and fuel resupply, I'll probably just delete that code completely. Also going to add 1 more factory if I can get it to work this time. But for the moment, at least, I think I'm just going to go play the game! :)

-Grax

Edit: v1.6 update.

Version notes:

v1.6:

Removed all code dealing with "automagically" adding energy cells needed for a jump.
Removed all code that told the repair ship to go purchase energy cells when repairs were completed.
Removed "fly to homebase" when repairs were completed.

Just set the Auto Jump and Fuel Resupply options in the ships command console.

amirite
Posts: 243
Joined: Thu, 23. Oct 08, 22:01

Post by amirite » Mon, 3. Nov 08, 20:22

Sweeeet, thanks a ton for doing this dude. This is already quite fleshed out. Another one of those no-brainer features that should have come along with the astronaut repair beam in the first place.

I've been meaning to get into X3 modding and I think I might make my first project an improvement of the currest beam effect. It sucks major booty and I think I could make something cool looking.
-TEVE

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