Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

IWTE - convert M2TW siege engine to RTW

From TWC Wiki
Jump to navigationJump to search
Rome:Total War & Remastered - Modding Index


IWTE
IWTE main page

Useful Reference:


This article will demonstrate how to convert the M2TW catapult for use in RTW or Rome Remastered. Other siege engines should be able to be converted using a similar process, but the Trebuchet will have particular problems due to the multi-weighted rope which is not possible in the Rome engines.

It's recommended that you first add a new unit to the game by copying the closest existing siege_engine and re-naming it and a copy of its skeleton, check that works in game before proceeding to convert the required parts from M2TW.

Getting the M2TW components into Blender

Open M2TW descr_engines.tx and descr_engine_skeleton.txt to find the components used for the siege engine you want.

For the catapult:

  • siege_engines/catapult.mesh

is used with:

  • engine_skeleton catapult

which uses:

  • catapult_default.CAS
  • catapult_idle.CAS
  • catapult_fire_recover.CAS
  • catapult_attack_idle.CAS
  • catapult_fire.CAS

Follow the instructions here.

Select in turn the siege engine mesh, the default and one action animation. You can import the .dae created to Blender at this stage but it is better if you add all the animations to the file. Siege engines only use a few animations so it is practical to have them all in one file for conversion.

look in your iwte_tasks folder and you will see a task file called iwte_mesh_to_dae_catapult_task.txt - open and edit this to add the additional animations in a logical sequence, e.g.

<task_id>                                           mesh_to_dae                                                          #  
<mesh_file_full_path_in>                            "I:/M2TW/Medieval II Total War/data/siege_engines/catapult.mesh"     #  
<mesh_type>                                         siege                                                                #  
<directory_out>                                     J:\IWTERomeRemastered\IWTE_v21_07_plus/to_dae                        #  
<dae_file_name_out>                                 catapult.dae                                                         #  
<create_text_file>                                  no                                                                   #  
<create_task_file_from_input>                       yes                                                                  #  
<task_file_full_path_out>                           J:\IWTERomeRemastered\IWTE_v21_07_plus/IWTE_tasks/dae_to_mesh_catapult_task.txt   #  
<cas_file_full_path_in_default>                     "I:/M2TW/Medieval II Total War/data/animations/engine/catapult_default.cas"   # 
<cas_file_full_path_in_action_list>                 "i:/m2tw/medieval ii total war/data/animations/engine/catapult_idle.CAS"   #  
"i:/m2tw/medieval ii total war/data/animations/engine/catapult_fire_recover.CAS"   #  
"i:/m2tw/medieval ii total war/data/animations/engine/catapult_attack_idle.CAS"   #  
"i:/m2tw/medieval ii total war/data/animations/engine/catapult_fire.cas"   #  

Now run this revised task file - import the .dae to Blender - run the anim and check it behaves as expected - if it does anything odd check you listed the animations in a logical order and check you didn't add any animations that aren't actually used in game (some of those are broken).

Adjusting the model to suit RTW/RR

You will need to ammend the model so that all mesh pieces are only weighted to one bone (in a similar way to primary_weapons for units) - this will mean you may need to re-design elements that were designed to stretch between bones! Initially select everything in Weight Paint mode and 'limit total' so you only have one bone per vertex. Then in edit mode select each bone vertex group, use 'select' to get the mesh pieces highligted, hit P for separate command, and separate selection. The buttons needed are shown in the picture below:

Splitting.jpg

Repeat for all bone vertex groups, anything left after this process needs to be deleted or re-assigned to a single bone.

Change the name of the material to your desire texture name with _tga at the end (if you need the alpha layer to be useable in RTW you need to prefix the texture name with ## - as .dae files do not handle # or & well, you need to use IWTE conversion method start the name with hh_ to get ## added to the name and ha_ to get #& added!)

Wheels of siege engines are turned when the engine moves by hard-coded effects related to their bone names, the names for this are different in M2TW the format bone_Rwheel01 works, for RTW/RR you need to change the bone names to bone_wheel 01 with a space between bone_wheel and any sequence number. Alter this by simply renaming the bones in the Armature in Object mode. See the picture below:

Rename-bones.jpg

Before export to .dae (collada) you need to check that the animation frame length is greater than the end frame position shown in the return task file you also need to have 'Anim' 'KeepKeyframes' and 'All Keyed Curves' checked when you export to .dae

Converting from .dae to RTW/RR

To get a RTW/RR .cas file with matching animations back you need to adapt the dae_to_mesh_catapult.txt that IWTE wrote when you ran the previous task

The top line needs to be changed from

<task_id>                                           dae_to_mesh  

to

<task_id>                                           dae_to_cas  

and

<mesh_file_name_out>                                catapult.mesh 

to

<cas_mesh_file_name_out>                            catapult.cas 

The lines for mesh_type and mesh_textures should be deleted and if you have all the anims combined into the one file the cas_skeleton_name_list section can be deleted.

The result for the catapult would now look like:

<task_id>                                           dae_to_cas                                                         # 
<dae_file_full_path_in>                             j:/iwteromeremastered/iwte_v21_07_plus/to_dae/catapult.dae     # *.dae file to read in. i.e. change to collada name exported from Blender
<directory_out>                                     j:/iwteromeremastered/iwte_v21_07_plus/from_dae                # directory to put new created files
<cas_mesh_file_name_out>                            catapult.cas                                                   # model file to be created
<skeleton_scale>                                    1.0000                 # skeleton scaling
<overlap_frames>                                    no                     # overlap frames selection used to create the dae (not used on import)
<cas_file_types_out_list>                           body                   # types of cas files to be created (in sequence)
<cas_file_name_out_default_list>                    catapult_default.cas                        # cas default files
                                                                                                 
<cas_file_name_out_anim_split_list>                 # cas anim files start and end frames
"catapult_idle.cas"                                     1    6                                                          
"catapult_fire_recover.cas"                             7  225                                                          
"catapult_attack_idle.cas"                            226  231                                                          
"catapult_fire.cas"                                   232  298                                                          
#<end_frame>                                        298                                                             # Last animated frame (use to see full animation in blender)

Run the revised task file and you should find the .cas files for the model and the animations in your from_dae folder.

Place the model .cas file in models_engine and the animation .cas files in animations/engine - IWTE will not have produced a default.cas as this is not required when the model is in .cas format (the model stores the default bone positions).

Change your EDU descr_engines.txt and descr_engine_skeleton.txt to use the appropriate component names

Add your new texture to models_engine/textures - M2TW textures can be converted to .dds using IWTE and then renamed to .tga.dds for RTW/RR.

YOU can help us improve this Wiki! ~ Look for ways to help and editing advice. ~ If you need further advice, please post here.