Page 1 of 1

[BF2] Bypassing "out of ghost ids max: 1023"?

Posted: 2022-12-08 17:54
by Kabelvision
Sup gamers,

! this is for my BF2 mod it has nothing todo with Project Reality !
(im not sure where I could go else to ask..)

currently I stumbled upon an problem, I have too much destructible objects, Singleplayer works fine but after starting an dedicated server and joining it, the server will crash once the game is "done" loading, after reading this I knew that it had to do with the amount of destructible objects.

Now my question, is it possible to bypass/ignore this check? I tried looking into it with "IDA Freeware" and found:
Image

hexadecimal "3F F" or "03 FF" equals to 1023 in decimal, however if I open up "bf2_w32d.exe" in an hex editor and goto the offset "0015B6C0" and replace "03 FF" (big endian) and replace it with lets say "FF FF" (65535 decimal).
Image

Now if I start the game and server then join the server it will still crash, however instead of displaying "out of ghost ids max: 1023" as an error it will now diplay the error: "out of ghost ids max: 65535", meaning all I did was to alter the error message, not the actual limit.. just searchin for "FF 03" in the hex editor returns too many results to go through for me, does anyone has some offsets on hand or can tell me if its even possible?

Re: [BF2] Bypassing "out of ghost ids max: 1023"?

Posted: 2022-12-22 18:30
by Fastjack
I'm long time out of BF2 Modding but i believe this error has nothing todo with destroyable objects.
It's your mod, so have you implemented some vehicles with weapons where the ammo is over 1000?

Re: [BF2] Bypassing "out of ghost ids max: 1023"?

Posted: 2022-12-22 20:14
by AlonTavor
Its networked as 10 bits. Not that simple.

Re: [BF2] Bypassing "out of ghost ids max: 1023"?

Posted: 2023-01-03 11:16
by Kabelvision
Fastjack wrote:I'm long time out of BF2 Modding but i believe this error has nothing todo with destroyable objects.
It's your mod, so have you implemented some vehicles with weapons where the ammo is over 1000?
nope, 'all' vanilla, I created an Objects_Server.zip and Object_Client.zip that replaces alot of .con and .tweak files from staticobjects and their effects, same thing for other things like weapons_server.zip, ..., meaning I can easily disable most changes and if I disable my destructible objects the server works, either I messed up somewhere in there or I just simply hit that cap of "1023 ghost ids".
AlonTavor wrote:Its networked as 10 bits. Not that simple.
So you're saying there is a way? Im too newb right now to get what it actually means, but I'll will look into it, thanks!

Re: [BF2] Bypassing "out of ghost ids max: 1023"?

Posted: 2023-01-03 21:06
by Fastjack
Your BF2 Vanilla is patched to version 1.5?

Re: [BF2] Bypassing "out of ghost ids max: 1023"?

Posted: 2023-01-04 11:08
by Suchar
It doesn't matter which BF2 exe you have, 1023 ghosts limit will always be there.
GhostManager handles all networkable objects and destroyable objects are indeed networked so having too many of them will cause this crash. You haven't come across this issue on local servers because as the name may suggest local servers don't need limiting networkable data because everything happens locally on your PC.

Alon described GhostManager in one of his blog posts (I don't rememer which one though). You may want to have a look.
https://alontavor.github.io

Re: [BF2] Bypassing "out of ghost ids max: 1023"?

Posted: 2023-01-04 20:02
by Fastjack
@Kabelvision:

Before 1.5 patch, you could only place 14 or 15 destroyable objects in a map.
With the 1.5 patch, you are able to place more than 300 destroyable objects.

You saying, you get the CTD's only when you enable the destroyable objects.
If you run BF2 1.41, maybe you have to many destroyable objects in your map but a better ai commander.