Please register for Total War Access to use the forums. If you're an existing user, your forum details will be merged with Total War Access if you register with the same email or username. For more information please read our FAQ’s here.

Q&A about modding and future tools

Darren_CADarren_CA Creative AssemblyPosts: 295Registered Users
edited January 2016 in Assembly Kit
Thanks for everyones hard work and attention to detail in this forum helping the devs find and iron out some of the bugs in the Assembly Kit. If you've any other questions feel free to ask here and we'll get some dev responses if we can answer them.


Generic Questions

* Is it possible to mod music, ala Rome 2?
Short answer is we don't know. Attila is using the same version of wwise as Rome2 so if you use the latest modding tool it may work. The only issue is that the music triggering works in a slightly different way in Attila. It's something we can look at a fix for if there's a demand for it. I think using a mod from Rome2 and trying to get it working in Attila would be a quick test to see if it works.

* Can custom battles have scripts attached? See note 1
The lua file battle_scripted.lua gets loaded and run very early in the battle load sequence for any battle, but it’s loaded in a different environment from the main battle script file and has no access to the battle model so is of limited usefulness, unfortunately.

* Is it possible to change field battle map size?
No, afraid not.

* Is it possible to lower the hit points of officers? Currently, we use a low HP/1 HP system, but have noticed that officers seem to have extra.
Within DaVE. Land_units -> land_unit_officers -> battle_personalities -> battle_entities – edit the hitpoints value for the officer in question.

* Is there anyway to make routing units more/less vulnerable? Are there any variables related to this we can edit?
No, afraid not.

* How can we add new battles maps or settlements using Terry? The tutorials on Terry online are somewhat ironic in that they give complex information on the system, but don't tell us simply how to actually do it.
When you create a tile in Ted, a tile_map.png will be created with a colour. Change the main tile_map.png in (assembly_kit\raw_data\terrain\battles\main_attila_map) to match this colour in the places you want that tile to load.

* When cavalry charges, pulling it out tends to result in excessive casualties for cavalry. Higher than Rome II. Can you tell us which values control this in the DB or given any tips on how to fix this?
You can try increasing the units acceleration (battle_entities table) to get them out of the combat faster. There is also a field in kv_rules table called break_off_ignore_collision_time. Playing with that value may get you the desired result.

* Is it possible to mod battle AI? If so, what db tables affect the AI?
Group_formations.xml allows you to determine the formations that the AI uses. Otherwise the AI settlement graph placed in battle tiles is all you really have data-wise.


* Possibility to mod more audio (voices of units/generals, cutscene audio, etc), and not just music?
Would need a lot more of our internal tools (which are integrated into our production pipeline and includes 3rd party software) to do so. Not impossible someday, but not doable now.

* Release .pdb files for the compiled .exe files. This is mostly a help when wanting to reverse-engineer the games, and I'm not sure how much you want to endorse that. The only reason I consider it reasonable to ask is because of your previous decision to freely allow reverse-engineering of Medieval 2 Total War as long as no modified .exe files are distributed
There are pretty serious legal and security implications to this that are numerous and wide reaching. Not something we currently have any plans to do with recent or upcoming games.

* Campaign scripting documentation
Further documentation has been added to the wiki.

The scripting_doc.html file lists events that the campaign code triggers, as well as the contextual objects these events supply. These contextual objects represent object within the game, and can be queried to discover their state. They also provide access to a heirarchy of other objects that can be navigated around to discover the wider game state. Following the hyperlinks around the document to see how object types within the heirarchy link together.
The scripting.txt file lists commands that can be called on the game_interface object to modify the state of the world.

* Campaign callback for immediately before and after a battle
The lua event PendingBattle is triggered when a battle is initiated (this is roughly when the pre-battle panel is opened). A pending_battle object can be retrieved from the context and queried for information. This doesn’t mean a battle will definitely happen though – one of the participants may withdraw, or maintain siege, or similar. If only the player’s battles are of interest, it’s possible to listen for the attack or autoresolve buttons being clicked (lua event ComponentLClickUp where the context.string is button_attack or button_autoresolve), at which point a battle will definitely occur.

Post-battle, the BattleCompleted event can be listened-for. However, asking questions of the pending_battle object at this point is not guaranteed to be reliable – the characters involved may have died in battle, at which point it may not even be possible to work out which factions were involved in the battle (as all this information is only exposed through the character’s involved). This information can all be cached prior to battle (when the characters are definitely alive), and indeed a script wrapper to do this has been implemented for the next major patch.

The Attila prologue script performs some pre and post-battle processing - check the file pro_pre_post_battle.lua in data\campaigns\pro_attila.

* Functionality and callbacks for battle scripts to query a unit for current command (move order, attack order, etc) and relevant context (where it's moving, what unit it is attempting to attack)
Is_moving and ordered_position are two valid calls – but nothing more than that exists currently.


(I've added this list of bugs because they, moreso than others, affect modding. For example, the units never getting tired is a big issue in AE as fresh troops are massively stronger than exhausted ones, and with the longer battles times the issues with formations and formed attack become very obvious)
* Units in formation attack get no bonus
* "Gaps" appearing in units within formation attack after extended fighting. See note 2
* Units in formations (defensive testudo etc) move significantly after they exit combat
* Units in formation attack can "rotate" into weird angles and terrible positions
* Defending units when given no attack order never get tired
* Defending units when given no attack order are significantly worse in combat

I have passed all of these on to our QA to look in to. Though it is unlikely we will manage to fix all of these as our code effort is focused on other projects right now. However, Units in formations moving into "weird angles" has been fixed for the next patch which we will give details about soon.

Dream stuff, maybe for future games?:

* Campaign mad editor
We are thinking about it and have messaged out about this a couple times recently. It’s very hard to do. The way our engine and tools currently exist, the logic is very tied to the code, and it can’t be edited without giving out source code (see answer to question above). We want to resolve this and move towards giving something out, but this takes a lot of time. And finding the right time to do that without disrupting our internal development is tough.

* Are there any plans to allow access to the video making programme in which you create your trailers?
We have looked in to this – we have several internal tools that are required to make our trailers. A trailer is comprised of; an environment made in Terry, VFX in our VFX editor, Animation in our animation editor, animated scenes as well call them in our composite scene editor, model variants in Variant editor, etc. Each of these tools has its own quirks and dependencies. We would have to give a sub-set of these out (some are already) to make the trailers actually possible. It is something we are working towards as a long term goal though.

Note 1: I'm managed to add scripting functionality to most campaign battles by utilizing add_custom_battlefield. However, the logic determining when to remove and add these custom battlefield is complex in the campaign (callbacks for immediately before and after a battle would help for this), and there's no way AFAIK to do this for custom battles

Note 2: Guard mode ought to act a lot more like Rome 1 / Medieval 2, where soldiers help formations more dynamically, reforming into position as they get jostled around naturally and not just having every soldier move at the exact same instant into a perfect grid. This video is a perfect demonstration.
Post edited by Darren_CA on


  • Mr_JMr_J Senior Member Posts: 213Registered Users, Cakes!
    edited January 2016
    Wow thanks for that, Darren!

    So I would make some suggestions what would be really useful for modders:

    1. The documentation. I know there's wiki but it covers a little piece of modding abilities in TW games. Community tutorials sometimes not correct and they require a lot of time for exploring how to mod here and there. Also some explanation what different values mean and what do they require. Like 'weighted_cloth' shader. What it allows us to create, what it requires?

    2. Tutorials. When documentation helps to understand basics and modding possibilities the tutorials can help to understand more complex modding. Darren has started making TEd tutorials and this is really what would help to understand how to build our own battlemaps. At the moment (almost)no people who understand how to mod in Terry, for example.

    3. This one is some kind of "dream" or "fantastic" but worth to try out. You say it's complicated and hard to give us tools like campaign map, building animations tool, sound modding tools, movie/clip tools, UI etc. But wouldn't it be better to make a limited version of your internal tools. I mean your internal tools allow you to change everything. Make some limits within them so it won't result as major issues, crashes or game cheating and make community tools from them. Anyway when making community tools some parts of code could look equal?

    4. More example files. When providing us one example file it's hard to understand all sides of modding. We have building example in Attila(eastern_new_1) so we can know only how to create generic buildings but how do we know how to make walls, gates, arrowtowers? Besides we can't create animation for buildings it rly sucks.
    Or instead of example files include in BOB 'export' tools so we can take vanilla rigid_model_v2, convert it to .cs2 and through import plugin open it in 3d max.
  • Sulieman the MagnficentSulieman the Magnficent Senior Member Posts: 1,851Registered Users
    Seriously, this is the worst modding support I have seen. No patch, no news, nothing.
    Dwarf Battle cry: " For the High King and the glory of the dwarfs "
    Team Dwarves
Sign In or Register to comment.