[MOD] Station Engineers

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

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

Post Reply
CulunTse
Posts: 73
Joined: Mon, 15. Jun 15, 08:10
xr

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: 2962
Joined: Tue, 18. Nov 14, 17: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: 2962
Joined: Tue, 18. Nov 14, 17: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: 2962
Joined: Tue, 18. Nov 14, 17: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: 2962
Joined: Tue, 18. Nov 14, 17: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.

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

Post by JESS 246 » Wed, 8. Jul 15, 05:18

Thanks w.evans

I am having more issues with 3.60 than i did with 1.25 so i may have had a problem there and it's not there in vanilla play.

I'm glad you like the ideas they came to me while i doing that post but what got me the most and correct me if i'm wrong but architects don't build they design & plain so unless they are designing/planning new different types of station why are they there they should be builders & workers.

There's a lot inconsistencies like that in all NPC's and if those were done right the game code/files would be shorter and maybe run smother without issues.

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

Post by w.evans » Wed, 8. Jul 15, 12:30

Hey Jess,

In the real world, you mean? I'm not sure since I don't work in those fields, but my understanding is that architects and engineers can both be expected to be able to build stuff, but their perspectives are different. Engineers have a more utilitarian, problem-oriented perspective; whereas architects, although they do also work with problem-solving (solving problems as sources for ideas for design is something common in all fields, I would think. Certainly is in mine.), start from an over-all aesthetic viewpoint. At least partly, I think, because architects have to sell their designs; whereas the work of engineers, unless they're working on something really exotic, just has to work.

In X:R, it kind of makes sense that architects are in charge of construction in as much as the whole process of construction is mostly automated. So I imagine that they draft up plans, tell you what's possible, and they then "tell" the construction drones what to do.

Also from my limited understanding of it, they can't, however, be expected to deal with maintenance outside of programming the automated station itself to deal with routine maintenance; and if regular maintenance is necessary, an engineer would be needed on retainer. (Or, at the very least, technicians, the roles for which, I think, are abstracted to the in-game "engineers." Possibly why, in vanilla, we have to talk to the architect to do regular refurbishments and, essentially, rebuilds when necessary.)

I was thinking of how and why to implement your idea of hiring builders to attach to the engineer. Code-wise, shouldn't be a huge problem, although it will take some doing. It is, after all, essentially just another number that has to be sort of traded, so to speak. However, gameplay-wise, it seems to be redundant since that's precisely what Construction URVs do at the moment -- and that with more links to the whole production/trading economy at large. Lore-wise, it doesn't seem to fit very well since the picture that ship-building, station-building, station-managing (production and trade), and freight-handling seem to paint is consistent with a highly-automated, labor-poor society where much depends on individual experts managing armies of relatively automated drones. I also had the impression that it was already going in that direction in X3 (although with much less drone usage, and with more dependence on inter-connected tube-based assembly lines), and that this tendency was exacerbated by the collapse of the jump gates which, I imagine, led to severe depopulation, particularly in pre-X:R sectors which were heavily dependent on inter-sector trade. (Before the gates re-open, for example, the pleasure of sliced BoFu with pseudo-garlic- and quasi-mushroom-infused Shoyu is nonexistent, and the poor berks have to settle for eating generic rations all the time, while the Argons from Omicron Lyrae now eat nothing but BoFu.)

That said, I will keep it in mind, and I do appreciate the ideas. But since I'm currently more actively working on my combat mods at the moment, and I don't have a whole lot of time to do modding work at all right now, no promises on this mod at the moment other than to keep it running.

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

Post by JESS 246 » Wed, 8. Jul 15, 14:24

Thanks w.evans

Understood. and as you say you're working on combat any way of stopping friendly fire as most of the time i get on mod target some friendly get in the way.

And to add to this just one idea and i'm sure you have been flustrated on capturing a cap ship its still being fired at by everyone and in some cases destroyed and all's lost.

This is how i see it that when we are boarding ie the first pod lands that ship's tag colour changes to orange or yellow maybe back to blue so as to show others that there's a friendly boarding party on board and to shop attacks but if boarding fail the target go's back to red and on an successful capture those marines do emergency repairs to get it out of danger till we recrew the ship.

If so is where any way of doing this and would this help.

Yep i know i'm full of it Oops! i mean ideas LOL!.

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

Post by w.evans » Wed, 8. Jul 15, 14:37

JESS 246 wrote:And to add to this just one idea and i'm sure you have been flustrated on capturing a cap ship its still being fired at by everyone and in some cases destroyed and all's lost.

This is how i see it that when we are boarding ie the first pod lands that ship's tag colour changes to orange or yellow maybe back to blue so as to show others that there's a friendly boarding party on board and to shop attacks but if boarding fail the target go's back to red and on an successful capture those marines do emergency repairs to get it out of danger till we recrew the ship.

If so is where any way of doing this and would this help.
You might want to take a look at cicero111's Better Turrets. One of the last features that cicero111 added before going on hiatus is that all friendly and neutral ships stop firing on ships which are being boarded (since they have friendly or neutral marines on board). Should still work; but not sure if it'll still work well since it's been a while since it was last updated, and I don't run it myself anymore.

Some of the code from Better Turrets was also incorporated into Rubini's Conquer Mod, notably exactly that feature where ships stop firing upon ships that are being boarded.

Haven't touched the firing logic myself thus far because I haven't found a way to change it while maintaining compatibility with everything else. (Still looking.) My movement and squad stuff should work with everything else, however (at least, everything I've looked at), including cicero111's Better Turrets and Rubini's Conquer Mod.
JESS 246 wrote:Yep i know i'm full of it Oops! i mean ideas LOL!.
More ideas is ALWAYS a good thing. No guarantees that they'll all be adopted, but not adopting them in no way means that they aren't good.

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

Post by JESS 246 » Wed, 8. Jul 15, 15:07

Thanks w.evans

I did once use the Conquer Mod and found it harsh will give it another go once i can resolve my engineers problem that they don't repair no matter what i do and i'm still testing.

I did have 2 mods that did work for me one was 100repair and was a personal work around modders file that i said i'd give a try and it worked with the other mod improved engineers but i lost them and only just found the 100repair but don't think it's working with 3.60 or the updated vanilla now and here's the link to yandex site if link works and you have time to look at it/update. https://yadi.sk/d/WXhX2oBShkCZt

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

Post by w.evans » Wed, 8. Jul 15, 16:29

Hi Jess,

Thanks for the link. Is 100repair part of a larger mod?

It uses a variable that isn't initialized anywhere in the file, and it looks like the file is expecting that variable to be initialized elsewhere. ($bInCombat -- also, the naming of the variable looks to be consistent with Mad_Joker's work, although it's very likely that his naming convention was adopted by other modders since it's a very logical way to keep track of variable types.)

Also, it only applies to engineers who are working on the Skunk. Was that a problem that you were having?

Also, sorry, but I'm not sure why you gave it to me. It doesn't seem to address the problems that you were describing. (ships firing on ships being boarded, friendly fire, or getting engineers onto stations)

I've read references to Improved Engineers in older threads, but that's way before my time, I think.

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

Post by JESS 246 » Wed, 8. Jul 15, 17:36

Hi W

I had this mod working a year back and it cured all my engineering issues but as i said i lost it i think in a deleting error and now that i have it back i found it on an old last years post of mine but don't think its working like before so as you are a modder i thought you can look at it update or maybe it will help you in your mods with authors permission of cause.

My problem is not the skunk engineers its all the others they either don't do anything and their work statist either says they are repairing and drones in use or none but no work or repairs are being done and even though i wait for a long time they still don't do a thing.

I've had this issue from day one when i brought the game 1.20v and the same issue is still there in 3.60v and by the time i resolve the issue along comes another update and bingo the same engineering issue with or without mods.

And whats annoying it seems when i attack a cap ship they repair quicker than i can destroy like it can take me about a minute to destroy an engine but a few seconds later it repaired and my engineers lazy lay abouts don't repair at all and they are 5 stared.

For me its pointless me hiring engineers that don't work or even capturing any ships just to watch them sit there unrepaired with lazy engineers so if and when i get your station engineers mod working in my game i'm a little worried that i'll have the same issue with that.

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

Post by w.evans » Wed, 8. Jul 15, 18:04

Hi Jess,

Your problem might have been caused by repair100. There are two instances where the variable I mentioned is present: where the repair rate is set, and where repair is actually initiated:

Code: Select all

<do_if value="not $bInCombat">
      <!-- calculate values based on engineer skill and amount of welder drones -->
      <set_value name="$repairpersec" exact="1.0 + (this.combinedskill / 25.0)" comment="between 1 and 5" />
      <do_all exact="unitcategory.welder.maxmk" counter="$i">
        <set_value name="$repairpersec" operation="add" exact="this.ship.units.{unitcategory.welder}.mk.{$i}.count * $i" />
      </do_all>
</do_if>
(The snippet where repair is actually initiated is further down, but is much longer, so didn't post it.)

I think that it won't ever fire since the variable "$bInCombat" isn't initialized, hence will always output null. (To be honest, I'm not sure what "not null" would compute to, though. "not 1 or any value greater than 1" equals 0, "not 0" equals 1.)

Also why I asked if it's a part of a different mod. It looks like $bInCombat is used to determine if the parent ship is engaged in combat, and is set in a different file. Also checked an older version of engineer.player.xml (dated 6th November 2013 - from launch?) to see if it might be a legacy from an older version of engineer.player, but that particular variable isn't there either.

I haven't read the script in detail, but it's possible that it caused your engineers to be stuck waiting to repair since the repair nodes weren't triggering. If that's the case, I would suggest running the game without 100repair, and resetting your engineers by reassigning them. (Either move them back to the Skunk and reassign them, or fire them and get new ones.)

Beyond that, sorry to say, I don't know. Capital ship- and station-based Engineers seem to work fine in my game. (At 5 stars, they repair damaged components, and the hull up to 90%)

edit: changed the paragraphs before the code snippet and immediately after to, hopefully, make them clearer.

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

Post by JESS 246 » Thu, 9. Jul 15, 02:26

Thanks W

I am not using it as i said i didn't think it was working and not using any other engineer mod other than your station one and yet to get to that part.

I'm now in a new freeplay game start 3.60 beta 2 and so far 2 Titurel capture well crewed and stocked with drones and 5 hours later no change the ships are still unrepaired and both engineers in work status screen are in repair mode one with only 6 construct drones in use the other none.

Had notice on one ship it had drones in cargo but there's no way of transferring the drones in cargo to inventory even if i take them off and resupply them back they just go into cargo then suddenly i cant even take them off and scrap the ship this need looking as i've done this lots of times because the engineers lazy gits won't work or use the resupplied drones.

I have no idea why i'm having this issue but i am so that why even a year ago i posted and asked that we need a repair tug/ship.

I have now deemed it pointless to capture to keep so take all cargo etc. and sell or destroy all cap ships.

And i'm now noticing dam deserters as now and again a crewman
disappear and have to replace them.

I am looking off site on other gaming sites for mods to help in my issue.

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

Post by JESS 246 » Thu, 9. Jul 15, 14:43

Hi W

just a note to say after another reinstall i now can assign engineers to stations but still need to be in the station employees menu list but yet to see if they work unlike my ship ones.

Post Reply

Return to “X Rebirth - Scripts and Modding”