|
You last visited: Today at 10:27
Advertisement
VSRO 188 CGObj::GetTID() GetDataPermanent Error Patch
Discussion on VSRO 188 CGObj::GetTID() GetDataPermanent Error Patch within the SRO PServer Guides & Releases forum part of the SRO Private Server category.
11/21/2023, 07:50
|
#1
|
elite*gold: 0
Join Date: Apr 2021
Posts: 87
Received Thanks: 76
|
VSRO 188 CGObj::GetTID() GetDataPermanent Error Patch
Code:
0054D5E0 /$ 6A FF push -0x1
0054D5E2 |. 68 7BADAB00 push SR_GameS.00ABAD7B
0054D5E7 |. 64:A1 00000000 mov eax,dword ptr fs:[0]
0054D5ED |. 50 push eax
0054D5EE |. 83EC 08 sub esp,0x8
0054D5F1 |. 53 push ebx
0054D5F2 |. 55 push ebp
0054D5F3 |. 56 push esi
0054D5F4 |. 57 push edi
0054D5F5 |. A1 8015C600 mov eax,dword ptr ds:[0xC61580]
0054D5FA |. 33C4 xor eax,esp
0054D5FC |. 50 push eax
0054D5FD |. 8D4424 1C lea eax,dword ptr ss:[esp+0x1C]
0054D601 |. 64:A3 00000000 mov dword ptr fs:[0],eax
0054D607 |. 33C9 xor ecx,ecx
0054D609 B8 50C30000 mov eax,0xC350 ; Maximum number of objects 50000
0054D60E |. BA D0010000 mov edx,0x1D0
0054D613 |. F7E2 mul edx
0054D615 |. 8B7424 2C mov esi,dword ptr ss:[esp+0x2C]
0054D619 |. 0F90C1 seto cl
0054D61C C746 20 50C30000 mov dword ptr ds:[esi+0x20],0xC350 ; Maximum number of objects 50000
0054D623 |. F7D9 neg ecx
0054D625 |. 0BC8 or ecx,eax
0054D627 |. 33C0 xor eax,eax
0054D629 |. 83C1 04 add ecx,0x4
0054D62C |. 0F92C0 setb al
0054D62F |. F7D8 neg eax
0054D631 |. 0BC1 or eax,ecx
0054D633 |. 50 push eax
0054D634 |. E8 50EE4800 call SR_GameS.009DC489 ; Create a memory space of size (OBJ MaxNum * 0xID0)
0054D639 |. 83C4 04 add esp,0x4
0054D63C |. 894424 18 mov dword ptr ss:[esp+0x18],eax
0054D640 |. 33ED xor ebp,ebp
0054D642 |. 896C24 24 mov dword ptr ss:[esp+0x24],ebp
0054D646 |. 3BC5 cmp eax,ebp
0054D648 |. 74 32 je short SR_GameS.0054D67C
0054D64A |. 68 30F15300 push SR_GameS.0053F130
0054D64F |. 68 60EA5300 push SR_GameS.0053EA60
0054D654 68 50C30000 push 0xC350 ; Maximum number of objects 50000
0054D659 |. 8D78 04 lea edi,dword ptr ds:[eax+0x4]
0054D65C |. 68 D0010000 push 0x1D0 ; Objects Size
0054D661 |. 57 push edi
0054D662 C700 50C30000 mov dword ptr ds:[eax],0xC350 ; Maximum number of objects 50000
0054D668 |. E8 6AFD4800 call SR_GameS.009DD3D7
0054D66D |. C74424 24 FFFFFFFF mov dword ptr ss:[esp+0x24],-0x1
0054D675 |. 897E 04 mov dword ptr ds:[esi+0x4],edi
0054D678 |. 33DB xor ebx,ebx
0054D67A |. EB 18 jmp short SR_GameS.0054D694
0054D67C |> 33FF xor edi,edi
0054D67E |. C74424 24 FFFFFFFF mov dword ptr ss:[esp+0x24],-0x1
0054D686 |. 897E 04 mov dword ptr ds:[esi+0x4],edi
0054D689 |. 33DB xor ebx,ebx
0054D68B |. EB 07 jmp short SR_GameS.0054D694
0054D68D | 8D49 00 lea ecx,dword ptr ds:[ecx]
0054D690 |> 8B7424 2C mov esi,dword ptr ss:[esp+0x2C]
0054D694 |> 8B4E 04 mov ecx,dword ptr ds:[esi+0x4]
0054D697 |. 8B1419 mov edx,dword ptr ds:[ecx+ebx]
0054D69A |. 8B42 58 mov eax,dword ptr ds:[edx+0x58]
0054D69D |. 03CB add ecx,ebx
0054D69F |. 83C5 01 add ebp,0x1
0054D6A2 |. 55 push ebp
0054D6A3 |. 894C24 1C mov dword ptr ss:[esp+0x1C],ecx
0054D6A7 |. FFD0 call eax
0054D6A9 |. 8D46 08 lea eax,dword ptr ds:[esi+0x8]
0054D6AC |. 8B70 04 mov esi,dword ptr ds:[eax+0x4]
0054D6AF |. 8B56 04 mov edx,dword ptr ds:[esi+0x4]
0054D6B2 |. 8D4C24 18 lea ecx,dword ptr ss:[esp+0x18]
0054D6B6 |. 51 push ecx ; /Arg3
0054D6B7 |. 52 push edx ; |Arg2
0054D6B8 |. 56 push esi ; |Arg1
0054D6B9 |. E8 F2490000 call SR_GameS.005520B0 ; \SR_GameS.005520B0
0054D6BE |. 8B4C24 2C mov ecx,dword ptr ss:[esp+0x2C]
0054D6C2 |. 83C1 08 add ecx,0x8
0054D6C5 |. 8BF8 mov edi,eax
0054D6C7 |. E8 944A0000 call SR_GameS.00552160
0054D6CC |. 897E 04 mov dword ptr ds:[esi+0x4],edi
0054D6CF |. 8B47 04 mov eax,dword ptr ds:[edi+0x4]
0054D6D2 |. 81C3 D0010000 add ebx,0x1D0
0054D6D8 81FB 00016201 cmp ebx,0x1620100 ; (OBJ MaxNum * 0xID0)
0054D6DE |. 8938 mov dword ptr ds:[eax],edi
0054D6E0 |.^ 72 AE jb short SR_GameS.0054D690 ; Loop to fill memory pointers
0054D6E2 |. B0 01 mov al,0x1
0054D6E4 |. 8B4C24 1C mov ecx,dword ptr ss:[esp+0x1C]
0054D6E8 |. 64:890D 00000000 mov dword ptr fs:[0],ecx
0054D6EF |. 59 pop ecx
0054D6F0 |. 5F pop edi
0054D6F1 |. 5E pop esi
0054D6F2 |. 5D pop ebp
0054D6F3 |. 5B pop ebx
0054D6F4 |. 83C4 14 add esp,0x14
0054D6F7 \. C2 0400 retn 0x4
SR_GameServer.exe original file can only create up to 50,000 objects, if more than 50,000 objects are created in the game, it will show CGObj::GetTID() GetDataPermanent Error.
If you have added customized object, Itemdata or Chardata, it is very easy to get the pet summon bug.
The solution I've come up with so far is to increase the size of the object's memory.
As above ASM operation code
0x1D0 is a fixed size, the memory size of an object is 0x1D0(464), the number of objects can be adjusted.
So you only need to change the number of objects 0xC350 (50000) and memory size 0x1620100.
For example, to increase the number of objects to 5 times 250,000 objects
0x1D0 * 0x3D090(250000) = 0x6EA0500
Object Size = 0x1D0
Number of Objects = 0x3D090(250000)
Memory Size = 0x6EA0500
Patch:
Code:
0054D609 B8 90D00300 mov eax,0x3D090 ; Maximum number of objects 50000
0054D61C C746 20 90D00300 mov dword ptr ds:[esi+0x20],0x3D090 ; Maximum number of objects 50000
0054D654 68 90D00300 push 0x3D090 ; Maximum number of objects 50000
0054D662 C700 90D00300 mov dword ptr ds:[eax],0x3D090 ; Maximum number of objects 50000
0054D6D8 81FB 0005EA06 cmp ebx,0x6EA0500 ; (OBJ MaxNum * 0xID0)
C/C++ Hook (SR_GameServer):
Code:
#define MAX_OBJECT_NUM 250000
// Max Server Object Number
*(unsigned int*)(0x0054D609 + 1) = (unsigned int)MAX_OBJECT_NUM;
*(unsigned int*)(0x0054D61C + 3) = (unsigned int)MAX_OBJECT_NUM;
*(unsigned int*)(0x0054D654 + 1) = (unsigned int)MAX_OBJECT_NUM;
*(unsigned int*)(0x0054D662 + 2) = (unsigned int)MAX_OBJECT_NUM;
*(unsigned int*)(0x0054D6D8 + 2) = (unsigned int)MAX_OBJECT_NUM * 0x1D0;
|
|
|
11/21/2023, 12:42
|
#2
|
elite*gold: 1
Join Date: Feb 2020
Posts: 418
Received Thanks: 199
|
That way, it is already being laggy before it reaches 50k, I believe it will be more laggy if we increase it and go over 50k, thanks for sharing anyways, it might be useful to someone ♥
|
|
|
11/21/2023, 20:59
|
#3
|
elite*gold: 0
Join Date: Aug 2013
Posts: 1,532
Received Thanks: 835
|
Thank you.
I used this query to increase the spawn rate:
Use SRO_VT_SHARD
declare @minLevel int = 1 -- Minimum mob level.
declare @MaxLevel int = 110 -- Maximum mob level.
declare @MaxSpawnCount int = 9 -- Spawn rate (Max. 10 )
update Tab_RefNest
set dwMaxTotalCount = @MaxSpawnCount
from Tab_RefNest as A
inner join Tab_RefTactics as B
on A.dwTacticsID = B.dwTacticsID
inner join _RefObjCommon as C
on B.dwObjID = C.ID
inner join _RefObjChar as D
on C.Link = D.ID
where D.Lvl between @minLevel and @MaxLevel and CodeName128 like 'MOB%' and Rarity = 0 and dwMaxTotalCount > 0
Some monsters (I don't know which ones, or if the 100.000 is the limit) crash the GS if you spawn too much of them so be careful.
Result:
|
|
|
11/21/2023, 22:46
|
#4
|
elite*gold: 50
Join Date: Feb 2018
Posts: 651
Received Thanks: 578
|
Amazing thanks so much, been looking for something like this
Quote:
Originally Posted by *Deadly
That way, it is already being laggy before it reaches 50k, I believe it will be more laggy if we increase it and go over 50k, thanks for sharing anyways, it might be useful to someone ♥
|
Actually not. It's only laggy at high object counts if there are a high number of players spread across the map, all at different points/ranges surrounding all of the monsters - aka if there are a large number of MOB/NPC/COS objects surrounding real player characters.
You may notice that when you spawn a huge number of objects in one location, the GameServer has a high delay, but when you move a decent distance away from those objects & nobody else is around them, the effect is minimal and there is essentially no delay above normal.
Joymax was actually smart (I hate to say it) with the AI system/implementation of resource management with the object data. If there is no player character in range of the npc/mob object, all actions such as animations, pathfinding movements, etc. are disabled and essentially the object is frozen in place until a character/pet comes in range of it. (I don't know if this is also the case in WorldIDs higher than 1 or dungeon regions, but I doubt it would be any different). This saves a ton of resources on the server-side and helps prevent unnecessary loads.
This is why you'll tend to see much lower object counts causing much higher delays on live servers compared to development/test environments.
- But yes, I would 100% say you should NEVER use this release in a live environment to prevent such stuff, only for testing - it's very risky otherwise. Those limits are there for a reason. Joymax did not design the architecture to support stress on the modules past a certain point. Similar to how exceeding the 3500~4000 real player limit will/may cause weird issues & delays over time, violating and exceeding the mob type object count will have a similar effect.
Even if you don't experience additional delays, the chances you'll run into a runtime error/random crash is significantly higher. Better to be safe than sorry - just because you can do something doesn't mean that you should.
|
|
|
11/21/2023, 23:47
|
#5
|
elite*gold: 0
Join Date: Aug 2013
Posts: 1,532
Received Thanks: 835
|
Quote:
Originally Posted by notHype*
.
|
This.
I get a runtime error once I spawn more than 100.000 monsters. I let the spawns at 93k and I'm loving it so far!
Also, speaking of monsters- have you noticed that, if you stand still around the (passive) monsters they will slowly walk out of your character distance and you're left alone?
I think this is so you don't stand still in one spot.
Or perhaps some anti-bot feature.
A little annoying, wish I could remove that.
|
|
|
11/22/2023, 00:11
|
#6
|
elite*gold: 0
Join Date: Apr 2021
Posts: 87
Received Thanks: 76
|
Quote:
Originally Posted by Judgelemental
Thank you.
I used this query to increase the spawn rate:
Use SRO_VT_SHARD
declare @minLevel int = 1 -- Minimum mob level.
declare @MaxLevel int = 110 -- Maximum mob level.
declare @MaxSpawnCount int = 9 -- Spawn rate (Max. 10 )
update Tab_RefNest
set dwMaxTotalCount = @MaxSpawnCount
from Tab_RefNest as A
inner join Tab_RefTactics as B
on A.dwTacticsID = B.dwTacticsID
inner join _RefObjCommon as C
on B.dwObjID = C.ID
inner join _RefObjChar as D
on C.Link = D.ID
where D.Lvl between @minLevel and @MaxLevel and CodeName128 like 'MOB%' and Rarity = 0 and dwMaxTotalCount > 0
Some monsters (I don't know which ones, or if the 100.000 is the limit) crash the GS if you spawn too much of them so be careful.
Result:
|
Maybe, try 75,000 - 100,000.
Usually there are new Itemdata and Chardata added, or the map has a Christmas tree set. This will cause a TID ERROR
I've been tracking this code, and since it creates blocks on startup to determine the size of the object memory blocks, this is the only way I can do it for now.
I'm sure he'll be useful, after all no one uses the original VSRO 188 these days.
|
|
|
11/22/2023, 04:31
|
#7
|
elite*gold: 0
Join Date: Mar 2010
Posts: 568
Received Thanks: 228
|
Quote:
Originally Posted by torachiyo
Maybe, try 75,000 - 100,000.
Usually there are new Itemdata and Chardata added, or the map has a Christmas tree set. This will cause a TID ERROR
I've been tracking this code, and since it creates blocks on startup to determine the size of the object memory blocks, this is the only way I can do it for now.
I'm sure he'll be useful, after all no one uses the original VSRO 188 these days.
|
Hello dear,
Why change size?
I can open game server -> 1 2 3 4 5 6 7 8 9 (Solution)
The performance is better than changing the size
Good Luck
|
|
|
11/22/2023, 08:53
|
#8
|
elite*gold: 480
Join Date: Jan 2013
Posts: 7
Received Thanks: 10
|
I liked it.
|
|
|
11/22/2023, 16:21
|
#9
|
elite*gold: 1014
Join Date: Apr 2015
Posts: 1,028
Received Thanks: 1,243
|
well and you know that 32.exe 3.5 ~ 4g ram only ? then the file will crash
the best solution to open multi module
|
|
|
11/22/2023, 16:35
|
#10
|
elite*gold: 0
Join Date: Apr 2021
Posts: 87
Received Thanks: 76
|
Quote:
Originally Posted by VORTEX*
well and you know that 32.exe 3.5 ~ 4g ram only ? then the file will crash
the best solution to open multi module
|
That's for 32-bit OS, are you still using Windows 32-bit OS? ˇ ˇ
|
|
|
11/22/2023, 18:37
|
#11
|
elite*gold: 0
Join Date: Aug 2013
Posts: 1,532
Received Thanks: 835
|
So far no crashes if you keep the objects under 100.000.
I love the new spawn rate.
|
|
|
11/22/2023, 21:35
|
#12
|
elite*gold: 0
Join Date: Nov 2023
Posts: 1
Received Thanks: 1
|
The files version is quite old, so it doesn't make sense to exceed the limit. If we had used it as 64 bit, it would have made sense to exceed the limit.
|
|
|
All times are GMT +1. The time now is 10:31.
|
|