Spot fx animations and effects
Effects such as smoke, or animated effects such as the gatehouse flags are added to RTW and Rome Remastered using the spot_fx system.
Spot_fx
The spot_fx is a .cas model which gives the location and rotation of the effect - the name of the mesh/es inside the .cas match the name of the effect to be called. If you need two versions of the same effect you'd use 'smoke00' and 'smoke01' etc.
The blacksmiths and armourers have examples of spot_fx using smoke. The .cas is added to the buildings dbb listing after the physical_info line:
barbarian_armourer { stat_cat medium_wooden localised_name barbarian_armourer level { min_health 1 battle_stats item barbarian_armourer physical_info info_barbarian_armourer.cas spot_fx barbarian_armourer_spot_fx.CAS }
The gatehouse buildings have examples of spot_fx files which call animated 'models_spot' which give the animated flag effects.
The .cas files for spot_fx are placed in data/models_building/spot_fx.
Models_spot
Data/models_building/models_spot/flag_horizontal_large.cas is an example of an animated spot effect. The flag uses an armature and keyframes that are contained in the same file as the model, and does not use an external skeleton.
The models_spot need to be added to the game in the same way as building items. The existing ones are found in data/descr_items/di_spot_items.txt. The horizontal flag is coded as:
type flag_horizontal_large lod max_distance 200 model_anim models_spot/flag_horizontal_large.CAS lod max_distance 4000 model_rigid models_spot/flag_horizontal_large_low.CAS
Note that the model_anim setting is needed for the high lod to use its animation. The model_rigid version is provided to stop the game having to animate the object when out of viewing distance.