Jump to content

Combat Mission: Modding tools


Recommended Posts

  • Replies 199
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Yep this is easy, I'll get packaging everything up as soon as I get an hour. We're still waiting for CMmods 4 to activate though. Been waiting for weeks now to upload my new Sf2 UI mod. 

Hi guys,   I've been working on some tools for CM, and wanted to show you a cross platform tool for working with brz files. https://youtu.be/8gqYZW9HjEg

THIS!!!  @Kieme(ITA) was able to take vehicle textures (if that's the correct phrase) from CMSF1 and make them flavor objects in CMBS (see below screenshots)  If something like this could be repeated

Posted Images

  • 3 weeks later...
  • 1 month later...
On 4/7/2015 at 4:49 AM, sbobovyc said:

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

@sbobovyc you´re still around? While I could convert some flavor objects to *.obj (by unmdr) successfully, I couldn´t do in reverse with mdr_mutator. I imported and exported again in Blender so I might use different export options for *.obj files there? Or no go at all?

Example case: manhole1.mdr to manhole1.obj = ok. After exporting from blender: "python mdr_mutator.py manhole1_manifest.json". Needed files (manhole1.obj and manhole1_manifest.json) are present, in same folder than my Python3 install and its exe file.

Other question: I´m stuck with Blender 2.76 due to my WinXP OS, so can´t use your MDR im-/exporter plugin apparently mady for 2.78. Is there´s any workaround? Thanks! B)

Link to post
Share on other sites
On 7/18/2019 at 2:44 AM, sbobovyc said:

@The Steppenwulf I did some experimentation, but I don't have anything conclusive. One of these days I will get all my notes together and put them out, but for now it's best for people to experiment and share what they find. The meta data is the key to getting custom vehicles fully working since it contains data for wheels and suspensions.

same for pillbox vehicle derivative. There´s crew position data I´d like to mess with in order to improve on vulnerability in pillboxes embrasure area. Alternatively make the pillbox have a realistic size embrasure so just a single guy can shoot from that loophole. Also would be nice to have an armored plate that closes the embrasure, similar to buttoning up an armored vehicle.

Link to post
Share on other sites
  • 3 weeks later...
  • 2 months later...

I gave this a shot, but it's not working.

I edited a bolt action rifle with a new obj, have clip, muzzle and extraction. Managed to export as mdr from blender. But when I fire the game, the rifle is invisible. I'm guessing this is a texture problem. The file i have renders textures in Blender, all wood and metal. But when I go to UV editing there is nothing there. And the textures are three separate files (two for metal, one for wood).

Can someone point me in the right direction?

Link to post
Share on other sites
  • 5 months later...

With my new Win10 computer I´m about to try again. What´s the current requirements for the MDR im- and export to work? I´ve now installed latest Blender 2.83 but guess I´ve to install another pre 2.8 version?  Is the 400MB Anaconda Python install necessary or does something else work too? Thanks in advance. 🙂

Edit: Just installed Blender 2.79b and got the MDR import working as described here:

 

Edited by RockinHarry
Link to post
Share on other sites
1 hour ago, RockinHarry said:

With my new Win10 computer I´m about to try again. What´s the current requirements for the MDR im- and export to work? I´ve now installed latest Blender 2.83 but guess I´ve to install another pre 2.8 version?  Is the 400MB Anaconda Python install necessary or does something else work too? Thanks in advance. 🙂

Edit: Just installed Blender 2.79b and got the MDR import working as described here:

 

Send you PM !

Link to post
Share on other sites
1 hour ago, 3j2m7 said:

Send you PM !

Replied!

Got it all working in the meantime. I also didn´t need any external python to deal with some the batch files (which I don´t need anyway). Im- and Export MDR was what interested me basically. Started with foxhole1.mdr, bits of toyed around with transforms, then exported and could see the changes ingame. Also deleted the sandbags from object hierarchy. Yet have to check all consequences from the edited object ingame. Thus far infantry uses the edited foxhole just like they did original one.

Link to post
Share on other sites

So tinkering with foxholes didn´t yield any usable results, except some cosmetical changes maybe. That´s majorily from the way foxholes and trenches work in the game generally. As long as they can´t be pushed down below ground mesh level and infantry adapting to it there´d be no increase in protection. Infantry always adapts to the ground mesh 1m grid automatically, no matter of foxhole geometry or position changes. There´s also issues with mentioned bounding boxes. While it´s unclear if they´re used by the game engine and for what exactly, I found some data in an objects custom properties that very much looks like bounding boxes: Meta_unkn1 and 2. Thus far I figured changing data in there doesn´t yield any noticeable results for flavor objects, which seem getting a more simplified treatment from the game engine. Any non geometry data seems hard coded and determined by its class (sack, poles, etc.) I´ve yet to test on other class game objects (terrain, vehicles etc) and things might possibly a bit different. There´s indications that a buildings windows are not treated like single entities for LOS/LOF purposes, at least not if a wall has more than a single window. I suspect multiple windows are more treated like a large single window (or frame), maybe to ease the TacAI´s shooting and spotting abilities. Not sure if it´s all hard coded as well, but tinkering with window object bounding box data in the MDR file might reveal.

I now get most im- and export MDR file working smoothly. Just have all required texture files with mdr file in place in single folder. Then in Blenders object view mode select all of an objects hierarchy and there you go. Off course sticking to the game objects internal terminology and file names is another requirement.

In one experiment I "converted" a PAK/AT bunker to normal concrete shelter type successfully. I deleted the guns object hierarchy and associated crew positions. Then substituted these with ones taken from a normal shelter type bunker (leader, leader1...., gunner, gunner 1...etc). Seems to work fairly normal ingame, but there´s issues with hit- or bounding boxes. I figured same issues are with the original, unedited Pak Bunkers. So likely more of a general game problem with bunker/vehicle types (confirming many my other impressions)

So one can do lots of neat things in Blender and get them working, though with some limitations due to hard coding and other not too well known data. At least it helps understanding some the game mechanics treatment of objects a lot better. Think for now I´m filling up many the unused flavor object slots for special use in my mission designs. To remember, by change of the UI button size to smaller (mod), one can have and place at least 16 flavor objects per type. Maybe even more, but not tested.

The most usefull flavor object types seem fountain/large fountain (has high resistance and likely cover value, as well as larger map footprint), stump and maybe shelter for its larger footprint and resistance to any game unit movements. "Sacks" are almost neglected from anything, so there seems just limited use (eye candy). But one can put some sacks into fountain category to benefit from its hard coded attributes. More of usable objects are in crate category (sack staples), that can be put into fountain as well. Ah.. btw I´m working with CMBN and CMFB objects only. The other games might have more in the offers, but I don´t know.

Now I need a graphics app than can load and save type 5 BMP format used for many game objects (24 Bit + Alpha). I´d used PS7 on my old WinXP machine, but can´t get it to work in Win10. GIMP doesn´t seem to recognize that file type as well, or do I overlook something? A DDS plug-in (or app) for normal maps would also come handy. Had one working with PS7. Still can work on my WinXP machine but would prefer to have it all on my new Win10 one.

 

Link to post
Share on other sites

@RockinHarry I propose that you try to use also this little program for the alpha channel this is easy to use !

I now get most im- and export MDR file working smoothly. Just have all required texture files with mdr file in place in single folder. Then in Blenders object view mode select all of an objects hierarchy and there you go. Off course sticking to the game objects internal terminology and file names is another requirement.

 

In one experiment I "converted" a PAK/AT bunker to normal concrete shelter type successfully. I deleted the guns object hierarchy and associated crew positions. Then substituted these with ones taken from a normal shelter type bunker (leader, leader1...., gunner, gunner 1...etc). Seems to work fairly normal ingame, but there´s issues with hit- or bounding boxes. I figured same issues are with the original, unedited Pak Bunkers. So likely more of a general game problem with bunker/vehicle types (confirming many my other impressions)

So one can do lots of neat things in Blender and get them working, though with some limitations due to hard coding and other not too well known data. At least it helps understanding some the game mechanics treatment of objects a lot better. Think for now I´m filling up many the unused flavor object slots for special use in my mission designs. To remember, by change of the UI button size to smaller (mod), one can have and place at least 16 flavor objects per type. Maybe even more, but not tested.

this is the part of your text that I appreciate ! 😉 

Hope you will discover more things this is very interesting and well comented !

Link to post
Share on other sites
21 hours ago, tomcio_p@gazeta.pl said:

I tried to use Gimp to prepare mods with an alpha channel. Unfortunately, the alpha channel contained in Gimp is not recognized by the game. Freeware Artweaver Free 7 supports BMP 5 but some artifacts are visible in the game.

 

19 hours ago, 3j2m7 said:

@RockinHarry I propose that you try to use also this little program for the alpha channel this is easy to use !

thanks! I´ll try out both. 😎

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...