Jump to content

[1.9-1.10] Hangar


allista

[b]Do you use the [u]Desaturated Texture Pack?[/u][/b]  

326 members have voted

  1. 1. [b]Do you use the [u]Desaturated Texture Pack?[/u][/b]

    • Yes, the grey textures are more stock-like
      178
    • No, the green-orange textures are fine
      51


Recommended Posts

11 hours ago, allista said:

Almost: this fix is included in AT_Utils, so no matter which of my mods you install, asteroids' form will be stabilized. It also doesn't matter if you have anything attached to them.

very cool! gotta have to try out and see what's new :)

ty for your awesome work!

EDIT:
according to my test savegame (sandbox) the old (1.3.0) astro seed -36795998 becomes -3.6796E+07 right after loading, and when I save (quicksave or regular) it throws in 4.812343E+07

I know this is not one of your mods causing it, its a KSP 1.3.1 bug and this shouldn't discourage you to keep on working!

log shows "Invalid integer value! Field seed, value -3.6796E+07 on object of type ModuleAsteroid"

but then it stays at this value "4.812343E+07" and throws "Invalid integer value! Field seed, value4.812343E+07 on object of type ModuleAsteroid" after another load

 

Edited by LatiMacciato
Link to comment
Share on other sites

15 minutes ago, Thegamer211 said:

Is there any way to remove the 1 vessel limit for stock cargo bays?

By editing the patch that adds the hangar module to them. They use single use storage; you can change it to be just hangar storage. But I would argue that this is a cheat.

Link to comment
Share on other sites

This is really great, opens up a lot of cool designs.

 

One question though, when using the VTOL hanger is it intended that the craft spawn way above it?

Not much of a problem on a low gee planet or moon as they will survive the fall but I have found when testing setups on the runway my stored ship drops down hard and crashes into the hanger in a ball of fire.

Unfortunately I used a few space saving folding bits to reduce stored crafts volume (much like a real aircraft carrier does) so I can’t just hit the throttle to stop it crashing.

Link to comment
Share on other sites

6 hours ago, Oiff said:

This is really great, opens up a lot of cool designs.

 

One question though, when using the VTOL hanger is it intended that the craft spawn way above it?

Not much of a problem on a low gee planet or moon as they will survive the fall but I have found when testing setups on the runway my stored ship drops down hard and crashes into the hanger in a ball of fire.

Unfortunately I used a few space saving folding bits to reduce stored crafts volume (much like a real aircraft carrier does) so I can’t just hit the throttle to stop it crashing.

Definitely not intended. They should spawn about 5cm above the platform. Could you share some screenshots?

Link to comment
Share on other sites

Let me explain the larger picture, if you dont mind me blabing about my current ongoing mission, so you know why I ask.

I decided to go to outter planets after installing After Kerbin (thats Reaper and Jool-ish) and I need a mothership to get there. The mothership is essentially about 12 OPT-J cargobays and 4 OPT-K cargobays and few other parts. Imagine battlestar Galactica just without the fighters. Clearly its huge. I wont fly off to orbit even without all the equipment that must be put in it. Therefore I decided to try both GroundConstruction and Hangars. 

Firstly, It would be probably easiest for me to build the mothership on orbit (as opposed to on moon). How can I do that? GC doesnt support orbit building, and hangars.... AFAIK a hangar with a ship inside has at least same size and mass as the ship itself, its only part count that gets tricked. Right? Should I build on the moon?

Secondly, would it be better to put several hangars in cargobays instead of the content? Contents is rovers, science probes, honeybadger, submersible, food, hydroponics, cryobeds, nuclear reactors and ore/dust/chemical plants... this is a summary, not a list. 

Edited by agrock
Link to comment
Share on other sites

12 minutes ago, agrock said:

Let me explain the larger picture, if you dont mind me blabing about my current ongoing mission, so you know why I ask.

I decided to go to outter planets after installing After Kerbin (thats Reaper and Jool-ish) and I need a mothership to get there. The mothership is essentially about 12 OPT-J cargobays and 4 OPT-K cargobays and few other parts. Imagine battlestar Galactica just without the fighters. Clearly its huge. I wont fly off to orbit even without all the equipment that must be put in it. Therefore I decided to try both GroundConstruction and Hangars. 

Firstly, It would be probably easiest for me to build the mothership on orbit (as opposed to on moon). How can I do that? GC doesnt support orbit building, and hangars.... AFAIK a hangar with a ship inside has at least same size and mass than the ship itself, its only part count that gets tricked. Right? Should I build on the moon?

Secodly, would it be better to put several hangars in cargobays instead of the content? Contents is rovers, science probes, honeybadger, submersible, food, hydroponics, cryobeds, nuclear reactors and ore/dust/chemical plants... this is a summary, not a list. 

Ohhhhh piccies of your OPT ship please :wink:

Link to comment
Share on other sites

3 hours ago, agrock said:

Let me explain the larger picture, if you dont mind me blabing about my current ongoing mission, so you know why I ask.

I decided to go to outter planets after installing After Kerbin (thats Reaper and Jool-ish) and I need a mothership to get there. The mothership is essentially about 12 OPT-J cargobays and 4 OPT-K cargobays and few other parts. Imagine battlestar Galactica just without the fighters. Clearly its huge. I wont fly off to orbit even without all the equipment that must be put in it. Therefore I decided to try both GroundConstruction and Hangars. 

Firstly, It would be probably easiest for me to build the mothership on orbit (as opposed to on moon). How can I do that? GC doesnt support orbit building, and hangars.... AFAIK a hangar with a ship inside has at least same size and mass as the ship itself, its only part count that gets tricked. Right? Should I build on the moon?

Secondly, would it be better to put several hangars in cargobays instead of the content? Contents is rovers, science probes, honeybadger, submersible, food, hydroponics, cryobeds, nuclear reactors and ore/dust/chemical plants... this is a summary, not a list. 

You're correct in that hangars only decrease part count, while adding their mass to the total. But if you're building so huge a mission you'll probably want that too, cause otherwise it may be difficult to control the mothership in maneuvers with so much physics processing. I'd recommend you to try hangar fairings instead of some of your cargo bays; they're single-use only, but give considerably lower overhead in mass than reusable hangars. And since, as I understand, you're trying to establish a base, there's no point in having a huge empty ship afterwards.

Building on Mun and launching from there would certainly be much easier with respect to both dV and fuel, as well as subsequent navigation; but it would be also much slower due to construction time.

If you want pure in-orbit construction, try Extraplanetary Launchpads. You'll save yourself the effort of launching to orbit. But you'll have to haul the fuel to your construction, while with GC you can produce all the fuel on site.

Edited by allista
Link to comment
Share on other sites

On 11/10/2017 at 12:29 AM, LatiMacciato said:

very cool! gotta have to try out and see what's new :)

ty for your awesome work!

EDIT:
according to my test savegame (sandbox) the old (1.3.0) astro seed -36795998 becomes -3.6796E+07 right after loading, and when I save (quicksave or regular) it throws in 4.812343E+07

I know this is not one of your mods causing it, its a KSP 1.3.1 bug and this shouldn't discourage you to keep on working!

log shows "Invalid integer value! Field seed, value -3.6796E+07 on object of type ModuleAsteroid"

but then it stays at this value "4.812343E+07" and throws "Invalid integer value! Field seed, value4.812343E+07 on object of type ModuleAsteroid" after another load

 

You mean the fix doesn't work?

The error messages won't disappear, but the seed still the old save should stay, as well as asteroid's shape.

Do you have ModuleAsteroidFix.cfg in AT_Utils?

Link to comment
Share on other sites

3 hours ago, allista said:

You mean the fix doesn't work?

The error messages won't disappear, but the seed still the old save should stay, as well as asteroid's shape.

Do you have ModuleAsteroidFix.cfg in AT_Utils?

yup, somehow the module "ModuleAsteroidFix" doesnt apply but I possibly found out why ... I'm using custom asteroids and this one I was playing with was a part named "CaAsteroidIcy"

I cannot find any "PotatoRoid" in my savegame tho LOL .. maybe I should try w/o custom asteroids

EDIT: would it help I edit your fix file to add the custom asteroid types to have mod compatiblity?

Edited by LatiMacciato
Link to comment
Share on other sites

17 hours ago, allista said:

Definitely not intended. They should spawn about 5cm above the platform. Could you share some screenshots?

Ok I have had a good play with it systematically deleting parts of the saved craft and testing it with fewer and fewer parts.

I managed to get it to launch ok (or 1/2 of it anyway) but there isn’t any consistency in the problem so I can’t see what is causing it.

I even had two identical craft, both created from the same original craft with exactly the same bits stripped off but saved with different names.  One launched correctly and the other did not.

And with the one that was working sticking a nerv on the end sent it back to not working again.

Here is a pick of what it looks like when it is going wrong:

MKmAheY.png

Link to comment
Share on other sites

5 hours ago, LatiMacciato said:

yup, somehow the module "ModuleAsteroidFix" doesnt apply but I possibly found out why ... I'm using custom asteroids and this one I was playing with was a part named "CaAsteroidIcy"

I cannot find any "PotatoRoid" in my savegame tho LOL .. maybe I should try w/o custom asteroids

EDIT: would it help I edit your fix file to add the custom asteroid types to have mod compatiblity?

I was just about to suggest you this. This should help if your custom asteroids use ModuleAsteroid inside.

5 hours ago, Oiff said:

Ok I have had a good play with it systematically deleting parts of the saved craft and testing it with fewer and fewer parts.

I managed to get it to launch ok (or 1/2 of it anyway) but there isn’t any consistency in the problem so I can’t see what is causing it.

I even had two identical craft, both created from the same original craft with exactly the same bits stripped off but saved with different names.  One launched correctly and the other did not.

And with the one that was working sticking a nerv on the end sent it back to not working again.

Here is a pick of what it looks like when it is going wrong:

MKmAheY.png

Quite interesting. I'll try to reproduce it on my install and report back.

Link to comment
Share on other sites

31 minutes ago, allista said:

I was just about to suggest you this. This should help if your custom asteroids use ModuleAsteroid inside.

so far it looks awesome, the 'roids stay as they were.
This one in my test save is containing "ModuleAsteroid" and "ModuleAsteroidFix"  now!!!

What seems to look strange to me is that the "ModuleAsteroidFix" seed is nothing, is that intended to be a temporary fill while load or so?

MODULE
{
	name = ModuleAsteroid
	isEnabled = True
	seed = -3.480688E+07
	AsteroidName = Trojan Ast. DIV-988
	prefabBaseURL = Procedural/PA_C
	currentState = 1
	stagingEnabled = True
	EVENTS { }
	ACTIONS { }
	UPGRADESAPPLIED { }
}
MODULE
{
	name = ModuleAsteroidFix
	isEnabled = True
	seed = 
	stagingEnabled = True
	EVENTS { }
	ACTIONS { }
	UPGRADESAPPLIED { }
}

 

my modified ModuleAsteroidFix.cfg:

Spoiler

@PART[PotatoRoid]
{
	MODULE 
	{ 
		name = ModuleAsteroidFix
	}
}

// custom asteroid compatiblity
@PART[CaAsteroidCarbon]:FOR[CustomAsteroids]:NEEDS[CustomAsteroids]
{
	MODULE 
	{ 
		name = ModuleAsteroidFix
	}
}
@PART[CaAsteroidIcy]:FOR[CustomAsteroids]:NEEDS[CustomAsteroids]
{
	MODULE 
	{ 
		name = ModuleAsteroidFix
	}
}
@PART[CaAsteroidMetal]:FOR[CustomAsteroids]:NEEDS[CustomAsteroids]
{
	MODULE 
	{ 
		name = ModuleAsteroidFix
	}
}
@PART[CaCometActive]:FOR[CustomAsteroids]:NEEDS[CustomAsteroids]
{
	MODULE 
	{ 
		name = ModuleAsteroidFix
	}
}

 

Link to comment
Share on other sites

15 minutes ago, LatiMacciato said:

so far it looks awesome, the 'roids stay as they were.
This one in my test save is containing "ModuleAsteroid" and "ModuleAsteroidFix"  now!!!

What seems to look strange to me is that the "ModuleAsteroidFix" seed is nothing, is that intended to be a temporary fill while load or so?


MODULE
{
	name = ModuleAsteroid
	isEnabled = True
	seed = -3.480688E+07
	AsteroidName = Trojan Ast. DIV-988
	prefabBaseURL = Procedural/PA_C
	currentState = 1
	stagingEnabled = True
	EVENTS { }
	ACTIONS { }
	UPGRADESAPPLIED { }
}

MODULE
{
	name = ModuleAsteroidFix
	isEnabled = True
	seed = 
	stagingEnabled = True
	EVENTS { }
	ACTIONS { }
	UPGRADESAPPLIED { }
}

 

my modified ModuleAsteroidFix.cfg:

  Hide contents


@PART[PotatoRoid]
{
	MODULE 
	{ 
		name = ModuleAsteroidFix
	}
}

// custom asteroid compatiblity
@PART[CaAsteroidCarbon]:FOR[CustomAsteroids]:NEEDS[CustomAsteroids]
{
	MODULE 
	{ 
		name = ModuleAsteroidFix
	}
}
@PART[CaAsteroidIcy]:FOR[CustomAsteroids]:NEEDS[CustomAsteroids]
{
	MODULE 
	{ 
		name = ModuleAsteroidFix
	}
}
@PART[CaAsteroidMetal]:FOR[CustomAsteroids]:NEEDS[CustomAsteroids]
{
	MODULE 
	{ 
		name = ModuleAsteroidFix
	}
}
@PART[CaCometActive]:FOR[CustomAsteroids]:NEEDS[CustomAsteroids]
{
	MODULE 
	{ 
		name = ModuleAsteroidFix
	}
}

 

Awesome! Thanks for the patches, I'll include them ASAP :cool:

 

The seed should contain the seed, but it can be obtained only when an asteroid is loaded. So this one probably wasn't.

 

Link to comment
Share on other sites

39 minutes ago, allista said:

Awesome! Thanks for the patches, I'll include them ASAP :cool:

 

The seed should contain the seed, but it can be obtained only when an asteroid is loaded. So this one probably wasn't.

 

I'm glad I could help .. well .. sad news is on my old career 1.3.0 savegame that i copied over to the new KSP 1.3.1 (both highly modded) included a sad borky one :/

This one that has gotten the fix module while beeing an original potatoroid, but still looks very distorted

bRvBwAS.png

MODULE
{
	name = ModuleAsteroid
	isEnabled = True
	seed = 4.305785E+07
	AsteroidName = Ast. TBG-132
	prefabBaseURL = Procedural/PA_C
	currentState = 1
	stagingEnabled = True
	EVENTS { }
	ACTIONS { }
	UPGRADESAPPLIED { }
}
-- snip --

MODULE
{
	name = ModuleAsteroidFix
	isEnabled = True
	seed = 43057851
	stagingEnabled = True
	EVENTS { }
	ACTIONS { }
	UPGRADESAPPLIED { }
}

 

 

Edited by LatiMacciato
Link to comment
Share on other sites

9 hours ago, LatiMacciato said:

I'm glad I could help .. well .. sad news is on my old career 1.3.0 savegame that i copied over to the new KSP 1.3.1 (both highly modded) included a sad borky one :/

This one that has gotten the fix module while beeing an original potatoroid, but still looks very distorted

[image placeholder]


MODULE
{
	name = ModuleAsteroid
	isEnabled = True
	seed = 4.305785E+07
	AsteroidName = Ast. TBG-132
	prefabBaseURL = Procedural/PA_C
	currentState = 1
	stagingEnabled = True
	EVENTS { }
	ACTIONS { }
	UPGRADESAPPLIED { }
}
-- snip --

MODULE
{
	name = ModuleAsteroidFix
	isEnabled = True
	seed = 43057851
	stagingEnabled = True
	EVENTS { }
	ACTIONS { }
	UPGRADESAPPLIED { }
}

 

 

But the seed is saved. It also should stay after reload, and the floating point "seed" should also stay the same.

Strange. I also have a save from 1.3 with an asteroid with several hatches attached, but the first world with it alright.

Is there anything in the logs?

Link to comment
Share on other sites

50 minutes ago, allista said:

But the seed is saved. It also should stay after reload, and the floating point "seed" should also stay the same.

Strange. I also have a save from 1.3 with an asteroid with several hatches attached, but the first world with it alright.

Is there anything in the logs?

only thing I found was

Spoiler

171114T164918.253 [ERROR] [PDebug.Error] Invalid integer value! Field seed, value -4.661268E+07 on object of type ModuleAsteroid
171114T164918.406 [ERROR] [PDebug.Error] Invalid integer value! Field seed, value 8.342506E+07 on object of type ModuleAsteroid
171114T164921.097 [ERROR] [PDebug.Error] Invalid integer value! Field seed, value 4.813666E+07 on object of type ModuleAsteroid
171114T164921.244 [ERROR] [PDebug.Error] Invalid integer value! Field seed, value 4.305785E+07 on object of type ModuleAsteroid

--snip--

171114T164147.560 [WARNING] [ConfigNode.Load] File '/mnt/Games/LinuxInstalledGames/Kerbal Space Program_current/GameData/Hangar/Plugins/../Hangar.user' does not exist

--snip--

171114T164934.289 [WARNING] [ConfigNode.Load] File '/mnt/Games/LinuxInstalledGames/Kerbal Space Program_current/GameData/000_AT_Utils/Plugins/../000_AT_Utils.user' does not exist

 

full log

maybe you can see more

Edited by LatiMacciato
Link to comment
Share on other sites

pggo9Jk.jpg

K8UQ3vb.jpg

@stali79   The screenshots of the mothership. If you dont mind me spamming the thread with non-mod-related stuff then I can also post the shuttles, if you like.

With experimental drives this has 39 000 deltav (thousand, not hundred) and moderate 0.5 TWR. Assuming empty.

Actually I am thinking of resizing the bays to use OPT KH as well because the Mark 4 shuttle cargobay can fit entire KH cargo inside of it. Thats about 2.5 jumbos.

Edited by agrock
Link to comment
Share on other sites

6 hours ago, agrock said:

 

Actually I am thinking of resizing the bays to use OPT KH as well because the Mark 4 shuttle cargobay can fit entire KH cargo inside of it. Thats about 2.5 jumbos.

I added tweakscale settings for OPT on my install, huge bays with small part counts :)

I can actually fit the biggest VTOL hanger from this mod into the OPT K cargo bay :o

Hanger extender becomes a must though as you can only fit a couple of 20m parts in the SPH.

Link to comment
Share on other sites

On 15.11.2017 at 8:15 AM, Oiff said:

I added tweakscale settings for OPT on my install, huge bays with small part counts :)

I can actually fit the biggest VTOL hanger from this mod into the OPT K cargo bay :o

Hanger extender becomes a must though as you can only fit a couple of 20m parts in the SPH.

Nah, its not as difficult as I may have portrayed it. About four OPT J cargo bays (six on mothership) would probably fit everything I need to establish a colony. Thats inflatable habitat, refinery and drills, a workshop. Rest can be just DIY kits which take even less space. Thats 4 round trips to the surface. I think hangar fairings would be applicable. I could also send in a mobile crane (using KAS) to move cargo on the ground. 

Link to comment
Share on other sites

I asked preiously how to build ships in space, and I found a way to do that. I am using the KSTS (Transport System) mod which monly records delivery missions. That is, you deliver x tons of cargo to periapsis y, and then you can automate delivery up to that mass and altitude. But there is also a secondary feature to that mod... constuction in space! It needs spaceport (52 tons hangar-alike part) but it CAN BUILD IN SPACE. Just FYI folks.

Link to comment
Share on other sites

Still using KSP 1.3.0, so Hangar 3.3.2 - I find that if I load the automatically-created quicksaves (with names of the form "<vessel-launched>-before_launch") from immediately before launching a vessel, the vessel that was to be launched just... disappears. It's gone from the hangar, but it's not spawned in the world.

This does not happen with manual quicksaves, and any other hangared vessels, whether in the same hangar or another one on the same craft, are unaffected.  That's something of a mitigating factor. Nevertheless, it makes those automatic saves worse than useless. I have thus far observed this phenomenon with a fairing hangar and with an inline hangar, the latter while testing in a sandbox game on the launchpad.

My guess (and come to think of it I should really read the code rather than just conjecturing like this) would be that the hangar plugin is triggering the quicksave and immediately proceeding with the remove-from-hangar-spawn-into-world dance, so that by the time the quicksave actually occurs the first of those steps has already finished.  Is there a way to wait until the quicksave is finished before continuing? Some blocking variant of whatever call it is you use to save the game, perhaps?

Hopefully-final edit: I was partially wrong.  The bug exists, but it's not a race condition; the code as it stands just removes the vessel before firing off the save. My best guess for a fix (bearing in mind that I don't know your code and this may be horribly wrong) would be to move the save from Source/HangarMachinery.cs line 753 up a few lines, to the top of the function (or at least to immediately after "if(!can_restore(stored_vessel)) return;").  You're removing the vessel in an if-test on line 742, before the save is fired off.

Edited by Darael
Link to comment
Share on other sites

5 hours ago, Darael said:

Still using KSP 1.3.0, so Hangar 3.3.2 - I find that if I load the automatically-created quicksaves (with names of the form "<vessel-launched>-before_launch") from immediately before launching a vessel, the vessel that was to be launched just... disappears. It's gone from the hangar, but it's not spawned in the world.

This does not happen with manual quicksaves, and any other hangared vessels, whether in the same hangar or another one on the same craft, are unaffected.  That's something of a mitigating factor. Nevertheless, it makes those automatic saves worse than useless. I have thus far observed this phenomenon with a fairing hangar and with an inline hangar, the latter while testing in a sandbox game on the launchpad.

My guess (and come to think of it I should really read the code rather than just conjecturing like this) would be that the hangar plugin is triggering the quicksave and immediately proceeding with the remove-from-hangar-spawn-into-world dance, so that by the time the quicksave actually occurs the first of those steps has already finished.  Is there a way to wait until the quicksave is finished before continuing? Some blocking variant of whatever call it is you use to save the game, perhaps?

Hopefully-final edit: I was partially wrong.  The bug exists, but it's not a race condition; the code as it stands just removes the vessel before firing off the save. My best guess for a fix (bearing in mind that I don't know your code and this may be horribly wrong) would be to move the save from Source/HangarMachinery.cs line 753 up a few lines, to the top of the function (or at least to immediately after "if(!can_restore(stored_vessel)) return;").  You're removing the vessel in an if-test on line 742, before the save is fired off.

Thanks for the report and for the fix suggestion! :) You are most likely correct. :blush:

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