[SCRIPT] [2009.03.03] Marine Repairs v1.02

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
vampirecosmonaut
Posts: 320
Joined: Thu, 17. Aug 06, 21:23
x3tc

Post by vampirecosmonaut » Fri, 9. Oct 09, 22:30

This script works fine for me in 2.1. The problem is, it works TOO well.

I have 20 fully trained marines, between 90-100 in every skill, and they
repair my carrier very quickly and any docked ships get repaired instantly.
The moment a damaged ship docks with my ship, it jumps to 100% hull.
It's really convenient, but it feels like cheating. >..>
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.

Solomon Short
Posts: 699
Joined: Wed, 25. Mar 09, 08:00
xr

Post by Solomon Short » Fri, 9. Oct 09, 23:21

Easy to fix, without adjusting .

Since (AFAIK) the only vessel that you can board from that is also capable of carrying auxiliaries is the Hyp. Vang., just move all your good marines to an M6, M7M, or TP, & limit yourself to 1-2 star, or a smaller number of, mechanics on your carriers.

User avatar
vampirecosmonaut
Posts: 320
Joined: Thu, 17. Aug 06, 21:23
x3tc

Post by vampirecosmonaut » Sat, 10. Oct 09, 06:39

I just altered the amount of repair in the plugin.tatakau.repair.effect.xml.
Looks like the script repairs your ship every minute or so with the total engineering and mechanical skill of the marines on board.

So for my carrier, it was healing 4000 hull points every tick. :o

I dropped it to half of the engineering skill of my marines.
Still feels a little much, I might make it 1/4 their engineering skill, considering it's the skill they use to reduce damage when taking the ship. >..>
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.

fobboy
Posts: 26
Joined: Mon, 12. Jan 09, 08:01
x4

Post by fobboy » Sat, 24. Oct 09, 22:20

How do I modify the xml file so that marine repair isn't as effective?

User avatar
vampirecosmonaut
Posts: 320
Joined: Thu, 17. Aug 06, 21:23
x3tc

Post by vampirecosmonaut » Sat, 24. Oct 09, 22:36

Code: Select all

plugin.tatakau.repair.effect
102
43
Marine Repairs - Determine total effectiveness of marines

$effect.total = 0
$target.marines = $target -> get marines array
$i =  size of array $target.marines
while $i
dec $i = 
$marine = $target.marines[$i]
$marine.engineering = $marine -> get marine engineering skill

if $marine.engineering <= 10
  $marine.effect = 1
else if $marine.engineering <= 20
  $marine.effect = 2
else if $marine.engineering <= 30
  $marine.effect = 3
else if $marine.engineering <= 40
  $marine.effect = 4
else if $marine.engineering <= 50
  $marine.effect = 5
else if $marine.engineering <= 60
  $marine.effect = 6
else if $marine.engineering <= 70
  $marine.effect = 7
else if $marine.engineering <= 80
  $marine.effect = 8
else if $marine.engineering <= 90
  $marine.effect = 9
else if $marine.engineering < 100
  $marine.effect = 10
else if $marine.engineering == 100
  $marine.effect = 12
end

$effect.total = $effect.total + $marine.effect
end

$target.docked = $target -> get ship array from sector/ship/station
$target.docked.length =  size of array $target.docked
if $target.docked.length > 0
$i = 0
while $i < $target.docked.length
$ship = $target.docked[$i]
$effect.ship = [THIS] -> call script plugin.tatakau.repair.effect :  target=$ship
$effect.total = $effect.total + $effect.ship
inc $i = 
= wait 10 ms
end
end

return $effect.total
That's what I did. >..>
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.

User avatar
Khensu
Posts: 110
Joined: Wed, 28. Oct 09, 10:42
x3tc

Post by Khensu » Thu, 29. Oct 09, 03:24

sry, but I'm a noob in scripting and editing scripts, so could you upload somewhere your updated version, because I think its to fast as it is, and whould like your version better :)

User avatar
vampirecosmonaut
Posts: 320
Joined: Thu, 17. Aug 06, 21:23
x3tc

Post by vampirecosmonaut » Thu, 29. Oct 09, 07:40

Here's a link to my modded effect values for your marines.
It is based on their engineering skill, providing 1 point of hull repair for every 10 points of engineering skill, with a bonus of 1 point when they have a skill of 100.

A maximum repair of 12 points of hull per tick.

http://www.filefront.com/14817891/plugi ... effect.xml

I certainly hope I'm allowed to post this. :oops:
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.

User avatar
Khensu
Posts: 110
Joined: Wed, 28. Oct 09, 10:42
x3tc

Post by Khensu » Thu, 29. Oct 09, 16:53

Thank you very much!!! :)

User avatar
Reisser
Posts: 648
Joined: Mon, 28. Feb 05, 16:39
x3tc

Post by Reisser » Tue, 1. Dec 09, 15:18

Exactly what I'm searching for - thanks!

But what if I want to lower the repair-rate a bit more?

Could I raise the wait-value for example to 100 ms ? If I see this right this is the loop-time for the repair

Code: Select all

$i = 0
while $i < $target.docked.length
$ship = $target.docked[$i]
$effect.ship = [THIS] -> call script plugin.tatakau.repair.effect :  target=$ship
$effect.total = $effect.total + $effect.ship
inc $i =
= wait 10 ms
end
end 

User avatar
vampirecosmonaut
Posts: 320
Joined: Thu, 17. Aug 06, 21:23
x3tc

Post by vampirecosmonaut » Tue, 1. Dec 09, 22:50

That would increase the time between repairs.
Change it in both plugin.tatakau.repair.docked and plugin.tatakau.repair.main.
Are you using my changes?
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.

User avatar
Reisser
Posts: 648
Joined: Mon, 28. Feb 05, 16:39
x3tc

Post by Reisser » Wed, 2. Dec 09, 10:06

Yes - I use your little hotfix and for now it works fine (three captured M3 still in repair-progress *g*). There is only a noob-crew of mechanics at work - so the delay is long enough for the moment.

Perhaps in future someone will script somethink like a ship-garage where it will cost time, credits and material for repairing own ships. Not as much as repairing them in a shipyard of course *g* - but it would be nice to have such a place where to send ships to ;)

russbo
Posts: 849
Joined: Sat, 12. Nov 05, 22:53
x4

Post by russbo » Sun, 3. Jan 10, 03:13

Just FYI, I'm getting game lock ups, and I think it's due to this script. Is there an interaction between this and Codea, or Graxsters Marine Training Manager?

XanII
Posts: 2390
Joined: Thu, 29. Dec 05, 16:07
x3tc

Post by XanII » Tue, 12. Jan 10, 14:37

Does this even work in 2.5?
X3:TC Heavy M6 guide : : : Let's pretend you are an addict, lets pretend that you are a X-games player... but i am repeating myself here.

Scoob
Posts: 5877
Joined: Thu, 27. Feb 03, 23:28
x4

Post by Scoob » Tue, 12. Jan 10, 14:41

Hi,

I'm using this in 2.5 with Codea and it's working just fine, possibly MTM has a conflict as I don't use that.

Cheers,

Scoob.

Protrader
Posts: 279
Joined: Wed, 3. Dec 03, 07:44
x3tc

Post by Protrader » Tue, 2. Feb 10, 09:22

Kakurate wrote:If anyone is interested, I've made a couple of changes to the script to suit my personal tastes.

- Marines will repair other damaged ships while docked at any kind station if the station isn't damaged
- Marines will repair up to 80% of the hull while the ship is moving, but any more and you will need to be not moving. (Simulates them having to get outside and work on it.

* What I plan on adding.
- Marine effectiveness will be affected by their engineering skill.

If you are interested in getting the updated files, send me a PM and i'll send you the updates.
The idea of being stopped to simulate marines crawling on the hull is pretty good. I am not sure I would want to be on a spacewalk when a ship is moving, dodging fire, ect..

Post Reply

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