Today, we’re going to learn how to add new seats to vehicles! Yaaayyy!!! What exactly does that mean? It means we’re going to add new places for players and NPCs to sit in in various vehicles. With a little bit of copy-paste coding and guessing of syntax, we can add multiple seats to nearly any vehicle in the game.

What you will need for this tutorial:
-Gibbed’s Tools (any revision from r128 up is fine)
-Any basic text editor that can open .xml files (notepad works fine, notepad++ recommended)
-If you don’t have it already, a basic knowledge of Just Cause 2 modding

So how are we going to do this? Adding new seats to vehicles is a relatively simple task: copy the section of code that defines seats (we’ll get this from a vehicle that already has multiple seats), then paste them where they belong in the vehicle that you want to add seats to.

For the purposes of this tutorial, we’ll take as the vehicle we want to mod the classic motorcycle, or the Hamaya GSY something-something. That’s lave.v007_classic_mc.eez. Extract that from pc1.tab (or one of the tabs, I can’t remember which), and open it with smallunpack to get the files that we want to edit. Also, for the vehicle we’ll be copy-pasting code from, we’ll also extract the MV V880’s code (that’s lave.v017_military_jeep.eez) and unpack that as well.

And now to modding: Using Gibbed’s Tools, drag and drop both v017_military_jeep.mvdoll and v007_classic_mc.mvdoll onto BinConvert.exe (bin2xml.exe if you are using an older revision of the tools). This will produce an XML file with the same name as the MVDOLL in each one of your folders. Open both of these, and we’ll get cracking with adding seats.

Once you’ve opened both of these files, go to v017_military_jeep, and search for “PassengerSeatController” (without quotes). This is the variable that defines a Passenger Seat. However, the block of code that you see now isn’t the only thing that we have to copy and paste. There are also a bunch of other variables that tell the game how to handle entering and exiting these seats as well. Below the PassengerSeatController variable, you will see 2 lines with “” in them. The “” signifies that an object previously defined earlier has now ended (it’s much less complicated than it sounds), so we’ll assume that the PassengerSeatController object ends at the second of the 2 brackets, since the entire object also contains animations for entering and exiting the seat above it. Select that bracket and everything above up until the text that defines the object (this will be ““). See below for what you should have selected by now(click the spoiler to show):

Now copy this, and head to the v007_classic_mc.xml. If you noticed in the above pictures, the code defining the seats was located in the “smartobjects” section, so let’s do a search for that now. Insert a new line below the _object_id line, and paste all the code that you just copied. Now save your work, just in case.

Congratulations! You’ve just successfully copied the code necessary to add another shotgun seat to the classic motorcycle! However, we’re not done yet. You see, the code that we copied over from the military jeep contains variables that tell the game where to put the seat, and right now, if we started the game, the seat would be floating somewhere over to the right of the motorcycle. That’s a bad thing. So right now we want to edit the and variables.

144CPassengerSeatController-1530628786{A93079F3-3F99-442B-B471-71A84BD662C8}1,0,0, 0,1,0, 0,0,1, -0.5691268,-0.9243595,-0.8666979PassengerSeatController1,0,0, 0,1,0, 0,0,1, 0,0,0
[/spoiler]
The and variables specify the position of seats, and the last 3 numbers of these variables are in the format X,Z,Y (Width, height, depth) relative to the vehicle’s position. We want to edit all of the and variables, aside from CIKTarget, since nobody has any idea what that does as of now. What we want to do is move the passenger seat’s position to right behind the driver’s seat, so let’s take a look at what the driver seat has for those variables. Take what it has for each of those variables, and use them to replace the passenger seat’s variables. Last but very important, edit the last number in each of the variables (unless it is 0) so that the position that the variable specifies is slightly behind the driver seat.
When you’re done, you should have something similar to this:

It’s ok if you don’t have the exact same numbers that I have. You’ll just have to test and see ingame if your seat position is ok.

Well congratulations! You’re finally done with adding your first seat to a vehicle! Now, BinConvert (or xml2bin) your modded v007_classic_mc.xml file, SmallPack your lave.v007_classic_mc folder, rename .sarc to .eez, pop the file into your dropzone, and test ingame to see fi it works! You can use zxz’s blackmarket mod’s “Invincible Friendly Soldiers” to test to see if your seat works.

Ingame shot:

Yes, I realize it looks a bit weird, but it works, and that’s what is important.

EXTRA STUFF

Types of Seats

PassengerSeatController – Defines your basic passenger seat. It is a “shotgun” type seat (enterable by player) if the object name is defined as “SO_Shotgun”. If the object name is “SO_R1” or “SO_L1”, it is a normal passenger seat.

DriverSeatController – The Driver’s seat, also pretty self explanatory. Haven’t tried adding more than 1 of these. . The “class” variable for planes, and boats is also different. “CBoatController” class for boats, “CAirPlaneController” class for planes.

However, I was wondering if if you could figure out how to do the same, except with clinging positions, CoconutFred. Would really appreciate it, as I’m looking to add some clinging positions to the nose of the Cassius or the Aeroliner.

Something needs to be done about the formatting of this forum. The “code””/code” tags have absolutely horrid text formatting and actually autowrap text. Not to mention that there are no ignore BB tags.

A mod that adds seats to vehicles which will be used in the JC2 mods server I want to run (when the mod is released), or maybe, depending on how game-changing adding seats to some of the vehicles is (when it comes to roadtrips and faction transport it can be pretty important), implemented into the mod itself.

Awesome tut! Used it to add seats to some vehicles, including the TukTuk DLC (used the code from the TukTuk Taxi) – tested it in a heatspawn mod and the military shows up with 3, 2 seating in the rear by the cannon.

Eventually when JC2MP sync’s weapons and everything else, this will be a blast to run! Theoretically you can uniquely name the seats and adjust the x/y/z pos relative to the vehicle and should be good to go

There are times when I find it difficult to make decisions, but still have to do. I know people always have emotions so that there is no justice. But I still hope.http://www.facebookbaixargratis.com.br

I found a lot of interesting information here. A really good post, very thankful and hopeful that you will write many more posts like this one.slither

Author

Posts

You must be logged in to reply to this topic.

VGMods

Video Game Mods is a network of modding sites each run by its own Manager. We aim to grow to support many more games and modding communities.

Become a Manager

Do you want to run your own modding site and be able to earn money? Anyone can apply to become a VGMods site manager. Apply and begin building your own modding community using our site technology, with no experience needed. Find out more about this amazing opportunity.