Only the default (TGN Light) theme for now. Dark them is also coming back soon. Then CSN. Then Wrestlin' Nation. A lot of WIP stuff right now. There are a couple of things still not working either. Sorry.
ive been trying to do this for a while, and its probly somthing really simple,but how would i add a rangefinder to a gun like the m24 or m95?
also, if this helps, i have version 1.00 and i dont care about playing online.
Ok, first things first. Before you make any changes to any file listed here PLEASE MAKE A BACKUP IN CASE SOMETHING GOES WRONG. All credit for this tweak goes to "SatNav" over at http://battlefieldsingleplayer.plane...spy.com/forums
Follow these instructions step by step to add a rangefinder to your sniper rifle.
Goto Program Files\EA GAMES\Battlefield 2\mods\BF2 and look for Menu_server.zip then open it up. Next, open up HUD\HudSetup\Weapons and find HudElementsGenericWeapon.con (drag HudElementsGenericWeapon.con to desktop and then open with notepad) and copy and paste this to the bottom of the file.
rem -------- range to target ------
hudBuilder.createPictureNode GenericWeaponHud RangeText 130 465 128 16
hudBuilder.setPictureNodeTexture Ingame\Vehicles\Icons\Hud\Land\M6Linebacker\range_ toTarget_text.tga
hudBuilder.setNodeColor 0 0.8 0 1
Then open the sniper rifle tweak file. example, the usrif_m24.tweak in Objects_server_patch.zip\Weapons\Handheld\usrif_m2 4\ and paste this under the 'ObjectTemplate.createComponent WeaponHud' template.
You should now get a working range finder when you zoom in on the sniper rifle.
As a side note and side effect of doing this is every weapon will have a rangefinder but, not the distance displayed. Only the sniper rifle will have the range displayed. To fix this you would need to make a custom hud with a custom hud number if you only want it for 1 weapon. Copy the GenericWeapon hud code and rename it and give it a new number.
Thanks for the question and replies, but i want to show my edit.
There is no need for the PictureNode. I changed the color to yellow, and placed it at the bottom of the screen centered. I havent looked into putting it on only one or two weapons for i dont care about the numbers with other weapons, cause they dont get in the way. Anyway, in the HudElementsGenericWeapon.con paste this at the bottom of the file:
rem -------- range to target ------
hudBuilder.createTextNode GenericWeaponHud RangeLabel 390 570 100 20
hudBuilder.setTextNodeStyle Fonts/vehicleHudFont_6.dif 2
hudBuilder.setTextNodeStringVariable TargetDistanceString
hudBuilder.setNodeColor 255 255 0 1
Also!!! Paste this in the HudElementsM16m203.con:
rem -------- range to target ------
hudBuilder.createTextNode M203Hud M203RangeLabel 389.5 365 100 20
hudBuilder.setTextNodeStyle Fonts/vehicleHudFont_6.dif 2
hudBuilder.setTextNodeStringVariable TargetDistanceString
hudBuilder.setNodeColor 255 255 0 1
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment