Jump to content

Combat Mission: Modding tools


Recommended Posts

So, could this tool actually fix the texture stretching issues some of the models have? Without screwing up the game?

 

Theoretically yes, although the script itself wouldn't do this. To fix the stretching you would need to use this script to unpack the model files and then edit the UVs in another 3D modelling package. I say theoretically because until someone tries it we can't be sure, though my guess would be that changing just the UVs shouldn't have any effect on the model that could cause problems running the game.

 

What might cause problems is changing a model by, for example, adding or deleting vertices, depending on whether these are associated with things such as animation or simulation that rely on pre-assigned vertex identities.

Edited by Offshoot
Link to comment
Share on other sites

Try to click on "Raw" and save the file as a text file named unmdr.py.

Oh boy, oh boy, oh boy!

 

epJxZv7.jpg?1

 

Thanks sbobovyc, for the script and your help. Time to tinker.

 

Out of interest, have you looked at the mds files as well (in CM:RT they are included in a folder labelled "Skeletons")? It looks like they include the model files for infantry heads, hands and 'bodies' and I guess, from the name, also rigging info.

Link to comment
Share on other sites

And I thought it would be hard...LOL. THAT was way above my pay grade.

Damn, and I thought that was the straightforward version.

 

A simple answer to your original question is yes, this tool could enable people to fix the stretching problems likely without causing problems in game.

Link to comment
Share on other sites

Oh boy, oh boy, oh boy!

 

epJxZv7.jpg?1

 

Thanks sbobovyc, for the script and your help. Time to tinker.

 

Out of interest, have you looked at the mds files as well (in CM:RT they are included in a folder labelled "Skeletons")? It looks like they include the model files for infantry heads, hands and 'bodies' and I guess, from the name, also rigging info.

 

Offshoot, glad you were able to put my tools to good use.

Link to comment
Share on other sites

If it is possible to take an existing CM human figure model and mod it to look like some other type of unit, that might be very cool for some scenarios. I am thinking of things like Security Contractors, downed Air Crew, maybe even News Teams etc.

 

[EDIT]

 

Oh and don't forget parked car doodads! The potential for unique scenarios is endless.

Edited by Cpl Steiner
Link to comment
Share on other sites

This made me think about a discussion we had before release about fighting after nuclear/chemical/biological impact. Now we could just add gasmasks and suites, pull down all the stats in the editor and have a realistic WW3 experience.

Imagine the possibilities!

Link to comment
Share on other sites

Maybe you can add gas masks and suites, but you have to consider all the limitations, the main one concerns animations.

 

Even if you manage to change a 3d model, then it must be tweaked in its animations. Imagine making a gas mask on the face of a soldier, and then see it changing position whenever the soldier performs a given animation. Or imagine changing the volume of the soldier by giving him a NBC suit, and then see that his gun passes halh through said suit. In conclusion, 3d modelling can be used for modding, but there are many other elements to consider and the border with game developing is so close that to make a mod work well you might need to take a few months to make it, not to mention the final inability to change/correct animations, objects positioning etc. 

 

Even the flavor objects I added, thinking it was an easy peasy job, showed me how complex the real thing can be. Not only it would be needed to program the game to recognize these new flavor objects as LOS/movement blockers for their dymensions, you would also need to correct shadows and shaders bugs within them...

Edited by Kieme(ITA)
Link to comment
Share on other sites

Offshoot, glad you were able to put my tools to good use.

I've been experimenting to see what is possible regarding the models. All of the extracted obj's I have looked at have a lot of disconnected edges but if I reconnect these by merging vertices and repack them the models are messed up in-game. I'm guessing at this point that mdr_mutator expects that the vertex/face index is identical to that in the original mdr file, i.e., it can't overwrite the original index with a new, different one. Is that the case?

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for your reply sbobovyc. I'm still glad to have it as it will enable UVs to be fixed and having the models means you can sculpt high-res details for normal map generation. I was just trying to find what I could and couldn't do. Would be great to have it for vehicles but I understand how these things go, especially as I'm not sure how many people in the Combat Mission modding scene would be set up to take advantage of it.

Link to comment
Share on other sites

  • 1 year later...
On 20/06/2015 at 10:30 AM, Cpl Steiner said:

 

 

Oh and don't forget parked car doodads! The potential for unique scenarios is endless.

+1 for this. if we could get more car variations - essential for more realistic urban areas.

Shipping containers is another - low polygon count as models and add immersion to industrial areas.

is this possible please? 

Link to comment
Share on other sites

I think you'll find that out of all the games 3d objects, flavours will contain the least metadata, which is almost certainly limited to placement and rotation within the game environment. There are no animations or destruction capabilities nor do they interfere with other objects. They are therefore a good place to start for getting a modded object back into the environment.

I do have blender so once we have export capability, I will throw myself into creating models that I'd like to see. 

   

Edited by The Steppenwulf
Link to comment
Share on other sites

  • 2 weeks later...

I startet the unmdr tool, it seems to unpack/decompile or whatever the files, but there is an error message at the end : TypeError: 'float' object cannot be interpreted as an integer

Not sure at the moment if this is critical

Link to comment
Share on other sites

Quote

G:\CM-Studio\Mod Tools\MDR>unmdr.py 2inchmortar.mdr


#  2inchmortar.mdr
# number of models 2
# Start model 0x5 ##############################################################
# submodel name length 6
# submodel name b'mortar'
# Read unknown byte (always 2?): 2
# Start unknown section 0xe
Traceback (most recent call last):
  File "G:\CM-Studio\Mod Tools\MDR\unmdr.py", line 430, in <module>
    manifest = dump_model(base_name, num_models, f, i, args.outdir, not args.parse_only, args.verbose)
  File "G:\CM-Studio\Mod Tools\MDR\unmdr.py", line 169, in dump_model
    for i in range(0, 0xB0/4):
TypeError: 'float' object cannot be interpreted as an integer

The mdr ist the 2inchmortar from CMBN. All unpacked files have 0 byte. I'm using Python 3.5.2, I guess that's the problem?

 

Edited by Scipio
Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...