Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opponentplay #3549

Closed
wants to merge 28 commits into from
Closed

opponentplay #3549

wants to merge 28 commits into from

Conversation

lemz1
Copy link
Contributor

@lemz1 lemz1 commented Jan 14, 2022

Good afternoon,
I need to repost this pull request (#2770), since I was kinda stupid, but it isn't just a repost.
I updated it to the new code and changed some stuff to have less variables and less lines.

What does this do

This adds the gameplay option 'opponentplay'. If turned on lets you play the opponent chart.
It isn't a big feature but yeah.

@tposejank
Copy link
Contributor

sick

6 similar comments
@HiroMizuki
Copy link
Contributor

sick

@CrusherNotDrip
Copy link
Contributor

sick

@MayoALT
Copy link

MayoALT commented Jan 14, 2022

sick

@SrtHero278
Copy link

sick

@MeguminBOT
Copy link
Contributor

sick

@MasterDirector99
Copy link

sick

@JorgeMiguel22
Copy link

why it doesnt appear anything about opponent play?

@HiroMizuki
Copy link
Contributor

why it doesnt appear anything about opponent play?

what

@JorgeMiguel22
Copy link

i searched in the options and didnt find the opponent play option

@HiroMizuki
Copy link
Contributor

i searched in the options and didnt find the opponent play option

are u sure that u coded everything changed at the PR?
or are u sure that u compiled the right source?

@JorgeMiguel22
Copy link

yeah i changed all the files needed

@SrtHero278
Copy link

If you're looking through the settings through the main menu. That's not how you find it. You gotta select a song and press control.

@JorgeMiguel22
Copy link

oh it worked, thx for helping

@Megalonumber0ne
Copy link

Megalonumber0ne commented Jan 18, 2022

I coded everything in correctly but when i went to play a song (I'll use Dadbattle for an example), all of the notes appear on the opponent's side, including BF's, also when BF and DD sync both of the notes appear at the same time and can only be pressed by either the AI or you (It's mostly the AI that gets the notes)
image
image

EDIT: I have a screenshot of the notes mixing
image

@lemz1
Copy link
Contributor Author

lemz1 commented Jan 18, 2022

I coded everything in correctly but when i went to play a song (I'll use Dadbattle for an example), all of the notes appear on the opponent's side, including BF's, also when BF and DD sync both of the notes appear at the same time and can only be pressed by either the AI or you (It's mostly the AI that gets the notes) image image

EDIT: I have a screenshot of the notes mixing image

The note generation is somewhere in line 1870.
Are you sure that you put in

if (songNotes[1] <= 3 && opponentChart)
{
	gottaHitNote = !section.mustHitSection;
}

Maybe you did a wrong symbol instead of <=

@frantastic24 frantastic24 mentioned this pull request Jan 18, 2022
@Megalonumber0ne
Copy link

Megalonumber0ne commented Jan 18, 2022

Even after checking all of the code that was given to me and re-building the game i still got the same result

@crowplexus
Copy link
Contributor

nice! merged this into my fork and it works perfectly, I've seen some bugs of course (some of which I managed to fix) but here are all of the bugs I could find

  • since Dad is now BF when Opponent Mode is on, Lua Scripts are completely swapped and can present issues (such as animations not working properly if lua scripts are present, or noteskins being swapped, etc)

  • Opponent Mode Dad can't hold notes, his animation stops looping like it should if he was actually Player 2 if you try to do so, and it loops BF's animation instead

  • GF Notes make it so Dad and GF sing together
    Solution: on line 4013, add "&& !gfNote" in "if(opponentChart) {"

  • Alt Anims and Hey Notes are completely bugged, or straight up don't work sometimes (try playing Cocoa or Eggnog)

  • sometimes (rarely) the charts don't swap, nothing major

  • Miss Animations won't play if Ghost Tapping is disabled for Player 2 (try any Week 3 song with Ghost Tapping off)

that everything I know!

@lemz1
Copy link
Contributor Author

lemz1 commented Jan 18, 2022

Miss Animations won't play if Ghost Tapping is disabled for Player 2 (try any Week 3 song with Ghost Tapping off)
Alt Anims and Hey Notes are completely bugged, or straight up don't work sometimes (try playing Cocoa or Eggnog)
GF Notes make it so Dad and GF sing together

fixed and commited

Opponent Mode Dad can't hold notes, his animation stops looping like it should if he was actually Player 2 if you try to do so, and it loops BF's animation instead

can't get it to work bruh

since Dad is now BF when Opponent Mode is on, Lua Scripts are completely swapped and can present issues (such as animations not working properly if lua scripts are present, or noteskins being swapped, etc)

Dad isn't really BF. When BF hits a note Dad plays the animations. So that wouldn't be a problem.
Tho noteskins would probably be a problem

@XtraXD1
Copy link

XtraXD1 commented Jan 18, 2022

sick

@crowplexus
Copy link
Contributor

(latest update)

2022-01-18.17-27-08.mp4
2022-01-18.17-30-26.mp4

the same doesn't happen for BF

@lemz1
Copy link
Contributor Author

lemz1 commented Jan 19, 2022

(latest update)
2022-01-18.17-27-08.mp4
2022-01-18.17-30-26.mp4

the same doesn't happen for BF

Are you sure you coded everything right. The thing with bf dying doesn't really make sense, since I didn't change how health works. Also I noticed that you are using "Bedrock Engine". There's probably different code

@crowplexus
Copy link
Contributor

(latest update)
2022-01-18.17-27-08.mp4
2022-01-18.17-30-26.mp4
the same doesn't happen for BF

Are you sure you coded everything right. The thing with bf dying doesn't really make sense, since I didn't change how health works. Also I noticed that you are using "Bedrock Engine". There's probably different code

the latest commit fixed it

@Stilic
Copy link
Contributor

Stilic commented Jan 21, 2022

Also I noticed that you are using "Bedrock Engine".

It is his own fork of Pysch Engine with custom features from different PRs.

@crowplexus
Copy link
Contributor

BE doesn't change the code as much, it's just that I probably didn't merge the changes correctly, yet it worked with the latest commit fine

@crowplexus
Copy link
Contributor

there's a glitch with the Cam Zoom event, but I found the solution pretty quickly

image

also when you go back to the titlescreen
why do I not pay more attention.
Fixing the crash resulted in botplay animation lasting forever
@FletchunterMC108338
Copy link

Nice but the only problem is lua swapped when opponentplay.

You can now use notehitfix and normal notehit while using multiple scripts.
Example Whitty Definitive Edition:
the accuracy function is just goodNoteHit since it is only supposed to happen when you hit it.
ballistic shake when whitty sings uses opponentNoteHitFix
@FletchunterMC108338
Copy link

Ok

@@ -91,7 +91,7 @@ class GameplayChangersSubstate extends MusicBeatSubstate
var option:GameplayOption = new GameplayOption('Botplay', 'botplay', 'bool', false);
optionsArray.push(option);

var option:GameplayOption = new GameplayOption('Play Opponents Chart', 'opponentplay', 'bool', false);
var option:GameplayOption = new GameplayOption("Play Opponent's Chart", 'opponentplay', 'bool', false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a better name for this could be "Play as Opponent"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shish kebab

@frantastic24
Copy link

this seems to break gf characters singing when the option is on, they don't return to their idle

Friday.Night.Funkin._.Psych.Engine.2022-03-03.00-17-13.mp4

you won't be able to make gf to the sing anim forever but this will be less code so I think that this is for the better
@ShadowMario ShadowMario closed this Jul 4, 2022
@crowplexus
Copy link
Contributor

oh yeah since this is closed and finished now and won't be merged, I recommend to everyone who wants this feature to simply merge them to your own forks or private builds

Josephjr05 added a commit to Josephjr05/The-SkyDecay-Project that referenced this pull request Dec 29, 2022
SomeGuyWhoLovesCoding added a commit to M3llySlayz/Amazing-Engine that referenced this pull request Jun 18, 2023
NOW FULLY FUNCTIONABLE!!

I also added support for when the opponent presses a key and holds there until the key is released 😈

Code source from pull request in the Psych Engine Repo: ShadowMario#3549
Big props to Josephjr05 (https://github.com/Josephjr05) For launching a commit of the fixed version of opponent play
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.