Jump to content

[SOLVED] ModuleRCS - Multiple Modules - Strange Occurances


Recommended Posts

Hi all,

Working through revamping my Command Pods and Service Modules in my mod, and have hit a bit of a snag regarding RCS on the service module; specifically related to multiple RCS modules on the same part (with different transform names).

 

Situation:

Set up a part with multiple RCS modules, each with their own named set of rcs thrust transforms (e.g. RCSThrustTransforms1, RCSThrustTransforms2)

 

Expected behavior:

Modules function independently, properly toggling each set of rcs transforms on and off.

 

Actual Outcome:

Individual toggles do nothing, only work when all modules are disabled.  Additionally, even when enabled many thrust effects start to not show up (even through the thrust is properly output), and/or start to show RCS effects on the wrong thrusters.
Disabling the first set of RCS ports does nothing by itself; nor does disabling the second set of RCS ports -- if only one is disabled, it makes no difference and acts as if both were still enabled.  If both are disabled, the RCS are properly shut off on the part.  Removing the second module and renaming those transforms the same as the first modules transforms (e.g. a typical one-module setup), and everything functions as it should (aside from imbalanced RCS due to not being able to shut off the ports....)

Investigation showed that it was only the thruster effects that were not being disabled / activating for the wrong inputs.  Testing in space revealed that the modules did in fact cease to output thrust when disabled, but the effects may have still fired from the other module.

 

SOLUTION:

The solution to the visual effects problem is to add:

fxPrefix = UniqueNamePerModule

to the ModuleRCS config

 

The solution to the improper inputs being sent to each set of transforms can be solved by manipulating the fields:

    enableRoll
    enableYaw
    enablePitch
    enableX
    enableY
    enableZ

in the ModuleRCS config.  They default to true, but setting them to false does in fact disable input from that command from effecting that modules' transforms/thrust output.

 

 

Edited by Shadowmage
Link to comment
Share on other sites

I still have not found any solution to this problem, nor made heads-or tails of it given the information (Read: lack of source) available to me.

 

Anyone had luck with multiple RCS modules on a part?

 

Should I just go ahead and file a bug report regarding this?

Link to comment
Share on other sites

That's a lot of setup to do to duplicate... if you post your unity and .cfg files you'll probably get more people willing to poke around. Have you tried removing all partmodules except the two RCS modules?  I've had weird RCS behavior caused by other modules in the part before.  

If we cant' figure out how to make it work the way you're attempting (and a way that SHOULD be working, i'd think?) This does seem like a place where a little plugin might be useful, to extend the RCS part module and make one with multiple configurations?

 

Link to comment
Share on other sites

Sadly, my Unity project file is... massive, and I don't think I could find any place to upload it to for sharing, nor would someone want to download several gigs of files to test this one issue.

I'll see about setting up a simple test-case using a single thrust transform per-module, and uploading the .fbx, .mu, and .cfg files for it, and test that the issue persists on such a simple test case.

 

I'm also not sure on the expandability of the RCS module; last I checked, most everything that would need to be manipulated was private (not even protected; so couldn't even access it from a subclass if you wanted), and worse yet, many things are hard-coded to use the stock ModuleRCS (MJ, RCSBuildAid, etc), so you cannot use a clean-implementation either.

Link to comment
Share on other sites

More investigation on a simplified test case reveals that this might be a visual problem only -- the thrust is properly turned on/off with the modules, but the thrust effects start to showup in the wrong areas/activate at the wrong time whenever multiple modules are installed.

Will continue to do more investigation to find out exactly what is going on / what works / what doesn't work.  If it is just a visual thing only... well... I still can't use it like that, but there -might- be a chance of fixing it using some workarounds ('fake' rcs ports, just for the graphics, that never get disabled, while removing the gfx from the actual ports/thrust transforms).

 

Link to comment
Share on other sites

Additional information, at least regarding a potential workaround -- while working on a prototype RCS balancer, I ran across the following config fields in the ModuleRCS:

    enableRoll
    enableYaw
    enablePitch
    enableX
    enableY
    enableZ

 

It -seems- like these might allow me to create the RCS setup that I'm looking for, by intentionally disabling the thruster for certain inputs -- e.g. to ensure that the translation thrusters only fire for translation commands and not for rotation commands.

Will do further testing to see how these play with multiple RCS modules and if the same graphical errors manifest with multiple modules installed when using these fields for configuration.

Still want to upload a test case as soon as I find a simple one that won't require massive amounts of downloading for others to setup and test -- sadly my time for testing and prototyping stuff is often limited.

Edit:  Also need to do some testing regarding custom fx for the RCS modules -- might be some conflict with one RCS module grabbing the FX for the other module as they are all named the same.  Will need to locate information regarding the recently-added FX-alteration capability for RCS modules though, as the stock configs do not seem to take advantage of this feature.

 

Further Edit:

The problems do appear to be visual / effects only.   More precisely the effects from the secondary module get controlled randomly from input for the first module.

Also, the enableXXX from above does indeed work to disable input for a specific RCS module.

Next to investigate is setting up custom FX groups for each module and seeing if I can fix the visual problems.

Edited by Shadowmage
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...