[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

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

Post by Graxster » Thu, 6. Nov 08, 23:49

corhen wrote:i installled the mod, but the factory started off with 5600 repair lasers!!
Then you haven't installed it correctly. The MOD file contains TLasers.pck file which modifies the size and cost of Repair Lasers. It's literally impossible for a factory to have that many lasers if the modified TLasers file is loading. Did you try to use it as a false patch, or forget to select the mod at the pre-load screen?

When it's working correctly, Repair Lasers cost about 500,000 cr and the factories can only hold 8 maximum.

-G

Edit: This is what it should look like when installed properly:

[ external image ]

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

Post by amirite » Fri, 7. Nov 08, 06:44

I know people aren't really following instructions and creating these bugs as a result - myself included, earlier. However I can't get everything to work correctly and I think it has something to do with the fact that I installed the very first version of the script, plus botching the new version later.

I went through the uninstall procedure you have, removed and disabled everything properly. However when I started the game back up I still had Repair Factories with 64 credit lasers. I figure this might happen in the interim, so I just continued to save, quit, re-install the addon, and re-launch. Everything seems correct now, except that Repair Laser Factories still have like 1600 stock.

Without much knowledge of how modding for X3 works, is there a way to fix/override this stuff next time you update? Or possibly another uninstall script that removes EVERYTHING having to do with the mod?

Anyway, not a giant issue, because at least they're in stock when I need them. I am loving this mod. The new Sector command is bitchin.
Last edited by amirite on Sat, 8. Nov 08, 08:03, edited 1 time in total.
-TEVE

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

Post by Graxster » Fri, 7. Nov 08, 07:00

It's 1AM and I'm going to bed now, but tomorrow I'll write a complete uninstall that will even destroy the factories. Then you can save, quit, install the latest version and when you load the game everything will be correct (hopefully, lol).

-Grax

Edit: Added complete uninstall to download section.

Note for those running the MOD and still having thousands of cheap lasers:
You're not running the MOD then, lol. Download the complete uninstall and read the readme I've included.

lt_wentoncha
Posts: 495
Joined: Thu, 15. Dec 05, 01:51
x4

Post by lt_wentoncha » Sat, 8. Nov 08, 04:13

Hmm, installed this w/ the plugin mgr...but I don't see anything show up in OL, factories or otherwise. Suggestions? Thanks.

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

Post by amirite » Sat, 8. Nov 08, 07:31

Thanks man, I really appreciate it and I'm sure this will fix it. Now it's 1am for ME, so I'll try it in the morning.
lt_wentoncha wrote:Hmm, installed this w/ the plugin mgr...but I don't see anything show up in OL, factories or otherwise. Suggestions? Thanks.
You also need to enable the Mobile Ship Repairs mod package in theX3TC launch window (not the manager).
-TEVE

bounty_hunter66
Posts: 550
Joined: Tue, 15. Aug 06, 13:36
x4

Post by bounty_hunter66 » Sat, 8. Nov 08, 12:44

Every time i try using this my game crashes when i load a save or start a new game

WarChicken
Posts: 136
Joined: Mon, 20. Mar 06, 20:19
x3tc

Post by WarChicken » Sat, 8. Nov 08, 15:18

Finally I can equip my Vidar with Repairlasers.
This is extremely useful in combination with the weapon switcher script.
Had my Chimera from 70% to 100% Hull in about 5 seconds.

Thanks a lot Graxster!

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

Post by amirite » Sat, 8. Nov 08, 23:59

Uninstall worked, and everything seems to be working as normal now. Thanks :D
-TEVE

argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Adding Repair Lasers to EQ Docks - How?

Post by argon_emperor » Tue, 11. Nov 08, 02:47

Hiyas, can anyone point me in the right direction as to how to add Repair Lasers as a product to EQ Docks? All I know is that it can be done with a script (at least it could in Reunion), but I have no idea about how to go about it.

Any help would be much appreciated.

Thanks

AE


{Merged to related thread. jlehtone}

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

Post by Graxster » Tue, 11. Nov 08, 05:13

Take a look at THIS thread by me. You can download the file that says "NOTE: If you have a bug where Repair Lasers are showing up in Equipment Docks" and take a look at how I remove then from eq docks. Just reverse the process. ie: $dock -> add product to factory or dock: Repair Laser.

-Grax

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

Post by ThisIsHarsh » Sun, 16. Nov 08, 15:34

How long should it take for a Repair Laser to be produced at the factories? It's been a couple hours, on and off, and there is still 0 stock...

EDIT: Yeah confirmed it now, the factories never produce any repair lasers. I kept checking with the script command "get remaining production cycle time" and it never changes.

EDIT2: Sorry my bad. The default amount of wares when first installed isn't enough to start production, that's all. It requires about 25% of all resources to be available to start production.

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

Post by ThisIsHarsh » Sun, 16. Nov 08, 17:10

A couple of observations I made whilst running in circles trying to figure out why no repair lasers were being built:

- All argon weapons factories have energy cells, meatsteaks and ore as primary and crystals as secondary resources. So the repair laser factories go against the grain somewhat.

- Using the Argon Special Weapons Production Complex sounds better when Betty says the name than 'Ammunition Factory'.

- If any other script/mod adds an ammunition factory to the two sectors, then your setup scripts will have trouble... would suggest storing references to the factories in global variables to check against.

(and damn you make life difficult changing anything when you use multiple scripts to do the same job! - make one factory creation script and call it twice, rather than copy-pasting the whole file)

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

Post by amirite » Sun, 16. Nov 08, 17:26

Found some sort of bug last night. I had an Osprey with 8 repair lasers and 3 PRGs on the turrets. When I ordered a repair the Osprey started shooting the three turrets at me too. So you might wanna add some kind of check for that stuff.
-TEVE

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

Post by Graxster » Sun, 16. Nov 08, 17:50

amirite wrote:Found some sort of bug last night. I had an Osprey with 8 repair lasers and 3 PRGs on the turrets. When I ordered a repair the Osprey started shooting the three turrets at me too.
It's not a bug. The game is not designed to allow you to order your own ships to attack each other. Since it was requested that ships with no main guns and only turrets be able to use the scripts, I made the repair ship fire main guns and turrets at the damaged ship. Just use a dedicated repair ship that doesn't have weapons installed, or remove them prior to attempting repairs.

@ThisIsHarsh: Yeah, takes a little over 9 hours to make 2 lasers, and as stated in the OP, it's up to you or NPC's to stock the factories with resources. I'm still waiting to get some in my current game (which is over 24 hours old). This was intentional, since they save millions and allow you to make millions (repairing damaged ships before selling them). Once you get them, they're a cash cow. Hence also the computer components as a 4th resource, "going against the grain", as you say.

As for the creation scripts, that was my first effort at creating factories. As you may know, the game refuses to allow you to create 2 factories with one script. So I took the easy way out, lol. Are you referring to using something like this instead:

Code: Select all

$install.fabs = get global variable: name='GRAX.INSTALL.FABS'
if not $install.fabs
set global variable: name='GRAX.INSTALL.FABS' value='first.install'
return null
else if $install.fabs == 'first.install'
set global variable: name='GRAX.INSTALL.FABS' value=null
end
To install the 2nd factory on the second game start?

-Grax

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

Post by ThisIsHarsh » Sun, 16. Nov 08, 18:06

Ah OK, good reasoning. But a bit harsh when you install a plugin then have to wait 9 hours to even begin to use it!

Graxster wrote:As for the creation scripts, that was my first effort at creating factories. As you may know, the game refuses to allow you to create 2 factories with one script. So I took the easy way out, lol.
Err, no I had no idea you couldn't create 2 factories in 1 script. In fact I modified yours and created a second 'createfab' script that takes x,y,z,sector and creates the factory. Then combined the two fab setup scripts into one.

Script-wise I was thinking more along the lines of:

Code: Select all

$install.fabs = get global variable: name='GRAX.INSTALL.FABS'

if not $install.fabs
  $install.fabs = create array: size=2
  set global variable: name='GRAX.INSTALL.FABS' value=$install.fabs
end

$fab1 = $install.fabs[0]
$fab2 = $install.fabs[1]

if not $fab1 -> exists
  $fab1 = call script CreateFab: x= y= z= sector=
  $install.fabs[0] = $fab1
end
if not $fab2 -> exists
  $fab2 = call script CreateFab: x= y= z= sector=
  $install.fabs[1] = $fab2
end

set global variable: name='GRAX.INSTALL.FABS' value=$install.fabs

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

Post by Graxster » Sun, 16. Nov 08, 19:30

ThisIsHarsh wrote:Ah OK, good reasoning. But a bit harsh when you install a plugin then have to wait 9 hours to even begin to use it!
Well, I tend to lean more toward cheating, hehe, but as soon as I posted this, everyone wanted it to cost more, take longer, etc... So I did that to please the masses. If you want them produced faster, you can change the RelVal in TLaser to lower numbers, which would also lower the price a bit.

I have to revise my earlier statement. The game refuses to create 2 fabs if you have the script named "setup", which is what I originally attempted. I just now tried (in setup.Grax.repair.ship): if not (global variable), call script: create.fabs, and it made both fabs in one shot. So apparently it's only picky if it's in a setup script.

-Grax

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

Post by ThisIsHarsh » Sun, 16. Nov 08, 19:42

Nah its fine the way it is price-wise, maybe a tad expensive but not worth changing. I did change it to use ecells, ore and meatsteaks, so it's easier to keep stocked.

Maybe would have been good to start the factories and/or the TDs with some stock to begin with so people can get that first ship equipped, but have to wait for others.

masterw3
Posts: 93
Joined: Wed, 17. Oct 07, 05:37
x4

Post by masterw3 » Thu, 20. Nov 08, 04:33

Now we need some
Repair Command Software MK1 - allows jump to sector and repair all ships command.
Repair Command Software MK2 - allows automatic jump to and repair ships when they are damaged and clear.
(for while i'm at work, and they crash into things (all the time) or get attacked by pirates or xenon (all the time), i can wake up, or come home, to fewer lost ships...

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

Post by amirite » Fri, 28. Nov 08, 03:10

Quick question, once I've used the mod file to add the new stations, I can probably stop using it, correct? I just did a reinstall and would feel a lot better with some validation on this theory. However in my last game I did this and it didn't seem to cause any problems.


I've been thinking about this mod and the balance issues it creates. Don't get me wrong, it should absolutely be in the game. I've been thinking more and more though that this would be a perfect compliment to fixing the huge payouts you get from combat missions. Because going back to X3 type numbers would make combat hard again, but with an official addition of the repair laser it would make combat in general much more balanced but still fun and profitable.

Random thoughts as I smoke a jay and play X3 8)
Last edited by amirite on Fri, 28. Nov 08, 04:53, edited 1 time in total.
-TEVE

User avatar
TSM
Not a Moderator
Posts: 2947
Joined: Thu, 1. Jul 04, 12:31
x4

Post by TSM » Fri, 28. Nov 08, 03:46

nope if you have modded material such as ships or stations and save game and remove the mod you could and most lieky will end up with corrupted saved game upon reload.
FAQ's Egosoft Interactive FAQ
Egosoft Wiki

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