Jump to content

Kolago

Members
  • Posts

    465
  • Joined

  • Last visited

Posts posted by Kolago

  1. [Exception]: LuaScriptException: [string "chunk"]:147: attempt to concatenate field 'resourceName' (a nil value)

    Found a problem around line 147 in PartCatalog\Plugins\PluginData\PartCatalog\default.rule.lua

    --RCS
    for rcs in modulesByName(part,"ModuleRCS") do
    if containsNodeTypeName(rcs,"resourceName","MonoPropellant") then -- EDIT START (check with iconExist)
    addToModCategory(part,"Control/RCS/MonoPropellant")
    else
    addToModCategory(part,"Control/RCS/"..rcs.values.resourceName,rcs.values.resourceName, "Categories/Control/RCS_Misc")
    end -- EDIT END
    end

    Changed this to:

    	--RCS
    for rcs in modulesByName(part,"ModuleRCS") do
    if containsNodeTypeName(rcs,"resourceName","MonoPropellant") then -- EDIT START (check with iconExist)
    addToModCategory(part,"Control/RCS/MonoPropellant")
    elseif containsNodeTypeName(rcs,"resourceName","LFOX") then
    addToModCategory(part,"Control/RCS/LiquidFuel")
    end -- EDIT END
    end

    This does the trick to get the RCS with LiquidFuel listed!

  2. Adding a 'Replace' call to escape slashes fixes breakage on text descriptions or paths that end in \ escaping a closing quote, fouling up partsString.lua...

    From line 326 of LuaRuleHandler.cs;

    private static string escapeString(object toEscape)

    {

    return toEscape.ToString().Replace("\\","\\\\").Replace("\"", "\\\"");

    }

    I recompiled with this.

    After adding some bigger part packs (LLL & AlchemyTechnologies) I see some errors in the Log:

    [Error]: Could not find part in index: ST.Rover

    [Error]: Could not find part in index: ST.Solarpanel.small

    [Error]: Could not find part in index: ST.LightSpot

    4x [Exception]: LuaScriptException: [string "chunk"]:147: attempt to concatenate field 'resourceName' (a nil value)

    The new mods don't show up.

  3. Ok so yeh this would appear to be a problem.

    I think what's going on is that the part list is empty, so KSP doesn't initialize the field type prefabs.

    I really need to register my override controls there, otherwise parts get loaded up and the registration fails.

    Is this only when all the parts are (initially) hidden?

    Can you leave it a few update frames to hide the parts so that the controls are there to override?

    The "ArgumentOutOfRangeException: Argument is out of range." error comes when the game is loaded an I try to enter the VAB.

    When I remove some mods I can enter the VAB, autotag runs, but I don't get the new mods in the category list.

    When I remove some more all goes back to normal.

  4. After playing around with more and more mods for some hours I think there is a limit for part count I am hitting with PartCatalog. In the logs are errors pointing in this direction.

            **** Loaded PartCatalog ****

    (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

    ArgumentOutOfRangeException: Argument is out of range.

    Parameter name: index
    at System.Collections.Generic.List`1[UIPartActionFieldItem].get_Item (Int32 index) [0x00000] in <filename unknown>:0

    at KSPAPIExtensions.UIPartActionsExtendedRegistration.Register () [0x00000] in <filename unknown>:0

    at KSPAPIExtensions.UIPartActionsExtendedEditorRegistrationAddon.Start () [0x00000] in <filename unknown>:0

    (Filename: Line: -1)

    Crash!!!

    Not a part count problem, but rather a bug with KSPAPIExtensions (probably not expecting the part list to be empty which it is both when filtering too much or when the catalog is initializing the filterset).

    So, maybe this is a KSPAPIExtensions Problem. Any idea what is going on?

  5. After playing around with more and more mods for some hours I think there is a limit for part count I am hitting with PartCatalog. In the logs are errors pointing in this direction.

    **** Loaded PartCatalog ****

    (Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

    ArgumentOutOfRangeException: Argument is out of range.

    Parameter name: index
    at System.Collections.Generic.List`1[UIPartActionFieldItem].get_Item (Int32 index) [0x00000] in <filename unknown>:0

    at KSPAPIExtensions.UIPartActionsExtendedRegistration.Register () [0x00000] in <filename unknown>:0

    at KSPAPIExtensions.UIPartActionsExtendedEditorRegistrationAddon.Start () [0x00000] in <filename unknown>:0

    (Filename: Line: -1)

    Crash!!!

×
×
  • Create New...