Gudsawn 93 Posted September 22, 2013 (edited) I'm attempting to learn how to retexture weapons in Arma 3. So far I've had little success. The weapon I'm trying to retexture (just for fun) is the Mx to create a nice black version. I've created the mod as follows: @MX_Black > Addons > mx_black.pbo mx_black.pbo > config.cpp > MX_BLACK.p3d > data > xmx_base_co.paa config.cpp class CfgPatches { class arifle_MX_F { units[] = {}; weapons[] = {}; requiredVersion = 0.1; }; }; class CfgWeapons { class arifle_MX_F; // External class reference class arifle_MX_Black_Base : arifle_MX_F { displayName = "Mx (Black)"; model = "\mx_black\MX_BLACK.p3d"; }; }; From my understanding, everything from arifle_MX_F should be inherited, meaning that I only need to include what I want to change (in this case the model and the display name). The model's texture paths have been changed to: mx_black\data\xmx_base_co.paa When starting the game and opening VAS the weapon appears as it should in the box as "Mx (Black)" with the default (inherited) Mx icon. However, as soon as I add the weapon to my inventory the game freezes. The error returned in the log is: ErrorMessage: Out of memory (requested -1084815 KB). footprint 1197654016 KB. pages 98304 KB. What am I doing wrong? J Edited September 22, 2013 by JamieG Share this post Link to post Share on other sites
Jackal326 1181 Posted September 22, 2013 Well, from the looks of it, you've hex-edited the model to use your new textures. I'm not 100% sure that works, and I'm fairly sure BI frown upon it a lot more now than they used to in the past. The fact that you've screwed up the hex-editing is probably what is causing your issue. If memory serves the new texture path and old texture path have to have the same number of characters, which is probably where your problem lies. Share this post Link to post Share on other sites
Gudsawn 93 Posted September 22, 2013 (edited) Well, from the looks of it, you've hex-edited the model to use your new textures. I'm not 100% sure that works, and I'm fairly sure BI frown upon it a lot more now than they used to in the past. The fact that you've screwed up the hex-editing is probably what is causing your issue. If memory serves the new texture path and old texture path have to have the same number of characters, which is probably where your problem lies. I see, so how have other modders managed to change a BI model's texture path without the same issue? For example: Mx Rifle in Black & ACU Digital Edition That mod is using a rextextured version of BI's Mx model (which is exactly what I'm trying to achieve). How was the creator able to edit the .p3d model without hex editing (if it's binarised)? Edit: I got it to work. Using what you told me about having to have the same number of characters, I used a dirty trick to get it to work: Vanilla path: a3\weapons_f\rifles\mx\data\xmx_base_co.paa New path: mx_black\data\xxxxxxxxxxxxx\xmx_base_co.paa Now that they're the same length, I was able to load the weapon in-game perfectly. Is this how most retexture's are achieved? I checked the Mx Rifle in Black & ACU Digital Edition's model and that creator appear's to be using the same trick: mx_blk\MX_Black\textures\xx\xmx_base_co.paa Is this the only way we can retexture vanilla models? P.S For anyone who's interested: Screenshot #1 Screenshot #2 Screenshot #3 (w/ HAMR sight) Note: Now released (under a different name): http://forums.bistudio.com/showthread.php?165455-MX-Series-Black-Edition Edited September 26, 2013 by JamieG Share this post Link to post Share on other sites