Jump to content

[KSP 1.8+] Airplane Plus Things


Recommended Posts

Some very welcome patches for Airplane Plus, starting with TweakScale done right, on major request by my favorite KSP streamer, @Rocketology.

Currently (at v1.0) the only config is TweakScale. Others might happen but who knows.

For Airplane Plus by @blackheart612

DOWNLOAD ON SPACEDOCK :: AIRPLANE PLUS | THINGS

LICENSE :: MIT

Edited by JadeOfMaar
Link to post
Share on other sites

I foreseeing some Houstons caused by these patches.

The best way to remove TweakScale from a part is to... remove TweakScale of a part using -MODULE[TweakScale],* instead of adding values to lock TweakScale to specific scales.

// 1.25m, Mk3S1
@PART[bellcockpit|citationcockpit|fightercockpit|fightercockpit|fighterinlinecockpit|oh6cockpit|oldfightercockpit|x1cockpit|zerocockpit||hueycockpit|cessnacabin|ces
{
    %MODULE[TweakScale]
    {
        type = stack_square
        defaultScale = 1.25
        scaleFactors = 1.25
        scaleNames = Nope
    }
}

 

Most of the patching are adding a value, instead of editing the current one. This will flag Houstons for sure:

// Tweakscale does not like FS buoyance module (found in the landing skid)
@PART:HAS[#manufacturer[Kerbal?Standard],#category[Ground],!MODULE[FSbuoyancy]]:NEEDS[Tweakscale]:AFTER[AirplanePlus]
{
    %MODULE[TweakScale]
    {
        type = free
    }
}

 

Some others, however, are doing it safely, as this one:

Quote

@PART:HAS[#manufacturer[Kerbal?Standard],#category[Aero],#bulkheadProfiles[size0]]:NEEDS[Tweakscale]:AFTER[AirplanePlus]
{
    %MODULE[TweakScale]
    {
        %type = stack
        %defaultScale = 0.625
    }
}

 

Cheers.

Link to post
Share on other sites

Hey @Lisias. The reason I setup those locked modules for crewed parts is to try to fight off mods like All Tweak or TMasterson5's suite which blindly throw the module around with a single setting (assuming one size fits all). I could change my patch to ensure those parts don't get or don't keep the module if you're especially concerned by it.

1 hour ago, Lisias said:

Most of the patching are adding a value, instead of editing the current one. This will flag Houstons for sure:

Yeah, I know. But I made sure to test this mod enough that no Houstons will cry. :D It also has the safeguard of only affecting parts that have Airplane Plus' brand: Kerbal Standard. It won't go after stock parts or other mods.

1 hour ago, Lisias said:

Some others, however, are doing it safely, as this one:

That last one is like that because it -did- cause some panic! at the disco. :D

Link to post
Share on other sites
On 8/13/2020 at 8:31 PM, JadeOfMaar said:

Hey @Lisias. The reason I setup those locked modules for crewed parts is to try to fight off mods like All Tweak or TMasterson5's suite which blindly throw the module around with a single setting (assuming one size fits all). I could change my patch to ensure those parts don't get or don't keep the module if you're especially concerned by it.

Now I see. All Tweak uses :FINAL on its patches, and this rendered you between a rock and a hard place on this case. And since you don't want to just rule out All Tweak from the instalment, you need to trick it to behave.

Spoiler

And All Tweak needed to use :FINAL because :LAST was not working properly until the absolute latest release of Module Manager, and since Module Manager is not backporting fixes to KSP 1.7 and 1.3, the only way for All Tweak to keep compatibility with everybody is to keep using :FINAL.

EDIT: the :LAST without parameters is what was fixed on the last MM (it was an error, not a feature!) - so there's no alternative to :FINAL, and All Tweak is also between a rock and a hard place.

The problem I'm seeing is that this is kinda putting your SAS on the window (local slang, but I'm pretty sure it's understandable.. :) ), because any rogue patching caught by the Houstons will potentially pinpoint Things as a suspect. As a matter of fact, your patch would end up double patching values on anything that uses :FOR[AirplanePlus] or it's on the Legacy phase of MM - what's not necessarily bad, if you want to easily detect these guys while doing support (it's essentially why TweakScale patches doesn't uses % neither, I need to have a stable and known initial state in order to have a safe patching and anything challenging this initial state needs to be easily detected).

About TMasterson5, the true is that it stomps TweakScale's toes too - and the best way out of the mess is to just remove its TS patches - they are pretty outdated anyway, and the Companions are implementing the features in a controlled and safer way. You don't really need to do something about this one, TweakScale will yell the same about something else, and it's a known problem: TweakScale patches from TMasterson5 just can't be used with TweakScale 2.4 and newer (and All Tweak fulfils the niche in a more behaving way).

May I ask you a favor? Put a comment on the config file about the crewed parts and All Tweak on the next releases? It's unavoidable that sooner or later someone will double patch APP on you, and with a nice remark on the config file I will quickly remember this post and save some time! :) 

 

On 8/13/2020 at 8:31 PM, JadeOfMaar said:

Yeah, I know. But I made sure to test this mod enough that no Houstons will cry. :D It also has the safeguard of only affecting parts that have Airplane Plus' brand: Kerbal Standard. It won't go after stock parts or other mods.

Houstons are an incredibly useful tool, but dumb as a door - they don't tell friend from foe. The problem will happen when someone else, by not being careful as you, will double patch the part and then the user probably will call you the source of the problem because you had the bad luck of being applied later on the KSP.log (because usually it was what was happening on TS in the past, and this created a collective memory). And I'm afraid I'm going to throw some gas on the fire, because I have the TweakScaleCompanion_APP on the oven (with a completely different proposal from yours), and now we have materialised a problem that I had foresaw some time ago.

Well, we don't need to save the whole Kerbin on a single night - TSC_APP is still on the oven, I can think on it later. :) 

So, yeah - I'm assuming you are going to keep the "hard patching" on the values, and you still need to force TweakScale to be installed without scaling some parts. I propose, so, what follows:

@PART[foo|bar|foobar]:NEEDS[Tweakscale]:AFTER[AirplanePlus]
{
    -MODULE[TweakScale],* { }
    %MODULE[TweakScale]
    {
        foo = bar
        bar = foo
        <yada yada yada>
    }
}

Just remove the whole thing if installed, then apply your values from scratch. So any previous patching (as on the legacy phase) will not be able to Houston on you, and any posterior ones is not your problem.

Spoiler

To tell you the true, is kinda what I'm doing on the Companions.

I gave this a lot of thinking, but the present MM rules are not enough to accomplish what we want in a deterministic (safe) way otherwise.

 

 

Edited by Lisias
needed correction on an statement about :LAST on MM (on the spoiler)
Link to post
Share on other sites
  • 3 months later...

I'm having a bit of a problem with this plugin. I placed the contents of the zip file into the data folder, and after trying to load an aircraft which uses airplaneplus parts, all parts for that aircraft are upscaled to maximum size, and the parts are seemingly dispersed at random. The craft as a result is unusable. I tried placing the config file directly in the AirplanePlus folder, no change. I tried placing it in the Tweakscale folder, no change. I removed the config file, AirplanePlusThings folder, and all its contents entirely, still no change.

Link to post
Share on other sites

@Ricarius That problem with craft files happens when its parts have carried Tweakscale modules with different settings/scaling present beforehand. The craft file is poisoned and must be replaced/rebuilt when the Tweakscale settings change. I presume you had AllTweak or the like installed before.

Link to post
Share on other sites

@JadeOfMaar
I did not have AllTweak installed before, but I am installing it now (unless that's not something I should be doing).
Also, these are the crafts in question:
https://kerbalx.com/Sir_Cannonball/X-02S-Strike-Wyvern
https://kerbalx.com/Sir_Cannonball/ADFX-02A-Morgan
https://kerbalx.com/Sir_Cannonball/CFA-44D-Nosferatu

I assume it is then the responsibility of the craft author to fix the crafts?

Edited by Ricarius
Link to post
Share on other sites

@JadeOfMaar
Gotcha, no AllTweak it is. As for the issue, I decided to wipe all mods from the gamedata folder and even uninstall KSP entirely, before reinstalling it and using CKAN to rebuild my modlist using only the mods that are absolutely required for the aforementioned crafts. I then added Airplane Plus Things last, and re-downloaded the crafts to test if they would be loaded in correctly or not. Unfortunately, the problem still exists, so I'd like to confirm if this is a problem that only the craft author can fix, or if there's something wrong with my load order (should I install Tweakscale > Airplane Plus >Airplane Plus Things as I've been doing, or should I install them in a different order?)

Link to post
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...