Jump to content
Sign in to follow this  
alleycat

Exporting problems

Recommended Posts

What is the absolute minimum required to export a static object that just sits where it is placed?

So far I have this:

config.cpp

/*
Colt Detective .38
created by cat
*/
class CfgPatches	
{
class CAT_colt_detective
{
	units[] = {CAT_colt_detective};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {};
};
};


class CfgVehicles
{
class All {};
class Static : All {};
class Building : Static {};
class NonStrategic : Building {};
class TargetTraining : Nonstrategic {};
class TargetGrenade: TargetTraining {};

class CAT_colt_detective : TargetGrenade
{
	model="CAT_colt_detective_01.p3d";
	armor=20000;
	scope=2;
	displayName="CAT_colt_detective_01";
	vehicleClass = "Objects";
};
};

This exports into the game but when loading into the mission it says:

Warning Message: Cannot open object cat_colt_detective_01.p3d
cat_colt_detective_01.p3d: No geometry and no visual shape
cat_colt_detective_01.p3d: No geometry and no visual shape
cat_colt_detective_01.p3d: No geometry and no visual shape
cat_colt_detective_01.p3d: No geometry and no visual shape

My p3d looks like this:

http://imgur.com/zlz2ae2

1. how to move the collision model to my geometry lod?

2. Will an improperly assigned texture cause the model not to load or still load with some default error texture?

3. Does a static object need a model.cfg?

Share this post


Link to post
Share on other sites

Hey Alleycat, are you working with a P drive?

Share this post


Link to post
Share on other sites

Yes, I am using the P drive created by the tools. However All my source files are on an entirely different physical drive.

Share this post


Link to post
Share on other sites

You need to be working entirely from the P drive, that includes assets and such.

For example, you'll need a structure like alleycatmod\allyourshitgoesinhere inside the P drive.

Generally it's good practice to have separate folders for things like textures, animations and so on. So, alleycatmod\data for textures and RVMats, alleycatmod\sounds for sounds and so on.

model="CAT_colt_detective_01.p3d"; This section of the config is confused and basically cannot find your assets, in the example I've given, it would be something like model="alleycatmod\CAT_colt_detective_01.p3d"; as we generally just keep the model and the config data inside of the alleycatmod folder directly.

Edited by Kiory

Share this post


Link to post
Share on other sites

Could you write a simple example of how the folder structure would like for the source files in the P drive? Just so I can tell where the files are supposed to be in relation to it?

Share this post


Link to post
Share on other sites

Yea sure, it will be simple though. :P

Ok so you have your P drive, inside the P drive you'll want a folder with the name of your mod, ideally you'll want to pick a small abbreviation of your name and it needs to be unique so it doesn't conflict with other mods, or people don't get confused. So something like "alcat_weapon", in your case, "alcat_colt" as that's currently the weapon you are working with.

Inside of this folder will contain your model.p3d, config.cpp and model.cfg. Also, inside of this folder you will need another folder for your textures and RVMats, this is generally known as "data", if you have custom sounds, then have a folder called "sounds". For UI elements (inventory images and such), you will need something like "UI", or "gear".

It's really that simple, if you need a visual representation let me know, I know some people don't learn the same way as others so it's not an issue.

Share this post


Link to post
Share on other sites

Thanks I will try that setup now. Do you actually need an RVMAT and model.cfg for a simple static object? And by need I mean the bare minimum to get the thing to show in the game.

Share this post


Link to post
Share on other sites

2SwbhV6.jpg

Ok so far so good. Thanks for the P drive advice, solved a problem I spent 2 days trying to fix. Very much appreciated.

The collision appears not work however. I think it is because the collision box has to be assigned somehow to the geometry lod. But I am not sure how to do that, the item only shows up in the 0 lod.

Share this post


Link to post
Share on other sites

You're welcome, keep me informed if you run into any other issues.

Share this post


Link to post
Share on other sites

I am following Zach's weapon exporting tutorial and I have encountered a problem when placing memory points. The point is only visible in front view but not in any other window. Also the windiw it is visible in says FRONT in blue letters.

Is that a bug?

Share this post


Link to post
Share on other sites

do you model yourself or is this a model you aquired?

If you use a modelling tool you can make a triangle and place one of its points where you want the memory Point to be. After that you export the triangle, and import it into O2. Delete the 2 obsolete points of the triangle. create all the triangles, then export&import them all at once. Easier, more accurate and more comfortable memory point placement.

Share this post


Link to post
Share on other sites

This is is a model made from scratch by me. This is the topic in the addons forum:

http://forums.bistudio.com/showthread.php?180714-Colt-Detective-Special-38/page3

Also in the first post you can find an imgur album that documents how I modeled it.

https://imgur.com/a/lRFAe

Awesome tip with the triangle, thanks.

Share this post


Link to post
Share on other sites

Having some issues with the export:

1. The eye point appears to be far off to the right of the gun when aiming down sigthts. However the memory point with a named selection called "eye" is present. All other memory points (casing eject) appear to work correctly. Also I manually set

memorypointcamera = "eye";

in my config.

Any pointers on what is wrong?

/*
Thompson M1921
created by cat
*/



#include "basicdefines_A3.hpp"
class CfgPatches
{
class CAT_thompson1921
{
	units[]={};
	weapons[]={"CAT_thompson1921_stick"};
	requiredVersion=0.1;
	requiredAddons[]={"A3_Weapons_F"};
};
};
/// All firemodes, to be sure
class Mode_SemiAuto;
class Mode_Burst;
class Mode_FullAuto;

/// Weapon slots
class SlotInfo;
class CowsSlot;
class PointerSlot;

#include "cfgRecoils.hpp" /// specific recoil patterns for this rifle
#include "cfgMagazines.hpp" /// specific magazines for this rifle
#include "cfgAmmo.hpp" /// specific ammo for this rifle

class CfgWeapons
{

//Inheritance


class Default {};	
class RifleCore: Default {};
class Rifle: RifleCore {};


class Rifle_Base_F: Rifle
{
	class WeaponSlotsInfo;
	class GunParticles;
};	


class SMG_01_Base: Rifle_Base_F {};
class SMG_01_F: SMG_01_Base {};

class CAT_thompson1921_stick: SMG_01_F
{
	descriptionshort = "Submachine Gun<br />Caliber: .45 ACP";
	dexterity = 1000;
	displayname = "Thompson M1921 Stick Magazine";
	model = "cat_thompson\cat_thompson_stick.p3d";

	picture = "\A3\Weapons_F_beta\Smgs\SMG_01\data\UI\gear_SMG_01_X_CA.paa";
	scope = 2;
	uipicture = "\A3\Weapons_F\data\UI\icon_regular_CA.paa";
	handanim[] = {"OFP2_ManSkeleton", "\A3\Weapons_F_beta\rifles\mk20\data\Anim\mk20.rtm"};

	memorypointcamera = "eye";
	modelOptics = "-";


	class WeaponSlotsInfo: WeaponSlotsInfo
	{
		mass = 60;
	};

	class Library 
	{
		libtextdesc = "$str_a3_cfgweapons_hgun_smg_01_library0";
	};
};	

};
//





Edited by alleycat

Share this post


Link to post
Share on other sites

Make sure to align konec and usti hlavne (or whatever you've called them, gun end and beginning memory points). I know that even the slightest misalignment can cause what you are describing.

Share this post


Link to post
Share on other sites

I followed your hint on alignment and while the points were perfectly aligned I found several issues:

I used primitive objects as memory points in XSI which I then exported into O2 via FBX and later with OBJ because an FBX import removes everything in the file. Then I deleted all but one vertex off each object and named the selections according to Zach's tutorial. Then I suspected something perhaps being wrong with the offset of points, so I exported all memory objects again, this time with all translations frozen in XSI because the memory points had a 90 degree rotation.

Now this is where it gets weird.

After re-import I discovered by accident that my muzzle attachments were named usti_hlavne, with the underscore. After fixing that, finally the muzzle worked and bullets were fired. And my eye point seemed to work too. So I adjusted the eye point a bit backwards and when testing it, the eye point was offset down along the Z axis, and the casings ejected to the wrong side.

Something must have messed up the orientation of these points after importing from XSI. Now is there any way to freeze/reset the points to clean any rotation they might have? I spent hours in XSI aligning my model so that it exaclty exports to O2 without any need for adjustment.

Another question about inheritance. how to I correctly overwrite the reloadtime in a fire mode without breaking the parent class? I would like to keep all previous definitions and just change reload time.

config:

/*
Thompson M1921
created by cat
*/



#include "basicdefines_A3.hpp"
class CfgPatches
{
class CAT_thompson1921
{
	units[]={};
	weapons[]={"CAT_thompson1921_stick"};
	requiredVersion=0.1;
	requiredAddons[]={"A3_Weapons_F"};
};
};
/// All firemodes, to be sure
class Mode_SemiAuto;
class Mode_Burst;
class Mode_FullAuto;

/// Weapon slots
class SlotInfo;
class CowsSlot;
class PointerSlot;

#include "cfgRecoils.hpp" /// specific recoil patterns for this rifle
#include "cfgMagazines.hpp" /// specific magazines for this rifle
#include "cfgAmmo.hpp" /// specific ammo for this rifle

class CfgWeapons
{

//Inheritance


class Default {};	
class RifleCore: Default {};
class Rifle: RifleCore {};


class Rifle_Base_F: Rifle
{
	class WeaponSlotsInfo;
	class GunParticles;
};	


class SMG_01_Base: Rifle_Base_F {};
class SMG_01_F: SMG_01_Base {};

class CAT_thompson1921_stick: SMG_01_F
{
	descriptionshort = "Submachine Gun<br />Caliber: .45 ACP";
	dexterity = 1000;
	displayname = "Thompson M1921 (20Rnd Stick)";
	model = "cat_thompson\p3d\cat_thompson_stick.p3d";

	picture = "\A3\Weapons_F_beta\Smgs\SMG_01\data\UI\gear_SMG_01_X_CA.paa";
	scope = 2;
	uipicture = "\A3\Weapons_F\data\UI\icon_regular_CA.paa";
	handanim[] = {"OFP2_ManSkeleton", "\A3\Weapons_F_beta\rifles\mk20\data\Anim\mk20.rtm"};

	memorypointcamera = "eye";
	modelOptics = "-";
	//reloadTime= 0.3;


	class WeaponSlotsInfo: WeaponSlotsInfo
	{
		mass = 60;
	};

	class Library 
	{
		libtextdesc = "$str_a3_cfgweapons_hgun_smg_01_library0";
	};

	class FullAuto: Mode_FullAuto 
	{

		reloadtime = 0.15;

	};		


};	

};
//

Share this post


Link to post
Share on other sites

You need to bring in the fire mode stuff into your class, it will overwrite the settings just for your class in that case, everything else will be untouched.

As for the mem points, you're better off creating them in O2, it's probably quicker, just put the mouse cursor where you want one and press insert on your keyboard, you'll need to move it into position but it's a much faster and problem free way of doing things.

Share this post


Link to post
Share on other sites

The eye position seems to depend on the hand animation that is used. On the MK20 my memory points line up perfectly probably because i matched it to an Arma2 M16 p3d file. However what controls where the gun origin is relative to the hand? Must be a specific hand bone that matches to the gun absoulte 0 0 0

Share this post


Link to post
Share on other sites

The weapon position is linked to the weapon bone, the hand bones use IK and follow the weapon bones position.

Regardless, no matter where the weapon is, the eye position always takes precedence over where the weapon bone is so this is a strange issue indeed.

Share this post


Link to post
Share on other sites

Ok this is messed up beyond comprehension:

I just packed the same file again after exiting and rebooting O2 without any changes to any file and the eye position works. Appears to happen randomly. This is by far the most messed up workflow and tools for any game I have encountered.

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  

×