The World Conflict Script Package, Some complex pythonscripts.. |
The World Conflict Script Package, Some complex pythonscripts.. |
Apr 5 2010, 10:46 AM
Post
#1
|
|
|
Captain ![]() ![]() ![]() Group: Soldiers Posts: 55 Joined: 16-March 07 From: Germany Member No.: 3,109 |
Hello guys!
I have started modding BF2 a long time ago. I joined a campaign in the meantime and created a mod for them. This mod (called World Conflict) has grown constantly until today. So, why am I telling you this? Because, this mod is based on many community mods/resources. Sounds, textures, models, maps, effects, ... and I never had the ability to do more than saying/writing my thanks to the creators. Sure, they probably have not expected more than this.. (Except a credit Now, I will do the same as they have already done. I have not created thus cool sounds, models, maps and so on, but there are already enough of them. While I created World Conflict, I often missed the ability to use python and coders were rare. So I learned it. And thats it what I would like to share with you. My scripts which I have written for my mod. I would say, these scripts are not only "scripts" as they could be found in BF2. They are rather comparable with the scripts of Project Reality. But they provide more than this. In the package are many scripts included which are used to administrate the campaign battles, to activate perks for a specific team or player, to save the statistics at the end of a battle and giving the players points for their achievements. What I am not offering, are standalone scripts. These scripts in the package wont work without some further editing in another mod and I have not the time to rewrite them. Without any basic python understanding, you wont have a use of the scripts. What I am intending is that someone could look into my scripts and could see how things will work. To understand the scripts completely, it could be necessary for you to download my mod. Some scripts are not completely commented, some comments are in English, some in German and some are not really helpful for someone who is looking the first time at the scripts, but that should not be a problem as we are in a forum. I hope it will help someone, I hope it will demonstrate new capabilities, I hope someone will be delighted as I was. If you are interested now, then do not wait any longer and download the package: Inside the script-archive you will find further descriptions within some readmes. And remember: If you have any questions related to this package, feel free to ask in this thread! |
|
|
|
![]() |
Apr 5 2010, 01:21 PM
Post
#2
|
|
|
CinC (for now) ![]() Group: Mr. Admin Posts: 5,809 Joined: 28-December 03 From: Fort Hood, TX Member No.: 46 |
Gremlin,
We would love to host a Python BF scripting tutorial section on this site. I agree that there are very few mod teams that have done anything with the python scripting and very few modders still around that know anything about it. Project Reality makes heavy use of the scripting. Pirates has some new game modes, like Capture the Flag. First Strike for BF2142 uses scripting to make objective and push maps. If you could explain what changes you made and for what reason, that would be awesome! thanks for offering your scripts. We can offer a mirror host here as well. -------------------- No, my Avatar is not my dog.
|
|
|
|
Apr 5 2010, 02:35 PM
Post
#3
|
|
|
Captain ![]() ![]() ![]() Group: Soldiers Posts: 55 Joined: 16-March 07 From: Germany Member No.: 3,109 |
What I have changed and why, could be found within the included readmes. If I post the descriptions in this thread, then it would maybe too many text, since I do not see a real spoiler- or codebox-function.
And more descriptions as the ones in the readmes are not possible at the moment. I wanted to release my scripts for some time past, so I did it now because I do not know when I would have done it otherwise. If you want to host the package, then host it, I do not have a problem with it |
|
|
|
Apr 9 2010, 10:36 PM
Post
#4
|
|
![]() Classic Rock? no.. classic BF2 ![]() ![]() ![]() ![]() ![]() ![]() Group: Soldiers Posts: 2,490 Joined: 28-June 04 From: USA Member No.: 262 |
Most of these look to be only pertinent to MP games.
XWW2 has some interesting python scripts that work in SP / COOP. I don't know if I'll ever get the time, but I'd like to see if Python can intercept and send orders to bots. If it could, much coolness could be done like implementing cover, setting up more flexible strategies, etc. -------------------- Thanx!
~Keith "Korben Dallas" |
|
|
|
Apr 10 2010, 03:54 AM
Post
#5
|
|
|
Captain ![]() ![]() ![]() Group: Soldiers Posts: 55 Joined: 16-March 07 From: Germany Member No.: 3,109 |
The standard scripts for the mod are sp compatible, too. But none of these are especially for sp.
As I know, python can not interact with the engine itself, especially not with the bots. So I regret to say that your ideas (orders, strategies, cover) wont work. |
|
|
|
Apr 10 2010, 05:43 AM
Post
#6
|
|
![]() Classic Rock? no.. classic BF2 ![]() ![]() ![]() ![]() ![]() ![]() Group: Soldiers Posts: 2,490 Joined: 28-June 04 From: USA Member No.: 262 |
python can not interact with the engine itself Care to elaborate? Because much of what is being done in the various mod custom python scripts was achieved through undocumented "API's". A bot order (current plan) is no different than a human player receiving an order. It becomes a tempoary variable stored to that specific player id. -------------------- Thanx!
~Keith "Korben Dallas" |
|
|
|
Apr 10 2010, 08:48 AM
Post
#7
|
|
|
Captain ![]() ![]() ![]() Group: Soldiers Posts: 55 Joined: 16-March 07 From: Germany Member No.: 3,109 |
But which variables/objects/methods will be saved to a player object and which variables/objects/methods are accessible with python, are two different things.
And that is the problem which I see in your purpose or which I do not see Sorry, but if I list the available attributes of a player object, there is no attribute which contains the strategies or something like that. |
|
|
|
Apr 11 2010, 01:21 AM
Post
#8
|
|
![]() Classic Rock? no.. classic BF2 ![]() ![]() ![]() ![]() ![]() ![]() Group: Soldiers Posts: 2,490 Joined: 28-June 04 From: USA Member No.: 262 |
if I list the available attributes of a player object, there is no attribute which contains the strategies or something like that. I'm not trying to argue with you. But you are making definitive statements about a wholly experimental scripting environment which was pieced together by community coders focused on multiplayer gaming and from no documentation. Did you discover any attributes or methods which were not previously published at BFEditor.org? If you did discover something new, did you publicly share it with the community? -------------------- Thanx!
~Keith "Korben Dallas" |
|
|
|
Apr 11 2010, 02:42 AM
Post
#9
|
|
|
Captain ![]() ![]() ![]() Group: Soldiers Posts: 55 Joined: 16-March 07 From: Germany Member No.: 3,109 |
I really do not wanted to discourage you or anyone else. I just write my opinion and knowledge referred to your intentions. And I truly do not want to have the final word ever, but.. bf2 is over 5 years old now and everything which this game offers has been already discovered. Indeed, it is possible to create new capabilities, methods or something else, but all of them based on them which the game originally offered, if they interact "with" the game.
What I did discovered? (Therewith is not meant that this had not been discovered by anyone else, I just do not know anything about it when I had the idea.) - Scripted vehicle movements - Controlling the game-colors of a client (based on another idea) - Detecting the state of the terrain (without reading/importing the heightmap) - Creating a simple AntiAirRadar - Detecting the dimensions of staticobjects And did I published it? Yes, with the first post of this thread |
|
|
|
Apr 11 2010, 05:37 AM
Post
#10
|
|
![]() Classic Rock? no.. classic BF2 ![]() ![]() ![]() ![]() ![]() ![]() Group: Soldiers Posts: 2,490 Joined: 28-June 04 From: USA Member No.: 262 |
bf2 is over 5 years old now and everything which this game offers has been already discovered And in 5 years we have.. 1 python script written specifically for bots. BF2 was fundamentally a multiplayer game, there is definitely no denying that. The overwhelming amount of work done in mods, and in custom python scripts for mods, was done with multiplayer human games in mind. Perhaps everything pertinent to human online BF2 games that can be done with python has been done. To say we can't affect / improve SP / COOP / bot games is very premature though, considering how little time and effort has been put into it. What I did discovered? (Therewith is not meant that this had not been discovered by anyone else, I just do not know anything about it when I had the idea.) - Scripted vehicle movements - Controlling the game-colors of a client (based on another idea) - Detecting the state of the terrain (without reading/importing the heightmap) - Creating a simple AntiAirRadar - Detecting the dimensions of staticobjects And did I published it? Yes, with the first post of this thread Your efforts and time are much appreciated. Perhaps not so much relevant to the SP / COOP audience of this site, but as a modder I do salute you for your creativity and works. -------------------- Thanx!
~Keith "Korben Dallas" |
|
|
|
Apr 12 2010, 10:03 AM
Post
#11
|
|
|
Captain ![]() ![]() ![]() Group: Soldiers Posts: 55 Joined: 16-March 07 From: Germany Member No.: 3,109 |
Okay, okay.
|
|
|
|
Apr 12 2010, 05:35 PM
Post
#12
|
|
|
CinC (for now) ![]() Group: Mr. Admin Posts: 5,809 Joined: 28-December 03 From: Fort Hood, TX Member No.: 46 |
Korben,
If there is anyway to control the AI with python scripts, noone has discovered it yet. I have asked around. Early on, we even had some DICE devs dropping by this site and the BFeditor forums. I think they may have even said that there wasn't anyway to control the AI through python scripts. Even if they didn't specifically say it, surely they would have responded to the questions about controlling the AI posted previously. This isn't the first time the issue has been brought up. -------------------- No, my Avatar is not my dog.
|
|
|
|
Apr 12 2010, 10:50 PM
Post
#13
|
|
![]() Classic Rock? no.. classic BF2 ![]() ![]() ![]() ![]() ![]() ![]() Group: Soldiers Posts: 2,490 Joined: 28-June 04 From: USA Member No.: 262 |
If there is anyway to control the AI with python scripts, noone has discovered it yet. Yes I agree. Probably because no one has looked. Think of all the undocumented things discovered in BF1942. To say something cannot be done - because no one ever tried to do it - is quite unscientific. I have asked around. Early on, we even had some DICE devs dropping by this site and the BFeditor forums. I think they may have even said that there wasn't anyway to control the AI through python scripts. Even if they didn't specifically say it, surely they would have responded to the questions about controlling the AI posted previously. This isn't the first time the issue has been brought up. To my recollection, the DICE devs while they were here never spoke a word about python. And I spent a great deal of time talking to them. -------------------- Thanx!
~Keith "Korben Dallas" |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 18th May 2013 - 11:09 AM |