I've got a problem with half

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mikko Lehtinen
    Veteran
    • Sep 2010
    • 1246

    I've got a problem with half

    ...his variant is much more popular than mine.

    Oops, sorry, actually I meant to talk about this half:

    Click image for larger version

Name:	half.jpg
Views:	1
Size:	2.7 KB
ID:	234323

    So I've simplified the combat system. You need to have STR at least equal to your weapon's weight in lbs to swing it without problems. Wielding it two-handed (without a shield) adds +2 to your STR for weapon wielding purposes.

    You don't roll for damage, a Falchion always deals six points. You get at most two-and-a-half blows with it, even if your Max Blows (depending solely on DEX) is higher.

    Having half-blows might seem slightly inelegant, but playtesting showed me that I need that extra bit of granularity here.

    One problem. The above screenshot is from the X11 Linux version, here ½ shows right. On the console or in Windows it shows as ? or something else.

    It seems that sometimes I can simply enter the half character in the code, and it shows right in the X11 Linux version. Like this:
    Code:
    if (blows % 10) object_desc_chr_macro(t, '½');
    But if I enter the half character in Term_putstr...
    Code:
    Term_putstr(col, 14, -1, TERM_WHITE, "Half ½");
    ...it shows like this:
    Click image for larger version

Name:	blows.png
Views:	1
Size:	697 Bytes
ID:	234322

    I have no idea why. That might have something do with the fact that I learned everything I know about C by studying the Angband source code.

    Even if I managed to solve this in the X11 Linux version, I would still have problems in Windows and in the Linux console.

    There are also warnings when I compile (in Finnish):

    Code:
    object1.c:1489:49: varoitus: monimerkkikirjainvakio [-Wmultichar]
        if (blows % 10) object_desc_chr_macro(t, '½');
                                                     ^
    object1.c:1489:4: varoitus: ylivuoto implisiittisessä vakiomuunnoksessa [-Woverflow]
        if (blows % 10) object_desc_chr_macro(t, '½');

    Could someone please educate me on how to handle non-ASCII characters in Angband? I know that modern variants are able to deal with all sorts of fancy characters (I'm stuck with the ancient EyAngband source code).

    Solving this problem and updating the manual are the only remaining steps until I can release Halls of Mist 1.4.
  • Derakon
    Prophet
    • Dec 2009
    • 9022

    #2
    I suspect this is a problem with character sets and you need UTF-8 support, which was added...oh, somewhere around 3.2? Man, I don't remember any more.

    Is there any particular reason you can't just say "2.5" instead of using the special 1/2 glyph?

    Comment

    • Patashu
      Knight
      • Jan 2008
      • 528

      #3
      Originally posted by Derakon
      Is there any particular reason you can't just say "2.5" instead of using the special 1/2 glyph?
      Possible reason: The 1/2 glyph saves a character.
      My Chiptune music, made in Famitracker: http://soundcloud.com/patashu

      Comment

      • Mikko Lehtinen
        Veteran
        • Sep 2010
        • 1246

        #4
        Thanks! That's a start.

        Originally posted by Derakon
        Is there any particular reason you can't just say "2.5" instead of using the special 1/2 glyph?
        Using the special glyph seems to enable me to understand everything I need to know about a weapon with a glimpse. With this -- a Falchion (+0, 2.5x6) -- I find I need to stop and think, and I don't like it.

        Maybe that's just my Steve Jobs personality.

        Comment

        • fizzix
          Prophet
          • Aug 2009
          • 3025

          #5
          I'm actually quite looking forward to the next version of HoM, and will probably stream that after the no-TO comp (if that happens)

          Comment

          • debo
            Veteran
            • Oct 2011
            • 2402

            #6
            Uh isn't that 1/2 character in the extended ascii charset? (If he pasted a unicode char from a browser into a literal C string, I'm pretty sure the compiler would have barfed.)

            What happens if you do "This is a half \253" instead of pasting the actual 1/2 character in?
            Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'

            Comment

            • Djabanete
              Knight
              • Apr 2007
              • 576

              #7
              You know who I really can't stand? Scatha.

              I always think he'll be a pushover and then I get owned by his frost breath.

              Comment

              • Mikko Lehtinen
                Veteran
                • Sep 2010
                • 1246

                #8
                Originally posted by debo
                Uh isn't that 1/2 character in the extended ascii charset? (If he pasted a unicode char from a browser into a literal C string, I'm pretty sure the compiler would have barfed.)

                What happens if you do "This is a half \253" instead of pasting the actual 1/2 character in?
                Yay! Now the compiler warnings stopped, and printing ½ on the Mist character sheet works properly!

                So it's extended ascii, and actually \275. I've got a key on my Finnish keyboard for entering ½.

                Linux console still shows a block for a missing glyph. I then tried running Mist in a terminal emulator, same problem. But when I changed my terminal emulator's encoding from UTF8 to ISO-8859-1, the half character showed right!

                Some googling, and I found a command that allowed ½ to show on an utf-8 Linux terminal!
                Code:
                luit -encoding ISO-8859-1 ./mist
                I haven't tested Windows yet.

                Comment

                • Nick
                  Vanilla maintainer
                  • Apr 2007
                  • 9637

                  #9
                  Originally posted by Derakon
                  I suspect this is a problem with character sets and you need UTF-8 support, which was added...oh, somewhere around 3.2? Man, I don't remember any more.
                  For the record, myshkin did the initial UTF-8 development code in late 2011, and it first made it into a release in 3.4.0 in September 2012.

                  Prior to that we did a lot of messing around with Latin1 code first written IIRC by Jeff Greene for NPP.
                  One for the Dark Lord on his dark throne
                  In the Land of Mordor where the Shadows lie.

                  Comment

                  • Mikko Lehtinen
                    Veteran
                    • Sep 2010
                    • 1246

                    #10
                    I'm happy with hackish, quick solutions for Mist. As long as it works. There's no point in reinventing any wheels. Game design is what I want to focus on.

                    Years into future, I may rebuild the game on Pyrel or whatever exists then.

                    Comment

                    • fph
                      Veteran
                      • Apr 2009
                      • 1030

                      #11
                      Originally posted by Mikko Lehtinen
                      There are also warnings when I compile (in Finnish):
                      Tips and tricks: use the command line `LC_ALL=C make` instead of `make` to switch temporarily to the default (English) localization and give us the English output.

                      Finnish sounds like a beatiful language, but even Google translate chokes on "ylivuoto implisiittisessä vakiomuunnoksessa".
                      --
                      Dive fast, die young, leave a high-CHA corpse.

                      Comment

                      • Mikko Lehtinen
                        Veteran
                        • Sep 2010
                        • 1246

                        #12
                        Originally posted by fph
                        Finnish sounds like a beatiful language, but even Google translate chokes on "ylivuoto implisiittisessä vakiomuunnoksessa".
                        LOL!

                        I may put The Scroll of Ylivuoto Implisiittisessä Vakiomuunnoksessa somewhere in the game.

                        Comment

                        • T-Mick
                          Adept
                          • Mar 2012
                          • 120

                          #13
                          Finnish has the best noun cases.

                          Nominative, Accusative, Genitive - so far, so good.

                          Essive, Comitative, Allative - now you lost me...

                          And the list goes on and on...

                          Comment

                          • ekolis
                            Knight
                            • Apr 2007
                            • 921

                            #14
                            Heh, and I thought Latin was bad with five... is Allative anything like Ablative?
                            You read the scroll labeled NOBIMUS UPSCOTI...
                            You are surrounded by a stasis field!
                            The tengu tries to teleport, but fails!

                            Comment

                            • T-Mick
                              Adept
                              • Mar 2012
                              • 120

                              #15
                              I believe they have the Ablative too. There are 15, to my knowledge, including its own Ablative. The Allative overlaps somewhat with the Latin Ablative, but the Latin Ablative covers so much, that really isn't saying anything.

                              Comment

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