A Guide to Export_Descr_Buildings.txt
A Guide to the export_descr_buildings.txt file
This guide assumes that you have unpacked the data files using the method found here: http://medieval2.heavengames.com/m2t...er/index.shtml
Once you have successfully created your own units, you may be wondering how to get them into the campaign. Or perhaps you want to edit a particular building to fit your exact needs – maybe make it stronger, weaker, or more unique. This is the guide for you. First, a word on the way that the game handles buildings. Buildings are in “lines” such as the “Cannons” line. Each line is a group of buildings that have similar functions and are upgradeable from one to the next. For example, the “Cannons” line consists of the Gunsmith, Cannon Maker, Cannon Foundry, and Royal Arsenal. Once you have built a Gunsmith in one of your cities, then you can upgrade it into a Cannon Maker, then a Cannon Foundry, and so on. When you convert a city to a castle or vice versa, some lines have a corresponding line in the castle which they switch to. If there is no corresponding line, then they are destroyed. For example, the Cannons line corresponds to another Cannons line created specifically for castles, referred to as castle_cannon in the game files, as opposed to cannon. Definitions in the export_descr_buildings, or EDB are broken into these “lines” like so:
building cannon
{
convert_to castle_cannon
levels gunsmith cannon_maker cannon_foundry royal_arsenal
{
gunsmith city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter gunpowder_discovered 1
{
convert_to 0
capability
{
recruit_pool "NE Bombard" 1 0.4 3 0 requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, papal_states, sicily, }
recruit_pool "EE Bombard" 1 0.4 3 0 requires factions { poland, russia, hungary, }
recruit_pool "GR Bombard" 1 0.4 3 0 requires factions { byzantium, }
recruit_pool "ME Bombard" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Rocket Launcher" 1 0.4 3 0 requires factions { mongols, }
recruit_pool "AS Bombard" 1 0.4 3 0 requires factions { timurids, }
}
material wooden
construction 3
cost 800
settlement_min city
upgrades
{
cannon_maker
}
}
cannon_maker city requires factions { northern_european, timurids, egypt, moors, turks, eastern_european, southern_european, } and event_counter gunpowder_discovered 1
{
convert_to 1
capability
{
recruit_pool "NE Mortar" 1 0.4 3 0 requires factions { england, scotland, venice, papal_states, sicily, }
recruit_pool "NE Grand Bombard" 1 0.4 3 0 requires factions { france, hre, spain, portugal, milan, }
recruit_pool "NE Ribault" 1 0.4 3 0 requires factions { denmark, }
recruit_pool "EE Ribault" 1 0.4 3 0 requires factions { poland, hungary, }
recruit_pool "EE Grand Bombard" 1 0.4 3 0 requires factions { russia, }
recruit_pool "ME Grand Bombard" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Grand Bombard" 1 0.4 3 0 requires factions { timurids, }
recruit_pool "NE Ribault" 1 0.4 3 0 requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, }
recruit_pool "NE Bombard" 1 0.4 3 0 requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, papal_states, sicily, }
recruit_pool "EE Bombard" 1 0.4 3 0 requires factions { poland, russia, hungary, }
recruit_pool "GR Bombard" 1 0.4 3 0 requires factions { byzantium, }
recruit_pool "ME Bombard" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Rocket Launcher" 1 0.4 3 0 requires factions { mongols, }
recruit_pool "AS Bombard" 1 0.4 3 0 requires factions { timurids, }
weapon_naval_gunpowder 1
}
material wooden
construction 4
cost 1600
settlement_min large_city
upgrades
{
cannon_foundry
}
}
cannon_foundry city requires factions { northern_european, egypt, timurids, moors, turks, eastern_european, southern_european, } and event_counter gunpowder_discovered 1
{
convert_to 2
capability
{
recruit_pool "NE Culverin" 1 0.4 3 0 requires factions { england, scotland, france, spain, portugal, milan, venice, papal_states, }
recruit_pool "NE Cannon" 1 0.4 3 0 requires factions { hre, sicily, }
recruit_pool "NE Serpentine" 1 0.4 3 0 requires factions { denmark, }
recruit_pool "EE Serpentine" 1 0.4 3 0 requires factions { poland, hungary, }
recruit_pool "EE Cannon" 1 0.4 3 0 requires factions { russia, }
recruit_pool "ME Cannon" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Cannon" 1 0.4 3 0 requires factions { timurids, }
recruit_pool "NE Serpentine" 1 0.4 3 0 requires factions { france, hre, }
recruit_pool "NE Cannon" 1 0.4 3 0 requires factions { denmark, }
recruit_pool "EE Cannon" 1 0.4 3 0 requires factions { poland, }
recruit_pool "NE Mortar" 1 0.4 3 0 requires factions { england, scotland, venice, papal_states, sicily, }
recruit_pool "NE Grand Bombard" 1 0.4 3 0 requires factions { france, hre, spain, portugal, milan, }
recruit_pool "NE Ribault" 1 0.4 3 0 requires factions { denmark, }
recruit_pool "EE Ribault" 1 0.4 3 0 requires factions { poland, hungary, }
recruit_pool "EE Grand Bombard" 1 0.4 3 0 requires factions { russia, }
recruit_pool "ME Grand Bombard" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Grand Bombard" 1 0.4 3 0 requires factions { timurids, }
recruit_pool "NE Ribault" 1 0.4 3 0 requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, }
recruit_pool "NE Bombard" 1 0.4 3 0 requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, papal_states, sicily, }
recruit_pool "EE Bombard" 1 0.4 3 0 requires factions { poland, russia, hungary, }
recruit_pool "GR Bombard" 1 0.4 3 0 requires factions { byzantium, }
recruit_pool "ME Bombard" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Rocket Launcher" 1 0.4 3 0 requires factions { mongols, }
recruit_pool "AS Bombard" 1 0.4 3 0 requires factions { timurids, }
weapon_naval_gunpowder 1
}
material wooden
construction 5
cost 3200
settlement_min huge_city
upgrades
{
royal_arsenal
}
}
royal_arsenal city requires factions { hre, france, turks, hungary, russia, venice, milan, portugal, spain, } and event_counter gunpowder_discovered 1
{
convert_to 3
capability
{
recruit_pool "NE Basilisk" 1 0.4 3 0 requires factions { france, hre, spain, portugal, }
recruit_pool "NE Monster Ribault" 1 0.4 3 0 requires factions { milan, venice, }
recruit_pool "EE Basilisk" 1 0.4 3 0 requires factions { russia, hungary, }
recruit_pool "ME Monster Bombard" 1 0.4 3 0 requires factions { turks, }
recruit_pool "NE Culverin" 1 0.4 3 0 requires factions { england, scotland, france, spain, portugal, milan, venice, papal_states, }
recruit_pool "NE Cannon" 1 0.4 3 0 requires factions { hre, sicily, }
recruit_pool "NE Serpentine" 1 0.4 3 0 requires factions { denmark, }
recruit_pool "EE Serpentine" 1 0.4 3 0 requires factions { poland, hungary, }
recruit_pool "EE Cannon" 1 0.4 3 0 requires factions { russia, }
recruit_pool "ME Cannon" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Cannon" 1 0.4 3 0 requires factions { timurids, }
recruit_pool "NE Serpentine" 1 0.4 3 0 requires factions { france, hre, }
recruit_pool "NE Cannon" 1 0.4 3 0 requires factions { denmark, }
recruit_pool "EE Cannon" 1 0.4 3 0 requires factions { poland, }
recruit_pool "NE Mortar" 1 0.4 3 0 requires factions { england, scotland, venice, papal_states, sicily, }
recruit_pool "NE Grand Bombard" 1 0.4 3 0 requires factions { france, hre, spain, portugal, milan, }
recruit_pool "NE Ribault" 1 0.4 3 0 requires factions { denmark, }
recruit_pool "EE Ribault" 1 0.4 3 0 requires factions { poland, hungary, }
recruit_pool "EE Grand Bombard" 1 0.4 3 0 requires factions { russia, }
recruit_pool "ME Grand Bombard" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Grand Bombard" 1 0.4 3 0 requires factions { timurids, }
recruit_pool "NE Ribault" 1 0.4 3 0 requires factions { england, scotland, spain, portugal, milan, venice, papal_states, sicily, }
recruit_pool "NE Bombard" 1 0.4 3 0 requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, papal_states, sicily, }
recruit_pool "EE Bombard" 1 0.4 3 0 requires factions { poland, russia, hungary, }
recruit_pool "GR Bombard" 1 0.4 3 0 requires factions { byzantium, }
recruit_pool "ME Bombard" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Rocket Launcher" 1 0.4 3 0 requires factions { mongols, }
recruit_pool "AS Bombard" 1 0.4 3 0 requires factions { timurids, }
weapon_naval_gunpowder 1
}
material wooden
construction 6
cost 6400
settlement_min huge_city
upgrades
{
}
}
}
plugins
{
}
}
This text defines the entire cannon line of buildings. This part:
building cannon
{
convert_to castle_cannon
levels gunsmith cannon_maker cannon_foundry royal_arsenal
defines things that affect the entire building line. The first line:
building cannon
is formatted as building insert name of building line here. What we learn from this line is that this is the definition for the cannon line of buildings. The next line:
{
is a curly brace. This file uses curly braces to organize the building definitions.
The next line:
convert_to castle_cannon
Tells the game which line to convert the building line into if the entire settlement is converted to a castle (or city). If a building line does not have this parameter, then it will be destroyed in the conversion process, like a Bowyer.
The next line:
levels gunsmith cannon_maker cannon_foundry royal_arsenal
is all of the different buildings in the line, in ascending order – the first is the Gunsmith, then the Cannon Maker, and so on. In addition, there is sometimes a line that goes after the convert_to line that ties the building to a specific religion. It goes as follows:
religion orthodox
Available religions are:
catholic
orthodox
islam
pagan
heretic
After the line definition comes the individual building definitions in order, like the gunsmith definition:
{
gunsmith city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter gunpowder_discovered 1
{
convert_to 0
capability
{
recruit_pool "NE Bombard" 1 0.4 3 0 requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, papal_states, sicily, }
recruit_pool "EE Bombard" 1 0.4 3 0 requires factions { poland, russia, hungary, }
recruit_pool "GR Bombard" 1 0.4 3 0 requires factions { byzantium, }
recruit_pool "ME Bombard" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Rocket Launcher" 1 0.4 3 0 requires factions { mongols, }
recruit_pool "AS Bombard" 1 0.4 3 0 requires factions { timurids, }
}
material wooden
construction 3
cost 800
settlement_min city
upgrades
{
cannon_maker
}
}
The first part is the building overview:
gunsmith city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and event_counter gunpowder_discovered 1
This part determines whether the building is a castle or city building, as well as the name and requirements to build. You can have multiple requirements separated by an “and” or an “or”. My examples of code in this section should be added on if that is the only requirement for the building - if you want to add snippets of code on to existing buildings (if, for example, you want this requirement to be in addition to needing to play as a specific faction), replace the "requires" in my examples with an "and" or an "or". (Thanks EarendilElenthol for pointing this out!) A list of requirements:
Factions – requires factions { hre, }
You can make the construction of the building be restricted by faction or culture. Note that the list is enclosed in curly braces and has spaces before/after each curly brace. There is also a comma after each faction or culture. A list of faction names as they are in the files, separated by culture:
northern_european – england, france, denmark, scotland, hre (Holy Roman Empire), normans, saxons
southern_european – spain, portugal, milan, venice, papal_states, sicily, slave (The Rebels, but it doesn’t really matter since they “adapt” to the local culture)
eastern_european – poland, hungary, russia
greek – byzantium
middle_eastern – egypt, turks, moors, mongols, timurids
mesoamerican – aztecs
Events – requires event_counter first_piano 1
You can tie it in to any of the events in the game. If you put a 1 after event_counter, then the building may only be built after the event. If you put a 0, it can only be built before. Events are listed in the descr_events.txt in the campaign folder and include:
first_windmill
earthquake_in_aleppo
science_alchemy_book
first_european_paper
first_magnetic_compass
science_maths_zero_europe
mongols_invasion_warn
earthquake_in_silicia
first_mechanical_clock
gunpowder_discovered
first_eyeglasses
earthquake_in_alexandria
earthquake_in_alexandria_2
football_banned
first_sawmill
first_public_clock
science_weather_forecast
black_death_hits
black_death_1
black_death_2
black_death_3
black_death_4
first_blast_furnace
grote_mandenke
timurids_invasion_warn
first_piano
world_is_round
first_oil_painting
science_de_docta_ignorantia
first_printing_press
earthquake_in_naples
malleus_maleficarum
science_da_vinci_ornithopter
first_watch
Hidden Resource – requires hidden_resource arguin
Hidden resources are defined at the top of the EDB file. More on how to give them out and edit them in a later article. For now, here is a list of hidden resources:
sparta
rome
italy
america
atlantic
explorers_guild
swordsmiths_guild
woodsmens_guild
teutonic_knights_chapter_house
knights_of_santiago_chapter_house
crusade
jihad
arguin
horde_target
no_pirates
no_brigands
For example, the america hidden resource is used to ensure that the Spanish and Portuguese can only train Conquistadores in the New World.
Buildings – requires building_present_min_level urban_equestrian sultans_racing_track
This allows you to require that there is a certain level of building in the settlement. After the building_present_min_level, you put the building line, in this case Horse Racing, and then the level which it requires, in this case the Sultan’s Racing Track.
Religions – requires region_religion catholic 90
This Kingdoms-only line allows you to tie the requirement to a certain amount of religion. In the example, the building can only be built after 90% of the people in the region are Catholic.
The next part is more building-specific stuff.
{
convert_to 0
capability
The “convert_to 0” tells the game which building in the opposite line that this building converts to. The number always has 1 subtracted from it. In this example, the gunsmith converts to the first building in the castle_cannon line, the c_gunsmith. There is sometimes a line that comes right after this that ties the building to a specific religion, allowing it to spread that religion. The capability line is necessary, as it introduces the next part of the definition. This is the capabilities part:
{
recruit_pool "NE Bombard" 1 0.4 3 0 requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, papal_states, sicily, }
recruit_pool "EE Bombard" 1 0.4 3 0 requires factions { poland, russia, hungary, }
recruit_pool "GR Bombard" 1 0.4 3 0 requires factions { byzantium, }
recruit_pool "ME Bombard" 1 0.4 3 0 requires factions { moors, egypt, turks, }
recruit_pool "AS Rocket Launcher" 1 0.4 3 0 requires factions { mongols, }
recruit_pool "AS Bombard" 1 0.4 3 0 requires factions { timurids, }
}
In this example, the building only has one capability type – recruit pool. This allows the building to have a recruit pool for a particular type of unit. An example -
recruit_pool "NE Bombard" 1 0.4 3 0 requires factions { england, scotland, france, hre, denmark, spain, portugal, milan, venice, papal_states, sicily, }
The first part, recruit_pool, defines the type of capability. Then comes a unit’s type name (the name in the “type” line of the export_descr_unit.txt”) in quotes. Next comes the four numbers that define the recruit pool. The way that a recruit pool works is that there are points. The building starts with a certain amount of points, and gains more every turn. You spend one point every time that you want to recruit a unit. There is a limit to how many points that the building can have. The first number is the starting number of points. The second number is the number of points that the building gains each turn. The third number is the maximum number of points. The last number, which must be between 0 and 9, is the starting experience of the units trained there. In addition, you can tie the capability (and this goes for all capabilities) to a requirement, using any combination of the four defined earlier. In this example, the Gunsmith has a recruit pool for Bombards when you are playing as England, Scotland, France, The Holy Roman Empire, Denmark, Spain, Portugal, Milan, Venice, The Papal States, and Sicily. It starts with 1 point, and gains 0.4 points per turn. There are a maximum of three points in the pool. The Bombards will start with 0 experience.
However, there are other capability types. Here is a comprehensive list.
wall_level – wall_level 0
This sets the walls of the settlement to be at a particular level.
0 = Wooden Palisade
1 = Wooden Wall
2 = Stone Wall
3 = Large Stone Wall
4 = Huge Stone Wall
tower_level – tower_level 1
This sets the towers of the settlement to be at a particular level.
1 = Arrow Towers
2 = Ballista Towers
3 = Cannon Towers
free_upkeep – free_upkeep bonus 2
This allows the building to support the specified number of militia units free of charge.
happiness_bonus – happiness_bonus bonus 1
This makes the building contribute to public order through happiness by 5 times the number specified – in this example, a 5% public order bonus.
recruitment_slots – recruitment_slots 1
This allows the settlement to have the specified number of recruitment slots.
gate_strength – gate_strength 1
This allows the settlement to have gates of the specified strength.
1 = Reinforced Gates
2 = Iron Gates
law_bonus – law_bonus bonus 1
This makes the building contribute to public order through law by 5 times the number specified – in this example, a 5% public order bonus.
stage_races – stage_races 1
This allows the settlement to have horse races. Note that in the Americas campaign, this is used to allow the settlement to stage sacrifices instead.
armour – armour 1
This lets the building act like a Blacksmith and upgrade armor. The number denotes what it can upgrade to:
1 = Padded/ Leather
2 = Light Mail/ Light Lamellar
3 = Heavy Mail/ Lamellar
4 = Partial Plate/ Heavy Lamellar/ Splint Mail
5 = Full Plate/ Kataphract/ Heavy Splint
6 = Advanced Plate
trade_base_income_bonus – trade_base_income_bonus bonus 2
This gives you a bonus on tradable goods, presumably 5 times the stated amount.
trade_fleet – trade_fleet 1
Lets you have the specified number of trade fleets.
recruitment_cost_bonus_naval – recruitment_cost_bonus_naval bonus 1
This reduces the cost of training boats in the settlement by 10% times the number specified – in the example, boats would be 10% cheaper in that settlement.
navy_bonus – navy_bonus 1
This allows you to give an experience bonus to all ships trained in the settlement that have cannon. In this case, it is a +1 experience bonus.
agent – agent merchant 0
This allows the building to train an agent of the type specified. After you say agent, you then specify what type of agent. Agent types include:
named character (Note that if you actually want to make generals trainable, you have to make general’s bodyguards trainable; they automatically come with a general. Don’t use the agent line.)
general (This is really a captain, although, again, I don’t think making them trainable would work out.)
spy
assassin
diplomat
admiral
princess
merchant
priest (includes Catholic and Orthodox priests, as well as Imams)
heretic
witch
inquisitor
The number afterwards is the level. You can use this to determine what level the priests are when they start (additional coding would be required for other character types).
0 = ordinary
1 = bishop
2 = cardinal/patriarch (note that the patriarch is an Orthodox model unused in the game)
agent_limit – agent_limit merchant 1
This adds to the limit of the agent specified by the number specified.
road_level – road_level 1
This sets a new road level in the province it is in. Road levels are as follows:
0 = Dirt Roads
1 = Paved Roads
2 = Highways
farming_level – farming_level 1
This increases the level of farms in the province by the number specified.
mine_resource – mine_resource 7
This increases your mining income by the number specified. Note that by default mines are 4 and mining networks are 7.
population_health_bonus – population_health_bonus bonus 2
This increases health in the settlement by 5 times the number specified.
population_growth_bonus – population_growth_bonus bonus 1
This increases population growth in the settlement by one half times the number specified.
retrain_cost_bonus – retrain_cost_bonus bonus 1
This reduces the cost to retrain units in the settlement by 10% times the number specified.
weapon_missile_gunpowder – weapon_missile_gunpowder 1
This upgrades the weapons of all gun-armed troops.
weapon_artillery_gunpowder – weapon_artillery_gunpowder 1
This upgrades the weapons of all gunpowder artillery.
weapon_projectile – weapon_projectile 1
This upgrades the weapons of all gun-armed troops and gunpowder artillery.
religion_level – religion_level bonus 1
This adds a conversion bonus of the religion that the building is tied to. The conversion bonus is 5% times the number specified.
pope_disapproval – pope_disapproval 1
This makes the Pope happy with your faction.
pope_approval – pope_approval 1
This sends a message to you when the building is completed, telling of the Pope’s approval for your cause.
amplify_religion_level – amplify_religion_level 1.5
This increases the effectiveness of religious buildings in converting the populace by 33 and 1/3 times the number specified.
heavy_cavalry_bonus – heavy_cavalry_bonus bonus 1
This increases the experience of knights trained here by the amount specified.
construction_cost_bonus_stone – construction_cost_bonus_stone bonus 30
This decreases the cost of stone structures by 1% times the amount specified.
gun_bonus – gun_bonus 1
Increases experience of all gunpowder-armed troops by the amount specified.
weapon_melee_blade – weapon_melee_blade 1
Upgrades the weapons of all melee troops.
archer_bonus – archer_bonus 1
Increases the experience of all archers trained by the amount specified.
cavalry_bonus – cavalry_bonus 1
Increases the experience of all cavalry trained in the settlement by the amount specified.
stage_games – stage_games 1
This is used in the Americas campaign to allow you to hold ceremonial dances.
Re: A Guide to the Export_Descr_Buildings.txt File
How do you change the time needed for a unit to be able to be recruited again.
Re: A Guide to the Export_Descr_Buildings.txt File
recruit_pool "AS Bombard" 1 0.4 3 0 requires factions { timurids, }
The higher the number, the faster the replenishment. In this case you get a 40% 'unit refill' every round.
Re: A Guide to the Export_Descr_Buildings.txt File
Or in other words, three turns before he becomes available again.
Re: A Guide to the Export_Descr_Buildings.txt File
Re: A Guide to the Export_Descr_Buildings.txt File
One is glad to be of service :buba:
Re: A Guide to the Export_Descr_Buildings.txt File
Can I have several requirement-lines for one building?
for example
gunsmith city requires factions { northern_european } and event_counter gunpowder_discovered 1
gunsmith city requires factions { middle_eastern, northern_european } and event_counter gunpowder_discovered 0 or hidden_ressource ABC
gunsmith city requires factions { eastern_european, } and hidden_ressource ABC
gunsmith city requires factions { southern_european, } and not hidden_ressource ABC
Re: A Guide to the Export_Descr_Buildings.txt File
The problem is that the OR conditional works somewhat counter intuitively. Here's how it should've worked:
gunsmith city requires factions { eastern_european, } and hidden_ressource ABC or factions { southern_european, } and not hidden_ressource ABC
But that isn't how it works, and you can try it in the game to see that it doesn't.
You kind of have to tailor your demands to what the engine is capable of processing.
In my own setup, I want building Barracks to be available to all factions; except that if they're Romans, they need to build a Forum first, and if they're Greeks they need to build an Agora first.
So it's a set of three separate requirements -- one which simply requires that you be a certain faction, another that you be a faction plus building ABC, and another that you be yet another faction plus building XYZ. Here is how it should've looked:
barracks city requires factions { etruscan, punic, gallic, } or factions { roman,} and building forum forum1 or factions { greek, } and building agora agora1
Right?
Except it falls into the same problem as the string I proposed for you above.
To solve this, I changed my expression around a little bit, and tailored it in a way that the engine is able to process it:
barracks city requires factions { etruscan, punic, gallic, } or factions { roman, greek} and building forum forum1 or building agora agora1
Re: A Guide to the Export_Descr_Buildings.txt File
Indeed. And even Sig's example would fail if for instance you allowed both factions to build a Forum and Agora, but didn't want Agora to work for Rome. It's a faulty system, tis the gist of it.
Re: A Guide to the Export_Descr_Buildings.txt File
Yes, I see. That's the idea behind having several requirement lines for one building, like you can have for one in unit in the building - but that doesn't work (to answer my own question after testing it). The test turned out the game doesn't load, error message 'expecting a "{" but found a "gunsmith"'.
So it seems the best way when making very complex requirements is to move them to the script and work with counters in EDB?
Re: A Guide to the Export_Descr_Buildings.txt File
Quote:
Originally Posted by
Augustus Lucifer
Indeed. And even Sig's example would fail if for instance you allowed both factions to build a Forum and Agora, but didn't want Agora to work for Rome. It's a faulty system, tis the gist of it.
No actually my solution is quite elegant -- the Agora is only allowed for the Greeks, so Romans will never get to see it. Thus, they'll never be able to build barracks without a Forum, and likewise Greeks will have no choice but to build it by first having an Agora. I solve the problem by merging the two cultural groups into the same faction requirement, but by being sneaky I made their requirements still be independent of the other culture.
Re: A Guide to the Export_Descr_Buildings.txt File
Quote:
Originally Posted by
SigniferOne
No actually my solution is quite elegant -- the Agora is only allowed for the Greeks, so Romans will never get to see it. Thus, they'll never be able to build barracks without a Forum, and likewise Greeks will have no choice but to build it by first having an Agora. I solve the problem by merging the two cultural groups into the same faction requirement, but by being sneaky I made their requirements still be independent of the other culture.
Yes I know that. :tongue:
It works the way you did it, I'm not disputing that. What I meant was for instance if you wanted Faction A to need a Level 3 Market and Faction B to need a Level 4 Market, that wouldn't work since they both use the same building tree. It does work the way you did it.
Re: A Guide to the Export_Descr_Buildings.txt File
Is there any way of getting a construction time bonus or a cost bonus for non-stone buildings?
Re: A Guide to the Export_Descr_Buildings.txt File
When I was testing, a negative cost gave costs of about 64000 florins and when I gave negative costs of -66000 it didnt change. Does anybody know another way than scripting to give money once when a building is built?
Re: A Guide to the Export_Descr_Buildings.txt File
Quote:
Originally Posted by
EarendilElenthol
When I was testing, a negative cost gave costs of about 64000 florins and when I gave negative costs of -66000 it didnt change. Does anybody know another way than scripting to give money once when a building is built?
I highly doubt it. Reason being it's unlikely CA foresaw a need for this since giving money for building something is counter-intuitive. You can do it by script and you might be able to make it cost 0 gold, but otherwise it's unlikely.
Re: A Guide to the Export_Descr_Buildings.txt File
thats sad, I would have liked to see that giving town rights or city rights gave the player money instead of costing (and because I'm not trained in coding, I'll have to look for someone to code this for me)
Re: A Guide to the Export_Descr_Buildings.txt File
Quote:
Originally Posted by
EarendilElenthol
thats sad, I would have liked to see that giving town rights or city rights gave the player money instead of costing (and because I'm not trained in coding, I'll have to look for someone to code this for me)
Well I wouldn't recommend doing it that way. If you plan to implement a system whereby a player can grant cities Civil Rights, which is what I assume you're saying, it's best to do it through script or just a normal building. With every upside there needs to be a downside, if a player can gain money and bonuses by giving a town rights, why not just give them all rights all the time? Well the right to protest certainly would potentially decrease productivity and tax revenues. In a feudal society rights would anger the nobles.
So if you want a rights system you really should make sure that there are negatives to counterbalance the positives, and you can just use the small building cost to represent the fact that you'd need to re-structure the regulations in all federal operations and spread the word after handling the legislation, all of which costs money. A "Civil Rights" building that gives happiness but decreases order and costs around 500 for processing fees seems to fit the bill.
Naturally scripts can do much, much more with this, such as initiating populist or noble revolts when the policy is switched back and forth. But for a very basic setup I think you can achieve what you want easily enough.
Re: A Guide to the Export_Descr_Buildings.txt File
Yes, I would suggest to make this building cheap (say 100fl) because it is not a true structure but an administrative act. The city rights should raise trade but also raise unrest by the same ammount. I would also think of giving FMs who try to govern these "free towns" a trait that adds further unrest.
Re: A Guide to the Export_Descr_Buildings.txt File
Don't worry, I intend to make this my core_building, actually it is already implemented :) There will be downsides of this, especially for the larger towns as they are in castle mode so the taxes are far less.But it is not yet fully fledged, I still have to edit loads of stuff.
By the way, your "Buildings – requires building_present_min_level urban_equestrian sultans_racing_track" doesn't work. It should be "and" instead of "requires". I tried your version first but to no avail, and then found the solution ^^.
Re: A Guide to the Export_Descr_Buildings.txt File
Yeah, if you're adding it on to an existing structure, that's how you'll need to go. My code was for the building only requiring a Sultan's Racing Track and nothing else (no faction requirements, etc.) I should make a note of that. Thanks for pointing that out! +rep