Jump to content
Sign in to follow this  
theVestarr

Issues with vehicle config and animations

Recommended Posts

Hello everyone,

I'd like to ask for some help with an addon that I've been working on. 

I have to mention that it's a bit heartbreaking to me personally - I've spent my last month preparing it and learning a lot of new things only so that I can submit it for the "Art of War" contest, and so that people could enjoy this asset in their scenarios in the base game.

 

Sadly, I've run into too many issues and didn't manage to finish it on time, but figured I'll at least learn from it, maybe I'll just release it to the workshop as a mod at some point.

 

Basically, I've made a casket model.

Just to showcase quickly what I'm talking about:

20200714222644_1.jpg?width=1665&height=9

20200714205425_1.jpg?width=1665&height=9

unknown.png

 

As you can see, I've put an awful amount of work to make all the details I wanted (also, poly count is like 3k on 0.00 resolution LOD so don't worry about all them creases).

 

The casket spawns properly (apart from minor issues with tweaking the rvmat's specularity/smoothness) and looks rather nice. My actions which were supposed to open the door also work. 

However, I didn't want to make it just a static map asset - I wanted to give this casket a "cargo", so that you can place units inside - either for funeral scenes, or for scenarios involving sneaking people in coffins. This, I didn't manage to get to work.

So first of all, to achieve this I made a custom player animation:

unknown.png

 

Which worked well in the animation viewer, but when I loaded the mod and tried doing literally anything in the game, the whole animation cycle was broken.

I was even following a tutorial on how to place custom cargo animations in the game, but somehow, for me, it wouldn't work of course.

The result was - characters being stuck in T-pose halfway through the ground, civillians running sideways when asked to go forward, also T-Pose when interacting with Inventory. Here's the config.

 

class CfgMovesBasic
{
    class Actions;
    class DefaultDie;
    class ManActions
    {
        CasketCargo = "CasketCargo";
    };
};

class CfgMovesMaleSdr : CfgMovesBasic
{
    class States
    {
        class Crew;

        class CasketCargo_dead : DefaultDie
        {
            file = "\casket\anim\CasketCargo.rtm";
        };

        class CasketCargo : Crew
        {
            file = "\casket\anim\CasketCargo.rtm";
            interpolateTo[] = {"CasketCargo_dead",1};
        };
    };
};

Any idea what went wrong here?

I've tried to edit this configuration in a thousand different ways too, none of them worked.

 

I also gave the casket some "transport cargo" so that you can transport items inside, which could be also quite useful for some scenarios, and thankfully that worked well, at least.

Here is the config for the casket itself:

 

class CfgVehicles
{
    class Thing;

    class Casket_Base : Thing
    {
        displayName = "Casket";
        author = "Vestarr";
        scope = 0;
        cost = 0;
        weight = 60;

        simulation = "thing";
        mapSize = 0.9;
        accuracy = 1;
        destrType = "DestructNo";
        waterLeakiness = 0.1;

        maximumLoad = 500;
        transportSoldier = 1;
        transportMaxWeapons = 5;
        transportMaxMagazines = 10;

        cargoAction[] = {"CasketCargo"};
        cargoIsCoDriver[] = {0};
        castCargoShadow = 1;
        hideWeaponsCargo = 1; 

        cargoCanEject = 0;
        memoryPointsGetInCargo = "cargo_action";
        memoryPointSupply = "cargo_action";
        supplyRadius = 2;
        side = 4;
        vehicleClass = "Objects";
        maxSpeed = 0;

        class UserActions 
        {
            class OpenTorsoDoor
            {
                displayName = "Open Torso Door";
                position = "cargo_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "true";
                statement = "this animateSource [""open_torso_door"", 1]";
            };

            class OpenLegsDoor
            {
                displayName = "Open Legs Door";
                position = "cargo_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "true";
                statement = "this animateSource [""open_legs_door"", 1]";
            };
        };
    };

    class Wooden_Casket : Casket_Base
    {
        displayName = "Wooden Casket (Openable)";
        scope = 2;
        model = "\casket\model\casket_wood_openable.p3d";
    };
};

 

I tried experimenting with other Base Classes as well - Car, LandVehicle, etc. but none of them worked. In fact, LandVehicle and Car complained about "submerged" properties missing which I initially added but then abandoned the idea since it just kept giving me more errors about other missing properties. 

I tried the Car/LandVehicle base class because I thought that maybe it has to inherit from a proper vehicle class to even enable the "Get In Cargo" functionality. 

 

From the model perspective, I do have a "cargo_action" point in my Memory LOD, and the 0.00 resolution LOD also contains a cargo proxy.

 

So, my question here I guess is - what went wrong? How can I do it properly in the future? How to avoid doing mistakes like this?

As I mentioned - I'm still learning so all this is very new to me, but so far I couldn't find answers to a lot of problems that I found on the way, documentation didn't clarify a lot of things either. I know that there is a ton of community tutorials but how do I know which one provide the knowledge I need? Which ones are legit? They are usually very long and cover very particular examples and it's also very hard to pick the information that I need to learn from them... So if there's anything useful I could do for homework, please let me know.

 

Also, if someone would be so kind to explain one thing to me:
How does Geometry LOD know which Components should move during animations? Is there any particular way of assigning them to the components in the resolution LODs? It's been bugging me yesterday a bit but didn't get around to test it.

 

Thanks in advance.

Share this post


Link to post
Share on other sites
On 7/15/2020 at 2:22 PM, theVestarr said:

simulation = "thing";

this simulation type doesn't support cargo action, try any vehicle with cargo (Car/CarX/Tank/TankX/Helicopter/etc.) . You can read about various vehicle properties over there

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

 

On 7/15/2020 at 2:22 PM, theVestarr said:


How does Geometry LOD know which Components should move during animations? Is there any particular way of assigning them to the components in the resolution LODs? It's been bugging me yesterday a bit but didn't get around to test it.

They are assigned to selections which then are animated by model.cfg

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

  • Like 3

Share this post


Link to post
Share on other sites
On 7/16/2020 at 7:45 PM, reyhard said:

this simulation type doesn't support cargo action, try any vehicle with cargo (Car/CarX/Tank/TankX/Helicopter/etc.) . You can read about various vehicle properties over there

 

Makes sense, good to know that for the future.

 

On 7/16/2020 at 7:45 PM, reyhard said:

They are assigned to selections which then are animated by model.cfg

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

 

Yeah I know - I've configured my Model.cfg this way and the animations worked fine, but I was confused by the Geometry LOD itself. It's the only LOD (as far as I know at least) that must have components named Component01, Component02 etc. from what I know, and I just don't understand how geometry LOD knows which selections it corresponds to in the Resolution LOD, because the name of the selection is not an option in that case. I take it that the selections in the Geometry LOD must be in the same order as in the Resolution LODs and that's how it knows?

Share this post


Link to post
Share on other sites
26 minutes ago, theVestarr said:

name of the selection

objects can be part of multiple selections. You can have i.e. 5 components in additional selection "cover" for instance

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  

×