Jump to content
sbobovyc

Combat Mission: Modding tools

Recommended Posts

I'd love to be fly on the wall in the BF office tomorrow morning   :P  


 

Well, if in the future we'll be able to edit the UV mapping of some models that already was enough for me. Quite a few vehicles have badly mapped parts and it'd be awesome to be able to correct that.

 

 

To be fair the main reason no one has bothered to pursue writing a script for the mdr files thus far is because there is limited benefit in doing so - for the reasons already explained. Correcting some of the UV mapping issues is certainly one, as is the creating of new special flavours (dead horses in BN anyone?)


Now a decompression tool for the .bts (game save) file format, that would really set the possibilities alight!!

Share this post


Link to post
Share on other sites

Steve, thanks for your comments. It is true that increasing triangle count will hurt performance and at the moment we are limited to model swapping. Mod tool development is a hobby and I will only use my powers for good.

If I didn't think that then this thread would not-so-mysteriously disappear :D

 

I am still figuring out the mdr format. Broadly speaking, an mdr file contains one or more objects. For example, an assault rifle will have a weapon, clip (should be magazine!), stock and some other objects. Each object has 3D data, texture and some meta data. Some of this meta data looks like 4x4 matrices. Being able to look at the 3D data is fairly straight forward while creating an mdr exporter plugin is much tougher. I have a few experiments I want to try over the weekend, so stay tuned.

Yes, the tough issue is getting all the polygons to do what they are supposed to do. Even our guys, who have been working with models day in and out for 10 years, still do things like have the turrets rotate on the wrong axis of have the tracks go backwards when the tank is going forward. Or have a hatch swing forward instead of backward. There are other things too, like flame coming from 1m to the left of the gun barrel or the tank driving 3m off the ground. Crew members who popup through the side of the hull when unbuttoned, MGs that are seemingly fired by a crewman's forehead, etc. Then there's the fussier pieces that matter big time, like a round hitting the side of a turret and going straight through because the model had it incorrectly coded as the side of the hull from an armor standpoint.

These are the kinds of mistakes made even by our guys.

Steve

Share this post


Link to post
Share on other sites

Altering the config of the ingame units must be in another catch all file instead of the models then. Probably buried and encrypted somewhere when the files are packed.

Share this post


Link to post
Share on other sites

No, it's spread out all over the place and all of it is encrypted both with our own encryption and our DRM. 7+ years and nobody has hacked that information and we're hopeful that track record will continue.

Steve

Share this post


Link to post
Share on other sites

New tool release: mdr_mutator

 

Get the tools at:

https://github.com/sbobovyc/GameTools/tree/master/CombatMission

 

Short tutorial, modding ak-74m.mdr

  1. Copy mdr, textures, and python scripts into the same directory
  2. Start a command shell in that directory
  3. In command shell, execute python unmdr.py ak-74m.mdr
  4. Import ak-74m_weapon.obj into 3ds max (uncheck flip zy-axis, retriangulate polygons)
  5. Do your UV edits
  6. Export to OBJ format, overwriting ak-74m_weapon.obj (uncheck: export materials, create mat-library, optimize vertex/normals, texture-coord, check: texture coordinates)
  7. In command shell, execute python mdr_mutator.py ak-74m_manifest.json
  8. Copy the modified ak-74m.mdr to the CM:BS Mods directory

Share this post


Link to post
Share on other sites

Glad you put this here, it is inspiring me to make some additions to the truck.  It is freshly washed, but needs some extras like this tank.  Gonna take a close look.  Maybe I could use a utility box in the back like the one here but bigger.  Thanks

Share this post


Link to post
Share on other sites

Thank you so much for your amazing work Sbobovyc! Quick question - are you (or any other contributor) aware of any good and intuitive compilers that would run *.py scripts on Windows?

Share this post


Link to post
Share on other sites

Thank you so much for your amazing work Sbobovyc! Quick question - are you (or any other contributor) aware of any good and intuitive compilers that would run *.py scripts on Windows?

Thank you! I use the 32 bit version of python 2.7.9 that you can download from the official site https://www.python.org/downloads/. There are alternative python implementations, but I have not tested them.

Share this post


Link to post
Share on other sites

Hello, Sbobovyc

I tried to convert the vehicles models like M1 or Bulat from the Black Sea , but encountered an error . This version of the program supports conversion of these models ?

Share this post


Link to post
Share on other sites

&%@^ YES!

 

If you can get access to the models and UVs, you can put them in a sculpting app and generate normal maps from sculpted detail. You could put them into something like Substance Painter/Designer and texture directly on the model then bake lighting into the texture. In those Software you could generate modifiable prodecural textures that could then be reapplied easily to other models with different topologies, saving huge amounts of time (perfect for vehicles).

 

I'm really happy to see BF haven't automatically stomped on this but could understand their anxiety if this extended beyond access to just the obj data.

Share this post


Link to post
Share on other sites

Modding capabilities past scenario creation can turn a game from obscure into a hit. If anything BF should support the project. Just look at ArmA and Elder Scrolls series.

Of course I get the need to release those questionably "standalone" projects like Fortress Italy but as history shows a game with a strong modding SDK sells well for years to come (if we are to talk serious gaming - just look at Falcon 4.0 and FSX, especially FSX vs. MS Flight)

Edited by kraze

Share this post


Link to post
Share on other sites

Modding capabilities past scenario creation can turn a game from obscure into a hit. If anything BF should support the project. Just look at ArmA and Elder Scrolls series.

 

 

hear hear, but it would either make the game, or kill battlefront company.

Share this post


Link to post
Share on other sites

Modding capabilities past scenario creation can turn a game from obscure into a hit. If anything BF should support the project. Just look at ArmA and Elder Scrolls series.

 

 

Those games aren't unique, so opening them up to modders helped sales but didn't affect the developers negatively.

 

If BFC opens up CM, something that no one else does is suddenly available to lots of companies who'd like to copy it and it becomes an arcade game with all the changes modders would make.

 

As long as they are satisfied with their revenue, I want it to remain proprietary.

Share this post


Link to post
Share on other sites

Making a proper modding SDK isn't the same as selling out an engine to some devs. I fail to see how modders adding some features BF hasn't thought of yet or adding more turrets to BTR-4E will turn Black Sea into Men of War (arcade Combat Mission in essence with all the ballistics and penetration stuff).

 

Calling ArmA not unique is quite a bit of a stretch too.

Share this post


Link to post
Share on other sites

Lol, two big reasons : BFC would like to sell more content. And most of us would like to be able to play opponents without having to figure out what extra ding dongs and do dads we have to add for compatibility. Not to mention I don't really want a world where some guy creates uber turrets or uber tanks.

Oops I guess that is three reasons.

Share this post


Link to post
Share on other sites

Making a proper modding SDK isn't the same as selling out an engine to some devs. I fail to see how modders adding some features BF hasn't thought of yet or adding more turrets to BTR-4E will turn Black Sea into Men of War (arcade Combat Mission in essence with all the ballistics and penetration stuff).

 

Calling ArmA not unique is quite a bit of a stretch too.

 

If you can add a turret to a BTR-4E, then why not add a turret with quad 125mm?  If it can be done, someone will likely do it.  Arcade here we come.

 

ArmA is not particularly unique, it's a 1st/3rd person shooter, so, yeah...

Share this post


Link to post
Share on other sites

ArmA is not particularly unique, it's a 1st/3rd person shooter, so, yeah...

 

Ha, okay bub.

Modding freedom is always the way forward though. If you don't like someone's creation. Don't play it. Nobody forces you to use their mods. Simple. You can carry on to play plain jane vanilla cmbs to your hearts content.

Share this post


Link to post
Share on other sites

I belive CM games are safe from extreme and nonesense modding, because, even if someone makes a stupid model with 4 guns on a BTR, it won't work in game, because it will lack the entire programming side.

If the programming will be somehow tinkered with, good luck with all the bugs that will raise. Practically, you'd need to make a videogame, not just a mod. Therefore I don't see much harm in the future.

 

Now, what 3d modelling modding could add to CM would be:

-bug correction

-increase in polygon count increasing the quality of the models (and the computer requirements)

-additional details to vehicles and vehicle variations (no skirts, more crew objects etc.)

-improvement of textures quality/effects

-new flavor objects

-total conversions (bearing in mind the lack of programming conversion)

 

Personally, I'd like to see a new kind of tree type, such as a pine tree with the branches starting from the ground, then, a few more "modern" flavour objects.

 

Considering how long it would be for BFC to add an "official" 3d modding tools set I'd prefer them to work on effective games, the modding support we have now is good in my opinon, it might improve when the next game engine comes out. If someone is finally capable of making some 3d modding it's welcome.

Edited by Kieme(ITA)

Share this post


Link to post
Share on other sites

I tried this on some CM:Red Thunder weapon files but got a syntax error:

 

File "unmdr.py", line 4

<!DOCTYPE html>

 

I don't have Black Sea to test if I have the process right. Otherwise I guess it is possible that this won't work for mdr files from earlier CM titles, especially as you have to modify the program to work with the different model types. Has anyone used this successfully with other CM games?

 

I was using the 64 bit version of 2.7.9 on Windows 7 64 bit.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×