Jump to content

CFG Tweaking on Welded Parts


Fwiffo

Recommended Posts

Hi everyone,

I'm creating some weldments with a lot of different parts in them.  So far all is going well, but I want to tweak a few things.  I expect the answer to most of these questions will be "it can't be done", but I'm hoping players out there with deep under-the-hood knowledge of the game might have a trick or two up their sleeves that would help me.

  1. Is there any way to customize the text of the action button ("Toggle Display") and/or display message ("Display: 309.29°") of the ModuleEnviroSensor module?

    I have a multi-sensor science part that includes an Accelerometer, Barometer, Gravimeter and Thermometer.  It works great, except it would be nice to know which "Toggle Display" button corresponds to which instrument.  Also since the pressure display has no units, I sometimes get confused as to which measurement it represents.
    Edit: KSP 1.2 added units for pressure, making the readings bit less ambiguous.
     
  2. Similarly, I'd like to change the "Run Analysis" button to say "Run Ore Analysis" on a weldment that includes a Surface Scanner (ModuleResourceScanner and ModuleAnalysisResource).
     
  3. I have an SC-9001 Science Jr. (material bay) and Mystery Goo™ Containment Unit in my weldment.  Both include a ModuleAnimateGeneric module with animationName = Deploy.  I included both modules in the final part.  When I click the action button for either ("Open Doors" or "Deploy Goo"), it always does the material bay doors animation, and never the Mystery Goo cover animation.  I'm guessing that's because animationName is the same for both.  Anything I can do to work around this (e.g. legacy animation module syntax?)
    Edit: Just realized the Mystery Goo "Deploy" button never actually shows up for the stock part (just the "Observe" one).
    Edit: Solved by copying one of the mu files, editing it to rename "Deploy" to "Geploy", changing the CFG to match, and referencing that model instead of the stock one.

     
  4. The material bay and Mystery Goo animations don't play when the "Observe" action is clicked.  The appropriate science report still comes up fine, I just don't get the animation.  Similarly, the Communotron DTS-M1 (which is part of a different weldment) doesn't extend when I click the "Transmit" action button, although the animation works just fine when I click the "Extend" and "Retract" buttons.  (All of the above work fine in the stock part, of course).  Any ideas to troubleshoot why the animations are no longer "bound" to those buttons in my part?
    Edit: In fact, any idea how the game knows which animation to run for a ModuleScienceExperiment?  I can't figure out how they're wired up in the stock parts.  --> ANSWER: Via the FxModules attribute (points to index of module providing the animation effect).
    Edit: Solved by rearranging ModuleAnimationGeneric modules, and ensuring FxModules / DeployFxModules / etc. points to correct index.  e.g. For Communotron DTS-M1, a key thing is to ensure DeployFxModules attribute of ModuleDataTransmitter maps to the index of the module providing the animation (i.e. index of ModuleAnimationGeneric for KSP 1.1 and optionally KSP 1.2, or ModuleDeployableAntenna if using that for KSP 1.2+), where the first MODULE in the part has index 0.

     
  5. The stock Communotron DTS-M1 has a "Blink Lights" action button visible in the hangar.  But it doesn't seem to do anything?  I think it corresponds to the second ModuleAnimateGeneric (the pulseEmitMediumDishAntenna one) in Squad/Parts/Utility/commsAntennaDTS-M1/commsAntennaDTS-M1.cfg, and possibly mediumDishAntenna_Emit.dds in the same directory.  When is that animation supposed to be played?
    Edit: Solved; this unused action / animation was removed in KSP 1.2.
     
  6. Does anyone know what it means when the GRAVMAX Negative Gravioli Detector display says "NO POWER!"?  I get that on my weldment (even though there's lots of power, both on this part and others), but when the sensor is slapped onto my craft by itself it works fine.
    Edit: Worked around by adding a fake sensor after all the other EnviroSensorModule's.

    Edit: Actually, now solved. Turns out this symptom was due to part module reindexing - more info here.  While the workaround has made things more reliable for me, it isn't required if you are very careful about ordering/indexing of your part modules and avoid removing any modules from your part (except the very last one) once any craft have made use of that part (even if the craft only exists in the Editor).  Alternatively, after you edit a part, rebuild any crafts utilizing it from scratch (more precisely, remove the part from your craft and re-add it).
    7lv7amt.png

Ideally I'd like to tackle these via CFG edits if possible (or mu file edits where necessary); not by programming a new mod.

Here are my hand-tailored CFG files for the welded parts, and craft files (both pre- and post-weld) in case you want to play with them: http://tinyurl.com/Hopper-Mk1-Beta1

Please don't ask "Why do you want to weld all those parts together?"  I have my reasons, and don't feel like debating them :-).

ps. Not sure if this is the right place for this thread; feel free to move it if not.  I didn't put it in the UbioZur thread as I felt my questions have more to do with CFG files than welding.

Edited by Fwiffo
Update with progress
Link to comment
Share on other sites

Add-on discussions would probably have been the best place for this thread, but never mind that.

The customisation (as you describe) is not possible with cfg edits. Some customising is only possible by byte-for-byte editing of the dll's (f.e. buttontext) or customising the source code. It depends on the license of the files if you're allowed to do so. If this is done, it will apply to all usage of the dll's, so also when the appropriate part (f.e. the thermometer) is added to a craft. Whenever the same module is used by more parts, the same modification will be shown for all those parts.

I've done a lot of cfg edits (and welding). In general, welding is great for reducing partcount but becomes unpractical when combining too many parts with special functions. Not everything will work. Weld a beam with a lot of lights on it. The shape and image are as expected but not all lights will work.

Link to comment
Share on other sites

13 hours ago, trooperMNG said:

IIRC you shouldn't put too many science or utility parts in the same welding. They are prone to malfunctions and bugs... welding is good for reducing part count of structural parts (like huge station trusses)

Good advice.  Although from my own experience, it works fine if you're careful (e.g. no more than one of a particular type of part), use some common sense, and manually tailor the CFG's afterward, particularly the applied MODULE's.  Of course I'm still experimenting :-)

Edited by Fwiffo
Link to comment
Share on other sites

So it looks like the "NO POWER!" thing (#6) occurs whenever a part contains multiple ModuleEnviroSensor modules.  The last one shows this message in its display, instead of the expected value.  For what it's worth, I opened a "very low" priority bug report.  In the meantime I worked around by adding a final "fake" module to the part:

MODULE {
	name = ModuleEnviroSensor
	sensorType = NULL
}

It's a hack, and results in an extra (but harmless) action button.  But it seems to work.

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