deleted

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
tatakau
Posts: 697
Joined: Sat, 21. Oct 06, 08:09
x3tc

Post by tatakau » Wed, 4. Mar 09, 19:04

deleted
Last edited by tatakau on Wed, 12. Jun 19, 11:51, edited 1 time in total.

Kakurate
Posts: 65
Joined: Sun, 26. Sep 04, 03:45
x4

Post by Kakurate » Wed, 4. Mar 09, 23:31

Yea, this was my first attempt at scripting in x3. I currently work as a computer programmer so following the code wasn't hard. But I wanted to scream with the use of 'skip if' stuff :P.

For repairing damaged ships at a station your docked at, its fairly simple. Just make a new script that is similar to you station script at the top, then call repair.docked on $mothership.

Also, if you attempt to add a % damage to only be repaired while not moving, add in a <refobj> is docked check as well. Docked ships still read current speed as > 0.

Kakurate
Posts: 65
Joined: Sun, 26. Sep 04, 03:45
x4

Post by Kakurate » Wed, 4. Mar 09, 23:38

Also, just from the quick glance I gave to the new code, it looks like the repair speed went from 250/15 to at best, 10/15. You might want to add a multiplier to the skill rates. I added a 30 to mechanical and a 20 to engineering. this gives you, at best a 250/15 effectiveness per marine. That way, with a fully trained marine, your getting the same speed that it was at before looking at skills.

tatakau
Posts: 697
Joined: Sat, 21. Oct 06, 08:09
x3tc

Post by tatakau » Thu, 5. Mar 09, 19:54

deleted
Last edited by tatakau on Wed, 12. Jun 19, 11:51, edited 1 time in total.

richardh
Posts: 67
Joined: Thu, 4. Dec 03, 00:17
x3

Post by richardh » Fri, 6. Mar 09, 02:29

> Also, if your shields are down, there is a small chance that
> they will be able to partially restore them.

After months of using "Marine Repairs", this little feature just made its debut... and a pure Hollywood moment it was, too. Top work for adding this extra bit of spice, mate!


I had a Pirate Titan to erase - OTAS Corp assassination mission - and was a wee bit outgunned in my Panther. That Titan was packed to the rafters with player-frying weapons.

So I jumped to another gate in-sector, and called up my Odysseus to soften the Titan up a bit. Unfortunately, the Ody got caught in a nightmare crossfire between the Titan and another spawned aggressor - a Condor carrier. The Ody's shields were being ripped apart.

I told the Ody to jump out when its shields were still at about 60%. 50. 40. 30. Gone. Hull shreddage. Rapid, merciless hull shreddage. Still no jump! All else was ignored as I watch in horror from my Pather, at a distance.

Then, when all hope was seemingly lost, shields! That psycho little 5-star marine I'd parked in the Ody to repair it a month ago was STILL ON BOARD... cigar hanging out of his mouth, soldering away behind the shield generators, hitting things with the palm of his hand...

The Ody suddenly had a small, but significant, percentage of shields. They absorbed the damage being dealt far better than the raw hull. And then...

Jump drive flare. Ody escaped!

Which left just about enough room around that gate for, ooh, my Akuma. Say hello to my little friend. Payback time.

Oh, and I captured the Condor for good measure. Marines - ALSO useful for boarding operations, hehe.

Rich

Kakurate
Posts: 65
Joined: Sun, 26. Sep 04, 03:45
x4

Post by Kakurate » Sat, 7. Mar 09, 15:55

After watching the script some more, it looks like skills are a number 0-100. So a multiplier isnt really needed. I still have one simply because I think it is ridiculous that a single marine, trained in engineering and mechanics can't repair faster than me.

455224
Posts: 17
Joined: Thu, 19. Jul 07, 04:57

Post by 455224 » Fri, 1. May 09, 17:25

In not so sure if this topic/mod development has gone dead but just incase it hasn't i'd like to ask if it is possible for the marine repairs to apply to enemy ships too, just for a sense of balance :?:

If not thanks anyway for a great script.

User avatar
Chemical-mix
Posts: 469
Joined: Mon, 27. Feb 06, 18:30
x3tc

Post by Chemical-mix » Tue, 16. Jun 09, 17:29

Hi Tata,

Sorry for relivening an old thread, but i need to know- does this now currently work on v2.0+?

This looks like it would be a great script, and being that you need to use trained marines it shouldn't count as a "glitch" or "cheat". Bonus pack inclusion if all the creases can be ironed out, anyone? :idea:
"I came, I saw, I crumbled"

Hartzaden
Posts: 209
Joined: Thu, 26. Mar 09, 18:26
x3tc

Post by Hartzaden » Tue, 30. Jun 09, 15:02

hay if a have a TP at a station will thay repare other ships at the station? and yes its 2.0 and 2.1 proven at least in my case

Madtrack
Posts: 184
Joined: Tue, 25. May 04, 01:44
x3tc

Post by Madtrack » Wed, 1. Jul 09, 22:34

Looks very cool :)

any problem using this and Graxster's Marine Training Manager at the same time ? they bothe use marines so yeah ... afraid to break something

User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

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: 797
Joined: Wed, 25. Mar 09, 07:00
x4

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: 329
Joined: Thu, 17. Aug 06, 21:23
x4

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, 07: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: 329
Joined: Thu, 17. Aug 06, 21:23
x4

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, 09:42
x3tc

Post by Khensu » Thu, 29. Oct 09, 02: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: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut » Thu, 29. Oct 09, 06: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, 09:42
x3tc

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

Thank you very much!!! :)

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Post by Reisser » Tue, 1. Dec 09, 14: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: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut » Tue, 1. Dec 09, 21: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.

Post Reply

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