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

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

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

The Cuban Nightmare
Posts: 332
Joined: Mon, 31. Oct 05, 22:28
x3

Post by The Cuban Nightmare »

Hey, just a question. I've got XRM installed and I installed this script. I configured my t file so that it should only use repair if resources are available, but it still uses cash on a docked L that is damaged to 63%. How can I prevent that? I have it docked on a chokaro and have 8 marines who are all some what skilled in engineering.
I'm your worst nightmare....

Apocalypse Incorporated; destroying a planet near you!
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Do the marines consume resources to do the repairs?

The cash that they use could be training cost.

If you set "Consume resources ONLY (do not use cash)" to "yes" then the marines should never use cash to do repairs. But they will pay training fees (in cash).
The Cuban Nightmare
Posts: 332
Joined: Mon, 31. Oct 05, 22:28
x3

Post by The Cuban Nightmare »

There were no resources on board at the time, but the repairs were still done, so I am assuming that something went wrong some where along the line.
I'm your worst nightmare....

Apocalypse Incorporated; destroying a planet near you!
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

That is normal behavior (unless you set "Consume Resources Only" to "yes" (case-sensitive)).
cyrusx
Posts: 21
Joined: Thu, 5. Feb 09, 18:09

Post by cyrusx »

just tested )
do a fresh .spk over XRM install
modified 2 lines inside 8501-L044.xml

Code: Select all

  <t id="311">yes</t>		<!-- Consume resources ONLY (do not use cash). Default = no. -->
  <t id="411">5</t>          <!-- Total Effectiveness Divisor. Default = 1. Higher = Slower Repairs -->
kill all player ships and stations but [PLAYERSHIP], set account to 200kk, set my Bragi's hull to 1 (0% of 1,725,000 hull points), got 20 x ???x100x100x100 skilled marines onboard and 37 Nividium.

turn on SETA.

after while:
10% of hull (174,401 HP): account 199.896.566, 37 Nividium onboard

EDIT:
setting "Effectiveness Divisor" to 1 turns on resource consumption )

EDIT2:
in my first post i copy-pasted a wrong line of config, sorry. edited.

EDIT3:
ejecting all of Nividium from cargobay does not stop repair )
Last edited by cyrusx on Mon, 28. Jan 13, 23:06, edited 4 times in total.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

OK, that could be normal with a large divisor. The Script Editor cannot do floating-point math, so you have to be careful with large divisors.

Try setting id="311" -- Consume resources ONLY (do not use cash) -- to "yes".

Thank you for posting your exact settings.
cyrusx
Posts: 21
Joined: Thu, 5. Feb 09, 18:09

Post by cyrusx »

DrBullwinkle wrote:The Script Editor cannot do floating-point math, so you have to be careful with large divisors.
just that's what i wanted to say in my first post! )))
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

OK, thank you. Posting actual lines from the t file helps.

There is not much that I can do about the lack of floating-point math. It is a limitation of the script engine.
  • (I *could* work around it, but your scenario is very unusual).


If your goal is slower repairs, then it would be easier to slow down the timer for the AL loop: Increase <t id="412">15</t>. (Warning: do not *decrease* the number -- it can cause AL Pileups, which can ruin your saved game.)
cyrusx
Posts: 21
Joined: Thu, 5. Feb 09, 18:09

Post by cyrusx »

Thanx, this is elegant solution!

But how about "no resources - no repairing"? )
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

cyrusx wrote:But how about "no resources - no repairing"? )
Try setting id="311" -- Consume resources ONLY (do not use cash) -- to "yes".
cyrusx
Posts: 21
Joined: Thu, 5. Feb 09, 18:09

Post by cyrusx »

Aha! Me just think about my test... )

another question: Resources only - ON, marines 100% skilled, so where is my credits? Paid for training 100% marines?
cyrusx
Posts: 21
Joined: Thu, 5. Feb 09, 18:09

Post by cyrusx »

DrBullwinkle wrote:Try setting id="311" -- Consume resources ONLY (do not use cash) -- to "yes".
Sorry, I was three times edited my post with test, one time about wrong copy-paste.
311 set to "yes" from the start.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

cyrusx wrote:

Code: Select all

  <t id="311">yes</t>		<!-- Consume resources ONLY (do not use cash). Default = no. -->
  <t id="411">5</t>          <!-- Total Effectiveness Divisor. Default = 1. Higher = Slower Repairs -->
..

EDIT3:
ejecting all of Nividium from cargobay does not stop repair
Interesting. Is that true even with the divisor (411) set to 1?
cyrusx
Posts: 21
Joined: Thu, 5. Feb 09, 18:09

Post by cyrusx »

DrBullwinkle wrote:Interesting. Is that true even with the divisor (411) set to 1?
Yes it is. My EDIT's was wrotten in historical order )
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

OK, that is unintended (that marines will repair even with no resources when "Consume resources only" is "yes").

Under certain circumstances, if the marines believe that you are low on cash, then they will "lend" you the credits to complete the repairs. They earn the cost back by adding a small service charge onto all normal repairs. My guess is that the conditions of your test provoke this response by the marines.

I will look into it for the next version. It should not be hard to fix.

Thanks for the report, cyrus!
bbgun77
Posts: 87
Joined: Tue, 18. Nov 08, 07:38
x4

Post by bbgun77 »

Sorry,some thing is wrong.

IN XTC 2.0 Marine dont use Nividium, Microchips to repair ship Hull Plating i dont test.

How can i do it work?
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Resource consumption is "on" by default. Check your t\8501-L0xx file for:

Code: Select all

  <t id="309">yes</t>		<!-- Consume Hull Plating if available. Default = yes. -->
  <t id="310">yes</t>		<!-- Consume MicroChips if available. Default = yes. -->
  <t id="312">yes</t>		<!-- Consume Nividium if available. Default = yes. -->


The values must be in English and are case-sensitive: "yes"
bbgun77
Posts: 87
Joined: Tue, 18. Nov 08, 07:38
x4

Post by bbgun77 »

<?xml version="1.0" encoding="UTF-8" ?>
<language id="44">
<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">10</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">8</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 = 50. -->
<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="309">yes</t> <!-- Consume Hull Plating if available. Default = yes. -->
<t id="310">yes</t> <!-- Consume MicroChips if available. Default = yes. -->
<t id="311">no</t> <!-- Consume resources ONLY (do not use cash). Default = no. -->
<t id="312">yes</t> <!-- Consume Nividium if available. Default = yes. -->
<t id="313">24200</t> <!-- Nividium value. Default = 24200 -->
<t id="314">15200</t> <!-- Microchip value. Default = 15200 -->
<t id="315">26800</t> <!-- Hull Plating value. Default = 26800 -->

<t id="404">no</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 = 1. Higher = Faster Repairs -->
<t id="411">1</t> <!-- Total Effectiveness Divisor. Default = 1. Higher = Slower Repairs -->
</page>
</language>

this 8501-L044 three resources is on,but marines dont use it.
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Do you play in English?
bbgun77
Posts: 87
Joined: Tue, 18. Nov 08, 07:38
x4

Post by bbgun77 »

Yep,English X3TC 3.2C and XTC 2.0 ,only have MARS/SmartTurrent/bouns package/marines repair/Ring of fire/X3 map/Mobile_Mining_Mk2/Detector(dis).

E.G,I put microchip(13) and 5 marines into M6 .untill ship repaired the microchip still 13 in the cargo bay.

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