Marine Repairs and Training [TC][AP][ALP]

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

Post Reply
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 15. Apr 16, 20:33

Ship class is the only way. Marine capacity is fixed by class.

You can, of course, change your Hyperion Vanguard into a TP, for example. That would change marine capacity from 8 to 40 (in AP).

TP's cannot be carriers. So, in our Hyperion example, you would give up the ability to dock two fighters.

Hope that helps.

mercury46
Posts: 3
Joined: Tue, 12. Apr 16, 20:24

Post by mercury46 » Sat, 16. Apr 16, 13:53

uh.. but can i change a class's marine limit?
things like m6 to 10 marine

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24950
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Sat, 16. Apr 16, 14:31

No, you cannot do that.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

TomRobinson
Posts: 277
Joined: Thu, 7. Feb 08, 22:07
x4

Post by TomRobinson » Sat, 16. Apr 16, 21:54

Hey DrBullwinkle,

any idea whether this is compatible with anarkis defence systems as they both handle marine repairs?

I had a quick look with google but no obvious answers.

Cheers,

Tom
Do Hippos Eat Giraffes?

avilonrayne
Posts: 38
Joined: Fri, 30. Sep 11, 14:09
x4

Post by avilonrayne » Mon, 20. Jun 16, 11:38

While I'm loving this mod, why did you choose to use an illegal ware as the placeholder? It makes the marines very difficult to use outside of pirate/unknown/xenon space. If I don't remember to eject the slaves immediately after they spawn, I risk getting scanned before the marines are done repairing something. I've even gotten shot a few times by having SETA on while sending out the marines!

Is there any way to change or remove the placeholder ware? Alternatively, is there a way to make slaves legal?

I'm using the mod in both LU and XRM (two different install folders!)

adriancos
Posts: 26
Joined: Tue, 24. Apr 12, 11:43
x3tc

Post by adriancos » Tue, 28. Jun 16, 14:39

is there a possibility that instead of specifying repair cost per hull point in the xml file, to call in the script the following info: ship price (new from shipyard) divided by some amount?

i would like to adjust that a full repair to be around 90% of the new ship cost, but strictly in relation to the new ship cost

$repair.cost.per.hull.point = read text: page=$PageID id=304

does anyone know how can i call this in the script? if it is possible if course...

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Sun, 3. Jul 16, 03:24

Loving the mod, but I ran into a bug with station repairs (specifically, that they don't work) after some Terrans got angry over my Goner booze complex.

I took a couple hours to go through the scripts and traced down the bug. In al.Bw.MarineRepairsAndTraining.station.xml at line 62, you have:

Code: Select all

$repair.cost = $mothership->call script 'al.Bw.MarineRepairsAndTraining.cost' : target=$mothership  target.hull.current=$mothership.hull.current  target.hull.set=$mothership.hull.set
However, mothership.hull.set is unitialized at this point (it is not written until line 75). In the .cost script, it checks this input and returns 0 if there is a problem:

Code: Select all

if not $target.hull.set
  return 0
end
The .station script then checks the repair cost, sees that it is 0, and skips doing repairs. At a glance, the .docked.at.hub script (for repairing hub substations) has the same bug at line 71.

The quick fix I applied is to move up the hull.set variable writes to before the .cost script call, in the .station script and .docked.at.hub script respectively:

Code: Select all

$mothership.hull.set = $mothership.hull.current + ( $effectiveness * $c.station.effectiveness.multiplier )
$repair.cost = $mothership->call script 'al.Bw.MarineRepairsAndTraining.cost' : target=$mothership  target.hull.current=$mothership.hull.current  target.hull.set=$mothership.hull.set

Code: Select all

$station.hull.set = $station.hull.current + ( $effectiveness * $c.station.effectiveness.multiplier )
$repair.cost = $station->call script 'al.Bw.MarineRepairsAndTraining.cost' : target=$station  target.hull.current=$station.hull.current  target.hull.set=$station.hull.set

Malaras
Posts: 60
Joined: Tue, 17. Jan 12, 06:55
x4

Post by Malaras » Tue, 16. Aug 16, 09:34

Hello, Haven't played x3ap for long while till recently, Was curious what ship(s) i could use that can dock any where to repair stations? I bought a ceberous(sp) but it cant seem to dock at solar plant. More marines the better that the ship can hold.


Thanks much.

SirNukes
Posts: 546
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Mon, 3. Oct 16, 04:03

Personnel transports (TP) work well, holding 40 marines each and having a built in cargo life support system. Corvettes (M6) can dock most of the same places as a TP, though they hold only 8 marines.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Tue, 4. Oct 16, 04:34

Apologies to several of you. Apparently the board stopped sending me notices of new posts in the thread. Hopefully just temporarily. Catching up...


TomRobinson wrote:any idea whether this is compatible with anarkis defence systems as they both handle marine repairs?
Sure, Tom. Many players use both.


avilonrayne wrote:While I'm loving this mod, why did you choose to use an illegal ware as the placeholder? ... Is there any way to change or remove the placeholder ware? Alternatively, is there a way to make slaves legal?


I never really thought of slaves as being illegal, although you are certainly correct that they are. Yes, you could change the ware with the script editor. There is no way to make slaves legal.

Another solution is to not use SETA while marines are on an op. The odds of you being scanned during a boarding op are tiny, and you will have more to worry about from the cops than contraband when you complete the op.

Likewise, the odds of your being scanned during a spacewalk repair seem small, as well.

Nevertheless, I appreciate your report and will fix it in the next version. Thank you.

adriancos wrote:is there a possibility that instead of specifying repair cost per hull point in the xml file, to call in the script the following info: ship price (new from shipyard) divided by some amount?


Yes, I have a similar change planned for the next version. Will be based on repair cost at a nearby station rather than ship cost, although the results should be similar.

Specifically, I intend to replace the cost system in the main code with the cost system from spacewalk repairs, which does a more accurate job of costing.



SirNukes wrote:Loving the mod, but I ran into a bug with station repairs (specifically, that they don't work)


Good catch, SirNukes. Thanks for tracking down the bug (and fixing it!). I will add your change in the next version, with thanks to you.

User avatar
LordSekmeth
Posts: 13
Joined: Thu, 21. Nov 13, 04:03
x3tc

Post by LordSekmeth » Mon, 7. Nov 16, 22:15

Anyone had any luck adapting this to Litcube's universe? I find it hard to do a game without this mod :( :)
If it ain't broken, fix it anyway

Jonzac
Posts: 296
Joined: Sun, 27. Feb 05, 22:59
x3tc

Post by Jonzac » Tue, 8. Nov 16, 00:35

I just add it without the mod manager and it works just fine with non changes needed

User avatar
LordSekmeth
Posts: 13
Joined: Thu, 21. Nov 13, 04:03
x3tc

Post by LordSekmeth » Tue, 8. Nov 16, 01:28

Jonzac wrote:I just add it without the mod manager and it works just fine with non changes needed
Have you used it long term? Still works fine late game?
If it ain't broken, fix it anyway

Jonzac
Posts: 296
Joined: Sun, 27. Feb 05, 22:59
x3tc

Post by Jonzac » Tue, 8. Nov 16, 01:55

Yes in both LUband Mayhem. No issues I e seen

User avatar
LordSekmeth
Posts: 13
Joined: Thu, 21. Nov 13, 04:03
x3tc

Post by LordSekmeth » Tue, 8. Nov 16, 01:59

Jonzac wrote:Yes in both LUband Mayhem. No issues I e seen
Thank you :)
If it ain't broken, fix it anyway

Zaknafein
Posts: 384
Joined: Thu, 31. Mar 11, 20:48
xr

Post by Zaknafein » Tue, 6. Jun 17, 21:21

Im using the mod with LU and so far liking it. The Spacewalk feature is neat.
Right now I want to collect damaged ships in one of my SaturnComplexHubs and repair them all there slowly before selling.

I have a TP full of marines docked at that hub but the ships dont get repaired.

I used https://forum.egosoft.com/viewtopic.php ... inerepairs a few years ago (with X-Rebalance mod) and remember docking a TP full of marines on a station to repair the other ships working.
Does that feature doesnt work with v2 or am I doing sth wrong?


Sadly i cant reuse the old version since I only have .spk version and the .zip link is down.


PS: This needs to be quoted somewhere out of context:
DrBullwinkle wrote:
I never really thought of slaves as being illegal, although you are certainly correct that they are.
Ofc ***modified***, modders doing what Egosoft cant.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Tue, 6. Jun 17, 21:46

LOL. Are you practicing for a career in the news media? ;)

The repair-station feature is intended to be in Marine Repairs and Training, although I think that it is currently bugged. It is on my list of things to test/fix in the next version. No clue when that might be.

Glad you are liking the script.

MisterHalt
Posts: 3
Joined: Tue, 13. Jun 17, 15:21
x4

Post by MisterHalt » Sat, 17. Jun 17, 13:43

Just found and downloaded this mod today. I love the idea of putting those lazy jarheads to work when they're not stealing things for me. I've been using them to quickly repair ships in the 'go get my abandoned X' missions, but I've noticed the messages show 'null' in place of repair costs and my current balance.

Also just now I had to reload because my marines somehow turned into slaves. Probably something I did wrong while trying to recall them due to half of them not doing anything.

Is there a way to check if the passive training is actually working without checking my jarhead's stats every few minutes?

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 17. Jun 17, 18:35

Thanks. MRT solves multiple issues with several aspects of the game. Glad you like it.
MisterHalt wrote:I've noticed the messages show 'null' in place of repair costs and my current balance.
You will have to give me the steps to reproduce that. I need to be able to reproduce the error before I can fix it.

MisterHalt wrote:my marines somehow turned into slaves.
Offhand, I cannot think of a way that could happen. I believe you... I just don't know what might cause that. :)

Are you sure that you didn't just pick up some astronauts? If you board a civilian ship (such as a casino or hospital, for example), some of the passengers may escape as astronauts. If you collect them, then they will become slaves in your cargo hold.

Oh, wait... did you notice the slaves WHILE your marines were out doing a repair initiated with the hotkey? That's a trick that MRT does to ensure that you maintain enough cargo space so that you can collect your marines after the op. If things work correctly, the slaves should disappear when you collect your marines.


MisterHalt wrote:Is there a way to check if the passive training is actually working without checking my jarhead's stats every few minutes?
Well, that is the way to do it. You will want a bio-scanner to see the details.

Checking every few minutes may be overkill, because marines train slowly. If you tried to train them at an Equipment Dock, it would take something like three days, if I recall correctly.

It is probably sufficient to check their stats after a repair job. They get training credit pretty quickly after doing a repair (within a minute or two).

Also, MRT won't do any training at all if you don't have plenty of credits. Marines are expensive. You are going to want to maintain at least 10 million credits in your account most of the time. MRT stops training completely if you have less than two million credits.

MisterHalt
Posts: 3
Joined: Tue, 13. Jun 17, 15:21
x4

Post by MisterHalt » Sun, 18. Jun 17, 03:42

DrBullwinkle wrote:You will have to give me the steps to reproduce that. I need to be able to reproduce the error before I can fix it.
I pressed the Marines Repair button when near a damaged ship, the message down the bottom told me the cost and how much money I have, both 'null', then when the repair is done, almost the same message again with 'null' for cost and account.

http://i.imgur.com/sMM8hHs.jpg
DrBullwinkle wrote:Offhand, I cannot think of a way that could happen. I believe you... I just don't know what might cause that. :)

Are you sure that you didn't just pick up some astronauts? If you board a civilian ship (such as a casino or hospital, for example), some of the passengers may escape as astronauts. If you collect them, then they will become slaves in your cargo hold.

Oh, wait... did you notice the slaves WHILE your marines were out doing a repair initiated with the hotkey? That's a trick that MRT does to ensure that you maintain enough cargo space so that you can collect your marines after the op. If things work correctly, the slaves should disappear when you collect your marines.
I think what happened here was me just being too fast for the script. I was trying to restart the repairs to get some of the lazy jarheads to AIM at the ship, by pressing the repair button a couple more times than was probably necessary. I only realised the marines had disappeared when a scanner told me I had illegal goods on my ship. Fortunately only a minute after it happened, so I could reload an autosave to deal with the ship again.

Post Reply

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