Announcement

Collapse
No announcement yet.

Layouts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Layouts

    Has anyone been in here yet?
    Call To Power\ctp_data\english\uidata\layouts

    When I tried to make trade icons (using UPBA5608 to UPBA5640), I found that many on-screen and in-game graphics were overwritten. Puzzled, because I checked all files, pic, icons, etc., which would use these numbers, so I snooped around & came across this file. Had to blow CTP away and reinstall...

    Anyway, there's all sorts of goodies in this file--for anyone who's interested or just bored, have a look. (Also, good place to check before you start making any graphic material and plan to use upba, upa, and such.)



    [This message has been edited by Nordicus (edited January 08, 2000).]
    Existence is Futile.

  • #2
    Oh, here's from diplomacy.ldl, part of what caused my trouble:

    template DIP_RANGER:T_FONT5_DIPLOMACY {

    bool alwaysranger true


    rangery {

    int widthpix 15

    int heigthpix 15

    string type "scroller"

    string orientation "vertical"

    string pattern "upba5605.tga"

    incy {

    int widthpix 15

    int heightpix 15

    string pattern "upba5605.tga"

    }

    decy {

    int widthpix 15

    int heightpix 15

    string pattern "upba5605.tga"

    }

    # thumb {

    # string image0 "upba5613.tga"

    # string imagebltflag "chromakey"

    # }

    }

    }
    Apparently, all font colors, etc., are in these as well. Sizes of every window, menu, message, too. Maybe there's a way to include 32 civs thru this...?
    Well, a thought.

    [This message has been edited by Nordicus (edited January 08, 2000).]
    [This message has been edited by Nordicus (edited January 15, 2000).]
    [This message has been edited by Nordicus (edited January 15, 2000).]
    Existence is Futile.

    Comment


    • #3
      I have seen an example from the tutorial SLIC where they use Attract() to call one of the button within the ControlPanel.ldl.

      Seem like these ldl files are some kind of built-in routines that we can call out quite similar to Object Oriented Programming.

      Comment


      • #4
        Dreamer,
        You might be on to something very interesting here. Because if it is true what you're saying, that means we can create our own screens (e.g. for viewing unit-stacks or displaying city-information) by putting the code for these screen in these ldl-files. All we have to do is figure out how to write code for these files
        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

        Comment


        • #5
          Locutus, Dreamer...hey.

          Yes, I knew this had potential

          Here is from "gameplayoptions.ldl":


          GamePlayOptionsWindow {
          string pattern "upba6417.tga"
          string xanchor "center"
          string yanchor "center"
          int widthpix 390
          int heightpix 225
          int xpix 528
          int ypix 451
          Name:T_FONT4_POPTITLE {
          string parent "c3_PopupTitle"
          string xanchor "center"
          string yanchor "top"
          int widthpct 50
          int heightpix 20
          string text "str_ldl_GAMEPLAY_OPTIONS"
          }
          Background {
          string image0 "upba2710.tga"
          int xpix 93
          int ypix 0
          }
          AcceptButton {
          int xpix 404
          int ypix 217
          int widthpix 48
          int heightpix 19
          int bevelwidth 0
          string imagebltflag "chromakey"
          string image0 "upbb2303.tga"
          }
          TutorialButton:GAMEPLAY_CHECKBOX {
          int ypix 40
          stringtable {
          string string0 "str_ldl_Tutorial_Advice_Off"
          string string1 "str_ldl_Tutorial_Advice_On"
          }
          }
          LeftRightClickMoveButton:GAMEPLAY_CHECKBOX {
          int ypix 40
          int xpix 30
          stringtable {
          string string0 "str_ldl_Right_Click_Move"
          string string1 "str_ldl_Left_Click_Move"
          }
          }
          AutoCycleTurnButton:GAMEPLAY_CHECKBOX {
          int ypix 70
          int xpix 30
          stringtable {
          string string0 "str_ldl_Auto_Cycle_Turn_Off"
          string string1 "str_ldl_Auto_Cycle_Turn_On"
          }
          }
          AutoCycleUnitsButton:GAMEPLAY_CHECKBOX {
          int ypix 100
          int xpix 30
          stringtable {
          string string0 "str_ldl_Auto_Cycle_Units_Off"
          string string1 "str_ldl_Auto_Cycle_Units_On"
          }
          }
          BattleViewButton:GAMEPLAY_CHECKBOX {
          int ypix 130
          int xpix 30
          stringtable {
          string string0 "str_ldl_Battle_View_Off"
          string string1 "str_ldl_Battle_View_On"
          }
          }
          MonumentButton:GAMEPLAY_CHECKBOX {
          int ypix 130
          int xpix 200
          stringtable {
          string string0 "str_ldl_Monument_Screen_Off"
          string string1 "str_ldl_Monument_Screen_On"
          }
          }
          BattleViewAlwaysButton:GAMEPLAY_CHECKBOX {
          int ypix 160
          int xpix 30
          stringtable {
          string string0 "str_ldl_Show_All_Battles_Off"
          string string1 "str_ldl_Show_All_Battles_On"
          }
          }
          MouseSpeedSlider {
          int xpix 202
          int ypix 89
          int widthpix 160
          int heightpix 38
          int maxxval 15
          int maxyval 0
          int pagexval 1
          int pageyval 1
          int xval 5
          string pattern "upba6417.tga"
          string type "slider"
          string orientation "horizontal"
          bool rigidthumb TRUE
          bool quantizedrag TRUE
          int minthumbsize 9
          int ticks 0
          thumb {
          int widthpix 9
          int heightpix 40
          string image0 "upba2513.tga"
          string imagebltflag "chromakey"
          }
          }
          MouseSpeedName:T_FONT1_91 {
          int xpix 194
          int ypix 74
          int widthpix 102
          int heightpix 20
          int srcxpix 95
          int srcypix 100
          int srcwidthpix 160
          int srcheightpix 20
          string pattern "upba6417.tga"
          string text "str_ldl_Mouse_Speed"
          }
          AutoSaveButton:GAMEPLAY_CHECKBOX {
          int ypix 160
          int xpix 200
          stringtable {
          string string0 "str_ldl_Autosave_Off"
          string string1 "str_ldl_Autosave_On"
          }
          }
          LeftHandedMouseButton:GAMEPLAY_CHECKBOX {
          int ypix 40
          int xpix 200
          stringtable {
          string string0 "str_ldl_Left_Handed_Mouse_Off"
          string string1 "str_ldl_Left_Handed_Mouse_On"
          }
          }
          }


          $

          I think it may be possible to add diplomacy buttons/options, triggered perhaps with Slic, as well as, like the above, gameplay options (like that option Markos wanted--another option aside from, in the option window, Bloodlust on/off and Pollution/on off--when he wanted to conquer the world but not his ally...an "Allied Victory on/off" button). O the possibilities!

          How about an END ALLIANCE option?!

          Here's something quite neat from "civ3.ldl":
          (wonder why it's called "civ3" here...?)

          #######################################
          # File: C:\civ3_project\civ3_data\english\uidata\layouts\c iv3.ldl
          # Last Access: Mon Jun 01 13:01:30 1998
          #######################################
          ##-----------------------------------##
          ## Imports ##
          ##-----------------------------------##
          import "font1.ldl"
          import "font2.ldl"
          import "font3.ldl"
          import "font4.ldl"
          import "font5.ldl"
          import "font6.ldl"

          import "ctp_template.ldl"

          import "buttonbank.ldl"
          import "controlpanel.ldl"
          import "tradescreen.ldl"
          import "ancient.ldl"
          import "cityview.ldl"
          import "cvscreen.ldl"
          import "citystatus.ldl"
          import "queuewin.ldl"
          import "unitstatus.ldl"
          import "greatlibrary.ldl"
          import "messagebox.ldl"
          import "helptile.ldl"
          import "diplomacy.ldl"
          import "fliwindow.ldl"
          import "science.ldl"
          import "statswindow.ldl"
          import "spnewgame.ldl"
          import "scenario.ldl"
          import "custommap.ldl"
          import "options.ldl"
          import "graphics.ldl"
          import "sound.ldl"
          import "gameplayoptions.ldl"
          import "loadsave.ldl"
          I wonder...


          ------------------
          "There can be no maximum of creation without a concomitant maximum of destruction, no supreme good without supreme evil"--Heller, paraphrasing Nietzsche.

          "The more passion for the argument, the less evidence for it"--Russel.


          "I *may* have solved some of the problem with specialists tonight. Then again, I may have screwed things up- I don't know. If that happens, I won't know whether to laugh, cry, or both. God, I'm starting to sound like Nordicus (the horror!). "--Wes Whitaker, during AAIPs testing.


          [This message has been edited by Nordicus (edited January 15, 2000).]
          [This message has been edited by Nordicus (edited January 19, 2000).]
          Existence is Futile.

          Comment


          • #6
            I'll have a look at these ldl-files when I have the time. In the meantime, could you change the color of the civ3.ldl? It's almost painfull to look at it, at least the way my browser displays it
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • #7
              Locutus is right about the color; it's almost unreadable.

              Comment


              • #8
                Bad news, the Attract() function is not used to call the UI components in those idl files.

                If you have played the tutorial scenario, CTP uses the Attract() to create a blinking green box around the UI components to capture the player attention on certain buttons or screen controls while the tutorial explained their features.

                Guess we'll have to find other ways to call these UI components.

                Comment


                • #9
                  I went through the ldl-files last night, but they didn't make much sense to me. Not really a problem, once we can call our own windows, it shouldn't be difficult to find out how it all works, but I have no idea how to do that. I will look at it again tonight, maybe I have more luck this time.

                  Locutus
                  Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                  Comment


                  • #10
                    These is some notes I made:
                    In script.slc, there is some lines like:
                    helpbox 'ControlPanelWindow.CityUnitSelectedTabGroup.Units Tab' { Text(ID_HELP_CP_UNITSTAB);}
                    And in controlpanel.ldl

                    ControlPanelWindow {
                    # string xanchor "left"
                    # string yanchor "bottom"
                    string pattern "upba3010.tga"
                    int xpix 264
                    int ypix 618
                    int widthpix 709
                    int heightpix 150
                    CityUnitSelectedTabGroup {
                    int xpix 143
                    int ypix 4
                    int widthpix 456
                    int heightpix 142
                    bool autoarrange FALSE
                    CivTab:CP_TAB {
                    int xpix 6
                    int ypix 0
                    int widthpix 72
                    string parent "ControlPanelWindow"
                    string text "str_ldl_CIV"
                    [...]
                    }
                    UnitsTab:CP_TAB {
                    int xpix 378
                    int ypix 0
                    int widthpix 72
                    int heightpix 14
                    string parent "ControlPanelWindow"
                    string text "str_ldl_CAPS_UNITS"
                    [...]
                    }
                    [...]
                    }

                    May be we could open some user-defined windows by using helpbox.

                    In tutorial_more.slc I found

                    trigger 'TRightClick' on "GamePlayOptionsWindow.LeftRightClickMoveButton" when (g.player == g.tutorialplayer) {
                    DisableTrigger('TRightClick');
                    Message(g.tutorialplayer, 'ARightClick');
                    }


                    And GamePlayOptionsWindow.LeftRightClickMoveButton is defined in gameplayoptions.ldl by

                    LeftRightClickMoveButton:GAMEPLAY_CHECKBOX {
                    int ypix 40
                    int xpix 30
                    stringtable {
                    string string0 "str_ldl_Right_Click_Move"
                    string string1 "str_ldl_Left_Click_Move"
                    }
                    }

                    May be we could add a new button in an ldl file and use it in a slic file
                    [This message has been edited by slamp (edited January 18, 2000).]
                    Apolyton QuickStart for CTP PBEM

                    Comment


                    • #11
                      slamp,

                      You might be on to something here, I'll do some testing on that tonight. I actually have some (Note: some, not very much ) good hope that this may eventually work. And that would be great, I already have a whole range of options for how to use this.

                      Locutus
                      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                      Comment


                      • #12
                        Slamp,

                        Here is the SLIC code which is relevant:

                        Trigger 'name' on "UI Component Name" when (expression) {
                        commands
                        }
                        This is a special format trigger for triggering by UI components. It behaves in the same way as the normal format, except that it is only evaluated when the UI component is used. The name follows the same rules as for message boxes.
                        The body of the trigger is executed only when the expression is true (not equal to 0).

                        VOID Attract(ldlname)
                        Draw a highlight box around the named UI component.

                        VOID DisableClose()(Messages only)
                        Disallow closing this message from the UI.

                        So it appears it might be possible to actually do something with this.



                        ------------------
                        Don, Apolyton Junkie

                        Don,
                        CtPMaps (Hosted by Apolyton)

                        Comment


                        • #13
                          Color changed--I don't think I looked at that after posting...quite harsh indeed.
                          Existence is Futile.

                          Comment


                          • #14
                            Bump************

                            Has anyone had any luck with calling ui components???

                            I am trying to think of a way to have a scenario screen with a custom picture (kinda like in a civ2 scenario)pop up on the first turn. Is there any way to do this.

                            ------------------
                            Gemini

                            Comment


                            • #15
                              Well, I have tried and tried, but failed, to place any new info on my schreens.
                              You can however create a custom mesage box with whatever background picture you like and then use slic in your mod/scenario to display info there.
                              I havn't messed with that, but download PowerSLIC and have a look.

                              Visit my CTP-page and get TileEdit and a few other CTP related programs.
                              Download and test SpriteEdit development build.

                              Comment

                              Working...
                              X