[Release] How to change stat points per level and working stat resets

05/12/2011 03:42 Jasonbcobb#1
A tutorial on how to change Ultimate Mode stat points and make stat resets give the changed stats back

Things you will need.

ollydbg 2.0 - [Only registered and activated users can see links. Click Here To Register...]
ps_game.exe not to be confused with game.exe can be found in server folder
SHAIYA_SERVER\SERVER\PSM_Client\Bin

Make a back up of your ps_game.exe before you edit it just incase you make a mistake.

Open ollydbg

Browse to your ps_game.exe and open it

First thing we need to do is change the stat points you get when you level up.

So right click on main window then go to then expression.

[Only registered and activated users can see links. Click Here To Register...]

Now enter this in the expression box 0048A6A2 and click ok after it finds it you will end up with this.

[Only registered and activated users can see links. Click Here To Register...]

Now if you look at the line with the grey covering it you will see this

ADD WORD PTR DS:[EDI+138],9

For the people who have not already guessed what the 9 is it is the 9 stat points you get every time you level up so we need to change it to what ever stat points you want but remember you need to use the Hex values when changing so 10=A 11=B 12=C 13=D and so on.

To change it double click on ADD WORD PTR DS:[EDI+138],9
You will end up with this.

[Only registered and activated users can see links. Click Here To Register...]
.
Delete the 9 and put the hex value you want
I will be using 0D which is 13 stat points a level after you press the assemble button your main window should look like this.

[Only registered and activated users can see links. Click Here To Register...]

Now that is done we need to make stat resets give the right amount of stat points when used.
To start you will need to search for a expression again and enter this 0048088C you should end up with this.

[Only registered and activated users can see links. Click Here To Register...]

All you need to do is change lea ecx,[ecx*8+ecx] to IMUL ECX, ECX, 0D or what ever stat points you choose.

[Only registered and activated users can see links. Click Here To Register...]

A big thank you to lilprohacker for the helpfull hint.

For people wanting to change the skill points here is the addresses of them and what the code looks like i will leave it up to you to change them.

These are for Ultimate Mode.

0048aaa8 - ADD WORD PTR DS:[EDI+13A],DX < This one is how many skill points per level DX = 5 and yes you can change it to a number.
00480c30 - LEA EDX,[EAX*4+EAX+5] < This one is the points you get when you use a skill reset + 5 you get at the start of the game

Have fun with your new stat points and working stat resets.

Jason aka -AJ-
05/12/2011 05:33 lilprohacker#2
...
05/12/2011 06:01 Jasonbcobb#3
Thank you lilprohacker
05/12/2011 09:40 remnikalija#4
i dont understand that
0048aaa8 - ADD WORD PTR DS:[EDI+13A],DX < This one is how many skill points per level DX = 5 and yes you can change it to a number.
so DX is 5 but wich is number 7 with letters

and when i am editing i dont know where to save
05/12/2011 13:58 Jasonbcobb#5
just change dx to the number u want using hex values 7 in hex is 7
05/12/2011 14:07 remnikalija#6
Quote:
Originally Posted by Jasonbcobb View Post
just change dx to the number u want using hex values 7 in hex is 7
i trayed that but cant it said No room for this command
05/12/2011 14:14 remnikalija#7
ok now i fixed but i dont know how to save when i exit and run again its not changed
05/12/2011 15:11 Jasonbcobb#8
Select the change you have made, right click then edit then click on copy to executable. a new window in olly will open. right click then Save file.
05/12/2011 15:22 [GM]Recover#9
good TUT u get my thanks might come in handy sometime
05/12/2011 16:28 remnikalija#10
ok i fixed stats evry level i get 11 points and when i reset wirh stat stone i get 11 to i fixed but skills i did something wrong it disconets me from game when i use skill reset stone i made like this
ADD WORD PTR DS:[EDI+13A],DX - ADD WORD PTR DS:[EDI+13A],7
LEA EDX,[EAX*4+EAX+5] - LEA EDX,[EAX*4+EAX+7]
05/12/2011 19:04 Jasonbcobb#11
Quote:
Originally Posted by remnikalija View Post
ok i fixed stats evry level i get 11 points and when i reset wirh stat stone i get 11 to i fixed but skills i did something wrong it disconets me from game when i use skill reset stone i made like this
ADD WORD PTR DS:[EDI+13A],DX - ADD WORD PTR DS:[EDI+13A],7
LEA EDX,[EAX*4+EAX+5] - LEA EDX,[EAX*4+EAX+7]
The +5 is the skill points you get at the start of the game and you can't multiply eax by 7 you can only multiply eax by 2, 3, 4, 5, 8, 9 using LEA you would have to make a code cave to multiply it by 7 and using imul you can't add the +5

Here are the codes When using LEA

LEA EDX,[EAX+EAX+5] = 2 skill points for every level
LEA EDX,[EAX*2+EAX+5] = 3 skill points for every level
LEA EDX,[EAX*4+5] = 4 skill points for every level
LEA EDX,[EAX*4+EAX+5] = 5 skill points for every level
LEA EDX,[EAX*8+5] = 8 skill points for every level
LEA EDX,[EAX*8+EAX+5] = 9 skill points for every level

If anybody knows how to do it without making a code cave please feel free to post it.
05/12/2011 19:26 remnikalija#12
do for 7 skills points i need to do like that LEA EDX,[EAX*7+5] = 7 skill points for every level
05/12/2011 19:41 castor4878#13
Quote:
Originally Posted by remnikalija View Post
do for 7 skills points i need to do like that LEA EDX,[EAX*7+5] = 7 skill points for every level
no you can't -- Jasonbcobb just told you.

"EAX*4+EAX+5" is a composite opcode that uses shift & add, it can only manage power of 2 and optional addition

ie
1 * x => EAX
2 * x => EAX * 2 = EAX << 1
3 * x => EAX * 2 + EAX = EAX << 1 | EAX (with bit carry propagation)

and so on to build the list provided by Jasonbcobb
05/12/2011 19:47 Jasonbcobb#14
You can't multiply by 7 using LEA to multiply by 7 you need to make a code cave you would have to make a jump from address 00480c30 to some empty code and the bottom and do it like this

IMUL EDX, EAX, 7
ADD EDX,5
MOV WORD PTR DS:[ESI+13A],DX

+ this will not fit where the code is now
05/13/2011 10:32 remnikalija#15
cant make for skills to go more than 5