Repack construction vessel

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

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

mihaib
Posts: 36
Joined: Sat, 5. Sep 15, 12:36

Post by mihaib » Mon, 7. Sep 15, 14:38

jth wrote:
mihaib wrote:I just tested that mod and they have the same issue :(.
I would have to disagree with that :( as my released CV's do build from scratch successfully in all my tests destroying stations, recycling stations or just detaching the CV. The build locations are also releasing properly.

The buildplan does appear to belong to the buildmodule inside the CV which makes it stick to the CV and not the architect

I managed to get the whole thing to work by doing a combination of things

The first was to to clear the CV's buildmodule before destroying the station and before attempting to detach the CV. That seemed to help a lot athough you might have to wait a bit too. Without doing that the CV was indeed unusable whatever I did to the architect. It took me a couple of days trial and error to find that out.

I was hoping that the architect would work at that point but it did not. They run their own copy of the NPC_Architect script and in there are some variables that probably need to be reset for an existing architect to start a new station. The only way that I could do that without patching the NPC_Architect script was to clone the architect.

If you blow the build module then I don't think you will be building any stations with that CV.

jth
Hi,

I'm not sure we are talking about the same problems, so just to clarify.

I can build new stations just fine with a repacked CV, it's just that I can't choose the stage / module after each build. The architect automatically starts the next stage after the current one is built.
The other problem appears when I use the repacked CV to deploy to another station. Then it just scraps built modules and starts building them again.
You don't have any of these issues?

I don't believe there are problems with the architect. I saved the game with a repacked CV, I edited the save to remove the build queue, and I loaded that save. The CV works perfectly, with no issue and I barely touched the architect. Just some basic variable cleanup that I found in the "Cancel construction" script inside the NPC_Architect.xml file.

Also, about the order of operations, I too clear the build module, do some variable cleanups and then I detach from build location, but I don't clone the architect. Build locations are released properly if I call <destroy_object> on the station (which I don't as that is not my goal, just for testing).

I also looked at your script related to releasing the CV and I saw little difference when it comes to the order of operations or what operations we perform on the CV.

It would be great if you don't have these problems, because that would mean there is a solution. When I have the proper setup I will test again your mod and recheck these issues.

Xenon_Slayer
EGOSOFT
EGOSOFT
Posts: 11402
Joined: Sat, 9. Nov 02, 12:45
x4

Post by Xenon_Slayer » Mon, 7. Sep 15, 15:41

UniTrader wrote:hmm, what about this:

Code: Select all

<destroy_object object="$actor.container.buildmodule" explosion="false"/>
<patch_object object="$actor.container"/>
:( oh god why! Yes, I guess that may have worked if you updated the architect.

Anyway, we've found why the build plan wasn't cleared with that action and it should be fixed in an upcoming build.

mihaib
Posts: 36
Joined: Sat, 5. Sep 15, 12:36

Post by mihaib » Mon, 7. Sep 15, 15:53

Xenon_Slayer wrote:
UniTrader wrote:hmm, what about this:

Code: Select all

<destroy_object object="$actor.container.buildmodule" explosion="false"/>
<patch_object object="$actor.container"/>
:( oh god why! Yes, I guess that may have worked if you updated the architect.

Anyway, we've found why the build plan wasn't cleared with that action and it should be fixed in an upcoming build.
Yes!!! :D Thanks a lot for looking at this :D. I will hold on with the mod for now and do the cleanup manually inside the save file until you release the fix.

jth
Posts: 296
Joined: Wed, 4. Jan 06, 00:31
x3

Post by jth » Mon, 7. Sep 15, 21:01

mihaib wrote:
jth wrote:
mihaib wrote:I just tested that mod and they have the same issue :(.
I would have to disagree with that :( as my released CV's do build from scratch successfully in all my tests destroying stations, recycling stations or just detaching the CV. The build locations are also releasing properly.

The buildplan does appear to belong to the buildmodule inside the CV which makes it stick to the CV and not the architect

I managed to get the whole thing to work by doing a combination of things

The first was to to clear the CV's buildmodule before destroying the station and before attempting to detach the CV. That seemed to help a lot athough you might have to wait a bit too. Without doing that the CV was indeed unusable whatever I did to the architect. It took me a couple of days trial and error to find that out.

I was hoping that the architect would work at that point but it did not. They run their own copy of the NPC_Architect script and in there are some variables that probably need to be reset for an existing architect to start a new station. The only way that I could do that without patching the NPC_Architect script was to clone the architect.

If you blow the build module then I don't think you will be building any stations with that CV.

jth
Hi,

I'm not sure we are talking about the same problems, so just to clarify.

I can build new stations just fine with a repacked CV, it's just that I can't choose the stage / module after each build. The architect automatically starts the next stage after the current one is built.
The other problem appears when I use the repacked CV to deploy to another station. Then it just scraps built modules and starts building them again.
You don't have any of these issues?

I don't believe there are problems with the architect. I saved the game with a repacked CV, I edited the save to remove the build queue, and I loaded that save. The CV works perfectly, with no issue and I barely touched the architect. Just some basic variable cleanup that I found in the "Cancel construction" script inside the NPC_Architect.xml file.

Also, about the order of operations, I too clear the build module, do some variable cleanups and then I detach from build location, but I don't clone the architect. Build locations are released properly if I call <destroy_object> on the station (which I don't as that is not my goal, just for testing).

I also looked at your script related to releasing the CV and I saw little difference when it comes to the order of operations or what operations we perform on the CV.

It would be great if you don't have these problems, because that would mean there is a solution. When I have the proper setup I will test again your mod and recheck these issues.
I think that you might need more than the cancel Construction as that gives up before a single stage is completed which is a rather simpler state than a half built sttaion.

I think that we do indeed have or had different issues due to the different approaches

What I had during development was

Without cloning the Architect I couldn't build a new station on the same spot. It remembered what the state of the previous station was and refused to start from scratch. I didn't clear the various variables as I can't as I am not patching the NPC_Architect script.

Plus I also had it refuse to list the available stations until I cloned the Architect

Both went away when I cleared the build module of the CV and cloned the Architect although I think that the buildmodule caused me the bigger problem.

I thought that I ought to do a little test and detach the CV's from two stations in the same zone and then attach them to the opposite station. The stations are of different types and stages.

In both cases the CV correctly identified the build stage of the station that it was now attached to and did nothing. I could then pick the next build action. Then I told them to add some storage. The first did it correctly the second went off and built a different stage to what I told it to :(

The iffy build station is very old and dates back to at least version 2

I ought to try recycling the second station first and then rebuilding it under v3.6 and then detach and upgrade, may have a go tomorrow

Good fun this building lark :)

jth

mihaib
Posts: 36
Joined: Sat, 5. Sep 15, 12:36

Post by mihaib » Tue, 8. Sep 15, 14:43

I'm also having some other trouble with the build stages when using a repacked CV. At some point I had a "Cell Fab Matrix" factory built with a clean CV, than I detached that CV and used it to build another "Cell Fab Matrix" in another zone. It worked on auto like described, but it also did something strange at the end.

The factory was almost completed and after building a defense module the CV started rebuilding the stage 1 of the storage module while the stage 2 of that module was already built and standing.

We have these issues related to the build module and its build queue, but it seems we are in luck and the devs are going to fix the <clear_buildmodule> command. Until then I guess you could try to implement some workarounds, like the one suggested by UniTrader to destroy the build module, patch the CV and reassign the architect.

I will wait for the fix though and publish the mod after if I think it's still needed :).

Thanks to everyone for the help on this.

mihaib
Posts: 36
Joined: Sat, 5. Sep 15, 12:36

Post by mihaib » Sat, 3. Oct 15, 18:25

Xenon_Slayer wrote:
UniTrader wrote:hmm, what about this:

Code: Select all

<destroy_object object="$actor.container.buildmodule" explosion="false"/>
<patch_object object="$actor.container"/>
:( oh god why! Yes, I guess that may have worked if you updated the architect.

Anyway, we've found why the build plan wasn't cleared with that action and it should be fixed in an upcoming build.
I've been doing tests on version 3.61 and the build module is cleared properly now.
All station construction projects advance without issues with a repacked CV.

One problem still exists though, and that is if I use a repacked CV to deploy to a fully built station.
In this case the CV starts rebuilding the first station module. This doesn't happen if I deploy to an incomplete station.

I tried replacing the architect and it doesn't help. Deploying a new CV doesn't trigger the bug.
I suspect the <clear_buildmodule> command is not sufficient, or it doesn't clear everything properly.

Any ideas on what I could do on the build module to make it work?

jth
Posts: 296
Joined: Wed, 4. Jan 06, 00:31
x3

Post by jth » Sun, 4. Oct 15, 12:39

mihaib wrote: I've been doing tests on version 3.61 and the build module is cleared properly now.
All station construction projects advance without issues with a repacked CV.

One problem still exists though, and that is if I use a repacked CV to deploy to a fully built station.
In this case the CV starts rebuilding the first station module. This doesn't happen if I deploy to an incomplete station.

I tried replacing the architect and it doesn't help. Deploying a new CV doesn't trigger the bug.
I suspect the <clear_buildmodule> command is not sufficient, or it doesn't clear everything properly.

Any ideas on what I could do on the build module to make it work?
Its good to know that 3.61 helps.

I tend to agree with you that there is still something stuck inside the repackaged CV

At the risk of being accused of teaching grandma to suck eggs :)

Going back to basics. If you compare the save game entries for a new CV and a repackaged one is there anything different around the buildmodule ?

If there is still something stuck in the repackaged CV save game XML then at least you know what you need to change/remove which is half the battle and it might yield to a bit of lateral thinking. If it doesn't yield to lateral thinking then at least its something concrete to point Egosoft at. Finding something in the save game XML would also 100% confirm that it is the CV that is causing the problem and completely exonerate the Architect.

Unfortunately I don't own any completed stations to test against :( If you are prepared to let me have a copy of your save game or just the bits for the complete station plus CV (while its still attached to its station) then I will see if my approach has the same problem. Public or private messages are fine.

jth

mihaib
Posts: 36
Joined: Sat, 5. Sep 15, 12:36

Post by mihaib » Sun, 4. Oct 15, 15:59

I haven't compared a new CV with a repacked CV in the save game file, but the buildmodule on the repacked CV looks very clean. I doubt I'll see any difference but I'll take a look.
I have a quicksave file in DeVries / Barren Heart / Unmet Promise. You will see a station there, it is fully built and one CV is attached to it. Detach it and deploy it back to do the tests.

I have quite a few mods running in this save, but all of them are savegame compatible so the save should work.
Here is the link. Just make sure you right click and select "Save target as". If not it will open it in the browser :D
https://dl.dropboxusercontent.com/u/338 ... cksave.xml

Anyone else who wants to take a look at the file, feel free to get it :D

jth
Posts: 296
Joined: Wed, 4. Jan 06, 00:31
x3

Post by jth » Mon, 5. Oct 15, 13:46

mihaib wrote:I haven't compared a new CV with a repacked CV in the save game file, but the buildmodule on the repacked CV looks very clean. I doubt I'll see any difference but I'll take a look.
I have a quicksave file in DeVries / Barren Heart / Unmet Promise. You will see a station there, it is fully built and one CV is attached to it. Detach it and deploy it back to do the tests.
Buildmodule inside CV does look fine to me too, so clear_buildmodule does seem to be doing its job properly

I get exactly the same behaviour as you using my approach. It rebuilds one stage and then seems to be happy.

Not sure which stage its rebuilding as it wants Energy 779 plate 386, Fusion 84, HIT/MA 22, plasma/ma 5 and Shield 5. I would guess its the final stage that it built for that station.

I will complete one of my stations and double check that it does the same to that

At which point it might be worth a few debug_text lines in the NPC_Architect script to see why its trying to finish building that stage again

jth

jth
Posts: 296
Joined: Wed, 4. Jan 06, 00:31
x3

Post by jth » Mon, 5. Oct 15, 15:45

jth wrote:
mihaib wrote:I haven't compared a new CV with a repacked CV in the save game file, but the buildmodule on the repacked CV looks very clean. I doubt I'll see any difference but I'll take a look.
I have a quicksave file in DeVries / Barren Heart / Unmet Promise. You will see a station there, it is fully built and one CV is attached to it. Detach it and deploy it back to do the tests.
Buildmodule inside CV does look fine to me too, so clear_buildmodule does seem to be doing its job properly

I get exactly the same behaviour as you using my approach. It rebuilds one stage and then seems to be happy.

Not sure which stage its rebuilding as it wants Energy 779 plate 386, Fusion 84, HIT/MA 22, plasma/ma 5 and Shield 5. I would guess its the final stage that it built for that station.

I will complete one of my stations and double check that it does the same to that

At which point it might be worth a few debug_text lines in the NPC_Architect script to see why its trying to finish building that stage again

jth
Running 3.61

Just spent a couple of hours adding Storage 2, radar and four lots of Targon Tracer + fully Upgrading to my Foodstuffs Supply

Then Released and reattached the CV and it didn't try and rebuild anything

I wonder whether its a duff station issue :(

I have been thinking about writing a Structural Rebuild mod that completely rebuilds your station from scratch on the same spot using the instant build call rather than the interactive one. Cloning crew and storage. That would get rid of any bad construction stages. Its far from a 5 minute job though :(

Any chance of you trying a few more fully built stations to see if any of those work ?

jth

mihaib
Posts: 36
Joined: Sat, 5. Sep 15, 12:36

Post by mihaib » Mon, 5. Oct 15, 20:10

Thanks for the tests. I see your second tests as good news. I'm hopping it's just a localized problem that I have.
I will test some more stations and see what happens.

mihaib
Posts: 36
Joined: Sat, 5. Sep 15, 12:36

Post by mihaib » Mon, 5. Oct 15, 23:19

I just tested more stations with different repacked CVs. They behave the same, always rebuilding the first station module (stage 1 of whatever is first).
They insist in this behavior even if I let them, they finish and I repeat (repack / deploy).

Unfortunately I have only a few hours each evening to work / test / play, so it's going to take a while.
Tomorrow I will continue testing with a new CV and see if this one gets broken also.

jth
Posts: 296
Joined: Wed, 4. Jan 06, 00:31
x3

Post by jth » Tue, 6. Oct 15, 16:30

mihaib wrote:I just tested more stations with different repacked CVs. They behave the same, always rebuilding the first station module (stage 1 of whatever is first).
They insist in this behavior even if I let them, they finish and I repeat (repack / deploy).

Unfortunately I have only a few hours each evening to work / test / play, so it's going to take a while.
Tomorrow I will continue testing with a new CV and see if this one gets broken also.
I have completed another two stations to 100% and neither shows the problem. I will send you a private message with a link to my save file

Can you please let me know what happens when you use my save game and repack / deploy on the Cell Fab Matrix I in Fervid Corona or the Solar Energy Farm III in Radiation Belt or the Foodstuffs Supply I in Gushing Springs

jth

mihaib
Posts: 36
Joined: Sat, 5. Sep 15, 12:36

Post by mihaib » Tue, 6. Oct 15, 21:22

jth wrote:Can you please let me know what happens when you use my save game and repack / deploy on the Cell Fab Matrix I in Fervid Corona or the Solar Energy Farm III in Radiation Belt or the Foodstuffs Supply I in Gushing Springs

jth
I tested on your save file. Everything works perfect. I repacked and deployed two of the CVs (Cell Fab Matrix I and Solar Energy Farm III) multiple times and there was no issue.

I also did some more tests on my save. I used a new CV and deployed on a Foodstuffs station and it had the same issues.
It looks like the station has problems and not the CV. Same problem with a Cell Fab Matrix. I also tried on a Solar Energy Farm and this one was ok.

My conclusion is that some of my stations are just messed up, and my CVs keep building them like that. Or it is just something with my save.
In any case, I consider this issue solved and I blame these problems on me messing around with the mod and the saves.

Thanks for the time and everything :D

jth
Posts: 296
Joined: Wed, 4. Jan 06, 00:31
x3

Post by jth » Wed, 7. Oct 15, 12:34

mihaib wrote: My conclusion is that some of my stations are just messed up, and my CVs keep building them like that. Or it is just something with my save.
In any case, I consider this issue solved and I blame these problems on me messing around with the mod and the saves.

Thanks for the time and everything :D
Glad to be able to help

Avoiding save game editing and dodgy stations is what got me started on modding :)

To be fair to Egosoft they have put a lot of effort into fixing the station builds. Its just that lots of players have save games with stations from very early versions of the game and have a lot of time invested in their empires.

jth

Post Reply

Return to “X Rebirth - Scripts and Modding”