An in-progress project to document Far Cry 2 modding. Includes a guide, tools and files to assist any aspiring Far Cry 2 modder.
An Almost Complete Guide to Far Cry 2 Modding
Created by Boggalog
This is an attempt to document and facilitate Far Cry 2 modding. The guide includes over a hundred pages on how to make all kinds of different modifications including editing weapons, vehicles, npcs, graphics etc. Also included are lots of guides that cover adding new features and more in depth changes also, including weapon holstering, weapon inspecting, friendly npc factions, shooting while driving etc. The guide is available online via Google docs, here.
The download includes a number of extras:
- Tools - Unpacking/packing tools and a XML decoder. This is everything you need to do 90% of Far Cry 2 modding. Any other tools required are detailed in the guide.
- Patch files - These include all the files you need to do all of the edits from the guide. There are two sets of patch files, one that just contains the necessary files and another that contains the same files but with pre-applied bug fixes and base features. All the details of these are in the download.
- Optional additions - These are a selection of larger features that can be immediately dragged into the included patch files. The aim here is to make creating your Far Cry 2 mod's foundation as easy and customisable as possible. Now includes: Alternate animations, Weapon holstering/inspecting, Silent Machete assassinations, Shoot/grenade while driving, Playable female mercenaries, Limited navigation, Remove rim lighting.
- File library - It's hard to know what versions of files are the best when adding to your mod, so I've included most of the ones you could need.
With all of this Far Cry 2 modding has never been easier. Feel free to post a comment if you need any help and I will assist ASAP.
This came at the right moment at the right time. a 1000 thanks to you. I'm diving in....! I got to the website now at google docs. I want to add zombies through the whole single player map. No missions. Everything unlocked at the start. Just undead all around.... Do you think I can learn to do this by your guide?
That's a really cool idea and is definitely beyond the scope of the guide. I called it "almost" complete though because there's so much more that I'm sure it possible but hasn't been discovered. At the very least the guide can help point you to the files that might contain what you're looking for.
Your main difficulty with your suggested project is what you mean by undead. It's not possible to add new animations, you can just swap around those that are already there. What were you thinking of by undead?
I've never tried removing all missions but I bet that could be done without too much trouble.
Do you think there will be a way to eventually mod the in-game music/replace with other audio files? Thanks.
Dannyhl2 has somewhat managed that already, though it's really buggy from my experience. I will probably try to edit the jackal or predecessor tapes to play music...eventually, I'm still new to modding this game.
That sounds like a really cool idea.. But why zombies ??
i mean, wouldn't it be best to just use the standard enemies with their civilian clothes ?? i mean the game is set in an african civil war after all.. ;)
Would be kinda cool having to survive a long journey through a large map with enemy fighters all around..
Woah, unless you have access to the Far Cry 2 and/or Dunia source code, that's basically impossible.
And, probably the reason why the dead mod that inspired this idea of yours is dead in the first place.
There's a section in gamemodesconfig that also alters the weapons stats. Does it actually affect the stats or just the one the game shows in the menu and you have to go to weapon properties to actually change their attributes? It does looks a lot simpler
I believe you're right and those in gamemodesconfig are those shown in the menu, I haven't tested it though. I'm 100% sure they don't influence actual weapon performance though, you'll need to do the steps in the guide for that.
Still me. Well, ****. I was hoping it can just be done in the gamemodesconfig file, it looks a lot simpler than trying to read the value in the weapon properties file, oh well. I'll just leave it as it is. Prefer not to touch things like gun stats unless I know for sure what I'm doing.
Also, I'm a bit confused on the player character damage section with the HitLocations. Is that supposed to change the damage I receive, or the damage I dealt to the enemies?
The hitlocations stuff changes the damage you do to enemies, I'll make that clearer in the guide.
Great. Thanks. Think I’ll adjust that a little. One thing I find a bit annoying about this game is how inconsistent the damage is. Sometimes when you headshot an enemy he’ll go down immediately, other times he’ll keep on trucking despite being shot in the head at least three times. It’s annoying cause my reflex was trained to stop shooting the moment I thought I hit the head. Although that might have something to do with the weapon’s range also.
I found the exact same thing annoying, so in my mod I doubled headshot damage and it felt a lot better. It also offset the enemies being a bit bullet spongey when a single headshot put them down.
Just about the only weapon i find guranteed to make a killshot is the AS50 but that's expected.
Also, I dig through weapon properties and some of the stat is kind of weird. Like the Desert Eagle reliability seems to be higher than the other pistols, even when it's supposed to be the worst of them. Is that supposed to be normal?
Are you using patch files from the default game or are you using a mod's patch files? Because a mod might have changed that. If you're using the default files then I guess that's how it is! Although make sure you're looking at the singeplayer weapon version
I did extract the weapon properties file from the worlds/tmpla/generated folder. Which is another confusing thing because there's apparently already another weapon properties file in the patch_unpack/generated folder although that one seems to only affect multiplayer weapon. Not sure if that's suppose to be default because that's really redundant if you ask me. I'm not using any mods btw.
Ah yes, you need to replace the default weapon properties file with the one you extracted from worlds/tmpla/generated. Eventually I'll include a set of patch files that includes all of the necessary files
So what exactly is the file in the patch_unpack/generated folder purpose? Far as I can tell it only affects multiplayer weapon. But the weapon properties in the worlds/tmpla/generated folder already have a section of multiplayer weapons. So you can just replace it like that no problem?
The purpose of the original file in patch_unpack/generated is for the official patches. So they were only patching the multiplayer weapons. The version in worlds/tmpla/generated is effectively the file they were patching, so it makes sense it includes everything.
Yeh you can replace it no problem, give it the same title and you're good to go. There are other examples that are the same, like weapons.xml and vehicles.xml.
Huh, makes me wonder why they didn't just use the original file in the world/tmpla/generated folder instead of making a whole new one. They could just adjust the multiplayer section of the file. Far as I can tell they're identical anyway.
Btw, sort of unrelated but have you noticed a weird glitch in the weapon stat menu? I noticed that if you bought the weapon upgrades, and then keep reloading a save after that point the menu actually shows the accuracy and reliability stat gradually increase by half a square until eventually it shows both of those stats completely maxed out for that gun you bought the upgrades for. It resets if you quit the game though. Weird, wonder if it actually affects the weapon performance.
No I've never noticed that! I only saw that screen for the first time recently though, even though I've played this game for years. So I would never have noticed any bugs. I doubt it effects weapon performance though, that would be much easier to notice.
Okay. It's just a bit annoying since it confused me a bit and I was wondering if anybody else had the same problem and it wasn't just me. Wonder what causing this.
Yeh it sounds weird and I don't know where you'd start trying to fix that!
PLEASE ANSWER. when i unpack patch.fat , I don't get the entitylibrarypatchoverride.fcb in \generated. i don't get the generate folder at all as its said in the guide.
Hi I think I've just replied to you in the modding discord.
you did
Any idea how to make the machete (slash attacks) chop foliage like bullets do? I had the thought to fiddle with attack type settings, make slashes handle like very short ranged projectiles, but my modding skills are quite limited. I imagine it would cause other problems though (collision animations, slash decals, etc.) What do you think?
BTW your independent holster mod has a broken SPAS animation, and it includes your 1-hit-kill machete feature. Thought I'd mention here instead of posting 2 separate comments.
And thank you for the work you have put into this guide.
I've never notice before that the machete doesn't cut vegetation so I have no idea if that's possible or not. I like your train of thought about masking it a short ranged projectile but as you say maybe that will break slash marks. I suggest looking into the different impact types and seeing what can be done. They can be hard to do anything with, I've tried a lot to make grenades break windows but could never get it to work.
And what do you mean my independent holster mod? The files attached to the guide or my old holster toolkit? I'll have a look and update them, I have some updates for the holstering method to add too. Thanks for pointing it out!
I've got some seriously weird thing going on with my mod. Let me explain.
I've been modding FC2 for a couple of years now, without problems, just some regular troubleshooting, as usual. In entitylibraypatchoverride.fcb I've had three files: 01_curves.xml, 02_weaponproperties.xml and 03_player.xml - no problems here. It all began after I decided to expand my mod a bit, after reading Your excellent guide. :)
I've added five more files: 04_weapons.xml, 05_buddies.xml, 06_vehicle.xml, 07_enemy_archetypes.xml and 08_gadgets.xml. Modifications done, entitylibraypatchoverride.fcb done, patch.dat and .fat done. Game CTDs after starting new game. I checked for editing errors, three or four times - all fine. So I started to exclude one file at a time from the patch and it turned out that files that gave me trouble were 04_weapons.xml and 06_vehicle.xml. Checked for errors again - nothing there (there were only few simple edits anyway: quieter explosions for rockets and grenades, slightly reduced recoil increase for some weapons, glider's mass and big truck audio fix). I tried decoded and undecoded files, re-editing them again, etc. No dice.
And this is where the things are getting spooky. :P I tried to include original, unmodified, (un)decoded files (weapons and vehicle ones). Game CTDs again! O_o WTH? Any ideas what possibly could be the problem here?
Hmm that is quite the puzzle... You've done the right thing by removing things one at a time and you should keep going! My thought is whether an entirely vanilla entitylibrarypatchoverride.fcb makes it crash. I've been in similar situations before, it's a pain in the *** and you'll probably have to redo a file or two but something is making it crash and you will be able to find it. Also are you using the tools included in the guide? Some older tools don't pack properly and cause crashes like you describe
Yes, I've been using older version of Gibbed.Dunia tools, which worked perfectly fine, but to be on the safe side I switched later to the newer versions included in your guide. BTW - the files produced by both versions have the same content, bit-perfect (files compared in Total Commander).
I'm going to try a thing or two I have in mind, but if it won't work I'd have to make a switch to something else, probably STALKER CoP or Heroes of M&M 3 modding, for a while, just to reset my braincells and maybe some solution pops in. :)
You can always edit the base files in worlds 1 & 2, not entitylibraypatchoverride.
so is it possible to add a language that is not yet supported in the game? (or font)
Font would be difficult because they're stored in an image form with the letters randomly spread across one image. So technically possible but limited and challenging.
Language on the other hand would be a lot of work but not difficult. All the text is easily unpacked into text documents that can be edited with notepad++. There are a whole load of lines but you could replace an existing language with whatver you want.
Is it possible to re-enable crosshair in Infamous difficulty?
This comment is currently awaiting admin approval, join now to view.
Is there a way to reduce NPC accuracy? Playing with increased damage is unfun when NPCs keep sniping me through bushes and leaves from long distance.
Greetings Sir, I am having a bit of problem here. I am removing the brown filter by setting post=0 in engine, settings, defaultrenderconfig.xml under <Post> tag BUT it also removes Godrays and other sky effects which I don't want. I only want to remove brown filter only. I am still new to Modding, Please help. I am using "Far Cry 2 Patched" with added Infinite Toggle Sprint and No Malaria
I was wondering how you were able to implement Anonymous mercenary into your realism plus mod. After looking everything over I noticed you created a new folder titled xbg which correlated with your "<value name="fileName" type="Hash">DCB50936</value>".
You also created a new xgb "graphics\actors\anonymous_merc\anonymous_merc.xbg</value>"
which obviously isn't available in the base game. Can you give me any pointers on how any of this works. Thanks
On my end it looks different, I have the full \graphics\actors\anonymous_merc\ file path but that gets wiped and squashed into the 'xbg' folder once it's packed and repacked.
To describe how this works, let's start in \patch_unpack\ui\localized\pcwidescreen\eng\ui\sp_avatar.mgb.desc. This file lists the entries in the player select screen, and if we create a new entry then the game gets confused and uses the default playable character entry which is the first listed entry within xx_player.xml in the unpacked entitylibrarypatchoverride.fcb, which is normally called 'MainCharacter.PawnPlayer'.
We can make the changes required to 'MainCharacter.PawnPlayer':
The name shown in the save/load menu is scraped from the name of this entry, where as I changed it to 'MainCharacter.PawnPlayer.Anonymous_Mercenary' it takes the word between the second '.' and the '_', so the menu says 'Anonymous'.
For the actual player cosmetics I copied over the visual elements of an enemy mercenary from 'xx_enemy_archetypes.xml' and did some edits to remove any facial features, hats and scarves as then these models are used in first person the camera would be behind all these details. I also had to remove all the topless features as with the head skin removed the body was invisible, as while shirtless the torso and head were the same piece.
Once that was done I took 'merc_kit.xbg' from \worlds_unpack\graphics\characters\mercenaries\ and edited it to remove the same elements removed in the previous step. That's the 'anonymous_merc.xbg' which you've seen.
With all that lined up the Anonymous Mercenary works. It's hard to type all the details but if I can help further please let me know.
In my attempt to recreate with as little error as possible, I used the sp_avatar.mgb.desc available from your mod and put it within a test patch_unpack file. I then took the same "25_player.xml" from your mod and replaced it with the previous one. After doing so I created a new folder named "anonymous_merc". This made the file-path "\graphics\actors\anonymous_merc" I copied the "DCB50936.xbg" available within your mod and renamed it "anonymous_merc.xbg". I then placed the renamed xgb into the file path above and packed. After unpacking to see if the xgb folder would be made, it was made and named "DCB50936.xbg". I assumed that this had worked and used those patch files to test in game. After starting a new game and loading in I was Warren Clyde. How do I make the game avoid using his player model?
If you're able to select Anonymous Mercenary in the player select screen but still spawning as Warren Clyde then something is wrong with your 25_player.xml file. Make sure the correct file is there and that you've repacked entitylibrarypatchoverride.fcb and overwritten the original in the patch.
I really appreciate the help you have provided so far. No matter what I do with the 25_player.xml file I spawn in the jeep as Warren. I have even directly copied the exact same entitylibrarypatch from your mod and it still yields the same result.
This might be too much to ask but could the Anonymous Mercenary feature be made modular/standalone like the old holster toolkit? Out of all the "gimmick" features this would be a very cool one to have on its own, but it is slightly more difficult to extract and reimplement individually.
This is just what I was looking for, a simple "do it yourself" guide on the game lesser tweaks.