[Mod] Hull Engineer v.6 released 12-3-13

The place to discuss scripting and game modifications for X Rebirth.

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

Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

[Mod] Hull Engineer v.6 released 12-3-13

Post by Kierk »

Edit: Version .40 now out! New feature: Ships will use the Skunk's construction drones to help fix stuff as long as the Skunk is docked with them.

Edit: Complete Version .50c now out! New feature: Ships with over 100 repair drones can repair friendlies within 3km.

Edit: Version .6 done and uploaded.

Edit: Version .61 1.19 compatibility up.


Changelog

.60 Removed distinction between standalone and complete, one file with all behvaior

.60 Changed repair system to damage thresholds based on engineer skill

5 star can repair from 40-100%, 4 star from 55-100%, 3 star from 70-100, 2 star from 80-100 and 1 star from 90-100.

For hull repair added diminishing returns to drone count as 100 drones could create something silly like 10% hull per process, new system brings 100 drone down to max out about 5%, reasonable for 10 mil worth of drones.

.50c Ships with over 100 repair drones can repair friendlies within 3km. Not included in Standalone mod

.40 if the Skunk is docked with the ship Engineer is forced into repair mode, fixing any broken components that may not have met the damage threshold to trigger automatic repair.

.40 now in 2 version, Standalone and Complete. Complete includes
Component Fix so engineers properly account for damaged/wrecked components.

.40 drones in the Skunk count towards repairs as long as the Skunk is docked with the ship.

Skill and drone based hull repair! Repair rate varies depending on number of construction drones on the ship in addition to the engineering, leadership and morale skills of the ship.

Future plans:
I have a basically complete implementation of drone trading between the Skunk and Engineers working on player owned structures, seem to have run into an issue with the remove_units command not working which leads to drone duplication. Looking into fixes for that, if/when complete will be added to both versions.

Looking to fix dialogue issues with Engineers working on your ships/stations. Hope to be able to have them come back aboard the Skunk to be transferred to a new location as well as to fix the disappearing engineer bug.

http://xrebirth.nexusmods.com/mods/155//?

Special thanks to Jack08 and Nebogloee for forum help.
Last edited by Kierk on Wed, 11. Dec 13, 00:41, edited 7 times in total.
Scoob
Posts: 11170
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Nice. Will check it out :)

Scoob.
Thor911
Posts: 18
Joined: Wed, 20. Nov 13, 10:01

Post by Thor911 »

Sounds like a good fix. I'll check it out.

Try this

[ external image ]
astaldion
Posts: 69
Joined: Fri, 13. Jun 08, 21:53

Post by astaldion »

Where can you edit the repair rate? I think 5 mins for full repair is way too fast and i'd like to edit it to a more balanced rate.
dionnsai
Posts: 28
Joined: Wed, 17. Oct 07, 01:12
x4

Post by dionnsai »

Agreed, I'd start with a longer value unless you can scale it based on the size/hull of the ship.

A 20-30 minute repair time is probably more reasonable.
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

Yeah its pretty fast...this is pretty much just the first step. I'd like to be able to tie in mission director to ask for parts or credits, limit what can be fixed by eng skill level etc.

from the engineer.ai in the mod

Code: Select all

 <label name="checkforrepair" />
      <set_object_hull object="this.container" exact="this.container.hullpercentage + 6.666" />
      <do_if value="this.container.hullpercentage" min="100">
        <show_help force="true" customer="'Hull overflow'" />
        <set_object_hull object="this.container" exact="100"/>
The set_object_hull command controls the repair, it takes an object whose hull to change and a percentage value to change it to. At the moment I just have it adding 6.666% every 'tic'.

The checkforrepair function cycles on its own every 20-25 sec when no other repairs are ongoing so putting it here for now meets my basic requirements (no hull fixing during heavy combat, no instant health)

To adjust the time you'd prefer take the time interval you want in seconds, divide by 20 and divide 100 by the value you came up with to get %increase per tic, replace 6.666 with that number and you should be good to go.
astaldion
Posts: 69
Joined: Fri, 13. Jun 08, 21:53

Post by astaldion »

Okay, i have changed it to 1.111 to reach a 30 minutes full repair.

Are the ingame messages about repaired parts intentionally?
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

Nope they are totally not! Sorry about that, this is my first mod and I missed a few debug texts. Updated nexus file to .02 removed all debug text, no other changes.
KRM398
Posts: 1556
Joined: Wed, 6. Nov 02, 20:31
xr

Post by KRM398 »

OK heres a wierd side effect from using this. I got it today first day. Then went out shooting got shot up, hulls at 45% one gun is at about 60 or so, in the yellow. Lost my marines in a failed boarding attempt , thats where I got shot up. Now..when I flew away and left the enemy ship intact but on fire, I got 2 reports, one saying that the jump drive was repaired as good as possible and then a while later, the engines were repaired...but the Skunk has no jump drive, and my engines were fine. I got a report about repairs to the enemy ship and now after more than an hour, my ship and gun haven't repaired one bit, not a single percent and the hud icon is still yellow.

I have an engineer with 4 stars in engineering, and 6 construction drones on board. It made me think, I've been complaining that I cant board and bail a single ship lately, they repair too fast, and now I'm getting repair reports about enemy ships...the last part might not have to do you this but the never repaired anything sure does, any ideas?
dfm5000
Posts: 272
Joined: Fri, 12. Oct 12, 20:40

Post by dfm5000 »

1.17 Broke the mod, Engineers still repair hull but not devices.
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

yup, I'm on it. Currently finishing up skill based repairs then looking into that.

Edit: Loaded up a non-modded save with extension off, surface elements still not repairing, gonna check the base mod to see if something changed in recent patches that broke it.
Last edited by Kierk on Sat, 23. Nov 13, 20:51, edited 1 time in total.
dfm5000
Posts: 272
Joined: Fri, 12. Oct 12, 20:40

Post by dfm5000 »

Sweet!!!, thanks for the excellent mod by the way.
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

Version .30 up on nexus, Repair rate now based on construction drones on the ship and ship skills (leadership, morale and engineering)

Trying to fix component repair now, doesn't seem to be my mod breaking it though.
Scoob
Posts: 11170
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Nice, I will grab the new version shortly.

Good luck sorting component repair, I really don't understand what's going on there at all.

For example, my captured Taranis (plot) repaired ALL surface element sto 100%, including engines and Jump Drive. However, since then, it's not repaired anything, despite having ALL surface elements destroyed.

My Construction ship will send out repair drones if I damage ALL engines by ~50%, but it only seems to repair one of the turrets when all are damaged, along with the shields.

Scoob.
dfm5000
Posts: 272
Joined: Fri, 12. Oct 12, 20:40

Post by dfm5000 »

When capturing a ship your forced to destroy the drone launcher, but now it seems doing so may destroy construction drones.

I've captured a freighter and two carriers, and none have them.
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

So I ran some tests on my good friend Taranis. I have two saves with him, one where everything is pretty much trashed to test the in repair part and one where everythings fixed to test the check for repairs part. Destroying the Drone Launcher reduced Drone capacity from 150 to 0, but the 15 drones I had were on active status and stayed alive. It showed 15/0 15 active. With my component fix the drone bay did get repaired (after blowing up 4 other things to trigger repairs starting) and capacity went back to 150.

Here's the thing though, the component bug means that ships with no damage and an active engineer should never repair their components. This means their drones are never activated and likely die in the bay.
dfm5000
Posts: 272
Joined: Fri, 12. Oct 12, 20:40

Post by dfm5000 »

Kierk wrote:So I ran some tests on my good friend Taranis. I have two saves with him, one where everything is pretty much trashed to test the in repair part and one where everythings fixed to test the check for repairs part. Destroying the Drone Launcher reduced Drone capacity from 150 to 0, but the 15 drones I had were on active status and stayed alive. It showed 15/0 15 active. With my component fix the drone bay did get repaired (after blowing up 4 other things to trigger repairs starting) and capacity went back to 150.

Here's the thing though, the component bug means that ships with no damage and an active engineer should never repair their components. This means their drones are never activated and likely die in the bay.
I just captured a Taranis and it refuses to repair the ship it has 12 of the construction drones. One thing that happened though is the attack drones that were coming out of it once captured were enemy. I have never seen the construction drones fly out before so they might be enemy as well.
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

Couple thoughts on that. Did you ever destroy the drone bay on the Taranis? That might leave the drones stuck active under enemy control. I'll have to do more checking into boarding capture behavior. My guy in my real save right now doesn't have the capability to capture much, I'll start a free play game and cheat in tons of money to play around with different scenarios.
KRM398
Posts: 1556
Joined: Wed, 6. Nov 02, 20:31
xr

Post by KRM398 »

So...you don't think your repair technique is repairing enemy ships when ours is ok then? I wondered if having an active engineer and drones on my ship if they repaired anything close by, like the enemy ships I was attacking. If not then Ego scripted in some bad ass repairs lately. Hers one etst I did though. I had a f=miner that I had shot up and tried to board, the boarding crews got on board but my slow reflexes failed the mini game...anyways it was on fire, and smoke rolling everywhere, so I left it when my mission failed and it just sit there.

Then I left the area, clear to the other side of the sector, and after a while went back it was still smoking and some fire was seen. I flew in and sat just over the hull on top, just looking and targeted the ship. IN 5 minutes all fires were out and it started moving again. I'm wondering if repair drones don't repair without faction at all, anything close by. Might try another experiment with something small, maybe a fighter, of course if thats true then its a good thing for squad members, so long as Skunk has good people and equipment, but maybe it was just bad timing, we'll see.
Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 16:38

Post by Kierk »

Ok ran some test on boarding/capture and enemy repairs.

Situational overview first. My hull engineer mod at v .3 only changes player owned ship behavior, does nothing to change NPC faction ships. My Component Fix restores intended vanilla behavior to either player ships only or all ships. Tests conducted using both hull engineer and all ships component fix.

Targets were 1 Scalids and 2 Rahanes. All ships had engineers and at least 2 construction drones.

Scaldis boarding. After scan to make sure engineer and drones on board initiated boarding mode, took out JD and engines to launch pods, pods landed successfully and began minigame. Minigame targets were turrets and shield gens. Wrecked turrets/shields/engines/jd kept coming back really quickly so NPC engineer was active. Eventually mission success and ownership switched to me with all drones intact. At this point ship was not targetable and docking bay icon was gone, quickload and quicksave fixed that. Docked with ship, offloaded captain and engineer and undocked. For the first time ever I saw actual construction drones in space! Two drones in cargo, 2 drones active and 2 in space...it was neat. With only 2 drones repair is really really slow so I sat around a while to make sure it was happening and it was.

1st Rahanes boarding. Scanned ship to vfy eng and drones, initiated boarding, fight went similar to above with turrets and shields popping back up. This time one of the minigame targets was the drone bay, so I killed it. Destroying drone bay seemed to stop repairs. After capture ship only had 14 cargo drones, none of the construction drones left. I boarded it as it was transferring cargo to a station so I assume the 14 cargos i got were the ones in space when I blew up the drone bay.

2nd Rahanes boarding. Testing the minigame. Similar to 1st Rahanes except when I got the mission to blow up drone bay I didn't do it. After 20 or so seconds I'd get the marine status message and after 6 or so times trying to get me to blow up the drone bay mission accomplished.

Conclusions

In vanilla behavior capturing a ship with drone bay intact is the best way to salvage it until we can transfer construction drones. Destroying drone bay makes capture way easier. Its actually an interesting little trade off.

I don't really like the vanilla component repair behavior, having destroyed turrets/shields etc pop up like whack a mole is somewhat bothersome but I want to play around with it a bit more before I decide to go alter things. Marine boarding pods suck they seemed to get stuck in space pretty often for me, only the first boarding went smoothly...I do want to look into that script.

Extra Bonus combat attempt. I tried a boarding on a frigate but my marines failed so I don't know the end result. Prior scanning showed no construction drones on board and when I destroyed turrets/shields they stayed down.

Return to “X Rebirth - Scripts and Modding”