Giter VIP home page Giter VIP logo

custombarnkit's People

Contributors

kerbas-ad-astra avatar sarbian avatar siimav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

custombarnkit's Issues

Potential memory leaks identified by KSPCommunityFixes

Latest version of KSPCommunityFixes reports on some potential memory leaks on scene changes. A quick look in the log after scene change to Flight Scene shows 2 potential locations in CustomBarnKit where a leak might exist:

[LOG 20:42:39.416] [KSPCF:MemoryLeaks] A destroyed CustomBarnKit:CustomBarnKit instance is owning a onNewGameLevelLoadRequestWasSanctionedAndActioned GameEvents callback. No action has been taken, but unless this mod is relying on this pattern, this is likely a memory leak.
[LOG 20:42:39.429] [KSPCF:MemoryLeaks] A destroyed CustomBarnKit:CustomBarnKit instance is owning a onEditorRestart GameEvents callback. No action has been taken, but unless this mod is relying on this pattern, this is likely a memory leak.

Switch editor button issues

The Switch editor button that was added in KSP 1.4 to the editor causes some serious issues with CBK. After hitting that button it looks as if the game variables somehow get reset to stock values and thus incorrect facility levels are persisted to the savegame after leaving the editor scene.
RP-1 has defined 9 upgrade levels for the tracking station. After upgrading it once, the level is set to 0.111. After using the Switch button in the editor and coming back to the space center, the value gets reset to 0 in my save. After upgrading the facility 3 times to 0.333, it gets rounded to 0.5 because stock itself only has 3 levels.

Custom CommNet ranges incorrect

For some reason CBK does not apply the custom tracking station ranges on startup:

Antenna Example

Doing a quick MM cache fixes the antenna stats (as calculated by the current max station range).

The antenna uses the config from the RO repository: https://github.com/KSP-RO/RealismOverhaul/blob/master/GameData/RealismOverhaul/RO_SuggestedMods/Squad/RO_Squad_Communication.cfg#L91-L99

And the RSS tracking station ranges: https://github.com/KSP-RO/RealSolarSystem/blob/master/GameData/RealSolarSystem/DSN_Ranges.cfg#L17-L23

Note: In this example the antenna range has been changed from 32 (stated in the RO repository) to 3200. This is nonetheless trivial as it happens with both set values. In the screenshot example the range should be:

R = SQRT(AntennaRange * StationRange) = SQRT(3200 * 500000000000) = 40000000 m (40 Mm)

But it is instead 12.6 Mm (a factor of ~3.17 low)

Happens for every antenna type (DIRECT or RELAY), under both "stock" RSS and RO.

20.1 / 45.1

@sarbian here's a head scratcher (not really - just seems to be a f issue)

from 🧣 @Frostiken🧣
Wanted to point out that the research lab is broke. While the limit says "20", the consequence of that means I can research UP TO 20. But not actually anything that costs '20'. I have to research the next tier to unlock the Rocketry tech... and it doesn't unlock anything on the next tier. I'm going to change everything to 20.1 / 45.1, etc. to fix it.

unless I am mistaken, then would you do me a favor and update the docs/wiki?

zer0Kerbal/Komplexity#16

KSP loses track of what buildings are at what level.

With Custom Barn Kit installed in an otherwise-stock KSP 1.8.1 with Breaking Ground, the game will, from time to time, lose track of what buildings and/or what functionality is available. Example steps to reproduce:

  1. Start a new "Sandbox" game with "Normal" difficulty settings.
  2. Click on the Launchpad and select the "ComSat Lx" stock rocket.
  3. Launch it into orbit. Note that you'll be able to create maneuver nodes, and all orbital info options will be available in the displays.
  4. Return to KSC.
  5. Enter the tracking station.
  6. Click on the "ComSat Lx" you just launched and click "Fly".

In step 4, the Tracking Station will look as if it's level 3, and right-clicking will show "Facility level 3", but in step 6, it will act as if it's level 1. You will be unable to create maneuver nodes, and all orbital information except periapsis and apoapsis altitude will display as "LOCKED". If you launch another vessel, you'll re-gain the orbital info and the ability to create maneuver nodes until you return to KSC.

The Tracking Station isn't the only building I've had issues with (I've also occasionally lost the ability to launch large vessels, as if the launch pad had been downgraded to level 1), but it's the easiest to reproduce.

I've experienced this in both Sandbox and Science modes. I haven't tested in Career mode.

orbitDisplayMode is not an array

It looks like in the array conversion, it was missed. It's just the level to swap orbit display, instead of (like the other things) a "what is the value for this TS level". It would be Real Nice (tm) if it were instead an array, so you could specify the enum level for conics display at each TS level.

feature request

would you consider adding the following variables:
RESEARCH building:

  • Surface samples
  • resource transfer

would love to be able to set these separately in Komplexity

thank you for your considerations!

Request: Craft size limits go with VAB/SPH not pad/runway

Suggestion: a 'useBuilding' flag, default to false.
Then change https://github.com/sarbian/CustomBarnKit/blob/master/CustomGameVariables.cs#L359 to:
int levels = useBuilding ?
( isPad ? levelsVAB : levelsSPH)
: (isPad ? levelsLaunchPad : levelsRunway);

and https://github.com/sarbian/CustomBarnKit/blob/master/CustomGameVariables.cs#L366 to:
return NormLevelToArrayValue(useBuilding ?
(isPad ? ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.VAB : ScenarioUpgradeableFacilities.GetFacilityLevel(SpaceCenterFacility.SPH)
: editorNormLevel,
isPad ? craftSizeLimitLaunchPad : craftSizeLimitRunway);

Now, of course, the full solution would be to support having the size limit node in the right nodes. But this will work and is dead simple. :)

And if you don't mind doing that, could you do a compile for 1.2.2? Pretty please? <3

CustomBarnKit-RO needs its own separate remote version file URL

Background

The "URL" property of a version file points to a remote copy of that version file that can be updated as needed. This allows:

  • Notification of new releases
  • Updates of compatibility for the current release

Problem

Both CustomBarnKit and CustomBarnKit-RO share the same "URL" property:

"URL": "https://ksp.sarbian.com/jenkins/job/CustomBarnKit/lastSuccessfulBuild/artifact/CustomBarnKit/CustomBarnKit.version",

That file contains values that are not correct for CustomBarnKit-RO (according to @DRVeyl, never mind if this is correct):

    "KSP_VERSION": {
        "MAJOR": 1,
        "MINOR": 8,
        "PATCH": 99
    },
    "KSP_VERSION_MIN": {
        "MAJOR": 1,
        "MINOR": 8,
        "PATCH": 0
    },
    "KSP_VERSION_MAX": {
        "MAJOR": 1,
        "MINOR": 8,
        "PATCH": 99
    }

This causes the metadata in CKAN to show CustomBarnKit-RO as compatible with KSP 1.8:

https://github.com/KSP-CKAN/CKAN-meta/blob/b6f4c9512fb8ec3b5b1ecea5fd151ac3321322f3/CustomBarnKit-RO/CustomBarnKit-RO-1.1.20.0.ckan#L3-L9

    "identifier": "CustomBarnKit-RO",
    "name": "Custom Barn Kit - RO build",
    "abstract": "A small plugin to change a bunch of parameters related to career, science, the buildings upgrade cost and when various features are unlocked. Build for Realism Overhaul",
    "author": "Sarbian",
    "version": "1.1.20.0",
    "ksp_version_min": "1.8.0",
    "ksp_version_max": "1.8.99",

Initially reported in KSP-CKAN/NetKAN#7859.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.