Hello all. Here are the questions:
- Is it posible to destroy your own walls building via script?
- Is it possible to revert a settlement reducing its level, from large city to town for example?
I'll appreciate any help you can provide
Hello all. Here are the questions:
- Is it posible to destroy your own walls building via script?
- Is it possible to revert a settlement reducing its level, from large city to town for example?
I'll appreciate any help you can provide
FOLLOWERS OF THE WHITE HAND - Isengard Submod
No, you can't destroy a specific building in a specific place with the script. The command destroy_building only works on a faction-wide basis.
No, I don't believe you can reduce the level of a building, see above for why you can't destroy it then script in a replacement.
Script can't destroy wall buildings at all. All other types it can.
http://www.twcenter.net/forums/showt...-of-settlement
Levels can't go back. The only possibility would be, using your example, to covert Large Town (LT) to a Motte & Bailey (MB), then from MB to Town. But there is no LT->MB conversion building and all my attempts to create one failed. I don't know if I tried to create that exact one, but it was some kind of convert-to-lower-level experiment.
There's no MB->Town conversion either but there is MB->Village. Still, no use if you can't convert down to MB.
Thank you both for your answers. That's a shame, I would like to downgrade settlements. If I understood you corectly this cannot be achived, can't it? Maybe just destroy buildings and lower population via script, but they will still be "big" cities, not Little towns you can later upgrade.
Can the destroy_buildings command destroy roads, farms, mines...directly or should EDB be modified earlier and remove the hinterland attribute? I read your link but not sure I understood this point.
FOLLOWERS OF THE WHITE HAND - Isengard Submod
You can't destroy anything with hinterlands.
Again, destroy_buildings will destroy every instance of that building that the faction holds. It can't be directed at a particular settlement (which is why it's largely useless).
The use I may give the command may be factionwise, so that may not be an issue. So in order to destroy them I should errase the hinterlands entry on EDB?
Thanks
FOLLOWERS OF THE WHITE HAND - Isengard Submod
No, there is no need to remove hinterlands_ in EDB. That just prevents the player/AI from destroying them. Script's destroy_buildings can destroy anything, whether it is hinterland or not, including farms, roads and mines - just not wall buildings.
However, destroying the road buildings might not remove the roads themselves from the regions. Fairly sure I tested that once. I believe that, like wall buildings, it isn't the presence of the building that makes the roads exist in the region, it's the act of completing the building's construction that triggers the game to make some changes (build roads on the map). Once that's done the building doesn't need to exist for roads to exist.
And that might also apply to mines (mining models) and farms (cultivated land textures). I haven't tested those. Or are they like ports where destroying them does change the model (back to fishing village)?
Thank you for the detailed answer. I cannot test at the moment. So the visuals will remain, but what about the effects? Will they dissapear with the building?
On another note, can you take track of what provinces have been affected by the destroy_buildings (as it has faction effect)? Maybe with another monitor_event or an if where the condition is Building Destroyed or something like that?
FOLLOWERS OF THE WHITE HAND - Isengard Submod
The other thing that would need testing, with roads for example, is if a region has dirt roads and the building is destroyed, then when the building is later re-built does the game now show roads as paved roads? Because it knows that roads already exist on the map, so does it see this construction as being an upgrade (to paved roads)? I doubt it.
The EDB capabilities would disappear. Movement bonus though? Not sure.So the visuals will remain, but what about the effects? Will they dissapear with the building?
BuildingDestroyed is not triggered by scripted destroy_buildings.On another note, can you take track of what provinces have been affected by the destroy_buildings (as it has faction effect)? Maybe with another monitor_event or an if where the condition is Building Destroyed or something like that?
The only way, I think, is to track which settlements DO have it and do belong to the faction you're going to destroy them in. Then, after the destruction, those that did have it you know have now lost it.
e.g. Destroying roads for england-owned London, York and Nottingham in a FactionTurnStart...
Code:declare_counter has_roads_London declare_counter has_roads_York declare_counter has_roads_Nottingham monitor_event PreFactionTurnStart FactionType england set_counter has_roads_London 0 set_counter has_roads_York 0 set_counter has_roads_Nottingham 0 end_monitor monitor_event SettlementTurnStart FactionType england and SettlementName London and SettlementBuildingExists >= roads set_counter has_roads_London 1 end_monitor monitor_event SettlementTurnStart FactionType england and SettlementName London and SettlementBuildingExists >= c_roads set_counter has_roads_London 1 end_monitor monitor_event SettlementTurnStart FactionType england and SettlementName York and SettlementBuildingExists >= roads set_counter has_roads_York 1 end_monitor monitor_event SettlementTurnStart FactionType england and SettlementName York and SettlementBuildingExists >= c_roads set_counter has_roads_York 1 end_monitor monitor_event SettlementTurnStart FactionType england and SettlementName Nottingham and SettlementBuildingExists >= roads set_counter has_roads_Nottingham 1 end_monitor monitor_event SettlementTurnStart FactionType england and SettlementName Nottingham and SettlementBuildingExists >= c_roads set_counter has_roads_Nottingham 1 end_monitor monitor_event FactionTurnStart FactionType england destroy_buildings england hinterland_roads false destroy_buildings england hinterland_castle_roads false if I_CompareCounter has_roads_London = 1 ;London had roads and now do not end_if if I_CompareCounter has_roads_York = 1 ;York had roads and now do not end_if if I_CompareCounter has_roads_Nottingham = 1 ;Nottingham had roads and now do not end_if end_monitor
Thanks, I think this will do!
FOLLOWERS OF THE WHITE HAND - Isengard Submod