StardewHack icon indicating copy to clipboard operation
StardewHack copied to clipboard

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

Open GizmoTheMoonPig opened this issue 1 year ago • 5 comments

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!

GizmoTheMoonPig avatar Mar 26 '24 19:03 GizmoTheMoonPig

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.

bcmpinc avatar Mar 28 '24 20:03 bcmpinc

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!

GizmoTheMoonPig avatar Mar 28 '24 22:03 GizmoTheMoonPig

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: @.***>

bcmpinc avatar Mar 29 '24 02:03 bcmpinc

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 avatar Apr 05 '24 17:04 GizmoTheMoonPig

Alright, its finished.

A couple things to note:

  • I moved trinket slots to use slots 200 and 201 so it didn't conflict with the ring slots. Rings only go up to 145 if you have all 20 enabled so this should be fine.
  • I fixed clothing slots not pointing to the right ring slots if there are slots enabled on the other side. They weren't pointing to the correct slots regardless of how many were added so that's fixed now.

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 :)

GizmoTheMoonPig avatar Apr 06 '24 20:04 GizmoTheMoonPig