We REALLY need the BF2 Python API

Panic panic at battlefield.no
Sat Jun 25 10:32:52 EDT 2005

Hash: SHA1
As we're all getting down and dirty with the lovely Python interface,
the need for some documentation is getting more pressing by the
hour. So ok, we have the very nice wiki initiative at fun-o-matic,
but that can only take us so far, since it's based on using "dir" on
objects, and lot's of trial-and-error, with the occational success ;-p

But take the host.registerHandler function as an example. This is
what the wiki says:

host.registerHandler('EventName', pythonEventHandler[, parameter])

What we can't figure out, though, is what's supposed to be sent as
parameters for each event. Take the PlayerConnect event as an
example. Try this

host.registerHandler('PlayerConnect', onPlayerConnect)

and it wont get you very far. If you try

host.registerHandler('PlayerConnect', onPlayerConnect, 1)

though, you're good to go. And the ServerReady event, when does
that fire? I've tried to both

host.registerHandler('ServerReady', onServerReady)


host.registerHandler('ServerReady', onServerReady, 1)

to register it, but I can't get it working. All of this would be
solved if we got access to a some kind of API.

ANYTHING is better than nothing. Scans of notes scribbled
on napkins are better than nothing. So "someone" (yeah,
Andreas, I'm talking to you...hehe) PLEASE help us out here.

- -Frode

- ----------------------------------------------------------------------
 Name: Frode Hommedal
 Location: Norway
 Day job: VLSI designer and programmer
 Site: Battlefield.no [ http://www.battlefield.no ]
- ----------------------------------------------------------------------
 International Game Server Operators Association [ http://igsoa.com ]
- ----------------------------------------------------------------------

Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

More information about the Bf1942 mailing list