Wednesday, August 1, 2018

Arma3 Modding - On to dissecting the house example !

NArma3 Modding - On to dissecting the house example !

After I managed to somewhat trick my way into importing my test model into the actual arma3 game, I know have to dissect the example house add-on, from which I simply copied the most config text files, while exporting my model directly to .p3d with the Blender Arma Toolset. (see last posts)

First next stupid thing is that I will strip everything in the files that I think are not necessary.

This are the files and the script folder.



- basicDefines_A3.hpp

C like definitions, lots of them. Seems mostly unrelated default stuff, like scope settings, true and false, some missile stuff.

I will remove all of them except the true and false.

=> They are there cause everything is a vehicle for the arma engine.

- cfgFunctions.hpp

The description says its a "Set of functions for animating opening and closing of doors with and without handles."

Inside is the CfgFunctions class, the A3_Samples class, seems more like a namespace thing, a BIS tag and a Scripts class with a string file system path to the scripts folder and four abstract class definitions of the doors.

Hmm. My model has no doors, yet.

I will remove all inside the CfgFunctions class, rather comment it out.

- cfgPatches.hpp

This class defines which units (vehicles) are defined in the addon. We have exactly one vehicle in this add-on, class Test_House_01. I still do not know what A3_Structures_F is, it is the name of the only AddOn this AddOn requires. Also three models for every self-defined state the house 'vehicle' can be in, whole, damaged and in ruins.

Since I think the House is inherited from a model in the A3_Structures_F, I will remove both damaged and ruined state only.

- config.cpp

The mother of all the files of an addon, it seems. It includes all of the above and macros for glass.

The CfgVehicles holds the class implementations with the exact name as in the cfgPatches.hpp

"So, the cfgPatches class is the skeletton, the config.cpp is the meat." - me, when I had it for a second

TODO: Write a short summary of the exact nature of the relationship with CfgVehicles and CfgPatches.

Back to config.cpp.

House is the base class. I should check here the official arma docu, but I skip that for now.
House_F, whatever the F means, inherits from House but adds a DestructionEffectClass to itself.

Land_Test_House_01_F inherits from House_F, every following state inherits from the former.

So there are a lot values in the Land_Test_House_01_F class. I will remove the whole damage system.

So I removed all the door things as well. What is left is short and handy.



- config_macros_glass.hpp

I hope nobody had to write this defintion file by hand. I will remove the file and its include in the config.cpp.

- model.cfg

Last model.cfg is up. It contains two classes, CfgSkeletons and CfgModels.

Skeletons are basicly Arma's Rigs as far as I understand that. Not sure yet. Seems you do door animations and stuff with it.

Now the CfgModels class use the Skeletons and structures things like Animations. There is also a class for the damages house, where just some of the house and window interaction are missing.

I will remove everything except the Default Class inside the CfgModels and a stripped class of the House.

Close

I removed the two equal but unnecessary p3d's and the scripts folder.

This should as far as I know work. Let me try.

So. Yes. This works !!!



Now to clear up the details of this working barebone.
And to get the texture on the model.

No comments:

Post a Comment