Call to Arms

Call to Arms

Call to Arms - Workshop
The place to find custom maps, missions and mods for Call to Arms! Do you want to contribute? Check out the installation folder of your game and browse the mods subfolder for tools and documentations.
Making a new tank....
Sooooo, what all is required to make a new tank fully functional?

I am in the process of trying to add the M1A1M to the US faction as the M1A1, and its all working, ive renamed the .def, renamed the .mdl(idk if I should actually do this), ive copied and renamed all the .dds skins, ive coped and renamed the .x and .xx files. Ive put it in the .desc, and its 'working' in game, as in I can spawn it without crashes, the only thing that I am unsure how to do is how do I get the damage model to actually work?

That is, the damage status indicator in the bottom left does not show up and the model does not exhibit any damage states. The tracks dont fall off when hit, the gun doesnt show as broken, the engine doesnt explode and the vehicle wreck doesnt show the x or xx states.
< >
Showing 1-15 of 17 comments
†NokaS-RUS† 3 Oct, 2020 @ 1:58pm 
Well, you're weird. Didn't I really understand how it works.
Add code to .def
{perks
{component "body"
{category "tank_heavy"}
}
{component "engine"
{category "engine_heavy"}
}
{component "turret"
{category "turret_heavy"}
}
{component "gun"
{category "gun_heavy"}
}
{component "trackleft"
{category "track_heavy"}
}
{component "trackright"
{category "track_heavy"}
}
{component tag "wheel"
{category "wheel_heavy"}
}
{component tag "glass"
{category "glass_heavy"}
}
}

These are different components.
And their number of lives is stored in the file.
gamelogic.pak \ set \ component.set
Tallran 5 Oct, 2020 @ 4:31pm 
What you did wrong was renaming the ".mdl", just rename the folder and ".set" files and you should be all good.
To make the damage indicator in the left corner show up, you have to go to resource\set\registry and add: {"M1A1M"
{vehicle_view "tank"}
}
to unit.reg
Originally posted by Tallran:
What you did wrong was renaming the ".mdl", just rename the folder and ".set" files and you should be all good.
To make the damage indicator in the left corner show up, you have to go to resource\set\registry and add: {"M1A1M"
{vehicle_view "tank"}
}
to unit.reg

Ahh, I did that well after, figuring maybe I had to also change the .mdl. Ill go mess with this registry now and see where it goes.

What makes the damage model work though? Even before I messed with .mdl it didnt work right.
Tallran 5 Oct, 2020 @ 5:05pm 
Originally posted by Lord-Knight Fandragon:
What makes the damage model work though? Even before I messed with .mdl it didnt work right.
I just copied the <unitname>_x and <unitname>_xx folders and renamed them and their ".set" files, you do have the x folder that they are located in, in the same folder as the unit's folder, right?
Originally posted by Tallran:
Originally posted by Lord-Knight Fandragon:
What makes the damage model work though? Even before I messed with .mdl it didnt work right.
I just copied the <unitname>_x and <unitname>_xx folders and renamed them and their ".set" files, you do have the x folder that they are located in, in the same folder as the unit's folder, right?

vehicles/usa/x
vehicles/usa/m1a1

yes.

I even went through and copied and renamed all the files for the textures as well, from m1a1m to m1a1.....
Tallran 5 Oct, 2020 @ 5:30pm 
Originally posted by Lord-Knight Fandragon:
Originally posted by Tallran:
I just copied the <unitname>_x and <unitname>_xx folders and renamed them and their ".set" files, you do have the x folder that they are located in, in the same folder as the unit's folder, right?

vehicles/usa/x
vehicles/usa/m1a1

yes.

I even went through and copied and renamed all the files for the textures as well, from m1a1m to m1a1.....
Hm, I just tested cloning the M1A1M and its x/xx models, and I got it working. Though it got me thinking, how are you testing the tank, are you using the editor? If so, have you changed who owns the target that you are shooting at? You can't hurt allied vehicles in the editor.
Originally posted by Tallran:
Originally posted by Lord-Knight Fandragon:

vehicles/usa/x
vehicles/usa/m1a1

yes.

I even went through and copied and renamed all the files for the textures as well, from m1a1m to m1a1.....
Hm, I just tested cloning the M1A1M and its x/xx models, and I got it working. Though it got me thinking, how are you testing the tank, are you using the editor? If so, have you changed who owns the target that you are shooting at? You can't hurt allied vehicles in the editor.

Yes, I can 'damage' it, it just doesnt show the damage on the model. Like the tracks get blown off and they just look normal....

I renamed the tank to M1A1, I didnt just copy paste its folder. I renamed the .def to M1A1, I put it's new define in the desc.pot, I copied and renamed the texture files, I copied and renamed the x and xx files...
Tallran 5 Oct, 2020 @ 6:06pm 
I don't know what to say then, it seems like you did everything right..
Try making a Untitled-1.png that is only red and replace {diffuse "$/vehicle3/m1a1m_uaf_x#winter"} with {diffuse "Untitled-1"} in m1a1_x/base.mtl
Make sure that the .png is in the m1a1_x folder.
You should get something like this, if x models are working:
https://steamuserimages-a.akamaihd.net/ugc/1625195069393590136/68492EFD9CB93F801CDC1FAA38C5A13255967575/
Last edited by Tallran; 5 Oct, 2020 @ 6:09pm
Originally posted by Tallran:
I don't know what to say then, it seems like you did everything right..
Try making a Untitled-1.png that is only red and replace {diffuse "$/vehicle3/m1a1m_uaf_x#winter"} with {diffuse "Untitled-1"} in m1a1_x/base.mtl
You should get something like this, if x models are working:
https://steamuserimages-a.akamaihd.net/ugc/1625195069393590136/68492EFD9CB93F801CDC1FAA38C5A13255967575/

I didnt edit the .mtls. I am doing that now. But what is an M1A1M_sp? I see the bp files but not the SP...
Tallran 5 Oct, 2020 @ 6:24pm 
Don't bother with the _sp and _bp files, _sp is the shinyness of the skin, and _bp changes how high the texture detail looks. Look up specular map maps and bump maps for more info.
Just change that one .mtl file I said, and try and damage the hull without detonating the tank.
You don't need to change any of the .mtl if you are happy with the default UAF skin, this is like I said, to see if x models are working at all, as they are really similar to the regular skin.
Originally posted by Tallran:
I don't know what to say then, it seems like you did everything right..
Try making a Untitled-1.png that is only red and replace {diffuse "$/vehicle3/m1a1m_uaf_x#winter"} with {diffuse "Untitled-1"} in m1a1_x/base.mtl
Make sure that the .png is in the m1a1_x folder.
You should get something like this, if x models are working:
https://steamuserimages-a.akamaihd.net/ugc/1625195069393590136/68492EFD9CB93F801CDC1FAA38C5A13255967575/

Sure doesnt seem like its working. I killed it without detonating it and it is just a normal tank with a little smoke out the top.

This is what it does when I kill them and detonate them.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2249492089

The Green gun is because I was messing in the .mtl. Apparently m1's default gun color is green....derp.
Last edited by Lord-Knight Fandragon; 5 Oct, 2020 @ 6:39pm
Originally posted by Tallran:
Ok, try this:
http://www.mediafire. com/file/fpu4ynop60gnycw/USm1a1.rar/file

Huh, ok, sooooo, I did what you said you did. Simply copied and renamed files, and it seems to be working.

I guess I just did to much.
Tallran 5 Oct, 2020 @ 6:55pm 
Great!
Originally posted by Tallran:
Great!

Lol, in playing with the M1A1 version, I noticed a weird oddity.

On the M1A1M the commanders .50 is fired like a CROWS, where the crew isnt exposed. Sooo, I took the M1A2's crew position file, namely this part:


("crew_4_invisible_opengun")
("seat_4_visible_armor")

{placer
{place "driver" {visor "driver"}}
{place "gunner" {visor "main"}}
{place "commander" {visor "mgun"}{sealable}}
}

which has basically the same crew positions, and copied that into my M1A1.def.

Knowing the M1A1M has the same issue, I did the same to it.

Now, the M1A1 hatches work properly, the hatch opens and closes as people mount and dismount the gun. On the M1A1M, the gun gets manned, but the hatch doesnt open. How does it work that literally the exact same tank, just with a different name and in a different nation's folder have the hatch work on one but not the other, with the exact same setting?
Last edited by Lord-Knight Fandragon; 5 Oct, 2020 @ 10:50pm
< >
Showing 1-15 of 17 comments
Per page: 1530 50