![]() |
#1 |
Veteran
Join Date: Sep 2010
Posts: 1,246
![]() |
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: 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, '½'); Code:
Term_putstr(col, 14, -1, TERM_WHITE, "Half ½"); 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. |
![]() |
![]() |
![]() |
#2 |
Prophet
Join Date: Dec 2009
Posts: 9,024
![]() |
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? |
![]() |
![]() |
![]() |
#3 |
Knight
Join Date: Jan 2008
Posts: 526
![]() |
Possible reason: The 1/2 glyph saves a character.
__________________
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu |
![]() |
![]() |
![]() |
#4 | |
Veteran
Join Date: Sep 2010
Posts: 1,246
![]() |
Thanks! That's a start.
Quote:
Maybe that's just my Steve Jobs personality. |
|
![]() |
![]() |
![]() |
#5 |
Prophet
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,025
![]() |
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)
|
![]() |
![]() |
![]() |
#6 |
Veteran
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,392
![]() |
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.' |
![]() |
![]() |
![]() |
#7 |
Knight
Join Date: Apr 2007
Posts: 563
![]() |
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. |
![]() |
![]() |
![]() |
#8 | |
Veteran
Join Date: Sep 2010
Posts: 1,246
![]() |
Quote:
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 |
|
![]() |
![]() |
![]() |
#9 | |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 56
Posts: 9,317
Donated: $60
![]() ![]() |
Quote:
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. |
|
![]() |
![]() |
![]() |
#10 |
Veteran
Join Date: Sep 2010
Posts: 1,246
![]() |
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. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
some half-Troll thoughs | donalde | AAR | 7 | June 14, 2013 03:54 |
Half-troll + regen | Scraper | Vanilla | 13 | June 1, 2013 01:09 |
[YAWP] Half-troll rogue | Ycombinator | AAR | 2 | November 24, 2010 18:18 |
Fun with half-trolls | Derakon | AAR | 19 | October 31, 2010 22:42 |
I Love Half-Troll Mages | Arphod | Vanilla | 5 | December 31, 2009 06:05 |