0. you need oo2core_5_win64.dll in the same folder with the tool
Its in almost any big game now, easy to find. Probably other versions will work too, if you rename them
1. you need to place the tool in your unpacked horizon folder, or better, i recommend using included ini file (just change your folder). If you use this INI - you can use the tool from any folder
Note: remove PATCH.BIN and unneeded LANGUAGE .BINs from the folder, or the tool will crash
2. first thing you need to extract is resource list.
To do this, just run the tool
. It will create a text file list. I recommend sorting this list so you can make better selections of what you want to extract. I sort it in excel. It also allows to make filters in it
3. if you want to extract some resource, runhorizon /e resourcename
4. for batch extract, create a text file with a list of what you want to extract, and runhorizon /x list.txt
5. horizon /p list.txt
- same as /x, but dump files with directory structure
Now after you extract some res, converting is simple.
Just drag resource of the EXE and it will:
- extract model if res has models
- extract textures if it has textures
- extract skeletons if it has skeletonsExtracting characters with skeleton:
1. place all parts of a character in one folder, and run horizon on all of them
2. a file called "matrices" will be created and UPDATED in the process with all the bone matrices present in all parts
3. put corresponding skeleton file to the same folder and run horizon on it
4. copy-paste skeleton into model parts so they will be complete working models
important warning! if you plan to export another model after that, DELETE that "matrices" file before doing it, or this will lead to a complete mess!Extracting robots
This is most complicated thing. Unlike characters, they have destructible parts, and these parts are connected to animation skeleton. This means, to get model fully working, 4 sources are required:
- matrices from mesh parts (same as characters)
- mesh skeleton (same as characters)
- animation skeleton (ragdoll)
- robot helper bones
you need to place all these files in the same folder:
1. mesh parts usually contained in /animation/parts/ folder
2. half of robots have 2 skeleton files: mesh_skeleton_rootbone & skeleton_rootbone
you need mesh_skeleton_rootbone
3. ragdoll is in robot template file from entities/characters/robots/templates/archetypes/ folder
4. each robot has a file called robot_modelhelpers - this one contains helper bones info
Once you have all these, you can start with convertion
Run horizon on all parts files. This will create matrices as it was before
Run horizon on template file. This will extract animation skeleton from it.
(you dont need ascii and smd files generated, delete them. They are only useful if you want to experiment with animation only)
So you have .animskel file now in the same folder.
step 3: run this:
horizon [mesh_skeleton] [animskel] > a.bat
this will create FULL horse skeleton both in SMD & ASCII and also A.BAT file
At this time you have info which robot parts are destructibles, and which are normal weighted meshes. You need to treat them differently from now on. Destructibles will be static meshes, and they are all listed in A.BAT file. All others are normal weighted meshes.
You can already use normal weighted meshes as before, but for destructibles you need to perform additional step 4.
Open A.BAT file, and replace all "_helper" strings with ".core". This probably could be done automatically on export, but the thing is, I'm not sure all helper bones will always be called the same as helper MESHES. So I'm leaving this to the users at least for now.
Run this .BAT file.
Now after running this file, if there were no errors, you will have all destructible parts property placed and weighted to correct bones.
Note: sometimes there will be destructible parts missing. This means helper bones were created for them, but later the devs decided not to have them in game.
-------------------------to load all destructible parts as one file:
Merge all ASCII files into one as text file, then copypaste skeleton into it.
Then count submeshes (it will correspond to number of "material" string)
and put a number of submeshes after the skeleton (before all the actual data).
This number will correspond to number of "material" string in all files.
Same for SMD files, just no need to count submeshes.