project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding > Modding Tutorials
PR Time:
Register Forum RulesDeveloper Blogs Project Reality Members List Search Today's Posts Mark Forums Read
Modding Tutorials Information and tutorials related to modding BF2.

Contact Support Team Frequently Asked Questions Register today!

Reply
 
LinkBack Thread Tools Display Modes
Old 07-14-2009, 05:49 PM   #11
[R-DEV]MAINERROR
PR Website Admin
Supporting Member

[R-DEV]MAINERROR's Avatar
Send a message via ICQ to [R-DEV]MAINERROR Send a message via MSN to [R-DEV]MAINERROR Send a message via Skype™ to [R-DEV]MAINERROR
Default Re: Python coding in BF2

Well you can program a ASCII banana in Python.


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
[R-DEV]MAINERROR is offline Reply With Quote
Old 07-15-2009, 02:25 PM   #12
[R-DEV]crazy11
Lead Beta Tester - US
Project Reality Beta Tester

[R-DEV]crazy11's Avatar
Default 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


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.

You miss 100% of the shots you don't take.- Wayne Gretzky
[R-DEV]crazy11 is offline Reply With Quote
Old 01-24-2010, 09:31 AM   #13
j0g32

j0g32's Avatar
Default 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..."
is the code that engages the script to "listen 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!


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
j0g32 is offline
Last edited by j0g32; 01-24-2010 at 09:43 AM..
Reply With Quote
Old 02-24-2010, 05:47 PM   #14
addaco

addaco's Avatar
Send a message via MSN to addaco
Default 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?


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
addaco is offline Reply With Quote
Old 02-24-2010, 05:54 PM   #15
POMARANC
Default 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...
POMARANC is offline Reply With Quote
Old 02-25-2010, 01:35 PM   #16
addaco

addaco's Avatar
Send a message via MSN to addaco
Default 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?


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
addaco is offline Reply With Quote
Old 02-25-2010, 03:18 PM   #17
[R-DEV]dbzao
Programming Manager
Supporting Member

[R-DEV]dbzao's Avatar
Default 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.


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.

"There's always one more bug." - Lubarsky's Law of Cybernetic Entomology
[R-DEV]dbzao is offline Reply With Quote
Old 02-26-2010, 10:47 AM   #18
addaco

addaco's Avatar
Send a message via MSN to addaco
Default 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


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
addaco is offline Reply With Quote
Old 11-11-2011, 09:12 AM   #19
armed Jester
PR Server License Administrator

armed Jester's Avatar
Default 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.


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
armed Jester is offline Reply With Quote
Old 11-20-2011, 05:33 PM   #20
[R-COM]BloodyDeed
Lead Support Technician
Project Reality Beta Tester
Supporting Member
PR Server License Administrator

[R-COM]BloodyDeed's Avatar
Default 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.


To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.

[R-COM]BloodyDeed is offline Reply With Quote
Reply


Tags
bf2, coding, python, tutorial
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:07 PM.


Powered by: vBulletin. ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO.
All Content Copyright ©2004 - 2012, Project Reality.