AtmosphereAutopilot icon indicating copy to clipboard operation
AtmosphereAutopilot copied to clipboard

Setting in ControlSurface is gone

Open E-four opened this issue 5 years ago • 4 comments

I know AA uses SyncModuleControlSurface module instead of stock ModuleControlSurface. But there is a problem like this :

when a plane's ModuleControlSurfacevalue like authoritylimitor or deployAngle is modified in pure stock ksp, and when I load this plane in AA ksp, that settings value is gone and setting in action group is also gone.

this is stock module value in .craft.

MODULE
{
	name = ModuleControlSurface
	isEnabled = True
	mirrorDeploy = False
	usesMirrorDeploy = True
	ignorePitch = False
	ignoreYaw = True
	ignoreRoll = False
	deploy = False
	deployInvert = False
	partDeployInvert = False
	deployAngle = 0 // <- here
	authorityLimiter = 150 // <- here
	stagingEnabled = True
	EVENTS
	{
	}
	ACTIONS
	{
		ActionToggle
		{
			actionGroup = Brakes // <- here
			wasActiveBeforePartWasAdjusted = False
		}
		ActionExtend
		{
			actionGroup = None
			wasActiveBeforePartWasAdjusted = False
		}
		ActionRetract
		{
			actionGroup = None
			wasActiveBeforePartWasAdjusted = False
		}
	}
	AXISGROUPS
	{
		deployAngle
		{
			axisGroup = None
			axisIncremental = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			axisInverted = None
			overrideIncremental0 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental1 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental2 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental3 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
		}
		authorityLimiter
		{
			axisGroup = None
			axisIncremental = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			axisInverted = None
			overrideIncremental0 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental1 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental2 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental3 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
		}
	}
	UPGRADESAPPLIED
	{
	}
}
}

and this is AA modified .craft's module in .craft file.

MODULE
{
	name = SyncModuleControlSurface
	isEnabled = True
	mirrorDeploy = False
	usesMirrorDeploy = True
	ignorePitch = False
	ignoreYaw = False
	ignoreRoll = False
	deploy = False
	deployInvert = False
	partDeployInvert = False
	deployAngle = 15 // <- here
	authorityLimiter = 100 // <- here
	stagingEnabled = True
	EVENTS
	{
	}
	ACTIONS
	{
		ActionToggle
		{
			actionGroup = None // <- here
			wasActiveBeforePartWasAdjusted = False
		}
		ActionExtend
		{
			actionGroup = None
			wasActiveBeforePartWasAdjusted = False
		}
		ActionRetract
		{
			actionGroup = None
			wasActiveBeforePartWasAdjusted = False
		}
	}
	AXISGROUPS
	{
		deployAngle
		{
			axisGroup = None
			axisIncremental = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			axisInverted = None
			overrideIncremental0 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental1 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental2 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental3 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
		}
		authorityLimiter
		{
			axisGroup = None
			axisIncremental = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			axisInverted = None
			overrideIncremental0 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental1 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental2 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
			overrideIncremental3 = Pitch, Yaw, Roll, TranslateX, TranslateY, TranslateZ, WheelSteer, WheelThrottle, Custom01, Custom02, Custom03, Custom04
		}
	}
	UPGRADESAPPLIED
	{
	}
}
}

It makes a small problem that transfering .craft file from AA modified KSP -> to stock KSP. Yes. it removes settings of wings. it is a main problem now.

I added .craft file in here.

Skylon.craft.txt Skylon AA.craft.txt

E-four avatar Dec 15 '19 22:12 E-four

Even if I would write some special code to correctly port stock module save nodes, it cannot handle AA -> stock case. The simplest solution is to simply edit craft files and saves and replace module names to fit your installation needs. sed on linux, or something like the script I linked here for Windows: https://forum.kerbalspaceprogram.com/index.php?/topic/124417-180-181-atmosphereautopilot-1516/&do=findComment&comment=3394283

Boris-Barboris avatar Dec 15 '19 22:12 Boris-Barboris

I'm glad I checked Github before I posted this on the forum. I ran into the problem E-four mentioned myself when I tried loading a very specialized craft and found all of my inverted surfaces were undone. it took me a whole day to figure out the cause and isolate it.

From that post it looks like I simply have to rename "ModuleControlSurface" to "SyncModuleControlSurface" in the craft config, and the craft should work just like stock?

Would it be possible to save that script in a .bat file, so that I can simply click on it at it will mass convert all craft in the same location? Forgive me but I have little to no coding experience, all I've done is edit fairings via craft config files.

Avera9eJoe avatar Mar 14 '20 11:03 Avera9eJoe

I'm glad I checked Github before I posted this on the forum. I ran into the problem E-four mentioned myself when I tried loading a very specialized craft and found all of my inverted surfaces were undone. it took me a whole day to figure out the cause and isolate it.

From that post it looks like I simply have to rename "ModuleControlSurface" to "SyncModuleControlSurface" in the craft config, and the craft should work just like stock?

Would it be possible to save that script in a .bat file, so that I can simply click on it at it will mass convert all craft in the same location? Forgive me but I have little to no coding experience, all I've done is edit fairings via craft config files.

Yes, there is a script example in the forum post i linked.

Boris-Barboris avatar Mar 14 '20 11:03 Boris-Barboris

Interesting, I don't know what to do with that script, but I did a manual CTRL-F replacement in the craft I was testing and it worked great. Many thanks.

However, I discovered another bug- AA messes up flaps controlled via KAL controllers. They do not auto-center with AA installed when the controller is set to absolute like they do in stock.

The craft I am doing this testing for is quite the oddball though, controlling flaps via KAL controllers is pretty strange. Link to craft - a k-drive powered cargo plane that uses elevons pushed into landing gear to produce thrust and SAS torque. It also has F/B and L/R translation controlled via KAL controllers, and that is where my issue is with AA. The translation controls don't work properly but everything else seems to work fine.

Avera9eJoe avatar Mar 14 '20 12:03 Avera9eJoe