X: Rebirth

File information

Last updated

Original upload

Created by

w_evans

Uploaded by

fallout_knye

Virus scan

Safe to use

Tags for this mod

About this mod

A tiny mod that makes it possible to assign Engineers to Stations.

Permissions and credits
This tiny mod alters a single parameter to make it possible to assign Engineers to Stations.  They should then act in exactly the same way as NPC Engineers in NPC Stations -- repair hull up to 100%, repair surface elements, and use Construction URVs to hasten repairs.  Speed of repair will depend on the Engineer's Engineering skill, and the number of Construction URVs available.

Just checked, and it looks like the vanilla scripts are set to repair Stations to 100% by default.  So it looks like CVs are only used to build, and can then be safely reassigned.

_____
What's New?

5.Jul.2015 - v0.05 is up.

Compatibility update. Now compatible with Linux and Mac versions. (v0.04 didn't work. This one should.)

Thanks to CulunTse for verifying and testing the linux update.

.......
28.Jun.2015 - v0.04 is up.

Compatibility update.  Now compatible with Linux and Mac versions.

_____
As of v0.03, this is the mod in its entirety:

<?xml version="1.0" encoding="utf-8"?>
<diff>
    <replace sel="//cue[@name='OnBoardComm']/actions/do_elseif[@value='not player.platform']/add_player_choice[@text='{1002,3008}']/@choiceparam">[0, 0, 'zone', player.primaryship.zone, null, null, 'selectplayerobject', ['cEngineer_worksomewhere_objectselected', null, null, true, false, false, false, true]]</replace>

    <replace sel="//cue[@name='OnBoardComm']/actions/do_if[@value='@player.platform.container.isplayerowned and @player.platform.container.isclass.ship']/@value">@player.platform.container.isplayerowned</replace>
</diff>

in md\NPC_Engineer.xml

........
The alexalsp variant adds:

<?xml version="1.0" encoding="utf-8"?>
<diff>
    <remove sel="/aiscript/attention/actions/set_value[@exact='$repairratefactor * this.combinedskill / 25']"/>

    <add sel="/aiscript/attention/actions/set_value[@name='$repairrate']" pos="before">
        <do_if value="this.defensible.isclass.station and (this.owner == faction.player)">
            <set_value name="$repairratefactor" operation="add" exact="$repairratefactor * this.combinedskill"/>
            <!--<show_notification caption="'=== Station Repair Rate ==='" details="'%5 \n Repairing: %6 \n Raw Repair Rate: %2 \n Engineer Skill: %3 \n Repair Rate Factor: %1 \n Resultant Repair Rate: %4'.[$repairratefactor, $baserepairrate, this.combinedskill, ($baserepairrate * $repairratefactor), this.station.name, (100f * ($baserepairrate * $repairratefactor) / $Defensible.maxhull)]" queued="true" priority="7" sound="notification_generic"/>
            <write_to_logbook category="general" text="'%5 STATION REPAIR RATE: \n Repairing: %6 \n Raw Repair Rate: %2 \n Engineer Skil: %3 \n Repair Rate Factor: %1 \n Resultant Repair Rate: %4'.[$repairratefactor, $baserepairrate, this.combinedskill, ($baserepairrate * $repairratefactor), this.station.name, (100f * ($baserepairrate * $repairratefactor) / $Defensible.maxhull)]"/>-->
        </do_if>
        <do_else>
            <set_value name="$repairratefactor" operation="add" exact="$repairratefactor * this.combinedskill / 25" comment="engineer speeds up repair by up to 400% (meaning a fifth of the normal repair time)" />
            <!--<show_notification caption="'=== Ship/NPC Repair Rate ==='" details="'Repairing: %5 \n Raw Repair Rate: %2 \n Engineer Skill: %3 \n Repair Rate Factor: %1 \n Resultant Repair Rate: %4'.[$repairratefactor, $baserepairrate, this.combinedskill, ($baserepairrate * $repairratefactor), (100f * ($baserepairrate * $repairratefactor) / $Defensible.maxhull)]" queued="true" priority="7" sound="notification_generic"/>
            <write_to_logbook category="general" text="'SHIP REPAIR RATE: \n Repairing: %5 \n Raw Repair Rate: %2 \n Engineer Skill: %3 \n Repair Rate Factor: %1 \n Resultant Repair Rate: %4'.[$repairratefactor, $baserepairrate, this.combinedskill, ($baserepairrate * $repairratefactor), (100f * ($baserepairrate * $repairratefactor) / $Defensible.maxhull)]"/>-->
        </do_else>
    </add>
</diff>

to aiscripts\engineer.ai.xml

_____
Compatibility:

This mod is current as of X:R 3.61
Compatible with X:R 3.60

Compatible with Windows, Linux, and Mac versions of X Rebirth.

_____
Changelog:

10.Apr.2015 - v0.02_alexalsp is up!

updated the alexalsp variant to use the same alterations as v0.03
removed notification and logbook spam

........
16.Feb.2015 - v0.03 is up!

Swapped my cludgy code for eMYNOCK's svelte and sexy code. (Thanks eMYNOCK!)

........
16.Feb.2015 - v0.02 is up!

Now possible to call Engineers to work at a station platform when docked.

Thanks to Sparky Sparkycorp for reporting that this wasn't working before! Thanks to lubatomy for the fix!

........
2.Feb.2015 - v0.01_alexalsp is up!

alexalsp reported that stations were taking too long to repair. (longer than ~8 hours for fully destroyed stations.) v0.01_alexalsp increases the amount by which Engineer skill of player-owned station-based Engineers increases the rate of repair. (was a factor of 0.8 to 4.0, now a straight multiplier from 20 to 100)

Rather cheaty at the moment. Would prefer to find a decent balance which would then be applied to all station-based Engineers -- player-owned and NPC.

Still a lot of PDA and logbook spew at the moment to verify that the alteration is indeed working. Will be taken out once the increase is found to be satisfactory. If you want to take it out, simply comment out the <show_notification ... /> and <write_to_logbook ... /> lines.