Hi,
How does one go about scripting a (permanent) fort to a specific location, triggered by the construction of a specific building only available in one region?
Printable View
Hi,
How does one go about scripting a (permanent) fort to a specific location, triggered by the construction of a specific building only available in one region?
Keep dreaming
Yeah, sorry: you can only specify fort locations in the descr_strat file and you can only 'spawn' buildings in settlements, eg based on the EDB. Would be nice, though....
Awww, that hurts!
The only way I could think of is to spawn a labeled character facing a defined direction and then trying to figure out how to script the steps necessary to build a fort. Opening the required scroll and simulating mouse clicks on the required element...
We lack the necessary UI elements for such a script. The scroll can be opened, but there is no element for switching between fort and watchtower and even if we remove watchtower as an option (so fort is automatically selected) there is no element for the accept button (which is a perennial problem for UI scripts). Such a script also assumes that we make forts available to be constructed normally - this could potentially be addressed with a UI script for the player (immediately close needed scrolls) and increasing the cost of the fort to a very high value for the AI. But without the UI elements to click on, this is futile.
Yeah, it was a long shot - UI scripting is patchy at best. Took me a good while to get my 'no retreat' script right where you automatically accept 'attack' for scripted battles in 1648.
Does the AI ever build forts tho? And is it affected by merge_fort_priority_offset in descr_campaign_ai_db (which mainly influences how much does AI wants to garisson forts)? If so, you could possibly have a custom AI label, that likes to garrison/build forts (I read somewhere that with defend decision defend_fortified it likes to build forts as well?), and you could use link_faction_ai to temporarily change the ai label of an AI faction to make them build a fort, tho forcing them to do it as a specific location would still be a major issue (perhaps if a general is spawned on the tile, he might do it or he might not... really too many ifs there :laughter:)