PDA

View Full Version : Buildings & Settlements



Modding Forum
10-23-2006, 01:45
A listing of some of the new building effects can be found here:
https://forums.totalwar.org/vb/showthread.php?t=73978

Prefixes
guild_ makes the building unbuildable, but instead subject to rules defined in export_descr_guilds

temple_ as in Rome, only one temple_ structure can be built in a settlement

hinterland_ as in Rome, makes the building indestructable

Agent limits
The building capability agent_limit allows you to alter the number of agents that can be recruited for each one of this type of building. The basic 'agent' capability simply allows this type of agent to be constructed with no limits.

Material
This is believed to be used for the purposes of calculating the impact of stone_cost_bonus and stone_time_bonus (i.e. non-stone buildings don't get them).


Capabilities

taxable_income_bonus displays correctly but has no effect
income_bonus doesn't display correctly (Instant income bonus %d florins +<bonus>) but it correctly adds the <bonus> as neat income coming from buildings.
trade_level_bonus doesn't display the bonus but it works (land trade only), even if the formula used is still a mistery to me (with a bonus of 1 a land trade income of 52 raised to 181).
trade_base_income_bonus doesn't display the bonus but it works (all kind of trades), the bonus appears to be a 10% on the trade income.
farming_level. Base farming level is set in descr_regions.txt and it gives 80 florins (average harvest) for each point. So each farming_level bonus point increase the incomes of 80 florins. Btw, there's no bonus points limit to 5, I managed to give 10 bonus points but it seems they don't add up if they're on different buildings (at least 10 points in the walls and 1 point in land clearance didn't add up in my test).
weapon_missile_mechanical displays correctly the bonus but whatever value you put there the retrained missile unit will gain 1 point in melee attack on its card. How this translate in real combat is left to further experiments (I wonder if it's the same as armor upgrades).
population_loyalty_bonus displays correctly the bonus but doesn't seem to work just like in RTW.



Hardcoded limits
export_descr_building.txt
Hidden resources - 64
Number of complexes - 128
Number of buildings in a chain - 9

Shadow_Wolf33
12-04-2006, 23:22
Now that we've got some of the moddable files, anyone care to wager a guess at what the numbers in the following line mean? there's no description in the file itself, so no easy read'n'change fiddling. :dizzy2:



recruit_pool "Dismounted Longbowmen" 1 0.7 6 0 requires factions { england, }


the 6 seems pretty simple, as it's how many of the unit you can hold within the pool, but the 1, 0.7, and the 0 are kind of confusing me...anyone care to take a guess? :yes:

alpaca
12-04-2006, 23:27
Found it in that xls file Caliban provided us with (building effects):
[starting_pool_float] [replenishment_rate_float] [max_units_float] [experience_int]

redmark
12-04-2006, 23:59
Looking at the EDB, it seems that all vanilla buildings which exist in both types of settlement and are not destroyed on conversion actually have separate buildings paths defined.

e.g.



building hinterland_roads
{
convert_to hinterland_castle_roads
levels roads paved_roads
{
roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }
{
convert_to 0
capability
{
road_level 0
}
material wooden
construction 1
cost 400
settlement_min town
upgrades
{
paved_roads
}
}
paved_roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }
{
convert_to 1
capability
{
road_level 1
}
material wooden
construction 3
cost 1200
settlement_min city
upgrades
{
}
}
}
plugins
{
}
}
building hinterland_castle_roads
{
convert_to hinterland_roads
levels c_roads c_paved_roads
{
c_roads castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }
{
convert_to 0
capability
{
road_level 0
}
material wooden
construction 1
cost 400
settlement_min town
upgrades
{
c_paved_roads
}
}
c_paved_roads castle requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }
{
convert_to 1
capability
{
road_level 1
}
material wooden
construction 3
cost 1200
settlement_min city
upgrades
{
}
}
}
plugins
{
}
}


Note the "convert_to" lines - the first, immediately before the 'levels' declaration, signifies the parallel settlement type building path. The 'convert_to' lines under each building can be either the name of a building in the other settlement type building path, or the index number (base 0) of the comparable building type when defined before 'levels'.


Although I didn't see an existing example on a quick glance through the file, there is another way a building can be built in both settlement types and not destroyed on conversion - simply don't put "town" or "castle" after the building name / before 'requires factions'. I've done this with the bowyer-path and it works fine. What doesn't work, is to have some later levels specific to one settlement or the other; once the entry level building is available, it appears all upgrades can be made (and recruited from), whether the EDB says "castle" after the upgrade or not.


EDIT: Sorry, feel free to merge into the 'Buildings and Settlements' thread I noticed immediately after finishing the post. :)

Epistolary Richard
12-05-2006, 01:09
Thing I found really interesting is the new 'and event_counter' recruitment conditional. As I understand it, these events can be established in both the campaign script and descr_events.

This leads to complete control over when a unit becomes available - anything we can script can then lead into an event counter.


Another thing you'll notice is some guild hidden resources which aren't actually then used by the guild building itself. These apparently increase the likelihood of the guild being built there.

crusade, jihad and horde_target all equally mean regions with these hidden resources are more likely to be targeted.


...
BTW added some explanatory stuff to top post.

Lusted
12-05-2006, 01:13
Which means that a Roman era mod could have an accurate Marian reforms without all the complicated stuff we had to do in RTW to make them happen at 109bc.

Epistolary Richard
12-05-2006, 01:23
Exactement! But far more than merely time conditionals - character conditionals, diplomatic conditionals, presence of faction conditionals... there's a heck of a lot there.

zerathule
12-08-2006, 17:18
Do you guys think that it would be possible to have an event_counter tied to an alliance ?
To be more precise have something like the scots guard only recruitable by France once they get an alliance with Scotland, and only as long as they keep their alliance.
This could lead to interesting modding possibilities with having the possibility to recruit foreign troops according to alliances, making an alliance worth the troubles needed to keep it.

Epistolary Richard
12-08-2006, 21:30
Yes, I think this would be possible, as I said there is a diplomatic stance conditional. Have a look at the docudemon files. Look in the scripting thread
https://forums.totalwar.org/vb/showthread.php?t=70885

rorarii
12-29-2006, 00:38
Lusted, not just the Marian event but any event that effected the roman army .. usually military disasters.

What's needed is an event where everytime an army is massacred, the loser possibly reforms their army - out with old units, in with new .. even enemy unit types?

This seems more historically accurate.

R

irishron2004
01-10-2007, 02:13
Would this work for stables? Instead of just building equestrian, having building equestrian_castle and building equestrian_city with the appropriate convert_to lines?

Edit: Tried it and my efforts say no. How did you do the boyer path?

alpaca
01-10-2007, 15:11
Would this work for stables? Instead of just building equestrian, having building equestrian_castle and building equestrian_city with the appropriate convert_to lines?

Edit: Tried it and my efforts say no. How did you do the boyer path?
That should work. Did you add the appropriate entries to the text folder?

irishron2004
01-10-2007, 18:35
I am trying to mod The Long Road mod. I do have the game unpacked so I have access to the unmodified files. The only thing I did in the EDB was make another "building equestrian" entry and named one " building equestrian_castle" and the other "building equestrian_city" with the convert_to lines for each. I edited the equestrian entries in descr_srtat to match.
What I get for my efforts in the system.log.txt is "[data. invalid] [error] Building load failed as id "equestrian" not recognized" on four entries.
Sorry for the handholding, but to which files in the text folder are you referring?

alpaca
01-10-2007, 21:57
I'm referring to export_buildings.txt
That error message is a bit strange though, do a windows search for files containing "equestrian" to get an idea of what you need to change.

irishron2004
01-11-2007, 03:06
I tried a quick edit of the export_buildings.txt with the same results. The error message i listed earlier happened when I tried to load a saved game. The changes so far are not save compatible. Looks like I have my work cut out for me on my next weekend. This will probably include the unit card folders.

alpaca
01-11-2007, 21:51
No, they're not save-game compatible. I should maybe mention that somewhere in a tutorial. You can basically assume that most things you mod will not be save-game compatible (everything that is is an anomaly ;))

The error crops up because settlements say they have a building called "equestrian", but since you removed that, the game doesn't know what to make of it.

irishron2004
01-17-2007, 14:17
I have removed the "castle" from the missile buildings to see if they could be built by both city and castle. So far, this will let you build a boyer in a city but will not upgrade. In this configuration for equestrian buildings, if you convert a castle with a stables, it will keep it, but it will not upgrade and will not start in a city.

irishron2004
01-18-2007, 02:55
In trying to give both cities and castles stables, I have modded building_battle.txt, export_building.txt, export_descr_buildings.txt, copied and renamed the appropiate ui subfolders and the techtree subfolders. To my dismay they still do not show up in the building window. The system.log.txt gives no clue. RTW had afile that tied all this together but I don't see it right now. About the onle things that I have not edited are advice and ancillaries.

irishron2004
01-25-2007, 16:58
Here are a few things I have learned:
1. Equestrian buildings can be built in cities 2 ways,
a. Remove the castle label from each building and remove the building_present_min at the end after the factions.
b. If you want different units for city and castle, need a new set of buildings just like the castle ones with the city label. You have to also change the building_present_min.
Export_descr_buildings.txt and export_buildings.txt. have to match. Also need cards in ui/<faction name>/buildings to match names.
2. The above also works for giving cities missile buildings and castles market buildings and taverns.
3. There is a thread for adding highways and it does work. Same as 1b.

Re Berengario I
04-10-2007, 21:07
Ok, here we goes with some discoveries (1.1 patch, PIF values in descr_settlement_mechanics.xml set to 1.0):

- taxable_income_bonus displays correctly but has no effect

- income_bonus doesn't display correctly (Instant income bonus %d florins +<bonus>) but it correctly adds the <bonus> as neat income coming from buildings.

- trade_level_bonus doesn't display the bonus but it works (land trade only), even if the formula used is still a mistery to me (with a bonus of 1 a land trade income of 52 raised to 181).

- trade_base_income_bonus doesn't display the bonus but it works (all kind of trades), the bonus appears to be a 10% on the trade income.

- farming_level. Base farming level is set in descr_regions.txt and it gives 80 florins (average harvest) for each point. So each farming_level bonus point increase the incomes of 80 florins. Btw, there's no bonus points limit to 5, I managed to give 10 bonus points but it seems they don't add up if they're on different buildings (at least 10 points in the walls and 1 point in land clearance didn't add up in my test).

- weapon_missile_mechanical displays correctly the bonus but whatever value you put there the retrained missile unit will gain 1 point in melee attack on its card. How this translate in real combat is left to further experiments (I wonder if it's the same as armor upgrades).

- population_loyalty_bonus displays correctly the bonus but doesn't seem to work just like in RTW.

MikeV
11-03-2007, 16:57
Does anyone have the full grammar for the export_descr_buildings.txt file?
It would save a lot of time. :yes:

alpaca
11-03-2007, 19:58
Most of it can be found in Dol Guldur's (I hope I recall the author correctly) "Ultimate EDB guide" in the RTW scriptorium. There's some new stuff like the event_counter requirement but it should tell you most things.

nikolai1962
11-06-2007, 22:27
trade_level_bonus doesn't display the bonus but it works (land trade only), even if the formula used is still a mistery to me (with a bonus of 1 a land trade income of 52 raised to 181).


This is the bonus you get from building roads, Not normally displayed as it is part of road level it seems. Not sure if it stacks with "road level" but i used it in RTW for desert regions where i'd disallowed roads and added this to a "caravan stop" type building. I think it's a 100% bonus for paved roads and 150% for highways and this bonus follows that pattern IIRC

blacksnail
12-07-2007, 15:09
I have no idea if this thread is still being updated, but the max number of buildings allowed in a complex is actually 9.

alpaca
12-08-2007, 00:41
I have no idea if this thread is still being updated, but the max number of buildings allowed in a complex is actually 9.
Yeah, fits my observations.