Log in to reply
 

[WEAPON] [WIP] Custom M4A1 weapon replacement mod for Carbine Rifle mk2



  • Hello everyone, I'm working on a weapon replacement mod for the carbine rifle mk2. Before anything, I should mention that I am new at mod development, so if there are parts that you know I'm doing wrong, or would like to help out, I'd be happy to share the materials I'm using for the weapons mod.

    Also, before anything, this is what I'm using for this project:

    • 3DS Max 2021
    • Kam's Max Scripts
    • GIMS EVO (for 3DS Max 2017 -> current)
    • Open IV
    • ytdydrddyft2txddffcol (I didn't name it)
      If I'm missing any software and/or scripts, please let me know

    Say hello to the custom M4A1 project! I decided to divide this into 3 sections (The images below are shown as .fbx files):

    • Section 1: The gun itself + functional scope, which should replace w_ar_carbineriflemk2_hi.ydr
      EFT Custom M4A1
      EFT Custom M4A1

    • Section 2: The drum magazine, which should replace w_ar_carbineriflemk2_mag2.ydr
      alt text
      alt text

    • Section 3: Suppressor, which should replace w_at_ar_supp_hi.ydr
      alt text
      alt text



  • mk2 weapons are highly customizable (or at least more customizable than the "normal" weapons), I hope this one is gonna be compatible with all that...



  • alt text
    alt text
    alt text

    Next Steps

    • Do the same process for the drum mag and suppressor, assuming they work the same way.
    • Figure out how to best create or edit original .ytd files for each .ydr file for .ytd replacement
    • Test mod in FiveM

    Current concerns (If anyone would like to answer the questions, I would very much appreciate it):

    • Did I go through the process wrong?
    • Given that the end of the rifle (muzzle device) is longer than the original file, should I be adjusting the suppressor for the rifle model, or is it something else I should be looking at?
    • Should I have only used GIMS Evo?
    • Should I have had Scripthook and related software/scripts?
    • Should and how would I have to convert the textures for each .ydr file from .tga/.png to .dds files?

    *Correction to the update: on step 2, I imported the custom M4A1 .fbx model, not the suppressor model.



  • @JustDancePC thank you, I hope I can get this project to work, especially for use in FiveM



  • I have gone through the same exact process for the drum mag and suppressor, so now both models are now valid .ydr files I can open through Open IV:
    Suppressor:
    alt text
    alt text

    Drum Mag (mag 2):
    alt text
    alt text



  • You should remember to weld vertices and smooth normals, atm it looks to be all broken and split apart, hence why the vertex count is x3 the polycount.



  • @GreenAid thanks, I assume I would have to do that for all the files. My question is, if I weld vertices wouldn't that lower the quality of detail for the model?



  • @LunaleMoon I would like to know more information about the software you have used if it is possible. For example, I loaded the obj file on 3ds max of the mk2 gun, I saw the model in 3d and I updated a square in the loader then I exported and put it on open iv. i opened the file and it stayed as it was, i used the ytd file exporting it to obj, 3ds max and GIMS EVO.



  • @O-dragon Of course. I've mentioned it in the beginning of the thread, but they are:

    • 3DS Max2021
    • GIMS EVO
    • Open IV
    • Kam's Max scripts
    • ytdydrddyft2txddffcol

    If you know, am I missing, or using the incorrect software for this project?



  • @LunaleMoon ninth, they are all right and nothing is missing. But isn't the project finished?



  • @LunaleMoon No, it would make it much better. Lol

    It's all blocky atm.



  • @O-dragon not quite. I have mentioned it in each update post, I need to make sure the textures work, and how to go about doing so: whether I should just export the original .ytd file and make replacements.. from which, would there be a necessity to convert the bitmaps (currently .png files) to .dds for the .ytd file to work. Another option is to create a .ytd from scratch, where I experimented and seems to be quite easy to do, however that venue did not work, so my question is I did something wrong when doing so.



  • @GreenAid Hm. I'll look into it once I've posted this reply.

    Update: When attaching the vertices of the original carbine rifle with the new model, that's when the model gets the said blocky appearance. So, I'm thinking maybe either I do not attach the vertices and just resize the model to fit within the original, or try to weld the vertices by smoothing the surfaces. What do you think?

    Update 2: I tried the second option, merge the vertices and use the smooth tool from the modifier list, it worked:
    Before: alt text
    After: alt text

    Update 3: The final results now look much better, thank you for the suggestion:
    alt text
    alt text



  • @LunaleMoon but you to put the weapon on 3ds max export from open iv in obj or not? because I did it with the ydr file and turned it into obj to put it on 3ds, I see the weapon and I make the changes. after exporting with GIMS EVO. I put the file just exported on open iv and I don't see the changes made, do you know if I skipped any steps?



  • This post is deleted!


  • @O-dragon I do apologize if I'm not understanding your question. If you are asking me if I exported the rifle on 3DS Max via GIMS EVO and pass it over to OpenIV, then yes. What happens there is that when exporting the file via GIMS EVO on 3DS Max, the file type would usually be a .odr file. What I then did was open Open IV, click on the "edit mode" button, click and dragged the folder I am using for the mod so I could view the folder in Open IV. What I did was just click and drag the .odr file and drop it in the folder I had opened in Open IV and it auto-converts to a viewable .ydr file. You do not export it through 3DS Max, you use GIMS EVO to export it. The file should be .odr not .obj by the end. At least that is my thought.



  • @LunaleMoon yes, I wrote the file format wrong. I right click on the ydr and click export with the original format (".odr"). Then I bring it to 3ds max and make changes to it, after doing this I have to export it with GIMS EVO and put the file on opev iv, right? because doing that but I don't see any changed.



  • @O-dragon Hm. I am not sure about your method because I did not do it that way. I would refer to my previous post about what steps I went through. I essentially made a mix between two tutorials such that it applies to my needs, but I'll try your method and see what might go wrong. I am relatively new at this as, which is why I opened this thread; share my thoughts and progress and see what others (who might know much more than I do) think and suggest. I will try your method after New Years, so, for the meantime, Happy New Years to you.



  • @LunaleMoon happy birthday to you too, let me know if it works to shorten everything. Thank you so much.



  • @LunaleMoon Just right click and make a new one, then drag and drop the textures. They'll be converted to DXT5 dds.

    And good about the verts, you can see now the vert count is much better and closer to polycount.



  • @GreenAid I have done so, and I've made sure the ytd and ydr are in the same folder, and ensured w_ar_carbineriflemk2_hi.ydr is using the corresponding ytd file, however the textures are not rendered when I open the ydr file. Have I done something wrong here?
    alt text
    alt text



  • Wdym corresponding ytd file for _hi? It just uses the normal one as you can see in the bottom right. +hi.ytd is used ingame on close distances for higher res textures (1k-2k usually), BUT they still need a lower res copy in the normal ytd (512 for example).



  • @GreenAid so by that you mean, I should include low res versions of the textures in the same ytd file? The reason why I was confused was because I set up the ytd, made sure the ydr is using the textures, but they are not showing up as in other weapon mods I've seen. maybe I'm missing something?

    For example, there's a SIG Sauer MPX mod which replaces the carbine rifle mk2, and on its ytd file it has: (it seems to have the original bitmaps for the carbine rifle mk2 along with the new ones)

    alt text
    And the ydr file looks like this:
    alt text
    The hi.ydr file looks like:
    alt text



  • @O-dragon I'm trying the process from scratch now, from importing the .odr with GIMS EVO and see how that goes. From what I see, when importing it shows collisions as well, which might be useful. I just attached the new model vertices to the old and deleted the old model, and atm exporting the file. might work. Might. I'm not sure, so I'll keep this side project in mind for the time being as I keep on working with what I have already.

    Update: ok I'm not sure exactly what I'm looking at. Please describe to me what you did?



  • For Anyone who is knowledgeable of model replacements, please do post suggestions here as I work along, such that making this mod may be easier, and for others who may be new to this as well. Thanks!


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.