bcmpinc / StardewHack

A bunch of Stardew Valley mods that heavily rely on IL code modification.
GNU Lesser General Public License v3.0
20 stars 14 forks source link

(Wear More Rings) Improve placement of ring slots and trinkets #103

Open GizmoTheMoonPig opened 5 months ago

GizmoTheMoonPig commented 5 months ago

Hello! I cant play the game without a few more ring slots, so I obviously install this mod. One thing that bugged me quite a bit was that the trinket slots rendered over the player name even if there was room for them to squeeze in next to the rings. I normally play with 6 ring slots and thought the trinket slots would fit nicely under the rings if the slot rendering was changed slightly.

So, I did just that! If you have 8 or less rings active, slots will be drawn left to right and then down instead of down and then to the right. In addition, Trinkets will be moved to render right under the ring slots if you have 6 or less active. You wont see any change if the default 8 are enabled, but with less there the screen will look a little more organized. Heres a little sample of what it looks like now with 5 ring slots enabled: image

Ive never dabbled in Stardew Modding before, but I do lots of Minecraft modding so I figured it wouldnt be hard to do something like this as I have a little knowledge into how code works. Please let me know if you want anything adjusted and i'd be happy to make some changes. Thank you!

bcmpinc commented 5 months ago

Thanks for the pull request! This seems like a simple and effective solution.

There seems to be an issue with the code where at one point you check for >6 rings and later for >8 rings. I think that second check should be 6? Another issue is that it breaks the gamepad navigation.

GizmoTheMoonPig commented 5 months ago

The 6 check is for trinket placement and the 8 check is for placing the rings left to right. I suppose that check could also be a 6, I just had it that way so the first 2 rows would always place left to right. Wouldnt matter either way visually.

I was not aware this broke gamepad navigation as I dont use a controller, but I will definitely look into that. Thanks for letting me know!

bcmpinc commented 5 months ago

Ah, I see, that would indeed be fine then.

Gamepad navigation is encoded using those 100something numbers. Every icon has an id and four numbers to indicate what icon is up,left,right,or below of it.

Op do 28 mrt. 2024 23:08 schreef GizmoTheMoonPig @.***>:

The 6 check is for trinket placement and the 8 check is for placing the rings left to right. I suppose that check could also be a 6, I just had it that way so the first 2 rows would always place left to right. Wouldnt matter either way visually.

I was not aware this broke gamepad navigation as I dont use a controller, but I will definitely look into that. Thanks for letting me know!

— Reply to this email directly, view it on GitHub https://github.com/bcmpinc/StardewHack/pull/103#issuecomment-2026218116, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALTNPPRGW4VXVOIJFUAVDY2SIEVAVCNFSM6AAAAABFJSX2E6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRWGIYTQMJRGY . You are receiving this because you commented.Message ID: @.***>

GizmoTheMoonPig commented 5 months ago

Controller support is gonna be the death of me I swear

Ive been chipping away at it, just have one more hurdle to tackle and it should be good. Will let you know once its ready

GizmoTheMoonPig commented 5 months ago

Alright, its finished.

A couple things to note:

I did a LOT of testing and didn't find any issues moving the cursor around the inventory slots with a controller, so I think this is ready to go. Please let me know if you find any other issues and I'll address them. Thanks for your patience :)