larsiusprime / polymod

Atomic modding framework for Haxe
MIT License
163 stars 62 forks source link

Error while trying to compile game #21

Closed LinkTheDog closed 3 years ago

LinkTheDog commented 3 years ago

I'm trying to mod fnf and its been frustrating because when I try to compile the game it says source/Note.hx:9: characters 8-33 : Type not found : polymod.format.ParseRules and I try to reget it but it says updating latest polymod and never actually downloads it its been half an hour and in the source code this is it:

`#if polymod import polymod.format.ParseRules.TargetSignatureElement;

end

using StringTools;

class Note extends FlxSprite { public var strumTime:Float = 0;

public var mustPress:Bool = false;
public var noteData:Int = 0;
public var canBeHit:Bool = false;
public var tooLate:Bool = false;
public var wasGoodHit:Bool = false;
public var prevNote:Note;

public var sustainLength:Float = 0;
public var isSustainNote:Bool = false;

public var noteScore:Float = 1;

public static var swagWidth:Float = 160 * 0.7;
public static var PURP_NOTE:Int = 0;
public static var GREEN_NOTE:Int = 2;
public static var BLUE_NOTE:Int = 1;
public static var RED_NOTE:Int = 3;

public var rating:String = "shit";

public function new(strumTime:Float, noteData:Int, ?prevNote:Note, ?sustainNote:Bool = false)
{
    super();

    if (prevNote == null)
        prevNote = this;

    this.prevNote = prevNote;
    isSustainNote = sustainNote;

    x += 50;
    // MAKE SURE ITS DEFINITELY OFF SCREEN?
    y -= 2000;
    this.strumTime = strumTime;

    if (this.strumTime < 0 )
        this.strumTime = 0;

    this.noteData = noteData;

    var daStage:String = PlayState.curStage;

    switch (daStage)
    {
        case 'school' | 'schoolEvil':
            loadGraphic(Paths.image('weeb/pixelUI/arrows-pixels'), true, 17, 17);

            animation.add('greenScroll', [6]);
            animation.add('redScroll', [7]);
            animation.add('blueScroll', [5]);
            animation.add('purpleScroll', [4]);

            if (isSustainNote)
            {
                loadGraphic(Paths.image('weeb/pixelUI/arrowEnds'), true, 7, 6);

                animation.add('purpleholdend', [4]);
                animation.add('greenholdend', [6]);
                animation.add('redholdend', [7]);
                animation.add('blueholdend', [5]);

                animation.add('purplehold', [0]);
                animation.add('greenhold', [2]);
                animation.add('redhold', [3]);
                animation.add('bluehold', [1]);
            }`

And I don't know the error since I'm just trying to mod the game but I don't know why it wont work

Using haxelib if that helps

LinkTheDog commented 3 years ago

It also says

`#if desktop import Discord.DiscordClient; import sys.thread.Thread;

end

import flixel.FlxG; import flixel.FlxSprite; import flixel.FlxState; import flixel.addons.display.FlxGridOverlay; import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond; import flixel.addons.transition.FlxTransitionableState; import flixel.addons.transition.TransitionData; import flixel.graphics.FlxGraphic; import flixel.graphics.frames.FlxAtlasFrames; import flixel.group.FlxGroup; import flixel.input.gamepad.FlxGamepad; import flixel.math.FlxPoint;`

error se before to include a specific version source/TitleState.hx:51: characters 3-18 : Type not found : polymod.Polymod

Ji-Rath commented 3 years ago

I dont believe you are in the right spot for resolving an issue like that. I would try asking for help in the FNF discord. You do need to successfully install polymod first "3. Run haxelib git polymod https://github.com/larsiusprime/polymod.git to install Polymod." If that doesnt work, you could attempt to download the repository and try haxelib install [file]

larsiusprime commented 3 years ago

Heya, like the other comment says according to FNF you will need to use the version on github, not the haxelib version, I kind of work entirely off github and only rarely update to haxelib (sorry).

As it happens ninjamuffin is an old acquaintance of mine and I've been helping him fix some bugs with Polymod, did some digging on that tonight in fact. As it turns out he's doing some stuff with asset libraries I wasn't expecting, so it's going to take some refactoring to make FNF compatible with Polymod. I know now what needs to be done but it might take a while.