Error creating a 3D assets mod

Ask, comment, read.
PascalCase
First Lieutenant
Posts: 12
Joined: Tue May 04, 2021 6:43 pm

Re: Error creating a 3D assets mod

Unread postby PascalCase » Wed Sep 15, 2021 11:58 am

It's really simple. First go to the folder containing prep.exe. Type 'cmd' where I've drawn an arrow (path line? address window? whatever it's called) and hit enter:
01_LI (2).jpg


This should open the command line tool for your folder so you won't have to navigate yourself:
02_LI.jpg


Now just enter prep with your arguments and you should be done:
03_LI.jpg


It should have worked as long as you only get INF (information) and WAR (warning) messages.
You do not have the required permissions to view the files attached to this post.

TheLastSterling
First Lieutenant
Posts: 10
Joined: Sat Apr 04, 2015 6:26 am

Re: Error creating a 3D assets mod

Unread postby TheLastSterling » Sun Sep 19, 2021 10:05 pm

It appears the problem is this. yet checking I do have the file in the folder path.

Code: Select all

WAR Could not find module 'D:\Games\steamapps\common\Unity of Command 2\lib\pyassimp\assimp.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Traceback (most recent call last):
  File "E:\Env\Py38\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 40, in run
  File "E:\Env\Py38\lib\site-packages\cx_Freeze\initscripts\Console.py", line 37, in run
  File "prep.py", line 447, in <module>
  File "prep.py", line 166, in execute
  File "prep.py", line 224, in models
  File "E:\code\uoc2\tools\prep\models.py", line 20, in <module>
  File "E:\code\uoc2\tools\model_tools.py", line 7, in <module>
  File "E:\Env\Py38\lib\site-packages\pyassimp\__init__.py", line 1, in <module>
  File "E:\Env\Py38\lib\site-packages\pyassimp\core.py", line 213, in <module>
  File "E:\Env\Py38\lib\site-packages\pyassimp\core.py", line 217, in AssimpLib
  File "E:\Env\Py38\lib\site-packages\pyassimp\helper.py", line 149, in search_library
pyassimp.errors.AssimpError: assimp library not found

PascalCase
First Lieutenant
Posts: 12
Joined: Tue May 04, 2021 6:43 pm

Re: Error creating a 3D assets mod

Unread postby PascalCase » Mon Sep 20, 2021 12:14 pm

The installation path is 'D:\Games\steamapps\...', that's fine. But why does it look for the .py files in 'E:\code\uoc2\...'? Strange, isn't it?

The warning msg is asking for the missing assimp.dll OR one of its dependencies (which are other .dlls). I guess it's missing a library which is required for modding but not for playing the game. Python was already installed on my system, so that's why you get an error and I didn't. So you could try installing Python and see if this fixes the error.

Might be something else entirely though, I have no idea ;). So if one of the devs reads this, please feel free to correct me.

TheLastSterling
First Lieutenant
Posts: 10
Joined: Sat Apr 04, 2015 6:26 am

Re: Error creating a 3D assets mod

Unread postby TheLastSterling » Tue Sep 21, 2021 4:53 am

Tried after installing python, same issue. I can try installing the game in the other drive and see if that works.

PascalCase
First Lieutenant
Posts: 12
Joined: Tue May 04, 2021 6:43 pm

Re: Error creating a 3D assets mod

Unread postby PascalCase » Tue Sep 21, 2021 12:04 pm

I don't think the location of the game matters. It was just strange your error msg would locate your game on D:\ but some code\uoc2 folder is on E:\.

I also checked the dependencies of assimp.dll: kernel32.dll and MSVCR110.dll, both in C:\WINDOWS\system32. Do you have the second one (MSVCR110.dll)?

If you want, you can send me your model as .zip and I'll run it on my machine.

TheLastSterling
First Lieutenant
Posts: 10
Joined: Sat Apr 04, 2015 6:26 am

Re: Error creating a 3D assets mod

Unread postby TheLastSterling » Wed Sep 22, 2021 11:39 am

As it turns out, I was missing assimp.dll and MSVCR110.dll files. After downloading and installing Visual C++ Redistributable for Visual Studio 2012 Update 4 things finally worked! Thank you for your help, I really wouldn't have figured out things if you didn't point out what the issue was each step of the way.

GreatNews.png


Yeah, now I got to adjust the height and colour saturation.

Don't mind the other units, lets just say I got a massive OCD problem looking through the unit list and seeing duplicate units with the difference being only one character missing or even capital/lower cased. Also naming inconsistency like the Italian coastal divisions; half are 'number' dot DC, and the other half 'number' dot CD

why.png


FB Bde and FBB, with FGB and FGr Bde are historically the same units.
You do not have the required permissions to view the files attached to this post.

PascalCase
First Lieutenant
Posts: 12
Joined: Tue May 04, 2021 6:43 pm

Re: Error creating a 3D assets mod

Unread postby PascalCase » Wed Sep 22, 2021 12:11 pm

Looking great, this game sure needs more way too big tanks :D.

If you're modding in a TankA, you'll also want to add a TankA.yml into the folder '/data/entity_types/unit_types' for things like faction, stats etc.
To give your unit a new name, you can add a strings.yml into 'localization/eng'.
If you want your own thumbnail for your units, add them into 'assets/surfaces/unit/TankA'.

That should be all, have fun!

TheLastSterling
First Lieutenant
Posts: 10
Joined: Sat Apr 04, 2015 6:26 am

Re: Error creating a 3D assets mod

Unread postby TheLastSterling » Fri Sep 24, 2021 5:35 am

That I already am familiar with. I got a few units added like the 31st Indian armoured division or British 61st (light) division made. I wanted a Cromwell for the British 7th armoured in Europe since they exclusively used Cromwells instead of Shermans as their battle tank.

Now that I understand things better I can see if I can replace the Sherman with a churchill in my mixed infantry division representing the 4th division in Tunisia.

Maybe a tetrarch for the 6th airborne. XD

Though, after I figure out what the start/end lines mean in the unit model file.