[MOD] Station Engineers

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

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

Post Reply
w.evans
Posts: 2954
Joined: Tue, 18. Nov 14, 17:23

[MOD] Station Engineers

Post by w.evans » Sun, 1. Feb 15, 13:42

This tiny mod alters only two parameters 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.

edit: Huh. Didn't realize that you can't ask a CV to redeploy.

_____
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.

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

Code: Select all

<?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 file is available here:

http://www.nexusmods.com/xrebirth/mods/442/?

_____
Compatibility:

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

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

Fairly early in this little mod's development, eMYNOCK very graciously contributed code that was used in this mod. That code has since been published in eMYNOCK's two mods:

Player Shipyards and Enhancements
and Give us more Cloth please!

This mod is therefore incompatible with eMYNOCK's two mods. However, since eMYNOCK's mods are superior, I suggest that anyone interested in one of the two above mods drop this one and use that instead.

Also incompatible with:

mihaib's Repack Construction Vessel
Vim Razz' Human Resources

_____
Check out my other mods for X Rebirth:
MarineRebalance,
BetterAutoAim,
SmalltalkHack,
Epic Capital Ship Shields,
Engineer Drone Fix,
Slightly More Useful Plot Station,
DockAllDrones,
Miscellaneous OOZ Combat Tweaks,
Miscellaneous IZ Combat Tweaks,
DifficultyHack
Last edited by w.evans on Tue, 1. Mar 16, 09:17, edited 39 times in total.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7065
Joined: Tue, 30. Mar 04, 12:28

Post by Sparky Sparkycorp » Sun, 1. Feb 15, 14:04

Epic 8)

Smallest, lovely mod ever? Hehe

w.evans
Posts: 2954
Joined: Tue, 18. Nov 14, 17:23

Post by w.evans » Sun, 1. Feb 15, 14:12

Enjoy! (Hope it works.) *Fingers crossed*

User avatar
YorrickVander
Posts: 2672
Joined: Tue, 29. Oct 13, 22:59

Post by YorrickVander » Sun, 1. Feb 15, 14:20

Nice one :) You have any plans to add ware useage to the engineers? I did some experiments with limiting npc faction budgets a while back which would tie in well with that for actual economic warfare. I'll pm you the very early test scripts if you're interested as I barely have time to bug fix my current stuff atm without a new large project.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7065
Joined: Tue, 30. Mar 04, 12:28

Post by Sparky Sparkycorp » Sun, 1. Feb 15, 14:36

Ware usage would lilely have Scoob dancing in front of his monitor :)

Is the general idea for that sort of think to automate/semi-automate it via buy orders?

w.evans
Posts: 2954
Joined: Tue, 18. Nov 14, 17:23

Post by w.evans » Sun, 1. Feb 15, 14:41

Not at the moment, but doable. Mod won't be so tiny then, though.

Alter the NPC engineers to use wares as well?

User avatar
alexalsp
Posts: 785
Joined: Fri, 18. Jul 14, 05:28

Post by alexalsp » Sun, 1. Feb 15, 14:43

Great mod and idea. Is it possible to improve the mod , what would the engineer repaired the station up to 100 %. That would be great.

w.evans
Posts: 2954
Joined: Tue, 18. Nov 14, 17:23

Post by w.evans » Sun, 1. Feb 15, 14:46

@alexalsp, yup. Just checked the vanilla engineer script and it looks like it'll repair to 100% by default.

Code: Select all

      <do_if value="this.defensible.isclass.station">
        <set_value name="$hulldamagelimit" exact="100" comment="below what percentage hull is a component considered damaged"/>
      </do_if>

User avatar
alexalsp
Posts: 785
Joined: Fri, 18. Jul 14, 05:28

Post by alexalsp » Sun, 1. Feb 15, 15:02

w.evans wrote:@alexalsp, yup. Just checked the vanilla engineer script and it looks like it'll repair to 100% by default.

Code: Select all

      <do_if value="this.defensible.isclass.station">
        <set_value name="$hulldamagelimit" exact="100" comment="below what percentage hull is a component considered damaged"/>
      </do_if>
Thank you. 'll check.

w.evans
Posts: 2954
Joined: Tue, 18. Nov 14, 17:23

Post by w.evans » Sun, 1. Feb 15, 15:44

YorrickVander wrote:I'll pm you the very early test scripts if you're interested as I barely have time to bug fix my current stuff atm without a new large project.
Would love to see your test scripts. No guarantees on implementing them though. I'll have to understand them first, and I don't know if I can!

w.evans
Posts: 2954
Joined: Tue, 18. Nov 14, 17:23

Post by w.evans » Sun, 1. Feb 15, 15:49

Also, would anyone happen to know where the ware usage of Architects are to be found? Looked in NPC_Architect.xml (architects don't seem to have an aiscript), and the only relevant things I could find there are blocks for making ware lists for drones and ammunition, and to turn those ware lists to order lists, and order lists to buy orders.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 10820
Joined: Sun, 15. Feb 04, 21:12

Post by euclid » Sun, 1. Feb 15, 16:09

To my best knowledge the architect only deals with ammo & drones. He also handles the wares required for repairs & extension but this is done seperately.

So I'm not sure why someone would have the engineer handling wares.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

w.evans
Posts: 2954
Joined: Tue, 18. Nov 14, 17:23

Post by w.evans » Sun, 1. Feb 15, 16:15

Hi euclid,

didn't notice that you're a mod before now. Congratulations?

It's to make the engineer use wares to repair stations, the way that architects use wares to repair stations in vanilla.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 10820
Joined: Sun, 15. Feb 04, 21:12

Post by euclid » Sun, 1. Feb 15, 16:27

w.evans wrote:Hi euclid,

didn't notice that you're a mod before now. Congratulations?
Heheh, cheers, they kind of forced me into that. Let's see how it goes ;-)
w.evans wrote: It's to make the engineer use wares to repair stations, the way that architects use wares to repair stations in vanilla.
The engineer will repair a station to 100% and that includes destroyed subsystems. So there is no need for him to acquiring wares for that.

However, if you want to alter that then it'll be a major "hack" because you need the corresponding repair list from the architect and hence the associated UI part. Also the wares buy offer is usually issued at the CV so you need to change that to the station.

In short: this would require quite some script & "hack" work. Not sure it's worth it.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

w.evans
Posts: 2954
Joined: Tue, 18. Nov 14, 17:23

Post by w.evans » Sun, 1. Feb 15, 16:30

Thinking about it, would provide a nice additional resource sink if all stations required wares to repair, though, if it works. Although it could also cripple the economy with NPC stations requiring wares which the economy is unable to provide.

Post Reply

Return to “X Rebirth - Scripts and Modding”