Jump to content

[1.3.1] Cloaking Device (v0.11a Oct 14, 2017)


wasml

Recommended Posts

ZooNamedGames - Not a problem but there's not much going on here. I think about the only use will be with BDA and that's only if a vessel can be cloaked from BDA radar too. If that happens I suspect the the BDA modders will incorporate the small bit of code to do the cloaking into their mod rather than trying to make two mods work together - this would be fine with me - I've benefited lots from others mods and would be happy if I can give a little back. Meanwhile I'm learning lots from putting this together and there are still a couple things I want to try to figure out for my own sake. If you can figure out how to reliably detect changes to a vessel (short of scanning the vessel every update) I'd be interested and, if it's not to complicated or processor heavy, I'll add it into this mod. One example is detecting solar panels falling off if you go to fast with them deployed or scrape them off on another object. I'm currently using GameEvents.onVesselHasChanged and have tried all the other GameEvents.onXXX that looked likely without success.

Link to comment
Share on other sites

ZooNamedGames - Not a problem but there's not much going on here. I think about the only use will be with BDA and that's only if a vessel can be cloaked from BDA radar too. If that happens I suspect the the BDA modders will incorporate the small bit of code to do the cloaking into their mod rather than trying to make two mods work together - this would be fine with me - I've benefited lots from others mods and would be happy if I can give a little back. Meanwhile I'm learning lots from putting this together and there are still a couple things I want to try to figure out for my own sake. If you can figure out how to reliably detect changes to a vessel (short of scanning the vessel every update) I'd be interested and, if it's not to complicated or processor heavy, I'll add it into this mod. One example is detecting solar panels falling off if you go to fast with them deployed or scrape them off on another object. I'm currently using GameEvents.onVesselHasChanged and have tried all the other GameEvents.onXXX that looked likely without success.

Alright.

Personally I'd like to see this mod add a new depth to BDA which currently doesn't exist which is radar invisibility. As it stands stealth crafts are impossible- no matter what your craft is or made of, it's detected easily. In reality, modern stealth fighters have radar absorbent materials, but more importantly and this is what I want to see in KSP+BDA, is the shape of an aircraft and how it affects the radar's ability to detect. Again most modern fighters are also very oddly shaped, this is so radar has a harder time returning any deflected sound waves back to the original source therefore making the craft invisable to radar.

Ofc I'd like to also help with just getting it to work as well. Maybe I can contact the owner of BDA for aid here?

Link to comment
Share on other sites

ZooNamedGames: I took a quick look at BDA and the radar code it looks like Kagame was right - it creates a camera and scans the output for any pixel that doesn't have the red saturated. If this is right then there's a chance this will reduce the radar signature. Probably the best way to find out is to just try it. If not the detection code doesn't appear (based on a quick look) to access the vessel – so any changes to make a craft radar invisible would need to be done on the BDA side.

Edit: Installed BDA and tried it and it appeared to work - then uncloaked and it still didn't show up. Then I recalled seeing some code in BDA that looked like it removed landed targets from the radar. Was using AirPark so while the vessel was up in the air it was listed as landed.

Edited by wasml
adding
Link to comment
Share on other sites

ZooNamedGames: I think that if BDA is able to detect a cloaked craft that it will take a complete redesign of BDA to allow craft to go undetected. That said - have you checked if it does detect a cloaked craft? The code looks as if there's a decent chance that a cloak would at least reduce visibility. I did a quick experiment but found I'd need to dig into BDA further to figure out if it works - mainly I need to figure out how to leave a cloaked craft in flight while I switch to a radar to check visibility.

Link to comment
Share on other sites

YES YES YEEEEESSSSS. finaly someone managed to do this.

sir, you are my hero

tried it out now..... partialy works. when i click the cloak button it fades out for half a sec then fades back in and refuses to cloak. help?

Edited by ckirky
Link to comment
Share on other sites

Updated to 0.04

Found a way to remove the shadows – unfortunately it's an all or nothing deal – no fade for the shadows. As such I've added a shadowCutoff parameter, settable in the config file, that controls when the shadows disappear. Default is at 0.2 (1.0 is fully visible, 0.0 is invisible[for the most part]). I still haven't figured out where the engine shrouds are hiding so they are always visible and always cast shadows.

ckirky - that's what happens when you don't have enough electricity - there should be a brief message middle top part of the screen (in yellow) saying something about EC needed. Default is rather power hungry but you can change in the config file. See the OP under the Config File parameters spoiler for what options are available. If you stick the following line in "debugMode = true" you should have some sliders on the cloak device right click menu. You can play around to find levels you like and then put them in the config file.

Exapmle:

// In the Slug.cfg file the setup for this module is the following (showing the default values)

MODULE

{

name = ModuleCloak

ECPerSec = 4 // Electricity per second per meter squared

fadeTime = 2.0

areaExponet = 1.0

}

An alternate config might look like this:

MODULE

{

name = ModuleCloak

ECPerSec = 1

fadeTime = 2.0

areaExponet = 0.5

}

This will use the square root of the craft surface area.

Edited by wasml
Added a config file example
Link to comment
Share on other sites

Feel free to use the module itself or the code from the module (included in the download). If you use the module as is be aware it's way unbalanced and I still have a few bugs to work out. I hope to have an update out this weekend that will fix a problem with parts that come off (intentionally or not) remaining cloaked. I've also changed the EC usage to query a surfaceArea call instead of the vessel mass.

You say “a new module on my partâ€Â. If you mean adding features or taking this in another direction I'm open to suggestions but won't promise to implement anything. I'm new to modding and still trying to find my way around the API – as such I don't want to commit to anything too ambitious.

well, mainly I wanted permission to make a part for my pack that would work with BDArmory, sort of like a jamming cloak where radar can't pick you up

Link to comment
Share on other sites

Svm420 - Thanks for checking and reporting back. Taking a quick look at the BDA code it looked like there was a decent chance this would at least reduce the detection range. Added note in OP. Edited by wasml
Link to comment
Share on other sites

Release v0.05
Found where most of the renderers were hiding and now disable them when fully cloaked. This is still leaving the second end cap on struts and fuel line visible and the engine shroud doesn't fade in/out - but it's progress. The near field oddities are also gone at full cloak.

@chaoko99: Thanks for the info. At some point I'd like to figure out shaders but right now I have my hands full with KSP and blender. Putting this in my for future reference drawer.
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 1 month later...
  • 2 months later...

I just wanted to stop by and thank you for the hard work you've put into this mod. I just finished my latest cinematic and your mod played a crucial role in it. Your efforts have allowed my creative visions to come together and I am forever grateful. Thanks again and keep up the hard work!

 

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