Results 1 to 2 of 2

Thread: Open building infoscroll for a specific building via script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Open building infoscroll for a specific building via script

    OK, I've been struggling trying to figure out, how to be able to bring up the info scroll of a building using a script, and have been wondering if it's even possible. Looking through the script commands it seems like it should be possible. The specifics of the script are check if the building exists, if it does open it's info scroll.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  2. #2
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Open building infoscroll for a specific building via script

    There is no command to open a scroll by its name. You can only access scrolls via buttons, using select_ui_element button_name and simulate_mouse_click commands. As far as I can tell, there are no addressable UI elements for the individual building cards in the hud_show_buildings_tab. If you try to right-click on hud_show_buildings_tab itself, you get the settlement list scroll instead.

    What you can do, though, is tell the user to look at the description with something like...

    Code:
    monitor_event SettlementTurnStart SettlementIsLocal
              and SettlementBuildingExists = building1_from_edb     ; or SettlementBuildingFinished
              and I_ThreadCount building1_Thead = 0
        e_select_settlement
        point_at_card building building1_from_edb
        advance_advice_thread building1_Thead
    end_monitor
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

Posting Permissions

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