Can't get subwindows working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • epatton
    Rookie
    • Sep 2017
    • 21

    Can't get subwindows working

    Hi, I'm sure I am making a very basic mistake, but I can't get the subwindows to open, despite toggling an 'X' for different Term windows.

    I am running angband 4.1.0 on Linux Mint, and angband is invoked through the Bash shell with 'angband' at the shell prompt, and no other arguments. Do I need to pass any other flags or parameters?
  • AnonymousHero
    Veteran
    • Jun 2007
    • 1393

    #2
    Originally posted by epatton
    Hi, I'm sure I am making a very basic mistake, but I can't get the subwindows to open, despite toggling an 'X' for different Term windows.

    I am running angband 4.1.0 on Linux Mint, and angband is invoked through the Bash shell with 'angband' at the shell prompt, and no other arguments. Do I need to pass any other flags or parameters?
    IIRC you have to use a graphical front end; I don't think the "curses" frontend (which is you get in the terminal by default) supports multiple subwindows.

    You could try

    Code:
    angband -mx11 -n4
    (Not sure for the other frontends.)

    Comment

    • Gwarl
      Administrator
      • Jan 2017
      • 1025

      #3
      Originally posted by AnonymousHero
      IIRC you have to use a graphical front end; I don't think the "curses" frontend (which is you get in the terminal by default) supports multiple subwindows.
      It does, but it displays them as sections of a single terminal. SDL does something similar.

      ./angband -mgcu -- -n4

      the "--" is important because it tells the program you're supplying subopts.

      Comment

      • epatton
        Rookie
        • Sep 2017
        • 21

        #4
        Originally posted by Gwarl
        It does, but it displays them as sections of a single terminal. SDL does something similar.

        ./angband -mgcu -- -n4

        the "--" is important because it tells the program you're supplying subopts.
        Thanks! It was not at all obvious from the command line help to use the double dash and single dash together. I am restricted to 3 subwindows at a time, but this is a much, much better playing experience than before.

        Comment

        • AnonymousHero
          Veteran
          • Jun 2007
          • 1393

          #5
          Originally posted by Gwarl
          It does, but ...
          Ah, the code has been improved since the ToME (or Pern, I suppose) split-off then . Apologies for the misinformation -- I was too lazy to try it.

          Comment

          • Gwarl
            Administrator
            • Jan 2017
            • 1025

            #6
            Originally posted by AnonymousHero
            Ah, the code has been improved since the ToME (or Pern, I suppose) split-off then . Apologies for the misinformation -- I was too lazy to try it.
            I haven't gotten round to compiling your 2.4.0 release yet, but your 2.3.6 release contains this functionality

            Comment

            • AnonymousHero
              Veteran
              • Jun 2007
              • 1393

              #7
              Originally posted by Gwarl
              I haven't gotten round to compiling your 2.4.0 release yet, but your 2.3.6 release contains this functionality
              WAT? I guess it's because I never play GCU, but I could have sworn...

              /me goes on to swiftly remove GCU just to suppress the evidence...

              Comment

              • Gwarl
                Administrator
                • Jan 2017
                • 1025

                #8
                Originally posted by epatton
                Thanks! It was not at all obvious from the command line help to use the double dash and single dash together.
                It's in there:

                Code:
                Usage: angband [options] [-- subopts]
                But it's not particularly explicit or eye-catching.

                Comment

                • Gwarl
                  Administrator
                  • Jan 2017
                  • 1025

                  #9
                  Originally posted by AnonymousHero
                  WAT? I guess it's because I never play GCU, but I could have sworn...

                  /me goes on to swiftly remove GCU just to suppress the evidence...
                  Please don't by the way, I'll send a PR when I update the gcu port to support 256-color terminals (you currently only support 16-colour terminals)

                  Comment

                  • AnonymousHero
                    Veteran
                    • Jun 2007
                    • 1393

                    #10
                    Originally posted by Gwarl
                    Please don't by the way, I'll send a PR when I update the gcu port to support 256-color terminals (you currently only support 16-colour terminals)
                    Not sure how far you are along, but I would be surprised if it's actually possible to support >16/32 (see below) colors without a huge amount of changes all over the place -- there are just soooo many hardcoded constants all over the place that assume this. The problem isn't so much that the GCU bit is limited... it's actually that there's actually a ridiculous amount of code that assumes no more than 16 colours (or is it 32? Basically 'attributes' in terms of the T2 code.).

                    I'm actually quite serious about removing GCU support, but it's probably not going to happen any time soon. FWIW, I'd be aiming towards a "headless" or "server" mode instead and then have any front ends be completely separate code bases. (GCU is problematic in this because it mandates a lot of special support by essentially mandating quantized colors, not having graphical overlays (like a targeting line which still shows the background), animated damage indicators, etc.

                    (... but as I say, this is wishlist-type stuff. In the mean time any code improvements would be appreciated! )

                    EDIT: Btw, even if you "only" have a work-in-progress branch, I'd encourage you to open a "WIP" pull request just to solicit feedback from me as soon as possible. I've learned a lot of really obscure and counterintuitive things about the T2 code base over the years, and I think it would be more helpful to learn about these obstacles as early as possible when attempting to make a sizable contribution. (Example: https://github.com/tome2/tome2/pull/6 . That's not to "call out" miramor or anything[1] -- it's just an absurdly convoluted code base and there are interactions that are almost impossible to foresee.)

                    [1] In fact, I think he's one of the most patient contributors I've ever experienced. Shout out to you!

                    EDIT#2: Even better example: I removed Alchemy as a skill... but as it turns out a totally-unrelated-to-Alchemy quest requires you to find "Essences" which are only exist in the game because of Alchemy. (I'm sure you can imagine the rest of the miserable tale )

                    EDIT#3: This is utterly off-topic to this thread (as is the tradition in these parts), so feel free to either start a new thread or maybe just keep it to PMs.
                    Last edited by AnonymousHero; September 29, 2017, 22:32.

                    Comment

                    • Gwarl
                      Administrator
                      • Jan 2017
                      • 1025

                      #11
                      Originally posted by AnonymousHero
                      This is utterly off-topic to this thread (as is the tradition in these parts), so feel free to either start a new thread or maybe just keep it to PMs.
                      I feel like the OP got his answer so I'll just reply briefly:

                      I actually just copied the 256-color support code from V by noticing which bits poschengband had copied from V. I didn't stop to figure out how it worked but I've made the transplant succesfully to over a dozen variants (all of them before a certain date are limited to 16 colours because ncurses was updated to support 256 colours more recently) including ToME 2.3.6 - the only changes required are in main-gcu.c and I assume you haven't messed with that much.

                      Basically:
                      I get 2.4.0, I get clang, make my alterations to the source, compile it, and if everything works I'll fork the tome repo so I can send a PR. Hopefully this weekend.

                      Comment

                      • smbhax
                        Swordsman
                        • Oct 2021
                        • 340

                        #12
                        I'm compiling the latest nightly in Cygwin, and can't seem to get subwindows working. The compile with curses succeeds, but I do get this:

                        *** The ncursesw5-config script installed by ncursesw could not be found
                        *** If ncursesw was installed in PREFIX, make sure PREFIX/bin is in
                        *** your path, or set the NCURSES_CONFIG environment variable to the
                        *** full path to ncursesw5-config.
                        Cygwin setup only offers ncursesw6, not 5, as far as I can tell.

                        Could that be what's preventing subwindows from working? When I try running

                        angband/src -mgcu -n3

                        or any other -nN number, it just repeats the -? options. And if I run the game without -nN, and try setting subwindows under =w, the toggles aren't there when I go back, and don't show up in-game.

                        (Sorry for being a horrible noob. : _)
                        My Angband videos

                        Comment

                        • backwardsEric
                          Knight
                          • Aug 2019
                          • 527

                          #13
                          Originally posted by smbhax
                          Could that be what's preventing subwindows from working? When I try running

                          angband/src -mgcu -n3

                          or any other -nN number, it just repeats the -? options. And if I run the game without -nN, and try setting subwindows under =w, the toggles aren't there when I go back, and don't show up in-game.
                          The module-specific options ("-n3" in this case) need to be separated from the regular options by "--". So try this:

                          angband/src -mgcu -- -n3

                          Comment

                          • smbhax
                            Swordsman
                            • Oct 2021
                            • 340

                            #14
                            Originally posted by backwardsEric
                            The module-specific options ("-n3" in this case) need to be separated from the regular options by "--". So try this:

                            angband/src -mgcu -- -n3
                            Ah! That's done the trick, perfect! (Except I screwed up and got src and angband backwards and needed -n4--forgot the main window counts there too--so in summary it's

                            src/angband -mgcu -- -n4

                            : ) Thanks! : DD
                            My Angband videos

                            Comment

                            • joeljpa
                              Scout
                              • Feb 2017
                              • 41

                              #15
                              Originally posted by Gwarl
                              It does, but it displays them as sections of a single terminal. SDL does something similar.

                              ./angband -mgcu -- -n4

                              the "--" is important because it tells the program you're supplying subopts.
                              You have helped me at least thrice in a span of four years each time I visit the game and forgot how to do this whether I wanted to play on my Linux or OS X computer. No doubt there's no reason to use the CLI personally for me right now on OS X with the latest release running well with all the subwindows. But yet, thanks!

                              Comment

                              Working...
                              😀
                              😂
                              🥰
                              😘
                              🤢
                              😎
                              😞
                              😡
                              👍
                              👎