[MOD] Shipyard and Player Shipyard - Ship recycling v0.07 (6 Apr 2017)

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

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

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain » Wed, 17. Dec 14, 22:28

dez505 wrote:Question can it be done so hull% = resource amount returned?

It already is that way.

dez505
Posts: 172
Joined: Wed, 6. Nov 02, 20:31
x4

Post by dez505 » Wed, 17. Dec 14, 22:38

hats off to you good sir! :o

Aranov
Posts: 134
Joined: Mon, 3. Jun 13, 23:08
x4

Post by Aranov » Mon, 5. Jan 15, 01:34

So I've been using this mod for awhile(great mod btw), and I've noticed a small but rather annoying bug concerning a ship's crew.

Crew that have been recycled have a habit of disappearing at some point after they've been assigned to a new ship.

In the most recent case of this happening a captain and defense officer disappeared from one of my bulk rahanas.

The engineer interestingly, did not disappear. When I asked him to board the Skunk he did charge me, as if I was hiring him for the first time.
The captain and defense officer did not do this. This might be connected to the disappearing crew.

Other then this the mod works great, but the growing number of crew on my shipyard the may disappear if I try to use them does concern me.

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Tue, 6. Jan 15, 14:20

Aranov wrote:So I've been using this mod for awhile(great mod btw), and I've noticed a small but rather annoying bug concerning a ship's crew.

Crew that have been recycled have a habit of disappearing at some point after they've been assigned to a new ship.

In the most recent case of this happening a captain and defense officer disappeared from one of my bulk rahanas.

The engineer interestingly, did not disappear. When I asked him to board the Skunk he did charge me, as if I was hiring him for the first time.
The captain and defense officer did not do this. This might be connected to the disappearing crew.

Other then this the mod works great, but the growing number of crew on my shipyard the may disappear if I try to use them does concern me.
Interesting. Thanks for reporting this. I have a feeling that there are a few subtleties lurking under the surface. Maybe a clean up script in action.

I think that this will only happen for player owned shipyards as NPC ones have no space for more crew so they never get there. The boarding pod AI script zaps them when it works out there is no room :(

I do feel that we need to retain the crew somehow or it creates a shortage locally.

Having decided to be nice to the crew (and the players wallet) I had two options on how to deal with them for ship and station recycling.

1) Keep them as player owned and let the boarding pod AI script do the work

This obviously avoids re-hiring them and is roughly equivalent to telling them to re-board the Skunk but without filling up the Skunk. Popping crew back into the Skunk is vanilla game stuff but popping them onto a station cannot be done. Egosoft's solution to popping them back onto a station is to destroy them when you fire them which seems a bit mean :( but it is a nice simple solution :)

I have been toying with creating an NPC Recycling mod to stop them being destroyed but it would have to make sure that there was room.

2) Turn them back into non player owned and make them re-hireable

This one will obviously cost you a re-hire fee and I suspect that I would need to do a few extra things to make them re-hireable

2a) Recreate them as non player owned and make them hireable

The names would change but their job role would be retained, again there would be a re-hire fee . I suspect that this would be cleaner and more likely to work over a longer period than option 2



I guess that option 2a is more compatible with a vanilla game than option 1 or 2 and it might be possible to give the player back half the hiring fee to cushion the effect on their wallets.

Anybody see any problems with this ?

Regards

jth

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

Post by w.evans » Tue, 6. Jan 15, 14:24

2a looks good. Is there a reason why it wouldn't be good to give back the full hiring fee?

edit: And if an NPC were trained before the ship were recycled, would the hiring price go up? And would the refund go up as well?

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Tue, 6. Jan 15, 15:09

w.evans wrote:2a looks good. Is there a reason why it wouldn't be good to give back the full hiring fee?
Recycling tends to not be 100% efficent ....
w.evans wrote:edit: And if an NPC were trained before the ship were recycled, would the hiring price go up? And would the refund go up as well?
Ouch things getting very messy very quickly here. What I was thinking about was to recreate the crew member and then find out the new NPC's hiring fee.

I was avoiding saying that the new NPC would have exactly the same experience level as the old one. I think its doable but is a fairly large chunk of code, I started down there for the station recycling when cloning the CV crew then chickened out when it spilled off the screen :( Not sure if I still have the scrap of code that listed their skills

Good thought about the training, it might be worth a look at the training script to see if there are any ideas in there.

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

Post by w.evans » Tue, 6. Jan 15, 15:14

Whoops. Sorry.
jth wrote:What I was thinking about was to recreate the crew member and then find out the new NPC's hiring fee.
This is ok too, I think, but would be great if it's clear that that's what's going to happen so we could first swap the experienced crew out for newly-hired crew before recycling. Could get expensive though. (Although at the point in the game where a player starts recycling ships, 100 thousand here or there probably won't be a big deal.)

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Tue, 6. Jan 15, 15:26

w.evans wrote:Whoops. Sorry.
jth wrote:What I was thinking about was to recreate the crew member and then find out the new NPC's hiring fee.
This is ok too, I think, but would be great if it's clear that that's what's going to happen so we could first swap the experienced crew out for newly-hired crew before recycling. Could get expensive though. (Although at the point in the game where a player starts recycling ships, 100 thousand here or there probably won't be a big deal.)
I think that I remember why I liked option 1

Doing option 2 is looking better all the time .... :)

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

Post by w.evans » Tue, 6. Jan 15, 15:40

Options 1 or 2 would actually be more consistent to the in-game experience, I think. I only voted 2a because I thought:
jth wrote:I suspect that this would be cleaner and more likely to work over a longer period than option 2
?

Option 1 sounds like the best, but I'm not sure if I understood it correctly. (Not familiar with the boarding pod AI.) If they don't fill up the Skunk, where do they go?

Could also pop them in limbo somewhere (is it possible to store variables, but have them be nowhere in the game universe?), then give the player the option to recreate them to repopulate ships in a way similar to how Yorrick does it in his Copilot Convo. Wouldn't be very immersive, but might do for a stop-gap.

User avatar
NZ-Wanderer
Posts: 1623
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer » Tue, 6. Jan 15, 21:42

w.evans wrote:Could also pop them in limbo somewhere (is it possible to store variables, but have them be nowhere in the game universe?), then give the player the option to recreate them to repopulate ships in a way similar to how Yorrick does it in his Copilot Convo. Wouldn't be very immersive, but might do for a stop-gap.
I like this idea :)
Personally, I use the more crew mod on the skunk, and usually have all 15 slots taken up with new pilots etc, so having someone try to dock at the skunk wouldn't exactly work :P

Another thought, if you making them re-hirable, why not check to see if the player owns any stations, and if so throw them in there :).
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Sun, 8. Mar 15, 16:05

Aranov wrote:So I've been using this mod for awhile(great mod btw), and I've noticed a small but rather annoying bug concerning a ship's crew.

Crew that have been recycled have a habit of disappearing at some point after they've been assigned to a new ship.

In the most recent case of this happening a captain and defense officer disappeared from one of my bulk rahanas.

The engineer interestingly, did not disappear. When I asked him to board the Skunk he did charge me, as if I was hiring him for the first time.
The captain and defense officer did not do this. This might be connected to the disappearing crew.

Other then this the mod works great, but the growing number of crew on my shipyard the may disappear if I try to use them does concern me.
I have spent some time looking into this and I think that most of the problem is me mis-using the boarding pod call and the rest keeping the NPC's as player owned.

The boarding pod script looks to have been designed to transfer people to the skunk rather than to a station. Thats why it assigns the enginer to the station. It also doesn't take a docking bay as a parameter just the target (as the Skunk only has one bay). So if the the Administration dock is full but there is room elsewhere it destroys the NPC being transported. I am using it for something that it wasn't really intended for :(

I am not keen on putting the crew into limbo as this would have save game implications

I have therefore decided to switch to option 2a and stopped using the pods

2a) Recreate them as non player owned and make them hireable

The names would change but their job role would be retained, again there would be a re-hire fee .


The crew now go with the ship but the player is paid for their contracts. I didn't do the repay 50% as the algorithm for calculating hire fees is fairly randomised anyway 1/4 = skill based, 3/4 = random

Replacment crew are created on the shipyard, in the bar if there is room otherwise on any dock with space. They are created with the same skills as their equivalents on the recycled ship, so you will retain training levels when you re-hire them.

Player shipyards should have plenty of space for all these NPC's and I have tested it on the plot Canteran shipyard and they made it into the bar OK. If there is no bar or its full then they seem to try the Admin dock next

EDIT

I could do with someone to just confirm that this looks OK before I publish it on Nexus and Steam. The link below is to what will go up on Nexus provided it works OK. Please don't play the plot with the dropbox version as its just for testing.

https://www.dropbox.com/s/z7c2p4u8c5v4d ... 2.zip?dl=0

Regards

jth
Last edited by jth on Wed, 11. Mar 15, 19:33, edited 1 time in total.

Aranov
Posts: 134
Joined: Mon, 3. Jun 13, 23:08
x4

Post by Aranov » Tue, 10. Mar 15, 01:21

So I tested the dropbox version and for the most part it works.

There are two minor bugs however.

First one is the big one. On my shipyard that I used in the previous version, I'm having trouble with the new crew members.
Namely, instead of the 3 crew members as my ships have, I'm getting about 40ish spawned crew with L sized ships (Balor, Sul, Rahanas).
An XL ship (A Titurel) spawned 6 new crew members when salvaged. I'm also reimbursed for these extra crew too.
Now this does NOT happen with a newly built or NPC owned shipyard.

I'm thinking there might be something wrong with my saves, seeing as I have about 100 crew left on station from the old method.
It may also be due to using an old version of the mod and then updating.

Second bug is minor, but if a shipyard (Player owned ones at least) doesn't have the resources and
cancels the salvage then ship to be salvaged will be locked out from future salvaging attempts at that station.

I'll try to explain the bugs better or provide a save file if needed later,
but I'm am not feeling well at the moment.

Just wanted to get this out there, and see if anyone else can reproduce this.

EDIT: Ok so my migraine has passed and I've remembered a few key details, and been able to do a bit more testing

First bug is almost 100% to do with my saves but it could be reproducible.

I've noticed my station has 109 "Service Personal" listed and 110 employees under the management listing.
However in the details tab for "Service Personal" all docks are empty, save for the ship traders and the Admin dock, which has only 43 crew on board.
But these numbers only increase when I salvage new ships so I suspect there may be a number of unlisted crew stuck in limbo. This is only my best guess, I maybe wrong of course.

Second bug was a bit more serious then I remembered.
Not only is the "Select" button greyed out in GUI for choosing a ship after said ship fails the salvage check, but the "New order", "Assign new superior" and "Stop current task" commands on the captains command interface for the ship are greyed out too.

and a 3rd bug, may not be fixable but I'll report it anyway.
The new method for spawning crew has a habit of spawning them with different models then normal. Defense Officers are dressing like Space Farmers, and etc.

EDIT2: Starting feel like the bearer of bad news, but Bug No.3 is bigger then I thought.
So yeah long story short, The new method of crew spawning seems to use ALL models available ingame to create crew.
Not only did I find an Engineer dressed like a Space Farmer, I found a horribly bugged Spilt female DO with no dialogue or animations and freaking Yisha as a ship captain.

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Tue, 10. Mar 15, 15:08

Thanks for putting in a lot of effort to test this. You have identified a couple of areas that I missed :(

I have grouped your comments and the Edits together when answering them
Aranov wrote:So I tested the dropbox version and for the most part it works.

There are two minor bugs however.

First one is the big one. On my shipyard that I used in the previous version, I'm having trouble with the new crew members.
Namely, instead of the 3 crew members as my ships have, I'm getting about 40ish spawned crew with L sized ships (Balor, Sul, Rahanas).
An XL ship (A Titurel) spawned 6 new crew members when salvaged. I'm also reimbursed for these extra crew too.
Now this does NOT happen with a newly built or NPC owned shipyard.

I'm thinking there might be something wrong with my saves, seeing as I have about 100 crew left on station from the old method.
It may also be due to using an old version of the mod and then updating.

EDIT:
First bug is almost 100% to do with my saves but it could be reproducible.

I've noticed my station has 109 "Service Personal" listed and 110 employees under the management listing.
However in the details tab for "Service Personal" all docks are empty, save for the ship traders and the Admin dock, which has only 43 crew on board.
But these numbers only increase when I salvage new ships so I suspect there may be a number of unlisted crew stuck in limbo. This is only my best guess, I maybe wrong of course.
Thanks for testing this in a bigger setup

I think that I need to write some clean up code for the old version to convert the player owned NPC's to un-hired.

I will have a go at reproducing this by using the old version to salvage a ship followed by the new version to salvage another ship and see if I get anywhere.

There is a fair amount of debug code in there so I may be asking for a debug.log file and a save game if I don't get anywhere.
Aranov wrote: Second bug is minor, but if a shipyard (Player owned ones at least) doesn't have the resources and
cancels the salvage then ship to be salvaged will be locked out from future salvaging attempts at that station.

EDIT:
Second bug was a bit more serious then I remembered.
Not only is the "Select" button greyed out in GUI for choosing a ship after said ship fails the salvage check, but the "New order", "Assign new superior" and "Stop current task" commands on the captains command interface for the ship are greyed out too.
That one is currently baffling me
Aranov wrote: and a 3rd bug, may not be fixable but I'll report it anyway.
The new method for spawning crew has a habit of spawning them with different models then normal. Defense Officers are dressing like Space Farmers, and etc.

EDIT2: Starting feel like the bearer of bad news, but Bug No.3 is bigger then I thought.
So yeah long story short, The new method of crew spawning seems to use ALL models available ingame to create crew.
Not only did I find an Engineer dressed like a Space Farmer, I found a horribly bugged Spilt female DO with no dialogue or animations and freaking Yisha as a ship captain.
I think that I know what is causing this one. I create the NPC then assign the role to them and I suspect that as I don't specify the role at creation its randomly choosing a body. As I was re-creating the crew I decided to use the opportunity to go for a completely fresh start :) and let the race change ..... oops

I think that I am going to concentrate on issues 3 and 1 first

The dropbox link is going to vanish for a while

I try not to shoot the messenger as I would rather know about the issues and I do get migraines myself, so thanks for reporting this in a very diplomatic way and go find somewhere dark

EDIT

I have changed a couple of lines to try and fix issue 3. It now uses the same macro when re-creating the NPC's, that should stop it cross dressing. It will still be a different person though. Only tried it on a few NPC's so look forward to hearing how you do.

EDIT2

Please don't play the plot with the dropbox version as its just for testing.

https://www.dropbox.com/s/z7c2p4u8c5v4d ... 2.zip?dl=0

Will try and reproduce issue 1 tomorrow

Regards

jth

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Wed, 11. Mar 15, 20:02

I have managed to reproduce issue 1 and found that it does only happen with a save game that had version 1 used to recycle a ship. It affects the actions of individual shipdealers as they run their own copies of the script. So if a shipdealer did no recycling under version 1 then it will not have the issue with the early code of version 2. The more recycling a shipdealer did with version 1 the worse the effect.

I think that I have identified what is causing it and created a first attempt at a fix plus a cleanup routine that converts all the player owned recycled NPC's into hireable and pays you for them. The cleanup works by shipdealer when you ask them to recycle another ship with the latest version 2 code.

You will need to throw away any save games that used the early dropbox version 2 code as I can't fix the doubled up NPC's.

If you load a save game with version 1 used then the latest attempt should convert the NPC's and delete the recycled player owned NPC's on that shipyard

Please don't play the plot with the dropbox version as its just for testing.

https://www.dropbox.com/s/z7c2p4u8c5v4d ... 2.zip?dl=0

That should be issue 1 and 3 dealt with, please let me know how it goes

Regards

jth

Aranov
Posts: 134
Joined: Mon, 3. Jun 13, 23:08
x4

Post by Aranov » Wed, 11. Mar 15, 23:47

Tested the newest version, and everything seems to be working smoothly with regards to bugs 1 and 3.

Upon sending an L ship to salvaged, all crew on the station and ship were successfully converted using the new method.
Subsequent salvaging of L ships went as expected, No problems there.

The first XL ship to be salvaged did create 6 crew instead of 3, but following ships worked normally.

After this I checked the newly spawned NPCs(all 40 or so of them) and they appeared to be dressed correctly for their jobs.

However in the time of writing this post and letting X:R run in background, I found something else that maybe a problem.
The converted crew are now disappearing from stations after some time if I don't hire them.
I'm assuming this is do to same cleanup routine that changes out the various characters on the NPC stations every so often.

As for bug No.2, was my explanation confusing? I was hesitant to report it as I even found it a bit confusing.

I'll try to make it clearer what happens.

1. A shipyard fails the check to be able to salvage a ship.
In my case, a newly built shipyard had no food or drones as I had forgotten I needed them.

2. If that happens, The ship that the check failed on can not be targeted for salvage again.
Which is to say the "Select" button is greyed out and unclickable when choosing a ship to be sold or salvaged. This persists across all shipyards.

3. And the real problem IMO, The ship is stuck with the orders it had at the time of the failed salvage.
When calling the captain all possible orders are once again greyed out and unclickable. I can only tell them to leave or join my squad.
Now upon joining my squad I do have the option to give them orders, but they do not follow them.

That is the extant of what I know concerning bug No.2.

And thank you again for making this mod, and for continuing to update it.
This is easily one of my favorite mods for X:R, I can't believe Egosoft didn't do something like this in vanilla.
Now I have a way to finally remove ships that are stuck needing wares in the NPC shipyards, and it makes playing a pirate so much more satisfying.

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Thu, 12. Mar 15, 14:20

Thanks for helping me with this, its much less stressful getting the bugs out before they go live on Nexus and Steam.
Aranov wrote:Tested the newest version, and everything seems to be working smoothly with regards to bugs 1 and 3.

Upon sending an L ship to salvaged, all crew on the station and ship were successfully converted using the new method.
Subsequent salvaging of L ships went as expected, No problems there.

The first XL ship to be salvaged did create 6 crew instead of 3, but following ships worked normally.
I had a nasty thought last night about the conversion, I think that I need to check that the version 1 NPC's are on the shipyard before I convert them or you may loose some working ship captains ... About the only thing that I can do with the crew that are working is to skip them and to pop something in the log for the player to deal with.

If I have some spare time then I will see if I can reproduce the XL glitch but at least its a one off.
Aranov wrote:After this I checked the newly spawned NPCs(all 40 or so of them) and they appeared to be dressed correctly for their jobs.

However in the time of writing this post and letting X:R run in background, I found something else that maybe a problem.
The converted crew are now disappearing from stations after some time if I don't hire them.
I'm assuming this is do to same cleanup routine that changes out the various characters on the NPC stations every so often.
Hopefully that is issue 3 dealt with OK, I would agree with you about cleanup, at least you got paid for them this time :)

It might be possible to stop the NPC cleanup script on a player shipyard .. if we can find it
Aranov wrote:As for bug No.2, was my explanation confusing? I was hesitant to report it as I even found it a bit confusing.

I'll try to make it clearer what happens.

1. A shipyard fails the check to be able to salvage a ship.
In my case, a newly built shipyard had no food or drones as I had forgotten I needed them.

2. If that happens, The ship that the check failed on can not be targeted for salvage again.
Which is to say the "Select" button is greyed out and unclickable when choosing a ship to be sold or salvaged. This persists across all shipyards.

3. And the real problem IMO, The ship is stuck with the orders it had at the time of the failed salvage.
When calling the captain all possible orders are once again greyed out and unclickable. I can only tell them to leave or join my squad.
Now upon joining my squad I do have the option to give them orders, but they do not follow them.

That is the extant of what I know concerning bug No.2.

And thank you again for making this mod, and for continuing to update it.
This is easily one of my favorite mods for X:R, I can't believe Egosoft didn't do something like this in vanilla.
Now I have a way to finally remove ships that are stuck needing wares in the NPC shipyards, and it makes playing a pirate so much more satisfying.
I am going to add the extra conditions onto the conversion first then will see if I can reproduce issue 2 and the XL issue.

Thanks again

jth

Aranov
Posts: 134
Joined: Mon, 3. Jun 13, 23:08
x4

Post by Aranov » Thu, 12. Mar 15, 15:09

jth wrote: I had a nasty thought last night about the conversion, I think that I need to check that the version 1 NPC's are on the shipyard before I convert them or you may loose some working ship captains ... About the only thing that I can do with the crew that are working is to skip them and to pop something in the log for the player to deal with.
Just popping in to confirm this.
While I didn't have any crew from V.1 on ships due to the original bug, I did load my test save and tossed some of them on to a ship for testing.
When the cleanup script fires they are removed from the ship and I'm reimbursed.

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Thu, 12. Mar 15, 18:27

Aranov wrote:
jth wrote: I had a nasty thought last night about the conversion, I think that I need to check that the version 1 NPC's are on the shipyard before I convert them or you may loose some working ship captains ... About the only thing that I can do with the crew that are working is to skip them and to pop something in the log for the player to deal with.
Just popping in to confirm this.
While I didn't have any crew from V.1 on ships due to the original bug, I did load my test save and tossed some of them on to a ship for testing.
When the cleanup script fires they are removed from the ship and I'm reimbursed.
Is what you just found actually a reasonable outcome ?

It leaves the ship in a dodgy position without crew although it does cleanly remove the ship's NPC's and get them re-created in a state that works better with the game.

If I exclude ship crew from conversion then the player could still convert them by putting them on a ship and recycling it and the ship(s) continue flying although they are vulnerable to getting their crew cleaned up as you originally reported

I can see both sides of this

what do you think ?

Regards

jth

Aranov
Posts: 134
Joined: Mon, 3. Jun 13, 23:08
x4

Post by Aranov » Thu, 12. Mar 15, 21:07

I agree, both sides do seem valid.

One thing to consider is if anyone else has reported the original issue with disappearing crew.
I never used crew from V.1 after I found out what was happening as I couldn't trust them to be there when I needed them.
But I haven't seen any other reports of the V.1 bug here or on steam, as such I would guess most folks aren't using this with the player shipyard mod.

From what I can see only crew from the V.1 salvaging method are removed, It'd be a one time thing unless another mod does something similar with crew.
So with a warning in the mod's description and maybe a message that pops up ingame the first time the mod is loaded everything should be fine.

However checking if they're on station could be a good idea, As if someone is using salvaged V.1 crew without issues then they wouldn't need to be replaced.
But as I said, another mod could come along that tries something similar to the way V.1 used the crew, so removing them from all player owned ship and stations might cause a mod conflict down the line.

But really IMO the bigger problem is informing the steam workshop users there's a gonna be a hiccup in updating, I'd like to think the best of people but the workshop makes it too easy to not know what a mod update may contain.

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Fri, 13. Mar 15, 18:54

Aranov wrote:I agree, both sides do seem valid.

One thing to consider is if anyone else has reported the original issue with disappearing crew.
I never used crew from V.1 after I found out what was happening as I couldn't trust them to be there when I needed them.
But I haven't seen any other reports of the V.1 bug here or on steam, as such I would guess most folks aren't using this with the player shipyard mod.

From what I can see only crew from the V.1 salvaging method are removed, It'd be a one time thing unless another mod does something similar with crew.
So with a warning in the mod's description and maybe a message that pops up ingame the first time the mod is loaded everything should be fine.

However checking if they're on station could be a good idea, As if someone is using salvaged V.1 crew without issues then they wouldn't need to be replaced.
But as I said, another mod could come along that tries something similar to the way V.1 used the crew, so removing them from all player owned ship and stations might cause a mod conflict down the line.

But really IMO the bigger problem is informing the steam workshop users there's a gonna be a hiccup in updating, I'd like to think the best of people but the workshop makes it too easy to not know what a mod update may contain.
A lot of good points, thanks

You are the only person to report the missing crew issue though that does not mean that nobody else has seen it :( What you are saying makes sense and I can see the mechanism for the issue. I am also a lot happier creating re-hireable NPC's as I think that it fits into the game much better although it was a lot of work.

I was asked by BlackRain to collaborate on this functionality to go with the player shipyards, the fact that it also works with the NPC shipyards is a bonus :) If you keep re-using the same set of crew to go out and capture more ships then I suspect that you might not see the lost crew issue at all. Frankly I just don't know how many people are using it in what way, I just have a total.

I agree that the Steam notification is probably the key factor and keeping their ships going should be a priority. Its quite a responsibility changing things when you can't really tell the end users effectively. It does make it more important to test it properly first. so thanks again.

So have decided to go for notifying and replacing the NPC's if they are still on the shipyard and skipping them but notifying the user during conversion if they are on a ship (and writing the skipped ones to the log book). The logbook information include the role, ship name and where it is. I do know what NPC's were created by each shipdealer so will only convert those.

I have updated the code accordingly and put it up on dropbox

EDIT
I think that I have found and fixed the second issue that you spotted with a failed recycle due to resource constraints locking that ship out for good. The bug also affects version 1. The UI writes a $shiptrader_docking attribute to the ships pilot's blackboard, deleting that allows it to recycle later. I can't retrospectively fix any ships but i can stop any more getting locked out.
Aranov wrote:The first XL ship to be salvaged did create 6 crew instead of 3, but following ships worked normally.
I have also looked at the XL ship issue and I think that its actually OK. The conversion works by individual shipdealer and happens once for each shipdealer. So the creation that you saw was the XL shipdealer conversion of 3 crew from version 1 ( one XL ship was recycled under version 1 with 3 crew) plus the creation of 3 crew which equals 6. I have adjusted the wording a bit on the messages to be a bit clearer about conversion and recycling. Hope this makes sense.

If you try it again then I hope the messages will be clearer


Regards

jth
Last edited by jth on Fri, 13. Mar 15, 21:46, edited 1 time in total.

Post Reply

Return to “X Rebirth - Scripts and Modding”