Jump to content

[PoC|V] Creating a DLC pack and adding a "new" weapon


SonofUgly

Recommended Posts

There's no way to edit/add new models yet, so this may not be that useful right now, but it could be a very nice way for modders to setup and distribute mods in the future.

 

Creating a DLC pack.

Your DLC is going to need a name, and that name is going to be unique as it could be a conflict if someone else uses the same name.

For this example I'm using the name 'Tranq', anytime you see this used in anything in this thread, replace it with your DLC's name.

 

With OpenIV, create an RPF7 archive named "dlc.rpf" in Grand Theft Auto V\update\x64\dlcpacks\tranq (again, tranq = your DLC's name)

 

In the root of this RPF you're going to need setup2.xml and content.xml. Make a copy of another DLC's files (like christmas2).

setup2.xml tells the game what your DLC is and how it's going to be loaded. An example (probably all you'll need for weapons/cars):

 

 

 

<?xml version="1.0" encoding="UTF-8"?><SSetupData>  <deviceName>dlc_Tranq</deviceName>  <datFile>content.xml</datFile>  <timeStamp>1/1/2015 12:00:00</timeStamp>  <nameHash>Tranq</nameHash>  <contentChangeSetGroups>    <Item>      <NameHash>GROUP_STARTUP</NameHash>      <ContentChangeSets>        <Item>TRANQ_AUTOGEN</Item>        <Item>TRANQ_UNLOCKS_AUTOGEN</Item>      </ContentChangeSets>    </Item>  </contentChangeSetGroups>  <type>EXTRACONTENT_COMPAT_PACK</type>  <order value="9" />  </SSetupData>

 

 

The content.xml file points at what files/archives are going to be loaded, so every file you add to your dlc.rpf, is going to need to be in here. Also make sure every filename in content.xml begins with "dlc_Tranq:"

Example file.

 

To load the DLC pack, all you have to do is add the path to Grand Theft Auto V\update\update.rpf\common\data\dlclist.xml, like so:

 

 

 

<?xml version="1.0" encoding="UTF-8"?><SMandatoryPacksData>	<Paths>  		<Item>platform:\dlcPacks\mpBeach\</Item>		<Item>platform:\dlcPacks\mpBusiness\</Item>		<Item>platform:\dlcPacks\mpChristmas\</Item>		<Item>platform:\dlcPacks\mpValentines\</Item>		<Item>platform:\dlcPacks\mpBusiness2\</Item>		<Item>platform:\dlcPacks\mpHipster\</Item>		<Item>platform:\dlcPacks\mpIndependence\</Item>		<Item>platform:\dlcPacks\mpPilot\</Item>		<Item>platform:\dlcPacks\spUpgrade\</Item>		<Item>platform:\dlcPacks\mpLTS\</Item>		<Item>dlcpacks:\mpheist\</Item>				<Item>dlcpacks:\mppatchesng\</Item>		<Item>dlcpacks:\patchday1ng\</Item>		<Item>dlcpacks:\patchday2ng\</Item>		<Item>dlcpacks:\mpchristmas2\</Item>		<Item>dlcpacks:\patchday2bng\</Item>		<Item>dlcpacks:\patchday3ng\</Item>		<Item>dlcpacks:\tranq\</Item>	</Paths>	</SMandatoryPacksData>

 

 

Adding a weapon.

Again, still using the name tranq, so replace all of them with your weapon's/DLC's name. This goes for filenames too.

First off, these are all the files you're going to need by the end of this:

 

common/data/ai/loadouts.meta	//optionalcommon/data/ai/weaponanimations.metacommon/data/ai/weapontranq.metacommon/data/dlctext.metacommon/data/pedpersonality.metacommon/data/pickups.meta		//optionalcommon/data/shop_weapons.meta		//optionalcommon/data/tranqcontentunlocks.metacommon/data/weaponarchetypes.metacommon/data/spstatssetup.xmlcommon/data/spstatsuisetup.xmlx64/data/lang/ *all your language files (see the next part)*x64/models/cdimages/weapons.rpf		//and your weapon models/textures in that
loadouts, pickups, and shop_weapons are all for ways you can get your weapon in-game without a trainer. Some of the info needed is in the modding wiki.

 

There's no way yet to edit animation files, so for now you have to use pre-existing animations. Take info from a different weapons weaponanimation.meta that will fit your weapon (for this example I used the SNS's file) and change all the <Item key="WEAPON_SNS"> to <Item key="WEAPON_TRANQ">

 

weapontranq.meta is just like the normal weapons.meta, but only includes things pertinent to your weapon. Make sure to use an empty SLOT - R* left plenty of room there so it shouldn't be an issue.

 

Just copy/paste dlctext.meta from a different DLC, no need to modify that.

 

pedpersonality.meta can be kinda a tricky one as the original one is a .ymt file, so you have to edit other DLC files and don't have access to the names of the animations without looking up the individual anim files. As it's more animation stuff, pick a DLC weapon that fits closest to yours.

 

tranqcontentunlocks.meta, weaponarchetypes.meta and the .xml files are pretty straightforward, just copy/paste your weapon's name where applicable.

 

Adding to global.gxt2

See this thread for modifying GXT2 files. These are the hash names you'll need for a weapon:

 

//wt_pist_tranq (HumanNameHash weapontranq.meta)0x8B8449F4 = Tranquilizer//tranq_kills (spstatsetup)0xA5D2FD5F = Tranquilizer kills//wtd_tranq (weaponDesc shop_weapon.meta)0xC982B584 = A modified special ops version of the Mk22, a suppressor-equipped tranquilizer gun being developed by the Navy.//wtu_tranq (weaponUppercase shop_weapon.meta)0x92E66C86 = TRANQUILIZER//wt_tranq (textLabel shop_weapon.meta)0x3A56493D = Tranquilizer//wtt_tranq (weaponTT shop_weapon.meta)0x3426E2E2 = Tranquilizer
End Result/Tranquilizer

I didn't really focus of what the tranq was, this was more just trying to see if this would work, so it's basically just a sh*tty gun using the stunguns model that doesn't work as a tranquilizer at all.

Anyway, here's a video of it everything working in-game, and a download link for it:

 

 

 

Still missing the HUD icon, I believe you need to edit both a .ytd file (non-editable yet) and a .gfx file (kind of a pain to do).

 

Adding a vehicle.

Using 'newveh' here as the test name. Took the massacro2 and made it into a 'new' vehicle.

Files you're going to need to modify:

 

 

 

 

common/data/ai/vehiclelayouts.meta		//optional (if your vehicle needs a custom layoutcommon/data/levels/gta5/vehicles.metacommon/data/carcols.meta		//optional (for vehicle_mods)common/data/carvariations.metacommon/data/dlctext.meta		//used for telling the game there's a global.gxt2 file in the dlc packcommon/data/handling.metacommon/data/newvehcontentunlocks.meta	//optional (used for buying onlinex64/data/lang/ *all your language files (see the part before)*x64/levels/gta5/vehicles.rpf		//and your vehicle models/textures in thatx64/levels/newveh/vehiclemods/newveh_mods.rpf		//optionalupdate.rpf/common/data/ai/vehiclemodelsets.meta		//optional
Here's the download: newveh.zip

 

Video Tutorial:

 

Edited by SonofUgly
Link to comment
Share on other sites

Ss4gogeta0

curious if a similar premise would work with GTAIV...?

  • Like 2
Link to comment
Share on other sites

It definitely would be a 'swell way to load up mods, other than having to poke through update.rpf just to add references to your mod package.

 

Now if only that either R* would release a similar RPF loader update, or if a modder or two would code a non-invasive utility allowing for being able to inject RPFs for SP while still retaining GTAO functionality, I'd be more than overjoyed. :D


curious if a similar premise would work with GTAIV...?

Likely so, if we base it on how NTAuthority loaded up the Los Santos map in IV.

Link to comment
Share on other sites

Ss4gogeta0

It definitely would be a 'swell way to load up mods, other than having to poke through update.rpf just to add references to your mod package.

 

Now if only that either R* would release a similar RPF loader update, or if a modder or two would code a non-invasive utility allowing for being able to inject RPFs for SP while still retaining GTAO functionality, I'd be more than overjoyed. :D

curious if a similar premise would work with GTAIV...?

Likely so, if we base it on how NTAuthority loaded up the Los Santos map in IV.

this must be researched abit more... because if this is possible then people wouldnt have to rely on using the native trainer to spawn weapons/vehicles/etc and everything would load ingame as if it were there from day 1...

Link to comment
Share on other sites

 

It definitely would be a 'swell way to load up mods, other than having to poke through update.rpf just to add references to your mod package.

 

Now if only that either R* would release a similar RPF loader update, or if a modder or two would code a non-invasive utility allowing for being able to inject RPFs for SP while still retaining GTAO functionality, I'd be more than overjoyed. :D

curious if a similar premise would work with GTAIV...?

Likely so, if we base it on how NTAuthority loaded up the Los Santos map in IV.

this must be researched abit more... because if this is possible then people wouldnt have to rely on using the native trainer to spawn weapons/vehicles/etc and everything would load ingame as if it were there from day 1...

 

Yeah, but some would find the native trainer to be a tad more convenient, especially mod developers who aren't arsed to spend ingame money or roam throughout the map just to obtain an item they made.

 

What's important though is that the goal here is we wouldn't have to tamper with the original assets - every stock RPF is left untouched, and all we have to do is to load external packages from it along with a helper tool/ASI. It should only work in singleplayer; only the vanilla game would be loaded once GTAO is launched.

Edited by lpgunit
Link to comment
Share on other sites

Ss4gogeta0

 

 

It definitely would be a 'swell way to load up mods, other than having to poke through update.rpf just to add references to your mod package.

 

Now if only that either R* would release a similar RPF loader update, or if a modder or two would code a non-invasive utility allowing for being able to inject RPFs for SP while still retaining GTAO functionality, I'd be more than overjoyed. :D

curious if a similar premise would work with GTAIV...?

Likely so, if we base it on how NTAuthority loaded up the Los Santos map in IV.

this must be researched abit more... because if this is possible then people wouldnt have to rely on using the native trainer to spawn weapons/vehicles/etc and everything would load ingame as if it were there from day 1...

 

Yeah, but some would find the native trainer to be a tad more convenient, especially mod developers who aren't arsed to spend ingame money or roam throughout the map just to obtain an item they made.

 

What's important though is that the goal here is we wouldn't have to tamper with the original assets - every stock RPF is left untouched, and all we have to do is to load external packages from it along with a helper tool/ASI. It should only work in singleplayer; only the vanilla game would be loaded once GTAO is launched.

 

well it would help out with Total Conversions, so that instead of having to include the SNT and break immersion, they could have everything they want included and spawning normally in the game...

 

besides, it would be nice to play IV with V's weapons/vehicles/etc without having to use SNT aswell... giving it a feel as if they were always there.

 

also I dont think SNT allows cars added into the game to spawn in traffic.

Link to comment
Share on other sites

SNT's there to aid with development, but yeah, I do agree that added mods should spawn or be obtained as you would expect with a vanilla object to make it as seamless as possible.

Link to comment
Share on other sites

Ss4gogeta0

SNT's there to aid with development, but yeah, I do agree that added mods should spawn or be obtained as you would expect with a vanilla object to make it as seamless as possible.

it would be like a bootleg mod loader lol

Link to comment
Share on other sites

Interesting. Thanks for the tutorial.

 

That being said i'm waiting for the proper tools to start adding weapons instead of replacing them. Right now it's just too much hassle for a non-perfect result.

 

But still, once we get the proper tools (mostly a good .gxt2 editor and proper .ytd support) it will become an interesting solution, yes.

Link to comment
Share on other sites

Tried to add .xml files via DLC pack - without success.

Link to comment
Share on other sites

make a video? im not sure how to use the hex editor and what software you recommend?

 

UPDATE: i have figured out how in the hex editor but when i load in game the hud gui name is blank yet the gun loads.. any idea why?

Edited by DrGta
Link to comment
Share on other sites

Nice tutorial man. This will come in handy when I port the update coming next week to 1.24 so we can use the new content in the GTA Online Modders Pool.

Link to comment
Share on other sites

where is the name for the shop weapons gui stored at? i have tried changing global.txt and others and yet no avail to change the shop weapon name.. like this name

Edited by DrGta
Link to comment
Share on other sites

also how would you go about putting a weapon in a new slot on the board behind the above picture instead of replacing one?

You mean adding a weapon to the board behind the salesman, and not the DLC board on the right? No idea.
Link to comment
Share on other sites

 

also how would you go about putting a weapon in a new slot on the board behind the above picture instead of replacing one?

You mean adding a weapon to the board behind the salesman, and not the DLC board on the right? No idea.

 

EDIT:

it is now fixed yet im still awaiting how to put a weapon in the new dlc slots like this one below the Hatchet. on very right?

99ehThs.jpg

Edited by DrGta
Link to comment
Share on other sites

yes i mean on the dlc board(without replacing one currently there).

Follow the first post and create a dlcpack for the weapon. shop_weapon.meta will tell it to add the weapon to ammunation.

 

and also i have edited all things related to "Special Carbine" in the globlal.txt it does not change the name. unless im using wrong folder? update.rpf? or x64.rpf?

Edit both of them, some of the entries are in update, but not all of it so it also uses some from x64w. You could also check to see which hashes are in x64w that aren't in the update, and then add them to update (should be easy to add entries with XBLToothPik's new tool).
Link to comment
Share on other sites

Would this be possible with adding clothes?

Yeah, should be possible with vehicles, weapons, clothes, tattoos, map/interior changes/additions, and scripts/missions.

 

How would we get them?

No idea, haven't played around with clothes at all.
Link to comment
Share on other sites

 

Would this be possible with adding clothes?

Yeah, should be possible with vehicles, weapons, clothes, tattoos, map/interior changes/additions, and scripts/missions.

How would we get them?

No idea, haven't played around with clothes at all.

 

But would there be a way. to add them to the clothing shops?

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

I used your tut to add a car. but the car has no sounds. could you tell me what I'm missing??

 

Edit: I figured out, thanks,

 

BTW I want to write a detailed tut about adding vehicles using dlc method & that will use parts of your tut. Do I have the permission?

Edited by Nima_1i
Link to comment
Share on other sites

BTW I want to write a detailed tut about adding vehicles using dlc method & that will use parts of your tut. Do I have the permission?

Sure, that's fine.
Link to comment
Share on other sites

  • 1 month later...
UHDFreddyEST

Hy,

Can, anyone make a better readme, what is include a newveh.zip. Because i do that, what it says, but i don't get that work. I must add thes files multiple place then i got it work. But if DLC go over 7gb then i dont want that i must copy that 4 or more places.

Sorry my bad English, but i hope you understand me.
Best Regards
UHDFreddyEST

Link to comment
Share on other sites

Timeless_AUT

at first thanks for your tutorial but I got some questions.

I wanted to add some of the new car mods as an DLC, tried to understand the files but some things are not clear to me.

I tried to add a car with there own _mods file, but I'm not sure how to add it as an DLC, because which ID do I need to use in the carcols.meta as an "kitName"?

Where do I find the original carclos.meta and carvariations.meta for all cars? because there are many files and I couldn't find the first original file. Especially I tried to find comet2.

And one last question: how to edit the language files? Where to change the car name? I only find in the lang files the brand name. 0xF4642C6F = SonofUgly

Where do I get the hash?

I'm sorry for the many questions but I couldn't find a tutorial for adding new cars to GTA V. Or is there a tutorial?

Would be nice if I get some answers, thanks :)

Link to comment
Share on other sites

enjoythekilling

at first thanks for your tutorial but I got some questions.

I wanted to add some of the new car mods as an DLC, tried to understand the files but some things are not clear to me.

I tried to add a car with there own _mods file, but I'm not sure how to add it as an DLC, because which ID do I need to use in the carcols.meta as an "kitName"?

Where do I find the original carclos.meta and carvariations.meta for all cars? because there are many files and I couldn't find the first original file. Especially I tried to find comet2.

And one last question: how to edit the language files? Where to change the car name? I only find in the lang files the brand name. 0xF4642C6F = SonofUgly

Where do I get the hash?

I'm sorry for the many questions but I couldn't find a tutorial for adding new cars to GTA V. Or is there a tutorial?

Would be nice if I get some answers, thanks :)

 

Hy,

Can, anyone make a better readme, what is include a newveh.zip. Because i do that, what it says, but i don't get that work. I must add thes files multiple place then i got it work. But if DLC go over 7gb then i dont want that i must copy that 4 or more places.

Sorry my bad English, but i hope you understand me.
Best Regards
UHDFreddyEST

 

JulioNIB wrote an excellent tutorial on his blog which i used to add cars. Not sure if anyone knew about it but i thought i'd link it here: http://gtaxscripting.blogspot.nl/2015/08/gta-v-pc-add-vehicles-idea-no-replace.html?utm_source=BP_recent

Edited by enjoythekilling
Link to comment
Share on other sites

  • 2 weeks later...

You mean numeric IDs? I don't think the game uses them anymore, it probably calls them by their internal name rather than some number.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.