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
Nicoman35
Posts: 681
Joined: Thu, 17. Nov 05, 13:12
x3tc

Post by Nicoman35 » Sun, 18. Nov 12, 18:28

DrBullwinkle wrote:... If I figure out a good way to do it, then I might add it. In the meantime, use Upgrade Kits and/or Player Workshop.
Couldn't it be done by getting an array of all equippment installed? When a ship enters combat, this array could be constantly surveyed. When one item gets destroyed, this could be registered. Am I wrong?

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

Post by DrBullwinkle » Sun, 18. Nov 12, 20:46

We cannot check frequently because the player may have many ships with marines (performance concern). So how do we differentiate between "destroyed" equipment and "intentionally removed" equipment?

Also, I do not know a reliable way to detect the end of combat. SIGNAL_ATTACKED *might* work to detect the beginning of combat, although a single missile strike (or accidental collision) may not be detected in time.

So I do not see a reliable way for the script to know what equipment should be on the ship. Not without requiring the player to save updates, which could be confusing (and easy to forget).

A5PECT
Posts: 6143
Joined: Sun, 3. Sep 06, 02:31
x4

Post by A5PECT » Sun, 18. Nov 12, 20:58

DrBullwinkle wrote:So I do not see a reliable way for the script to know what equipment should be on the ship. Not without requiring the player to save updates, which could be confusing (and easy to forget).
Just spitballing here...

What if the script saves a list of all of installed equipment on a particular ship when it docks/undocks, then makes a "restoration check" against that list periodically and if it finds any missing equipment any onboard marines will restore it. That would help in terms of performance. You could limit the restoration check to when the ship lands again, to further improve performance and create a sort of balancing mechanic.

The issue of destroyed vs. ejected is still present, though. Maybe charge players the price of the ware when it's restored? That would preempt exploiting equipment repairs; you'd still get marines "restoring" ejected equipment. But it'd save players from the hassle of buying replacement parts manually.
Last edited by A5PECT on Sun, 18. Nov 12, 21:05, edited 2 times in total.
Admitting you have a problem is the first step in figuring out how to make it worse.

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

Post by DrBullwinkle » Sun, 18. Nov 12, 21:01

KloHunt3r wrote:The issue of destroyed vs. ejected is still present, though. Maybe charge players the price of the ware when it's restored?
Yes, that is the problem.

Price is not the important concern. The important part is that it would become impossible for the player to intentionally remove equipment.
Last edited by DrBullwinkle on Mon, 19. Nov 12, 05:20, edited 1 time in total.

senor135
Posts: 69
Joined: Sun, 27. Nov 05, 15:53
x3

Post by senor135 » Mon, 19. Nov 12, 05:16

for the purposes of shield regen, could exiting combat be triggered somehow in relation to the music change, or whatever trigger determines the music change?

or perhaps that is also hardcoded out of scripting's reach?

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

Post by DrBullwinkle » Mon, 19. Nov 12, 05:29

Shield regeneration is an easier problem, Señor. I already agreed to add it in a future version.

senor135
Posts: 69
Joined: Sun, 27. Nov 05, 15:53
x3

Post by senor135 » Tue, 20. Nov 12, 09:33

right, just asking for my own curiosity's sake :) cause i saw that you were unsure about "SIGNAL_ATTACK" functioning for the equipment repair function

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

Post by DrBullwinkle » Tue, 20. Nov 12, 22:52

senor135 wrote:right, just asking for my own curiosity's sake :)
In that case, no, the game gives no signal that can be used by scripts when the music changes. There are only only a few signals that we can use in scripts, such as SIGNAL_ATTACKED and SIGNAL_KILLED.

In the case of shield regeneration, I can test for the presence of enemies, and restore shields when no enemies are present.

The sticky problem with equipment replacement is allowing the player to intentionally uninstall equipment. If the player never uninstalled or moved equipment, then equipment replacement would be equally easy.

gefer8
Posts: 96
Joined: Thu, 1. Sep 11, 01:45

Post by gefer8 » Fri, 23. Nov 12, 06:42

Why not equip each of the marines with a space suit and use it's repair laser to repair the ship for free? Why give them money and materials when you can always count on a simple welding tool and a wrench?
"Thy Pirates giveth, thy Player taketh away."

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

Post by DrBullwinkle » Fri, 23. Nov 12, 08:15

gefer8 wrote:Why not equip each of the marines with a space suit and use it's repair laser to repair the ship for free?


1) Marine Repairs can be done for free. Just use the well-documented features in the t file to set pricing to zero.

2) Marines do have space suits, obviously, although they have military-grade jet packs which they use for boarding.

In order for marines to use repair lasers to repair a ship, they would have to be *outside* the ship. That would be disruptive to everything else you do. In other words, it would be a completely different script. :)

Speaking of completely different scripts, if you want to see the single most visually stunning script on the forum, take a look at A.Persyn's Marine Corps.. That script does have a repair feature which sends a squad of marines, in space suits, to surround a ship and repair it with repair lasers. I strongly recommend getting into a turret and using the view keys (including zoom) to get the right point of view to watch this amazing stunt.

If you think the graphical view is amazing, consider the amount of effort that went into making it look so good. The amount of coding that went into doing something entirely for "looks" is nothing short of breathtaking!

It is an excellent script, although the only feature that I use from it in my own game is a bug-fixed version of the astronaut transporter. But I admire the quality of the code and the demonstration of programming wizardry that went into making Marine Corps.

It is definitely worthwhile to watch Marine Corps do at least one repair job; regardless of whether you use it in your regular game. Somebody really ought to make a video of it and use it in a cut scene for a future game update; it is that good. Don't forget the popcorn!

gefer8
Posts: 96
Joined: Thu, 1. Sep 11, 01:45

Post by gefer8 » Sat, 24. Nov 12, 00:29

DrBullwinkle wrote:
gefer8 wrote:Why not equip each of the marines with a space suit and use it's repair laser to repair the ship for free?


1) Marine Repairs can be done for free. Just use the well-documented features in the t file to set pricing to zero.

2) Marines do have space suits, obviously, although they have military-grade jet packs which they use for boarding.

In order for marines to use repair lasers to repair a ship, they would have to be *outside* the ship. That would be disruptive to everything else you do. In other words, it would be a completely different script. :)

Speaking of completely different scripts, if you want to see the single most visually stunning script on the forum, take a look at A.Persyn's Marine Corps.. That script does have a repair feature which sends a squad of marines, in space suits, to surround a ship and repair it with repair lasers. I strongly recommend getting into a turret and using the view keys (including zoom) to get the right point of view to watch this amazing stunt.

If you think the graphical view is amazing, consider the amount of effort that went into making it look so good. The amount of coding that went into doing something entirely for "looks" is nothing short of breathtaking!

It is an excellent script, although the only feature that I use from it in my own game is a bug-fixed version of the astronaut transporter. But I admire the quality of the code and the demonstration of programming wizardry that went into making Marine Corps.

It is definitely worthwhile to watch Marine Corps do at least one repair job; regardless of whether you use it in your regular game. Somebody really ought to make a video of it and use it in a cut scene for a future game update; it is that good. Don't forget the popcorn!
Well thanks, didn't notice that. That is the kind of script I was looking for.
"Thy Pirates giveth, thy Player taketh away."

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

Post by DrBullwinkle » Sat, 24. Nov 12, 00:41

It is not for everyone, but it is pretty to watch. At least once. :)

User avatar
Sorkvild
Posts: 3432
Joined: Thu, 8. Jun 06, 14:07
x3tc

Post by Sorkvild » Sun, 25. Nov 12, 19:33

DrBullwinkle wrote:
marcx wrote:Links of course aren't acting!!
Corporeal has not posted in a year and a half.

From the description, it appears that SLAM works similarly to Marine Repairs 2, with two differences:

- SLAM charges a constant "maintenance fee" every hour; like an Insurance Fee. This is way of increasing "economic challenge" in the game.

- If the fee cannot be paid, then damage is inflicted on your ships.

It seems like a good idea, for some players, although probably not for everyone.

I do not want to hijack Corporeal's thread, in case he is merely lurking, but if you want these as optional features in Marine Repairs 2, then please request them in that thread.
Reason I'm using SLAM instead of marine repairs is that SLAm brings more realism into it rather than usin cheap slave labor.

If it's possible I'd like to make a request for turning the paid repairs on ;)
Elite Dangerous| I survived the Dragon Incident ... then I took an arrow to the knee
We want the Boron back!

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

Post by DrBullwinkle » Sun, 25. Nov 12, 20:27

Sorkvild wrote:Reason I'm using SLAM instead of marine repairs is that SLAm brings more realism into it rather than usin cheap slave labor.

If it's possible I'd like to make a request for turning the paid repairs on ;)
Well, I would not call SLAM "more realistic", unless you live in a gangster-controlled neighborhood. :)

I would argue that Marine Repairs is more "realistic", with marines that charge for their work and receive a small amount of on-the-job training.

By default, Marines Repairs charges almost as much for repairs as the cost at a shipyard. You can increase the cost by changing the factors in the t file. The t file itself should be well-documented.

SLAM is more about adding an additional cost to the universe: "insurance". Also the strong-arm tactic of the threat of damage to your ships if you do not pay the "insurance".

It is an interesting idea, and I am not opposed to adding it, but Yacek posted a link for SLAM, so perhaps that satisfies everyone?

User avatar
Sorkvild
Posts: 3432
Joined: Thu, 8. Jun 06, 14:07
x3tc

Post by Sorkvild » Mon, 26. Nov 12, 10:07

So your script uses charges for the repairs too?
Elite Dangerous| I survived the Dragon Incident ... then I took an arrow to the knee
We want the Boron back!

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

Post by DrBullwinkle » Mon, 26. Nov 12, 10:11

Yes.

There are two different charges:

- Repair cost (default is slightly less than repairs at a shipyard).

- Training cost. When marines do repairs, they earn a small amount of training. The fee for training is the same as vanilla.

You can increase (or decrease) the default settings by adjusting the numbers in the t file. You can adjust training as well as repair features.

User avatar
Sorkvild
Posts: 3432
Joined: Thu, 8. Jun 06, 14:07
x3tc

Post by Sorkvild » Mon, 26. Nov 12, 11:30

Thanks for the info. Sounds really good, downloading the script then ;)
Elite Dangerous| I survived the Dragon Incident ... then I took an arrow to the knee
We want the Boron back!

User avatar
RoverTX
Posts: 1436
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX » Wed, 28. Nov 12, 06:41

Can I make a request for Teladianium to be another possible ware. Sense its supposed to be used as a type of internal platting.

Being common wealth in X3AP your at a dis-vantage because Microchips are a 1:1 ratio for repair, while Hull Plating for the buck is way more effective, like 26800:268. For the Teladianium maybe something like 12800:256, because its a M ware instead of L, and half the size?

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

Post by DrBullwinkle » Wed, 28. Nov 12, 06:55

The only reason I boosted the default value for Hull Plating is because it is so huge. Microchips make more sense because they are the most valuable ware in the game for each unit of cargo space.

(If you are *buying* these wares, then why not just pay your marines with credits? ;) )

But, OK... I will add Teladianium when I do another version.

mrowka
Posts: 128
Joined: Tue, 30. Jun 09, 19:50
x4

Post by mrowka » Mon, 3. Dec 12, 18:29

Got a suggestion kinda, marines should use wares from cargo but if ther are no wares they could use credits. Thers nothing better like a ship made from credits :D

Post Reply

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