Results 1 to 8 of 8

Thread: Scripted Fort

  1. #1

    Default Scripted Fort

    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?

  2. #2
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Scripted Fort

    Keep dreaming

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Scripted Fort

    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....










  4. #4

    Default Re: Scripted Fort

    Awww, that hurts!

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Scripted Fort

    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...










  6. #6
    Callistonian's Avatar Ducenarius
    Join Date
    May 2018
    Location
    somewhere in the continental US
    Posts
    944

    Default Re: Scripted Fort

    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.

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,095
    Blog Entries
    35

    Default Re: Scripted Fort

    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.
    Last edited by Gigantus; September 15, 2021 at 10:29 PM.










  8. #8
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Scripted Fort

    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 )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •