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

Clientside workaround for coop replays #1676

Closed
Askaholic opened this issue Apr 20, 2020 · 7 comments · Fixed by #1866
Closed

Clientside workaround for coop replays #1676

Askaholic opened this issue Apr 20, 2020 · 7 comments · Fixed by #1866
Labels
🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt

Comments

@Askaholic
Copy link
Collaborator

Askaholic commented Apr 20, 2020

Issuehunt badges

Intro

This is a a sort of mini-guide on how to launch coop replays manually. I'm creating this as a github issue because I think it should be pretty simple to get the client to do this automatically. In the mean time people will need to do the set up themselves.

Why don't coop replays work?

Coop maps are not stored in the vault like regular maps. This means that the replay server doesn't recognize coop map names, and instead just write none into the fafreplay header. When the client goes to download the map we see an exception like this:

java.io.FileNotFoundException: https://content.faforever.com/faf/vault/maps/none.zip

How to launch coop replays manually

First off, you will want to have the legacy client installed as it will handle updating to the correct version of FA for the replay: https://github.com/FAForever/client/releases

  1. Download the replay from the vault. An easy way to do this is to hit the "play" button on the coop tab, and cancel when you see the error, just be aware that it is downloaded into C:\ProgramData\FAForever\cache\temp.fafreplay.

  2. Change the replay extension from .fafreplay to .coop.fafreplay. This will tell the legacy client that it should update for the coop game mode.

  3. Right click the replay and open it with the legacy client. It is probably called Forged Alliance Forever - Lobby Client. The legacy client should now update the necessary files, but it will most likely fail with an error message like "Map not found" or a timeout error.
    image

  4. Start the replay from the command line. Open cmd or powershell and paste in the following command:

C:\ProgramData\FAForever\bin\ForgedAlliance.exe /init init_coop.lua /nobugreport /log C:\ProgramData\FAForever\logs\game.log /replay C:\ProgramData\FAForever\cache\temp.scfareplay

Client workaround

I think we should modify the replay launching code so that it skips the map download for coop maps. That way the user can set up their maps directory manually before launching the replay. We should also make sure that the client downloads the correct version of the FA for the replay, as it stands I think it tries to always download the most recent version (the legacy client handles this correctly).

Criteria for closing this issue

I want to be able to click the "play" button on the coop leaderboard and have the client download and successfully launch the replay. The client should update the faf featured mod to the correct version, but may assume that:

  1. The map is already present and at the right version
  2. The coop featured mod is at the right version

Wanna have the bug fixed quickly?
Visit Issue hunt...
Issue hunt


IssueHunt Summary

sheikah45 sheikah45 has been rewarded.

Backers (Total: $10.00)

Submitted pull Requests


Tips

@issuehunt-oss
Copy link

issuehunt-oss bot commented Jun 1, 2020

@askaholic has funded $10.00 to this issue.


@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Jun 1, 2020
@1-alex98
Copy link
Member

1-alex98 commented Jun 2, 2020

Either I am stupid or I tried already to fix it

@1-alex98
Copy link
Member

1-alex98 commented Jun 2, 2020

I made a dialog that asks you to start replays even if the map can not be found

@1-alex98
Copy link
Member

Anybody that wants to try, go ahead

1-alex98 pushed a commit that referenced this issue Oct 4, 2020
Fixes coop replay parsing
Reads in mapName from replay bytes if game type is coop.
Updates FAF to correct version for replay.
Parse replay bytes for map name for all replays

Fixes #1676
@issuehunt-oss
Copy link

issuehunt-oss bot commented Oct 4, 2020

@axel1200 has rewarded $9.00 to @sheikah45. See it on IssueHunt

  • 💰 Total deposit: $10.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $1.00

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Oct 4, 2020
@1-alex98 1-alex98 reopened this Oct 4, 2020
Sheikah45 added a commit that referenced this issue Nov 6, 2020
Fixes coop replay parsing
Reads in mapName from replay bytes if game type is coop.
Updates FAF to correct version for replay.
Parse replay bytes for map name for all replays

Fixes #1676
@Sheikah45
Copy link
Member

@axel1200 why did you reopen this?

@Sheikah45
Copy link
Member

Closing for lack of response

mrchris2000 pushed a commit to mrchris2000/downlords-faf-client that referenced this issue Apr 15, 2022
Fixes coop replay parsing
Reads in mapName from replay bytes if game type is coop.
Updates FAF to correct version for replay.
Parse replay bytes for map name for all replays

Fixes FAForever#1676
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants