Changing Material names inside CMP/MAT
-
I would use FL Model Cloner.
It’s very easy to use, and makes a new copy of the .cmp file.
1. Make a copy of the old .mat file, and open the copy using UTF Editor.
2. Start FL Model Cloner, and open the original .cmp file and also scan the new .mat file to get the texture names.
The old IDs will be in red and will have an “X” next to them until you change them, then they will have a green tick (“check” in the US) mark.
3. Change the VMesh ID to a new name to suit your new ship name.
4. Change the Material IDs to new names. Don’t export yet.
5. In UTF Editor, change the Material Library names to the new names you made in step 4 in FL Model Cloner, or add new materials with the new names if you prefer. If you add, you must increase the “material count” node value.
6. Change the Texture Library node names (xxx.tga) to suit the new material names and put each of these texture file names in the corresponding Material Library node’s dt_name node.
7. Import your new textures into the texture library nodes. Don’t forget, .tga textures will be seen upside-down in the game.
8. Check carefully for mistakes and then save the new .mat file.
9. In FLModel Cloner, once you have no more red messages, click File… Export new model. Note this will only create a new .cmp file.
10. In FL Model Cloner, open the new model and also scan the new .mat file so you can see that the new texture names you made do match.
11. Open the new model in HardCMP or MilkShape or whatever you want, and look to see if your model is correctly textured.
Be aware that if you have the same material name in the new .mat file as another .mat file, the second texture will NOT be loaded - the texture from the first .mat file that is found (when the first ship appears) will be used for the new model too, because the name will already exist in FL’s texture table. This is why it is so important to use unique ship names, VMeshIDs, material names and texture names.
Like the original game, you might like to use a single .mat file for a series of ships, so that you can reduce the duplications of glass and plain materials etc.
-
“oh, he told you to search? forget it, don’t work yourself, that’s waste of time! here you have all you need, come back any time you need something, we’ll solve your problems no matter how many peeps ask for the same. your joy is what we are after, not improvement of your independence.”
yeff, fwom tuym 2 tuym eye m ghetin gwumpie, 2.
-
Well - it’s just that I didn’t find a complete guide for FL Model Cloner, and I remember it took me some time to work out the built-in help when I got started with it.
And since I was also recently criticised for being grumpy and unhelpful and for begging limelight and Stardom (STDom for short), I decided to produce this guide for those who are not native English speakers.
I’m cool!
How about you?
-
Gisteron wrote:
i like you, pal, youre the same cynical rodent as me
just wasn’t first time a thread just like this. an advice how to find the way and next post the complete solution known to the community clearly. within a conventional topic^^OK Point taken - this would have been better in a tutorial for all to find.
The problem is the search function here is not very good and the moderators don’t like to give out stickies.
Not even an ROFL button.
So I’ve posted it as a Tech Tip on EOA and here’s the link:
-
I have two examples of the “manual” way, via the XML Project.
Cloning the Eagle (for new wings).
Cloning space_police01.cmp (you’ll find a new Model Cloner here, too). -
http://the-starport.net/freelancer/forum/viewtopic.php?post_id=39468#forumpost39468
That is something that may be relevant to your interests. When I tried the Model Cloner I could not get any good results no matter what I did. Adoxa posted some sort of fixed version in that post that while I haven’t had a chance to test ingame yet, it seems to generate cmps correctly unlike the one you download off of Starport.
That whole thread is also about the subject you were asking.
-
adoxa wrote:
… (you’ll find a new Model Cloner here, too).Thanks adoxa.
But now we have a new problem - your new FL Model Cloner’s Help doesn’t work?
I’ve not experienced this problem with the name length in the old version, probably because I didn’t use longer ship names than the original file.
Anyway, I am thankful for the new version, and I’m not looking to dampen your day, really.
But I’ve had a bellyfull of incomplete and buggered up utilities.
They stress me out.
Because they promise better but don’t deliver, or cause new problems.
And it’s raining today.
And it’s the day to take down the christmas tree.
And the holidays are now really over.
And we’re back to the old routine we hoped would have ended with the old year.
It hasn’t.
If you can recompile it to work fully then that really would be great.
Bu I realise that this is probably going to be a problem for you time-wise, and this is why I am so grumpy with time-wasters who take up so much of your time with daft requests.
Thanks again, your efforts are always appreciated by this Wabbit even if I don’t gush out praise all the time.
'bye for now.
-
For example i changed the material textures by hex editor into vmeshdata .
First you see in hex what hex value have the material (45E798FE for example ) and search into hex for FE98E745 - thats how is written into vmeshref .
Then add the new material name into CRC hash code and replace the old material name with the new one.
But this method i made few times and it`s takes some time .