Preamble:
First off please note this is still in development and nothing is certain, the facts here may be right or wrong, they have worked for me however. Feel free to contest them.
This is a guide I’m writing to share some of the things I have learned over a year or so of fiddling with the warscape campaign ai which I feel a lot of people have missed or are not obvious and are thus worth sharing. It is aimed at those who have some experience of db editing and can use pfm well already, I’m not here to teach people how to mod from scratch. It largely concerns shogun which in my opinion is by far the most moddable due to the new features C.A have implemented and the numerous new easily accessible soft coded aspects of the ai. Nothing in this guide is absolute so do not take it as gospel, it is largely theory that has worked for me and remain such, please contest anything you feel is wrong or have proved wrong via research and experimentation. Most CAI values can be researched very easily by simply setting it to an extreme however there are so many researching them all would take week to do. Some values have an ambiguous effect and may well be entirely defunct as Ca moves functionality elsewhere.
My projects
UaisgII
I have left all the past versions up so you can download and see the progression from version to version if you wish (doubt anyone will bother but meh)
Uaintw
A bit on the CAI
The CAI uses a system called 'beliefs, desires and intentions' or 'BDI' to determine its decisions, this is a set of values with a small degree of randomisation that is supposed to give the ai and consistent and fairly intelligent manner. Each faction has a unique set of beliefs desires and intentions i.e. one faction may hate another or desire a certain region whoever holds it. The initial BDI is in the startpos.esf, it is theoretically editable however to my knowledge no one has yet done this. This is why at the start of many campaigns the same things often happen, units move to the same places, Oda always dies as does Shimazu. It is however possible to change the way the BDI is formed through Ca's system of tables.
Notes on format
-Tables columns will be shown in content boxes like so where possible
-The word "foo" will be used to represent a changeable or variable part of a name or value
Tools
-Pack File Manager Usage tutorial
-Taws Db converter Tutorial on use
-ESF Editor 1.4.8 Startpos modifying
-Microsoft Excel can be handy or open office which is free and will do the same job.
-Be aware that if PFM can’t open a table taws tools may be able to or visa versa
General Recommendations
-Rename every single table
-Add a visible Ui component to the main menu and save the mod pack as movie, this guarantees the mod loads and adds a visual indicator to the menu showing you that it has loaded.
-Check values by using extremes but be aware truly large values may cause instability.
-Be prepared to run a lot of test campaigns, getting the ai to do something can take a lot of tweaking.
List of CAI components
Non moddable
-The exe
Theoretically possible but practically not possible without major development
-Startpos.esf
-pathfinding.esf (and all the other map files)
Moddable
-The Database (patch(foo)/db/foo
-Scripting.lua (can be used to influence the ai but not covered here check out topcats scriptorama for more info on this)
List of CAI db tables and Index
General
-campaign_ai_personality_junctions_tables
-campaign_ai_manager_behaviour_junctions_tables
cai_personalities_tables (very very important)
May have small effects
-cdir_configs_tables
-campaign_variables_tables
Recruitment
-campaign_variables_tables
-cdir_unit_balance_template_junctions_tables
-cdir_unit_balance_group_qualities_tables
-cdir_unit_qualities_tables
-cdir_unit_balances_tables
Construction and technology (interlinked due to building research requirements)
-cai_base_building_context_values_tables
-cai_personalities_construction_preference_policy_building_junctions
-campaign_ai_technology_path_junctions_tables
-campaign_ai_technology_manager_path_junctions_tables
Finance
-cai_personalities_budget_allocations_tables
-cai_personalities_budget_allocation_policy_junctions_tables
Character devlopment
-campaign_ai_character_skill_tree_distribution_junctions_tables
-campaign_ai_character_skill_tree_manager_agent_junctions_tables
-campaign_ai_character_skill_tree_junctions_tables
Reference (some may be important with major esf modding otherwise just used to find values)
-cai_agent_distribution_profiles_tables
-cai_agent_distribution_types_tables
-cai_agent_record_to_cai_agent_type_junctions_tables
-cai_agent_recruitment_profiles_tables
-cai_agent_recruitment_types_tables
-cai_agent_type_distribution_profile_junctions_tables (this can also be used to edit behaviour hover is a crude way of doing it so is best avoided)
-cai_agent_type_recruitment_profile_junctions_tables
-cai_agent_types_tables
-cai_military_aggressiveness_policies_tables
-cai_military_behaviour_policies_tables
-cai_personalities_budget_context_types_tables
-cai_personalities_budget_policies_tables
-cai_personalities_construction_preference_policies_tables
-cai_personalities_reliability_policies_tables
-cai_personalities_religious_conversion_policies_tables
-campaign_ai_personalities_tables
-campaign_ai_managers


Reply With Quote








