TheZoroForce240 / FNF-Modcharting-Tools

Apache License 2.0
51 stars 24 forks source link

sustain note is invisible #56

Open 2JENO opened 11 months ago

2JENO commented 11 months ago

image

help please

EdwhakKB commented 11 months ago

Answer this questions and i'll see

Did you applied any modifier? (if yes tell me what modifier and what version of MT [zoro/mine])

Did the error appeared after any update or just installed it for the first time

Can you tell me the version of your libraries?

after you answer i'll see what can i do to help you

2JENO commented 11 months ago

Answer this questions and i'll see

Did you applied any modifier? (if yes tell me what modifier and what version of MT [zoro/mine])

Did the error appeared after any update or just installed it for the first time

Can you tell me the version of your libraries?

after you answer i'll see what can i do to help you

  1. i used your fork(EdwhakKB)
  2. no
  3. 0.7.1h
EdwhakKB commented 11 months ago

okay so in 0.7.1h there are different libraries to use (flixel, sscript, etc etc)?

2JENO commented 11 months ago

okay so in 0.7.1h there are different libraries to use (flixel, sscript, etc etc)?

no

EdwhakKB commented 11 months ago

then try use this libraries

idk.txt

they have the libraries that i use to code

2JENO commented 11 months ago

image

?

2JENO commented 11 months ago

and still invisible ㅠㅠ

EdwhakKB commented 11 months ago

the discord client its not something i know that can happen

but if its still invisible, check the code inside playfield renderer, make sure you specify what engine you was using and check the "note.hx" sustain multiplier alpha

2JENO commented 11 months ago
            if (isSustainNote && prevNote != null)
            {
                    alpha = 0.6;
                    multAlpha = 0.6;
                    hitsoundDisabled = true;
                    if(ClientPrefs.data.downScroll) flipY = true;

                    offsetX += width / 2;
                    copyAngle = false;

                    animation.play(colArray[noteData % colArray.length] + 'holdend');

                    updateHitbox();

                    offsetX -= width / 2;

                    if (PlayState.isPixelStage)
                            offsetX += 30;

                    if (prevNote.isSustainNote)
                    {
                            prevNote.animation.play(colArray[prevNote.noteData % colArray.length] + 'hold');

                            prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.05;
                            if(createdFrom != null && createdFrom.songSpeed != null) prevNote.scale.y *= createdFrom.songSpeed;
2JENO commented 11 months ago

the discord client its not something i know that can happen

but if its still invisible, check the code inside playfield renderer, make sure you specify what engine you was using and check the "note.hx" sustain multiplier alpha

alpha use 0.6

2JENO commented 11 months ago

private function drawSustainNote(noteData:NotePositionData) { if (noteData.alpha <= 0) return; var daNote = notes.members[noteData.index]; if (daNote.mesh == null) daNote.mesh = new SustainStrip(daNote);

    daNote.mesh.scrollFactor.x = daNote.scrollFactor.x;
    daNote.mesh.scrollFactor.y = daNote.scrollFactor.y;
    daNote.alpha = noteData.alpha;
    daNote.mesh.alpha = daNote.alpha;

    var songSpeed = getCorrectScrollSpeed();
    var lane = noteData.lane;

    //makes the sustain match the center of the parent note when at weird angles
    var yOffsetThingy = (NoteMovement.arrowSizes[lane]/2);

    var thisNotePos = ModchartUtil.calculatePerspective(new Vector3D(noteData.x+(daNote.width/2)+ModchartUtil.getNoteOffsetX(daNote, instance), noteData.y+(NoteMovement.arrowSizes[noteData.lane]/2), noteData.z*0.001), 
    ModchartUtil.defaultFOV*(Math.PI/180), -(daNote.width/2), yOffsetThingy-(NoteMovement.arrowSizes[noteData.lane]/2));

    var timeToNextSustain = ModchartUtil.getFakeCrochet()/4;
    if (noteData.noteDist < 0)
        timeToNextSustain *= -1; //weird shit that fixes upscroll lol
        // timeToNextSustain = -ModchartUtil.getFakeCrochet()/4; //weird shit that fixes upscroll lol

    var nextHalfNotePos = getSustainPoint(noteData, timeToNextSustain*0.5);
    var nextNotePos = getSustainPoint(noteData, timeToNextSustain);

    var flipGraphic = false;

    // mod/bound to 360, add 360 for negative angles, mod again just in case
    var fixedAngY = ((noteData.incomingAngleY%360)+360)%360;

    var reverseClip = (fixedAngY > 90 && fixedAngY < 270);

    if (noteData.noteDist > 0) //downscroll
    {
        if (!ModchartUtil.getDownscroll(instance)) //fix reverse
            flipGraphic = true;
    }
    else
    {
        if (ModchartUtil.getDownscroll(instance))
            flipGraphic = true;
    }
    //render that shit
    daNote.mesh.constructVertices(noteData, thisNotePos, nextHalfNotePos, nextNotePos, flipGraphic, reverseClip);

    daNote.mesh.cameras = this.cameras;
    daNote.mesh.draw();
}
2JENO commented 11 months ago

the discord client its not something i know that can happen

but if its still invisible, check the code inside playfield renderer, make sure you specify what engine you was using and check the "note.hx" sustain multiplier alpha

I found this to be the problem but what is error?

EdwhakKB commented 11 months ago

error can be that playfield renderer readed its not loading the sustain alpha with #psych folder style (like i told, it should be, #PSYCH and ver = 0.7) you can modify and fix it changing this line

`var noteAlpha:Float = 1;

if PSYCH

noteAlpha = notes.members[noteIndex].multAlpha;

else

if (notes.members[noteIndex].isSustainNote) noteAlpha = 0.6; else noteAlpha = 1;

end`

    to this one

`var noteAlpha:Float = 1;

if PSYCH

 if (notes.members[noteIndex].isSustainNote)
noteAlpha = 0.6;

else noteAlpha = 1;

else

if (notes.members[noteIndex].isSustainNote) noteAlpha = 0.6; else noteAlpha = 1;

end`

2JENO commented 11 months ago

error can be that playfield renderer readed its not loading the sustain alpha with #psych folder style (like i told, it should be, #PSYCH and ver = 0.7) you can modify and fix it changing this line

var noteAlpha:Float = 1; #if PSYCH noteAlpha = notes.members[noteIndex].multAlpha; #else if (notes.members[noteIndex].isSustainNote) noteAlpha = 0.6; else noteAlpha = 1; #end

    to this one

var noteAlpha:Float = 1; #if PSYCH if (notes.members[noteIndex].isSustainNote) noteAlpha = 0.6; else noteAlpha = 1; #else if (notes.members[noteIndex].isSustainNote) noteAlpha = 0.6; else noteAlpha = 1; #end

still invisible :(

2JENO commented 11 months ago

image

private function drawStuff(notePositions:Array) { for (noteData in notePositions) { if (noteData.isStrum) //draw strum drawStrum(noteData); else if (!notes.members[noteData.index].isSustainNote) //draw regular note drawNote(noteData); else //draw sustain drawNote(noteData);

    }
}

i changed drawSustain to draw note but it worked(but wrong offset)

2JENO commented 11 months ago

hmmmmmm

EdwhakKB commented 11 months ago

check your note offset

it should work fine

2JENO commented 11 months ago

check your note offset

it should work fine

wait, you mean use a drawNote(); ???

2JENO commented 11 months ago

check your note offset

it should work fine

not fixing the drawSustainNote();?

2JENO commented 11 months ago

check your note offset

it should work fine

i found SustainStrip is wrong because i changed this: //render that shit daNote.mesh.constructVertices(noteData, thisNotePos, nextHalfNotePos, nextNotePos, flipGraphic, reverseClip); //addDataToNote(noteData, notes.members[noteData.index]); daNote.cameras = this.cameras; //draw it daNote.draw(); it was visible but i changed to: //render that shit daNote.mesh.constructVertices(noteData, thisNotePos, nextHalfNotePos, nextNotePos, flipGraphic, reverseClip); //addDataToNote(noteData, notes.members[noteData.index]); daNote.mesh.cameras = this.cameras; //draw it daNote.mesh.draw(); it was invisible again.

2JENO commented 11 months ago

check your note offset it should work fine

i found SustainStrip is wrong because i changed this: //render that shit daNote.mesh.constructVertices(noteData, thisNotePos, nextHalfNotePos, nextNotePos, flipGraphic, reverseClip); //addDataToNote(noteData, notes.members[noteData.index]); daNote.cameras = this.cameras; //draw it daNote.draw(); it was visible but i changed to: //render that shit daNote.mesh.constructVertices(noteData, thisNotePos, nextHalfNotePos, nextNotePos, flipGraphic, reverseClip); //addDataToNote(noteData, notes.members[noteData.index]); daNote.mesh.cameras = this.cameras; //draw it daNote.mesh.draw(); it was invisible again.

but idk how to fix it

2JENO commented 11 months ago

i think maybe "daNote.mesh" is problem

2JENO commented 11 months ago

check your note offset

it should work fine

Could you please try compiling it in 0.7.1h?

EdwhakKB commented 11 months ago

sure, but it may work for me, still i'll see and then tell you

2JENO commented 11 months ago

sure, but it may work for me, still i'll see and then tell you

How is it going?

EdwhakKB commented 11 months ago

weird, since i can see the sustain in 0.7.1h did you modify something in the engine before MT update?

2JENO commented 11 months ago

weird, since i can see the sustain in 0.7.1h did you modify something in the engine before MT update?

hmm i added "row" for double ghost note

2JENO commented 11 months ago

image

is this right?

2JENO commented 11 months ago

image

2JENO commented 11 months ago

weird, since i can see the sustain in 0.7.1h did you modify something in the engine before MT update?

can you send that edited 0.7.1h source?

2JENO commented 11 months ago

weird, since i can see the sustain in 0.7.1h did you modify something in the engine before MT update?

weird i can't still see the sustain in 0.7.1h

2JENO commented 11 months ago

weird, since i can see the sustain in 0.7.1h did you modify something in the engine before MT update?

can you send that edited 0.7.1h source please?

2JENO commented 11 months ago

i runned vanila psych 0.7.1h, but it worked. so that bug is maybe from my engine :(

2JENO commented 11 months ago

weird, since i can see the sustain in 0.7.1h did you modify something in the engine before MT update?

hi, I invited you Please fix this problem I don't know how to do this :(

EdwhakKB commented 11 months ago

sure i'll see what can i do to fix it

2JENO commented 11 months ago

sure i'll see what can i do to fix it

thank you!!!

2JENO commented 11 months ago

sure i'll see what can i do to fix it

how was going?

EdwhakKB commented 11 months ago

everything seems fine, thats strange, there isn't any other file you modified?

2JENO commented 11 months ago

everything seems fine, thats strange, there isn't any other file you modified?

ok i will add another file for you, BUT YOU MUST DONT SHARE OR LEAK THIS SOURCE

2JENO commented 11 months ago

everything seems fine, thats strange, there isn't any other file you modified?

아 그리고 고칠게 있으면 고쳐도 됩니다

2JENO commented 11 months ago

everything seems fine, thats strange, there isn't any other file you modified?

and can you have discord? if you yes, can you send your nickname?

2JENO commented 11 months ago

everything seems fine, thats strange, there isn't any other file you modified?

i readded you so check it

EdwhakKB commented 11 months ago

everything seems fine, thats strange, there isn't any other file you modified?

and can you have discord? if you yes, can you send your nickname?

i have a discord

@edwhak_kb

EdwhakKB commented 11 months ago

contact me in discord, i builded a 0.7.2 with MT working, you can use it (includes normal and source)