Hegemony III: Clash of the Ancients

Hegemony III: Clash of the Ancients

Hegemony III Workshop
Post your maps and mods here ...
Learn More
Owlcoholic Feb 22, 2016 @ 8:25am
Custom Models
Hey, I've been following the development of this game for a while and will be purchasing it in the next couple of days. I'm a heavy modder and usually spend more time modding than playing games. I work as a 3D artist so that's usually one thing I love doing for games; creating new models for new units or buildings or whatever else (There always seems to be a shortage of 3D artists in modding communities so it's great to be able to help.)

One Thing I would love to know is if there is support for any kind of custom meshes. If not are they planned for the future? I saw on the Steam Store page you mention being able to mod new historical or fantasy scenarios so I assume custom models would be a necessity for that.

I know static meshes are generally easier to import but I was also wondering about units and such. Are there example units you can download to copy the skeleton for?

Sorry for all the questions, I'm just really excited at the possibilites... I would love to work on some kind of fantasy mod with Elves and such as 'cultures'.

Thanks for taking the time to read and I'm looking forward to playing around with the amazing map editor even if mesh importing isn't available yet!
< >
Showing 1-15 of 30 comments
rob  [developer] 4 Feb 22, 2016 @ 2:24pm 
We haven't really talked about mesh/animation modding much yet since it requires tools most users don't have access to, but it's definitely something we would like to encourage.

We use 3DS Max for modelling and animation along with a set of custom exporter plugins to save off the data as XNT (xml entity) files similar to the ones we've described for other mods.

You're welcome to download the exporters at https://pub.longbowgames.com/hegemony3/ModellingTools.zip and experiment with them.

The biggest hurdle right now is that we haven't written any documention yet and with 3D stuff it's often difficult to tell what's going wrong. I've posted a couple of the exporter meshes here: https://pub.longbowgames.com/hegemony3/entities_mesh_examples.zip which you can look at for reference.

Let us know if you've got any questions and when we get a chance we'll try to get some of the source MAX files posted as well for reference.


Stabby <3 haimikki  [developer] 1 Feb 23, 2016 @ 7:36am 
I'll try and get a static mesh max file cleaned up, along with the some some skin's.
Owlcoholic Feb 23, 2016 @ 3:38pm 
Thank you so much for the fast replies! I'm a Maya user but I do have access to 3DS Max as well, so I should be able to move any models across to Max for exporting. I'll let you know how I go with it once I've played around with any models.
Thanks again
Owlcoholic Feb 25, 2016 @ 7:54am 
Thank you again and I'm looking forward to the max files as well as future documentation or tutorials.
Are you planning any more video tutorials on the youtube channel?

Just a quick question. The vanilla meshes are packaged in meshes.arc I'm guessing. Opening that in notepad++ I can see the full file paths for the meshes, so if I wanted to replace a mesh I would use the path directed in the .arc file but in the mod folder in My Documents? Or would I need to make my own .arc somehow?
Sorry for the simple questions. If it would be easier I will wait until you have done a tutorial or documentation on the 3D aspects of modding. Though if I do figure some of this out I'd be happy to write up a guide to help others. Thanks!
rob  [developer] 4 Feb 25, 2016 @ 2:08pm 
I'm going to be doing another video soon about finishing off the new Macedonia map mod, but with roughly 40 new cities and over a hundred resource buildings it's taken a while to get the map caught up to the next step.

Re the arc files, they are just an optimized archive format that we use to help speed up loading. However, for modding we suggest just using the .xnt text files directly.

As far as modding meshes goes, it's not the file path that's important but rather the entity class & type which are listed at the top of the file. For example, in the 'ladder.xnt' file in the mesh examples zip I posted to the website, lines 5 & 6 read :

<class>objectmesh</class> <type>ladder</type>

and in the ladder prop file (which isn't currently posted) there's a line that says:

<mesh class="objectmesh" type="ladder"/>

which tells the ladder prop to use the ladder mesh.

To mod that mesh you can either create a new mesh xnt file with the same class/type that will override it, or you can update the prop to reference a different mesh instead. If you download the unit entity zip from the website you can see how units reference their meshes in a similar way.

All that said, so far we've mostly been working with mods/dlc that add new content rather than replacing existing content so when looking over this now I'm already seeing a few potential hurdles that we might need to fix on our end to make everything work smoothly.

Hopefully that answers some of your questions and we'll work on improving the mod support and documentation as soon as possible.
Owlcoholic Feb 28, 2016 @ 3:04am 
Thanks a lot! :)
Been doing some testing and can't seem to get a model appearing in game or in the editor yet.
Textures are working fine and replace textures as I would expect, but when I make an xnt for a model it doesn't replace that model. Right now I have in C:\Users\Amero\Documents\Longbow Digital Arts\Hegemony III\Mods\maxTest\Resources\entities\meshes\props\GREEK\ 3 seperate xnt files for the mesh_GREEK_house_short. I have a base one and 2 lods. There was originally errors when I first loaded the editor and realised I had messed up the texture paths, so I fixed them up and there's no longer errors but the vanilla models ar ejust showing up in the editor when I go to props and find the greek house short model...

And ideas?

Here's the xnt (without vertices and such to save space)

<!-- Name: -->
<!-- File: -->
<!-- Time: 08:23:22 PM -->
<!-- Date: Sunday, February 28, 2016 -->
<entity>
<class>objectmesh</class>
<type>mesh_Greek_house_short</type>

<!-- textures -->
<textureparam name="TexClr">Resources/Images/UV/props/GREEK/greek_man.dds</textureparam>
<textureparam name="TexBump">Resources/Images/UV/props/GREEK/greek_man_NRM.dds</textureparam>

<!-- indices -->
<numpolys>7478</numpolys>
<maxdimensions>1.0728 3.1529 0.7753</maxdimensions>

<mindimensions>-1.0764 -0.1813 -0.2261</mindimensions>

</entity>



Just to clarify it's just a basic t-pose warrior guy with a statue type texture :P
Last edited by Owlcoholic; Feb 28, 2016 @ 3:05am
SGZ***71 8 Feb 29, 2016 @ 4:35pm 
Good luck Flik. Look forward to your models !
Owlcoholic Mar 3, 2016 @ 4:59am 
@rob Sorry for posting yet again, but I just can't get any custom meshes to appear, the original mesh is always there even when I have an xnt with the exact same class and type as a vanilla mesh.
I'm guessing there's something stopping it from loading though I don't know what... Should I perhaps upload a mod on the workshop that has a custom mesh so you could take a look and see what the problem is?
I would just add them as new meshes though that would require editing the prop file which, as you have said, isn't posted yet. Perhaps you could post a prop file somewhere just so I can see the format and see if I redirecting the mesh helps?

And thank you *****_71, let's hope I can get them working :P
Last edited by Owlcoholic; Mar 3, 2016 @ 5:00am
Owlcoholic Mar 3, 2016 @ 5:38am 
I've been testing a bit more and tried editing the prop.arc with notepad++. I searched for any mention of the greek short house and edited the name it shows in the editor to Greek House Silly instead of short and that works. I tried changing any mention of the mesh_greek_house_short to mesh_greek_house_silly too and renamed my xnt files in my mod folder to mesh_greek_house_silly too. Now when I place the 'silly house' in the editor it's either invisible or it's not doing anything.

You said it's not about where the xnt file is but what the object and class is, so I should be able to place it anywhere in my mod folder? Is that what you mean? I've tried putting it in the filepath a few posts up as well as in the mod's root folder, in the resources folder, the entities folder and other spots but nothing is working.

I'm thinking I should give up for now until either a prop file example is uploaded or I get any further instructions. Thanks for the patience and help so far Rob and Stabby :)

Hope you can reply soon but I'm sure you are busy!
Stabby <3 haimikki  [developer] 1 Mar 3, 2016 @ 10:18am 
I'll bug Rob to see if we can drop a quick patch to fix mesh modding :)
Owlcoholic Mar 3, 2016 @ 10:50am 
Haha thank you Stabby :D
I hope I'm not sounding demanding or anything, you guys take your time :)
I'm just excited about seeing the modding potential!
rob  [developer] 4 Mar 3, 2016 @ 12:21pm 
Sorry for the slow response - juggling too many things these days :) Unfortunately for now, I think the only way to get a new mesh in the game is to create a new prop that uses it and place it in the editor. For example, if you create a new file called statue.xnt with the following code:

<entity> <type>statue</type> <class>terrainprop</class> <editorname>Statue</editorname> <editorfolder></editorfolder> <mesh class="objectmesh" type="statue"/> </entity>

and change the line in your file from '<type>mesh_Greek_house_short</type>' to <type>statue</type> so it doesn't conflict with the house then you should be able to see it.

If you run into any trouble with that, feel free to e-mail me the mod (rob@longbowgames.com) and I'd be happy to try it out here and see if I can sort out the problem.

We are also working on a 3.1.2 update that will make mesh/prop modding a lot easier but that might still be a couple days.
Owlcoholic Mar 3, 2016 @ 5:10pm 
@rob Thanks a bunch man, it's working now :D
Here's a screenshot of a couple of elven T-posers hanging out with peasants :P

Now I know how to do it I'll try and work on an interesting scene.
Looking forward to that next update too!

http://steamcommunity.com/sharedfiles/filedetails/?id=637391701
Owlcoholic Mar 3, 2016 @ 7:47pm 
Hmm certain models still aren't working...
What is the max poly count for meshes in your engine? Could be an issue with that.
It's strange though, I can get individual models working but if I have a few models in the mod folder the editor gets stuck on the loading screen.

I'll send an email with a zipped version of the mod folder which includes some textures and a few models.
Stabby <3 haimikki  [developer] 1 Mar 4, 2016 @ 11:35am 
technically 65k verts ...
Regarding textures (this is going to be weird...)

So if/when you have questions don't hesitate to ask.

Props Diffuse: RGB(A) - texclr - alpha is used for transparency and not necessary Normal: - texbumpclr - DXT5 Normal Compression (So the red channel is stored in the Alpha) - green channel is Y- (So the same as unreal if I remember correctly...) So if you're save your normals as TGA you'll have to manually copy the red channel of to the alpha and then save. Skinned Meshes You'll see in the unit def eg: unit_celtic_nakedSwordsmen.xnt <face atlas="faces" sprite="gallicFace_01"/> ... <shieldtype>rectangle</shieldtype> ... <texweapon>Resources/Images/UV/Units/weapons/weapons_celtic_diffuse.dds</texweapon> <texweaponbump>Resources/Images/UV/Units/weapons/weapons_celtic_normal.dds</texweaponbump> <detailmask> 1 <!-- red --> 0 <!-- green --> 0 <!-- blue --> 0 <!-- alpha --> </detailmask> ... <texclr>Resources/Images/UV/Units/GALLIC/celticNakedSwordsmen_d.dds</texclr> <texbump>Resources/Images/UV/Units/GALLIC/celticNakedSwordsmen_n.dds</texbump> <texdetail>Resources/Images/UV/Units/GALLIC/celticNakedSwordsmen_m.dds</texdetail> texclr Diffuse: RGBA - alpha is faction colour texbump Normal: -texbumpclr - Red channel to Alpha - Blue channel is a mask for skin - Red channel Specular Brightness ---> so the final normal map for a unit is like this: R - Specular G - Green Channel of the Normal B - Mask for skin/not skin A - Red Channel of the normal In addition Skinned meshes use vertex colour like this - Green = face (specify a face atlas) - Red = faction logo (specify whether square or rectangular) - Blue = use this other texture (follows the same rules as above. <face atlas="faces" sprite="gallicFace_01"/> Green Vert = Face Texture Diffuse: RGBA - Alpha is skin mask. No Normal. <shieldtype>rectangle</shieldtype> Red Vert = Faction Logo Diffuse: RGBA - alpha is faction colour Fixed Normal. texweapon and texweaponbump Blue Vert = Other Texture Diffuse: RGBA - Alpha is faction colour Normal - Red channel to Alpha - Blue channel is a mask for skin - Red channel Specular Brightness ---> so the final normal map for a unit is like this: R - Specular G - Green Channel of the Normal B - Mask for skin/not skin A - Red Channel of the normal texdetail: There's also a mask texture that can be used for skined meshes. If you want to have multiple faction colour masks for the units clothes. Basically it replaces the texclr's alpha. This allows you to store 4 unit faction colour alphas instead of one.
< >
Showing 1-15 of 30 comments
Per page: 15 30 50