Modding Help AI Patch only patches over vanilla AI sometimes?

Discussion in 'Starbound Modding' started by ImHereForTheMods, Sep 13, 2019.

  1. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Im trying to make a mod that patches vanilla AI with alpha vanilla AI...
    It works... 50%.

    [​IMG]

    Not sure as to why. I have a patch over the portrait and the frames sections in the ai.config... Like so:



    Code:
    [{
            "op": "replace",
            "path": "/shipStatus/species/hylotl/aiFrames",
            "value": "hylotlAIold.png"
        },
    
        {
            "op": "replace",
            "path": "/species/novakid/portraitFrames",
            "value": "portraits/novakidportrait.png"
        },
        {
            "op": "replace",
            "path": "/species/novakid/aiFrames",
            "value": "NovakidAIold.png"
        },
    
    
        {
            "op": "replace",
            "path": "/shipStatus/species/human/aiFrames",
            "value": "humanAIold.png"
        },
        {
            "op": "replace",
            "path": "/shipStatus/species/glitch/aiFrames",
            "value": "glitchAIold.png"
        },
        {
            "op": "replace",
            "path": "/shipStatus/species/floran/aiFrames",
            "value": "floranAIold.png"
        },
        {
            "op": "replace",
            "path": "/shipStatus/species/avian/aiFrames",
            "value": "avianAIold.png"
        },
        {
            "op": "replace",
            "path": "/shipStatus/species/apex/aiFrames",
            "value": "apexAIold.png"
        }
    ]

    The json is valid, and one side of the patches obviously works, but not the other. Leads me to believe there is another location I need to patch, but not sure what.
    My unpacked assets could be a bit outdated as they are from 1.2.2.

    Any help would be appreciated, thanks.
    (including reference to an easy pak unpacker that doesn't need to be on desktop, and can just unpack. )

    EDIT: Unpacking assets with pakGUI.
     
    Last edited: Sep 13, 2019
  2. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Also, if someone could explain how this patching works exactly with mods... when I patch a new filepath, does it consider that filepath to be in the game directory, or within my mod?
    Thanks!

    EDIT: Found an error:
    [08:59:51.964] [Error] Could not apply patch from file /ai/ai.config.patch in source: ..\mods\AlphaAI. Caused by: (JsonPatchException) Could not apply patch to base. (JsonPatchException) Could not apply operation to base. (TraversalException) No such key 'species' in pathApply("/shipStatus/species/hylotl/aiFrames")

    Still troubleshooting...

    For reference, 1.4.4's ai.config file:
    Code:
    {
      "aiAnimations" : {
        "idle" : {
          "frames" : "<image>:idle.<index>",
          "mode" : "loopForever",
          "frameNumber" : 21,
          "animationCycle" : 3.0,
          "centered" : false
        },
    
        "blink" : {
          "frames" : "<image>:blink.<index>",
          "mode" : "stop",
          "frameNumber" : 1,
          "centered" : false
        },
    
        "talk" : {
          "frames" : "<image>:talk.<index>",
          "mode" : "loopForever",
          "frameNumber" : 2,
          "animationCycle" : 0.5,
          "centered" : false
        },
    
        "yell" : {
          "frames" : "<image>:yell.<index>",
          "mode" : "loopForever",
          "frameNumber" : 2,
          "animationCycle" : 0.5,
          "centered" : false
        },
    
        "refuse" : {
          "frames" : "<image>:refuse.<index>",
          "mode" : "loopForever",
          "frameNumber" : 8,
          "centered" : false
        },
    
        "unique" : {
          "frames" : "<image>:unique.<index>",
          "mode" : "loopForever",
          "frameNumber" : 8,
          "centered" : false
        }
      },
    
      "defaultAnimation" : "idle",
    
      "staticAnimation" : {
        "frames" : "<image>:<index>",
        "mode" : "loopForever",
        "animationCycle" : 0.111,
        "frameNumber" : 4,
        "centered" : false
      },
    
      "scanlineAnimation" : {
        "frames" : "scanlines.png:<index>",
        "mode" : "loopForever",
        "animationCycle" : 0.999,
        "frameNumber" : 14,
        "centered" : false
      },
    
      "staticOpacity" : 0.2,
      "scanlineOpacity" : 0.5,
      "charactersPerSecond" : 45,
    
      "noCrewSpeech" : {
        "animation" : "talk",
        "text" : "^#6f6f6f;$ crew
    ^cyan;> You are the only registered crew member of this ship.
    > Recruiting additional crew members may allow for increased operational efficiency.",
        "speedModifier" : 0.7
      },
    
      "noMissionsSpeech" : {
        "animation" : "talk",
        "text" : "^#6f6f6f;$ missions
    ^cyan;> No mission co-ordinates currently available.",
        "speedModifier" : 0.7
      },
    
      "shipStatus" : {
        "0" : {
          "animation" : "unique",
          "text" : "> Zzz... Zzz... Zzz...",
          "speedModifier" : 0.1
        },
        "1" : {
          "animation" : "talk",
          "text" : "^#6f6f6f;$ status
    ^cyan;> Ship thrusters are currently offline.
    > Ship teleportation system functioning correctly.
    > ^green;Currently only the planet below is accessible.",
          "speedModifier" : 0.7
        },
        "2" : {
          "animation" : "talk",
          "text" : "^#6f6f6f;$ status
    ^cyan;> Ship thrusters are online.
    > Ship teleportation system functioning correctly.
    > ^green;Planets within this star system are accessible.",
          "speedModifier" : 0.7
        },
        "3" : {
          "animation" : "talk",
          "text" : "^#6f6f6f;$ status -f
    ^cyan;> Ship thrusters are online.
    > FTL drive is online.
    > Ship teleportation system functioning correctly.
    > ^green;The entire universe is accessible.",
          "speedModifier" : 0.7
        }
      },
    
      "species" : {
        "apex" : {
          "aiFrames" : "apexAi.png",
          "portraitFrames" : "portraits/apexportrait.png",
          "staticFrames" : "staticApex.png"
        },
        "avian" : {
          "aiFrames" : "avianAi.png",
          "portraitFrames" : "portraits/avianportrait.png",
          "staticFrames" : "staticAvian.png"
        },
        "floran" : {
          "aiFrames" : "floranAi.png",
          "portraitFrames" : "portraits/floranportrait.png",
          "staticFrames" : "staticAvian.png"
        },
        "glitch" : {
          "aiFrames" : "glitchAi.png",
          "portraitFrames" : "portraits/glitchportrait.png",
          "staticFrames" : "staticGlitch.png"
        },
        "human" : {
          "aiFrames" : "humanAi.png",
          "portraitFrames" : "portraits/humanportrait.png",
          "staticFrames" : "staticHuman.png"
        },
       "novakid" : {
          "aiFrames" : "NovakidAI.png",
          "portraitFrames" : "portraits/novakidportrait.png",
          "staticFrames" : "staticGlitch.png"
        },
       "penguin" : {
          "aiFrames" : "NovakidAI.png",
          "portraitFrames" : "portraits/horseboobsportrait.png",
          "staticFrames" : "staticGlitch.png"
        },
        "hylotl" : {
          "aiFrames" : "hylotlAi.png",
          "portraitFrames" : "portraits/hylotlportrait.png",
          "staticFrames" : "staticHylotl.png"
        }
      }
    }
    
    Still not working, even with the patch.
    (New patch)

    Code:
    {
      "aiAnimations" : {
        "idle" : {
          "frames" : "<image>:idle.<index>",
          "mode" : "loopForever",
          "frameNumber" : 21,
          "animationCycle" : 3.0,
          "centered" : false
        },
    
        "blink" : {
          "frames" : "<image>:blink.<index>",
          "mode" : "stop",
          "frameNumber" : 1,
          "centered" : false
        },
    
        "talk" : {
          "frames" : "<image>:talk.<index>",
          "mode" : "loopForever",
          "frameNumber" : 2,
          "animationCycle" : 0.5,
          "centered" : false
        },
    
        "yell" : {
          "frames" : "<image>:yell.<index>",
          "mode" : "loopForever",
          "frameNumber" : 2,
          "animationCycle" : 0.5,
          "centered" : false
        },
    
        "refuse" : {
          "frames" : "<image>:refuse.<index>",
          "mode" : "loopForever",
          "frameNumber" : 8,
          "centered" : false
        },
    
        "unique" : {
          "frames" : "<image>:unique.<index>",
          "mode" : "loopForever",
          "frameNumber" : 8,
          "centered" : false
        }
      },
    
      "defaultAnimation" : "idle",
    
      "staticAnimation" : {
        "frames" : "<image>:<index>",
        "mode" : "loopForever",
        "animationCycle" : 0.111,
        "frameNumber" : 4,
        "centered" : false
      },
    
      "scanlineAnimation" : {
        "frames" : "scanlines.png:<index>",
        "mode" : "loopForever",
        "animationCycle" : 0.999,
        "frameNumber" : 14,
        "centered" : false
      },
    
      "staticOpacity" : 0.2,
      "scanlineOpacity" : 0.5,
      "charactersPerSecond" : 45,
    
      "noCrewSpeech" : {
        "animation" : "talk",
        "text" : "^#6f6f6f;$ crew
    ^cyan;> You are the only registered crew member of this ship.
    > Recruiting additional crew members may allow for increased operational efficiency.",
        "speedModifier" : 0.7
      },
    
      "noMissionsSpeech" : {
        "animation" : "talk",
        "text" : "^#6f6f6f;$ missions
    ^cyan;> No mission co-ordinates currently available.",
        "speedModifier" : 0.7
      },
    
      "shipStatus" : {
        "0" : {
          "animation" : "unique",
          "text" : "> Zzz... Zzz... Zzz...",
          "speedModifier" : 0.1
        },
        "1" : {
          "animation" : "talk",
          "text" : "^#6f6f6f;$ status
    ^cyan;> Ship thrusters are currently offline.
    > Ship teleportation system functioning correctly.
    > ^green;Currently only the planet below is accessible.",
          "speedModifier" : 0.7
        },
        "2" : {
          "animation" : "talk",
          "text" : "^#6f6f6f;$ status
    ^cyan;> Ship thrusters are online.
    > Ship teleportation system functioning correctly.
    > ^green;Planets within this star system are accessible.",
          "speedModifier" : 0.7
        },
        "3" : {
          "animation" : "talk",
          "text" : "^#6f6f6f;$ status -f
    ^cyan;> Ship thrusters are online.
    > FTL drive is online.
    > Ship teleportation system functioning correctly.
    > ^green;The entire universe is accessible.",
          "speedModifier" : 0.7
        }
      },
    
      "species" : {
        "apex" : {
          "aiFrames" : "apexAi.png",
          "portraitFrames" : "portraits/apexportrait.png",
          "staticFrames" : "staticApex.png"
        },
        "avian" : {
          "aiFrames" : "avianAi.png",
          "portraitFrames" : "portraits/avianportrait.png",
          "staticFrames" : "staticAvian.png"
        },
        "floran" : {
          "aiFrames" : "floranAi.png",
          "portraitFrames" : "portraits/floranportrait.png",
          "staticFrames" : "staticAvian.png"
        },
        "glitch" : {
          "aiFrames" : "glitchAi.png",
          "portraitFrames" : "portraits/glitchportrait.png",
          "staticFrames" : "staticGlitch.png"
        },
        "human" : {
          "aiFrames" : "humanAi.png",
          "portraitFrames" : "portraits/humanportrait.png",
          "staticFrames" : "staticHuman.png"
        },
       "novakid" : {
          "aiFrames" : "NovakidAI.png",
          "portraitFrames" : "portraits/novakidportrait.png",
          "staticFrames" : "staticGlitch.png"
        },
       "penguin" : {
          "aiFrames" : "NovakidAI.png",
          "portraitFrames" : "portraits/horseboobsportrait.png",
          "staticFrames" : "staticGlitch.png"
        },
        "hylotl" : {
          "aiFrames" : "hylotlAi.png",
          "portraitFrames" : "portraits/hylotlportrait.png",
          "staticFrames" : "staticHylotl.png"
        }
      }
    }
    
     
    Last edited: Sep 13, 2019

Share This Page