[Script][1.3.4 - Beta]BAM (Bad *** Marines) - Marine Repairs, Upgrades, and Equipment

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

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

[Script][1.3.4 - Beta]BAM (Bad *** Marines) - Marine Repairs, Upgrades, and Equipment

Post by RoverTX » Sun, 6. Jan 13, 21:05

BAM (Bad *** Marines)

NOTE: The script should work with TC, but it you find a bug let me know. I used some script commands that where only in AP, not knowing that they didn't gracefully degrade in the way I thought they would, and even though I think I got a rid of all of them, please keep an eye out for any possible bugs in TC with this script.

-------------------------------------------------

As has been pointed out before many times in many different ways Marines take forever to train. Once they are done training they sit all day in waiting for their next boarding missions. That seems lame, and the time needed for their training is really over the top. People have tried to make the training time shorter, but I thought why not make it so that the training time was worth it! The idea is to bring as many features to marines as possible under one unified banner in order to streamline(YEAH BUZZWORD) their usefulness and value.


Download SPK

Download ZIP


Features:

------------------------------------------------------------------------------------------------------------------------------------------------


Upgrades:

While docked marines will be able to make upgrades to their ship, ships docked to their ship, and other dock mates. Because your marine's don't have to worry about voiding factory warranties they can even overtune your ships! Though this overtune will require regular maintenance to keep up.

As your marines skills get higher the more they can overtune your Engine and Rudders (with in reason of course). Their upgrades will also get cheaper the better they get!

You will be able to upgrade one ship, a class of ships, a type of ship, or all available ships at once.


------------------------------------------------------------------------------------------------------------------------------------------------


Equipment:

Also while docked they will be able to install equipment. The more skilled your marines get the more types of equipment they will be able to install on their ships, docked ship, and dock mates. While a few Green Horns might only be able to install Video Goggles, some Vets should be able to fully out fit a ship in one go. Also as your marines get better they will be able to install stuff cheaper!

You will be able to install as many piece of equipment at a time as you want. Also you will be able to install equipment on one ship, a class of ships, a type of ship, or all available ships at once.


------------------------------------------------------------------------------------------------------------------------------------------------


Repairs:

While docked or in space your marines will be able to make repairs on their ship, docked ships, or dock mates. They can only repair one ship at a time, but you can queue up as many ships as you like. A ship can also only be repaired by one other ship at a time. Cost ranges with skill range, 100% ship cost to 50% ship cost. You will also need some Tel or some Hull Plating. Amount depends on damage and ship type.

You can also task your ships with auto repairing ships. With this on they will attempt to repair any damaged ships docked to them, or their own ship as long as you have the funds and the marine's ship has the needed wares.

------------------------------------------------------------------------------------------------------------------------------------------------

Future Additional Features:

Bonus Based on Race of Marines:
Still being flushed out but the idea would be if you have 4 or more of the same marines of a race then you get a bonus.

Salaries:
Some base line salary for marines. Nothing that breaks the bank, but at the same time makes it so you don't just go out and have a million marines just to have them.

Saved Preset for Equipment:
The ability to save equipment load out for future use during install process.

The ability to repair connected stations:
Ability to repair all stations in a complex.

Equipment menu and upgrades for Marines:
For bonuses and color

More info about marines:
Stuff like height, age, weight, homeworld, etc. For RP and immersion purposes. Based off superbox documents.

Crew Assignments for marines for Capital Ships (M1,M2,M6,M7):
For bonuses of various types. The higher the marine's corresponding skills the better the bonus.


------------------------------------------------------------------------------------------------------------------------------------------------


Optional Files:

HQ.xml
There will be an optional HQ.xml file that will bring the PHQ's repair rate, and build rate in line with this scripts repair rate. Making it so that the PHQ will still be slightly cheaper and faster than marine repairs. Will be releasing this soon ™.


------------------------------------------------------------------------------------------------------------------------------------------------


Thanks to
Roger L.S. Griffiths
s9ilent
DrBullwinkle

For use of code and suggestions.

Also Thanks to
tatakau
Lucike

takakau for making the first marine repairs and Lucike for his work with crew members. While I didn't use any code from Lucike his idea for expand use for marines and crews did help to shape this mode, and while tatakau is no longer around I wouldn't have ever thought of doing this if not for marine repairs.

In addition thank you to
X2-Illuminatus

For his great ideas relating to bonus from Marine Equipment!

Any suggestions or advice would be great!

------------------------------------------------------------------------------------------------------------------------------------------------

v1.3

First Public Version

----

v1.3.2

Fix Issue with selecting install equipment on all.

Fixed Issue when you try to install equipment on a ship or a group of ship which you can't install any more equipment on, now goes back and send a message via subtitle.

Fixed issue when marines have really low skills resulting in null values because I was dividing by zero like a noob.

-----

v1.3.3

Fixed Issue with X3 TC

-----

v1.3.4

Fixed issue were repairs would start but payment wouldn't be taken.
Fixed issue with upgrades not degrading.
Fix issue with Auto-Repair not working in the correct order.
Fixed an issue were ship would continue to repair after undocking.

IS NOW COMPATIBLE WITH OVERTUNES FROM CRATES

Change how TP and Skiros were handled. They now cap out instead of being normalized via divisor.

Reordered Auto repair rules a little bit, so now Large ships that are docked to other large ships are automatically repaired, but they can still use auto-repair for their docked ships while docked.

Some clean up to the code.

Created a debug save. So I should be able to respond to issues quicker now also.
Last edited by RoverTX on Wed, 15. Jan 14, 03:59, edited 19 times in total.

Boredom
Posts: 115
Joined: Tue, 24. Nov 09, 15:23

Post by Boredom » Mon, 14. Jan 13, 19:07

The new "BAM Repair Crew software" adds a command to claim/repair ship(s). The repair ship will automatically jump into the selected sector, claim any abandoned fighters and dock them for safe repairs, installs a jumpdrive on any damaged/freshly captured M6/M7/M2/M1 and jumps it to a predetermined safe sector for repairs. The BAM crew always installs a Cargo Life Support System on M6 or larger damaged ships, it there isn't one, so they can roll up sleeves and not need to use bulky suits. Damaged ships can be pre-selected for refitting/selling. For the first option, the BAM crew will install default selected extensions, and message us that the ship is ready for some guns! For the second option, the repaired ship will be stripped of any extra gear, fit a basic shield and sent to a selected shipyard to be sold.
The repair ship can also automatically resupply itself with Teladianium/Panneling/EC/extra shields for repairs and jumps when idle, ordered to, or just need it.
And there, they will more then deserve a good paycheck for all their hard work and dedication!

I'm such a dreamer :lol:

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

Post by RoverTX » Tue, 15. Jan 13, 21:30

The script is now basically done but I want to test it deeper before I release it and clean up the menu logic so it might be a little bit before I release it.

I had it have a run away moment which I think I fixed, but I am going to keep playing with it and test it in my game until I know I got the issue squashed. Don't want it to jack people's saves...
Last edited by RoverTX on Sat, 19. Jan 13, 08:02, edited 1 time in total.

User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden » Tue, 15. Jan 13, 22:13

Still being flushed out but the idea would be if you have 4 or more of the same marines of a race then you get a bonus.
Penalties/ Bonus on repair cost/time if the ship matches the race of the marines. A Teladi will propably do more harm then good to a Terran ship for example^^
Give it a chance of failure (on overtuning) to keep stuff interesting... Nothing more boring then becoming even more powerfull then you already are without a catch. Hulldamage and loss of engine tuning should stop overtuning from beeing a "no-brainer" - or at least "no-risker"

in X3R there was the marauder shipyard iirc, pay a crazy boron some weed and he will eventually manage to overtune your ship. Loved the sounds the author build in. "oh oh" *bang* *crack* "that doesn't look good" :D
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image

Boredom
Posts: 115
Joined: Tue, 24. Nov 09, 15:23

Post by Boredom » Wed, 16. Jan 13, 14:56

RoverTX wrote:The script is now basically done but I want to test it deeper before I release it and clean up the menu logic so it might be a little bit before I release it.

I had it have a run away moment which I think I fixed, but I am going to keep playing with it and test it in my game until I know I got the issue squashed. Don't want it to jack people's saves...
Will it cause any problems with Marine Repairs from Tatakau and the other more recent version (Marine repairs v2, mk2, something like that)? Specially the second one, since marines get xp from repairing stuff, and it's a bit hard to let it go :)

Boredom
Posts: 115
Joined: Tue, 24. Nov 09, 15:23

Post by Boredom » Wed, 16. Jan 13, 15:21

Killjaeden wrote:
Give it a chance of failure (on overtuning) to keep stuff interesting... Nothing more boring then becoming even more powerfull then you already are without a catch. Hulldamage and loss of engine tuning should stop overtuning from beeing a "no-brainer" - or at least "no-risker"
Dunno bout that. In mid-late game there's already too much micromanaging going on and way too much to worry about, to sit there and babysit a ship for fail/successful upgrades. After a couple tries it would turn to a "just wanna get it done" If i wanted to upgrade my car's turbo, i would make sure the dude knew what he was doing, not end up with a bunch of extra screws that "wouldn't fit anywhere" :)
Anyway, this is not something we should have from the very start. Repairs yes, but tunings, they should only be possible with a ship docked to a PHQ.
Could also use engine components. Add it to trading stations everywhere (limited supply like boarding pods) and make it a requirement for tunings.

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

Post by RoverTX » Sat, 19. Jan 13, 05:02

My current idea for the overtunes is that if you don't bring the ship back in for maintenance in 24 hours the overtune goes away and it goes back to the base maximum. If you do bring it in for tuning then the clock resets and you have a fresh 24 hours of time. I figure 24 hours doesn't make it crazy micro managing, but it does force you to think about it. Would add some type of command that would show about the number of hours before tuning was needed again.

Of course bringing it in early will be cheaper then bringing it in after the 24 hours has passed.

One of the race bonus might be that you get an extra hour or something. Still working it out of course.

Boredom
Posts: 115
Joined: Tue, 24. Nov 09, 15:23

Post by Boredom » Tue, 22. Jan 13, 20:23

That would be good for the player ship, and perhaps for ships we take out for a skirmish, makes me think there could be 2 ways to do it:

Apply temporary tuning to speed, acceleration and maneuverability
or
Apply permanent tuning to just ONE of the 3 options, and that would be the one and only tune you could do on that ship.

The need for maintenance on the first option makes sense :) while the second would be awesome to bring different races ships up to the same specs, speed for example.

As for percentages for each, that should be a % of the max default for that ship, as for M2/M1 100% for turning and acceleration, and variable for speed; the faster it already goes the harder it is to tune its speed, just so it doesn't look weird having a Brigantine or a Boreas flying as fast as a vanilla M3, it would be capped at 50% more max, for example, while Teladi would go up to 75% more; going faster with same crappy turning values would probably cause issues while in a capital ship fleet moving in formation, and they would be love bumping each other often, or just plain chaos when hell breaks lose. As for snail-like Teladi, well, they could surely use at least a boost enough to bring them close to be in a wing with Paranid and maybe Split ships, just because they are a little more then weapon platforms that move a bit.

I think this will be really useful to create cross race fleets, and take advantage of their pros.

Request: make it XRM compatible, but by the look of things, i don't think there will be any problems :)

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

Post by RoverTX » Mon, 25. Feb 13, 05:45

I got some free time so working on this again.

A few things

First: It will be compatible with any mod that doesn't remove or change the ID of Tel or Hull Plating.

Second: Still working out the race bonuses.

Third: I have the degradation of the super tuning down. Bigger ship's super tune last longer than smaller ones, and the better your marines are at Eng Hack and Mech the longer the super tune last. Up to 12 hours for small ships and up to 24 hours for big ships.

The question I have is how would it be best to report to the player what ships need maintenance when.

A) A command on each ship to see about how long it has left. Issue with this is you can't see them in batch.

B) A hot key that brings up a list. Issue with this is it might become unwieldy for people with huge fleets.

C) Reminders sent to the players message box. Issue with this is once again the player getting flooded.

D) Some how appending the time left to the ships name. Though this always scares me for all the stupid shenanigans that could follow.

Any feedback would be great!

User avatar
jack775544
Posts: 1277
Joined: Tue, 13. Dec 11, 08:27
x4

Post by jack775544 » Mon, 25. Feb 13, 06:46

I would have a complete list with a couple of sorting parameters.
A couple of parameters I would have are:

Ships within x sectors of sector x
Ships from home base x
Ships of class x
Ships with x time left on tuning.

Therefore it is comprehensive but can be filtered so it is not overwhelming.
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.

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

Post by RoverTX » Sun, 3. Mar 13, 07:01

Released it as is as v 1.3.

Currently there is no way of knowing when the overtunes will ware out, want to see if people even care enough before I start working on some type of complicated menu layout.

Please note if your already super tunning your ships, and you tune your ships using this script, the super tune will go away just like the super tune from this script would. So you have been warned.

Please also don't be afraid to let me know if you find a bug. Bug reports are always met with love and cookies!

Eukatae
Posts: 52
Joined: Thu, 28. Feb 13, 16:22
x4

Post by Eukatae » Fri, 22. Mar 13, 16:15

I am excited about this script but I have a question about the overtuning thing...

If the overtunings wear off after awhile will that remove the overtunings I have picked up in space?

I left those things floating for days till I could afford a ship that I wanted them on, hate to lose them. Really nothing cooler than a Valhalla cruising around at 112ms.

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

Post by RoverTX » Fri, 22. Mar 13, 16:53

Edit: Should no longer be true from 1.3.4 onwards, but careful though and let me know.

As long as you do not tune it using this script the overtunes should stay. But if you use this script, in batch or targeted, to overtune the ships, then yes it will revert back to normal levels.

The removal of the overtune is a script with a long wait time and some randomness thrown in that gets called in a ship AFTER this script has overtuned it.

BAM Overtunes ---> Calls Degradation Script on Overturned ships

Degradation Script basically works like the following

Code: Select all

RANDOM = random from MIN_BASED_ON_SKILL to MAX_BASED_ON_SKILL

i = 0

while i <  RANDOM

   wait 1 hour

end

ship.remove_overtune

return null

The only thing I would say is to watch out for accidentally hitting tune all docked ships, or tune all dockmates, while the overtuned ship is around, just in case.
Last edited by RoverTX on Wed, 15. Jan 14, 04:02, edited 1 time in total.

Taro8
Posts: 119
Joined: Fri, 22. Jun 07, 20:27
x3tc

Post by Taro8 » Fri, 22. Mar 13, 23:26

Hey would it be possible to turn marines into some kind of crew members? I mean that you could have then spec in different fields like repairing, overtuning. Also some more roles like navigation officer that improves speed and maneuvering (basically adding extra tuning when he is manning his post). If its possible to make gun fire faster then gunner would be a neat option.

Any ideas for other non marine skill?

All could be set up in a window where you select a crew member to man a station.

This ends a random rambling from me :wink: .

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

Post by RoverTX » Sat, 23. Mar 13, 01:31

@Taro8

The Menu: Very doable, save which marines where doing what to locals variables on the ship.

The bonus: Helm master could add in turning tuning or two, head engineer could add in an eng tuning or two, weapon's master could add in some weapon regen via a running script on the ship (I believe this is possible), either at a given time frame, or when the ship ran out of weapon power. Shield master, restore some shields when you hit 0, basic same as weapon master for shields. Repair master, makes repairs cheaper and faster, Gunnery Sgt, makes equipment cheaper.

The issue: What happens when you remove a marine from a ship? The logic for how the menu would react to this is easy, if marine is not present then ask for new assignee. But how would you handle the current level of bonuses being reduced.

For something like the above, Gunnery, Repair Master, Weapon's Maste, or Shield master, its easy, before you do the bonus do a marine check for the one that is assigned is still on board. But what about the helm or eng master. Those bonus have to be done via wares, and I am not sure if I could create a watch script to check for the presence of a marine with out it becoming a giant mess of hacks.

Will look into it, would work well with my next planned 'expansion'.

Taro8
Posts: 119
Joined: Fri, 22. Jun 07, 20:27
x3tc

Post by Taro8 » Sat, 23. Mar 13, 13:22

The ship upgrades are just wares that are on the ship. Recently I found 2 engine tunings literally floating in the space. I had fully upgraded ship and when I picked them up my ship was overturned just like that. This means that you can freely mess around with tunings as they are wares.

The trick is to make crew skill add up on top of your current tuning so it wont prevent player from upgrading his ship.

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

Post by RoverTX » Sat, 23. Mar 13, 15:14

I understand all that. What you think is the hard part isn't. I just have to add a local variable on the ship telling the upgrade part of BAM how much the crew was adding, and do some addition and subtraction to keep things smooth.

The hard part is detecting when marines have been removed and how to remove said upgrade wares at that point. Other wise people could put a maxed out marine into a position, and then just remove him and keep the bonus. All the other bonus basically trigger and effect, at which point I can check for the presence of a marine, while the ware effect is always on and there is no clean point to check at.

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

Post by RoverTX » Sun, 24. Mar 13, 07:31

Next patch, working on it now, will include the following.

Code: Select all

-----------------
FOR SURE UPDATES:
-----------------
Raced Based Bonuses
   Mostly relating to quicker repairs of corresponding race's ship
   So the more Boron marines the faster the repair of a Boron ship would go.

Marine Equipment
   A way to pay for a quick increase in fighting skill, up to 8 points.
   Equipment for an added bonus of maybe getting data off a ship, blue prints, map data, credits, etc
   Salvage equipment that might keep more items around after capture.
   Eng equipment that might allow for some returned hull strength after boarding, or automatic upgrades.

--------------
MAYBE UPDATES:
--------------
Saved present for Equipment installations.

Salaries 

Assigning of Marine to Crew Positions for Bonuses

Extra Marine Status Info
  Stuff like height, age, weight, homeworld, hobbies, based off race info from the Superbox documentation.


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

Post by joelR » Tue, 16. Apr 13, 14:25

Hows the patch coming along RoverTX?

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

Post by RoverTX » Tue, 16. Apr 13, 16:59

The equipment menu is done, along with the bonus stats.

I did though delete the new T file version by accident so I got to go back through and rename everything...lol, but that shouldn't be more than 15 minutes.

I still have yet to get around to implement the other non stat bonus from the equipment.

I am also working on a few small bugs I found along the way relating to normal equipment installs, they aren't script breaking, but they can be annoying. They relate to the fact that system override command is really two different items. Forgot about that till recently.

The race based bonuses will be last, but thats just adding a few lines of code of the marine.review script, and the repair and install equipment scripts.

Post Reply

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