bf2 modding

Until this forum becomes busy just include BF2, 2142 or BFV in the title

bf2 modding

Postby axemanbfv » Sat Feb 27, 2010 6:49 am

i'm running bf2 v1.03... everything i try i get ctd... i see most people say to delete the md5 files... where are they... more then one location? maybe i'm not unpacking and repacking the zip file right... i dunno...
axemanbfv
 
Posts: 3
Joined: Sat Feb 27, 2010 6:32 am

Re: bf2 modding

Postby LightSpeed/// » Sat Feb 27, 2010 4:59 pm

go through all the directories on the server, and delete the files with .md5 at the end, they should be in the following locations: all the level folders, the mods/bf2 folder and that should be it
AKA WhatThe
LightSpeed///
 
Posts: 44
Joined: Sun Oct 18, 2009 3:06 pm

Re: bf2 modding

Postby axemanbfv » Sun Feb 28, 2010 6:25 am

i find it in the levels folder but nothing in the mods/bf2 folder

now what can we do in terms of modding... right now i am happy with simple tests to make sure it works...
axemanbfv
 
Posts: 3
Joined: Sat Feb 27, 2010 6:32 am

Re: bf2 modding

Postby Player » Sun Feb 28, 2010 9:54 am

I found i had more success, by calling all mod's within a python script.

Many changes that seemed to be ignore by modding the files directly were loaded when doing so from a python script.

A simple mod which was part of my SniperWarz server which allows you to use the pistol as transportation or repluse soldiers and vehicles. I call it the PistolExpress©

Code: Select all
import bf2
import host

def init():
   host.registerGameStatusHandler(onGameStatusChanged)

def onGameStatusChanged(status):
   if status == bf2.GameStatus.Playing:

      host.rcon_invoke("""
                ObjectTemplate.activeSafe GenericFireArm USPIS_92FS_silencer
      ObjectTemplate.velocity 939

      ObjectTemplate.createComponent WeaponBasedRecoilComp
      ObjectTemplate.recoil.recoilForce 275
      ObjectTemplate.recoil.hasRecoilForce 1
      ObjectTemplate.recoil.goBackOnRecoil 1
      ObjectTemplate.recoil.recoilForceUp CRD_UNIFORM/0/0/0
      ObjectTemplate.recoil.recoilForceLeftRight CRD_UNIFORM/0/0/0

      ObjectTemplate.activeSafe GenericProjectile USPIS_92FS_silencer_Projectile
      ObjectTemplate.createComponent DefaultDetonationComp
      ObjectTemplate.detonation.explosionMaterial 939
      ObjectTemplate.detonation.explosionRadius 75
      ObjectTemplate.detonation.explosionForce 2750
      ObjectTemplate.detonation.explosionDamage 0
      ObjectTemplate.timeToLive CRD_NONE/10/0/0
                """)


Of course that's not the entire code but you get the idea.

Python grants you a lot of access to the game through various events.. which gives you a lot of control over how the game is played. Create your own custom triggers on common events..
Player
 
Posts: 28
Joined: Sat Oct 24, 2009 5:06 pm

Re: bf2 modding

Postby LightSpeed/// » Sun Feb 28, 2010 11:15 pm

If you have ever seen what Awesome A-Train did in BF2142 (which uses the same engine as BF2 only slightly modified, so you should be able to do similar things), then you would be impressed. You can make objects attract heat-seeking missiles, you can also make things fire like a shotgun (ala rocket shotgun), make vehicles fly (flying tanks), and then some
AKA WhatThe
LightSpeed///
 
Posts: 44
Joined: Sun Oct 18, 2009 3:06 pm

Re: bf2 modding

Postby axemanbfv » Thu Mar 11, 2010 1:10 am

what about adding planes/heli's that aren't already in the map...
axemanbfv
 
Posts: 3
Joined: Sat Feb 27, 2010 6:32 am

Re: bf2 modding

Postby Player » Thu Mar 11, 2010 6:58 am

axemanbfv wrote:what about adding planes/heli's that aren't already in the map...


Client Side is no problem in demo they pulled over all the retail maps / vehicles etc and provide it as a download..
I've never seen a working SSM.
Player
 
Posts: 28
Joined: Sat Oct 24, 2009 5:06 pm


Return to Battlefield 2, 2142 and Vietnam Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron