1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Information on the script.txt

Discussion in 'Civ3 - Tutorials, Reference, & Guides' started by Nathiri, Sep 7, 2015.

  1. Nathiri

    Nathiri Commander

    Joined:
    Oct 7, 2014
    Messages:
    713
    Gender:
    Male
    Location:
    Georgia, US
    Recently I have been looking into the script.txt to see what more I can do to modify menus in civ3. I found quite a bit of information and thought I would put it here as a reference for others that may want to make their popup menus look a little different than the default.

    In the script.txt it mentions 'control lines' but it doesnt list them or say what certain ones do. I have compiled a list of control lines and what function I have found for them.

    I have tried these control lines in the main menu popup. Some of them probably work better in other popups.

    ->>script.txt updates while in scenario when you have the particular menu closed. Can edit popups and check how they look without leaving game.

    #caption - used for titles of menus
    #xs - size of popup window. More of how wide, the vertical size is by how much content it contains.
    #x/#y - position of window on screen
    #text - used to add text to popup windows, can be added to many windows including main menu.
    #itemlist - provides a list of items with a button symbol. text inclosed in {} are underlined. Will not link to any menu unless it is already targeted by the game in that position. Also, it seems to only work in a popup that can support this. If placed in the Scenario Introduction popup it crashes game.
    #listbox - gets rid of button symbols in main menu and if a number is added after the initial command, it adds a scrolling bar. The size of the scrolling box is done by the number. If no number is put, the list is fully shown. This command seems to function similarily to itemlist, but it doesnt crash in the Scenario Introduction popup and it makes no change to the look of this particular popup.
    #button - makes a silver button box? seems to be horizontal on window only? attempts to use this on Main Menu to replace the existing buttons have been difficult. Using this command in addition to itemindex have worked for 1 button, but not the 2nd button. Either the 2nd button does not work, or it replaces both buttons with the itemindex that you intended for the 2nd button. The other problem though is that the 'Map' menu seems to link to the itemindex of that button and will not go to its proper menu.
    #comment - can make a message in the textfile for reference.
    #advisor Domestic Angry - brings up advisor onto a popup window. Will auto menu to far right and remove caption title and replace with name of advisor.
    #advisor Domestic Surprised
    #advisor Domestic Sad
    #advisor Domestic Happy
    #advisor Domestic
    #advisor Military Angry
    #advisor Military Happy
    #advisor Military Sad
    #advisor Military Surprised
    #advisor Military
    #advisor Foreign Angry
    #advisor Foreign Happy
    #advisor Foreign Sad
    #advisor Foreign Surprised
    #advisor Foreign
    #advisor Science Happy
    #advisor Science Sad
    #advisor Science Surprised
    #advisor Science Angry
    #advisor Science
    #advisor Trade
    #advisor Trade Happy
    #advisor Trade Sad
    #advisor Trade Surprised
    #advisor Trade Angry
    #advisor Cultural
    #advisor Cultural Sad
    #advisor Cultural Happy
    #advisor Cultural Surprised
    #advisor Cultural Angry
    #advisor Sad
    #advisor Happy
    #popup_center - will move window to center of screen regardless of set coordinates.
    #itemindex 1 - When tested in Main Menu, linked to 'Load Game'
    #itemindex 2 - When tested in Main Menu, linked to 'New Game'
    #itemindex 3 - When tested in Main Menu, linked to 'Preferences'
    #itemindex 4 - When tested in Main Menu, linked to 'Retire'
    #itemindex 5 - When tested in Main Menu, linked to 'Save Game'
    #itemindex 6 - When tested in Main Menu, linked to 'Quit'
    #itemindex 7 - Nothing Happens etc

    #map_center 1 - function unknown? tried in Main Menu popup. Sounds like it is used for certain popups that put screen in the centre of map, but it did not do that when used in Main Menu popup.
    #wave 1 - function unknown? tried in Main Menu popup
    #active 1 - function unknown? tried in Main Menu popup

    Very simple to add to any popup and as requested images showing the script.txt are shown below.

    menu1.jpg menu2.png menu3.png menu4.png script.txt1.png script.txt2.png script.txt3.png

    If you find anymore control lines or think any additional information should be put here, I will be happy to update the post.
     
  2. T-mun

    T-mun King Numa

    Joined:
    Aug 13, 2004
    Messages:
    2,300
    Location:
    France
    Nathiri you did a very good job collecting this data. It is nice to have it here, and I've bookmarked it for future reference. It could also go straight into the modding wiki I think.
     
  3. Nathiri

    Nathiri Commander

    Joined:
    Oct 7, 2014
    Messages:
    713
    Gender:
    Male
    Location:
    Georgia, US
    Thanks, hopefully people will find some uses for this.
     
  4. Balthasar

    Balthasar Wise Man

    Joined:
    Mar 11, 2005
    Messages:
    3,293
    Bookmarked. Excellent work, Nathiri. I'd like to see some examples of how the script actually looks after you've changed it.
     
  5. Nathiri

    Nathiri Commander

    Joined:
    Oct 7, 2014
    Messages:
    713
    Gender:
    Male
    Location:
    Georgia, US
    Thanks. I only wish there was more that could be done to menus.

    So you are saying you would like to see how the textfile itself looks with the settings used in those images? I could put that together.
     
  6. Balthasar

    Balthasar Wise Man

    Joined:
    Mar 11, 2005
    Messages:
    3,293
    Yes, thank you.
     
  7. Nathiri

    Nathiri Commander

    Joined:
    Oct 7, 2014
    Messages:
    713
    Gender:
    Male
    Location:
    Georgia, US
    Post updated with the new images.
     
  8. Thrust123

    Thrust123 Prince

    Joined:
    Apr 21, 2004
    Messages:
    383
    Gender:
    Male
  9. Balthasar

    Balthasar Wise Man

    Joined:
    Mar 11, 2005
    Messages:
    3,293
    Thrust123's belated post has reminded me that I forgot to thank you for the updated posts a year ago. Thank you!
     

Share This Page