Changing Stackables, Client-side: ASM Patch help

kromlech

Member
Sick of me yet? I hope not. D:

As a companion to my other thread where I needed help changing the Ship.exe to allow stacking for certain item groups (which was a total success, thanks again!), this time I need help getting the client to allow stacking for some and disallow stacking for others. This is where Lee's Pso Patcher falls short; it can only do all-or-nothing stacking rules for x1 items. Currently, the server is disallowing the stacking of certain items, such as the later ep4 items, but the client is allowing it, resulting in a 101 error disconnect/desync if someone ever finds more than 1 of them.

After much google searching and some amateur research, I understand there's no better, easier patcher available, and my only option is the CreateTETHexe program found in this thread:

https://www.pioneer2.net/community/threads/noob-friendly-executable-patching-tool-createtethexe.91/

CreateTETHexe needs ASM patches written in a txt with seek and write operators pointed at the correct hex addresses (full disclosure, I do not know what I'm doing here, at all, but that won't stop me).

From context of this post/thread, I think this is what I need to do:
https://www.pioneer2.net/community/threads/stackable-offset.1089/#post-10819

I think tofuman's code in this link is what I need, but I have no idea how to go from his code to an ASM patch that CreateTETHexe can use. I tried writing out his code into SEEK/WRITE lines from his modified code, but I don't understand how to use the second part; the part that comes after "Now to specify by how much they are stackable." They don't have the hex addresses the first part had. Do they just continue consecutively after 0x5D643A? It's also possible I'm not doing this correctly from the start, which wouldn't surprise me at all.

I also don't understand how to add in the array that defines stackable/not stackable, and the other array that defines the max quantity of each item group. I just wrote them in like any other Seek/Write lines, which I'm assuming is not correct.

I've attached the ASMpatch.txt I've written so far, I figure you guys could use a good laugh.

This ASMpatch method appears to be the only one available to me, so I'm asking for some help using it. I would greatly appreciate some pointers here. Bad hex pun, I know.
 

Attachments

  • asmpatch.txt
    1.1 KB · Views: 15

Soly

Member
Gender
Male
He did point where to put the tables, for example the stack limit table would go here

upload_2019-10-24_19-19-34.png
However note these are virtual addresses, so you need to figure out where the address is in the executable, you might be able to do that with CE or some hex editor.
 

kromlech

Member
Thanks but that didn't really answer my question. I get the stack limit array goes to 0x97d3ab, but I don't know how I'm supposed to write that in the ASM patch. Is what I wrote correct?

Is CreateTETHexe not able to use this code because it's written with virtual addresses?

I was asking about the addresses for the 2nd half of the code that starts at 0x5D643A, that part doesn't have any other addresses written. Is there more to it?

Also, in this post you said you had a patching program, but the link is dead:
https://www.pioneer2.net/community/threads/stackable-offset.1089/#post-11033
It's not in your tools thread, and the gdrive link doesn't work. Wouldn't happen to have that patching program anywhere still, would you?
 

Soly

Member
Gender
Male
Ahh, I'm sorry, I don't use soda's program.
And yeah, I don't have that other patcher anymore, I think I asked in another post that if anyone has it, if they could share it.
 
Top