otavepto / gbe_fork

Fork of https://gitlab.com/Mr_Goldberg/goldberg_emulator
https://gitlab.com/Mr_Goldberg/goldberg_emulator
GNU Lesser General Public License v3.0
200 stars 62 forks source link

EnumerateUserSubscribedFiles support. #23

Closed BTFighter closed 5 months ago

BTFighter commented 6 months ago

Human Fall Flat cannot use workshop maps and skins due to ISteamRemoteStorage_EnumerateUserSubscribedFiles() not implemented yet.

With Rivals of Aether, you can use mods but can't use them either on LAN or Online due to the game thinking it's a local mod.

Kola124 commented 6 months ago

If that is problem then it might fix many games refusing to load mods at all. Few of my offenders are call to arms, man of war, serious sam and rise of nations. RoN cant start without validating mods at all.

Detanup01 commented 6 months ago

could do it. it just ned to get all the published file things

mods.json ID will be data.m_rgPublishedFileId if time_added exist use that if not fallback to current time at epoch SECONDs

otavepto commented 6 months ago

If there's anything I can do to help with this, I would be glad.

otavepto commented 6 months ago

@BTFighter and @Kola124 I would appreciate if you guys could test the build artifacts from the linked PR: https://github.com/otavepto/gbe_fork/pull/36

BTFighter commented 6 months ago

Only have Rivals of Aether installed as of now, so I'll test this game in the meantime.

Do I need to do anything else besides placing the mod in the mod folder? It still thinks it's a local mod.

Detanup01 commented 6 months ago

add a mods.json with the mod id from steamcommunity. you can check the json

BTFighter commented 6 months ago

Doesn't work. image

Here's the mods.json. It's just one mod. I can't fill some since I don't know where to grab those.

{
    "1867608473": {
        "title": "Kris",
        "description": "The legendary human lightener joins the fray! Entering from the Dark World, and into the Land of Aether, Kris, from Deltarune, is ready to face any challenge that comes in their way.",
        "steam_id_owner": 76561198082364910,
        "time_created": 1554997000,
        "time_updated": 1554997000,
        "time_added": 1554997000,
        "tags": "Maps, exampleTag, exampleTag2",
        "primary_filename": "test.sav",
        "primary_filesize": 1000000,
        "preview_filename": "test.png",
        "preview_filesize": 1000000,
        "workshop_item_url": "https://steamcommunity.com/sharedfiles/filedetails/?id=1867608473",
        "upvotes": 1,
        "downvotes": 0,
        "num_children": 0,
        "path": "C:\\Games\\Rivals of Aether\\steam_settings\\mods\\1867608473",
        "preview_url": "file://C://Games//Rivals of Aether//steam_settings//mods//1867608473//preview.jpg",
        "score": 0.7
    }
}
Kola124 commented 6 months ago

Serious Sam gives this error no workshop stuff is loaded, image STEAM_LOG.txt

Tabletop simulator still gives this error image STEAM_LOG.txt

Call to Arms still empty image STEAM_LOG.txt

Included log for every game if that helps in any way

Kola124 commented 6 months ago

I can't fill some since I don't know where to grab those.

http://steamworkshop.download/ and https://catalogue.smods.ru/, skymods can even update mods on request.

BTFighter commented 6 months ago

http://steamworkshop.download/ and https://catalogue.smods.ru/, skymods can even update mods on request.

Sorry, wasn't clear on my message. I meant on mod info like time_added or time_updated, if that's even needed.

Kola124 commented 6 months ago

Most of those things are not needed since everything has default value.

Detanup01 commented 6 months ago

TableTop using others than I said what I implemented .

To Look at: Steam_UGC::GetQueryUGCResult Steam_UGC::CreateQueryUserUGCRequest Steam_UGC::SendQueryUGCRequest Steam_Remote_Storage::UGCDownload Steam_UGC::ReleaseQueryUGCRequest

GetNumSubscribedItems GetSubscribedItems CreateQueryUGCDetailsRequest SendQueryUGCRequest ReleaseQueryUGCRequest

GetItemState GetItemInstallInfo

Steam_Remote_Storage::UGCDownloadToLocation SetReturnAdditionalPreviews AddExcludedTag

(If not say it's automatic from Steam_UGC)

Detanup01 commented 6 months ago

Thanks for testing will try to look at these and trying some stuff. Probably gonna update the repo for this change.

otavepto commented 5 months ago

@BTFighter @Detanup01 That damn build error was a hint at the actual problem for Human Fall Flat
https://github.com/otavepto/gbe_fork/actions/runs/7595360392/job/20687833576#step:11:25

I didn't bother to test the game again after fixing the swapped args, but when I tested it now, it was magically solved!, and now the game loads mods as expected.

Turns out, the buffer sent by the game was not already null terminated, and that memset() call was not there previously, I just added it as a good practice for completeness before merging the PR!. Here's the relevant commit I made earlier:
https://github.com/otavepto/gbe_fork/pull/36/commits/9db4852222ad30b92ec1724d1dfb5f76d63695dd#diff-177705b9e7202e78cce1e3d4f361b88887ae98bfce3f342dfa8966a5f2c80578R1089

Of course the args for memset() were swapped as you can see so the function didn't really null-out the buffer, and the game was getting back a non-proper string.

Give it another try, it should work now.
https://github.com/otavepto/gbe_fork/actions/runs/7595631365

The primary file should be like this:

"primary_filename": "metadata.json",
image ![image](https://github.com/otavepto/gbe_fork/assets/153766569/a669e77e-2975-4934-8cf2-a9a26165dc08)
Detanup01 commented 5 months ago

Nice, will test in weekend or monday.

@Kola124 Please re-check your mods and your games with the newest build! Thanks!

Kola124 commented 5 months ago

I have some unexpected electric construction work to do last few days, will try to test in evening

Kola124 commented 5 months ago

Rise of Nations: still cant load into game

  1. Test with declared primary file: STEAM_LOG.txt image

  2. Test without declared primary file: STEAM_LOG.txt image

  3. Might be helpfull that it is trying to validate mods even when they are not present: STEAM_LOG.txt image

Kola124 commented 5 months ago

Serious Sam Classic Revolution, Tabletop Simulator, Pummel Party work

Call to Arms still nothing: STEAM_LOG.txt image

Serious Sam Fusion gives this STEAM_LOG.txt image

BTFighter commented 5 months ago

The artifacts expired. Can anybody send a copy of the build? Thanks in advance,

Detanup01 commented 5 months ago

https://github.com/otavepto/gbe_fork/releases/tag/release-2024-1-20-workshop-inject-dlls This is the last build

Detanup01 commented 5 months ago

Serious Sam Fusion: It doesnt send anything to download or update anything. Maybe GetItemInstallInfo doing wierd things????

Call to Arms: as I see everything works as expected

otavepto commented 5 months ago

I noticed a debug flag I missed while debugging.
https://github.com/otavepto/gbe_fork/commit/9e84f4abecf510a82bcd48eebdc483767eef19ed

I don't own the game so can't try it, but if you have time test this build artifact: https://github.com/otavepto/gbe_fork/actions/runs/7615222246

Detanup01 commented 5 months ago

:D Nice. Now I think I would make a secound release with the fixed stuff (in my opinion)

otavepto commented 5 months ago

Did that actually work though ? 😄

Detanup01 commented 5 months ago

Idk but probably should, don't own that game so can't say about it.

otavepto commented 5 months ago

Here's a build artifact: https://github.com/otavepto/gbe_fork/actions/runs/7646311641 Let me know anytime if it expired.

Kola124 commented 5 months ago

I see you made some changes now, will test in evening, but last time i tested 2 days ago everything was same.

This is becoming too much resource sink while there are better things to do, it would probably be better to do something else and leave this on sidelines for when 99% of stuff is done.

BTFighter commented 5 months ago

I agree, Human Fall Flat works now as well so I think this issue can be closed. It will be up to you guys though.

image

Detanup01 commented 5 months ago

Thank y'all for testing! @otavepto can be closed :)

otavepto commented 5 months ago

Alright, thanks a lot again everyone, really appreciate all the contributions.