Jump to content

[1.0.x] Habitat Pack v0.41


Porkjet

Recommended Posts

I understand that I was experimenting to try and figure out how to fix the animation but it appears to be something funky in unity ? Or the model animation? That's what I was trying to work out.

It's a Unity issue and from what I gather, there is a correct way to play multiple animations so that one does NOT cancel the other.

It's referred to as animation blending and it requires some special handling in the code that handles animations. (just a one line piece of code added or changed)

However, it may also require something special in the model with regards to the transforms, I'm not 100% sure of that.

Maybe one of these days I'll download Stupid_Chris's animator source and see if I can hack blending into it. (since I can't readily modify Squad's)

Link to comment
Share on other sites

Well I am just not having any luck getting the cetrifuge to work under .24.2. I have added the CLS config file that LitaAlto posted and it still doesn't show it usable. Animations work fine just can't put Kerbals into it.

And you've opened all the hatches between it and your Kerbals? Because that's usually what you have to do in order for a CLS-enabled part to show as passable or occupiable.

Could you make the IVA's walkable?

IVAs weren't designed around emulating Kerbal behavior outside a ship. I suspect it'd require something far beyond what the IVA framework can handle.

Edited by LitaAlto
Link to comment
Share on other sites

And you've opened all the hatches between it and your Kerbals? Because that's usually what you have to do in order for a CLS-enabled part to show as passable or occupiable.

I don't believe his problem is CLS or hatches. As I indicated earlier, I believe his problem is that the centrifuge doesn't allow Kerbals in it until it is inflated. However, if you also set the centrifuge to spinning then it can interfere with the rotation animation. (and vice versa)

I posted a workaround fix for that on the previous page.

might try this to see the list of animations on the centrifuge https://github.com/Mihara/PartUtilities/wiki/JSIListAllAnimations

then use FSAnimateGeneric modules to call them.

You can't use the same animation module on all animations on the centrifuge. If you do, each time you play an animation it will interfere with the previous animation that was playing. (Edit: I'd previously said it cancelled it which is wrong, but the plugin that reads the animation incorrectly thinks that the animation state for inflation is that it is no longer inflated. Now that I think about it, I've had this problem with firespitter animations before in Deadly Reentry and had to write up a workaround for it then...)

Edit #2: I changed the previous config as it had some conflicts. This allows both animations to play while still allowing the habitat plugin to work properly. However, regarding replacing both animation modules with FSanimateGeneric: I've played around with it a lot and am still unable to replace both animation modules with the FS version while retaining habitat plugin functionality.


@PART[centrifuge1]
{
@MODULE[ModuleAnimateGeneric],1
{
@name = FSanimateGeneric
layer = 2
}
}

Edited by Starwaster
Edit #2: Updated previous posted config
Link to comment
Share on other sites

No you don't change both. Just one. That's why I posted that config for you. Copy and paste that into a new empty config file in gamedata.
I don't believe his problem is CLS or hatches. As I indicated earlier, I believe his problem is that the centrifuge doesn't allow Kerbals in it until it is inflated. However, if you also set the centrifuge to spinning then it can interfere with the rotation animation. (and vice versa)

I posted a workaround fix for that on the previous page.

You can't use the same animation module on all animations on the centrifuge. If you do, each time you play an animation it will interfere with the previous animation that was playing. (Edit: I'd previously said it cancelled it which is wrong, but the plugin that reads the animation incorrectly thinks that the animation state for inflation is that it is no longer inflated. Now that I think about it, I've had this problem with firespitter animations before in Deadly Reentry and had to write up a workaround for it then...)

Edit #2: I changed the previous config as it had some conflicts. This allows both animations to play while still allowing the habitat plugin to work properly. However, regarding replacing both animation modules with FSanimateGeneric: I've played around with it a lot and am still unable to replace both animation modules with the FS version while retaining habitat plugin functionality.


@PART[centrifuge1]
{
@MODULE[ModuleAnimateGeneric],1
{
@name = FSanimateGeneric
layer = 2
}
}

Yep. My conclusion as well however the plugin code may be alterable as it checks the state of moduleanimate generic in the class. I was playing with the code on the weekend I think there must be a way to change the plugin code to work correctly but I have limited time to play around with it. Maybe this weekend I will get some more time.

Link to comment
Share on other sites

I don't believe his problem is CLS or hatches. As I indicated earlier, I believe his problem is that the centrifuge doesn't allow Kerbals in it until it is inflated. However, if you also set the centrifuge to spinning then it can interfere with the rotation animation. (and vice versa)

I posted a workaround fix for that on the previous page.

OK, sorry I missed that.

Link to comment
Share on other sites

Yep. My conclusion as well however the plugin code may be alterable as it checks the state of moduleanimate generic in the class. I was playing with the code on the weekend I think there must be a way to change the plugin code to work correctly but I have limited time to play around with it. Maybe this weekend I will get some more time.

But to do what exactly? Replacing the rotation animation with something that's non-stock fixes the problem. The habitat plugin can then read the animation and see if it finished playing. The problem is when both animators are stock. One animation can cancel the other. It doesn't do any good to hack the habitat plugin to use alternate methods of checking state when the habitat looks inflated.

Or is the goal about switching both modules to the firespitter version?

(Edit: And I see above in my quoted text that I mention the centrifuge spinning interfering with rotation animation.... ugh. I meant inflation.... derrr)

Link to comment
Share on other sites

No you don't change both. Just one. That's why I posted that config for you. Copy and paste that into a new empty config file in gamedata.
But to do what exactly? Replacing the rotation animation with something that's non-stock fixes the problem. The habitat plugin can then read the animation and see if it finished playing. The problem is when both animators are stock. One animation can cancel the other. It doesn't do any good to hack the habitat plugin to use alternate methods of checking state when the habitat looks inflated.

Or is the goal about switching both modules to the firespitter version?

(Edit: And I see above in my quoted text that I mention the centrifuge spinning interfering with rotation animation.... ugh. I meant inflation.... derrr)

Ok so my original goal was when I used your MM config it indeed worked but the spin animation was always running. Which led me to playing with the plugin code thinking perhaps switching both to fsanimation would resolve that. But as you said a few replies back it is in fact an issue with unity animations. So I guess my goal now is to understand that issue and a way around it. Switching both to fsanimation I thought would be a step in that direction.

Link to comment
Share on other sites

Ok so my original goal was when I used your MM config it indeed worked but the spin animation was always running. Which led me to playing with the plugin code thinking perhaps switching both to fsanimation would resolve that. But as you said a few replies back it is in fact an issue with unity animations. So I guess my goal now is to understand that issue and a way around it. Switching both to fsanimation I thought would be a step in that direction.

Sorry, I keep meaning to look at the 'always on' spinning. I *think* (might be wrong) that there's an option in FireSpitter that controls what state the animation is set to. I'll go take another look at FSanimateGeneric....

Edit:

Bah, there's playAnimationOnEditorSpawn and startDeployed. I set the former to false and it STILL spins even in the editor. And the latter was already false. Why......

Ok, Firespitter also has FSanimateLoop. The spinning is a looping animation right? Maybe this one is better suited to the spinning animation.

Edited by Starwaster
Link to comment
Share on other sites

No you don't change both. Just one. That's why I posted that config for you. Copy and paste that into a new empty config file in gamedata.
Sorry, I keep meaning to look at the 'always on' spinning. I *think* (might be wrong) that there's an option in FireSpitter that controls what state the animation is set to. I'll go take another look at FSanimateGeneric....

Edit:

Bah, there's playAnimationOnEditorSpawn and startDeployed. I set the former to false and it STILL spins even in the editor. And the latter was already false. Why......

Ok, Firespitter also has FSanimateLoop. The spinning is a looping animation right? Maybe this one is better suited to the spinning animation.

Hmm yep I also played with all the fsanimategeneric settings and it didn't work. Hence my original ask around is that likely to be the firespitter module or the model animation itself causing the constant spinning. I'll play with fsanimateloop and look into the fs code to see what I come up with.

Link to comment
Share on other sites

Hmm yep I also played with all the fsanimategeneric settings and it didn't work. Hence my original ask around is that likely to be the firespitter module or the model animation itself causing the constant spinning. I'll play with fsanimateloop and look into the fs code to see what I come up with.

Save yourself some aggravation. I've been playing with it and it's been an exercise in futility. The looping version keeps causing the inflation animation to play over...and over... and OVER again. I checked and made sure they each had their own unique layer #. And that the looping one was assigned to the rotation animation and FSanimateGeneric assigned to the inflation one. I think bottom line is that the Firespitter animators are just not suitable for this :(

BTW, Stupid Chris has an animator but for some reason, I judged it to be unsuitable as well but I don't remember WHY. I wonder if it's had any work done on it. Might be worth looking into that again.... (but not me, not tonight... fading...)

Edited by Starwaster
Link to comment
Share on other sites

No you don't change both. Just one. That's why I posted that config for you. Copy and paste that into a new empty config file in gamedata.
Save yourself some aggravation. I've been playing with it and it's been an exercise in futility. The looping version keeps causing the inflation animation to play over...and over... and OVER again. I checked and made sure they each had their own unique layer #. And that the looping one was assigned to the rotation animation and FSanimateGeneric assigned to the inflation one. I think bottom line is that the Firespitter animators are just not suitable for this :(

BTW, Stupid Chris has an animator but for some reason, I judged it to be unsuitable as well but I don't remember WHY. I wonder if it's had any work done on it. Might be worth looking into that again.... (but not me, not tonight... fading...)

Yeah this one http://forum.kerbalspaceprogram.com/threads/73283-0-23-x-AdvancedAnimator-ModuleAnimateGeneric-upgraded-v1-1-1-2-04-14

But he abandoned it because so many other good ones like firespitter lol. I tried it out. It doesn't work for continuous animation. That's probably why you ruled it out. When I get some more time I'll look at it some more.

Link to comment
Share on other sites

Yeah this one http://forum.kerbalspaceprogram.com/threads/73283-0-23-x-AdvancedAnimator-ModuleAnimateGeneric-upgraded-v1-1-1-2-04-14

But he abandoned it because so many other good ones like firespitter lol. I tried it out. It doesn't work for continuous animation. That's probably why you ruled it out. When I get some more time I'll look at it some more.

I'm sorry to say (and sorry if this steps on any toes) but I feel that Firespitter is overrated. It has its good points but there's several buggy areas that are mistaken for stock Unity issues. (which to be fair, Unity animation does have issues but so does Firespitter)

Sigh. So we're either stuck with unstoppable rotation or rotation that won't loop. Not very good prospects.

Edit: You know what might be the right way to go on this is to extend the stock animator and then implement layers in the new class. That's how Firespitter gets around the issue of animation interference.

Link to comment
Share on other sites

Forgive the double post, but:

THIS fixes the animation issues and fixes any issues with boarding the habitat that were linked to the animations. (starting rotation doesn't deflate the centrifuge. Inflating the centrifuge does not stop rotation. You should be able to enter the habitat as long as it is inflated)

https://github.com/Starwaster/LayeredAnimations/releases/tag/v1.0

Download and unzip the contents of the zip file into your GameData folder

Download this config file and put it somewhere in your GameData folder (if you have a dedicated tweaks folder then put it there. Delete it if Porkjet ever officially adopts this plugin and incorporates it into his centrifuge)

https://github.com/Starwaster/LayeredAnimations/blob/master/Configs/centrifuge1_tweak.cfg

Source is in the Github site.

License is Public Domain.

Link to comment
Share on other sites

For some reason having the centrifuge anywhere in my spacecraft is making me unable to stage. I get no staging interface and spacebar does nothing. If I toggle physics warp on and off again, I get the interface and I can throttle up, but the staging button still does nothing. I've tried controlling from different parts, placing the centrifuge in different places, nothing seems to make a difference. Removing the centrifuge makes everything work as normal.

Tried using the tweak .cfg file that was posted earlier in the thread and Starwaster's animation fix above, neither seems to have an effect on this problem. Not sure if the other hab modules would cause the same problem for me, I don't have them installed. I just wanted to use the centrifuge.

Anybody else had this issue/know how to fix it?

Link to comment
Share on other sites

For some reason having the centrifuge anywhere in my spacecraft is making me unable to stage. I get no staging interface and spacebar does nothing. If I toggle physics warp on and off again, I get the interface and I can throttle up, but the staging button still does nothing. I've tried controlling from different parts, placing the centrifuge in different places, nothing seems to make a difference. Removing the centrifuge makes everything work as normal.

Tried using the tweak .cfg file that was posted earlier in the thread and Starwaster's animation fix above, neither seems to have an effect on this problem. Not sure if the other hab modules would cause the same problem for me, I don't have them installed. I just wanted to use the centrifuge.

Anybody else had this issue/know how to fix it?

I would not expect anything I've posted to help you with your problem. That makes no sense.

Is is your staging light red? If so press alt+L until it turns green. Try posting a log (output_log.txt or player.log if mac/Linux). I likely wouldn't be able to look at it myself due to internet trouble.

Link to comment
Share on other sites

Forgive the double post, but:

THIS fixes the animation issues and fixes any issues with boarding the habitat that were linked to the animations. (starting rotation doesn't deflate the centrifuge. Inflating the centrifuge does not stop rotation. You should be able to enter the habitat as long as it is inflated)

https://github.com/Starwaster/LayeredAnimations/releases/tag/v1.0

Download and unzip the contents of the zip file into your GameData folder

Download this config file and put it somewhere in your GameData folder (if you have a dedicated tweaks folder then put it there. Delete it if Porkjet ever officially adopts this plugin and incorporates it into his centrifuge)

https://github.com/Starwaster/LayeredAnimations/blob/master/Configs/centrifuge1_tweak.cfg

Source is in the Github site.

License is Public Domain.

I finally got around to trying this briefly. Yes it works thanks for doing what would have taken me ages due to lack of time. But I noticed after you inflate and start the spin the stop spin action disappears and doesn't come back only the inflate/deflate remains. If I ever get more time I'll try to figure that out.

Link to comment
Share on other sites

I finally got around to trying this briefly. Yes it works thanks for doing what would have taken me ages due to lack of time. But I noticed after you inflate and start the spin the stop spin action disappears and doesn't come back only the inflate/deflate remains. If I ever get more time I'll try to figure that out.

It might or might not have been because I was accidentally patching the same animator MODULE. (MODULE,0 for both)

I just tested it under KSP 0.25 and it works fine. (except it's a spin reversal, there is no stopping the spin, apparently...?)

(the config I linked to is corrected btw, download it again and re-test)

Link to comment
Share on other sites

PorkJet, I know this goes against how this mod is about inflatable habitats but can you please retexture (and maybe remodel for removing the doors) the PA330, PA550, and the FLAT Hab into inflatable fuel tanks because they would work great as fuel tanks for stations as they already fit the aesthetic as pointed out by Starwaster it works fine

Link to comment
Share on other sites

Is anyone else getting crashes with this mod using 0.25?

I'm running Arch Linux x86_64, and Habitat Pack now causes the game to crash when I try to go to the VAB.

No. What makes you sure that it's this pack? Maybe you should post your log (player.log) and let someone look at it?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...