Just Cause modding part 1- Vehicle stats and hex editing

Today i will show you how to mod vehicle stats, like nitrous duration, jump height and more for both Just Cause 3 and 4!

You are completely new? Then be sure to give my introduction a read! https://luke-jc.com/2019/12/27/just-cause-modding-getting-started/

For Just Cause 3, i will be using the Kerner Serpente, so get Naem’s as well as Unknown’s tools ready. To get it’s file, go to [upackroot]\editor\entities\jc_vehicles\01_land\v0300_car_kensington_sportsmuscle > v0300_car_kensington_sportsmuscle_civilian_01.ee

Copy the .ee file into the folder with unknown’s jc3 tools

For Just Cause 4, i will be using the verdeleon eco, so go to your download of Protato’s vehicle edits (available here if you do not have it already https://justcause4mods.com/mods/vehicle-edits/). Choose either the “NT Nitrous & Turbojump”, “UVA Unlimited Vehicle Ammo” or “UVA & NT” and go to base\dropzone\editor\entities\vehicles\01_land\v024_car_ecosuper > v024_car_ecosuper_civilian_01.ee

Copy the .ee into unknown’s jc4 tools folder

For Just Cause 3, drag v0300_car_kensington_sportsmuscle_civilian_01.ee onto “smallunpack.exe”, this will unpack the archive to a folder called v0300_car_kensington_sportsmuscle_civilian_01.ee _unpack. For convenience lter on, remove the .ee_unpack from the name right away, so the folder is only called v0300_car_kensington_sportsmuscle_civilian_01

For Just Cause 4, drag v024_car_ecosuper_civilian_01.ee onto “StreamedArchive.exe”. This will unpack it to a folder called v024_car_ecosuper_civilian_01, no need to remove anything here.

Now, go into the folder, you will see a bunch of folders

JC3 will reveal:

  • editor
  • effects
  • models
  • textures

JC4 will reveal:

  • animations
  • effects
  • models
  • vehicles
  • vfx

Along those folders, you will also get a @files.xml, but leave it alone for now. It will be useful once we get into cloning vehicles or adding files and weapons to them.

For JC3, follow the folder path of v0300_car_kensington_sportsmuscle_civilian_01\modules\editor\entities\jc_vehicles\01_land\v0300_car_kensington_sportsmuscle\modules

You will see two folders called generated and default. Generated has

  • v0300_car_kensington_sportsmuscle_effect_attachments.vmodc
  • v0300_car_kensington_sportsmuscle_lights.vmodc
  • v0300_car_kensington_sportsmuscle_water_interaction.vmodc

The only really interesting file here is the water interaction file, which can be used to make the car float (not move on water)

Default has the rest of the stat files, namely

  • v0300_car_kensington_sportsmuscle_brakes.vmodc
  • v0300_car_kensington_sportsmuscle_buoyancy.vmodc
  • v0300_car_kensington_sportsmuscle_custom_land_global.vmodc
  • v0300_car_kensington_sportsmuscle_custom_velocity_damper.vmodc
  • v0300_car_kensington_sportsmuscle_decals.vmodc
  • v0300_car_kensington_sportsmuscle_front_tire.vmodc
  • v0300_car_kensington_sportsmuscle_land_aerodynamics.vmodc
  • v0300_car_kensington_sportsmuscle_land_audio.vmodc
  • v0300_car_kensington_sportsmuscle_land_engine.vmodc
  • v0300_car_kensington_sportsmuscle_land_global.vmodc
  • v0300_car_kensington_sportsmuscle_land_steering.vmodc
  • v0300_car_kensington_sportsmuscle_palette.vmodc
  • v0300_car_kensington_sportsmuscle_rear_tire.vmodc
  • v0300_car_kensington_sportsmuscle_rigid_body.vmodc
  • v0300_car_kensington_sportsmuscle_suspension.vmodc
  • v0300_car_kensington_sportsmuscle_transmission.vmodc
  • v0300_car_kensington_sportsmuscle_vehicle_misc.vmodc

Now, keep in mind all of those are stat files, so unpack them with Naem’s tools, not Unknown’s, as Unknown’s have an error that messes them up on repack. Bring up Neam’s tools in another window, and drag v0300_car_kensington_sportsmuscle_vehicle_misc.vmodc onto “batch.exe”. This will convert the file into an xml file that you can edit in notepad++.

For Just Cause 4, follow the path v024_car_ecosuper_civilian_01\vehicles\01_land\v024_car_ecosuper\modules where you will find a similar selection of files. Also go to default and unpack v024_car_ecosuper_vehicle_misc.vmodc

The Just Cause 4 vmodc files are unpacked with “AvalancheData.exe”

Now that you have the file converted to an xml files, open it in notepad++

Scroll down until you see “HERE YOU CAN TOUCH, BUT BE GENTLE”

For the sake of this tutorial, let’s do some typical edits i do for overpowered but also not so much much overpowered vehicles:

  • full_nitro_refill_time > 0.3
  • full_nitro_use_time > 20
  • full_nitro_use_time_upgraded > 50
  • turbo_jump_cooldown > 0.5
  • turbo_jump_cooldown_upgraded > 0.3

Now save the xml (ctrl + s) and drag the xml back on the tool you unpacked it with, this will repack it back into a .vmodc file

But let’s not stop there, next unpack v0300_car_kensington_sportsmuscle_custom_land_global.vmodc or v024_car_ecosuper_custom_land_global.vmodc depending on what game you chose, unpack it, scroll to “HERE YOU CAN TOUCH, BUT BE GENTLE” and do the following edits:

  • gravity_multiplier_grounded > 1.4
  • extra_top_speed (all 3) > 200
  • f_multiplier (both) > 60
  • r_multiplier (both) > 50
  • punch_speed_kph (both) > 105

Save the file again and repack it.

Once you’re done repacking, got back to the root of the tools folder.

For Just Cause 3, drag the folder onto “SmallPack.exe”, for JC4 onto “StreamedArchive.exe”. This will repack your unpacked vehicle folder with edited files back into a vehicle file.

Now it’s time to test it out!

Mind that the folder structure inside your mod folder will be the same as the one from the unpack. So for JC3, create the filepath dropzone\editor\entities\jc_vehicles\01_land\v0300_car_kensington_sportsmuscle and put v0300_car_kensington_sportsmuscle_civilian_01.ee inside

For JC4, create the path dropzone\editor\entities\vehicles\01_land\v024_car_ecosuper and put in your v024_car_ecosuper_civilian_01.ee

Now start up the game! The vehicle should now have faster nitrous refill, more nitrous use time, faster jump refill, more powerful jump, more downforce and more powerful nitrous

Congrats! You just created your first modded vehicle!

Of course you can also edit files and stats other than the one i used to demonstrate the process with

Hex editing

Now, some of the stat file don’t really want to be repacked, so we will need to do some hex editing. How do w know that? Well, when the game crashes.

Files that are known to crash on repack are

  • …_rigid_body.vmodc
  • …_land_global.vmodc
  • …_water_interaction.vmodc (in some cases)

So what do we do about that? We will still unpack the file like normal to get a better understanding of how it looks inside. Let’s use JC3’s v0300_car_kensington_sportsmuscle_rigid_body.vmodc as example. One interesting value inside of this file is the vehicle’s weight, or just “mass” as the file calls it

If we now look at “offset-in-file”, we will see “00000050”. This is where that value is located in the file if opened in hex, so let’s open it in HXD!

So now our value should be in line five, at position 0, so this one

We can verify this by searching for the value of “mass”, which in our case is “975”

Press ctrl+f to bring up the search window, set it to Floating point number and enter “975”

Now just hit OK, and would you look at that, it actually leads to what we expected it to be before

So, now we know where the value we want to change is, so let’s change it. Let’s say, we wanted to make the car a bit heavier. Place your cursor in line five at position 0 and hit ctrl+r

This will bring up the replace menu. Switch to Floating Point Number again and enter “975” in the “search for” field. Now put, say, 1200 in the “replace with” field” and hit OK again

Now hit ctrl+s again to save the file and close HXD

You will now also see a v0300_car_kensington_sportsmuscle_rigid_body.vmodc.bak file, which is a backup of the file before the edit.

Now that our file was edited in hex, let’s unpack it to see if our change was actually applied, and sure enough:

Also note that some values, especially smaller ones like just a 1 can also be an interger number, only made of two digits, rather than 8, you´ll need to try around to find it, but don’t worry, i will talk about this in the next tutorial with weapons

There it is. Now you can repack the vehicle file and put it into dropzone again and test how it performs!

With this knowledge, you can already do a lot of fun things to all kinds of vehicles! Hope you have fun!

If you already have questions, feel free to ask me! You will find me at https://Discordapp.com/invite/efherxs

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Powered by WordPress.com.

Up ↑

%d bloggers like this: