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

Support offset field in PART:INTERNAL #35

Open
GlebKerman opened this issue Feb 7, 2025 · 32 comments
Open

Support offset field in PART:INTERNAL #35

GlebKerman opened this issue Feb 7, 2025 · 32 comments

Comments

@GlebKerman
Copy link

Hi, sorry to be back here so soon but I've encountered another peculiar bug, if I switch IVAs in the shuttle orbiter (my own custom reviva config used for this mod), the IVA position moves from its original position to inside the payload bay. If I switch back to the default IVA (the IVA selected in the VAB) and return to the tracking station then return back the the craft, it returns to its original position. But this does not work for a non-default IVA (one selected mid-flight) KSP Log will be attached

Image
This is the default IVA

Image
IVA position after switching.

KSP_Log_2.zip

@JonnyOThan
Copy link
Collaborator

If you're using a custom reviva config, could you please include it here?

@JonnyOThan
Copy link
Collaborator

You aren't on the latest FreeIva version, and it's spewing some errors. Could you try updating it and see if this bug still occurs?

@GlebKerman
Copy link
Author

Will do both of those things and update you

@GlebKerman
Copy link
Author

SPACE_SHUTTLE_SYSTEM_setup.zip
This is the config in the setup folder

SPACE_SHUTTLE_SYSTEM_Patches.zip
This is the config in the patches folder

@GlebKerman
Copy link
Author

Hi, updating FreeIVA had no effect on the IVA position, for whatever reason it also broke the right-click menu for parts in the VAB.

Image
IVA position

Image
Broken right-click menu

@GlebKerman
Copy link
Author

KSP_Log_3.zip
here is the log with updated freeIVA

@JonnyOThan
Copy link
Collaborator

KSP_Log_3.zip here is the log with updated freeIVA

You’ve got some exceptions being thrown from RP0. Could you try to reproduce this problem in a minimal install?

@GlebKerman
Copy link
Author

Will do, will let you know when I'm able to play again.

@GlebKerman
Copy link
Author

KSP_Log_3.zip here is the log with updated freeIVA

You’ve got some exceptions being thrown from RP0. Could you try to reproduce this problem in a minimal install?

Hi, I've set up an install consisting of RSS-RO without RP-1, Reviva and its dependencies along with Space Shuttle System and its dependencies (RO is a dependency of Space Shuttle System) and it the IVA still changes position.

Image
IVA position after selecting a non-default option.

RevivaTesting Log.zip
Here is the log for this install

Sorry for the slow response, I haven't had the time to test over the past few days

@JonnyOThan
Copy link
Collaborator

@GlebKerman Where did you install SPACE_SHUTTLE_SYSTEM from? The one on CKAN is fairly old, and it doesn't seem to contain the internals that you're referencing in your custom reviva config.

@GlebKerman
Copy link
Author

GlebKerman commented Feb 10, 2025

@GlebKerman Where did you install SPACE_SHUTTLE_SYSTEM from? The one on CKAN is fairly old, and it doesn't seem to contain the internals that you're referencing in your custom reviva config.

It's Giulio Dondi's fork of the mod, as for the IVA the mod itself comes with two, that being the Analogue and MEDS (modern), all I did was create versions of the Analogue and MEDS that has crew helmets enabled.

Edit: link to mod
https://github.com/giuliodondi/Space-Shuttle-System-realistic-aerodynamics

@GlebKerman
Copy link
Author

If you want I can send the IVA configs referenced in the Reviva configs

@JonnyOThan
Copy link
Collaborator

If they're necessary to reproduce the bug, please.

@GlebKerman
Copy link
Author

internal.zip
MEDS (no helmet)

internalHelmet.zip
MEDS (with helmets)

internalOld.zip
Analogue (no helmets)

internalOldHelmet.zip
Analogue (with helmets)

@GlebKerman
Copy link
Author

I use the IVA model from an older version of the mod that contained the mid-deck, in case this helps I will send the folder that contains the .mu file and the textures for the IVA model

space_shuttle_system_cockpit.zip

@JonnyOThan
Copy link
Collaborator

I haven't gotten fully set up to reproduce the bug yet but I did notice that there is an offset in the INTERNAL node in the part. I'd bet that's probably confusing reviva. It's pretty unusual for mods to use that.

@GlebKerman
Copy link
Author

I haven't gotten fully set up to reproduce the bug yet but I did notice that there is an offset in the INTERNAL node in the part. I'd bet that's probably confusing reviva. It's pretty unusual for mods to use that.

Oh interesting, is that the "position = 0.25, -1.13, 1.565" line?

@GlebKerman
Copy link
Author

GlebKerman commented Feb 10, 2025

Oh I see, I'll see if setting the offset to 0 has any effect on the bug

@GlebKerman
Copy link
Author

No, here: https://github.com/giuliodondi/Space-Shuttle-System-realistic-aerodynamics/blob/55c53eebc529c83a18a5e9253537a73731d2f026/GameData/SPACE_SHUTTLE_SYSTEM/Parts/Shuttle/ShuttleOrbiter.cfg#L100

Hi, yeah I think you are right about the offset confusing Reviva. Setting the offset to 0 sets the default position of the IVA to within the payload bay, I'm assuming Reviva wasn't intended to have to deal with INTERNAL offsets being used.

Image
Default IVA position with 0 INTERNAL offset

@GlebKerman
Copy link
Author

GlebKerman commented Feb 11, 2025

Is there a way for Reviva to work with INTERNAL offsets? Or is this something that can only be patched on the Space Shuttle System end?

Or perhaps could I add an offset to each individual IVA config used?

@JonnyOThan
Copy link
Collaborator

If you’re able to reexport the model, it’s probably best to just set it all up without an offset. But it’s probably reasonable for reviva to support this.

@GlebKerman
Copy link
Author

If you’re able to reexport the model, it’s probably best to just set it all up without an offset.

I'll see if I can find my way around doing this, will update you on the results

@GlebKerman
Copy link
Author

GlebKerman commented Feb 11, 2025

If you’re able to reexport the model, it’s probably best to just set it all up without an offset. But it’s probably reasonable for reviva to support this.

Big issue here is I've never used blender before, and the ShuttleOrbiter part is made up of several different models. I have the blender .mu blender addon but its throwing an error whenever I try to import the ShuttleCabin.mu file. Is there perhaps a ModuleManager patch I can write so that Reviva implements the INTERNAL offset after switchting IVAs?

By "ShuttleOrbiter part is made of several different models" I mean that there is no individual ShuttleOrbiter.mu file, instead it is made up of several different .mu files e.g. ShuttleCabin.mu and ShuttleCargo.mu (crew cabin and payload bay). Sorry if I explained this poorly initially. I don't know how or what, in this case, to go about editing. Let alone my inexperience with blender.

@JonnyOThan
Copy link
Collaborator

You can add a position field to the MODEL node to import the model at a different position. It then you’d also need to offset all the props.

@GlebKerman
Copy link
Author

You can add a position field to the MODEL node to import the model at a different position. It then you’d also need to offset all the props.

Ok I'll give that a go. Do you know the way in which the offset effects default position, for example does the offset of -0.005 change the default position of 0.25 by multiplying it by -0.005? If I can get the position that the offset results in with just the base MODEL position alone

@GlebKerman
Copy link
Author

Image
I'm assuming you're talking about the position field showed here, in the IVA config, please correct me if I have misunderstood which MODEL node you are referencing.

@JonnyOThan
Copy link
Collaborator

JonnyOThan commented Feb 11, 2025

Yeah I think you’d have to add the offset field to the existing position one. I mean, add the vectors together.

@GlebKerman
Copy link
Author

Yeah I think you’d have to add the offset field to the existing position one. I mean, add the vectors together.

Ah ok great. This applies to the props as well right?

@GlebKerman
Copy link
Author

Hi @JonnyOThan , edited the positions accordingly for both the model and all of the props and it is working exactly as intended now! Thank you so much for your help! I will keep this issue in mind incase I encounter any more mods that use internal offsets

@GlebKerman
Copy link
Author

https://github.com/user-attachments/assets/f7cac7bf-66c5-4257-b688-10831e83b8b2
Here's a quick video showing it finally working

@JonnyOThan
Copy link
Collaborator

Thanks for confirming. I think this is still something that reviva should probably support - though if no one needs it right now it may be lower priority.

@JonnyOThan JonnyOThan reopened this Feb 12, 2025
@JonnyOThan JonnyOThan changed the title IVA changing position within part (RSS RO) Support offset field in PART:INTERNAL Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants