• 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
145
66
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:

Joror

Second Lieutenant
Paradox Staff
10 Badges
Jul 23, 2012
145
66
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
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:

Joror

Second Lieutenant
Paradox Staff
10 Badges
Jul 23, 2012
145
66
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
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.
 

AvroLancaster

Major
90 Badges
Apr 29, 2011
676
104
Visit site
  • Cities: Skylines Deluxe Edition
  • Leviathan: Warships
  • Magicka
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Europa Universalis IV: Third Rome
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Rule Britannia
  • Stellaris Sign-up
  • Crusader Kings II
  • Crusader Kings II: Jade Dragon
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Dungeonland
  • Hearts of Iron II: Armageddon
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III Complete
  • Europa Universalis IV: Art of War
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Stellaris: Synthetic Dawn
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Europa Universalis III Complete
  • Stellaris: Galaxy Edition
  • Europa Universalis III Complete
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
 
  • 5
Reactions:

Celt de Brun

First Lieutenant
18 Badges
Mar 27, 2014
270
463
  • Crusader Kings II
  • Cities: Skylines - Snowfall
  • Prison Architect
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Green Cities
  • Steel Division: Normandy 44 Deluxe Edition
  • Cities: Skylines - Mass Transit
  • Steel Division: Normandy 44
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - After Dark
  • Cities: Skylines
  • Darkest Hour
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
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.
 

Galle

Lt. General
70 Badges
Apr 20, 2009
1.667
1.084
  • Hearts of Iron II: Armageddon
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Sword of the Stars II
  • Sword of the Stars
  • Sengoku
  • Rome Gold
  • Victoria: Revolutions
  • Majesty 2
  • Magicka
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III
  • Europa Universalis III Complete
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Deus Vult
  • Ancient Space
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • BATTLETECH
  • Crusader Kings III
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Tyranny: Gold Edition
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Warlock 2: The Exiled
  • Warlock: Master of the Arcane
  • Victoria 2
  • Europa Universalis III Complete
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.
 

Joror

Second Lieutenant
Paradox Staff
10 Badges
Jul 23, 2012
145
66
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
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.
 

Joror

Second Lieutenant
Paradox Staff
10 Badges
Jul 23, 2012
145
66
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
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.
 

Sifaus

Second Lieutenant
92 Badges
Jan 30, 2011
199
44
  • Europa Universalis IV: Third Rome
  • Shadowrun: Dragonfall
  • March of the Eagles
  • Europa Universalis III Complete
  • Cities: Skylines - Green Cities
  • Tyranny: Gold Edition
  • Crusader Kings Complete
  • Sengoku
  • Cities: Skylines - Mass Transit
  • Teleglitch: Die More Edition
  • Tyranny: Archon Edition
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines Industries
  • Warlock: Master of the Arcane
  • War of the Roses
  • 500k Club
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Magicka: Wizard Wars Founder Wizard
  • Pillars of Eternity
  • Magicka 2
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Shadowrun Returns
  • Europa Universalis IV: Rule Britannia
  • Tyranny - Bastards Wound
  • Cities: Skylines - Natural Disasters
  • Shadowrun: Hong Kong
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Mandate of Heaven
  • Steel Division: Normand 44 Sign-up
  • Hearts of Iron IV: Together for Victory
  • Darkest Hour
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Golden Century
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Surviving Mars
  • Age of Wonders III
  • Tyranny - Tales from the Tiers
  • BATTLETECH
  • Hearts of Iron IV: Cadet
  • Surviving Mars: Digital Deluxe Edition
  • Europa Universalis IV: Cradle of Civilization
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. >_<
 

ngppgn

Field Marshal
19 Badges
Jan 29, 2011
3.508
654
  • Crusader Kings III
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Res Publica
  • Crusader Kings II
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Conquest of Paradise
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Crusader Kings II: The Old Gods
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.