Coder Social home page Coder Social logo

mauserzjeh / cod-asset-importer Goto Github PK

View Code? Open in Web Editor NEW
28.0 5.0 7.0 4.49 MB

Blender addon for importing Call of Duty assets

License: GNU General Public License v3.0

Python 29.23% Rust 70.77%
blender-addon blender call-of-duty callofduty cod1 cod2 cod4 coduo cod5 codwaw

cod-asset-importer's Introduction

GitHub release (latest by date) GitHub all releases

Call of Duty asset importer

Blender add-on for importing various Call of Duty assets via the game files.

Supported assets & features

  • Call of Duty & Call of Duty United Offensive
    • BSP - Compiled map files
    • XModel - Compiled models
  • Call of Duty 2
    • D3DBSP - Compiled map files
    • XModel - Compiled models
  • Call of Duty 4 Modern Warfare
    • XModel - Compiled models
  • Call of Duty 5 World at War
    • XModel - Compiled models
  • Call of Duty Black Ops
    • XModel - Compiled models

Installation & setup

First of all, extract all the necessary game specific contents. Make sure to have the exact same folder structure as they have originally.

Call of Duty & Call of Duty United Offensive

Files can be found inside the .pk3 files.

  .
  ├── maps/
  ├── skins/
  ├── textures/
  ├── xanim/
  ├── xmodel/
  ├── xmodelalias/
  ├── xmodelparts/
  └── xmodelsurfs/

Call of Duty 2

Files can be found inside the .iwd files.

  .
  ├── images/
  ├── maps/
  ├── materials/
  ├── xanim/
  ├── xmodel/
  ├── xmodelalias/
  ├── xmodelparts/
  └── xmodelsurfs/

Call of Duty 4 Modern Warfare

Images can be found inside the .iwd files. The rest of the assets can be acquired by installing modtools.

  .
  ├── images/
  ├── materials/
  ├── xanim/
  ├── xmodel/
  ├── xmodelalias/
  ├── xmodelparts/
  └── xmodelsurfs/

Call of Duty 5 World at War

Images can be found inside the .iwd files. The rest of the assets can be acquired by installing modtools.

  .
  ├── images/
  ├── materials/
  ├── xanim/
  ├── xmodel/
  ├── xmodelalias/
  ├── xmodelparts/
  └── xmodelsurfs/

Call of Duty Black Ops

Images can be found inside the .iwd files. The rest of the assets can be acquired by installing modtools. There are still some missing assets though (mostly materials and images).

  .
  ├── images/
  ├── materials/
  ├── xanim/
  ├── xmodel/
  ├── xmodelalias/
  ├── xmodelparts/
  └── xmodelsurfs/
  • Download the latest release
  • Launch Blender
  • Edit > Preferences > Add-ons > Install
  • Browse to the downloaded .zip file
  • Enable the addon by ticking the checkbox in front of its name

Usage

  • Launch Blender
  • To see import progress, information and errors
    • Window > Toggle System Console
  • To import a map
    • File > Import > CoD Asset Importer > Import map
    • Browse to the map inside the maps folder
  • To import a model
    • File > Import > CoD Asset Importer > Import model
    • Select the version of the model
    • Browse to the model inside the xmodel folder

Installation from source

Requirements

Installation

  • Clone the repository
$ git clone [email protected]:mauserzjeh/cod-asset-importer.git
  • Install dependencies
$ pip install -r requirements.txt
  • Run the build script which will create a .zip file in the release folder. Alternatively the Build & Package task can be run from Visual Studio Code
$ python setup.py build_rust --inplace --release --create-release-package
  • Launch Blender
  • Edit > Preferences > Add-ons > Install
  • Browse to the generated .zip file in the release folder
  • Enable the addon by ticking the checkbox in front of its name

cod-asset-importer's People

Contributors

mauserzjeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cod-asset-importer's Issues

COD1UO mp_ponyri

I've been having a lot of fun with the plugin, but I hit my first real error trying to open mp_ponyri .

image

I have tried many other maps, and they seemed to open just fine, although taking almost forever to load. Also noticed some missing materials, like for the vista trees on mp_foy, and also one building missing interior material on the same map.

Thanks a lot for the tool.

Cod2 map stuck on importing

Hey it's me again.

Thanks for the last update, I can now import without any error for most maps.
Actually, I imported the solo map "Moscow" without any trouble in 5 minutes.
In contrast, I am not able to load duhoc_assault or other heavier maps. The process seems to be stuck at a certain point. I tried multiple times and I let my PC run overnight without success.

Thanks

Import fail Cod2 solo map

Hello there.
I have the same problem right now with some maps on Cod2:

Traceback (most recent call last):
  File "C:\Users\cedri\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\cod_asset_importer\assets\ibsp.py", line 367, in load
    self.entities = self._read_entities(file, self.version, lumps) # entities
  File "C:\Users\cedri\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\cod_asset_importer\assets\ibsp.py", line 322, in _read_entities
    angles.x = float(a[0])
ValueError: could not convert string to float: ''
[ERROR] ibsp.py:394 None
[ERROR] importer.py:40 Error loading map: C:\Users\cedri\Desktop\COD2Master\assets\maps\duhoc_assault.d3dbsp

Great improvement btw, thanks!

Unable to load any asset other than geometry

Hello,
I'm using the latest Blender version. Map geometry seems to load fine, but I do not ever get any textures or models. The same game folder works with your other plugin. What am I doing wrong?

unable to import COD1/UO

Hello, I have not tried the latest version with COD2, but I re-extracted to a clean folder all PK3 from COD Deluxe (COD1+UO). When I try to open an mp map, i get this error

Python: Traceback (most recent call last):
File "C:\Users\GTX1060\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\cod_asset_importer\addon\operators.py", line 24, in execute
importer.import_ibsp(assetpath, self.filepath)
File "C:\Users\GTX1060\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\cod_asset_importer\addon\importer.py", line 63, in import_ibsp
texture_file = tex.removeprefix(assetpath).lstrip('/\')
AttributeError: 'str' object has no attribute 'removeprefix'

location: :-1

A question about mw2 xmodel

Sorry to disturb you. I would like to ask if you have researched the xmodel structure of mw2. Is there any relevant information that I can refer to?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.