project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Factions > Coding
31 Oct 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links

Reply
 
Thread Tools Display Modes
Old 2022-12-08, 17:54   #1
Kabelvision

Kabelvision's Avatar
Question [BF2] Bypassing "out of ghost ids max: 1023"?

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:


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).


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?
Kabelvision is offline
Last edited by Kabelvision; 2022-12-08 at 17:55.. Reason: typo
Reply With Quote
Old 2022-12-22, 18:30   #2
[R-CON]​Fastjack
PR:BF2 Contributor

Fastjack's Avatar
Default Re: [BF2] Bypassing "out of ghost ids max: 1023"?

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?
Fastjack is offline Reply With Quote
Old 2022-12-22, 20:14   #3
[R-DEV]​AlonTavor
PR:BF2 Developer
Supporting Member
PR Server License Administrator
Default Re: [BF2] Bypassing "out of ghost ids max: 1023"?

Its networked as 10 bits. Not that simple.
AlonTavor is offline Reply With Quote
Old 2023-01-03, 11:16   #4
Kabelvision

Kabelvision's Avatar
Default Re: [BF2] Bypassing "out of ghost ids max: 1023"?

Quote:
Originally Posted by Fastjack View Post
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".

Quote:
Originally Posted by AlonTavor View Post
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!
Kabelvision is offline Reply With Quote
Old 2023-01-03, 21:06   #5
[R-CON]​Fastjack
PR:BF2 Contributor

Fastjack's Avatar
Default Re: [BF2] Bypassing "out of ghost ids max: 1023"?

Your BF2 Vanilla is patched to version 1.5?
Fastjack is offline Reply With Quote
Old 2023-01-04, 11:08   #6
[R-DEV]Suchar
PR:BF2 QA Lead
PR Server License Administrator

Suchar's Avatar
Default Re: [BF2] Bypassing "out of ghost ids max: 1023"?

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

https://www.realitymod.com/forum/uploads/signatures/sigpic98978_4.gif
Suchar is offline Reply With Quote
Old 2023-01-04, 20:02   #7
[R-CON]​Fastjack
PR:BF2 Contributor

Fastjack's Avatar
Default Re: [BF2] Bypassing "out of ghost ids max: 1023"?

@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.
Fastjack is offline Reply With Quote
Reply


Tags
assembly, error, hex, offset, patching

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 13:26.