Jump to content

[1.12] FreeIva


JonnyOThan

Recommended Posts

Is it possible to add attachment nodes through cfg editing? I've noticed that the stock hitchhiker and lab parts have nodes on their external doors that are compatible with freeiva, and it would be really useful if I could add that functionality to other parts.

Edited by Red Dwarf
Link to comment
Share on other sites

2 hours ago, Red Dwarf said:

Is it possible to add attachment nodes through cfg editing? I've noticed that the stock hitchhiker and lab parts have nodes on their external doors that are compatible with freeiva, and it would be really useful if I could add that functionality to other parts.

It sure is, here's one example: https://github.com/pizzaoverhead/FreeIva/blob/662cda3a1ed9a2a5e1bba39d5179d7ebaccf62a0/GameData/FreeIva/Squad/PartCfgs/crewCabin.cfg#L16

The first set of 3 numbers in the cfg are the position, the 2nd set of 3 is the normal (the vector perpendicular to the surface), and the last number is the node size.

I'd suggest using the blender plugin for finding the right coords.  You can import the part .mu file, create an empty axes, position it where you want the node, then click "show model transform" and copy the coords from the output log. 

Edited by JonnyOThan
Link to comment
Share on other sites

21 hours ago, JonnyOThan said:

It sure is, here's one example: https://github.com/pizzaoverhead/FreeIva/blob/662cda3a1ed9a2a5e1bba39d5179d7ebaccf62a0/GameData/FreeIva/Squad/PartCfgs/crewCabin.cfg#L16

The first set of 3 numbers in the cfg are the position, the 2nd set of 3 is the normal (the vector perpendicular to the surface), and the last number is the node size.

I'd suggest using the blender plugin for finding the right coords.  You can import the part .mu file, create an empty axes, position it where you want the node, then click "show model transform" and copy the coords from the output log. 

Is the highlighted line the only thing controlling whether a hatch can be moved through? I've been doing my testing on the short 3.75m hab from SSPX. I've figured out how to correctly place the attachment node, but the hatch is still registering as obstructed. In the hitchhiker, the eva option is replaced with an "open door" option.

BGg3qUM.png

pvSHTVV.png

This is the edited cfg. I basically just copied the highlighted lines from the hitchhiker cfg and changed the names/parameters to match the new model.

Quote

@PART[sspx-habitation-375-2]:HAS[!MODULE[ModuleFreeIva]]:FOR[FreeIva]
{
    MODULE
    {
        name = ModuleFreeIva
    }
}

@PART[sspx-habitation-375-2]:FOR[FreeIva]
{
    MODEL
    {
        model = FreeIva/SSPX/Configs/sspx-habitation-375-2
    }

    node_stack_airlock = 0.0, 0.0, 1.85, 0.0, 0.0, 1.0, 0
}

@INTERNAL[sspx-habitation-375-2-iva]:HAS[!MODULE[InternalModuleFreeIva]]:FOR[FreeIva]
{
    MODEL
    {
        model = FreeIva/SSPX/Spaces/sspx-habitation-375-2-iva
    }

    MODULE
    {
        name = InternalModuleFreeIva
        shellColliderName = shellCollider
    }

    @PROP[NF_HTCH_IVA_Basic],0
    {
        MODULE
        {
            name = HatchConfig
            attachNodeId = bottom
        }
    }

    @PROP[NF_HTCH_IVA_Basic],1
    {
        MODULE
        {
            name = HatchConfig
            attachNodeId = top
        }
    }

    @PROP[NF_HTCH_EVA_Basic]
    {
        MODULE
        {
            name = HatchConfig
            airlockName = Airlock
        }
    }
}

 

Edited by Red Dwarf
Link to comment
Share on other sites

15 minutes ago, Red Dwarf said:

Is the highlighted line the only thing controlling whether a hatch can be moved through?

No, the highlighted line is what creates the attach node.

The hatches could be configured manually, where they specify what airlock to use and what attachnode they are connected to.  If there's no manual configuration then they will look for nearby and aligned attachnodes and airlocks.  The very last @PROP[NF_HTCH_EVA_Basic] looks like it has manual configuration (the HatchConfig module).  You could add

attachNodeId = <your attachnode here>

 to that block, or try just removing the MODULE block entirely and see if the automatic detection system works.  Note that if your attach node is named node_stack_airlock, then you'd strip off the "node_stack_" part and just write `attachNodeId = airlock`

Edited by JonnyOThan
Link to comment
Share on other sites

Solved one problem, only to be confronted by a new one :P

Rs25eD6.png

It looks like there is a tunnel in the model which would allow for moving through to the attached crew tube, but the internal wall texture is blocking access to it.

JAmd9uE.png

This is the only thing that's changed from the previous cfg. If making this work goes beyond cfg editing, it's probably a lost cause for me to do on my own.

Quote

@PROP[NF_HTCH_EVA_Basic]
    {
        MODULE
        {
            name = HatchConfig
            attachNodeId = airlock
            airlockName = Airlock
        }

 

Link to comment
Share on other sites

2 hours ago, Red Dwarf said:

It looks like there is a tunnel in the model which would allow for moving through to the attached crew tube, but the internal wall texture is blocking access to it.

The visual wall and the physical blocker are not the same thing.  One is a render mesh and one is a collider.  You need to cut holes in both of these to make this work (this is why FreeIva as a whole is technically challenging).

Cutting a hole in the visual model is not very difficult.  You need to find the name of the mesh in the model file (importing it with blender is the best approach here).  Then in the HatchConfig module you can add

cutoutTargetTransformName = <mesh name>

For the collider, you'll need to edit the .mu file I created (FreeIva/SSPX/Spaces/sspx-habitation-375-2-iva) to cut out a hole where the hatch goes through.

Link to comment
Share on other sites

  • 3 weeks later...
7 hours ago, ElonsMusk said:

Dude the rotating habitats have functional gravity??? I'm blown away. When this mod started I thought "this is cool but what I imagine can't be possible in KSP...". Boy was I wrong.

Not only that, but you can grab certain objects and throw them around.  They react to accelerations of the vessel, and the artificial gravity in the centrifuges.  Centrifugal force from the vessel rotating is not yet modeled though.

Oh and it all works with VR :p

Link to comment
Share on other sites

I found FreeIVA spamming NREs during testing of a new install.

https://www.dropbox.com/scl/fi/7yf36g4kwcxnte0l8stsc/Player.log?rlkey=xra0vzg74ar19vkg161zt945n&dl=0

NullReferenceException: routine is null
  at UnityEngine.MonoBehaviour.StopCoroutine (UnityEngine.Coroutine routine) [0x00009] in <12e76cd50cc64cf19e759e981cb725af>:0 
  at FreeIva.FreeIva.LateUpdate () [0x00017] in <571a4b40afea4458999efde31f8b5cd5>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

Mod List

Possible culprits. Reviva, ASET, DE_IVAExtension, MOARdv, MOARdvPlus ?

Edited by Motokid600
Link to comment
Share on other sites

15 hours ago, Motokid600 said:

I found FreeIVA spamming NREs during testing of a new install.

https://www.dropbox.com/scl/fi/7yf36g4kwcxnte0l8stsc/Player.log?rlkey=xra0vzg74ar19vkg161zt945n&dl=0

NullReferenceException: routine is null
  at UnityEngine.MonoBehaviour.StopCoroutine (UnityEngine.Coroutine routine) [0x00009] in <12e76cd50cc64cf19e759e981cb725af>:0 
  at FreeIva.FreeIva.LateUpdate () [0x00017] in <571a4b40afea4458999efde31f8b5cd5>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

Mod List

Possible culprits. Reviva, ASET, DE_IVAExtension, MOARdv, MOARdvPlus ?

Thanks for the report! Huh, I'm not really sure what could have caused that.  Do you have any mods that relate to or did you do anything weird with the kerbal portraits?

I can guarantee it's not directly caused by any of the mods you listed.  What command pod were you using when this happened?  Can you share a screenshot?

(for future reference I'd prefer to use ksp.log instead of player.log when a crash isn't involved)

I'm pretty sure I could avoid the exception spam but I'd like to know how it got into that state.

Edited by JonnyOThan
Link to comment
Share on other sites

Ill try it again and report back. In the meantime I was using the ReStock Mk1 command pod. Nothing with portraits.

I tried again and could not repeat the NullRef spam. No changes. I only found one NRE in reference to FreeIVA

[EXC 17:32:34.910] NullReferenceException: Object reference not set to an instance of an object
	MeshCutter2..ctor (UnityEngine.MeshFilter target) (at <571a4b40afea4458999efde31f8b5cd5>:0)
	FreeIva.MeshCutter.ApplyCut (UnityEngine.Transform targetTransform, System.Collections.Generic.IEnumerable`1[T] cutParameters) (at <571a4b40afea4458999efde31f8b5cd5>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:LogException(Exception)
	FreeIva.MeshCutter:ApplyCut(Transform, IEnumerable`1)
	FreeIva.MeshCutter:CutInternalModel(InternalModel, List`1)
	FreeIva.InternalModuleFreeIva:ExecuteMeshCuts()
	FreeIva.InternalModuleFreeIva:OnLoad_Finalize()
	FreeIva.InternalModuleFreeIva:OnDisable()
	UnityEngine.GameObject:SetActive(Boolean)
	PartLoader:LoadInternalSpace(UrlConfig)
	<CompileInternalSpaces>d__79:MoveNext()
	UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
	<CompileAll>d__13:MoveNext()
	UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

KSP.log

Using the stock AeroEquus craft on a sub-orbital flight from launch to landing. Imgur is having issues at the moment so no pic yet, sorry.

 

Edited by Motokid600
Link to comment
Share on other sites

  • 2 weeks later...

Thrilled that K&K is supported! I'm curious if the K&K Base Bi-Coupler could be converted to allow FreeIVA. ConnectedLivingSpace allows the passage, and I had a really neat design idea would need FreeIVA on that part. If it's simple I could do it myself, mostly curious if it's even possible.

 

Thanks again for all your efforts!

Link to comment
Share on other sites

1 hour ago, ElonsMusk said:

Thrilled that K&K is supported! I'm curious if the K&K Base Bi-Coupler could be converted to allow FreeIVA. ConnectedLivingSpace allows the passage, and I had a really neat design idea would need FreeIVA on that part. If it's simple I could do it myself, mostly curious if it's even possible.

 

Thanks again for all your efforts!

Ah thanks for the heads up.  Usually I try to make sure that I cover everything that CLS supports, if a mod already has CLS configs.  Adding this is certainly possible (it would look something similar to the bicouplers/tricouplers from stock) but it requires a custom model.  If you feel like trying your hand at it go ahead, but I'll see if I can squeeze it in soon.

Link to comment
Share on other sites

53 minutes ago, JonnyOThan said:

Ah thanks for the heads up.  Usually I try to make sure that I cover everything that CLS supports, if a mod already has CLS configs.  Adding this is certainly possible (it would look something similar to the bicouplers/tricouplers from stock) but it requires a custom model.  If you feel like trying your hand at it go ahead, but I'll see if I can squeeze it in soon.

If it's not too much trouble that's great news! Modelling is not my forte :P No rush of course. My last attempt at KSP models was IVA stuff; this seems simpler, maybe I could give it a go.

Anyway thank you, as always!

Link to comment
Share on other sites

6 hours ago, ElonsMusk said:

If it's not too much trouble that's great news! Modelling is not my forte :P No rush of course. My last attempt at KSP models was IVA stuff; this seems simpler, maybe I could give it a go.

Anyway thank you, as always!

Well, I took a look at them and those parts are so thin it's actually not possible to pass through them in freeiva - the ceiling and floor are so close together you can't squeeze through.  Sorry.

Link to comment
Share on other sites

15 hours ago, JonnyOThan said:

Well, I took a look at them and those parts are so thin it's actually not possible to pass through them in freeiva - the ceiling and floor are so close together you can't squeeze through.  Sorry.

Oh that's a shame. Understandable, however. Thank you for taking a look!

While I'm in your notifications, I noticed this today.
eS6a2Te.png


Deep freeze has CLS support. Not sure if it's on your to-do list but just wanted to point it out in case it got missed. :) 

Link to comment
Share on other sites

FreeIVA 0.2.18.0 is now available as a prerelease build. Please test this out and report any issues here or on discord. Make sure to include your KSP.log file.

https://github.com/pizzaoverhead/FreeIva/releases/tag/0.2.18.0

Notable Changes

  • Added support for Lonesome Robots Collection
  • Added support for Tiktaalik Dreaming Props
  • Added support for Pathfinder
  • French localization (thanks @tony48 !)
  • Added support for RealChute's stack chute
  • Added support for Cormorant Aeronology
  • Centrifugal acceleration from rotating parts is now simulated
  • Boarding a part from EVA now starts you unbuckled just inside the hatch. You can press C to immediately return to your seat, or disable this behavior in the settings.cfg file.

Bug Fixes Etc.

  • Fix JSI EVA hatches in certain cockpits
  • Fixed several issues in OPT
  • Fixed several bugs that could result in exception spamming, loss of control, or inability to unbuckle
  • Better support for WildBlue props
  • Stock 0.625m decoupler and separator are now passable to be consistent with Connected Living Space
  • Fixed several issues in Tantares
  • Hatches that are set to auto-hide when connected no longer hide their paired hatch if it has an animation
  • Hatches in jr docking port and benjee’s docking ports are now set to hide when connected
  • Fixed texture on the back of Near Future Props EVA hatch
  • Fixed cutout and depth mask in SSPX 3.75m greenhouse
  • Added ladder support to Habtech Props bunkbed
Link to comment
Share on other sites

5 hours ago, Hal9000kerman said:

I'm... not even sure how to explain this.

Please post your log file.  Also even if you think an issue is obvious, just use a few words to explain what’s going on. I can’t read minds.

this looks like the KSA layout for SOCK but the seats are missing. Are you missing habtech props?

Edited by JonnyOThan
Link to comment
Share on other sites

11 hours ago, JonnyOThan said:

Please post your log file.  Also even if you think an issue is obvious, just use a few words to explain what’s going on. I can’t read minds.

this looks like the KSA layout for SOCK but the seats are missing. Are you missing habtech props?

Yeah sorry about that. I probably should have been more descriptive. Obviously, the models for the 2 front seats in the upper deck and all 3 seats in the lower deck were missing (even though the crew slots for them were still there). Jeb's model is still there but Bill's is absent for some reason. I unbuckled Jeb, and floated throughout the cockpit (I had the zero-g cheat on at the time) and he was able to sort-of no-clip back in. I maneuvered Jeb back to his "seat", and he returned to the same weird horizontal no-clip position.

Also, I do have habtech props.

Log: https://www.dropbox.com/s/8r885s466tj3s6o/KSP.log?dl=0

Link to comment
Share on other sites

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...