Tuesday, August 21, 2018

Dwelling in Source - Part 1

Since I have some time today I will get into the Source world with trying to import objects from Day of Infamy into Blender and mix it with my new prototypes for my Day of Infamy Map.

so, first I seem to need to get the Blender Source Tools from Valve here.

I did that last time I managed to import a object into Day of Infamy, but without the textures, too.

That is the first tutorial I found about this specific topic.

How to decompile the DoI files ?

Well, there were tools from third-parties in the past. As far as I understand it now, you just can use vdk.exe in the bin directory from your DoI steam install. (not sure if you have to install the sdk prior, have to look that up again)

After a few not working attempts I finally managed to move doi_models_dir.vpk over the vdk.exe, and heureka, it decompiled the models.

That was easy, but the models and textures still were in some meta format that made me unable to load them directily with the supposedly outdated blender import tools from valve anyway.

Anyway, I now manage to import some of the fully decomplied sdk example weapons and found the decompiled materilas for it.

But I switched for some reasons while reading up on .cq files to Hammer, which still didnt work since I reinstalled a fresh Windows and changed the steam directories due to volume name changes.

That lead me deeper into some areas where I then frust-read some more and found out that you have to change the directories in GameInfo,txt in the steam game bin directory of Game of Infamy...eh Day of Infamy.

So now Hammer works again fine and I will chill down and watch some hammer tutorials for ... fun.


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.