Jump to content

How to view/modify a model?


Slaughter

Recommended Posts

..and we need a volunteer to tell us how! So, who wants to do his duty and write us a little guide on how to extract the .vfs files, find the models (everything from aliens to buildings) and import/export them to Milkshape 3D?
Link to comment
Share on other sites

  • 3 months later...

Okay so i will explain how this process generally works, first we have to prepare some things... NOTE: I will write this step by step so if you face problems you can say "hey i got problems with step "XYZ" and i will try to answer it, i will not provide any support beyond this since its your own job to figure things out i just can tell you how you do it. :(

 

I. I assume you have AM installed :(

 

II. We need to download the official modding tools from here.

 

III. Also Download Milkshape 3d + the plugin for AM. I RECOMMEND ver. 1.66 the 171 is still buggy

---------------------------------

IV. Install milkshape3d and extract the plugin into the main folder, this will give us the ability to import/export AM gamefiles with it. (Milkshape is a 30 day limited trial)

 

V. Unpack the modding tools and create a folder in your AM directory for it called modding-tool. Generally we only need the ufovfs.exe for our task but there are also some other features and a readme so keep it.

 

VI. Our next step will be to unpack the main gamefile called gamedata, its somewhat a huge compilation of files packed into the game file format called "vfs".

For this task copy the ufovfs.exe from your modding-tool directory into the main directory of AM. Now click on START, Execute and type in cmd.

 

VII. The command window will show up, you switch to your AM directory cd games\ufo\ for example... Depending on the Speed of your harddrive this next step may take awhile, make sure your hardrive has at least 3 gb free space we will need that now. So you entered your AM root directory yet ? Yes ? ok then type in the following commandline: ufovfs x -o gamedata.vfs unpacked and press enter. The parameter X means extract data from the file, -o adds the parameter to extract to specified directory. You will see a massive ammount of files beeing extracted to the directory "unpacked" congratulations you just extracted the whole gamedata file.

 

VIII. After a short smokebreak or maybe longer if your pc is slow :) we can proceed. close the command window and have a look into your AM folder. You should see a directory called unpacked with lots of files in it. Feel free to have a look although you might get lost in the subdirectorys so on your own risk :(

 

IX. Oh you found your way back? Good no time to waste lets go to the next step.

Until now we actually didnt even start to mod anything we just managed to prepare everything so lets get started.

-----------------------------

X. Launch Milkshape 3d, click on File, Import, and scroll down to ufo_aftermath which should show up IF you extracted the plugin into the program folder.

Click on ufo_aftermath and seek your unpacked folder. In there you follow the directory tree like this: tactical\models\weapons, in this folder you will find any weapon model used ingame, seek the mp5 for example called "h_pdw-mp5_3d"

doubleclick it and it should show up in your 3d editor. Now you can modify the model, or reskin it.

 

XI. So you modifyd it and want to see it ingame ? Ok first we have to create another folder in our main AM folder, we call him "workdir" any modified gamedata you will make will be stored in there, we have to create a equal file structure to get our modded things working. You lost me right ? Ok listen remember how you got to the weapon model ? No? tactical\models\weapons\xyz.txt thats the filepath. So have you created the workdir yet? If not do it now, and create a folder tactical in it. Enter it and create a folder models. Enter it again and create a folder weapons. In this weaponfolder you can story any modified weaponmodels and ONLY weaponmodels plus mags. If you understood you may have a look into our unpacked folder again and look for some other things, you will see each type of files are strictly organized thats how the game handles its files to find them we have to give it in his own structure.

 

XII: Seek our Mp5 model again and copy it into the weapon folder, we need some

of the stored data in it for our new model.

 

At this point i have to tell you that it might be tricky, depending on what you did generally try to find a model which kinda matches the size, length of your model to have it correctly positioned. If you are unsure load in another original model and find out which matches your model most. We have to do this to get our model correctly positioned ingame, plus a correct position for the muzzleflash.

 

NOTE: If you find a model matching yours better than the mp5 use it instead and copy it to your model directory we have created. Also you may create a own texture with your favorite image editor, i will not explain this here any further just said it must be of a square format 64x64,128x128, etc... and it must be TGA file format, no matter if 24 or 32 bit. You can apply it with the material editor of milkshape maybe explained in a later tutorial :(

 

XIII. Export your modified model into the weapons directory we have made of course select ufo aftermath as type of export file!

 

XIV. Now open both files with your prefered text editior, i mostly use simply notepad :( Position both on your screen so you have a good view on them, now select your modified model and click with your mouse cursor on the line starting with "VERTS" Scroll down until the verts end marked with 2 empty lines. Select all and copy paste them into the original file. BE CAREFUL just overwrite the section from VERTS to the line PRIMITIVE_GEOMETRY_GROUPS 1.

 

XV. Select your modified file again and select COUNT until the line "end of mesh"

Copy paste it into the original file BE CAREFUL place it in between GROUP 0 TYPE_LIST and END of Group. Both Times we only need the numbers so doublecheck if you copyd too much or maybe overwrote something else.

 

---------------------------- SKIP this if you did not make a own texture.

XVI. If you edited texture you will have to rename the original TGA file to yours, also you will have to create the following filepath for the texture: tactical\textures\weapons\xyz.tga in your workdir.

----------------------------

 

XVII. Save the original file, delete the modified, dont rename it we want to replace the original model with this tutorial, making a new is abit more complicated and will not be explained here.

 

XVIII. Now copy the Ufovfs.exe into your workdir, i know we have this file all over the place now but hey im lazy i dont like switching directorys so dont worry about you can delete it anywhere but leave it in the workdir, you will need it very often :(

 

XIX. Enter your command line window again, remember start execute cmd...

enter your workdir, type in ufovfs a -z mymod.vfs.

A means add files -z compress them, create file mymod.vfs, NOTE: filename MUST contain "mod" So the game recognizes this file as a modfile, copy this file into your main AM folder and launch the game. The model should be replaced with your modified one, if you edit something else make sure you can have only one modfile in your main directory exept some im not sure about why they work, golden rule is just to have 1 modfile, simply add the data to create 1 file.

 

XX. Well thats it I hope i explained everything clearly to provide a basic walthrough of import/export modifying gamemodels ...

Link to comment
Share on other sites

  • 2 weeks later...

You may be able to change the position of hte muzzle flash by editing the PIVOT points. Most weapons have a "point-f" with two matrices. From looking at the files it looks like the non-PARENT pivot determines the flash point (the 'f' in "point-f"). The position of the pivot is normally near the muzzle on the model.

 

If you look at the RPG7 model file ("tactical\models\weapons\h_ml-rpg7_3d.txt") it also has a "point-b" which is behind the model, which could be the Blowback point for the exhaust when the weapon fires.

 

Some models (like turrets) have other pivot points which I doubt are to do with muzzle flashes but are probably related to weapon animation.

 

Fulby

Link to comment
Share on other sites

Blender supports custom importer/exporters through plugins written in the Python scripintg language. Some example scripts are here.

 

IMO someone who knows Python and can find the relevant parts of the Blender API wouldn't have difficulty making an importer/exporter for the UFO:AM format. I've give it a shot myself (good project to learn Python on) but I haven't the time at the moment (*gags Slaughter before he gets any more bright ideas*).

 

Fulby

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for this tut guys, so far so good. but i still don't get few things.

So far we learned how to...

 

1. pack/unpack game file.

 

2. plan out ur new weapon.

 

3. locate and replace data. (do i actually type: "Change ID S-PUMP to ID S-SAWNOFF") :( or what u mean is to replace S-PUMP with S-SAWNOFF? i don't get that one... and where do i get the ICON and how do i replace it with my own ICON (can render one out, but still, i need to know how to insert it in to the game).

 

4. with tut on editing data and making a new model i can pretty much make a new weapon and replace one in the game. But how do i ADD a new weapon??.. not replace but add?... and do you think it would be possible to animate a minigun?

 

5. say we do introduce a new weapon to the game, can i start off with it? or how often will AI use it in tactical missions?.. if you make a powerful weapon you probably don't want every other alien running around with it. It should be unique. I can always do reverse engineering on 68_mod but that would kill me

 

I also do 3d animation and modeling, work in Lightwave, Maya and would like to help with creating new models and textures if anyone interested, plus i'd like to learn more about moding and so on. I of course have full time job and full time g'friend :( but i can always find time.

 

Peace out B)

Link to comment
Share on other sites

Or you could help me with a small TC i was thinking about... Basically i would only need ONE working Hi-Quality armour model, the rest would be textures and icons an menu-changes....

 

The weapons system would be changed drastically, but i don't want to spoil too much.... :(

 

https://www.telusplanet.net/public/donh/April02/Syndicate-1.jpg

 

Hey, who posted this ? How does that come here?...

Link to comment
Share on other sites

Okay, few days ago my comp crashed and i had to reinstall windows and all that. I'll be working today but in the next couple fo days i have a goal. To install my 3d appz, photoshop and learn MilkShape. Of course, first thing i did after reinstalling my sys, i installed AM lol but now it's getting even more interesting. So i am all about it.
Link to comment
Share on other sites

well, i have the knowledge you need, although writing this in tutorials needs at least a whole day to make everyone understand it :( i will make one on adding new weapons since this is fairly simple, icons are little ... things but i might get persuaded to explain that also...
Link to comment
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
×
  • Create New...