[bfprog] Re: Packaging and Importing Custom Python Code
Martin Steiger
martin at steigi.com
Wed Jun 22 04:26:44 PDT 2005
> Technically speaking you are correct. However, the problem starts when
> you have multiple modifications of different authors plugged into the
> bf2 engine. Forrest Thiesen and I were thinking of making a kind of
> plugin framework (like metamod for HL), which would facilitate this.
Sorry, I don't know HL metamod, so forgive me, if I'm on the wrong
track...
[quote from the wiki]
When BF2 engine starts up it fires up its embedded Python interpreter,
with it's sys.path set to include...
- The Battlefield 2 Server/python directory
- The Python directory of the current mod (e.g. Battlefield 2
Server/mods/bf2/python). If the server switches mods, this will be
changed, too.
[/quote]
So, if you create a new mod and add any custom python-files, they should
be located in the mod-python directory anyway.
If you'd like to add "general" bf2 modification (ie. your own fragalyzer),
they should be located in the general bf2-python directory.
In my understanding, you can run all this "mods" simultanously, as long as
they are coded in a proper way and do not interfere with eachother.
Or is Forrest talking about, that you're not allowed to edit the default-
__init__.py files which come with the BF2-server?
Regards,
Martin
More information about the BFProg
mailing list