project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
PR Time:
Register Forum RulesDeveloper Blogs Project Reality Members List Search Today's Posts Mark Forums Read
PR:BF2 Community Modding Making or wanting help making your own asset? Check in here

Contact Support Team Frequently Asked Questions Register today!

Reply
 
LinkBack Thread Tools Display Modes
Old 08-29-2007, 03:36 PM   #1
geogob

geogob's Avatar
Send a message via ICQ to geogob Send a message via AIM to geogob Send a message via MSN to geogob Send a message via Yahoo to geogob
Default [Question] Scripting references?

Hey all.

Well, I decided to start coding for BF2 and PR. I've been coding for years now on the unreal engine where I worked on additions for a mod called Infiltration.

Anyway, I'm looking for references concerning coding for BF2 and, possibly PR. A good start point for Unreal coding is the unreal wiki (a wiki covering about anything concerning coding in the unreal engine - describing base functions, classes and all). Does something like that exists for BF2?

For PR, is there any existing documentation on the code?

As a first experiment, I'd like to write a QM report script allowing commander and squad leaders to have an overview of issued kits and available kits.

I'd also like to experiment a few Ideas I have on kit moderations systems.

Anyway, I'll be around.


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



To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
geogob is offline Reply With Quote
Old 08-29-2007, 03:46 PM   #2
[R-DEV]e-Gor
PR Coder Team
Supporting Member
Default

There are two types of scripting for BF2. There's server side python and then the .con file scripting - which are basically just a huge load of console commands. For a QM script, you'd need the python side of it. The best documentation there is can be found at bf2tech.org
[R-DEV]e-Gor is offline Reply With Quote
Old 08-29-2007, 04:59 PM   #3
geogob

geogob's Avatar
Send a message via ICQ to geogob Send a message via AIM to geogob Send a message via MSN to geogob Send a message via Yahoo to geogob
Default

I was indeed looking for server side scripting. Thank you for the info! I will look into the bf2tech.org site.

It's always nice to have a few good starting points


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



To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
geogob is offline Reply With Quote
Old 08-29-2007, 08:19 PM   #4
geogob

geogob's Avatar
Send a message via ICQ to geogob Send a message via AIM to geogob Send a message via MSN to geogob Send a message via Yahoo to geogob
Default

I'm still trying to figure things out. The wiki is a good start, but lacking some basic information.

I see that in PR, all scripts are compiled python scripts on ...\mods\pr\python\game (except the config files)
Of course, there isn't much I can do with a compiled script I guess.

The variables I need to access are variables only related to PR (kit system). Is there a way to get a list of them somehow. Or could someone tell me how to access them if I list those I need? (because I guess I can't count on the source code ). Or am I missing something about the compiled python code and what can be done with it.

Or maybe I need the server files (I only looked at the client files).


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



To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
geogob is offline Reply With Quote
Old 09-03-2007, 05:51 PM   #5
[R-DEV]e-Gor
PR Coder Team
Supporting Member
Default

Sorry, this thread fell off my radar somehow.

Yes, the python code is closed up... blame certain server admins for that. And we can't distribute the uncompiled python, as this could be used in place of the compiled ones on servers. The server has the same .pyc files as the client.

This was done mainly to prevent server side modding, as we've had some bad experiences with that in the past and have decided to no longer support it.

You should be able to add functionality, but changing PR functionality is not really possible. So the only way to get around this is to write your own QM script from scratch and replace the PR one with that, unfortunately.
[R-DEV]e-Gor is offline Reply With Quote
Old 09-03-2007, 05:56 PM   #6
geogob

geogob's Avatar
Send a message via ICQ to geogob Send a message via AIM to geogob Send a message via MSN to geogob Send a message via Yahoo to geogob
Default

Quote:
Originally Posted by [R-DEV]e-Gor View Post
Sorry, this thread fell off my radar somehow.

Yes, the python code is closed up... blame certain server admins for that. And we can't distribute the uncompiled python, as this could be used in place of the compiled ones on servers. The server has the same .pyc files as the client.

This was done mainly to prevent server side modding, as we've had some bad experiences with that in the past and have decided to no longer support it.

You should be able to add functionality, but changing PR functionality is not really possible. So the only way to get around this is to write your own QM script from scratch and replace the PR one with that, unfortunately.
Exactly as I thought by looking through the PR files. Thanks for the reply. I'm a bit disappointed, but meh. I had hoped I could bring my experience in here to help improve the game. But I'm no modeler, no mapper, and a bad animator (although I manage to get good work done, but it takes me hours). Coding is really my force.

I do understand why you decided to make such things impossible. Sad, but understandable.

If the code is unavailable, could it be possible to have a list of variables giving me information on kit distribution? Or would knowing those variables allow me to access and modify them, making SSM possible, which would go against the idea of not releasing them in the first place?


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



To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
geogob is offline Reply With Quote
Old 09-03-2007, 06:43 PM   #7
[R-DEV]dbzao
Programming Manager
Supporting Member

[R-DEV]dbzao's Avatar
Default

What exactly you want to do with the kit system?

If you want to help, maybe we can get some ideas that need coding for you to work on.
[R-DEV]dbzao is offline Reply With Quote
Old 09-03-2007, 07:05 PM   #8
geogob

geogob's Avatar
Send a message via ICQ to geogob Send a message via AIM to geogob Send a message via MSN to geogob Send a message via Yahoo to geogob
Default

I'd like to work on a reporting system to give SL and CO an overview of the available and issued equipment, which squads has what, etc. That's the basic idea.

To that, there are many things I wanted to experiment with; for the sake of learning on how the BF2 engine works and how to code for it:
- kit moderation (squad leaders need to approve kit selection)
- kit allocation (CO allocates kits to SL or SL request kits for their squad)
- kit info for players (players know which kits are available to their squads)
- Vehicle inventory (for SL and CO to know what vehicles are available)

First implementation would be text based. Eventually (and as possible) integrated in the BF2 command interface.

For the command interface, I'd also like to work on a better information system for squad leaders to get feedback from actions done by other SL in the team and on a maker system for CO and SL to mark areas (other than using the infamous "boat spotted").


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



To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
geogob is offline Reply With Quote
Old 09-05-2007, 10:34 PM   #9
danthemanbuddy
Banned
Default

I say give this talented man a chance to prove himself and we add to our coding genius Devs.

This can only mean better things in the future.
danthemanbuddy is offline Reply With Quote
Old 09-05-2007, 11:16 PM   #10
geogob

geogob's Avatar
Send a message via ICQ to geogob Send a message via AIM to geogob Send a message via MSN to geogob Send a message via Yahoo to geogob
Default

Actually, my best talent so far is finding new exquisite ways to crash games engines

My night vision system in INF had ways to crash the engine while I experimented with it, it was unbelievable.


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



To view links or images in signatures your post count must be 1 or greater. You currently have 0 posts.
geogob is offline Reply With Quote
Reply


Tags
question, references, scripting
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 10:02 PM.


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