DAT2LTA Decompiler map

I’ve been working on this converter for a long time, and now I’m finally releasing it.
It’s written in Python and consists of just a single file. I only have basic programming knowledge, but I wanted to make it possible to convert DAT maps into LTA.

For Combat Arms, here’s how to use it:
  1. Put all the resources into the DEdit editor folder "Game" from game rez files and decrypt them.
  2. Place the maps into the Worlds folder.
  3. Put the converter into the same Worlds folder.
  4. Open a console, go to that folder, and run:

If you are using the .exe:



If you are using the .py:


The -v1 flag is required because Combat Arms uses maps with tangent and binormal.

After conversion, three files will appear in that folder:
  • mapname.lta – this is the triangulated map with UVs. It’s the main map we’ll be working with and the one that should be compiled in the future.
  • mapname_PhysicsDATA.lta – contains information from the WorldTree section. It includes a non-triangulated version of the original with correct brush properties but no UVs. I haven’t yet found a way to transfer UVs from the triangulated version to this one. What we actually need here are only the brush properties, which must be copied manually into the main LTA.
  • mapname.txt – debug information about the world, useful for identifying issues with the converter.
Important note:
  • mapname.lta stores the TextureEffect for each brush if one is present.
  • mapname_PhysicsDATA.lta stores the rest of the information.
  • mapname.txt is for debugging.

This converter also sets the properties of all brushes (RenderNode and WorldModel) to "Detail 0" and "AmbientLight 0 0 0". For these parameters, you should rather take guidance from the original leaked map JUNK_FLEA — this gives you a big advantage compared to games where no original maps are available at all. JUNK_FLEA is already publicly accessible, and I will attach it here as well.

View attachment 287421

To better understand this, you’ll need to dig deeper into the subject. For more accurate handling of objects in DEdit, I also recommend placing the additional files I’m attaching into your Game folder.

If CLIENTFX.FXF and CLIENTFX.FCF contain the up-to-date FX for the maps you’re working with, you can safely click Yes in the window:


View attachment 287420

But if those FX are missing from the files, choosing Yes will make DEdit delete the FX names from your map and they will be lost.
If you choose No, then your existing FX will stay untouched.

Another thing worth mentioning: the converter can detect occluder names. If an occluder has the default name “Occluder”, then it’s a regular one. If the name is different, it means the occluder is being used by a DynamicOccluder object.

Feel free to share and upload your own modified maps for the game — it would be great to see them. Hopefully this will give new life to Combat Arms modding.

Links:







I'm studying DEdit and I don't know anything about it. I didn't even know how to move the camera. I made some changes to the junkflea map. How can I put it in the game? to teste the map and for everyone play? and i dint understood how to texture the map, i only have the geometry, i need to unpack texture.rez and put on texture folder of my project? i wanted the junkflea textures
 
Last edited:
I'm studying DEdit and I don't know anything about it. I didn't even know how to move the camera. I made some changes to the junkflea map. How can I put it in the game? to teste the map and for everyone play? and i dint understood how to texture the map, i only have the geometry, i need to unpack texture.rez and put on texture folder of my project? i wanted the junkflea textures
For test map u need u host a server and replace them in Worlds Folder / .rez and other players should have modifed map too. DEdit cant Read Files in .rez so u need to extract them to Game Folder. ( i didnt use DEdit in this post. Textures in .rez are crypted so if DEdit crush or cant Read them u need to decrypt them to use.)
 
I’ve been working on this converter for a long time, and now I’m finally releasing it.
It’s written in Python and consists of just a single file. I only have basic programming knowledge, but I wanted to make it possible to convert DAT maps into LTA.

For Combat Arms, here’s how to use it:
  1. Put all the resources into the DEdit editor folder "Game" from game rez files and decrypt them.
  2. Place the maps into the Worlds folder.
  3. Put the converter into the same Worlds folder.
  4. Open a console, go to that folder, and run:

If you are using the .exe:



If you are using the .py:


The -v1 flag is required because Combat Arms uses maps with tangent and binormal.

After conversion, three files will appear in that folder:
  • mapname.lta – this is the triangulated map with UVs. It’s the main map we’ll be working with and the one that should be compiled in the future.
  • mapname_PhysicsDATA.lta – contains information from the WorldTree section. It includes a non-triangulated version of the original with correct brush properties but no UVs. I haven’t yet found a way to transfer UVs from the triangulated version to this one. What we actually need here are only the brush properties, which must be copied manually into the main LTA.
  • mapname.txt – debug information about the world, useful for identifying issues with the converter.
Important note:
  • mapname.lta stores the TextureEffect for each brush if one is present.
  • mapname_PhysicsDATA.lta stores the rest of the information.
  • mapname.txt is for debugging.

This converter also sets the properties of all brushes (RenderNode and WorldModel) to "Detail 0" and "AmbientLight 0 0 0". For these parameters, you should rather take guidance from the original leaked map JUNK_FLEA — this gives you a big advantage compared to games where no original maps are available at all. JUNK_FLEA is already publicly accessible, and I will attach it here as well.

View attachment 287421

To better understand this, you’ll need to dig deeper into the subject. For more accurate handling of objects in DEdit, I also recommend placing the additional files I’m attaching into your Game folder.

If CLIENTFX.FXF and CLIENTFX.FCF contain the up-to-date FX for the maps you’re working with, you can safely click Yes in the window:


View attachment 287420

But if those FX are missing from the files, choosing Yes will make DEdit delete the FX names from your map and they will be lost.
If you choose No, then your existing FX will stay untouched.

Another thing worth mentioning: the converter can detect occluder names. If an occluder has the default name “Occluder”, then it’s a regular one. If the name is different, it means the occluder is being used by a DynamicOccluder object.

Feel free to share and upload your own modified maps for the game — it would be great to see them. Hopefully this will give new life to Combat Arms modding.

Links:







Can you send me the download link for Dedit?
 
Can you send me the download link for Dedit?
 

do you have a new version of dat2lta?
 
Hey everyone,

Been using DAT2LTA85 to convert compiled .DAT maps back into .lta for editing in DEdit, and ran into an issue where imported maps had broken textures. Some showed up as tiny repeated tiles instead of the actual image, others looked warped or smudged.

Turned out to be two small bugs in the script:

  1. It was reading each texture's width/height from the wrong spot in the file. That threw off the math the tool uses to figure out how big a texture should look once it's applied to a wall, which is why you'd get that tiny tiled look.
  2. A few oddly shaped leftover triangles (normal side effect of decompiling) could cause a divide by zero, which messed up the texture placement on just those spots.
Fixed both. Maps now convert with textures at the correct size and position, matching how they look in game. Nothing changes about how you run the tool, same command as before.

I have no idea if there is a better way to fix this issue or do use DEdit in a certain way (I have no codding knowledge and just started to learn about CA related things for my own thing)
So I am pretty much roaming around the forum and looking at other things that are being done and built for CA.

Anyways, Happy to share the patch if anyone else is running into this. Thanks to the original author for building the tool, this is just a couple bug fixes on top of it.


 

Attachments

Hey everyone,

Been using DAT2LTA85 to convert compiled .DAT maps back into .lta for editing in DEdit, and ran into an issue where imported maps had broken textures. Some showed up as tiny repeated tiles instead of the actual image, others looked warped or smudged.

Turned out to be two small bugs in the script:

  1. It was reading each texture's width/height from the wrong spot in the file. That threw off the math the tool uses to figure out how big a texture should look once it's applied to a wall, which is why you'd get that tiny tiled look.
  2. A few oddly shaped leftover triangles (normal side effect of decompiling) could cause a divide by zero, which messed up the texture placement on just those spots.
Fixed both. Maps now convert with textures at the correct size and position, matching how they look in game. Nothing changes about how you run the tool, same command as before.

I have no idea if there is a better way to fix this issue or do use DEdit in a certain way (I have no codding knowledge and just started to learn about CA related things for my own thing)
So I am pretty much roaming around the forum and looking at other things that are being done and built for CA.

Anyways, Happy to share the patch if anyone else is running into this. Thanks to the original author for building the tool, this is just a couple bug fixes on top of it.


I’m honestly surprised someone forked that version. I already have a much more advanced version that’s still private. It can reconstruct the original non-triangulated geometry with around 99% accuracy. I just haven’t had the time to publish it yet.
 
I’m honestly surprised someone forked that version. I already have a much more advanced version that’s still private. It can reconstruct the original non-triangulated geometry with around 99% accuracy. I just haven’t had the time to publish it yet.
Would love to see it in action if you get the chance to share a video or the tool itself :)
 
Back