Jump to content

[1.2] TweakableEverything 1.16-beta - For all your part tweaking needs


toadicus

Recommended Posts

So the basic issue here is that both of those tools search for decouplers to determine if parts are shed at a particular stage. When I disable staging on a decoupler, I can only take it out of the list; I can't make those tools believe it not to be a decoupler, and they couldn't accomodate the tweak themselves without reflection or some dependence on my code. It's possible that I can work around the issue by "poisoning" the decoupler's stage (invaliding their checks later in the logic), but this may come with the side effect that it will always come back at one end of the staging list rather than trying to remember where it was.

I wonder if they use the same (or at least similar) code.

When you disable a decoupler from staging, is there some way for another mod to tell that? Maybe all that needs done is for them to properly ignore that decoupler like they would any other part with no functions. Treat it like a structural fuselage for instance.

Here I am again, the non-coder making coding things sound easy :D

Link to comment
Share on other sites

When you disable a decoupler from staging, is there some way for another mod to tell that? Maybe all that needs done is for them to properly ignore that decoupler like they would any other part with no functions. Treat it like a structural fuselage for instance.

Or... simply recreate a new part by copying the choosen decoupler. Then editing the .cfg and remove the decoupling ability :confused:

But since when do we make the modder's life easier? :D

All right all right... i go to bed.

Link to comment
Share on other sites

I wonder if they use the same (or at least similar) code.

When you disable a decoupler from staging, is there some way for another mod to tell that? Maybe all that needs done is for them to properly ignore that decoupler like they would any other part with no functions. Treat it like a structural fuselage for instance.

Here I am again, the non-coder making coding things sound easy :D

Or... simply recreate a new part by copying the choosen decoupler. Then editing the .cfg and remove the decoupling ability :confused:

But since when do we make the modder's life easier? :D

All right all right... i go to bed.

The code they use is different, but because they're simulating the same thing it is necessarily congruous. I think I may be able to elegantly solve the problem by having unstaged decouplers masquerade as though they were decoupled in the same page as their nearest parent decoupler (or never at all, if there's no decouplers between them and the root part). I'll be tricky, though, to be sure I refigure the stage whenever the part's location changes.

Link to comment
Share on other sites

Tried this with the MK3 cargo bays the other day, pretty neat!

So have I! It really is nice!

But I have a question for Toadicus: I wanted to remove the fact that antenna's can be tweaked two times in the VAB. One time with the complete animation (which is stock, if i'm correct) and the other time by TweakableEverything. To do so, I simply have removed the TweakableAnimateGeneric.cfg from my mod folder, and it worked. But now that I'm fond of TouhouTorpedo's tweakable MK3 Cargo Bay, I dont know what to do. His Cargo Bay uses the AnimatedGeneric animation and if I remove the TweakableAnimateGeneric.cfg file, I cant access the option of opening the bay in the VAB.

So my question is, how can I remove the double tweak option of antenna's without deleting the config file mentionned above?

Link to comment
Share on other sites

So have I! It really is nice!

But I have a question for Toadicus: I wanted to remove the fact that antenna's can be tweaked two times in the VAB. One time with the complete animation (which is stock, if i'm correct) and the other time by TweakableEverything. To do so, I simply have removed the TweakableAnimateGeneric.cfg from my mod folder, and it worked. But now that I'm fond of TouhouTorpedo's tweakable MK3 Cargo Bay, I dont know what to do. His Cargo Bay uses the AnimatedGeneric animation and if I remove the TweakableAnimateGeneric.cfg file, I cant access the option of opening the bay in the VAB.

So my question is, how can I remove the double tweak option of antenna's without deleting the config file mentionned above?

I just double-checked and the stock behavior definitely doesn't have a tweakable on the antennae, so you've got some other mod that's adding the second. To keep TweakableAnimateGeneric from applying itself to antennae, change the first node in TweakableAnimateGeneric.cfg thus:

@PART[*]:HAS[@MODULE[ModuleAnimateGeneric],!MODULE[ModuleDockingNode],!MODULE[ModuleGrappleNode],!MODULE[ModuleDataTransmitter]]
{
MODULE
{
name = ModuleTweakableAnimateGeneric
}
}

Then remove the three nodes below that tweak the text on the antennae.

In other news, here's a testing version of TweakableDecouplers that should maybe hopefully ameliorate the issues with KER's and MechJeb's engineering calcs. Let me know if you run into any new or interesting issues! :P

Link to comment
Share on other sites

TweakableEverything has been updated to version 1.0! I was hoping to wait on a release until I'd got a chance to dig into Tʜᴇ Cʟᴀᴡ, but the list of bugfixes and adjustments was getting too long to justify holding out any longer.

CHANGELOG:


v.1.0 [2014-04-19]
* Relicensed under a Modified BSD license.
* TweakableDecouplers: New logic around the staging toggle to improve the behavior of engineering calculators (Kerbal Engineer Redux, MechJeb, VOID) when staging is disabled.
* TweakableAnimateGeneric no longer adds itself to Tʜᴇ Cʟᴀᴡ, which already features such a tweakable.
* TweakableRCS: Added some logic to fail gracefully if the ModuleRCS has been removed from the part. This should improve compatibility with certain RSS configs for certain mods.
* TweakableEngineFairings: Added some logic to avoid breaking older versions of FAR. Issue also worked around in the latest version of FAR.
* TweakableDockingNode: Config change to correct the issues with placing the inline docking port.
* TweakableDockingNode: Minor adjustments to the behavior of the decoupler staging toggle to hopefully make the feature more intuitive and useful.

Link to comment
Share on other sites

@toadicus -- new update seems to break craft that were already docked with either the inline or shielded docking ports. The animations reset to their "closed" state and the affected ports can't be undocked. I fixed in my current game by using KAS to actually remove the port (yay EVA realism!) I can upload a backup copy of my persistence file if it will help.

Link to comment
Share on other sites

toadicus: could you add checks in anything that references ModuleEngines, ModuleGimbal, or ModuleRCS to be sure that the part actually has the module before doing anything? There's no guarantee your MM patch will run before something else with :Final that switches one of those modules out.

Link to comment
Share on other sites

@toadicus -- new update seems to break craft that were already docked with either the inline or shielded docking ports. The animations reset to their "closed" state and the affected ports can't be undocked. I fixed in my current game by using KAS to actually remove the port (yay EVA realism!) I can upload a backup copy of my persistence file if it will help.

A copy of the affected persistence file would be great. :) I don't recall changing anything that should have affected that, so a ready test bed will be welcome!

toadicus: could you add checks in anything that references ModuleEngines, ModuleGimbal, or ModuleRCS to be sure that the part actually has the module before doing anything? There's no guarantee your MM patch will run before something else with :Final that switches one of those modules out.

Yes, will do. Since you're here, and given a report I got regarding RCS this past week, I'm guessing RSS condo's change these sorts of things regularly? I wonder if I could use MM 2.0 ordering to help this out, too.

Link to comment
Share on other sites

Cool!

RSS doesn't touch anything. It's people who install the whole shebang, i.e. RSS/RO/RF. Yet I don't see what would be the issue with RCS, unless you're actually changing the RCS module which you don't seem to be, just changing some of its members with you own module?

The kicker is the gimbal, where I often *do* replace the gimbal module.

MM2.0 ordering would help, although there's actually multiple mods to key for since what matters isn't RF or RO itself (well, RO matters for RCS), but the specific engine configs (either SFJBRealEngines or RftS).

Link to comment
Share on other sites

A copy of the affected persistence file would be great. :) I don't recall changing anything that should have affected that, so a ready test bed will be welcome!

Perefect. PM'd you a link. The affected craft startes on line 198126, marked with a comment "//toadicus"

Link to comment
Share on other sites

Cool!

RSS doesn't touch anything. It's people who install the whole shebang, i.e. RSS/RO/RF. Yet I don't see what would be the issue with RCS, unless you're actually changing the RCS module which you don't seem to be, just changing some of its members with you own module?

The kicker is the gimbal, where I often *do* replace the gimbal module.

MM2.0 ordering would help, although there's actually multiple mods to key for since what matters isn't RF or RO itself (well, RO matters for RCS), but the specific engine configs (either SFJBRealEngines or RftS).

I've got the changes made internally for TweakableGimbals; TweakableRCS was technically already done, and I don't have any modules that reference any ModuleEngines. I'm going to take another pass through all the tweaks and make sure they all fail gracefully if their module's not there, just in case, and I'll push new libraries Soonâ„¢.

The RCS report I got was specifically to do with FASA.

If I can get a chance this week I'll try to read over the RO/RF MM patches and see if there's a sensible set of mods I can put :AFTER[] tags on.

Link to comment
Share on other sites

Hey, so these decoupling docking ports... :D

Yes, they default to non-decoupling, load as non-decoupling, that's all fine. But when two crafts dock together, it's back to being staged as a decoupler. I'll see if I can get screenshots and a craft up for you soon, but it's easy to replicate.

Link to comment
Share on other sites

Hey, so these decoupling docking ports... :D

Yes, they default to non-decoupling, load as non-decoupling, that's all fine. But when two crafts dock together, it's back to being staged as a decoupler. I'll see if I can get screenshots and a craft up for you soon, but it's easy to replicate.

I think I know why it's happening (technically a display bug due to KSP deciding to resurrect the staging icons that I'd humanely put to sleep), but I'm still looking for the right (read: efficient) put them back down.

Now seeking: young priest, also old priest? ;)

Link to comment
Share on other sites

uhm i'm getting a bug where the shielded docking port doesn't decouple from another sheilded docking port (like i put a shield docking port on another shielded docking port (both open) but they don't decouple on the launchpad or in space... (i use alot of mods so it might be another mod conflicting with it... but idk.)

Link to comment
Share on other sites

A request: is there any way to remove engines (for example, sepratrons and the launch escape tower) from the staging list? It would be really cool to have ullage and escape motors that can only be activated via action groups.

Link to comment
Share on other sites

uhm i'm getting a bug where the shielded docking port doesn't decouple from another sheilded docking port (like i put a shield docking port on another shielded docking port (both open) but they don't decouple on the launchpad or in space... (i use alot of mods so it might be another mod conflicting with it... but idk.)

I'll look in to it, but most of the logic in there is in Squad's code. Since the animated ports don't support it in the stock behavior, I'm sort of backing them into it and it's possible that this item will wind up being a "can't fix" issue. I will let you know after I've had a chance to look!

A request: is there any way to remove engines (for example, sepratrons and the launch escape tower) from the staging list? It would be really cool to have ullage and escape motors that can only be activated via action groups.

The staging removal is really a part tweak, not a module tweak, so applying it universally should be a really easy step. I'll break that out in the next release so it can be applied liberally. :)

Link to comment
Share on other sites

I'm getting very strange issues with TE loaded. It seems like on my first load of every KSP launch, the command pods' torque meters are wwaayyyyyy extreme, and they can't be set properly. As well, trying to go to the action group setup menu and clicking on the control pod doesn't do anything either, it acts like it's not there. Post-first launch, it seems to operate fine, with the torque resetting itself to 0 and having to be calibrated again. It's very odd.

Link to comment
Share on other sites

I'll look in to it, but most of the logic in there is in Squad's code. Since the animated ports don't support it in the stock behavior, I'm sort of backing them into it and it's possible that this item will wind up being a "can't fix" issue. I will let you know after I've had a chance to look!

The staging removal is really a part tweak, not a module tweak, so applying it universally should be a really easy step. I'll break that out in the next release so it can be applied liberally. :)

if it helps any the slide bar values are all "-1" when you right click on one and if you increase it the numbers are insane "2.056E67Y" or something but the thing that caught my eye was the letters... i don't think the letters should be there... (try removing the tweakable docking port values but leave the node there and see what happens? worth a shot)

Link to comment
Share on other sites

Jaxx and AntiMatter001, try deleting the PluginData subfolder under /path/to/KSP/GameData/TweakableEverything/. I managed to reproduce what I think you're looking at today and the issue was to do with some incorrectly-written (read: completely gibberish-filled) config.xml files. I'm not sure what would have caused that, as it's all on Squad's end, but that's definitely where the errors were coming from.

I'll see if I can't add some more robust error handling for the config read. In the meantime, deleting PluginData should help out.

Link to comment
Share on other sites

  • 2 weeks later...

TweakableEverything has been updated to version 1.1! The new version adds TweakableStaging, a new module used by ModuleDockingNode and ModuleDecouplers, improves cross-mod compatibility, and updates to ModuleManager 2.0.8. I've been crazy busy at work lately so there's not much new functionality, but I felt like it'd been too long since the last update.

CHANGELOG:


v.1.1 [2014-05-03]
* TweakableDockingNode & TweakableDecouplers refit to use new TweakableStaging.
* TweakableStaging: New module! Now you can add staging toggles to any part you like, with your own MM patches.
* Updated to ModuleManager 2.0 patch format.
* Improved failure detection in some modules to improve compatibility with other mods, notable RealismOverhaul.

By default, TweakableStaging does not apply itself to parts not already covered in the TweakableEverything umbrella. However, adding it to additional parts according to your preference is easily done through a simple ModuleManager patch (or two). The two examples below demonstrate the basics, and include documentation.


// EXAMPLE ONE: Add staging togggle to launch clamps and defaults them to enabled.
@PART[*]:HAS[@MODULE[ModuleEngines]]:FOR[TweakableEverything]
{
MODULE
{
// The 'name' entry is not optional and should not be changed.
name = ModuleStagingToggle

// Defines if the tweakable should be available in the editor.
// Defaults to false.
activeInEditor = true

// Defines if the tweakable should be available in flight.
// Defaults to false.
// activeInFlight = true

// Defines if staging should be disabled by default.
// Defaults to false (mimicing stock behavior on most parts).
// defaultDisabled = true

// Uncomment this line to define a custom staging icon for the parts.
// Defaults to the part's original icon if it exists, or DECOUPLER_VERT if not.
// Options are:
// MYSTERY_PART, LIQUID_ENGINE, SOLID_BOOSTER, COMMAND_POD, DECOUPLER_VERT, DECOUPLER_HOR,
// FUEL_TANK, PARACHUTES, WINGLETS, SAS, STRUT, STRUT_CONNECTOR, ADV_SAS, RCS_TANK, RCS_MODULE,
// FUEL_LINE, LANDING_LEG, REACTION_WHEEL, WHEEL, LANDING_GEAR, PROBE, SCIENCE_GENERIC
// stagingIcon = LIQUID_ENGINE
}
}

// EXAMPLE TWO: Add staging togggle to launch clamps and defaults them to disabled.
@PART[*]:HAS[@MODULE[LaunchClamp]]:FOR[TweakableEverything]
{
MODULE
{
// The 'name' entry is not optional and should not be changed.
name = ModuleStagingToggle

// Defines if the tweakable should be available in the editor.
// Defaults to false.
activeInEditor = true

// Defines if the tweakable should be available in flight.
// Defaults to false.
// activeInFlight = true

// Defines if staging should be disabled by default.
// Defaults to false (mimicing stock behavior on most parts).
defaultDisabled = true

// Uncomment this line to define a custom staging icon for the parts.
// Defaults to the part's original icon if it exists, or DECOUPLER_VERT if not.
// Options are:
// MYSTERY_PART, LIQUID_ENGINE, SOLID_BOOSTER, COMMAND_POD, DECOUPLER_VERT, DECOUPLER_HOR,
// FUEL_TANK, PARACHUTES, WINGLETS, SAS, STRUT, STRUT_CONNECTOR, ADV_SAS, RCS_TANK, RCS_MODULE,
// FUEL_LINE, LANDING_LEG, REACTION_WHEEL, WHEEL, LANDING_GEAR, PROBE, SCIENCE_GENERIC
stagingIcon = STRUT
}
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...