[MOD] Station Engineers

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

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

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang » Fri, 10. Apr 15, 02:19

hmmm... noticing something is it normal for the station engineer to constantly report the amount it's repairing? I got it doing it atm and it's spamming every half dozen seconds or so. First time I've seen this of course.

http://steamcommunity.com/sharedfiles/f ... =422427224

It's showing this, but the station itself isn't even damaged.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Fri, 10. Apr 15, 02:32

You must be using the alexalsp variant. Forgot to remove the logbook and notification spam from that. Sorry about that. Should be fixed now.

_____
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

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Fri, 10. Apr 15, 02:37

Requiemfang wrote:It's showing this, but the station itself isn't even damaged.
I do know that there was a vanilla bug with engineers trying to repair without needing to. It was reported fixed, but what you saw might be a legacy of that bug.

In any case, this doesn't change how repairs are done, nor when they're initiated. The main variant just allows you to assign engineers to stations. The alexalsp variant additionally increases the amount by which engineer skill makes repairs go faster.

edit: could also be a mod conflict. I know that angel618's Engineer 100 completely rewrites engineer.ai.xml, for example, so that will conflict with anything else that modifies engineer.ai.xml. This is also redundant with Vim Razz's Human Resources, but Vim said that this mod is just bypassed. (Haven't checked yet, but Vim's good.)

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang » Fri, 10. Apr 15, 03:05

I do have HR, so basically since HR bypasses this mod it's better for me to remove this mod and just let HR handle it?

If you want I can open the game up in debug and post the log for you if that's what you want?

Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz » Fri, 10. Apr 15, 05:23

HR will completely overwrite the changes made by the "main" version of the mod, so it doesn't really do anything (or hurt anything) if they're installed together.

It doesn't have any affect on the aiscript changes in the _alexalsp, though, so if you're using that version then you still get that benefit.


Regarding the constantly repairing engineer.... You wouldn't be using J3PIT3R's production management mod by any chance, would you?

It switches off production by tricking the game into thinking the module is too badly damaged to remain operational, which has the side effect of making engineers freak out trying to fix that "damage"...

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang » Fri, 10. Apr 15, 05:39

Vim Razz wrote:HR will completely overwrite the changes made by the "main" version of the mod, so it doesn't really do anything (or hurt anything) if they're installed together.

It doesn't have any affect on the aiscript changes in the _alexalsp, though, so if you're using that version then you still get that benefit.


Regarding the constantly repairing engineer.... You wouldn't be using J3PIT3R's production management mod by any chance, would you?

It switches off production by tricking the game into thinking the module is too badly damaged to remain operational, which has the side effect of making engineers freak out trying to fix that "damage"...
No, not to my knowledge, unless he included it with his Betty mod, which would be a mistake since it would cause issues like you said. If anything it would be better to separate parts of the mod and let people choose which ones they wanna use. If it is in the betty mod he should rectify that.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Fri, 10. Apr 15, 11:04

Requiemfang wrote:I do have HR, so basically since HR bypasses this mod it's better for me to remove this mod and just let HR handle it?
Yup. If you're only after the functionality of the main mod (placing engineers in stations to handle repairs), and you want HR, then I would recommend that you uninstall this mod in favor of Vim's.
Requiemfang wrote:If you want I can open the game up in debug and post the log for you if that's what you want?
Thanks, but there would seem to be no point since this doesn't affect when repairs are initiated, nor how repairs are done. So your station's repairs are being initiated somewhere else.

Updated the code in the OP if you want to take a look.

edit: could also be the 99% thing (not sure if it qualifies as a bug). You know how ships that have 99% hull couldn't be repaired in shipyards? I think it's because the damage is big enough to round down to 99 in the display, but small enough that it doesn't register as damage, so the resources needed for repair (nor any of the math associated for repair) aren't calculable.

Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz » Sun, 12. Apr 15, 02:51

Requiemfang wrote:No, not to my knowledge, unless he included it with his Betty mod.
You would know if you were running it, because you would have had to "switch off" the production manually before any visible issues arose.

In this case, the quirk evans described seems most likely?

Requiemfang
Posts: 3206
Joined: Thu, 16. Jul 09, 12:24
x4

Post by Requiemfang » Sun, 12. Apr 15, 03:16

w.evans wrote:
Requiemfang wrote:I do have HR, so basically since HR bypasses this mod it's better for me to remove this mod and just let HR handle it?
Yup. If you're only after the functionality of the main mod (placing engineers in stations to handle repairs), and you want HR, then I would recommend that you uninstall this mod in favor of Vim's.
Requiemfang wrote:If you want I can open the game up in debug and post the log for you if that's what you want?
Thanks, but there would seem to be no point since this doesn't affect when repairs are initiated, nor how repairs are done. So your station's repairs are being initiated somewhere else.

Updated the code in the OP if you want to take a look.

edit: could also be the 99% thing (not sure if it qualifies as a bug). You know how ships that have 99% hull couldn't be repaired in shipyards? I think it's because the damage is big enough to round down to 99 in the display, but small enough that it doesn't register as damage, so the resources needed for repair (nor any of the math associated for repair) aren't calculable.
Since getting the new version I've not experienced the spam. Also @VR I haven't seen that "switch off" option before.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sun, 28. Jun 15, 09:01

28.Jun.2015 - Compatibility update - should now be compatible with Linux and Mac versions.

Windows users need not re-download.

However, I am unable to verify compatibility since I don't have access to a box running Linux or whatever they're calling the Mac OS at the moment, so feedback on this would be greatly appreciated.

CulunTse
Posts: 118
Joined: Mon, 15. Jun 15, 08:10
x4

Post by CulunTse » Sun, 5. Jul 15, 13:56

Mini-update: as I remarked in my linux compatibility guide it works after I rename the file "NPC_Engineer.xml" to "npc_engineer.xml".

I've updated the guide :-)
Thanks again for your enthusiasm for this topic!

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sun, 5. Jul 15, 14:00

He he. Crap. Ok, md file names have to be in small caps as well. I'll change this accordingly. Thanks for confirming.

And it's fun, sort of. Kind of like trying to hit a target without ever having seen it and not being sure if the target was hit, and why. Figuring out why is fun.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sun, 5. Jul 15, 14:14

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.

JESS 246
Posts: 573
Joined: Mon, 3. Jul 06, 03:24
x3

Post by JESS 246 » Tue, 7. Jul 15, 12:58

Hi w.evans

I've given this a try but have yet to find a way to assign an engineer to a station you can ask them to work on ships but when asking them to work on a station i see no line in chat to do this like you stand on a cap ship dock and see the line work here but on a station dock no such line like assigning managers/defence etc.

Maybe if in the menu list where there the section on crew for stations how about adding a proper station engineers that not only work independently on a station but works with the architects.

And to add to this like you buy from a recruitment trader marines you buy builders for engineers and these would then do all internal work/repairs while construct drones work outside.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Tue, 7. Jul 15, 13:23

Hey Jess,

Are you on windows? I'm worried that my work in making it compatible with linux (confirmed to be working) may have broken compatibility with the windows version of the game. I can't test it right now, but will look into it when I can.

And thanks for the ideas! I don't have plans to expand this mod at the moment, but I'll keep them in mind if/when I do.

EDIT: Couldn't resist, so checked in-game, and it does indeed not work. No idea why at the moment, since the paths all still land in versions 3.53 and 3.60, and, in a cursory look, I don't see any changes in the base files that would invalidate the changes. I really can't afford to look deeper into this at the moment, however, because I really should get back to work. Thanks for the heads-up!

For now, I'm updating the OP, and informing NZ-Wanderer that this is broken.

In the meantime, I could point you to Vim_Razz' Human Resources which also adds this functionality.

CulunTse
Posts: 118
Joined: Mon, 15. Jun 15, 08:10
x4

Post by CulunTse » Tue, 7. Jul 15, 14:00

Hi Jess,

To rule out the Linux-changes as a cause, could you try a version from before we started Linux-related changes?

That should be the 0.03 version available on nexus mods under 'old file's

To rule out any doubt, I'll try the latest 0.05 version in my game too, under both Linux and Windows.
(May take a while, I don't have much gaming time on weekdays.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Tue, 7. Jul 15, 14:14

Hey CulunTse,

I suspect a change in the 3.60 betas that I didn't spot. Also tested with 0.03 and 0.05 (only change is the md file name in small caps.) I further suspect that the linux beta hasn't been updated to 3.60 yet (has it?).

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Tue, 7. Jul 15, 15:06

Just a quick update. Couldn't resist so I looked into the problem during my break. There were changes in npc_engineer.xml between 3.53 and 3.60 beta 1, but none of them should affect how this mod works. I'm stumped.

Back to work, and I'll try to look into this again later.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Tue, 7. Jul 15, 15:20

Posting this here in case someone spots something that I missed.

This is the cue in question:

Code: Select all

        <cue name="OnBoardComm" instantiate="true">
          <conditions>
            <check_any>
              <event_conversation_started actor="$actor" />
              <event_conversation_returned_to_section actor="$actor" />
            </check_any>
            <check_value value="event.param == 'default'" />
            <check_value value="$actor.ship == player.primaryship" />
          </conditions>
          <actions>
            <do_if value="event.name == 'event_conversation_started'">
              <debug_text text="'Engineer conversation started: %1, actor=%2, %3'.[event.param, event.object, event.object.knownname]" />
              <set_conversation_return_section section="g_goodbye" />
              <!-- Greeting -->
              <add_npc_line line="1" comment="Greeting" />
            </do_if>
            <!-- Player choices:
              1: Ship status
              2: Show me your skills
              3: You're fired!
              4: Work here
              5: Please work on this ship
              6: Goodbye
            -->
            <do_if value="$actor == player.primaryship.engineer">
              <add_player_choice_sub text="{1002,1203}" position="top_left" section="cEngineer_repair_onboard" choiceparam="[0, 0,  $actor.container, $actor]" baseparam="event.param2" comment="Ship status"/>
            </do_if>
            <add_player_choice_sub text="{1002,3003}" position="left" section="gMain_charProfileMenu" choiceparam="[0, 0, $actor, 0, 1, $actor.container]" baseparam="event.param2" comment="Show me your skills!"/>
            <do_if value="not player.primaryship.engineer">
              <add_player_choice_sub text="{1002,3007}" section="cEngineer_takeover" position="right" comment="Work on my ship."/>
            </do_if>
            <add_player_choice text="{1002,3004}" section="cEngineer_fire" position="bottom_left" comment="You\'re fired!"/>
            <do_if value="@player.platform.container.isplayerowned and @player.platform.container.isclass.ship">
              <do_if value="not @player.platform.container.engineer">
                <add_player_choice text="{1002,3006}" section="cEngineer_workhere" position="top_right" comment="Work here"/>
              </do_if>
              <do_else>
                <add_player_choice text="{1002,3006}" section="cEngineer_hasengineerplatform" position="top_right" comment="Work here"/>
              </do_else>
            </do_if>
            <do_elseif value="not player.platform">
              <add_player_choice text="{1002,3008}" section="cEngineer_worksomewhere" position="top_right" choiceparam="[0, 0, 'zone', player.primaryship.zone, null, null, 'selectplayerobject', ['cEngineer_worksomewhere_objectselected', null, null, true, false, true, false, true]]" comment="Work somewhere else"/>
            </do_elseif>
            <add_player_choice_return text="{1002,2}" position="bottom_right" comment="Goodbye"/>
          </actions>
        </cue>
While 3.60 Beta 1 did change something here, the only thing changed is a t-file reference. This:

Code: Select all

<add_player_choice_sub text="{1002,3005}" section="cEngineer_takeover" position="right" comment="Please work on this ship."/>
was changed to this:

Code: Select all

<add_player_choice_sub text="{1002,3007}" section="cEngineer_takeover" position="right" comment="Work on my ship."/>
Now this mod works by changing the conditions in which

Code: Select all

<add_player_choice text="{1002,3006}" section="cEngineer_workhere" position="top_right" comment="Work here"/>
can be invoked, and by changing valid targets for "work somewhere else."

So, this:

Code: Select all

<do_if value="@player.platform.container.isplayerowned and @player.platform.container.isclass.ship">
is changed to:

Code: Select all

<do_if value="@player.platform.container.isplayerowned">
so that you can land at any of your ships or stations and tell engineers in the Skunk that they can "Work here."

And this:

Code: Select all

<add_player_choice text="{1002,3008}" section="cEngineer_worksomewhere" position="top_right" choiceparam="[0, 0, 'zone', player.primaryship.zone, null, null, 'selectplayerobject', ['cEngineer_worksomewhere_objectselected', null, null, true, false, true, false, true]]" comment="Work somewhere else"/>
is changed to this:

Code: Select all

<add_player_choice text="{1002,3008}" section="cEngineer_worksomewhere" position="top_right" choiceparam="[0, 0, 'zone', player.primaryship.zone, null, null, 'selectplayerobject', ['cEngineer_worksomewhere_objectselected', null, null, true, false, false, false, true]]" comment="Work somewhere else"/>
so that player-owned assets are considered valid targets for "Work somewhere else" regardless of whether the asset is a station or a ship.

Both changed nodes are still present in 3.60, both still do what they're supposed to do as far as I can tell, and both changes should still affect the changes that they were intended to; except they don't anymore.

Any ideas?

EDIT: side-by-side comparison of NPC_Engineer.xml with differences highlighted from X:R 3.53 and 3.60 Beta 1 available here.

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Tue, 7. Jul 15, 19:01

Heh. Made a stupid mistake. I forgot that I had installed Vim_Razz' Human Resources a while back and deactivated Station Engineers. I later then deactivated Human Resources to do some testing with something else, and completely forgot that Station Engineers was deactivated.

I just went back in-game, reactivated Station Engineers, restarted the game, and it's working properly with X:R 3.60 Beta 2. No problems with X:R 3.53 either.

@Jess, any of the ways with which you can normally reassign engineers should work in assigning them to a Station:
  • Going to the back of the Skunk and talking to an Engineer face-to-face,
  • Landing at a Station and comming your Engineer to "Work Here,"
  • And, the method I use the most, comm the Engineer while in the cockpit of the Skunk using Yorrick's Copilot Convo
Just in case you made the same mistake I did (doubtful that anyone can make the same stupid mistake, but hey, anything's possible) please make sure that the mod's active by checking your in-game "Extensions" menu.

If it's still not working for you, I'd like a look at your mod-list, please, to check for any conflicts that I wasn't aware of.

Post Reply

Return to “X Rebirth - Scripts and Modding”