I've done some testing with the 'not' command and here's what I've found.
1) The not command does work. 'and not building_present_min_level market market' will prevent you from constructing this building if a market is present.
Also every upgrade does not require a seperate 'not' command. So if the 'not' command is used to stop a Road being upgraded if a Market is present you cannot circumvent this by upgrading the Market to a Fairground, then constructing a Road and upgrade it.
2) If the not command is attached to the first level of a building then it becomes impossible to construct that building. For example:
Code:
building hinterland_roads
{
convert_to hinterland_castle_roads
levels roads paved_roads highways
{
roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and not building_present_min_level market market
{
convert_to 0
capability
{
road_level 0
}
material wooden
construction 2
cost 2400
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
trade_base_income_bonus bonus 1
}
material wooden
construction 4
cost 4800
settlement_min city
upgrades
{
}
}
}
plugins
{
}
}
Will prevent the player building roads and may cause the mod to CTD.
3) Upgrades with the not command do not appear in the tech tree menu but can be constructed. For example:
Code:
building hinterland_roads
{
convert_to hinterland_castle_roads
levels roads paved_roads highways
{
roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }
{
convert_to 0
capability
{
road_level 0
}
material wooden
construction 2
cost 2400
settlement_min town
upgrades
{
paved_roads
}
}
paved_roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } and not building_present_min_level market market
{
convert_to 1
capability
{
road_level 1
trade_base_income_bonus bonus 1
}
material wooden
construction 4
cost 4800
settlement_min city
upgrades
{
}
}
}
plugins
{
}
}
The 'roads' can be constructed but 'paved roads' cannot be constructed if there is a market in the settlement. However M2TW does not tell the player in the tech tree menu that you cannot have Paved Roads if a Market is present (though it does tell you if a building is required).
4) The not command does not prevent you from adding a building to a settlement in the 'descr_strat' file, so if you used the code in 2) a player could start with roads but could not build them.
5) I haven't tested the not command in conjunction with events but you may want to put a double space between the event and the not building command, so it's:
and event_counter governor_present 1 and event_counter tokus_franciscan_order 1 and not building_present_min_level ordo_dominicana hermit_dom
If that doesn't work and it's not attached to a first level building try putting the not command part before the events.
6) I'm currently testing whether the not command works with religious buildings (ones that promote a religion). M2TW seems to have a problem with mulitple religious buildings, as it kept telling me I had a gap in my tech tree.
Here's another thread about the not command:
http://www.twcenter.net/forums/showt...n_level&page=2
Personally I prefer to use buildings with multiple upgrades, since it's impossible to have two versions of the same building in a settlement at the same time.