Results 1 to 1 of 1

Thread: [Modding] The Complete Export_Descr_Building.txt Guide

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default [Modding] The Complete Export_Descr_Building.txt Guide



    Author: MasterOfNone
    Original Thread: The Complete Export_Descr_Building.txt Guide

    The Complete Export_Descr_Building.txt Guide
    Modding Resource Header
    Title: The Complete EDB Guide for RTW (inc. BI)
    Posted by: Dol Guldur
    Modding area: Buildings (construction, bonuses) / Units (recruitment)
    Required programmes: Notepad (or other text editor)
    Optional tools: Hadrian building editor, Excel macro for recruit lines
    Related links: Complex conditionals for recruiting and building, A quick question from a modding newbie..., Additional capabilities and requirements for buildings
    Summary: An in-depth explanation of the export_descr_buildings file, which is the primary base for modding buildings and determining which units can be recruited from them.






    The Complete EDB Guide for Rome:Total War:



    Understanding & Coding the Export_Descr_Buildings.Txt (EDB) file

    by Dol Guldur





    LAST UPDATE: 31st April 2006 (trade bonus clarifications & descr_ui_buildings.txt addition to 'associated files' section).

    Modders: Please help make this the one-stop source for edb-related information. You can post your comments, corrections and additions on the General forum of the Workshop at: http://forums.totalwar.org/vb/showth...635#post828635


    CONTENTS
    • Introduction
    • Hidden Resources
    • Building Trees
    • Building Blocks: Requirements
    • Building Blocks: Capability
    • Building Blocks: Faction Capability
    • Building Blocks: End
    • Note on Barbarian Trees
    • Note on Building Names and Descriptions
    • Note on Multiple Temples & Indestructability of Buildings
    • Note on Associated Files
    • Tools & Other Resources

    Introduction

    I put this file together for my own reference, but have decided to open it up to all. I only ask your aid in improving and adding to it. If you are not at all familiar with the basics of the EDB file then you should become so before reading this. The file works alongside a good few other files and may not have the desired effect if these associated files are not modded. I hope this file is of some use in aiding modders to create better coding for the mods they are working on.

    Hidden resources

    The file begins proper with a declaration of the hidden resources. You may have up to 64 of these. They should all be listed here. The file seems to accept both space- and comma-separated lists. Do not use a hidden_resource in the EDB file and forget to declare it as this will result in a crash to desktop (CTD). It is reported that the rome hidden resource must be kept as the game uses it when checking victory conditions. These hidden resources can be assigned to regions in the descr_regions.txt file.

    Building Trees

    You will then find listed in the EDB file the building tree for each building type complete with a block of code for each building. You may have up to 64 such trees with a maximum of 9 levels (buildings) each though spread over a maximum of 5 settlement levels (though buildings attached to villages will not show up on the building browser). You can read more about this in the thread initiated by Black Crow at http://forums.totalwar.org/vb/showthread.php?t=56549

    The tree initiates with a declaration of the building type. Here's the beginning of the tree that lists buildings which provide archers and other missile units...

    Code:
    building missiles
    {
    levels practice_field archery_range catapult_range siege_engineer 
    {
    the first line is the building type. After the opening curly bracket the levels of that building type are listed (space-delimited and with "levels" preceeding).

    You can designate your own names for the building type should you wish to not make them universally available to all factions/cultures. However, core_buildings (aka government buildings), walls and hinterland buildings (roads, mines, and farms) cannot be factionally or culturally designated (though some of their levels may be excluded from certain cultures/factions).

    For example, you could have:

    Code:
    building missiles_roman
    {
    levels practice_field archery_range catapult_range siege_engineer 
    {
    Which of course could be used to specify a purely roman tree of such buildings. Remember not to change the names of the levels (though you may choose to not use some or allow only certain roman factions their use).

    Building Blocks - Requirements

    The tree then lists a block of code for each building (i.e. each of the levels declared). Continuing from our example above we will look at the first level of the "building missiles" tree, the practice_field:



    The first line states the requirements necessary to be satisfied in order for the building to be available for construction. All factions reside within the 6 hard-coded cultures, and so this particular building can be built by all factions. Any combination of factions/cultures can be listed. Both visible and hidden resources can be used as requirements as may "building_present_min_level x y" where x is the building type and y the level of that building type. This latter simply requires a certain minimum level of building of a building type to be present in that settlement before the practice_field can become available for construction. The connector "and" can be used to compound requirements, for example:



    Full List of Requirements

    resource
    hidden_resource
    building_present (as building_present_min_level except that it tests for the buidling type only - e.g. building_present barracks)
    building_present_min_level
    marian_reforms
    factions { x, }

    The connectors "or" and "not" can also be used in addition to "and". X represents a faction, culture, a list of the same - or all ("all,"). To find out more about how to use requirements and connectors take look at this thread: http://forums.totalwar.org/vb/showth...?postid=642173

    All of the above can be used as capability requirements too though the building_present one messes up the recruitment text in the building scroll a little (which might indicate it is best used as a building rather than capability requirement).



    Building Blocks - Capability

    Example:



    The Capability section lists the capabilities (i.e. the recruitment capability and building effects) of any given settlement which contains this building. The pool of potential requirements that can be attached to both recruitment and effect lines are basically the same as those used for the building's construction requirement (see above).

    Note that if you use the marian_reform requirement then it has been reported that it needs to go at the end.

    The "0" listed with recruits refers to the level of Experience the unit begins with when first recruited. It can of course be any number between 0 and 9.

    Capability requirements

    Much the same as the building requirements listed above. The following one, however, can only be used in the capability lines though it does not seem to work properly anyway:

    building_factions { x, } (does not seem to work but is supposed to test if the building was originally built by faction/s x - read more about the testing in the EDB discussion thread)

    I here list all known capability effects (which I sort by approx. category for your convenience):

    Full List of Building Effects

    happiness_bonus (public order due to happiness) 1-x (5-x%)
    population_growth_bonus (pop. growth) 1-25 (0.5-12.5%)
    law_bonus (public order bonus due to law) 1-x (5-x%)
    population_health_bonus (public health) 1-x (5-x%)
    trade_base_income_bonus (increases trade goods) 1-5 (1-5) [5] - adds 10% to base value of land trade & sea exports
    farming_level (farms) (farms and food pruduction improvement) 1-5 (1-5) [5]
    population_fire_risk_bonus (reduces risk of fire) *
    taxable_income_bonus (tax income bonus) *
    trade_level_bonus (increase in trade) - affects land trade only
    population_loyalty_bonus (public order) - does not appear to work

    recruits_morale_bonus (increases morale of units recruited) 1-4 (1-4)
    recruits_exp_bonus (upgrades XP of units recruited) 1-5 (1-5)

    armour (armour upgrade) 1 (1)
    weapon_simple (upgrades melee (light) weapons) 1 (1)
    weapon_bladed (upgrades bladed (heavy) weapons) 1 (1)
    weapon_missile (upgrades missile weapons) 1-5 (1-5)
    weapon_siege (upgrades siege weapons) *
    weapons_other (?) *
    bodyguard (improves general's bodyguard) ? * (comes into effect only after Marian Reforms)

    trade_fleet (trade fleets) 1-3 (1-3) [5] - reportedly has no effect
    mine_resource (income from mining) 1-4 (1-4) [5]
    road_level (improved roads and trade) 0-2 (0-2) [5]

    gate_strength (gates) 1-2 (reinforced, iron-bound)[1] [see also 4]
    gate_defences (gate defence) 0 (scorched sand/boiling oil)[2] [see also 4]
    tower_level (towers) 1-2 (arrow, ballista)[3] [see also 4]
    wall_level (walls) 0-4 (palisade, wooden, stone, large stone, epic stone) [4]

    stage_games (allows gladiatorial games) 1-3 (1-3) [5]
    stage_races (allows races) 1-2 (1-2) [5]

    religious_belief [pagan/zoroastrian/christianity] 1-x (5-x%)

    construction_cost_bonus_military (percentile cost reduction for recruitment buildings but does not seem to work) 1-100 (1-100%)
    construction_cost_bonus_religious (percentile cost reduction for temples) 1-100 (1-100%)
    construction_cost_bonus_defensive (percentile cost reduction for walls) 1-100 (1-100%)
    construction_cost_bonus_other (percentile cost reduction for civil buildings but seems to apply to all buildings except religious ones) 1-100 (1-100%)
    construction_time_bonus_military (percentile time reduction for constructing recruitment buildings but does not seem to work) 1-100 (1-100%)
    construction_time_bonus_religious (percentile time reduction for constructing temples) 1-100 (1-100%)
    construction_time_bonus_defensive (percentile time reduction for constructing walls) 1-100 (1-100%)
    construction_time_bonus_other (percentile time reduction for constructing civil buildings but also seems to apply to all buildings except religious ones) 1-100 (1-100%)

    Notes on above list...

    [1] wooden are default though not explicitly stated
    [2] does not appear to work; stone walls of any kind come with scorched sand/boiling oil
    [3] default towers are watchtowers though not explicitly stated
    [4] defensive capabilities seems to come with the wall_level regardless of what value they are given! See note below.
    [5] see Quietus's A Comprehensive Rome: Total War Guide (Tools & Other Resources) at the end of this Guide.

    * untested or unknown use

    Notes on format...

    Effects containing the "_bonus" element in their name should be coded with a stand-alone "bonus" added before the integer even when there is a "bonus" in the effect's name itself. E.G. population_growth_bonus bonus 1. However, population_growth_bonus bonus +1 also works. Sometimes omitting the "bonus" does work but can cause problems - for example, the building scroll may not display the actual bonus (even though it works), and no negative number can be introduced because the engine looks for either an integer (not a number with a "+" or "-" before it in this case) or the word "bonus".

    In the original file farming_level, armour and the various weapon effects sometimes carry the stand-alone "bonus" and sometimes do not. It would seem that the cumulative and desired effect would necessitate "bonus" in each usage, but I do not know why this is not the case in the original file. "Armour 1" (for example) seems to ensure the armour attribute of the unit is 1 above the EDU-stated armour but is not cumulative (however, it does not seem to reduce higher armour so it is not setting the armour variable to "1"). So it also seems sensible to always use the "bonus" before integers for this grouping of effects.

    Trade_fleet, mine_resource, road_level, and the games, races and the four defensive effects carry no stand-alone "bonus" in the EDB file.

    Negative effects...

    population_growth_bonus bonus -5 displayed the expected -2.5 in the building scroll but seemed not to affect the settlement population growth indicator on the settlement scroll. The same seems true for law_bonus and happiness_bonus. religious_belief , however, does seem to work in the negative (this needs more testing).

    Notes on (hardcoded?) defensive effects...

    The following defensive buildings (walls) seem to entail the following effects:

    Palisade - wooden gate - arrow towers

    Wooden wall - reinforced gate - arrow towers

    Stone wall - reinforced gate - arrow towers (incendiary ability) - boiling oil

    Large stone wall - iron gates - arrow towers (incendiary ability) - boiling oil

    Epic stone wall - iron gates - ballista towers (incendiary ability) - boiling oil

    Building Blocks - Faction_Capability

    These are similar to capabilties except they are applied faction-wide rather than just in one settlement (regional). For example, inserting:



    after the Capabilty block of a building (and before the construction line) will, when such a building is built by Parthia, reduce building times of defensive structures (i.e. walls) by half in all Parthian settlements.


    Building Blocks - End

    The end of each building block comprises the construction time (in turns), the cost, the minimum level of settlement necessary for the building in question to be built, and upgrades (if any). Note that the latter is quite correct to be in the plural - you can list more than one upgrade (top-level buildings should of course have no upgrade listed).

    Code:
    construction 3 
    cost 1200 
    settlement_min large_town
    upgrades
    {
    archery_range
    }
    }
    You will find "plugins" at the very end of the building trees - ignore these, they cannot be implemented.

    Note on Barbarian Building Trees

    Although factions in the barbarian culture apparently can be designated 4th and 5th level settlements at game start there seems no mechanism for triggering upgrading past a third level settlement in the game itself. In other words the Barbarian culture is limited in its upgrades to (from a village) town - large town - city. It cannot upgrade to large or huge cities. You can read more about this in this thread: http://forums.totalwar.org/vb/showthread.php?t=49691 Of course, in BI this has all changed and all cultures may upgrade through all five government buildings.

    Note on Building Names & Descriptions

    The names and textual descriptions of all buildings (inc. the universal ones such as core_buildings) can all be specified per faction (as can building requirements, capabilities and faction capabilities of course). I have written a tutorial on this at http://forums.totalwar.org/vb/showpo...2&postcount=56

    Note on Multiple Temples & Indestructability of Buildings

    Although some modders have reported that it is the initial prefix of the temple buildings (levels) that allows these buildings to be built in the same settlement as temples, my own research shows that removing the prefix in just the tree name will bring the same result (but without having to change all the other files associated with advice, traits, ancillaries, sound etc.)

    Following this same logic we can now add the "hinterland_" prefix to building tree names to make previously destructible buildings indestructible - that is, it will disable the hammer button in the building scroll.

    Note on Associated Files

    data\export_buildings.txt

    This file lists the in-game textual description of the building name, the building description, and a short version of the building description. It should match the code name in the EDB.

    This file also contains the "_name" elements which provide the text for the building thread summaries (i.e. the text for each building type in the in-game Building Browser).

    data\text\export_descr_buildings_enums.txt

    This file enumerates the tags for the textual descriptions of the building names and descriptions (long and short). It seems to be an obsolete file.

    data\descr_ui_buildings.txt

    From discussion thread (thanks to Nikolai1962):



    Tools & Other Resources

    EDB Recruit Lines Excel Macro by Godless Graham
    http://forums.totalwar.org/vb/showthread.php?t=49448

    Hadrian building editor by GodsPetMonkey
    http://www.twcenter.net/forums/downl...do=file&id=245

    Quietus's A Comprehensive Rome: Total War Guide (visit Economic section to read how buildings affect trade)
    http://forums.totalwar.org/vb/showthread.php?t=45315


    Dol Guldur is a researcher & developer for the Fourth Age:Total War mod.
    Last edited by Sir Adrian; January 01, 2014 at 03:07 AM. Reason: updated author username



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •