One of the nice pro's of JA:F is the any changes in weapon characteristics are detailed extremely well. As you can see below, now the M16 keeps accuracy over longer distance, but drops in damage due to low velocity and pen, while the AK-47 loses accuracy over distance but keeps its damage pretty consistent. Meaning random bullet deaths from an AK are to be feared.

Since I am a glutton for punishment and a geek at heart, I decided to try my hand and throwing together a UI that would allow anyone to view and edit the different JSON files without jacking up the formatting. Given that this was my first stab ever at dealing with JSON from a programming standpoint it beat my ass for a good day and then I finally figured it out.

All I can do right now is read, but writing now that I have the structure down shouldn't be that hard, and it could then pretty easily port in all of the different JSON files that we could edit or add to.

NOTE: Editor updated to work with the newly formatted Weapons.JSON file. If you do not yet have the new format, its going to blow up. See Shangas post below for a copy of that file.

Edit: Well I can now properly write everything except the ammunition string because it really isn't a string as far as JSON is concerned. Still some tweaking to do but with any luck I may have a working weapon editor pretty soon.

Edit 2:It's rough but it can add new items to the JSON and Modify existing items in there. All it requires is the path to your game.exe and everything else uses relative paths. Make sure you DO NOT include the \ at the end of your path. I am in Omaha all next week so I thought I could get this working but highly untested version out now.

Edit 3: It will read all the data for the explosives and melee weapons but I haven't put in the logic for writing them back to the game. Right now we seem to have the standard set of both melee and grenades in there so that's low on the priority list.

To Do:

Store input of game directory in a file so you don't have to enter it each time you open the program. DONE

Where the options for entry are limited, make those dropdown boxes (e.g. Ammo, etc).

Allow editing of the Icon value, right now it defaults to the M16.

Allow it to autoupdate each time it is launched from a web repository. DONE

- The stats shown are pretty much what the ingame performance works like.
- The increased dmg of the AK makes headshots pretty brutal (which is fine, I don't think anyone would have a chance to survive a direct AK bullet to the head)
- I've also upped from x1.5 to x2.0 the dmg bonus for headshots
- energy conservation is very well represented in the weapon stats by muzzle velocity (so the AK still kicks like a mule, even when range increases and accuracy drops)
- this needs more info but I think "mobility" represents the penalty for close range shots
- the effective range in open areas seems to be 10 tiles, with various AI tactics changing that (scouts get closer, snipers stay farther):
a) under 5 tiles pistols and SMGs kick ass thanks to multiple shots
b) at 5-10 tiles pistols and SMGs lose dmg and ARs are the best choice
c) over 10 tiles pistols and SMGs have zero dmg, ARs lose dmg and accuracy and the best choice is a high power rifle.

This can be further tweaked for shotguns, sawed-offs, maybe a separation of SMGs and pistols (make the high caliber pistols a valid alternative to the SMG burst).

Effective Range is where the weapon is most effective (= accurate).Muzzle velocity defines how quickly the accuracy will decrease when shooting further than the effective range.(Only affects weapon accuracy when the target is further than effective range)Base Accuracy is the accuracy of the weapon. (the max weapon accuracy your gun can achieve, and that's at effective range)Mobility is how mobile your weapon is. Bigger guns usually have lower mobility that gives a penalty the closer the target is. (only affects weapon accuracy when closer than effective range. The more mobility, the less accuracy you will lose the closer you are with the target) - values above 10 are already very high IMO, for any meaningful close combat penalties, values of 1-5 may be interesting, depending on the weapon -

Source : JAF forum
This calculation may have changed since it was posted. Seing the graphs and stats, not that much i'd guess.

Edited the original post to fix the image link (its an image of the latest iteration), and provide a link to download the editor. Its a VS2013 project so chance are is going to want .NET 4.0 or 4.5, honestly I can't remember right this second.

Couple of notes:

1. There are two buttons, one to add a new weapon, one to edit whatever it is you have selected. The list is sorted exactly as it exists in the default JSON which is to mean not at all.

If you are adding a weapon, it will show up at the bottom of the file, note that none of them have drop percentages yet so you will have to assign it to by its "ID" to a Merc via the Units.JSON file.

If you are modifying a weapon make sure you are modifying one that exists in game, OR that you have already assigned to a merc. Modifications are placed in the file exactly where the original item was, so if you want to verify the changes, look at the portion of the file it was in originally, not at the bottom.

Since the ID's used originally in the JSON are nothing more than the weapon names, I have added some logic in to keep new weapons from stepping on one another. Namely, the ID for new weapons is the NAME + the Index number from the list. This ensures that if I create an item with NAME = AR-15 and another item with the same name, it won't blow up things.

2. The check boxes that are next to Burst Fire and Auto Fire are simply there as an easy to recognize notation of if it has or does not have that feature.

3. I haven't yet tried to break it, and there is very little error checking in it right now, so if you want to break it, it should not be hard.

4. Right now it only loads the Icon of the selected weapon. If you add a weapon you will need to update that portion by hand for now, that's in line for an addition at some point.

Editor updated to work with the new format, and to stick with the animation set of whatever you were last viewing.

For example, want to add a pistol, make sure you are viewing a pistol in the first place. I have no idea yet how these tie back into in game models, but that's something we need to understand as well. If those models to weapon ID's are hard coded in unity adding anything new is going to be a pain in the ass.

Weapons Editor - it saves the modifications to the JSON file, but if you move to another weapon and come back to the one you edited it shows you the unedited stats in the memory. Either make a "Refresh JSON" button or keep the saved data in the memory somehow. Or reload the JSON after you press Modify button?

Add New Weapon misbehaves, it put M16 icon to a few of the other guns when I accidentally pressed it. I think for now you can safely remove this option, since we cannot yet add new weapon models.

I've tested their RC1 weapons and honestly the default ranges suck. There's a lot of room for improvement. Nevermind AK bullet keeping penetration value over distance, they made the pistols useless with 1.5 ranges. So this project could turn out to be a game saver.

My personal view on weapons and ranges can be summarized as this (without going into weapon specifics):

Pistols: should be valid at room size;
Sawedoffs: same range as pistols, but pack way more dmg;
SMGs: short-mid range, same dmg as pistols per shot, good upclose, good midrange
Shotguns: mid-range, with sharp loss of accuracy on distance
ARs: mid-range, with better distance accuracy, slight penalty upclose
LMGs: same as ARs, but with full auto
Rifles: long-range, good distance accuracy, high penalty upclose
Sniper rifles: longest range, good distance accuracy, highest upclose penalty

I'll try to take as unit of measure actual fighting distance the AI prefers and physical objects (rooms, cars, etc).

Some particular weapons, such as Desert Eagle or FN-FAL must be given special attention. Heck, all weapons should have at least one specific plus. Either AP cost or range... something.

The core problem is with the scale factor. It's simply too low 1.5 for pistols. As opposed to JA2, here some guns simply do not shoot when out of range, so you can't even take pot shots. So such a dramatic nerf is too much.

We can play with mobility (close range penalty) and muzzle velocity (damage falloff) to balance weapons so no class becomes overpowered.

File has been updated. It will now refresh the JSON both when the "Start" button is clicked, as well as any time you change the drop down .SelectedIndex value.

Also I have replaced the single .zip file with a click once installer that will autoupdate. So remove whatever you have now and use the link in the original post to get the newest version available 1.0.0.8 in this case.

I have also added the ability for it to save the path that you put in so you don't have to keep pasting it in each time you launch the application, I think this will remain with new versions but if it doesn't let me know and I will look into it. It will also now check for the existence of game.exe in the specified path to make sure you have entered it correctly AND that I can read from it. If it can't find Game.exe then it will prompt and you can edit the path and try again instead of it just crashing.

Finally, I found what was causing it to write the M16 PNG value when you modified a weapon, for now, a NEW weapon will start with an M16 PNG file but anything modified will stick with the icon that was originally specified.

Simply convert the image you want to use to .png and overwrite the existing file! Handguns are 512x512 and long guns are 512x256.

I have been using Paint Shop Pro 9, but so far have not been able to figure out how to create the checkerboard background for the new image that makes the background invisible in game. Anyone know how to add this background to a .jpeg?

I think Shanga said something about the files having to be edited in PNG, but I could be wrong.

From a modding standpoint it does seem very simple, my only outstanding question is how the weapons.json ties into the actual models in the game. I can't seem to find anyplace in the files where it indicates what asset is used.

All external files are declared in FileResources.json (in Original/Assets). If they're not properly declared here, they don't appear in UI. So this handles the external look of the file.

["Icons/Weapons/Beretta.PNG"],
["Icons/Weapons/Beretta_small.PNG"],

All 3d weapon models are declared in Resources.json

["Weapons/Guns/AK47"],
["Weapons/Guns/AKM"],

These are declared by their asset ID name. If they're not declared here, the merc is shown with empty hands. So we can safely assume these are the 3d models. I was referring to creating new 3d models earlier. If you reuse the item ID the game fails with this error mesage (I replaced HK_USP with M16):

Cannot find itemKit with id: HK_USP

So we can CHANGE how weapons look, replace X with Y, but when it came to adding a new weapon, we need a way to hook in a new model, too.

Disclaimer: This mod is very very pre-alpha. I am the only one who tested it. So consider yourself warned. Bad things can happen to your game. I am not responsible for them. The end.
PS: When FC will re-enable Modding for JAF we will re-issue this in a safer, mod-friendly, format.

After you unzipped the archive on your desktop, look for you Steam install. Should be something like:
[DRIVE_X]:\SteamLibrary\SteamApps\common\Jagged Alliance Flashback\game_Data\StreamingAssets\Original\Data

Here, in /Data you have to do the exact steps:

Go into /Dialogs and backup in a safe location (DO NOT RENAME, move them in another location) the following files:
ArmsDealer1.json
ArmsDealer2.json
ArmsDealer3.json

Go into /Items and backup in a safe location (DO NOT RENAME, move them in another location) the following files:
Weapons.json.

ARE YOU SURE YOU BACKED UP YOUR FILES? PRESS [YES] IF... joking...

Now take /Dialogs and /Items folders from the downloaded archive and put them in /Data, making sure you overwrite everything.
Go start a NEW game. Just use the "quick IMP" option. Does your IMP now use a Colt or a Bolt? If you see a Colt, you've done it, congrats.
If not, you fuxored something, read again the above and try to follow the correct steps.

I've done the first island with your "proper weapons mod V.1", and so far, no problem! Nice job woody!

Thanks, please test the shops, those were much complex. One shopkeer should be in Badilla (no3), one in Marino and one in Tio, if I remember well.

Anyway, if this works, guess it time to sit down and think through some weapon balancing and other tweaks. Not sure though I want to dig into that before AP/HE ammo and attachments come. And the damn MODDING button is enabled again.

The Armsel Striker would be an option as it was released and saw pretty wide adoption in the early 80's. The HK CAWS would be another viable option in that time frame. Finally the Pancor Jackhammer came in the late 80's, so that might be an option as well.

Yea, those came up in my searches too. But none resemble the Benelli shotgun model. I'd hate to hack the inventory image and the merc to have a Striker which looks like a shotgun. The Striker had very distinct profile (and so did the other 2).

Until FC opens up the models list to external modding, we need to find alternatives that are visually similar.

Don't be so quick to jump to conclusions. Where there's a will, there's a way.

Nothing quick about that conclusion, I said this a few months back when we talked about this

From what I know, the solution for this would be a runtime importer for .obj or other mesh files. There are some free ones around, or with very cheap licenses. It doesn't even seem to be that complex - see http://wiki.unity3d.com/index.php?title=ObjImporter
In any case, I am fairly sure that requires code access, so FC would need to do this.