FNF-Porter / Porter.py

A tool used to help you port Friday Night Funkin' Mods across engines, with ease! Made using Python
https://gamebanana.com/tools/16982
Other
26 stars 1 forks source link

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

Closed VocalFan closed 4 months ago

VocalFan commented 4 months ago

Issue Checklist

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"
                }
            ]
        }
VocalFan commented 4 months ago

Fixed!

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

startingAnimation should have Idle, not idle.