Jump to content
Sign in to follow this  
van Gastel

Failed to port single model from A2 mod into A3

Recommended Posts

So, after I just wanted to try port a model from A2 into A3, I started with researching some stuff as in how to do it and such. After successfully making it appear in the arsenal and such, the model and texture don't load up as seen below. I tried various things and was just wondering if there is a mistake in the code. All files that are referred too are in their spot, so this can't be an issue. Was thinking about something that has to do with the model itself?

 

As there is some more in there such as the patches and helmet, everything works except the uniform.

 

Ingame view

 

Laz074a.jpg

 

 

CODE

#define private		0
#define protected	1
#define public		2

class CfgPatches {
	class 29thID_Helmets {
		units[] = {"29th Helmet","Dress_uniform"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"rhsusf_main", "rhsusf_c_weapons", "A3_Characters_F"};
	};
};

class cfgWeapons {
	class ItemCore;	// External class reference
	class HeadgearItem;	// External class reference
	
	class 29th_Helmet : ItemCore {
		scope = public;
		weaponPoolAvailable = 1;
		displayName = "29th ID - Yin Yang";
		picture = "\29th_helmets\ui\29th_helmet.paa";
		model = "\A3\Characters_F\BLUFOR\headgear_b_helmet_plain";
		hiddenSelections[] = {"camo"};
		hiddenSelectionsTextures[] = {"\29th_helmets\data\29HelmetYinYang.paa"};

		class ItemInfo : HeadgearItem {
			mass = 40;
			allowedSlots[] = {801, 901, 701, 605};
			uniformModel = "\A3\Characters_F\BLUFOR\headgear_b_helmet_plain";
			modelSides[] = {3, 1};
			hiddenSelections[] = {"camo"};
		
			class HitpointsProtectionInfo {
					class Head {
						hitpointName = "HitHead";
						armor = 6;
						passThrough = 0.5;
					};
				};
		};
	};
	
	class UniformItem;	// External class reference
	
	class Dress_uniform: ItemCore {
		scope = public;
		weaponPoolAvailable = 1;
		displayName = "29th dress";
		picture = "\29th_helmets\ui\uniform_ocp.paa";
		uniformModel = "\29th_helmets\bh_soldier.p3d";
		hiddenSelections[] = {"Camo1", "Camo2", "Camo3", "koppel", "m58", "m92", "riemen", "sidecap"};
		hiddenSelectionsTextures[] = {"\29th_helmets\data\bh_soldier_fm_co.paa","\29th_helmets\data\hatpin_san.paa","\29th_helmets\data\bw_blue_co.paa"};
		class Wounds {
		tex[] = {};
		mat[] = {
		"A3\Characters_F\BLUFOR\Data\clothing1.rvmat",
		"A3\Characters_F\BLUFOR\Data\clothing1_injury.rvmat",
		"A3\Characters_F\BLUFOR\Data\clothing1_injury.rvmat"
		};
		
		class ItemInfo: UniformItem {
		   uniformModel = "-";
                   uniformClass = "dress_uniform";
                   containerClass = Supply40;
                   mass = 40;
		};
	};
	
};
 
class cfgVehicles {
	class Headgear_Base_F;	// External class reference
	
	class Headgear_H_Helmet_new : Headgear_Base_F {
		scope = public;
		scopeCurator = 2;
		displayName = "29th Helmet";
		author = "29th Engineers";
		vehicleClass = "ItemsHeadgear";
		
		class TransportItems {
			class H_Helmet_new {
				name = "H_Helmet_new";
				count = 1;
			};
		};
	};
};

Share this post


Link to post
Share on other sites

You config is wrong, on so many levels.

uniformClass = "dress_uniform";

^ this part, within ItemInfo of the uniform, needs to be a classname for a new infantry unit defined within CfgVehicles, NOT just the classname of the uniform item.

You also aren't using the correct texture naming conventions for your texture which means they'll probably look like shit ingame. Anything with transparency (i.e. icons/inventory images) should be _ca.tga (or PNG) before you convert it and anything without transparency should end with _co.tga (or PNG).

  • Like 1

Share this post


Link to post
Share on other sites

Ok, it is wrong on "so many levels" explain why it works then for all the others. And if I may ask how to organise my config to the right lay-out, that would be nice as I'm totally new to this stuff and doing just trial and error at the moment.

Share this post


Link to post
Share on other sites

I apologise for my earlier comment, I mistook a lot of things for errors but they weren't - it was simply that I'd just woken up and wasn't seeing straight  :blink:

 

Anyway, the formatting etc. is pretty good to be honest. Personally I have the opening { of a class on the next line but your way of having it on the same line is considered the more tidy standard.

 

One thing I did notice is that the cfgVehicles section references a classname ("H_Helmet_new") that doesn't seem to exist, is that supposed to be "29th_Helmet"?

  • Like 1

Share this post


Link to post
Share on other sites

Apologies accepted, mistakes happen but back to the point. I honestly think it just makes it able to create a "new" headgear class if the helmet is dropped on the ground. It does have to do something with the gear being on the ground, but no specific input on that from my side as I just put it in there as it's in the basic info thingy.

 

As seen in the picture below, that's the info I found here:

https://community.bistudio.com/wiki/Arma_3_Characters_And_Gear_Encoding_Guide

 

 

YSGr7Ul.png

 

This aside, do you have any clue on how I might be able to fix this issue of the model and textures not appearing in-game?

Share this post


Link to post
Share on other sites

EDIT

 

Found out that the issue is in my config as when I copy a model coming from the famous RHS: USF pack and try it out by editing the modelname in the config and the model appeared transparant aswell...

Share this post


Link to post
Share on other sites

Have you created a new unit class in cfgVehciles yet and changed your config according to how I suggested in my original reply?

Share this post


Link to post
Share on other sites

Sorry for the slow reply, but I have no single idea how to create that new unit class you told me about.. Would you mind explaining it a bit more, as I'm kinda stuck...

Share this post


Link to post
Share on other sites

EDIT

 

Found out that the issue is in my config as when I copy a model coming from the famous RHS: USF pack and try it out by editing the modelname in the config and the model appeared transparant aswell...

I don't think you cant do that, you need to direct the part of the config that says model, to where the RHS model is located, also renaming a model from another addon, will also not work, as you need to know all the texture paths etc, renaming that model, would destroy any sort of texture path is has to to the RHS model. 

I'm presuming that you've copied the RHS model into your own folder? I'm not actually sure if RHS would allow that to be honest, if it's dependent on RHS, you should have the correct class names for the character you're using as well 

    class UniformItem;    // External class reference

    

    class Dress_uniform: ItemCore {

        scope = public;

        weaponPoolAvailable = 1;

        displayName = "29th dress";

        picture = "\29th_helmets\ui\uniform_ocp.paa";

        uniformModel = "\29th_helmets\bh_soldier.p3d";

        hiddenSelections[] = {"Camo1", "Camo2", "Camo3", "koppel", "m58", "m92", "riemen", "sidecap"};

        hiddenSelectionsTextures[] = {"\29th_helmets\data\bh_soldier_fm_co.paa","\29th_helmets\data\hatpin_san.paa","\29th_helmets\data\bw_blue_co.paa"};

        class Wounds {

        tex[] = {};

        mat[] = {

        "A3\Characters_F\BLUFOR\Data\clothing1.rvmat",

        "A3\Characters_F\BLUFOR\Data\clothing1_injury.rvmat",

        "A3\Characters_F\BLUFOR\Data\clothing1_injury.rvmat"

        };

 

It also looks like your uniform isn't inheriting any sort of class, which again wouldn't work. I'm sure it needs to be Uniform_Base, and not ItemCore as well.

Have a look at my basic single entity uniform config, it might be of some use to you, the parts in red bold are very relevant for uniforms, as it's directing the config to these models.

 

class CfgVehicles

{

        class B_Soldier_base_F;

        class CRYEGEN3_MCT_01_F: B_Soldier_base_F

    {

        scope = 2;

        author = "Road Runner";

        dlc = "DEVGRU";

        model = "\A3\characters_F\BLUFOR\b_soldier_03.p3d";

        hiddenSelections[] = {"camo","insignia"};

        hiddenSelectionsTextures[] = {"\CRYEGEN3_MCT\CRYEGEN3_MCT\tex\CRYEG3_MCT_1_co.paa"};

        hiddenSelectionsMaterials[] = {"\CRYEGEN3_MCT\CRYEGEN3_MCT\data\CRYEG3_1.rvmat"};

};

};

class cfgWeapons

{

  class UniformItem;

    class Uniform_Base;

    class CRYEGEN3_MCT_1: Uniform_Base

    {

        scope = 2;

        author = "Road Runner";

        dlc = "DEVGRU";

        displayName = "NSWDG CRYEGEN3 MCT 1";

        picture = "\CRYEGEN3_MCT\CRYEGEN3_MCT\ui\MCT_ui.paa";

        model = "\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";

        class ItemInfo: UniformItem

        {

            uniformModel = "-";

            uniformClass = "CRYEGEN3_MCT_01_F";

            containerClass = "Supply40";

            mass = 1;

            allowedSlots[] = {"701","801","901"};

            armor = 0;

        };

    };

};

       

 

Share this post


Link to post
Share on other sites

Current look on the config. Fixed some issues, still got the 2 helmets working from before, made a seperate PBO file now. No progress on making the model itself appear.

 

And if I were to actually use the model from RHS, I'd like to let them know it's for presonal/private use only. Nothing money related so shouldn't be a problem as they'll always get the credit for the model.

#define private		0
#define protected		1
#define public		2

class CfgPatches {
	class 29thID_Uniforms {
		units[] = {"29th_uniform"};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_Characters_F"};
	};
};


class cfgWeapons
{
    class UniformItem;
	class Uniform_Base;
 
    class 29th_uniform: Uniform_Base
    {
        scope = 2;
        displayName = "29th uniform";
        picture = "\A3\characters_f\data\ui\icon_u_b_soldier_new_ca.paa";
        model = "\29th_uniforms\standard_soldier.p3d";
        hiddenSelections[] = {"camo"};
        hiddenSelectionsTextures[] = {"\29th_uniforms\data\standard_soldier_co.paa"};
 
        class ItemInfo: UniformItem
        {
            uniformModel = "-";
            uniformClass = B_soldier_new;
            containerClass = Supply40;
            mass = 40;
        };
    };
};
 
class cfgVehicles
{
    class Item_Base_F;
    class Item_U_B_soldier_new: Item_Base_F
    {
        scope = 2;
        scopeCurator = 2;
        displayName = "29th Uniform";
        author = "29th engineers";
        vehicleClass = ItemsUniforms;
        class TransportItems
        {
            class U_B_soldier_new
            {
                name = U_B_soldier_new;
                count = 1;
            };
        };
    };
};

Share this post


Link to post
Share on other sites

do you have the name "standard_soldier" in your model.cfg file? I'm sure that's your error there mate.

It's easier to actually link to the RHS model in your CPP file

 

it's something like this, the bold is whatever character model you're using as a base.

 

model = "\rhsusf\addons\rhsusf_infantry2\CryeGen3.p3d";

Share this post


Link to post
Share on other sites

The problem is the new uniform class has no character define in cfgVehicles to reference from and tied back into the uniform define with the uniformClass parameter, as I've already said...

 

You need to add a soldier class to your cfgVehicles section, it doesn't have to be anything too extravagent and can be very simple. Something like this:

class CfgVehicles
{
	class B_Soldier_F;
	class YOUR_NEW_SOLDIER_CLASSNAME: B_Soldier_F
	{
		scope = 1; // change this to 2 if you want it to show in the editor as well
		displayName = "WHATEVER NAME YOU WANT TO SHOW IN THE EDITOR GOES HERE";
		uniformClass = "29th_uniform"; // This is the classname of your uniform, if you create more uniforms you need to create more soldier classes to correspond with them

		model = "\29th_uniforms\standard_soldier.p3d";

		weapons[] = {"Throw","Put","Binocular"}; // add weapons and shit
		respawnWeapons[] = {"Throw","Put","Binocular"}; // add weapons and shit that the unit will respawn with if killed in MP
		magazines[] = {}; // magazines and shit
		respawnMagazines[] = {}; // magazines and shit the unit respawns with if killed in MP
		linkedItems[] = {"ItemMap","ItemGPS","ItemCompass","ItemWatch","ItemRadio"}; // stuff
		respawnLinkedItems[] = {"ItemMap","ItemGPS","ItemCompass","ItemWatch","ItemRadio"}; // stuff the unit respawns with if killed in MP
	};
};

Your current CfgVehicles section is pointless, as all it adds a place-able uniform classname that doesn't even exist...

 

EDIT: You'll also need to add whatever you change YOUR_NEW_SOLDIER_CLASSNAME to within the uniformClass parameter of the uniform define, e.g:

        class ItemInfo: UniformItem
        {
            uniformModel = "-";
            uniformClass = "YOUR_NEW_SOLDIER_CLASSNAME";
            containerClass = Supply40;
            mass = 40;
        };
  • Like 1

Share this post


Link to post
Share on other sites

 

And if I were to actually use the model from RHS, I'd like to let them know it's for presonal/private use only. Nothing money related so shouldn't be a problem as they'll always get the credit for the model.

 

I am not sure RHS would like that stance, i would suggest looking at making addon standalone or requiring RHS as a mod.

  • Like 2

Share this post


Link to post
Share on other sites

I'm also a little confused, as you state you're trying to port a model from A2, but you make references to the RHS uniform/model. ??

My guess is you're trying to make your own texture, to work on the RHS G3 Crye model, as that's the icon you seem to be using, the reason why your uniform isn't showing is because the default RHS model isn't in your config.cpp as I already pointed out.

You're actually trying to get a re texture to show, and not import a model, which is completely different, and this is where you're getting confused, and also confusing those who are trying to help you here.

 

Share this post


Link to post
Share on other sites

I think so many wires are crossed here its like a blind-man with no electrical experience attempted to re-wire the lighting of the Eiffel Tower...

As to the origins of the original model the OP is/was using I cannot speak.

My understanding from actually reading his posts rather than jumping to conclusions was that after numerous failed attempts and from not following advice he assumed the issue could be with his model so tried to use a model that he knew worked (i.e. the RHS Model).

However, this still failed to work as the issue is his broken config (which I've attempted to fix but if he doesn't want to implement my advice that's fine) not the model itself.

Lets just wait for further clarification from the OP before we jump on the bandwagon shall we?

  • Like 2

Share this post


Link to post
Share on other sites

Code problem is fixed at the time being as I can import the RHS model now, so I can start moving on with my own model.

the main point to referencing to the RHS model is so I know this model does work in ArmA and so, I would know if the code works if the model would pop up with original textures. This was merely for confirmation if the code was faulty or not.

 

In the latest days, I made myself a new model. Now I have the issue of not knowing how to add a so called "skeleton" and such... Couldn't find any decent tutorials or anything like that.

 

 

Yet again, sorry for the late reply. Was busy making my basic model.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×