Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Programming First Person Shooters (Games) IT Technology

Python Used as Modding Language for Battlefield 2 41

Posted by Zonk
from the snakes-and-guns dept.
Dutch Dopey writes "In an interview with Lars Gustavsson of DICE, it was mentioned that Battlefield 2's modding tools are going to be delivered with the game, and that the tools are the same ones used to develop the game. The modding language in use is Python, and will support all aspects of the language.
This discussion has been archived. No new comments can be posted.

Python Used as Modding Language for Battlefield 2

Comments Filter:
  • by Deekin_Scalesinger (755062) * on Friday February 11, 2005 @12:52PM (#11643108)
    To those who made BF42 so much fun:

    Desert Combat - http://www.desertcombat.com/

    Battlefield 1918 - http://www.bf1918.com/

    Forgotten Hope - http://forgottenhope.bf1942files.com/main.html

    These three mods (and many more out there) took BF42 to new places, especially DC. Glad to hear that they are giving modders even more tools with BF2 - I can't mod or skin my way out of a paper bag, but I am grateful to those who can and give their talents to their community gratis.

  • by JimmehAH (817552) <slashdot@j-a-h.co.uk> on Friday February 11, 2005 @01:48PM (#11643814) Homepage
    It uses the Source engine (the Half-Life 2 one).

    Vampire: Bloodlines [vampirebloodlines.com]
    Source engine feature list [valvesoftware.com]
  • EVE Online (Score:5, Informative)

    by Winterblink (575267) on Friday February 11, 2005 @01:56PM (#11643934) Homepage
    The developers of EVE Online [eve-online.com] utilize Python for their game logic. Linkage [eve-online.com]
  • by BeBoxer (14448) on Friday February 11, 2005 @02:14PM (#11644158)
    The problem I see with using python as a modding language is that it makes it very difficult to enforce safety in mods. It'd be nice if the modding language was sandboxed so that you could download a mod and know it won't format your hard drive.

    Yeah, that's one of Python's shortcomings I think. There is the 'rexec' module which is meant to do this, but it apparently it has unspecified holes in it. The 'pickle' module has similar flaws. You could do some neat RPC stuff passing around picked objects, but only at the risk of introducing security holes. Oh well.
  • Good choice. (Score:4, Informative)

    by jericho4.0 (565125) on Friday February 11, 2005 @02:20PM (#11644233)
    There are several reasons why Python is a good choice for such a thing. The Python licence allows any commercial project to embed it without releasing code. So rather then develop a custom solution (ie; UnrealScript), one comes ready made, and complete. And there are lots of reference books about. I did some modding in UnrealScript, and documentation was _very_ hard to find, and incomplete when you did find it.

    Python intergrates well with C/C++. Amazingly well, actually, and I think any C/C++ coder should go through the tutorial [python.org], and see what python can do for you. Yes, I know other enviroments promised the same thing before, but Python delivers.

    Python is powerful, but easy to learn. Personally, I think we should be teaching kids Python in elementary school. And if it's your first language, you won't get all hung up on the whitespace thing.

    Anyone coding an app that could benifit from a scripting language needs to take a look at python.

  • by snorklewacker (836663) on Friday February 11, 2005 @03:08PM (#11644889)
    The holes in rexec have been acknowledged to the point where importing the module throws an error about its complete lack of actual security. Expect it to be removed entirely in some future version. Pickle is importing arbitrary code, which can do arbitrary things. There really isn't a sensible way to protect against this in a dynamic environment.

    It's not like lua lacks file and system access primitives either, though those tend to be easier to hack out if necessary (which it usually isn't, since it's the game logic that's written in lua, not third party mode). The appeal of lua is the smaller footprint.
  • by ShaggusMacHaggis (178339) on Friday February 11, 2005 @03:45PM (#11645346) Homepage
    Sid Meirs Civ 4 will also be using python and xml for its scripting language.

"If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed." -- Albert Einstein

Working...