FNF-Porter/Porter.py

Stages with animations cause the game to fail to load the stage.

Closed this issue · 1 comments

Issue Checklist

  • I have properly named the issue
  • I looked in issues/discussions, if my question was previously anwsered

What is the preset selected?

Full mod

What are the contents of the latest .log file? (if applicable)

No response

What are the contents of your mod folder? (if applicable)

No response

Additional Context (if applicable)

When converting a stage that has an animation and attempting to load a song that uses it, the game outputs this error:

https://github.com/FunkinCrew/Funkin/blob/7490b7eab7881b443aad01bb4dff22aa0e6ecfbe/source/funkin/play/PlayState.hx#L1599

However, removing the animations from the json file fixes the issue.

        {
            "zIndex": 298,
            "position": [
                -1500.0,
                -1020.0
            ],
            "scale": [
                1,
                1
            ],
            "animType": "sparrow",
            "name": "smokey",
            "isPixel": false,
            "startingAnimation": "idle",
            "assetPath": "garSmoke",
            "scroll": [
                1,
                1
            ],
            "animations": [
                {
                    "offsets": [
                        0,
                        0
                    ],
                    "flipY": false,
                    "frameRate": "24",
                    "prefix": "smokey instance",
                    "looped": true,
                    "flipX": false,
                    "name": "Idle"
                }
            ]
        },
        {
            "zIndex": -1,
            "position": [
                -1500.0,
                -1320.0
            ],
            "scale": [
                1,
                1
            ],
            "animType": "sparrow",
            "name": "smokey2",
            "isPixel": false,
            "startingAnimation": "idle",
            "assetPath": "garSmoke",
            "scroll": [
                1,
                1
            ],
            "animations": [
                {
                    "offsets": [
                        0,
                        0
                    ],
                    "flipY": false,
                    "frameRate": "24",
                    "prefix": "smokey instance",
                    "looped": true,
                    "flipX": false,
                    "name": "Idle"
                }
            ]
        }

Fixed!

Issues: frameRate was defined with string when it needs int.

startingAnimation should have Idle, not idle.