• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Joror

Second Lieutenant
Paradox Staff
10 Badges
Jul 23, 2012
156
349
twitter.com
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Stellaris: Megacorp
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Sign Up
Hi CK2 modders, this is a crosspost from This EU4 User mod topic, I will keep both first posts of this topic up to date. Most progress reports will probably be in that topic. Will monitor both for questions / feedback.

--------------

I've started preliminary work on a full conversion mod for EU4 last december, and made a tool for myself to assist in that.

It can read a mod (or base game) dir and show info contained in the various files.

Current version: v0.7.0 - 05-05-2015: Chrome App

  • Reads script data files: http://i.imgur.com/OeY2aQ9.png
  • View / analyze map data: http://i.imgur.com/T9z6Wo7.png
    (zoomable, draggable map a-la google maps)
  • PdxMesh Model viewer & converter! - Converts Collada models to Paradox model files to be used in CK2/EU4! [Work in Progress]
  • Export models from EU4/CK2 for tweaking & animation reuse.

    See 2nd post for how-to & examples.

EU4 just got spacey~
P9zJX2Z.png

mcuwSPE.png

upBIiHP.gif
CK2 is in on it too
IYsSynp.jpg

8B079p8.png

It is still in a very very early state, and I am adding features primarily as I need them in my own modding process.
But I thought sharing early would be good to get feedback, and maybe could assist some other modders.

In the progress of researching the possibilities for my mod I wanted to see if I could add my own models, and found out that you couldn't in EU4/CK2.
But I really wanted it for my mod, so I did some basic reverse engineering of the '.mesh' and '.anim' file format (pdxmesh).
(note: I have asked and received permission from Paradox to share this tool & specifically this mesh reader and potential converter)

Programmed entirely in javascript (angularjs + lots of javascript components) & html as a chrome app. (why a chrome app? because it is crossplatform & I wanted to experiment with it :D)

---------------

Get it as a Google chrome browser app:
JoroDox Tools

WARNING ALPHA STATE, please back up your mods/work/saves - as you should do anyhows.

Source files (GitHub):
https://github.com/DaanBroekhof/JoroDox
(feel free to fork/add pull requests)

---------------

Changelog:
v0.7.0 (2015-05-05):
- Export PdxMesh models from EU4/CK2 to Collada format.
- Experimental CSV import of data
- Editing of province data, and multiple at once

v0.6.0 (23-02-2015):
- Map province select, data view (EU4)
- More mod data loading (EU4: countries, localisation)
- Experimental localisation save
- CK2 map-shield model changing (see CK2 example below for special shaders)

v0.5.1 (09-02-2015):
- Support for multiple UV texture mappings (for shaders like PdxMeshTextureAtlas)

v0.5.0 (08-02-2015):
- PDXmesh shader & texture configuration added
- Better import of collada animations

v0.4.0 (05-02-2015):
- Added pdx animation reading & export from collada
- Can select pdx animations from same dir or subdirs

v0.3.1 (02-02-2015):
- Fixed bug in model converter where last triangle in model would have incorrect texture UVs
- Redirect on mesh conversion
- Updated about & version info

v0.3 (31-01-2015):
- Fixed texture mapping for multi-UV-per-vertex models
- Added data cache view & management in 'settings' tab

v0.2 (31-01-2015):
- Basic static Collada-to-pdxmesh converter added
- Pimped model viewer
- Refresh directory button

v0.1 (23-01-2015):
- Browse mod file structure
- Change? I just started!
- Read PDX asset files
- Read pdxmesh file format
- Read assorted image files (also .TGA)
- Load & analyze provinces.bmp, compare with definitions.csv, merge changes with existing definitions.csv
- If you have a 'map/seas.png' file with only your sea provinces, you can auto-generate the 'sea_starts' values in map/default.map
Known issues:
- Slow trees when they contain lots of data
- Some operations may hang if your mod does not contain the files the tool expects (like map files)
 
Last edited:
  • 4
Reactions:
How to convert models

For now, the tool only supports basic models, with animations with NO extra bells & whistles like: mixed materials, transparencies or weapon attachment points.

  1. Have a model in the 'Collada' (.dae) model format
  2. Have the textures of the model (diffuse, normal and/or specular) as separate, single files, in the .DDS texture format, and name them {name-of-modelfile}_diffuse.dds, {name-of-modelfile}_normal.dds and {name-of-modelfile}_spec.dds.
  3. (Your specular files (shinyness) should not be black-to-white, but instead an alpha channel - convert like this: http://superuser.com/questions/173194/converting-grayscale-shades-into-alpha-channel. No shinyness wanted? Use a fully transparent image.)
  4. Install the JoroDox chrome app (see link above) and open it
  5. In the top 'Settings' tab, select your mod dir (or just any dir containing your model files)
  6. In the 'Explore' tab select your collada model file. You should get a basic 3D model viewer, with textures working
  7. Press the 'Convert to .mesh' file
  8. Open the created '.mesh' file in the JoroDox, you should see a similar model. (textures might be crappier, DDS support is so-so)
  9. Voila, you got a model!
  10. Configure the use the model in EU4/CK2 (see examples below)
  11. IMPORTANT CK2 NOTE - The current CK2 version has a bug in the 'standard' pdxmesh renderer - make sure to include the 'gfx/FX/pdxmesh.lua' file from the demo mod below which has a fix

How to use models

Animation import notes:
  • The Collada import requires 30 frames per second for animation. 3DMax: Use 'sample frames' when exporting or, Blender: sample frames in between (use sample keyframes action).
  • If your animation file cannot be found, or you added a model with bones, but did not configure an animation, the game will copy another semi-random animation to your model. Always look in 'Documents\Paradox Interactive\Europa Universalis IV\logs\error.log' if you see weird animations.

Tips & tricks:
  • You can tweak the scale of models in the config files on various places - your model might be too small to see
  • Keep your models simple before you export them to Collada
  • I haven't tried this with may types of models, so bugs probably galore. Provide feedback where you encounter things.
 
Last edited:
Wait so you found a way to include your own models?

Indeed. :) Currently only static models (things like static map objects & buildings), but working on the animation files too.

This tool can read and partially write the .mesh and .anim files used in EU4, and CK2 (since Charlemagne).
(The .xac files used in CK2 before that it cannot read or write)

Imports Collada (.dae) model files and exports .mesh files at the moment.
 
  • 1
Reactions:
Indeed. :) Currently only static models (things like static map objects & buildings), but working on the animation files too.

This tool can read and partially write the .mesh and .anim files used in EU4, and CK2 (since Charlemagne).
(The .xac files used in CK2 before that it cannot read or write)

Imports Collada (.dae) model files and exports .mesh files at the moment.

You are basically Jesus
 
  • 6
Reactions:
Indeed. :) Currently only static models (things like static map objects & buildings), but working on the animation files too.

The majority of folks are probably going to push you and push you and push you to get Animation files going as fast as you can, so that can start adding new military units for historical mods or in the case of some more ambitious mods, so they can change sailing ships to space ships.

However, even this development will have huge ripples in what people are modding. I, for example, am working towards a Cyberpunk mod for CK2, and possible ability to change the vanilla medieval towns into skyscrapers will make a work of difference.

Good work man; this has the makings of a game-changing development for Paradox mod makers, which are already at a very high standard.
 
The majority of folks are probably going to push you and push you and push you to get Animation files going as fast as you can, so that can start adding new military units for historical mods or in the case of some more ambitious mods, so they can change sailing ships to space ships.

Even static models are an enormous improvement over what was previously possible. We're going to try to get that particular change made ASAP.
 
About the seas.png... I think that CK2 doesn't uses sea_starts since 2.1

Otherwise, youmight be a mesiah, indeed!

Yeah the seas.png (an provinces.png with only the seas) is more a thing for my own mod, where I was playing with flexible seas (long story) - you can ignore that button for most normal mods.
 
The majority of folks are probably going to push you and push you and push you to get Animation files going as fast as you can, so that can start adding new military units for historical mods or in the case of some more ambitious mods, so they can change sailing ships to space ships.

However, even this development will have huge ripples in what people are modding. I, for example, am working towards a Cyberpunk mod for CK2, and possible ability to change the vanilla medieval towns into skyscrapers will make a work of difference.

Good work man; this has the makings of a game-changing development for Paradox mod makers, which are already at a very high standard.

I kind of figured that people would like to use the unit models too, and that is also something I will do for my own mod so it is on the top of the list. Will first explain how to do the static models before doing the rest tho. :)

Luckily I got some time on my hands next week to do some extra work.
 
Will first explain how to do the static models before doing the rest tho. :)
I'm looking forward to this! I'll probably open a thread to pump 3d models into the game.

Also, it will be possible to mess with HoI3 models too, if they are in same or similar format, right? If so, I can finally resume my mod. >_<
 
I'm looking forward to this! I'll probably open a thread to pump 3d models into the game.

Also, it will be possible to mess with HoI3 models too, if they are in same or similar format, right? If so, I can finally resume my mod. >_<

I think that sadly previous games use only the unmoddable .xac files, sadly.

By the way, to get things completely clearly, has Padarox just given the permission to distribute the tool, or have they also assured permission to distribute whatever results we may achieve by using them. I remember an art guy from Pdox back in the EU3 era posting a tutorial about how to retexture unit sprites but stating that those retextures could only be for personaly use.