Log in to reply

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

  • Jan. 5, 2022 Update:

    I found that by using Adobe Substance Painter, I would be able to create my own textures, and I have done so, as seen here:
    alt text
    alt text

    I have attempted to work on the project from scratch by using GIMS EVO alone to end up with the .ydr file(s) for the new rifle model. What I found out is that when importing a model through GIMS EVO instead of Kam's Scripts (which required several steps just to import the model alone) I was able to see the skeleton for the rifle, which made it easy for me to not only replace the rifle model, but also to modify the skeleton such that it fits with the new rifle model.
    alt text
    I also managed to add the textures as game materials for the rifle, as you can see above using GIMS EVO.
    I am currently facing a little trouble with the exporting part, since I've gotten an error saying "stack overflow"

    I have looked at pre-existing models that replace the carbine rifle mk2, and noticed that under shaders when the file's opened on Open IV, it says weapon_normal_spec_detail_palette.sps .
    The point is that at this point, I am not sure exactly what I'm doing. If there are any suggestions you all can give me, I greatly appreciate it.

  • @LunaleMoon YTD should have only the textures used by the gun, others will just be bloat. So check in your project file what textures you are using.

    And for +hi, it just has to include usually higher res copies of textures already present in the normal ytd. It's done so to optimize the memory used, as lower res textures will use less memory (when the player isn't holding the gun basically, so all other instances).

  • On my MPX, the original textures are only for the sight that i took from GTAV and added to the gun, you dont need to use them
    And import your base color in a8r8g8b8 compression to avoid dark purple textures

  • @DynsPr I see, thank you. I hope you don't mind if I pm you regarding this project.

  • Jan. 8, 2022 Update:
    The model works without crashes now. The problem now is that the textures glitch like crazy. Not sure what the issue might be. I'm also going to fix the position of the rifle to make sure the mag does not clip through the model.
    alt text
    alt text

    I'll review the .ytd file and see if that's the problem.

    alt text

    Update 2:
    Positioning is fixed. Texture still needs fixing. My question would be, would this be a problem that can be solved before exporting the model, or is it a purely .ytd issue? Animations work except for muzzle flash. For that I see two options.

    1. I shorten the barrel so the animation does not appear to clip through the barrel.
    2. Somehow change the position of where the muzzle flash occurs; the question is, how?
      alt text
      alt text
      Also, so there is no confusion, the screenshots above are of the position fix and the texture glitching out.

  • @DynsPr Did you use the original .ytd file and modify it, or did you make a new .ytd file and name it the same as the .ydr?

  • Jan. 08, 2022 Update:

    I shortened the length of the barrel such that the animation occurs in the right place. Flashlight attachment location is corrected, however when firing the weapon the model seems to move to it's original position and go back once firing stops. Not sure why exactly. Textures have yet to be fixed. I am not sure if it's something I did wrong or did not do before exporting, or when setting up the .ytd file.
    alt text
    alt text

  • @LunaleMoon did you upload the textures directly from 3ds max or did you put them in the ytd? because I tried to put the textures of the materials directly on 3ds max and unfortunately they have the same effect as you, all glitches.

  • @O-dragon I tried both ways. My assumption would be that, once one opens the finished .ydr file, under shaders it should not say default.sps .. I'll look into it.

  • @LunaleMoon but to me it does not export also the ytd but only the ydr, and the textures I am trying to put on the weapon in an already made ytd but inserting the newly created textures in dds. The only thing that the textures are not connected with the model of the gun but only the old ones or the base color etc. but the objects I created do not. I would like to know if only ydr or ytd exports to you.

  • @O-dragon When I export the model from 3DS Max, it comes out only as an .odr file, which I convert to .ydr file type by dragging the .odr into the folder I have opened on Open IV. As for the .ytd, I made it from scratch on Open IV.

  • @LunaleMoon okok, i solved. I do your same method then for the ytd use external textures and put the same name as the textures and it works perfectly. How's it going to you?

  • @O-dragon I'm glad to hear that your project went well! Please, do send me a private message, to see what you've got unless you're fine sharing in this thread, if it is relevant to my project.

  • @LunaleMoon certainly, my plan was not to replace a model of an existing weapon. I made a mk2 pistol with 3d models on the magazine and a pendant, but nothing particular was successful.

  • An update on this topic: I have decided to shelf this project due to my inability to figure out a good workflow to finish make model function as it should in-game. If anyone would like to take this project on, feel free to contact me and I'll hand you the appropriate files. Thank you all for your attention!

  • can I get the files and just use it in game, the texture are a little fonky but the model is AMAZING

Log in to reply

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