Closed McSkinnerOG closed 2 months ago
AutomateToolSwap_SPLITSCREEN_TEST.zip
I made a possible solution, but i have no way to test it in splitscreen, could you test and see if it is fixed?
Amazing everything seems to work as intended now 😄
If both players want AutoSwap then leave default setting but turn Tool Selection Mode to "Player". And if only Keyboard player wants AutoSwap then set "Use Custom Key" to true and LeftClick Again to override the controller mapping to it.
Would be lovely if in future updates if each player could customize the options independently.
Or if you have the time possibly to help me learn a bit about the Stardew Modding Scene i would happily help work on this. I have roughly 5 years of making Unity game modifications and exploits in C# behind me and Stardew is a recent fascination and addiction for my girlfriend and I.
Well, to start modding you will need SMAPI, you can look at the documentation and a few tutorials to get started here: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started
When downloading this repository, you must change the .csproj file to have the correct folder where your game is installed.
ModEntry.cs is where the mod starts, the main part. ModConfig.cs is where the variables for the mod options are located ConfigSetup.cs is where you create the Menu for the ConfigOptions by using the mod "GenericModConfigMenu"
How this mod works: When the player clicks a button, it will take the tile that they were selecting and look for what is in it, if it is a rock, wood, or whatever, and will say what tool is necessary for the action. Then it will loop the player inventory to find where is the index of the necessary tool and then change the player current index to that one. I think the comments i did in the code are decent enough for the rest
To mess with Splitscreens, you will probably have to take a look at this part: https://www.stardewvalleywiki.com/Modding:Modder_Guide/APIs/Multiplayer#Per-screen_data
When playing splitscreen with keyboard and controller the tools get swapped for both people if one players conditions for autoswapping are met.
Player 1 tries to hit tree, Player 2's active hotbar slot gets changed to whatever Player 1's axe is on.
0-O Not sure how to further explain this?