Code Monkey home page Code Monkey logo

stardew64installer's Introduction

Stardew64Installer is a handy piece of software that turns the Linux version of Stardew Valley into a working 64-bit Windows version!

With SDV 1.5 (& 64bit MG!) on the horizon, this program will be archived until further notice. Feel free to fork it and make changes if you wish to do so, but this repository will no longer be updated for the forseeable future.

For players

Install guide

Follow these instructions closely! This needs a special version of the game.

  1. Update all your mods to their latest versions. (Newer versions may add 64-bit support.)
  2. Download the Linux version of the game:
    1. Go to steam://nav/console in your browser to open the Steam console.
    2. Run this command: download_depot 413150 413153
    3. Wait for the download to finish. This may take a long time and won't show any download progress. Eventually the console will say "Depot download complete" and show the downloaded folder path.
    4. For the rest of the instructions, "depot folder" means this downloaded folder.
  3. Make Stardew Valley 64-bit:
    1. Download and unzip Stardew64Installer from the releases page.
    2. Double-click Stardew64Installer.exe and follow the on-screen instructions.
  4. Install SMAPI 64-bit:
    1. Download and unzip SMAPI 3.10 or later.
    2. Run the SMAPI installer to install it (it will detect 64-bit mode automatically).
      Tip: if it chooses a different game folder, rename the detected folder temporarily and try it again; the installer should then ask for the game path.
  5. Run StardewModdingAPI.exe in the depot folder and the game should be 64-bit!

Troubleshooting

  • Antiviruses may flag/block/delete the installer since it moves/copies/modifies files in your game folder. In that case you may need to whitelist the installer in your antivirus program.

For developers

How Stardew64Installer works

The solution is split into four projects:

project purpose
Stardew64Installer A simple installer console app that runs on players' computers and interactively patches their game.
Stardew64Installer.Framework Internal code shared between the patch projects.
MonoGame.Framework.Patches.mm
StardewValley.Patches.mm
MonoMod patches which rewrite MonoGame.Framework.dll and StardewValley.exe. These are bundled into the installer.

These work together to automatically patch the game files. Behind the scenes, CorFlags.exe is used to modify StardewValley.exe and MonoMod is used to rewrite the assemblies.

The project also includes these DLLs in libs\CopyToGameFolder, which are copied into the game folder to fix 64-bit compatibility:

file description
Galaxy64.dll
GalaxyCSharp.dll
GalaxyCSharpGlue.dll
The 64-bit GOG Galaxy SDK. GalaxyCSharp.dll replaces a 32-bit version, and the others are added to support it.
libSkiaSharp.dll The SkiaSharp 2D graphics library. This replaces a 32-bit version in the game folder. Taken from the 2.80.2 NuGet package (runtimes/win-x64/native/libSkiaSharp.dll).
SDL2.dll
soft_oal.dll
These are Simple DirectMedia Layer and OpenAL, audio dependencies used by the game and needed to run the Linux version on Windows. Added files (they'd normally be provided by the OS).
steam_api64.dll
Steamworks.NET.dll
The 64-bit Windows Steamworks.NET. These replace 32-bit versions in the game folder. Taken from the 15.0.0 release.

Contributing

Contributing is simple. I don't have a set style guide or any real guidelines to follow, feel free to submit pull requests and explain your reasoning. We'll discuss further once a pull request is open (or you can contact me directly beforehand).

All contributors are credited in the release notes.

Preparing a release

To prepare a release build:

  1. Update common.targets, RELEASE-NOTES.md, and Stardew64Installer.Framework/Constants for the new version.
  2. Build the solution in Release mode.
  3. Go to Stardew64Installer/bin/Release/net452.
  4. Zip the Stardew64Installer * folder for the current version.
  5. Upload or share that file.

See also

stardew64installer's People

Contributors

mellozx avatar pathoschild avatar steviegt6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mellozx fforres

stardew64installer's Issues

Game randomly hangs, camera/npcs/mobs won't move, spams red text in the smapi log

https://smapi.io/log/223cc49438cd419e88e9300d846ca074

I've had this happen a few times over the last few days. In this log while in Immersive Farm Remastered 2, previously in Deep Woods & SDV Expanded's town map/Robin's house exterior map. I can still move the farmer around but the game otherwise basically freezes; monsters and npcs stop moving, weather effects freeze/slide weird, etc.

Error will stop spamming and weather effects will work while game is paused, but the error resumes once the game is unpaused.

I've tried disabling ChildToNPC because I noticed it's listed in the first error chunk of the spam, but then it just doesn't get listed the next time the error goes off.

OpenGL error 1281 or 1282

Some users report MonoGameGLException: GL.GetError() returned 1281 or 1282 errors when mods edit textures. This is relatively rare but there's no known fix, so this ticket tracks the known info,

Sample error

[Content Patcher] Unhandled exception applying patch: Trypophobia > EditImage Maps\fall_beach #1.
Microsoft.Xna.Framework.Graphics.MonoGameGLException: GL.GetError() returned 1281
   at Microsoft.Xna.Framework.Graphics.GraphicsExtensions.CheckGLError()
   at Microsoft.Xna.Framework.Graphics.Texture2D.<PlatformSetData>c__AnonStorey1`1.<>m__0()
   at Microsoft.Xna.Framework.Threading.BlockOnUIThread(Action action)
   at Microsoft.Xna.Framework.Graphics.Texture2D.SetData[T](Int32 level, Int32 arraySlice, Nullable`1 rect, T[] data, Int32 startIndex, Int32 elementCount)
   at StardewModdingAPI.Framework.Content.AssetDataForImage.PatchImage_PatchedBy<Platonymous.PyTK>(Object source, Texture2D sourceArea, Nullable`1 targetArea, Nullable`1 patchMode, PatchMode )
   at ContentPatcher.Framework.Patches.EditImagePatch.Edit[T](IAssetData asset) in C:\source\_Stardew\Mods.Pathoschild\Common\Items\ItemRepository.cs:line 291
   at ContentPatcher.Framework.PatchManager.Edit[T](IAssetData asset) in C:\source\_Stardew\Mods.Pathoschild\ContentPatcher\Framework\Tokens\ValueProviders\ManualValueProvider.cs:line 61

OpenGL error descriptions for 1281 (0x0501) and 1282 (0x0502):

GL_INVALID_VALUE, 0x0501
Given when a value parameter is not a legal value for that function. This is only given for local problems; if the spec allows the value in certain circumstances, where other parameters or state dictate those circumstances, then GL_INVALID_OPERATION is the result instead.

GL_INVALID_OPERATION, 0x0502
Given when the set of state for a command is not legal for the parameters given to that command. It is also given for commands where combinations of parameters define what the legal parameters are.

Known patterns

Error 1281

  • Most players never see this error.
  • Affected users generally see the error every time they play, but it can affect different mods or textures each time.
  • Affected textures are shown as black blocks in-game.
  • This portion of the stack trace seems to be consistent for all such errors:
    at Microsoft.Xna.Framework.Graphics.GraphicsExtensions.CheckGLError()
    at Microsoft.Xna.Framework.Graphics.Texture2D.<PlatformSetData>c__AnonStorey1`1.<>m__0()
    at Microsoft.Xna.Framework.Threading.BlockOnUIThread(Action action)
    at Microsoft.Xna.Framework.Graphics.Texture2D.SetData[T](Int32 level, Int32 arraySlice, Nullable`1 rect, T[] data, Int32 startIndex, Int32 elementCount)
    at StardewModdingAPI.Framework.Content.AssetDataForImage.PatchImage_PatchedBy<Platonymous.PyTK>(Object source, Texture2D sourceArea, Nullable`1 targetArea, Nullable`1 patchMode, PatchMode )
    

Error 1282

This is possibly related to 1281, but not enough reports yet to see patterns.

Known affected users

Error 1281

user log Win SMAPI patcher notes
Fri 2021-08-06
marry481
log 10 3.12.2 1.1.8 Affects Content Patcher. Has PyTK.
Thu 2021-07-29
acearohippo (Saelym) on Discord
A, B 10 3.11.0 1.1.8 Affects Content Patcher, Lunar Disturbances, Walk of Life. Has PyTK.
Mon 2021-06-21
Nari on Discord
n/a ? ? ? Attempted fixes: updated graphics drivers.
Tue 2021-05-04
Zilch on Discord
n/a ? ? ?

Error 1282

user log Win SMAPI patcher notes
Sun 2021-08-08
PurrplingCat on Discord
log 10 3.12.2 1.1.8 Affects NPC Adventures.
Thu 2021-06-17
Wingheart on Discord
n/a ? ? ? Affects SpriteMaster.

Game randomly hangs, then crashes with "driver timeout" error

I am now attempting to load mods bit by bit from 0 mods to 496 mods to fix the frame skip issue.

Loaded 1 additional mod (Immersive farm remastered) and started a new multiplayer game by clicking "CO-OP" at title menu.
Game hangs when showing "connecting to online services"

  1. All my 3 monitors screen flickers white
  2. Monitors go black
  3. Monitors come back to life with stardew showing a non-responive white screen
  4. My videocard AMD RX 580 shows a "We detected a driver timeout has occurred on your system"

https://smapi.io/log/eabb5682e54a4f24bb3980a056995804

Tried to do the same thing again and when I clicked the "CO-OP" button again, the "connecting to online services" shows up for a second and the game crashes and closes the Stardew Window. The entire game directory is corrupt and I have to recreate the windows 64 bit stardew all over again from scratch.

Curiously, when it crashes this 2nd time, no smapi error shows up.
https://smapi.io/log/cafd9861629641019687ddb29d21dac0

Created a new copy of Stardew Valley 64-bit and moved the mods over
Clicked "CO-OP" and crashed again.
Looked into my Mods folder and deleted the "data" folder in the "Farm Type Manager" mod and now it is working. The data folder contained a lot of my previous broken save files from 32-bit Stardew valley.
Now I can click "CO-OP" again and start a new multiplayer game

Upon more testing with 72 mods. The whole game crashed.
https://smapi.io/log/3ad8f9fa93614d2ca55c09dcfddf7f33
The game has another screen flicker and a AMD "We detected a driver timeout has occurred on your system"

Cracking sound

I get a cracking sound when any dialog whit an NPC is playing and when you scroll the toolbar fast it doesn't happen in the regular game or the moded 32 bit version just the 64 bit version and at first I thought my speakers were the problem but I tested it whit my headphones and the cracking was still there. I don't think any of my mods are causing this because when I was playing on the 32 bit version it didn't happen and started happening on the 64 bit version. I would attach some mp3 files where you can hear the difference between the 64 bit version and the non moded 32 bit game but I can't and don't know how to.

Games crashes after renaming mods folder

The game ran fine with 400+ mods.

But wih the frame skipping issues I thought less mods would improve it. I renamed the mods folder into "Mods1" so the game would start up with 0 mods to see if it would reduce frame skipping. Game created another folder called Mods. The game ran much smoother in the title menu screen (New, Load, co-op, exit). I clicked co-op, said "connecting to online services", then crashed. Weird.

When loading 0 mods the game also crashes when I start a new game and type a few letters to name my farmer character.
https://smapi.io/log/b756dd3ec8fa4451be9223e398a6fb96

I deleted that folder newly created empty "Mods" and renamed "Mods1" back into "Mods" so it would load the mods back in.
When loading 400+ mods the game crashes
https://smapi.io/log/49ed9653dc1341f18179140267df51dc

I guess I have to extract a gog linux installer and use the windows installer on it again to create a new working copy.

Bad Performance: Frame skipping when running 496 mods

When walking at stock speeds or running with 7x move speed (CJB cheats menu mod), my farmer character's walk/run animation is skipping frames, so is the whole map. Occurs whether v-sync is on or off and in windowed mode. The screen is not tearing apart horizontally.

My PC can handle it just fine when running Stardew 32 bit with SMAPI 3.10 with the same mods.
My PC is an Intel i5 8600K, 32 GB ram, and an RX 580 8GB.

"Screen tearing" when SDV draws map.

There have been users (myself included) experiencing a form of screen tearing when playing on x64. This seems to only happen when the game is drawing (scrolling) the map, the tearing stops when the PC reaches the perimeter. Playing in windowed bordered mode also seems to correct the issue. In game and driver provided vsync have no effect.

Driver Timeout with 82 mods

Driver Timeout Error
Driver Timeout Error (screen goes black) when using 64-Bit Stardew on Windows 10 64-bit, Intel i5, Radeon RX 580 8 GB

To Reproduce

  1. Load game with Mods (This 82 or 29 combination produces this error 100% of the time)
  2. Click CO-OP
  3. Driver Time-out and on rare ocassions the game closes/exits/alt-f4s itself at this point after clicking CO-OP

Log file
Log for Driver Timeout with 82 mods
https://smapi.io/log/dc18af389b5749128232e2040095d5f4

Log for Driver Timeout with 29 mods
https://smapi.io/log/512219a8623948af89f5cbd3cbd05e3c

Game Exits
Game turns itself off (the game closes/exits/alt-f4s itself)

To Reproduce

  1. Load game with Mods (4 default mods + 1 mod, PyTK)
  2. Click CO-OP
  3. Game closes/exits/alt-f4s itself at this point
  4. If not, then create a farmer with the name, farm name, and favorite thing as "1" and skip intro
  5. Text for "You are now hosting a Multiplayer Game" Game closes/exits/alt-f4s itself at this point
  6. If not you can walk around your house and in a few seconds, Game closes/exits/alt-f4s itself at this point

Log for Driver Timeout with 5 mods
https://smapi.io/log/4d8090a8b015451b8fab58b2cbb36aac

Crazy thing is I had this game running with all the above mods on and a ton of others 365+ mods and it ran fine, but frame skipping performance issue, all the way to Spring Day 13 of Year 1. The above tests did not have frame skipping but timeout errorrs and abrupt exiting/alt-f4

OpenGL 3.0 compatible driver error.

Hey folks, been trying to install 64 bit version, and came across this issues.

Followed along this video to the letter, and when running StardewModdingAPI.exe it shows the following .

[SMAPI] SMAPI 3.10.1 with Stardew Valley 1.5.4 on Microsoft Windows 10 Pro N
[SMAPI] Detected custom version: running 64-bit SMAPI with MonoGame, patched by Stardew64Installer 1.1.7
[SMAPI] Mods go here: C:\Users\felip\Documents\depot\depots\413153\6125897\Mods
[SMAPI] Starting game...
[game] The game failed to launch: System.PlatformNotSupportedException: MonoGame requires OpenGL 3.0 compatible drivers, or either ARB_framebuffer_object or EXT_framebuffer_object extensions.Try updating your graphics drivers.
   at OpenGL.GraphicsContext..ctor(IWindowInfo info)
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformSetup()
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Setup()
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, PresentationParameters presentationParameters)
   at Microsoft.Xna.Framework.GraphicsDeviceManager.Initialize()
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice()
   at Microsoft.Xna.Framework.GamePlatform.BeforeInitialize()
   at Microsoft.Xna.Framework.Game.DoInitialize()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at StardewModdingAPI.Framework.SCore.RunInteractively()
[SMAPI] Game has ended. Press any key to exit.

Log here https://smapi.io/log/c09b160edd7542dd84540d1157c52b86

For extra context, got an AMD Radeon RX 5700 XT and an AMD Ryzen 5.
Initially I tried this installation with a bunch of mods, and got the same error, so I went back and did a fresh installation of the linux version with smapi 3.10.1 and got the same error.

Also tried installed latest .net framework and updating my drivers.

Game crashes when attempting to start a new game

Crashes after pressing "Co-op" Button

Crashes after pressing "OK" after selecting "New" single player game (named character, farm, and favourite thing "1", checkmarked skip intro, left all other options default)
https://smapi.io/log/5670875e5cf54c708a63f840d303ebe2

Then it worked twice

Then this happened, may because I kept naming everything "1". (named character, farm, and favourite thing "1", checkmarked skip intro, left all other options default)
https://smapi.io/log/51bd00459ef04c5594727f72ae2e7be6

Started game again and when I pressing the blue sky so I could change focus into the game and press "new" it closed itself. Not driver time out error. Just exited itself. No smapi error was reported.
https://smapi.io/log/3d5805524f704fa9bd4d8753fa0a5973

Error in split-screen mode

When you enable split-screen mode in 64-bit mode, StardewValley.KeyboardInput.Initialize crashes with this error on non-main screens:

An error occurred in the base update loop:
System.InvalidOperationException: TextInput.Initialize can only be called once!

bei StardewValley.KeyboardInput.Initialize(GameWindow window)
bei StardewValley.Game1.Initialize()
bei StardewModdingAPI.Framework.SGame.Initialize()
bei StardewValley.GameRunner.AddGameInstance(PlayerIndex player_index)
bei StardewModdingAPI.Framework.SGameRunner.AddGameInstance(PlayerIndex playerIndex)
bei StardewValley.Menus.LocalCoopJoinMenu.update(GameTime time)
bei StardewValley.Game1.updateActiveMenu(GameTime gameTime)
bei StardewValley.Game1._update(GameTime gameTime)
bei StardewValley.Game1.Update(GameTime gameTime)
bei StardewModdingAPI.Framework.SGame.<>c__DisplayClass40_0.<Update>b__0()
bei StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate)

This is probably related to the MonoMod patch for that method. Reported by Syndicat12 in the SMAPI mod page comments (2021-05-06).

DepotDownloader Automatic Path "Detection" Fails

Attempting to continue with the installation process right after automatic depot downloading fails, since the hardcoded numbers used for directories appeals to differ for different clients. Easy fix, will do this myself later.

Game Closes or Driver Timout Error after starting a new Multiplayer Game 50 Mods

Game Exits / Driver Timout Error
Game turns itself off (the game closes/exits/alt-f4s itself) or Driver Timout Error (Computer freezes momentarily and screen goes black)

To Reproduce

  1. Load game with 50 Mods
  2. Click CO-OP
  3. Game exits, or freezes with mouse cursor unable to move within the game window
  4. If not then, Create a farmer with the name, farm name, and favorite thing as "1" and skip intro
  5. Game Exits or Driver Time out error

Log file
https://smapi.io/log/73187e752d48425f975d1156c7b10aee (Game exits at step 3)
https://smapi.io/log/fa66a453480c4a47b37865555d77fcb2 (Game freezes at step 3)
https://smapi.io/log/0ee157f457764547b89b94bd1bca46ca (Driver Timeout at step 5)

Nonsense with steam

Hi this is Wingheart and i'm reporting the Nonsense here like you said.

For me, and as far as I know only me (?!?!), launching 64 bit Stardew via launch options in the actual Stardew Valley steam library entry results in SMAPI's keyboard API not loading, as though it was somehow removed. This causes PathosChild's mods, and anything else using that specific core API, to fail to load with a "No longer compatible" error.

Launching SMAPI directly from the exe in the folder without Steam, or launching it by adding that exe as a non-steam game, results in it working just fine.

https://smapi.io/log/af309944344241779222532f6e797b8f Here's a SMAPI log. That error at the end just goes on forever and results in unreasonably large logs very very quickly if you don't close the game fast enough.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.