Jump to content

[1.12.x] TAC Self Destruct Continued


linuxgurugamer

Recommended Posts

22 hours ago, linuxgurugamer said:

MiniAVC .dll is not in this mod, and it doesn't have any dependencies

Great. 

A general question: If i find mods with miniAVC.dll in future - can I simply delete this file from mods, that have it, or will it cause issues? I do not like unnessary code talk to the internet in the background when it is not needed.

Link to comment
Share on other sites

14 hours ago, Rakete said:

Great. 

A general question: If i find mods with miniAVC.dll in future - can I simply delete this file from mods, that have it, or will it cause issues? I do not like unnessary code talk to the internet in the background when it is not needed.

I recommend you do one of the two things:

  1. Install your mods using CKAN.  This will install any dependencies, and, depending on your option, not install the MiniAVC.dll files.  If it does, it will also install ZeroMiniAVC, which will delete them for you automatically
  2. Install ZeroMiniAVC on your own, it will do the removal for you, and doesn't impact the game experience

The short answer is yes, if you insist on doing things manually, you can (and must) remove all the  MiniAVC.dll files, otherwise they will break the game

Link to comment
Share on other sites

9 hours ago, linuxgurugamer said:

I recommend you do one of the two things:

  1. Install your mods using CKAN.  This will install any dependencies, and, depending on your option, not install the MiniAVC.dll files.  If it does, it will also install ZeroMiniAVC, which will delete them for you automatically
  2. Install ZeroMiniAVC on your own, it will do the removal for you, and doesn't impact the game experience

The short answer is yes, if you insist on doing things manually, you can (and must) remove all the  MiniAVC.dll files, otherwise they will break the game

I do all the mod stuff manually, since I like full control about what happens to my ksp folder and sometimes add extras or remove stuff, that does not fit to me.  And doing a windows search in the gamedata folder looking for all miniAVC.dlls isn't much of a magic, I guess. What is ZeroMiniAVC needed for? I guess it's code running permanently on KSP for a one-time-job = removing a certain dll from all gamedata subdirectories? No offence, just technical interest.

E.g. I will add the module to make the TACselfdestruct parts EVAinstallable by myself to the partdefinition, since I don't feel like downloading another mod that does that, but comes with three further dependencies. I always prefer to have only code running, that is actually needed. But I like the concept of ksp part volumes. Maybe I'll give it a try when my edits on my mods settle a bit, so that I can run Part volumes once and then remove it and just keep the created config.

 

Just one more question: the part volume (packedvolume) that is written in the module in the config is an integer. What's the dimension? Liters? 1/10-Liters?

Edited by Rakete
Link to comment
Share on other sites

22 hours ago, Rakete said:

What is ZeroMiniAVC needed for?

From  the ZMAVC op:  ZeroMiniAVC is a little mod which simply removes any MiniAVC.dll or MiniAVC-v2.dll files

It runs at startup and then destroys itself, it is not running after that.  

22 hours ago, Rakete said:

Just one more question: the part volume (packedvolume) that is written in the module in the config is an integer. What's the dimension? Liters? 1/10-Liters?

I believe that is cubic meters

Link to comment
Share on other sites

@linuxgurugamer

 

Bugreport:

TAC Selfdestruct sometimes does leave  debris in orbit:

Steps to reproduce:

1. Download this vehicle (available for 7 days: free-of-charge file hoster) https://www.filemail.com/d/rgikmhqpthrmxra (Needs Near & Far future & Stationparts Expansion redux mods by Nertea - unfortunately... But it happens at this vehicle 100% reproduceable, that's why I'll provide it anyway for your debugging ability. Will check if I can manage to find a pure stock vehicle, that does so also, but most of my crafts have unfortunately modded parts).

2. teleport the whole rocket to orbit to ensure that there is no gravitational side effects

3. activate self destruct.

4. check map view after explosions: Debris: not detonated parts. 

 

Maybe the detonation shocks make parts fall apart before being killed by the self destruct mechanism ?! In the vehicle provided above rather big engines survive the whole thing reproduceable (the big Far-Future-tech-Anti-Matter-Engines)

 

Edited by Rakete
Link to comment
Share on other sites

13 minutes ago, Rakete said:

Bugreport:

TAC Selfdestruct sometimes does leave  debris in orbit:

Steps to reproduce:

1. Download this vehicle (available for 7 days: free-of-charge file hoster) https://www.filemail.com/d/rgikmhqpthrmxra (Needs Near & Far future mods by Nertea - unfortunately... But it happens at this vehicle 100% reproduceable, that's why I'll provide it anyway. Will check if I can manage to find a pure stock vehicle, that does so also),

2. teleport the whole rocket to orbit,

3. activate self destruct.

4. check map view after explosions: Debris: not detonated parts. 

It depends on what options are specified, and frankly, it's gonna happen sometimes

Link to comment
Share on other sites

58 minutes ago, linuxgurugamer said:

It depends on what options are specified, and frankly, it's gonna happen sometimes

What options do you mean? Can I do something about it by setting variables in the config?

After playing around I noticed, that it kinda depends, where you place the charge. Far away (part-chain-wise) from rootpart makes it more likely to leave debris

Edited by Rakete
Link to comment
Share on other sites

20 hours ago, Rakete said:

What options do you mean? Can I do something about it by setting variables in the config?

After playing around I noticed, that it kinda depends, where you place the charge. Far away (part-chain-wise) from rootpart makes it more likely to leave debris

It's been a while, bu t read the OP for info.  There are three modes of self destruct.

The reason some get left behind is that the destruction chain can break the links to the ones far away, leaving them stranded.

  • Mode:  Self destruct or Detonate Parent

Options when you right-click on the part:

  • Time Delay (slider,defaults to 5)
  • Countdown: Visible or not
  • Mode:  Self destruct or Detonate Parent
  • Options in flight are:
  • Mode:  Self destruct or Detonate Parent
  • Self Destruct
  • Explode Detonate parent
Edited by linuxgurugamer
Link to comment
Share on other sites

4 hours ago, linuxgurugamer said:

It's been a while, bu t read the OP for info.  There are three modes of self destruct.

The reason some get left behind is that the destruction chain can break the links to the ones far away, leaving them stranded.

  • Mode:  Self destruct or Detonate Parent

Options when you right-click on the part:

  • Time Delay (slider,defaults to 5)
  • Countdown: Visible or not
  • Mode:  Self destruct or Detonate Parent
  • Options in flight are:
  • Mode:  Self destruct or Detonate Parent
  • Self Destruct
  • Explode Detonate parent

Ah those options are known since I read the OP. I just used the complete destruction method, because I had no use for the other options yet. 

Are there some tricks to prevent left behinds? E.g. by placing the box near the root part or other methods. Does this influence the destruction chain? 

How can this happen? I guess, KSP saves vessels as a chain of parts. When the destruction is started, I'd assume, that the destruction chain starts at the opposite end of the chain than the root part closing in to the root part. How can links of later to be destructed parts break? (Just a question because of technical interest, not a complaint)

In my imagination every vessel is a part tree. There every part has a parent part, to which it is attached. The chain to destroy is to destroy all "daughter parts" before destroying a parent part. 

So if every part (i) is checked to be destructed, it needs to be checked for all n remaining parts, if there are parts that have part (i) as parent part. If so, they must be destroyed first... or do I think in a wrong way... no clomplaint, just technical interest.

 

Edited by Rakete
Link to comment
Share on other sites

1 hour ago, Rakete said:

Ah those options are known since I read the OP. I just used the complete destruction method, because I had no use for the other options yet. 

Are there some tricks to prevent left behinds? E.g. by placing the box near the root part or other methods. Does this influence the destruction chain? 

How can this happen? I guess, KSP saves vessels as a chain of parts. When the destruction is started, I'd assume, that the destruction chain starts at the opposite end of the chain than the root part closing in to the root part. How can links of later to be destructed parts break? (Just a question because of technical interest, not a complaint)

In my imagination every vessel is a part tree. There every part has a parent part, to which it is attached. The chain to destroy is to destroy all "daughter parts" before destroying a parent part. 

So if every part (i) is checked to be destructed, it needs to be checked for all n remaining parts, if there are parts that have part (i) as parent part. If so, they must be destroyed first... or do I think in a wrong way... no clomplaint, just technical interest.

If you're that interested, I suggest you take a look at the code.  I didn't write this, and it's been a long time since I looked at it, so really right now don't really know the answer to your question. 

I believe that when you do the Detonate Parent, it follows the chain, but there can be many ways where the chain can get broken.

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

If you're that interested, I suggest you take a look at the code. 

Unfortunately I am not a programmer, just an electrical R&D engineer in RL. So algorithms aren't rocket science to me in general - but as of KSP I don't know anything about its internals and the way the things you stick together in the VAB are represented in the code and the objects in the memory, nor about the programming language. That's why I can't tell you, if the destruct algorithm can be optimized to circumvent the residuals problem or not. My coding skills are very very limited. I can just give an idea how it could work better algorithmwise, but can't implement it and can't tell if my proposal idea is worse than that what is already implemented by someone waaaay more skilled than me.

 

For what I noticed for the complete selfdestruction mode: I seems to make a difference in the detonation order, where you place the Selfdestruct part. Maybe this contributes to the behavior? 

Did I place the charge a the far end of the rocket residuals were left. Did i place it very very (parent/childpart-wise) close to the rootpart, it seems to be not an issue. 

Edited by Rakete
Link to comment
Share on other sites

  • 2 weeks later...
3 hours ago, linuxgurugamer said:

No.  The old site (sorry for putting it in) wallet go and the URL was taken over by a not-nice site.  Nothing to do with KSP or this mod

Alright. Didn't understand it, cause i was not into ksp modding when that was seemingly an issue. Got all my installed mods from github or spacedock... and scanned them via virustotal :D trust is good, check is better - at least concerning security issues.

Link to comment
Share on other sites

  • 2 months later...
  • 7 months later...

Is it possible to set the default mode in a part config? 

I'm adding the TacSelfDestruct module to a part I'm making, but would like it to default to 0 seconds and "Detonate Parent".  The former was easy enough by looking at the provided part configs, but couldn't see a way to set the latter.

I tried

stagingMode = DetonateParent

for giggles, but unsurprisingly it didn't work.

Edit:

Nevermind!  I figured it out.  Looked through the source again and tried:

stagingMode = 1

Which worked.

Edited by Geonovast
Figured it out
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...