Problem with gem stack counter in inventory game exe 5.4

krewedko

Member
Joined
Apr 7, 2024
Messages
7
Greetings, adventurers, I'm fairly new to this realm. I've got a little query: I've tweaked things so that the enchantment gems for armor and weapons can stack. They do stack up, but there's a little snag in the inventory interface – these gems are missing a count indicator, which means you can't quite tell how many of them are in a particular inventory cell.

However, they've indeed stacked up (you can double-check by trying to enchant an item or attempting to sell them to a trader, where you'll see their quantity). Through some experimenting, I've discovered that the problem lies within my game.exe file. When I swapped it out, the issue disappeared. Unfortunately, I can't just use a different game.exe file because I require the Russian version for episode 5.4 (since in the US versions, I can't create usernames with Russian characters).

Despite scouring the internet, I've only managed to find this one version of game.exe that accommodates Russian usernames :( So, here's the question: how can I make it so that the number of gems in the slot is visible, or perhaps you, esteemed comrades, possess a worked RU 5.4 game.exe that I could utilize?

I do have more queries, but for now, I'm keen to resolve this one. If any further elucidation is necessary, kindly request it, and I shall provide. Thanks in advance!
 
will you upload the file that doesn't show the count?
The file is attached, IP 127.0.0.1.And could you please advise if there is a way to add support for 1080 resolution? If I manually set the resolution in the config, the image stretches horizontally. And the specified resolution is not displayed in the in-game settings.
 
i can't help with the resolution, but this should solve your count issue.

Code:
[ENABLE]
alloc(newmem,128)

newmem:
cmp cl,5F
je 004A5CC1
// original
cmp cl,19
je 004A5CC1
jmp 004A5CA4

004A5C9F:
jmp newmem

[DISABLE]
dealloc(newmem)
004A5C9F:
cmp cl,19
je 004A5CC1

it's not a bug. it's coded not to show the count of that type. makes sense if they were all set to 1 in the data. if any other counts you want are missing, just add the types the same way and jump if equal to the same address. :p

View attachment 60

edit: when i look for stuff like this, i find the function that returns a pointer to the item data. it's 004605C0 in this file. then, for example, make an item in your bag, search the success return instruction of that function (00460608) and see where it's getting the pointer. it will pretty much lead you to everywhere it needs to dereference values (e.g., type, typeId) for whatever reason. you can do the same thing with skills, etc.
 
Last edited:
i can't help with the resolution, but this should solve your count issue.

Code:
[ENABLE]
alloc(newmem,128)

newmem:
cmp cl,5F
je 004A5CC1
// original
cmp cl,19
je 004A5CC1
jmp 004A5CA4

004A5C9F:
jmp newmem

[DISABLE]
dealloc(newmem)
004A5C9F:
cmp cl,19
je 004A5CC1

it's not a bug. it's coded not to show the count of that type. makes sense if they were all set to 1 in the data. if any other counts you want are missing, just add the types the same way and jump if equal to the same address. :p

View attachment 60

edit: when i look for stuff like this, i find the function that returns a pointer to the item data. it's 004605C0 in this file. then, for example, make an item in your bag, search the success return instruction of that function (00460608) and see where it's getting the pointer. it will pretty much lead you to everywhere it needs to dereference values (e.g., type, typeId) for whatever reason. you can do the same thing with skills, etc.
Thank you! Can you help me: I found this section in OllyDBG, but I don’t understand how I can add the code? Could you explain pls?
 
Thank you! Can you help me: I found this section in OllyDBG, but I don’t understand how I can add the code? Could you explain pls?
a dll project would be more useful in the long run. i'd rather help you with that.
 
Last edited:
Back
Top