Re: Re:Introduction to JC2 Modding

Just Cause 2 Mods Forums Tutorials Introduction to JC2 Modding Re: Re:Introduction to JC2 Modding

#84082
jesse
Member

thespiritfox wrote:

Quote:
I didn’t see the basics put anywhere on this site, so I figured I’d go ahead and add a short tutorial.

There is a tutorial for updating your copy of the Gibbed toolset here. Use it, love it, Gibbed is still researching file types so a weekly update via this thread will keep your documentation up to date. This is important, because they’re always exploring more of the engine and files and unhashing new variable names, which means more text telling you what the hell those values are, and less incomprehensible numbers

So, we’ve got five programs. Lets go over them. Before we do though, go ahead and open a random folder to your JC2 install directory, specifically the archive folder.

If you see “pc0.arc” at the top, you’re in the right place.

Archive Viewer

This is the program that opens up the games files for you to peruse and save. Most of the content you want to alter (and all the content that anyone so far has modded, to my knowledge) is in pc0.arc.

When you open archive viewer, you will see a huge list of sections, most of which branch off into many individual files. The modding process is saving these files, modifying them, and then dropping them into an override folder which will let you run off the changed content.

Bin2XML and XML2Bin

Many of the files present (indeed, most of the settings and such you’ll ever want to change) are formatted in text files. When you look at them in archive viewer, and save them, they are pulled out in the .bin format. In order to modify them, you must convert the .bin file to a .xml text file that you can modify in notepad.

These programs simply do that for you automatically. If you drag a .bin on top of the appropriate program and drop it, it will automatically create an XML from that bin and place it in the same directory. Imagine that the program you want to use is a folder you are moving a file into, this goes for both.

Smallpack and Smallunpack

Most of the files which are not .bin format come in the form of archives. Basically just packages of associated files. Using the same method as the bin programs, you can pack and unpack archives, and modified archives are placed in dropzone just as other files are.

There are many file types which can be modded. A link to the file types can be found in the Mod installation tutorial, but I’ll go over a few briefly.

.bin – Files which are converted to XML for editing and back

.xml – Text files containing setting data and variables for many of the various objects in the game. Most commonly modified with notepad.

.dds – texture filetype, changeable with paint.net, a freeware photoshop clone. We’ve even got a texture modding tutorial.

.blz – General collection of files meant for small unpack. It usually ends up being a folder full of other files. The process for editing a .blz is to unpack it, modify whatever files you want to inside it, and drag it back to small pack. The output is always a .sarc, simply rename it .blz and drop it in dropzone.

A quick note on .blz files, at the moment (4/6/10) gibbed has said that there are some issues with converting back to .blz. I don’t know if this means all of them or just the file we were dealing with at the time (general.blz from pc0.arc/global/areasets) but if you encounter any issues drop a response somewhere and he’ll probably hear about it eventually.

.eez/.ee – another format of archive folder, associated with small unpack again. The golden rule, if when you unpack something and alter it, return it to the extension it was before. With this file specifically, you always want the .eez. Thats what you pull out, convert back to, and put in drop zone. Pretend .ee doesn’t exist.

.rbm – Model file, most common incarnation is character models

.vdoll – Settings file for a specific vehicle, usually found in the .eez archive for said vehicle. Used with bin2xml to convert into modifiable text format, and back again.

There are several more formats, but to be honest I haven’t dealt with them much yet, or else the community collectively (meaning gibbed and bolo mostly) haven’t figured out how to alter them yet. These include .lod, .epe, and several others.

A Quick Tutorial
Now, to walk you directly through a basic mod, I’ll go ahead and copy the tutorial I used not too long ago.

1. Open pc0.tab with ArchiveViewer
2. Save all, or save settings/weapons.bin to the dropzone directory.
3. If you saved all, copy settings/weapons.bin to the dropzone directory.
4. Click and drag weapons.bin on to bin2xml.
5. Open weapons.xml with any text editor.
6. Search for “weapon_8” (this is the rocket launcher).
7. Scroll down and look for the following:
“ammo_max_range”
“ammo_velocity”
“bulletspershot”
“max_max_bullet_spread”
8. Change them to:
“ammo_max_range” to 5000
“ammo_velocity” to 10
“bulletspershot” to 40
“max_bullet_spread” to 10
9. Save weapons.xml.
10. Click and drag weapons.xml on to xml2bin.
11. Start Just Cause 2, if you have done everything correctly, should make
a nice fireworks show.

In it’s most basic form, that’s the procedure.

A quick note, if you are trying to convert an XML to a .BIN and the program throws out an error, it’s likely that you somehow screwed up the syntax of the file you’re dealing with. You might have deleted an equals sign or a bracket or something else of that nature. If you get the error and can’t find the problem, always remember you can pull a fresh unmodified copy from the installed game files and start again. Same thing if you mod the hell out of something and break your game.

Last, some helpful links.

http://www.justcause2mods.com/index.php/forum?func=view&catid=19&id=633 Basic mod information and mod Installation.

http://www.justcause2mods.com/index.php/forum?func=view&catid=19&id=359 Weapons.bin modification tutorial

http://svn.gib.me/public/avalanche/trunk/ – Gibbed’s toolset and documentation. There’s a good bit of helpful information about filetypes you’ll encounter.

http://jc2wiki.info/ – The JC2 Wiki, bare bones at the moment, just like this site. But it’s got alot of the information here in duplicate.

http://spreadsheets.google.com/ccc?key=0Am_BS1RkWf3rdE5SWVZ0YS14TVdfcGV1RFRVR0RRTHc&hl=en – And last, a google spreadsheet by a SomethingAwful forum goon with a listing of weapons and the variables they use, in case you want to make your pistol fire rockets.

How can i put the files in archive viewer?