Jump to content

ModuleRCSFXs 'runningEffectName' cannot be changed?


Temeter

Recommended Posts

Hey, I've currently got a problem: Basically, I'm adding ModuleRCSFX to a part that already uses ModuleEnginesFX. However, RCSFX only allows me to use the default 'running' as 'runningEffectName', and I can't change.

So I've added the effect (which works by itslef) into EFFECTS under the others:

	running_rcs
	{
		AUDIO
		{
			channel = Ship
			transformName = SC-GEN-RCS-4F-V-ThrustTransform
			clip = sound_rocket_mini
			volume = 0.0 0.0
			volume = 0.1 0.0
			volume = 0.5 0.05
			volume = 1.0 0.5
			pitch = 0.0 0.5
			pitch = 1.0 1.0
			loop = true
		}
		MODEL_MULTI_PARTICLE
		{
			modelName = Squad/FX/Monoprop_medium
			transformName = SC-GEN-RCS-4F-V-ThrustTransform
			emission = 0.0 0.0
			emission = 0.1 0.0
			emission = 1.0 1.0
			speed = 0.0 0.8
			speed = 1.0 1.0
			localRotation = -90, 0, 0
		}
	}		

 

And this is the ModuleRCSFX, in the second line:

MODULE
{
	name = ModuleRCSFX
	runningEffectName = running_rcs
	stagingEnabled = False
	thrusterTransformName = SC-GEN-RCS-4F-V-ThrustTransform
	thrusterPower = 1
	PROPELLANT
	{
		name = Aerozine50
		ratio = 1
		DrawGauge = True
		resourceFlowMode = NO_FLOW
	}
	PROPELLANT
	{
		name = NTO
		ratio = 1
		resourceFlowMode = NO_FLOW
	}
	atmosphereCurve
 	{
   		key = 0 260
		key = 1 100
 	}

However, the entry in the ModuleRCSFX will always be ignored, and always seems to default to 'running'.

 

@sarbian Sorry to bug you, but this bug report points out a similar problem:

http://bugs.kerbalspaceprogram.com/issues/11785

Isn't (runningEffectName = running_rcs) in the moduleRCSFX enough to change it's runningEffectName? It's basically step 3 of what he said.

How do I change it otherwise?

Edited by Temeter
Link to comment
Share on other sites

Looks like that field is marked as private, and thus even if it is a KSPField it will never be set properly from config.

At least that is how it appears from my dev install.  I cannot locate any runningEffectName field in the ModuleRCSFX class through VS.  So it must either be private (and thus the above statement is true), or it is simply not present.

Edit:  It could also be that my dev install is still using .dll's from a pre-release and that this has already been fixed in the stock module code.  Though by what @Temeter is saying, this does not seem to be the case.

 

An alternate solution, though a bit... rough... would be to patch the engine to use a different 'running' effect block name, and leave the RCS with the default 'running' block. 

No clue how that will all interact when RealPlumes is installed -- IIRC if RP detects a plume on a part, it deletes ALL effects blocks, regardless of if they are used for an engine or rcs, or anything else....

 

Second Edit:  Have added the above information to the bug report.  It most likely is a simple access-level typo/bug -- have done the same myself a few times and wondered why my fields were not being set through configs properly.  Hopefully the dev team will take another look at the bug-report even though it has been marked as 'not a bug' for whatever reason.

Edited by Shadowmage
Link to comment
Share on other sites

10 minutes ago, Shadowmage said:

Looks like that field is marked as private, and thus even if it is a KSPField it will never be set properly from config.

At least that is how it appears from my dev install.  I cannot locate any runningEffectName field in the ModuleRCSFX class through VS.  So it must either be private (and thus the above statement is true), or it is simply not present.

 

An alternate solution, though a bit... rough... would be to patch the engine to use a different 'running' effect block name, and leave the RCS with the default 'running' block. 

No clue how that will all interact when RealPlumes is installed -- IIRC if RP detects a plume on a part, it deletes ALL effects blocks, regardless of if they are used for an engine or rcs, or anything else....

Ah, thanks, that explains it! Actually didn't write it into your thread cause you said you didn't even take a look at it. :D

For SSTU in particular it's not a problem in most cases, because you've never used 'running' as a name. Only problem i've found till now is the Orion Service Module, because it basically uses 3 different RCS systems.

10 minutes ago, Shadowmage said:

Second Edit:  Have added the above information to the bug report.  It most likely is a simple access-level typo/bug -- have done the same myself a few times and wondered why my fields were not being set through configs properly.  Hopefully the dev team will take another look at the bug-report even though it has been marked as 'not a bug' for whatever reason.

Good! I think Sarbian just misread it in the rush towards the release.

Edited by Temeter
Link to comment
Share on other sites

7 minutes ago, Temeter said:

Ah, thanks, that explains it! Actually didn't write it into your thread cause you said you didn't even take a look at it. :D

For SSTU in particular it's not a problem in most cases, because you've never used 'running' as a name. Only problem i've found till now is the Orion Service Module, because it basically uses 3 different RCS systems.

I didn't take a look at it, until I saw this thread :)

 

Might almost be worth opening a new bug-report on it with the information posted above -- really not sure that the devs are going to look at already closed / 'finished' tickets (I generally don't...).

Link to comment
Share on other sites

1 minute ago, JPLRepo said:

No they won't look at that report.
But they will look at this one.
http://bugs.kerbalspaceprogram.com/issues/13050

<3

I was thinking about pinging TriggerAu, but it's probably better to have one at the top. This does seem to be one of those small, but quite limiting problems.

Link to comment
Share on other sites

1 minute ago, JPLRepo said:

There is no need to. The QA and devs will look at that report.

I ment asking him to change the old reports state from 'no bug' to confirmed.^^

Edited by Temeter
Link to comment
Share on other sites

7 minutes ago, sarbian said:

I am not a KSP dev anymore. I can not help with any stock code problem.

I know, but wanted you to explain what you ment with the last sentence, because that's what the guy writing the report (and I) have done.

I assume you just misread it, knowing that function indeed should've worked?

Edited by Temeter
Link to comment
Share on other sites

Not sure if this is helpful to you @Temeter but I've had a similar thing when setting up a part which features both RCSFX and EnginesFX. I tried to define them explicitly in the config file ('running' was engine and 'running_RCS' was the rcs) but it really didn't like it and kept the rcs fx visual playing whole time. I reverted to having both of them referred to as 'running', defined the RCS effects in a module but left the EnginesFX definition in the top of the config file (by the attachment nodes) and the issue was gone. Some where in the wash it sorts itself out. I've chalked it up to black magic for now.

Link to comment
Share on other sites

19 minutes ago, steedcrugeon said:

Not sure if this is helpful to you @Temeter but I've had a similar thing when setting up a part which features both RCSFX and EnginesFX. I tried to define them explicitly in the config file ('running' was engine and 'running_RCS' was the rcs) but it really didn't like it and kept the rcs fx visual playing whole time. I reverted to having both of them referred to as 'running', defined the RCS effects in a module but left the EnginesFX definition in the top of the config file (by the attachment nodes) and the issue was gone. Some where in the wash it sorts itself out. I've chalked it up to black magic for now.

That's... interesting, guess both modules are handled seperatly? I've tried some similar things for multiple RCS systems in a single part, but I guess there wasn't enough black magic for that to work. :D

We do know why it doesn't work tho, Shadowmage found it: The 'runningEffectName' in ModuleRCSFX is set to private, meaning a cfg cannot change the variable, so it always defaults to the default, which is 'running'. Apparently a bug from the prerelease that was supposed to get fixed but is somehow broken again.

Basic workaround is of course to just name the RCS 'running', and give the engineFX effect another name. Only gets tricky when you got 3 RCS systems in a single part, because they apparently really want one effect for each, with it's own unique name.

Edited by Temeter
Link to comment
Share on other sites

hmm, i've re -scrutinsed my part after the discussion on here and it does seem the part that features both a ModulesEngineFX and ModuleRCSFX has audio issues. the visual operates as expected but i have no RCS audio at present.

Edit - scratch that, it does work as intended, i just had my speakers down low and the RCS jet is very quiet.

this config give my part working audio, and visuals for three sperate RCS jets and three seperate thrustTransfroms. the RCS jest all share a name but operate individually when required and the thrustTransforms all work together.

	// --- FX definitions ---
	fx_exhaustFlame_blue_small = 0.0, -0.5, 0.0, 0.0, 1.0, 0.0, running
	fx_exhaustLight_blue = 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, running
	fx_smokeTrail_light  = 0.0, -0.5, 0.0, 0.0, 1.0, 0.0, running
	fx_exhaustSparks_flameout  = 0.0, -0.5, -0.75, 0.0, 1.0, 0.0, flameout

	// --- Sound FX definition ---
	sound_vent_medium = engage
	sound_rocket_hard = running
	sound_vent_soft = disengage
	sound_explosion_low = flameout

	// --- editor parameters ---
	Blah blah blah....

	stagingIcon = SOLID_BOOSTER

	MODULE
	{
		name = ModuleAnimateGeneric
		animationName = deployRetro
		startEventGUIName = Deploy Retro-Rockets
		endEventGUIName = Retract Retro-Rockets
		actionGUIName = Toggle Retro-Rockets
	}
	MODULE
	{
		name = ModuleEngines
		thrustVectorTransformName = thrustTransform
		throttleLocked = True
		exhaustDamage = False
		allowShutdown = False
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 72
		heatProduction = 550
		fxOffset = 0, 0, 0.02
		stagingEnabled = false

		PROPELLANT
		{
			name = SolidFuel
			ratio = 1.0
			DrawGauge = True
		}
		atmosphereCurve //custom curve for the REKT mk1N mini retros
		{
			key = 0 240
			key = 1 190
			key = 7 0.001
		}
	}
	MODULE
	{
		name = ModuleAnimateHeat
		ThermalAnim = emissiveHeat
	}
	MODULE
	{
		name = Landertron
		electricRate = 0.0
		refuelable = true
		animationName = deployRetro
		stagingEnabled = true
	}
	RESOURCE
	{
		name = SolidFuel
		amount = 24
		maxAmount = 24
	}
	MODULE
	{
		name = ModuleRCSFX
		thrusterTransformName = RCS
		thrusterPower = 3
		resourceName = MonoPropellant
		resourceFlowMode = STAGE_PRIORITY_FLOW
		runningEffectName = running
		atmosphereCurve
 		{
   		key = 0 260
  	 	key = 1 100
 		}
	}
	EFFECTS
	{
		running
		{
			AUDIO_MULTI_POOL
			{
				channel = Ship
				transformName = RCSjet
				clip = sound_rocket_mini
				volume = 0.0 0.0
				volume = 0.1 0.0
				volume = 0.5 0.025
				volume = 1.0 0.1
				pitch = 0.0 0.75
				pitch = 1.0 1.5
				loop = true
			}
			MODEL_MULTI_PARTICLE
			{
				modelName = Squad/FX/Monoprop_small
				transformName = RCSjet
				emission = 0.0 0.0
				emission = 0.1 0.0
				emission = 1.0 1.0
				speed = 0.0 0.8
				speed = 1.0 1.0
				localRotation = -90, 0, 0
			}	
		}		
	}
	

 

Edited by steedcrugeon
added config
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...