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 » Thu, 27. Sep 12, 03:09

Osiris454 wrote:I would just like to know how much it will take rather than guessing and hoping what is in the cargo hold is enough.
Actually, I consider that an argument for NOT consuming resources. :)

Cargo holds are already too small, and adding resources to Marine Repairs would increase the problem of never having enough cargo space to carry what you need. That is one reason why I have resisted consuming resources in my scripts. There are several other reasons, including the fact that I don't love overly complicated scripts that have too many things that can break.

I do like the idea of giving the player more feedback, and I like having choices; but only if I can find a simple and reliable way of implementing them. The user interface you suggest would be quite a bit more complicated than the current script. So I will keep the idea in mind, but probably will not implement it unless something else changes along the way.

Thanks for the suggestion, though... I always like to hear feedback and ideas!
Last edited by DrBullwinkle on Thu, 27. Sep 12, 04:24, edited 1 time in total.

User avatar
CKYRules
Posts: 112
Joined: Thu, 28. May 09, 02:30
x4

Post by CKYRules » Thu, 27. Sep 12, 04:21

Hey Bullwinkle, ive got a question, in your OP, you listed a bunch of value to edit, which i have. though im not quiet sure which one speeds up repairs(I know it takes a long time to repair, but i really just want to speed things up) Thanks in advanced!

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Thu, 27. Sep 12, 04:37

DrBullwinkle wrote:
Osiris454 wrote:I would just like to know how much it will take rather than guessing and hoping what is in the cargo hold is enough.
Actually, I consider that an argument for NOT consuming resources. :)

Cargo holds are already too small, and adding resources to Marine Repairs would increase the problem of never having enough cargo space to carry what you need. That is one reason why I have resisted consuming resources in my scripts. There are several other reasons, including the fact that I don't love overly complicated scripts that have too many things that can break.

I do like the idea of giving the player more feedback, and I like having choices; but only if I can find a simple and reliable way of implementing them. The user interface you suggest would be quite a bit more complicated than the current script. So I will keep the idea in mind, but probably will not implement it unless something else changes along the way.

Thanks for the suggestion, though... I always like to hear feedback and ideas!
Exactly. No sense in complicating it. Thats why I was thinking keeping it to something like Hull Plating only which I think is small enough.

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

Post by DrBullwinkle » Thu, 27. Sep 12, 04:56

CKYRules wrote:in your OP, you listed a bunch of value to edit, which i have. though im not quite sure which one speeds up repairs?
id="410" -- Total Effectiveness Multiplier . Default = 2. Higher = Faster Repairs
id="411" -- Total Effectiveness Divisor . Default = 1. Higher = Slower Repairs

So increase the value for id="410" and leave id="411" at 1.

Xannn
Posts: 9
Joined: Thu, 11. Oct 12, 00:43

Post by Xannn » Thu, 11. Oct 12, 22:40

Nice Script, although I found what could be a bug, but not really sure to be honest.

The thing is that I trained some marines, captured the Aran (Finally! :D ) and when the marines inside the Aran reached 100x4 they kept using credits each repair tick and the repairs went slower than when they weren't maxed, which is odd.

Also, they should not use any money at all as I have disabled the hull repair costs, and sice they are maxed they should stop "training" isn't it?.

Last but not least, here is my L044 text to see if I did anything wrong:

Code: Select all

<page id="8501" title="Marine Repairs">
  <t id="0">\033BMarine Repairs\033X - Marines repair your ships and stations</t>
  <t id="301">1</t>             <!-- Number of points of training boost per repair cycle. Default = Minimum = 1 -->
  <t id="302">50</t>           <!-- Percent chance of training on any given repair cycle. Reduces the amount of training per cycle. (Due to engine math limitations, anything from 50% to 99% is the same as 50%.) Default = 10.-->
  <t id="303">25000</t>     <!-- Training cost per repair. Default = 25,000 which is 2.5 million / 100, or the cost for training 1 point in all skills. -->
  <t id="304">0</t>            <!-- Repair cost per hull point. Default = 8. This is a different formula than shipyard; full repairs average 10-40% of new ship cost. -->
  <t id="305">50</t>           <!-- Station Repair Effectiveness Multiplier. Stations repair faster because their hulls are very thick. Default = 50x. -->
  <t id="306">15</t>           <!-- Station Repair Cost Percentage. Station Repair costs are multiplied times this percentage factor. Default = 15%. -->
  <t id="307">60</t>           <!-- Hugeship Repair Cost Percentage. Hugeship (M1, M2, M0) Repair costs are multiplied times this percentage factor. Default = 60%. -->
  <t id="308">1400000</t>  <!-- Hugeship Hull Definition. Number of hull points which define "Hugeship" for cost calculation. Default = 1,400,000. -->

  <t id="404">yes</t>          <!-- Marines get Fight training, in addition to other skills (yes/no: case sensitive). Default = no -->
  <t id="410">1</t>          <!-- Total Effectiveness Multiplier. Default = 2. Higher = Faster Repairs -->
  <t id="411">1</t>          <!-- Total Effectiveness Divisor. Default = 1. Higher = Slower Repairs -->
Thanks in advance, I hope there is a way to explain/fix this. Have fun and fly safe ^^.

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

Post by DrBullwinkle » Fri, 12. Oct 12, 19:09

Xannn wrote:Nice Script, although I found what could be a bug, but not really sure to be honest.

The thing is that I trained some marines, captured the Aran (Finally! :D ) and when the marines inside the Aran reached 100x4 they kept using credits each repair tick
Oooh... I think you are on to something there, Xannn. There is code to prevent the marines from training when there are no repairs to do, but it may not be working properly.

I will post a fix in the next couple of days, along with a couple of other requested enhancements.


repairs went slower than when they weren't maxed


I have no explanation for that one. If you see the same thing after the upcoming bug fix, then report it again, please.

And thanks for the report, Xannn!

Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 » Fri, 12. Oct 12, 23:54

Nice. When you post that I think I'll upgrade to your marine repair. I've wanted exactly what this script does for a very long time.. but I'll wait a little while longer for those bugs to be ironed out!

Xannn
Posts: 9
Joined: Thu, 11. Oct 12, 00:43

Post by Xannn » Sat, 13. Oct 12, 16:37

Glad to be able to help :) .
DrBullwinkle wrote:Oooh... I think you are on to something there, Xannn. There is code to prevent the marines from training when there are no repairs to do, but it may not be working properly.
I may have not understand well what you said, but in order to make things clear, I will try to clarify myself in that part.

What I did was to capture the Aran with some marines with almost 100 in all skills, they got the ship and kept inside it. They started the repair process of the ship, and achieved 100 in all skills before the ship was totally repaired (that huge thing has lots of hull :D ) and should have stop using money as they were fully trained already, but they kept using money from my wallet (Bear in mind that I had the hull repair costs at 0 in the L044 t file, so they should do free repairs as soon as they achieve perfection in their skills, unless I'm missing something).

In resume, they kept training their skills while repairing after reaching their skill cap, which is really odd. Maybe this has something to do with what you said, as you are their co-father and the expert after all :) .

Of course I managed to see that the money was being used by them by deactivating them from the AL and reactivating, using SETA and of course all my other ships with marines had 100% hull and were docked at the headquarters which never gets attacked.

It's also nice to see so fast respones here, though it was gonna be like when I posted on the turbo boost thread, never had answered there when I first posted here, and still no answer >.<.

Which leads me to [Offtopic]DrBullwinkle, would it be hard to "hack" the turbo boost extension to add a very simple yet effective menu to config the order and up to what percent each kind of "fuel" is consumed?

It seems a lot of people managed to alter their scripts, but I can't find neither in the x-studio or the in-game script editor what to change as I don't see any number or logical tips of what I should change to achieve what I desire in those scripts, so something a bit more noob friendly to alter it would be greatly appreciated[/Offtopic]

Thanks in advance for everything and sorry if I didn't explained myself well the first time. Also, sorry for the off topic comment, but I though it was my only chance as I have the feeling that the post in the Turbo boost thread was gonna be forgot in the history, I hope you don't mind ^^u.

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

Post by DrBullwinkle » Sat, 13. Oct 12, 17:30

I understood you the first time, Xannn. To clarify my response: I am working on it. :)


Xannn wrote: would it be hard to "hack" the turbo boost extension to add a very simple yet effective menu to config the order and up to what percent each kind of "fuel" is consumed?
There is already a configuration menu for the Turbo Booster. It is on the Community Configuration Menu. You must assign a hotkey to the Community Configuration Menu. Hotkeys only work when undocked.

Further questions about the Turbo Boost [X3TC Bonus Plugin] should go in that thread.

Xannn
Posts: 9
Joined: Thu, 11. Oct 12, 00:43

Post by Xannn » Sat, 13. Oct 12, 20:07

Damn this was a really fast response, thank you a lot ^^.

And glad to see I expressed myself well the first time, I was worried about that as my limited logic said "Marines training when no repairs are needed ≠ Marines training when repairs are needed but not training required".

That and my poor confidence at expresing myself in English ignited the paranoia :shock: .

And again sorry for the off-topic I did before, I just saw that the topic was slowly banishing from the first page and nobody said a thing, and I entered in panic without real reason :roll: .

Well, now that everything is settled, I will wait and test it as soon as possible, and tell you what changes I see. Good luck ^^.

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

Post by DrBullwinkle » Sun, 14. Oct 12, 05:30

Update:

Marine Repairs v2


New Features
  • v2.02 (2012-10-13)
    - Added Optional resource consumption for ships. Configurable in t file. (Troubleshooter11, JoelR)
    . . Default: Consumes Microchips, then Hull Plating, then Credits, as available.
    . . Can force Resources-Only Mode in t file.
    - Fixed bug that continued to charge for training after training was complete. (Xannn)
    - Fixed bug that prevented cost calculation from running on single ships.
    - Subtitle and tone signals player when repairs complete. (Vayde)
    - Improved training cost calculation for more accurate results.
Last edited by DrBullwinkle on Mon, 15. Oct 12, 04:27, edited 4 times in total.

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Sun, 14. Oct 12, 06:22

DrBullwinkle wrote:Update:

Marine Repairs v2
[ external image ]
[ external image ]


History
  • v2.02 (2012-10-13)
    - Added Optional resource consumption for ships. Configurable in t file. (Microchips or Hull Plating) (Troubleshooter11, JoelR)
    - Fixed bug that continued to charge for training after training was complete. (Xannn)
    - Fixed bug that prevented cost calculation from running on single ships.
    - Subtitle and tone signals player when repairs complete. (Vayde)
    - Improved training cost calculation for more accurate results.

    .
You're the best Drbullwinkle! Thanks for this!

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Sun, 14. Oct 12, 06:54

How high can this value go? 1-10?

Code: Select all

Total Effectiveness Divisor. Default = 1. Higher = Slower Repairs

Also, If I dont change this line to "yes" will it consume the hull plating/microchips as well as credits?

Code: Select all

<!-- Consume resources ONLY (do not use cash). Default = no. -->

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

Post by DrBullwinkle » Sun, 14. Oct 12, 07:03

joelR wrote:How high can this value go?

Code: Select all

Total Effectiveness Divisor. Default = 1. Higher = Slower Repairs
Probably 1 to 32,767 although there will be a point before you reach 32k that will become ineffective.

The Multiplier and Divisor work together. For example:
Multiplier = 1
Divisor = 2

Result is 0.5, or 2 times longer than normal.

Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 » Sun, 14. Oct 12, 07:05

Nice! Thanks :)

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

Post by DrBullwinkle » Sun, 14. Oct 12, 07:11

JoelR wrote:If I leave this line as "no" will it consume the hull plating/microchips as well as credits?

Code: Select all

<!-- Consume resources ONLY (do not use cash). Default = no. -->
Yes. It will always consume Microchips and/or Hull Plating, if they are available.

Therefore, if you are transporting valuable Microchips in your TL with marines on board, then try not to take any hull damage, because the marines will raid your cargo bay before they spend your money.

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Sun, 14. Oct 12, 07:20

Excellent. Thanks. This is exactly what ive been looking for for a long time.

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

Post by DrBullwinkle » Sun, 14. Oct 12, 23:40

.

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

Post by DrBullwinkle » Mon, 15. Oct 12, 08:12

Update v2.03a Bug Fix

Marine Repairs v2
[ external image ]
[ external image ]


New Features
  • :arrow: Bug Fix Fixed bug that caused repairs to be done too quickly.
    :arrow: Added Nividium If Nividium, Microchips or Hull Plating are available, then they will be consumed first; before credits. Optionally, resource-only mode (no credits) can be set in the t file.

    v2.03a (2012-10-14)
    - Turned off unnecessary debug code.

    v2.03 (2012-10-14)
    - Fixed bug that inadvertently increased repair speed.
    - Added Nividium as optional resource.
    - Added ability to modify resource values (prices) in t file.
    - Increased relative value of Hull Plating because of its large volume. Less Hull Plating; more repairs. (You can change it in the t file now).

    v2.02 (2012-10-13)
    - Added Optional resource consumption for ships. Configurable in t file. (Microchips or Hull Plating) (Troubleshooter11, JoelR)
    - Fixed bug that continued to charge for training after training was complete. (Xannn)
    - Fixed bug that prevented cost calculation from running on single ships.
    - Subtitle and tone signals player when repairs complete. (Vayde)
    - Improved training cost calculation for more accurate results.
Last edited by DrBullwinkle on Tue, 16. Oct 12, 08:12, edited 2 times in total.

Probe1
Posts: 701
Joined: Sat, 7. Jan 12, 01:37
x3ap

Post by Probe1 » Mon, 15. Oct 12, 10:09

It was glorious letting my M2s be eaten to 50% hull while it lasted.
Back to that resulting in a 30 minute repair job I guess.

Post Reply

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