Custom Leaderhead Development Thread

I got a little off-topic question:
How do you convert a nif+kf Model to a WORKING fbx with Blender and nif script?
I mean,i can only import one file at a time with blender and the model is divided in many files (nif,kf,and kfm)
So which file should i choose to import the entire model with all the animations included?
 
I got a little off-topic question:
How do you convert a nif+kf Model to a WORKING fbx with Blender and nif script?
I mean,i can only import one file at a time with blender and the model is divided in many files (nif,kf,and kfm)
So which file should i choose to import the entire model with all the animations included?

you import the nif with the kf (animation attached) then export the FBX. you'll have to do it for each animation though to generate different animation gr2 files but you only need one base model gr2
 
yea came out a little messed up in the game. but im more then sure its because I may have done something wrong when exporting from 3ds. The main problem is getting the animations to work now.



you can see them laying down on the floor over there lol
 
Hello all!

I've been struggling about what to do with the animation fix I have here in this DLL, especially now it is the only thing getting in the way of full unit modding. Distributing it was out the question, but I think I've found a nice compromise:

http://www.theindiestone.com/lemmyandbinky.com/civ2/Civ5NexusAnimBugFix.zip

Here is a patch that does not contain any Firaxis owned materials, that will simply tweak the DLL file on your end. Back up your Civ5NexusModes.dll in steam/common/civ 5 sdk/nexus/x86/plugins if you wish (though it's easy to re get it off steam should anything go amiss)

Please note this is not in any way affiliated with Firaxis or 2K Games, use entirely at your own risk!

This completely solves the 5k empty animation bug, and with this fix we have managed to get perfectly functioning animations exported through nexus. Enjoy!

With this, and the material transfering program, you should technically be able to add completely new units in mods now.

Though it may be some work!!! ;)

(Note, when the official tools update, it should just overwrite this automatically with their own fixed version. If for some reason this doesn't happen, you can just delete the plugin directory and in the SDK options on Steam 'Verify Integrity of Local Cache' and it will redownload the latest version. This can be used to revert this change, too)
 
As a side note, I think I've figured out what the issue is with the material editor. It's tantalisingly close but unfortunately due to the fact the bug is in a DLL that, from what I can see, there is no possible way for me to change (it contains the non-managed granny SDK so as such is un-disassemblable, or rather, un-reassembleable since the disassembled intermediate language is missing all the embedded native code)

FWIW: the problem appears to be in Fixaxis.Framework.Granny.FGXParameterSet.AddParamter in the Firaxis.Framework.Granny.Implx64 / Win32 dlls. It's a method that adds a new parameter to a material, and I've tried using this to recreate the materials from scratch in my tool, so as to attempt to avoid the building texture transfering issues. But it's not setting various things in the granny file meaning loads of values differ from Firaxis model materials (semantics, usage, and other variables in the material). The result of these values not being set? Fully black model in Nexus. Sound familiar?

I tried exporting through nexus and adding materials, and found the generated gr2 had these same missing values. Frustrating thing is if there were ANY possible way to edit that function I suspect I could fix it. Sadly there doesn't seem like I have any possible way to do this. Bah.
 
I wanted to try out converting a Civ4 unit (not worrying about animations yet) so I exported this Babylonian Archer by ambrox in a static pose as an FBX. I used the Asset Import to make a gr2 and then the material hacker using warrior.gr2 as the source. The unit appears fine in Nexus 3D View, but when I make a mod to use the unit it is invisible in game - I've tried rescaling. Any ideas what might be wrong? Why can I see the unit in Nexus but not in game? I've attached my test mod.

Spoiler :
attachment.php


Edit: The FBX file I used is here.
 

Attachments

Hm no idea :S will look into it. Will prob be thursday tho looks like, sorry. :(

Sure it's not down to the animation bug? Without any animations playing on it, it may well not be visible in game I don't know. How does it work in-game we've not explored that enough, but presumably the game will be *trying* to play idle anims and such on him and if they're not there then who knows what'll happen.

You can use the patch above to fix the animation bug in Nexus btw.
 
How do you take your new art files into your mods?

I mean, do you just put them in your mod or /art folder of your mod and build it or do you enter something special in the mod properties?
 
How do you take your new art files into your mods?

I mean, do you just put them in your mod or /art folder of your mod and build it or do you enter something special in the mod properties?

Yes...but you must also include the civ5artdefines_units.xml and civ5artdefines_unitmembers.xml and edit them to add your unit. Im not sure if the whole file is need or just a part, I havent did much digging around on that end.

I wanted to try out converting a Civ4 unit (not worrying about animations yet) so I exported this Babylonian Archer by ambrox in a static pose as an FBX. I used the Asset Import to make a gr2 and then the material hacker using warrior.gr2 as the source. The unit appears fine in Nexus 3D View, but when I make a mod to use the unit it is invisible in game - I've tried rescaling. Any ideas what might be wrong? Why can I see the unit in Nexus but not in game? I've attached my test mod.

Happened to me 2. If I create a formation of only the newly created units, then they dont work for some reason. I think this may be because of missing animations since the idle animation is being called. It does work if you place them in a group of other pre existing units as i did in the picture a few posts back.

My units are comming out all facing sideways and missing a texture for the gun since the gun and the model did not come together. It ends up putting the texture of the marine over the gun. Its not a bad look though, but i would still want the black rifle.
 
@blazekid87
So with "Yes" you mean just putting the art files in the folder? And you didn't do nothing special (except reload unit system)?


Btw: check out my "Warriors ReDesigned - Brute Version" Mod!
Basically I did what you want to do with your caveman unit.
 
All I get when I try to run this is "granny material hacker has stopped working"

Any ideas why I have failed so hard? I dropped the app in the /nexus/86 directory and it asked me for a resource path. Then it hasnt worked since.
 
I cannot get the models to face the correct way nor to be on the correct level with the ground. Their always half sunk in and missing their rifle. Even after rotating it, it still comes out facing the wrong way.



Ill keep trying to play around with it and see what I can get.
 
I have visual studio 2010 installed so I should already have the .NET Framework installed as well. I dont think thats the case. If I rotate them, Nexus picks up the change but in the game it stays the same way. Whatever the problem is, its also causing the warriors to stop animating which makes me think it has more to do with the fact I have no animations.

I will try to see if I can set up an empty animation in nexus and try to see if the warriors will start animating again.
 
Success! Building retexturing is a go!

Uploaded a new version:

http://www.theindiestone.com/lemmyandbinky.com/civ2/GrannyMaterialHackerv3.zip

Read the enclosed readme file for more info!

This one has the following changes:

1) Civ5NexusAnimBugFix.exe - Nexus animation bug fix patch. Will fix the problem with exporting animations and them all being 5k empty files. Apply this and animations will export from Nexus perfectly.

2) MaterialMapperNexusPatch.exe - another patch that, when installed, will allow the Material Hacker to finally copy and change Building textures! This is not required unless you want to edit materials on buildings, so if you're just reskinning units then ignore this.

3) To get buildings to work, you need to rename the materials to match the names of the meshes. For example if you make a wonder called MyWonder with the following meshes in it all occupying the same space within the FBX file:

MyWonder
Tree cut
HBMyWonder

The first being your wonder model, the second being a flat stencil shape on the ground (say a circle) that specifies where to avoid drawing trees if your wonder is placed on a forest tile (this one is assumption) and the third being the model of your wonder when it's half built. (It's possible you don't *need* all three, in which case just ignore the HB and Tree cut materials, but they *may* be a requirement it's unclear yet)

...and you're using the Pyramids as your base, so you select Pyramids.gr2 in the 'Source GR2' box. You should see the following materials in the Pyramid file:

Pyramid
Tree cut
HBPyramid

Load your MyWonder model into the 'My GR2' so the meshes appear in the box below. Here you can see what your meshes are called.

There is a 'rename' button now next to the materials list at the top. So rename these materials to match your meshes:

MyWonder
Tree cut
HBMyWonder

Then click on each of your meshes, and see on the right it will show all three materials are in the 'bound' list box, showing that all three materials are bound to that mesh. So select the two incorrect ones (with differing names) and click 'unbind' to move them into the top box. Once all three materials are set up, and you have substituted the appropriate textures, then you can click on the HACKIFY! button and it should spit you out your model with the correct textures set up.

This may be all that's needed to enable wonder modding as well as unit modding. We'll have to see if any more issues crop up though.
 
Awesome stuff! I'm not an digital artist, but I'm a modder and I'd love to see graphics' mods take off the ground. ;)
 
Back
Top Bottom