Converting Civ V Units to Civ IV

LPlate2

Warlord
Joined
Dec 27, 2018
Messages
299
Hi,

Can anyone advise what software would be required and what steps would need to be followed to convert Civ 5 units to Civ 4 units?
Is there a tutorial dealing with this or are there already examples of models that have been converted from Civ 5?
 
Hi LPlate2,

I’ve seen that @MightyToad was able to import Civ5 units to Civ4 and I thought maybe I had seen the conversion process explained somewhere in this thread…but that might just be my fanciful imagination – because I couldn’t find anything when I went to dig for it, sorry. Also, unfortunately MightyToad has been absent for a while :(

That’s all the info I have for now, but if I find anything else I’ll be sure to let you know. I think everyone would love to see more units imported. Good luck, I hope this helps a little :thumbsup:
 
Last edited:
So I've looked at a few of the Civ V tutorials and got a bit of advice from @MightyToad, so this is what I've learned for anyone else who wants to try and convert a model back from CIV V to CIV IV;

1) Get the Blender software sorted. Version 2.49 is the latest version you can use for doing the CIV V conversion work. (My initial unzipping of the various items didn't work out for me so I went back to just using the installers.)
a) Install python 2.6.6. Get it at https://www.python.org/downloads/release/python-266/.
b) Install Blender 2.49b. I installed using the blender-2.49b-windows application with the default settings, except I set blender installation directory for the user data location. Get it at https://www.blender.org/download/previous-versions/.
c) Install PyFFI 2.1.11. I used the installer, PyFFI-2.1.11.cedfd181.win32. I left the default settings as is, including leaving the install python 2.6 for win 32 ticked, although I unticked blender. (It did not work out for me when I previously tried with python 2.6 unticked). Get it at https://github.com/niftools/pyffi/releases/tag/pyffi-2.1.11.
d) Install the blender nif scripts. I used the installer blender_nif_scripts-2.5.9.77b0815-windows. Get it at https://github.com/niftools/blender_niftools_addon/releases/tag/blender-2.5.9.
e) Cut and paste the python files from @Deliverator's Nexus-Buddy-2-scripts-for-Blender-2.49-v12 into your .../Blender Foundation/Blender/.blender/scripts folder. Get it at https://forums.civfanatics.com/resources/nexus-buddy-2-scripts-for-blender-2-49-v10.24621/.
Having done all of the above, I had a version of Blender capable of importing and exporting both nb2 and nif files.

2) Get the Nexus Buddy software sorted. Install Nexus Buddy 2.5.3 - Granny Editor for Civlization and Beyond Earth. Get it at https://forums.civfanatics.com/threads/nexus-buddy-2-granny-editor-for-civ-5.496855/

3) Get the Civ V files you want to convert. This may involve unpacking some graphic art from Civ V or downloading something from the Downloads database. In my case, I was downloading.

4) In Nexus Buddy 2.5.3, Click "Open" and select your gr2 file. In the Additional Actions tab, click on "Export to NB2 (Current Model)". The current file info will end with "EXPORT TO NB2 COMPLETE" and you'll have your new nb2 file in your folder.

5) In Blender, select File/Import/Nexus Buddy 2 (nb2)... In the import row, select the address of the folder your nb2 file is in. The files in the folder will be listed and when you click on the nb2 file, it will populate into the row below the folders address. Hit "Import". If you're someone who knows what you're doing in Blender, you should be able to take it from there. If not (like me), then you'll need to start looking at more tutorials.

---

However, I discovered that there was way more polys in the model I wanted to convert than you'd typically see in one of our Civ IV models. I'm not sure how many is considered excessive for a unit, but I imagine this was up there. So in my case, I think I'll be better off using whatever I learn about editing in Blender to modify an existing lower poly model to achieve my objective.
 
However, I discovered that there was way more polys in the model I wanted to convert than you'd typically see in one of our Civ IV models. I'm not sure how many is considered excessive for a unit, but I imagine this was up there. So in my case, I think I'll be better off using whatever I learn about editing in Blender to modify an existing lower poly model to achieve my objective.

Generally the poly count of Civ V models isn't too much greater than Civ IV, with human units at least, because they went for more unit members per unit rather than more complexity per unit in general. Civ V Warrior has 12 individual unit members; Civ IV Warrior has 3.

In any case, most computers these days should be able to comfortably handle the poly count of both games.

I backported quite a lot of Civ Beyond Earth units to Dune Wars: Revival (e.g. these) and didn't bother lowering the poly count. The game runs fine even with many copies of those units.
 
Okay, so I decided to go back to it and try to finish a unit conversion. The nb2 will successfully save as a blend file.
When I try to export the nif, I get the error. "'skeleton root': Cannot export envelope skinning. Check console for instructions." How do I fix this? (I've tried clicking envelope on and off in the Armature box but this doesn't seem to have any effect.)
 
Even if you export the skeleton successfully what are you going to do with animations? I mean, you can't use the standard civ4 animation sets with a custom skeleton that does not conform to CIV4 specifications. And I am not sure how easy it is going to be to essentially redo all the animations to make them comply with the CIV4 layout. You might want to just want to forget the old skeleton and rejig the models to a CIV4 base unit instead.
 
Okay, so I decided to go back to it and try to finish a unit conversion. The nb2 will successfully save as a blend file.
When I try to export the nif, I get the error. "'skeleton root': Cannot export envelope skinning. Check console for instructions." How do I fix this? (I've tried clicking envelope on and off in the Armature box but this doesn't seem to have any effect.)

Which Civ V unit are trying to convert?
 
Generally the poly count of Civ V models isn't too much greater than Civ IV, with human units at least, because they went for more unit members per unit rather than more complexity per unit in general. Civ V Warrior has 12 individual unit members; Civ IV Warrior has 3.

In any case, most computers these days should be able to comfortably handle the poly count of both games.

I backported quite a lot of Civ Beyond Earth units to Dune Wars: Revival (e.g. these) and didn't bother lowering the poly count. The game runs fine even with many copies of those units.

Very interesting thread, recently started with blender 2.49b and I reached this exact stage with the polygon count, from what I can understand the issue is merely with the system used to run CIV4 and not with the game engine itself. Does that mean I can run a high poly count custom unit in CIV4? High like 5293 Vertex and 9370 Faces?
 
So I've looked at a few of the Civ V tutorials and got a bit of advice from @MightyToad, so this is what I've learned for anyone else who wants to try and convert a model back from CIV V to CIV IV;

1) Get the Blender software sorted. Version 2.49 is the latest version you can use for doing the CIV V conversion work. (My initial unzipping of the various items didn't work out for me so I went back to just using the installers.)
a) Install python 2.6.6. Get it at https://www.python.org/downloads/release/python-266/.
b) Install Blender 2.49b. I installed using the blender-2.49b-windows application with the default settings, except I set blender installation directory for the user data location. Get it at https://www.blender.org/download/previous-versions/.
c) Install PyFFI 2.1.11. I used the installer, PyFFI-2.1.11.cedfd181.win32. I left the default settings as is, including leaving the install python 2.6 for win 32 ticked, although I unticked blender. (It did not work out for me when I previously tried with python 2.6 unticked). Get it at https://github.com/niftools/pyffi/releases/tag/pyffi-2.1.11.
d) Install the blender nif scripts. I used the installer blender_nif_scripts-2.5.9.77b0815-windows. Get it at https://github.com/niftools/blender_niftools_addon/releases/tag/blender-2.5.9.
e) Cut and paste the python files from @Deliverator's Nexus-Buddy-2-scripts-for-Blender-2.49-v12 into your .../Blender Foundation/Blender/.blender/scripts folder. Get it at https://forums.civfanatics.com/resources/nexus-buddy-2-scripts-for-blender-2-49-v10.24621/.
Having done all of the above, I had a version of Blender capable of importing and exporting both nb2 and nif files.

2) Get the Nexus Buddy software sorted. Install Nexus Buddy 2.5.3 - Granny Editor for Civlization and Beyond Earth. Get it at https://forums.civfanatics.com/threads/nexus-buddy-2-granny-editor-for-civ-5.496855/

3) Get the Civ V files you want to convert. This may involve unpacking some graphic art from Civ V or downloading something from the Downloads database. In my case, I was downloading.

4) In Nexus Buddy 2.5.3, Click "Open" and select your gr2 file. In the Additional Actions tab, click on "Export to NB2 (Current Model)". The current file info will end with "EXPORT TO NB2 COMPLETE" and you'll have your new nb2 file in your folder.

5) In Blender, select File/Import/Nexus Buddy 2 (nb2)... In the import row, select the address of the folder your nb2 file is in. The files in the folder will be listed and when you click on the nb2 file, it will populate into the row below the folders address. Hit "Import". If you're someone who knows what you're doing in Blender, you should be able to take it from there. If not (like me), then you'll need to start looking at more tutorials.

---

However, I discovered that there was way more polys in the model I wanted to convert than you'd typically see in one of our Civ IV models. I'm not sure how many is considered excessive for a unit, but I imagine this was up there. So in my case, I think I'll be better off using whatever I learn about editing in Blender to modify an existing lower poly model to achieve my objective.

Cheers! Always wanted to create a mod in Civ4 while using Civ Beyond earth units ( which run on a similar engine of Civ5)
 
Okay, so I decided to go back to it and try to finish a unit conversion. The nb2 will successfully save as a blend file.
When I try to export the nif, I get the error. "'skeleton root': Cannot export envelope skinning. Check console for instructions." How do I fix this? (I've tried clicking envelope on and off in the Armature box but this doesn't seem to have any effect.)

There is a button called envelopes you need to Deselect. This always happens to me and I forget where the button is everytime. I think it is under "Editing" and "Modifiers".

Anyway CIV5 units are weird. The Mech units usually have multiple versions of the mesh packed into one file. One each for the damage states.
I usually try to find the undamaged verison and export that as an obj.
 
I tried exporting nb2 as a nif. Plate you are right, you have to select the armature, and then deselect the envelopes button. It works for me.

Like I said. I used to do that, but exporting as an obj clears all the bones and vertices weight info. Which is what we want since we are not using the CIV5 skeleton since the animations are useless AFAIK.

Once the obj is exported you can import it into the night you will want to use. Scale it to the correct size and start rigging it to the new skeleton.
 
Like I said. I used to do that, but exporting as an obj clears all the bones and vertices weight info. Which is what we want since we are not using the CIV5 skeleton since the animations are useless AFAIK.

You could convert all the Civ 5 animations via .na2 format -> Blender 2.49 -> .kf format but that is a lot more work than rigging to a Civ 4 armature and animations.
 
You could convert all the Civ 5 animations via .na2 format -> Blender 2.49 -> .kf format but that is a lot more work than rigging to a Civ 4 armature and animations.

I actually tried this with the Assyrian siege tower. The conversion took forever, and the resulting KF files were several MB in size. When I tested it in game nothing happened.
I'm not saying it is impossible. Why bother writing the plugin if it was.
If you know the secret please tell us. :)
 
Okay, so I've made some progress.

The model I want to convert doesn't line up with a standard civ 4 skeleton, so I needed to adjust my skeleton. Blender 2.49b is not very intuitive but there are loads of video tutorials out there. I found Ira Krakow's ones to be fairly clear.
Within Civfanatics, the most relevant tutorial for this reworking of the skeleton is @The_Coyote 's tutorial, which you can find through https://forums.civfanatics.com/threads/tut-animate-with-blender-and-nifscope.296286/.
To do the animation, you'll want to create your own kfm. To do this you'll want @esemjay 's KonverterFM utility. This is available at https://forums.civfanatics.com/resources/konverterfm.8747/.

Using the above I was able to create a number of kf animations, reference them in a kfm and they seem to work in game.

My main problem is that the skin texture isn't showing up in game.
I thought this would be the easy bit as the seams were all imported correctly into blender so that the existing dds file displays correctly on the unit in blender. The dds is 256*256, which I think should work fine in the game.
I expect that I'm not clicking one of the options that needs to be clicked when exporting the nif from blender.
When I try to reimport the nif back into blender, it's just the bare skeleton.
When I open it with nifSkope, there's nothing to see.

Can someone advise as to how I export a nif from blender 2.49b so that it has the correct texture?

---
On a separate note, can someone advise what settings I should use to import one of the kf I've created? I can create them from scratch but I expect that I may want to tweak some, when I see how they look in game.
 

Attachments

  • Noskin.PNG
    Noskin.PNG
    193.7 KB · Views: 154
Dear god, what IS that THING? :wow:

I have question of my own. Did you manage to convert Civ5 animations, or just modify Civ4 ones?

I haven't had a unit turn out black like that, but I have seen one dark before. That problem was having multiple materials assigned in blender. The result in nifskope had two versions of the trishape. If that is the case you could just delete the offending (black) one. Just an idea.

To really edit a kf in blender you have to import it with the nif. You import the nif like usual, and on the final window select import animations. (Browse to select the which kf)
 
I used the Civ IV warrior as my base skeleton and then stretched and repositioned the bones. I then created my own animations.
 
What did you use to record like that?
 
Top Bottom