Page 1 of 1

[FIXED-sort of] Mod crashes when a second player joins?

Posted: Tue Aug 09, 2011 10:45 pm
by hipnox
Hello, first time poster

Im an amateur modder and creator of the "The way it was meant to be" mod (http://battlefield2.filefront.com/file/ ... MAPS;87825)

On that version of the mod, i had a modified BF109 which replaced the landing gear with panzer tracks, making this a ground vehicle with the ability to fly if the speed was high enough.

The problem is that while the mod worked perfectly on single player and multiplayer, as long as no one joins. As soon as a second player joins the match, both players (the creator of the server and the new player) are kicked instantly and the server shuts down. If i remove the tank tracks, the mod works fine on both single and multiplayer.

I've experienced similar behaviours with vehicles with multiple engines, tanks with wings, etc.. which is a real bummer since its limiting the amount of crazy vehicles i can create.

I have a working multiplayer version of the mod (http://battlefield2.filefront.com/file/ ... _Mod;92239) with very weird vehicles
yet i still cant get that Tank Track Bf109 to work on multiplayer. :x

Any ideas?

Re: Mod crashes when a second player joins?

Posted: Wed Aug 10, 2011 1:48 am
by Swaffy
Does [did] the second player have the same mod and same version of the mod when he/she joined?
If no, then that is most likely your issue.

Re: Mod crashes when a second player joins?

Posted: Wed Aug 10, 2011 2:59 am
by hipnox
yes, same BF1942 version and same mod version

it even happens when i connect to myself at 127.0.0.1 with 2 battlefields running in the same pc

Re: [FIXED-sort of] Mod crashes when a second player joins?

Posted: Thu Aug 11, 2011 1:44 am
by hipnox
Partially fixed.

Apparently its caused by an error that says "too many statemasks" which has something to do with the amount of setNetworkableinfo statements in the object. I had to cut away parts of the plane like some flaps and the secondary weapon (which all had setNetworkableinfo ) to make it work.

I find it puzzling however, since some of my vehicles have around 20+ setNetworkableinfo statements in them and they work just fine.

IDK really

Re: [FIXED-sort of] Mod crashes when a second player joins?

Posted: Thu Aug 11, 2011 6:16 am
by Senshi
Yes, these kinds of crashes always are linked to the networkables. Networkables however are a bit of a mystery still, though. At least for me.

The number of networkables on a vehicle itself is not the problem usually, it just depends how much data has to be pushed through one networkable. E.g. if your object has gazillion of child objects with enhanced physics (especially physics need lots of network bandwidth) you hit the limit pretty quick. That's about as far as I got ;) .

Re: [FIXED-sort of] Mod crashes when a second player joins?

Posted: Thu Aug 11, 2011 8:40 pm
by hipnox
From my own personal experiences with this particular vehicle its the combination of different engines + wings + weapons that can cause this.

For example, the final working version of my tank track bf109 has 11 networkinfos. 1 on a weapon , 1 on the plan itself and 9 for the physics objects like the tracks, the tank engine, the plane engine and the flaps/rudders. I had to REM the setNetworkableInfo on the secondary weapon to get it to work.

My flying submarine, however, has way over 30, where each of its 24 side cannons has 3 networkinfos a piece. It doesn´t have any additional engines however, as it runs on the default engine / flaps configuration of the B17. Every new networkinfo is either a gun or a rotational bundle, but still, its kinda puzzling that it even works :?

Sometimes, even small modifications, like adding an extra set of tracks or adding wings to a tank will make it crash...