Sort-of Complete Guide to Adding Seats to Vehicles

Just Cause 2 Mods Forums Tutorials Sort-of Complete Guide to Adding Seats to Vehicles

Viewing 15 reply threads
  • Author
    Posts
    • #82720

      The Sort-of Complete Guide to Adding Seats to Vehicles

      jcmp007full.png
      (image taken from jc-mp.com)

      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):



      0

      1

      -1
      CSmartObject
      639230502
      {52BF6C41-C882-41AA-9F99-DE227EF56EB0}


      1


      1,0,0, 0,1,0, 0,0,1, 0.5691268,0.9243595,0.8666979


      SO_R1
      0
      1,0,0, 0,1,0, 0,0,1, 0.5691268,0.9243595,0.8666979

      CSmartObjectTrigger
      -933524316
      {20DE94C9-EE09-4493-87A4-7039AFA3EC9D}
      1.331797,1,0.8104982
      1,0,0, 0,1,0, 0,0,1, 1.746262,0.08564049,0.172913
      EnterLeftPassengerTrigger
      1,0,0, 0,1,0, 0,0,1, 2.315389,1.01,1.039611

      1
      1
      0

      0
      0
      Car_R_enter
      0

      1
      0
      0
      0
      S_ENTERING_VEHICLE

      639230502
      23
      1
      -1

      0
      180
      0
      3

      0
      0
      0

      0
      S_IDLE_PASSENGER_VEHICLE



      119
      1

      hud_button_02
      CEnterPassengerSeatAction
      90578155
      {115D3D3C-C39A-4832-8E87-8518840E991C}
      0.1


      0.9999999,0,0, 0,0.9999999,0, 0,0,1, 0,0,0
      EnterLeftPassengerAction
      2
      1,0,0, 0,1,0, 0,0,1, 2.315389,1.01,1.039611



      0.4657477,0.9164192,0.07802397
      0
      0.3255177,0.8332835,0.07831228
      -1636417597
      1
      CIKTarget
      82
      110
      84
      112
      0.6862379
      0.1684129
      0.09960502
      0.04574415
      0.9289315,0.3698878,0.01640864, 0.332598,-0.8531138,0.4019646, 0.1626802,-0.3679401,-0.9155082, 0.4657477,0.9164192,0.07802397
      -256550066


      1
      0

      0
      0
      Car_R_exit
      0

      0
      0
      0
      S_EXITING_VEHICLE

      0
      1
      24
      0
      180
      0
      1,-0.2,0
      1
      3

      0
      0
      1
      S_UPRIGHT_IDLE



      38

      hud_button_03
      CExitPassengerSeatAction
      -1195384033
      {B4360E71-7B0E-490E-A063-DEA6ED10227C}
      0.1


      1,0,0, 0,1,0, 0,0,1, 0,0,0
      ExitLeftPassengerAction
      1
      1,0,0, 0,1,0, 0,0,1, 0.5691268,0.9243595,0.8666979


      1
      4
      4

      CPassengerSeatController
      -1530628786
      {A93079F3-3F99-442B-B471-71A84BD662C8}
      1,0,0, 0,1,0, 0,0,1, -0.5691268,-0.9243595,-0.8666979
      PassengerSeatController
      1,0,0, 0,1,0, 0,0,1, 0,0,0

      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.




      0

      1

      -1
      CSmartObject
      639230502
      {52BF6C41-C882-41AA-9F99-DE227EF56EB0}


      1


      1,0,0, 0,1,0, 0,0,1, 0.5691268,0.9243595,0.8666979


      SO_R1
      0
      1,0,0, 0,1,0, 0,0,1, 0.5691268,0.9243595,0.8666979

      CSmartObjectTrigger
      -933524316
      {20DE94C9-EE09-4493-87A4-7039AFA3EC9D}
      1.331797,1,0.8104982
      1,0,0, 0,1,0, 0,0,1, 1.746262,0.08564049,0.172913
      EnterLeftPassengerTrigger
      1,0,0, 0,1,0, 0,0,1, 2.315389,1.01,1.039611

      1
      1
      0

      0
      0
      Car_R_enter
      0

      1
      0
      0
      0
      S_ENTERING_VEHICLE

      639230502
      23
      1
      -1

      0
      180
      0
      3

      0
      0
      0

      0
      S_IDLE_PASSENGER_VEHICLE



      119
      1

      hud_button_02
      CEnterPassengerSeatAction
      90578155
      {115D3D3C-C39A-4832-8E87-8518840E991C}
      0.1


      0.9999999,0,0, 0,0.9999999,0, 0,0,1, 0,0,0
      EnterLeftPassengerAction
      2
      1,0,0, 0,1,0, 0,0,1, 2.315389,1.01,1.039611



      0.4657477,0.9164192,0.07802397
      0
      0.3255177,0.8332835,0.07831228
      -1636417597
      1
      CIKTarget
      82
      110
      84
      112
      0.6862379
      0.1684129
      0.09960502
      0.04574415
      0.9289315,0.3698878,0.01640864, 0.332598,-0.8531138,0.4019646, 0.1626802,-0.3679401,-0.9155082, 0.4657477,0.9164192,0.07802397
      -256550066


      1
      0

      0
      0
      Car_R_exit
      0

      0
      0
      0
      S_EXITING_VEHICLE

      0
      1
      24
      0
      180
      0
      1,-0.2,0
      1
      3

      0
      0
      1
      S_UPRIGHT_IDLE



      38

      hud_button_03
      CExitPassengerSeatAction
      -1195384033
      {B4360E71-7B0E-490E-A063-DEA6ED10227C}
      0.1


      [/code]

      Code:
      1,0,0, 0,1,0, 0,0,1, 0,0,0
      Code:
      ExitLeftPassengerAction
      1
      1,0,0, 0,1,0, 0,0,1, 0.5691268,0.9243595,0.8666979

      1
      4
      4

      CPassengerSeatController
      -1530628786
      {A93079F3-3F99-442B-B471-71A84BD662C8}
      1,0,0, 0,1,0, 0,0,1, -0.5691268,-0.9243595,-0.8666979
      PassengerSeatController
      1,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:


      0

      1

      -1
      CSmartObject
      639230502
      {52BF6C41-C882-41AA-9F99-DE227EF56EB0}


      1


      Code:
      1,0,0, 0,1,0, 0,0,1, 0,0.9243596,0.5366923
      Code:




      SO_R1
      0

      Code:
      1,0,0, 0,1,0, 0,0,1, 0,0.9243596,0.5366923
      Code:


      CSmartObjectTrigger
      -933524316
      {20DE94C9-EE09-4493-87A4-7039AFA3EC9D}
      1.331797,1,0.8104982

      Code:
      1,0,0, 0,1,0, 0,0,1, 1.746262,0.08564049,0.172913
      Code:


      EnterLeftPassengerTrigger

      Code:
      1,0,0, 0,1,0, 0,0,1, 0,0.9013659,0.01459783
      Code:


      1
      1
      0

      0
      0
      Car_R_enter
      0

      1
      0
      0
      0
      S_ENTERING_VEHICLE

      639230502
      23
      1
      -1

      0
      180
      0
      3

      0
      0
      0

      0
      S_IDLE_PASSENGER_VEHICLE



      119
      1

      hud_button_02
      CEnterPassengerSeatAction
      90578155
      {115D3D3C-C39A-4832-8E87-8518840E991C}
      0.1


      Code:
      1,0,0, 0,1,0, 0,0,1, -0.1570183,0,-0.001769457
      Code:


      EnterLeftPassengerAction
      2

      Code:
      1,0,0, 0,1,0, 0,0,1, -0.2301502,0.9013659,0.01261633
      Code:


      0.4657477,0.9164192,0.07802397
      0
      0.3255177,0.8332835,0.07831228
      -1636417597
      1
      CIKTarget
      82
      110
      84
      112
      0.6862379
      0.1684129
      0.09960502
      0.04574415
      0.9289315,0.3698878,0.01640864, 0.332598,-0.8531138,0.4019646, 0.1626802,-0.3679401,-0.9155082, 0.4657477,0.9164192,0.07802397
      -256550066

      1
      0

      0
      0
      Car_R_exit
      0

      0
      0
      0
      S_EXITING_VEHICLE

      0
      1
      24
      0
      180
      0
      1,-0.2,0
      1
      3

      0
      0
      1
      S_UPRIGHT_IDLE



      38

      hud_button_03
      CExitPassengerSeatAction
      -1195384033
      {B4360E71-7B0E-490E-A063-DEA6ED10227C}
      0.1


      Code:
      1,0,0, 0,1,0, 0,0,1, 0,0,0
      Code:


      ExitLeftPassengerAction
      1

      Code:
      1,0,0, 0,1,0, 0,0,1, 0,0.9243596,0.5366923
      Code:


      1
      4
      4

      CPassengerSeatController
      -1530628786
      {A93079F3-3F99-442B-B471-71A84BD662C8}

      Code:
      1,0,0, 0,1,0, 0,0,1, 0,-0.9243596,-0.5366923
      Code:


      PassengerSeatController

      Code:
      1,0,0, 0,1,0, 0,0,1, 0,-0.608634,0.3565267
      Code:

      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

      1. 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.
      2. MountedGunController – Pretty self-explanatory. Haven’t tried experimenting with this yet, but others such as Profesor Farnsworth have successfully added gunner seats.
      3. 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.
      4. BikeSeatController – The Driver’s seat in motorcycles.

    • #95921

      Thank you so much, man! Prepare to see some added seats mods by me in the future!

      Also, the Just Cause 2 Multiplayer team should hire you to add seats to vehicles, which is something that I think they are in the process of working on.

      They added 2 back seats to the taxi for my steam group, the Panauan Taxi Service.

      bJJBg.jpg

    • #95953

      Working on a mod now.

      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.

    • #96012
      Nick Bana
      Member

      How about helicopters?

    • #96013
      Nick Bana
      Member

      How about helicopters?

    • #95922

      Should pretty much be the same process. I’d just copy-paste seat code from a helicopter instead of a jeep, that’s all.

    • #97413
      Nick Bana
      Member

      I mean, adding seats to helicopter…

    • #95925

      I feel like its a silly question lol, but when did you ladies start dress shopping?
      Just to ensure

    • #95924

      I feel like its a silly question lol, but when did you ladies start dress shopping?

      Just to

    • #95923

      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.

    • #99804

      It’s been over 11 months, and I finally have found a use for this tut! :)

    • #100354
      voxbox13voxbox13
      Participant
      mandella644 wrote:
      It’s been over 11 months, and I finally have found a use for this tut! :)

      ? … Intrigued !

    • #100355

      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. :D

    • #95926
      AmauryRR
      Participant

      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.

      Might try adding seats to other vehicles (busses, apc’s, truck beds, etc..).

      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 :)

    • #170831
      thutrangctp
      Participant

      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

      sdfdsf

    • #170832
      bloxorzok
      Participant

      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

Viewing 15 reply threads
  • You must be logged in to reply to this topic.