|
Some answers to common questions you may have when getting started with CoD editing. I can't make any guarantees about the accuracy of these answers, but as far as I know they are correct. Shaders and surfaces - Does CoD support actual smoothing groups or are they simulated (separating faces)? To create a new shader, create a .shader file in "main/scripts". You may have to create the "scripts" directory. The syntax for shaders is exactly the same as that for shadertypes, except that the $texturename keyword is replaced with an actual texture name, and you can have several shaders in a single .shader file. The name of the shader is specified at the start, and the game's file system will think of the shader as a file in the directory you specify. Here's an example shader from CoD: // Spinning prop for planes There are a couple of things to note. The file paths are all in the "skins" directory, not in "model_export/vehicle_models/german/air", which is where they were originally created. This is because converter moves all model textures into the "skins" directory, and that's where the game looks for them. If you want your shader to reference a world texture, you'll want to put the correct directory for that, but if it's a model texture, it'll be in the "skins" directory by the time the game looks for it. The shader name is identical to the texture that was applied to the model in 3DS Max, and it references that texture. This isn't necessary but in most cases it's easier, since converter wants a texture to exist, and CoD will automatically find the shader with the same name as the texture. Call of Duty can read several types of files as textures, and looks for them in the following order: shader, dds, jpeg, tga. Thus, the stuka model references the stuka_prop texture, and converter will move stuka_prop.dds into the skins directory. When the game loads the stuka model, it'll first look for a shader called skins/stuka_prop, and since it exists. Viewmodels - Are view weapon animations for both the hand and the weapon (like the slider being pulled back when fired) all part of the same xanim file? Or are the hand's animations in a separate file from the weapon's animations? - Can I change the hands used in the viewmodel? It's easier just to change the weapon if you want to be able to use your new viewmodel with existing CoD viewmodels. We designed the system so that the texture on the player's hands changes depending on what player model he has, not on what weapon he's carrying. Thus, if you use a new hand model for your weapon, but you use it with regular CoD player models, your hands will have CoD hand textures put on it. Here's how it works. Call of Duty gets the hand model from the viewmodel, but the texture is specified elsewhere. In multiplayer the texture is specified in source_data/character_mp.gdt, in the "viewmodel" field. In single-player, the texture is specified in the level script. In both cases, the texture is specified by pointing the game at a model with the correct texture. Thus, all of the hands on the viewmodels in Call of Duty use the same texture coordinates, so that they can swap textures to match different player models (this mainly changes the look of the sleeve to match the player model's uniform). Converter and Asset Manager - How come Asset Manager only works with gdt's under the Tools directory? You're limited to making all your mods under that tools directory, instead of doing them under the an actual mod directory under Call of Duty. I'm also not quite sure how converter works. It seems it just works with only the stuff in the Tools subdirectories and compiles all the sample material that comes with the tools, when I don't want to touch that. 1) Create a subdirectory of "Call of Duty" called "game". It will create subdirectories, that's how it is meant to work. It should not create much in them though. It should convert all the Asset Manager entries you have in the folders it looks in, so will create files for all the examples we included with the tools. So I'd expect perhaps 10 (or less) files in each directory it creates (assetsrccache in Call of Duty, and aitype, info, mptype, skins, vehicles, xanim, xmodel, xmodelalias, xmodelparts and xmodelsurfs in main). It may not create all of those directories, since we didn't include examples for everything. If it creates hundreds or thousands of files in any of those directories, then there's something wrong happening. Testing your stuff in the game - How can I run a mod for SP? "C:\Program Files\Call of Duty\game\CoDSP.exe" +set fs_game mod |