|
Post by crazydave66 on Jan 10, 2017 21:45:45 GMT
I tried to search before I posted so if this is a duplication of a post please forgive me and point me to the right direction as just joined these forums.
I am very interested in creating mods HOWEVER I am new to it as in looking for a "beginners guide" to modding for FarCry 4. I do have a fair extensive knowledge of computer hardware and software and some coding as well but unsure if that is needed.
I am not sure where to start - so any suggestions greatly appreciated.
Thanks, David
|
|
|
Post by Steve64b on Jan 11, 2017 0:15:39 GMT
I was working on something like that, here's what I got so far: You will need: - A copy of Far Cry 4 (duh ). - A copy of modding tools for Far Cry 4 (see below). - Some insights in how to use computer technology may help. Like running .exe files with commandline parameters, using batch scripts, having data type knowledge (Strings, Floats, Integers, Hexadecimal, Binary) will make it easier. A brief overview of the Far Cry 4 modding tools:There are several modding tools you can gather. (I am working on combining them all in a single package for a flying start, for now you'll have to download them individually.)- REQUIRED for all basic modding: Rick/Gibbed's Dunia2 tools
The only required toolchain. Used to unpack Far Cry's big *.DAT/*.FAT archive files into smaller files for further modding. Used to further decompile the smaller files into readable format to mod. The Dunia2 tools however DO NOT SUPPORT Far Cry 4 out of the box! The latest version of the Dunia tools can be found at svn.gib.me/builds/dunia2/ (dunia2-r179_b116.zip), extract it to any new folder (I'll call this the 'Dunia' folder).
- REQUIRED for all basic modding: FC4project definitions for the Dunia2 tools
To add Far Cry 4 support to Dunia, extract Janne252's FC4project definitions at janne252.com/downloads/fc4/gibbed_fc4project.zip to your Dunia\bin\Projects folder. In doing so, also overwrite the current.txt file there, making Far Cry 4 the default loaded project. Modding using the Dunia2 Tools:1. All current mods to Far Cry 4 (ab)use the PATCH_HD.DAT file, because modifications made to that file will be loaded in the game. 2. To start your own mod, you should first unpack a preexisting PATCH_HD.DAT file to a folder to serve as a basis for the modded PATCH_HD.DAT (see WORKFLOW paragraph below). 3. Comment for techies: Modding Far Cry is based on CRC32/64 HASHES. Meaning that everything coming from the *.DAT (folders, filenames, even objectnames and datafields) will have to be 'translated' to become readable. Luckily, a big part of this translation will happen automatically based on (Janne252's) project definitions, but they are NOT complete (as 'unhashing' the CRC hashes isn't possible). 4. For a flying start, you can download Janne252's Main Far Cry 4 pre-converted archetypes in XML format (from janne252.com/downloads/fc4/FCC_Main_Archetypes.rar ), and his EntityArchetype browser ( from www.janne252.com//downloads/fc4/entityarchetypebrowser/FC4ArchetypesBrowser_v001.zip ) to quickly find and mod the object(s) you want to mod. Then convert your modded XML file to *.FCB and install it in the corresponding folder in your own mod dir. 5. Throughout modding, you must be sure to MAINTAIN THE SAME PATH&FILENAMES OF THE FILES YOU ARE MODIFYING. For example, Dunia.ConvertBinaryObject.exe may extract a file AA.FCB to AA_unpacked.xml. Be sure to convert it back to AA.FCB, and NOT to AA_unpacked.FCB, or else the modification will not be in effect! WORKFLOW:
A basic workflow is as follows: - Unpack Far Cry 4's *.DAT files by dragging & dropping a *.DAT file onto Gibbed.Dunia2.Unpack.exe, or running it from the commandline:
If you don't specify a "path\to\outputfile", Dunia will extract the <inputfile>.dat to a folder <inputfile_unpacked>\ instead.
While unpacking, Dunia tries to find matching filenames in "Dunia\bin\Projects\Far Cry 4\Files\*.filelist". If a match is found, the unpacked file is written to that filename. If no match is found, the file is written to a folder called "__UNKNOWN" and/or using the HASH as filename.
Far Cry .DAT files generally unpack to files of the following types:
- domino\*.LUA (compiled) script file, containing the game's logic. Decompile using Janne's tool at fc4modding.janne252.com/index.php?area=tool
- soundbinary\*.SPK/*.SBAO Sound files
- gfx\*.PNG PNG Graphics file, mainly used by thumbnails in the IGE editor, icons and fonts
- levels\*.RNV Map related?
- graphics\*.XBG Graphical 3D model information
- graphics\*.XBT Graphical Texture file
- dialog|engine\*.RML Packed XML fragment.
- graphics\*.MAB Animation data.
- graphics\*.HKX Havok physics data
- vistas\*.VCS Vista related
- soundbinary\*.SPK/*.SBAO Sound files
- gfx\*.PNG PNG Graphics file, mainly used by thumbnails in the IGE editor, icons and fonts
- levels\*.RNV Map related?
- game\*.FCB FarCryBinary file, usually a compiled XML file.
- entityarchetypelibrary\*.ARK.FCB are a special type of FarCryBinary file, defining an Archetype. Archetypes are the actual objects/assets you see in the game, a combination of behavior, texture, model, sound. Like a vehicle, enemy soldier, or a brick.
- Make modification(s) to files in the unpacked folder:
- To mod *.FCB and *.ARK.FCB files, they need to be converted from .FCB file to XML. You can drag & drop the FCB file onto Gibbed.Dunia2.ConvertBinaryObject.exe and by default, Dunia tries to find the filename's definition in "Dunia\bin\Projects\Far Cry 4\binary objects". If it doesn't find a matching file, the resulting XML file will only contain hard to read hashes and BinHex values. You will then have to manually analyze such an XML file, which is annoying. For better results, you can force Dunia to use a specific object definition by using a parameter, i.e. with:
Leaving out the "<inputfilename>.XML" part will convert the FCB to a "<inputfilename>_unpacked.XML" file instead.
Editing XML files is touch and go. Some object- and fieldnames are known, others aren't. Some datatypes are known, some aren't. You may want to use RaZoR's DataConversion utility at onedrive.live.com/?cid=17544ACAB3786C97&id=17544ACAB3786C97%2121615&parId=17544ACAB3786C97%21105&action=defaultclick to convert between BinHex and other datatypes.
- To mod *.XBT (texture) files, you will need to run DuniaGUI. While this tool has more features, we're only interested in the XBT <--> DDS converter. Place any XBT's to edit in the DuniaGUI\IN folder, and click on the button "XBT to DDS". You will find the converted DDS in the DuniaGUI\OUT folder. You can edit the file with GIMP (requires DDS plugin at registry.gimp.org/node/70 ) or Photoshop (requires NVIDIA's DDS plugin from developer.nvidia.com/nvidia-texture-tools-adobe-photoshop ). Be sure to save the DDS file using the DXT1 algorithm. To convert edited DDS back to XBT again, click the button "DDS to XBT" in DuniaGUI. That will convert DDS files in the DuniaGUI\OUT\ folder to XBT files in the DuniaGUI\IN\ folder.
- To decompile *.RML (compiled XML) files, use Gibbed.Dunia2.ConvertXml.exe with the --xml parameter:
To recompile *.XML back to *.RML again, run Gibbed.Dunia2.ConvertXml.exe with the --rml parameter:
- When you're done editing a single file, recompile it back to its original *.FCB/*.XBT/... filename.
- When all is modded, use Gibbed.Dunia2.Pack.exe to turn your mod folder into a *.DAT file. Be sure to rename it to PATCH_HD.DAT (and the accompanying .FAT file too):
Then you're set to test your mod! For any further modding, just repeat the process from Step 2 onward, since you already have your modded folder unpacked & ready to go.
MISC. Modding topics:EDITOR MODS:Editor mods revolve around changing the IGE XML files in ingameeditor\. For example, you can add missing archetypes to the object_inventory.xml file. Note that adding missing archetypes may require adding additional dependency files to your mod, like the textures/model/material/sound files they reference. TEXTURE/GRAPHICS: - XBTView
Used to view the *.XBT texture files.
- DuniaGUI by Haoose
Used to convert *.XBT textures <--> *.DDS files to edit with DuniaGUI can convert the *.DDS back into *.XBT again.
SOUND: Nothing yet to handle *.SPK/*.SBAO files. Although you can convert some sounds to .ogg using Ravioly Game Tools' Scan feature, download at www.scampers.org/steve/sms/other.htm#ravioli. 3D MODEL: Nothing yet. Nothing to import back into to the game. To export models to a 3D tool, the closest thing might be forum.xentax.com/viewtopic.php?f=16&t=11602&start=105 .
|
|
|
Post by crazydave66 on Jan 11, 2017 9:32:58 GMT
Thanks - this will help indeed
|
|