|
Modding Tutorials Information and tutorials related to modding BF2. |
|
Thread Tools | Display Modes |
2009-07-15, 17:25 | #12 |
Retired PR Developer
Join Date: Feb 2008
Posts: 3,137
United States of America
Location: California
|
Re: Python coding in BF2
Here is a pretty good tut Non-Programmer's Tutorial for Python 2.0 - Wikibooks, collection of open-content textbooks
|
You miss 100% of the shots you don't take.- Wayne Gretzky |
|
2010-01-24, 13:31 | #13 |
Join Date: Jun 2009
Posts: 31
Germany
|
Re: [Python Tutorial] Python coding in BF2
is there some kind of tutorial for beginners ?
I mean, I could read thousands of python tutorials by not knowing wich modules etc. to import and what these methods and callbacks are returning etc. in order to let your script working FOR BATTLEFIELD 2 / Project Reality. Do i have to completely learn python itself if I'd like to do some coding in Bf2 ? or is there some kinda small library of knowledge wich would only be needed :P this wiki: Original python scripting reference documentation - BFEditor is really helpful, but I can't get started with this: Nice to know wich methods exist and how they're called but for me as a beginner I couldn't start of with a new script like this ... It's difficult to say but what I'd like to have is something that answers the question: "Okay, i see THIS => Code:
init(): bf2.registerHandler('PlayerRevived', onPlayerRevived) print "MyScript is now listening for players being revived..." But what if I'd like to have the script listen to players entering vehicles ?!?!" Yeah it's basic stuff, but imo all these python tutorials do not help beginners with scripting for BF2... Hope you'll understand thx for responses! |
Last edited by j0g32; 2010-01-24 at 13:43..
|
2010-02-24, 21:47 | #14 |
Join Date: Oct 2008
Posts: 353
United Kingdom
Location: London
|
Re: [Python Tutorial] Python coding in BF2
I am interested in learning python, however I have a question.
What version does BF" / PR use? 2 or 3? |
2010-02-24, 21:54 | #15 |
Join Date: Mar 2009
Posts: 22
Slovakia
|
Re: [Python Tutorial] Python coding in BF2
it uses version 2, but I'm not sure which subversion
some old info says it's 2.3.4, but maybe it was updated... |
2010-02-25, 17:35 | #16 |
Join Date: Oct 2008
Posts: 353
United Kingdom
Location: London
|
Re: [Python Tutorial] Python coding in BF2
thanks.
Im going to try and find a python interpertor of 2.3.4 THat would be better than a newever version, as I would be learning for BF2 EDIT: Can only find version 2.3.7 What should I install, the above, or the latest in 2 series? |
2010-02-25, 19:18 | #17 |
Retired PR Developer
|
Re: [Python Tutorial] Python coding in BF2
2.3.7 is fine, but bear in mind BF2 has its own set of modules, so not all of original python 2.3 modules are available.
|
"There's always one more bug." - Lubarsky's Law of Cybernetic Entomology |
|
2010-02-26, 14:47 | #18 |
Join Date: Oct 2008
Posts: 353
United Kingdom
Location: London
|
Re: [Python Tutorial] Python coding in BF2
ok, so I should refer to online sources when I use particular modules.
I thought the BF2 engine is bad, it always gets worse the more you look into it :P |
2011-11-11, 13:12 | #19 |
Join Date: Jun 2009
Posts: 18
Germany
Location: Berlin
|
Re: [Python Tutorial] Python coding in BF2
hey all,
i want to try out some stuff on our server "gis+ cobat zone PR9.x" and got some questions about it. first of all; is it legal to change things like "player amount", "sq sice" and "removing nametags" on a locked server. and; what files have to be modified to do so. |
2011-11-20, 21:33 | #20 |
Retired PR Developer
|
Re: [Python Tutorial] Python coding in BF2
Afaik nametags would require you to modify the clients files.
I strongly recommend you NOT to change any client files as this if you're not backing up correctly will kick you off the servers due to md5 mismatch. Player amount is really easy to change, just set the sv.maxPlayers 16 to whatever you want. More than 64 slots is hardcoded and requires assembly skills which is BY FAR more complex than python. Squadsize is also hardcoded and theres no way to change that without changing the bf2 binaries. All these question have nothing to do with python tho, would fit better in the server admins forum. |
|
|
Tags |
bf2, coding, python, tutorial |
|
|