WhirligigGirl / Alien-Space-Programs

Moves the KSC to other planets in the stock Kerbol system in KSP.
Creative Commons Attribution Share Alike 4.0 International
3 stars 3 forks source link

EVE / Scatterer vs Bin / Kerbin #9

Closed gordonfpanam closed 7 years ago

gordonfpanam commented 7 years ago

I'm finding I need to hand-edit any visual enhancement add-on that refers to Kerbin to accommodate Bin. While I can do that, I'm not as sure about most players or any automated tool being able to do this, and still support the home world setting. I'm having a bad time trying to write EVE Module Manager patches that act based on that setting.

Is it at all possible to either rename Kerbin to Bin permanently, or perhaps rename the uninhabited Bin back to Kerbin, regardless of home world setting? Perhaps using cbNameLater and displayName so Bin gets named "Kerbin" but is still referred to internally as Bin, and whatever the home world is can still be internally named "Kerbin" but visibly named Duna / Eve / Laythe. Maybe now that Bin no longer needs the Kerbin template, this is possible.

WhirligigGirl commented 7 years ago

cbNameLater and name can't be Kerbin or things break with or without the Kerbin template. Properties/displayName could probably be changed to Kerbin, but I highly doubt Scatterer will care about it.

gordonfpanam commented 7 years ago

Both Scatterer and EVE seem to use the cbNameLater setting rather than the internal name. Scatterer can have configs for nonexistent worlds loaded, so I can clone Kerbin's config to Bin regardless of homeworld setting, but EVE doesn't like it at all and any missing worlds will cause it to just not load. In EVE's case just s/Kerbin/Bin works.

Maybe changing cbNameLater for Kerbin to "Kerbin-Prime," or something like that, would work. I'll play with the idea.

gordonfpanam commented 7 years ago

These changes to kerbin.cfg will rename Kerbin to Bin:

@Kopernicus:HAS[@AlienSpaceProgramSettings:HAS[#Homeworld[Kerbin]]]:FOR[AlienSpaceProgram]
{
    @Body[Kerbin]
    {
        %cbNameLater = Bin
        %cacheFile = AlienSpacePrograms/Miscellany/Cache/Ker.bin
        %Debug
        {
            %update = true
        }
        %Properties
        {
            %displayName = Bin
        }
    }
}

From there, one only has to s/Kerbin/Bin to any EVE or Scatterer config files to make them work regardless of the homeworld setting. Though having city lights on a supposedly uninhabited Bin would seem odd... Anyway, something to consider.