As I mentioned earlier I wrote a program for inferring table types.
Here's DB.xsd for DBEditor with almost every table type guessed. There are only two non-empty tables missing that are I'm aware of, both of which cannot work with DBEditor anyway:
- models_building_tables (models, patch) - schema described in linked post, but it's a bit too complicated for DBEditor - you'd need to do some coding to change it
- models_naval_tables (models, patch) - schema definitely impossible for DBEditor, much more fiendish version of models_building_tables with multiple nested record types. I tried it but it's really really difficult, and even having schema it would be very hard to modify it. Good luck with hex editors if you want to give it a try.
Here's the list of all new tables (to make search function happy):
- battle_groundcover_density_maps_tables
- battle_groundcover_distribution_maps_tables
- battle_terrain_farms_tables
- battlefield_building_categories_tables
- climate_to_erosion_settings_tables
- climates_tables
- commodities_demand_drivers_tables
- commodity_unit_names_tables
- cursors_tables
- diplomacy_attitudes_tables
- diplomacy_factor_strings_tables
- diplomacy_negotiation_faction_override_strings_tables
- diplomacy_negotiation_strings_tables
- diplomacy_strings_tables
- diplomatic_relations_attitudes_tables
- diplomatic_relations_government_type_tables
- diplomatic_relations_religion_tables
- disaster_to_ground_types_tables
- disasters_tables
- diseases_tables
- effect_bonus_value_commodity_junction_tables
- effect_bonus_value_population_class_and_religion_junction_tables
- effect_bonus_value_projectile_junctions_tables
- effect_bonus_value_religion_junction_tables
- effect_bonus_value_resource_junction_tables
- effect_bonus_value_shot_type_junctions_tables
- effect_bonus_value_unit_category_junction_tables
- empires_regions_junct_tables
- empires_tables
- entity_training_levels_tables
- erosion_types_tables
- events_view_group_junct_tables
- faction_groups_tables
- family_trees_tables
- famous_battle_pools_tables
- fort_underlay_climate_jcts_tables
- governorships_tables
- lighting_setups_tables
- ministerial_effectiveness_modifiers_tables
- ministerial_position_default_names_tables
- ministerial_positions_tables
- ministerial_positions_to_effects_tables
- ministerial_positions_to_governorships_tables
- mission_activities_tables
- mission_effects_tables
- mission_sources_tables
- models_artilleries_tables
- models_artillery_tables
- mount_variants_tables
- movie_event_strings_tables
- names_forts_tables
- names_groups_tables
- particle_effects_tables
- pdlc_tables
- policies_tables
- population_classes_tables
- religions_tables
- resources_tables
- sea_climate_details_tables
- slots_gdp_values_tables
- slots_templates_models_tables
- small_vegetation_climates_jct_tables
- special_edition_enums_tables
- stances_tables
- taxes_classes_tables
- taxes_keys_tables
- taxes_levels_tables
- town_wealth_growth_factors_tables
- trade_details_tables
- warscape_categories_tables
- warscape_naval_lod_tables
- warscape_rigid_lod_range_tables
- warscape_trees_tables
- warscape_underlay_textures_tables
Plus two extras I found after original post, now also included:
- sea_surfaces_tables
- slots_art_tables
This is all mostly automatically generated. So nearly all column names are unknownX. In the updated file there are some automatically inferred primary keys and some other relationships, but they might be wrong or missing.
For tables with reasonably simple schemas like a few strings plus a float/int/bool or two, inferred type is quite certain. For monster tables like models_artilleries_tables with 184 fields inferred - well, mistakes are not impossible - sometimes floats and ints and groups of bools look a lot alike, so detection script might be totally confused.
Mistakes are especially likely when table has very few rows, or similar values in all. Judging from tables I manually checked, most inferred types are just fine. My script reported many cases where it just gave up and took a guess, like always false boolean, or always null nullable string; always 0.0 float, or always 0 int - they look identical in binary. This columns tend to be rather less interesting.
A few of the tables are obviously useful (diplomacy_*, ministerial_*, effect_bonus_*, taxes_*), and not too difficult to guess what is what. A few seem inactive like empires_* but maybe I just don't have a clue what they do.
If someone felt like going through tables found, and labeling columns properly, it would be great.
Good luck with modding.
EDIT: Updated 2 new tables, a lot of primary keys and foreign keys





Reply With Quote







