Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models file corrupted after using "delete selected" button #198

Open
ghramsey opened this issue Jun 4, 2023 · 5 comments
Open

Models file corrupted after using "delete selected" button #198

ghramsey opened this issue Jun 4, 2023 · 5 comments
Labels
bug Something which causes issues when using the tools. [TOOL] Asset Editor This issue applies to the asset editor within OpenCAGE.

Comments

@ghramsey
Copy link
Sponsor

ghramsey commented Jun 4, 2023

I am trying to reproduce the TinyButton object in the CorporatePenthouse map.
I want to add an emergency override button but the button object seems to not be in the file by default.
I've reproduced the composite including all the many linkes and went onto the models.
Last night in #197 I asked about how to export / import properly. I seem to have figured out how to do it,
but I'm not sure if it's me or if the program is not working as intended. First I could not export in what
appears to be the default fbx format. Upon trying to import it throws an error about mesh linking not found.
I posted a screenshot on #197 I used the obj format which worked across the board. I had to export each
component object of the TinyButton model manually though. Is that working as intended? It seemed to
work OK, but was tedious.

I imported each component and set the texture colors manually as well. All seemed OK.
I closed everything down and opened the commands editor to add the model to the
references in the tinybutton composite. And this is where things have turned; the entire list of
models in the file is now missing. I thought it was just happening when I used the commands editor
to find the models. Reopening the model file in the asset editor and the entire file is just gone.
There's a lone hierarchy rooted on global and that is all. Everything else seems to have been
removed including the edits I made.

image

I'm sure I've done this entire task the hardest way but I seem to have created or triggered a bug.
I zipped up the files that the asset and commands editors changed and posted them here:
https://u.pcloud.link/publink/show?code=XZardEVZNiKFQveJbXkAvlbfsQ2g8J6cbRm7

@ghramsey ghramsey changed the title Models file corrupted after editing Models file corrupted after using "deleted selected" button Jun 5, 2023
@ghramsey ghramsey changed the title Models file corrupted after using "deleted selected" button Models file corrupted after using "delete selected" button Jun 5, 2023
@ghramsey
Copy link
Sponsor Author

ghramsey commented Jun 5, 2023

*Update! *

I tracked the corruption using the "delete selected" button on either the tinyobject entity I added so I
could start over or any of the subcomponents. Soon as I used that it corrupts the file.

I shall try to make the file work again w/o using that option and see if I can make a working model.

@MattFiler MattFiler added bug Something which causes issues when using the tools. [TOOL] Asset Editor This issue applies to the asset editor within OpenCAGE. labels Jun 5, 2023
@MattFiler
Copy link
Owner

Thanks for spotting! Glad you have figured a workaround for now.

I'm away on holiday this week but will get on to a fix as soon as I'm back :)

@MattFiler
Copy link
Owner

Is this using the staging branch btw, or main?

@ghramsey
Copy link
Sponsor Author

ghramsey commented Jun 5, 2023

This is on Staging branch.

After my revelation about deleting earlier I managed to add the reference to the commands editor, but the extra node layers you mentioned created some duplication of the material items. And in the case of the last one the material referenced in the tech_hub model EMI_Panel_Sqr_Dmd->EMI_Panel_Sqr_Dmd was not available to select in the hab_corporatepent file
Consequently I chose a model that looked close, but was not the same. I don't think I had it right anyway, but
I tried it out crossing fingers. Here's a compare of the two files. The first one is from tech_hub which I used for reference and the 2nd one from the hab_corporatepent. Is there a way to import this missing item ?

image

image

To work around I tried chosing the one that said had sqr in the title and resembled the default material..

Added a tinybutton object in a position that would have it floating.. I just wanted to test whether it was added successfully.
It failed to even load the level instead crashing to desktop over and over. I ended up using vanilla game files for all of the hab_corporatepent subfolder. I overwrote everything to the default settings.

Mysteriously, I still had crashes to desktop upon trying to load the mission 17 save file. This happened even though it's
an old file from May 5th. I thought it was just a corrupted save file and played through M16 to make it generate a new M17 save. That did not work. It crashed soon as I got past the fade out in the elevator. I ended up using the debug menu and that did not crash. I saved and then tried the Mission 17 file which was successful that time. I'm still at a loss for the why only
that it's obviously related to the issue at hand.

So perhaps a note of warning that messing with models might need to make backups of files and save files.

With this in mind I might soldier ahead and try experimenting more.
I might hit on the right method and brute force it to work.

Enjoy your vacation. Hope you're having fun. :)

@ghramsey
Copy link
Sponsor Author

ghramsey commented Jun 5, 2023

For reference to the underlying want of having the TinyButton object composite in hab_corporatepent map I want
to report that even without the physical model in the game the rest of the function works including using it to lock a door.

I found this out by accident by walking through where I'd evidently place it for testing before it kept crashing.
I was able to press the button and I heard the sound and no crash or odd behavior.

I moved it and linked it to the door I originally intended and low and behold it works.
It works albeit only the prompt in green text is present to locate it, but this is enough for now.

All that is needed now is making the model appear. But I'm happy to just have the button prompt and function at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something which causes issues when using the tools. [TOOL] Asset Editor This issue applies to the asset editor within OpenCAGE.
Projects
None yet
Development

No branches or pull requests

2 participants