Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old March 6, 2014, 22:27   #1
Mikko Lehtinen
Veteran
 
Join Date: Sep 2010
Posts: 1,246
Mikko Lehtinen is on a distinguished road
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:

Name:  half.jpg
Views: 374
Size:  2.7 KB

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:
Name:  blows.png
Views: 374
Size:  697 Bytes

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.
Mikko Lehtinen is offline   Reply With Quote
Old March 6, 2014, 23:04   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,552
Derakon is on a distinguished road
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?
Derakon is offline   Reply With Quote
Old March 6, 2014, 23:11   #3
Patashu
Knight
 
Patashu's Avatar
 
Join Date: Jan 2008
Posts: 526
Patashu is on a distinguished road
Quote:
Originally Posted by Derakon View Post
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
Patashu is offline   Reply With Quote
Old March 6, 2014, 23:15   #4
Mikko Lehtinen
Veteran
 
Join Date: Sep 2010
Posts: 1,246
Mikko Lehtinen is on a distinguished road
Thanks! That's a start.

Quote:
Originally Posted by Derakon View Post
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.
Mikko Lehtinen is offline   Reply With Quote
Old March 7, 2014, 01:41   #5
fizzix
Prophet
 
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,001
fizzix is on a distinguished road
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)
fizzix is offline   Reply With Quote
Old March 7, 2014, 02:38   #6
debo
Veteran
 
debo's Avatar
 
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,344
debo is on a distinguished road
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.'
debo is offline   Reply With Quote
Old March 7, 2014, 05:26   #7
Djabanete
Knight
 
Djabanete's Avatar
 
Join Date: Apr 2007
Location: Berkeley, CA
Posts: 542
Djabanete is on a distinguished road
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.
Djabanete is offline   Reply With Quote
Old March 7, 2014, 09:17   #8
Mikko Lehtinen
Veteran
 
Join Date: Sep 2010
Posts: 1,246
Mikko Lehtinen is on a distinguished road
Quote:
Originally Posted by debo View Post
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.
Mikko Lehtinen is offline   Reply With Quote
Old March 7, 2014, 11:04   #9
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,224
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by Derakon View Post
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.
Nick is offline   Reply With Quote
Old March 7, 2014, 12:03   #10
Mikko Lehtinen
Veteran
 
Join Date: Sep 2010
Posts: 1,246
Mikko Lehtinen is on a distinguished road
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.
Mikko Lehtinen is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
some half-Troll thoughs donalde AAR 7 June 14, 2013 04:54
Half-troll + regen Scraper Vanilla 13 June 1, 2013 02:09
[YAWP] Half-troll rogue Ycombinator AAR 2 November 24, 2010 19:18
Fun with half-trolls Derakon AAR 19 October 31, 2010 23:42
I Love Half-Troll Mages Arphod Vanilla 5 December 31, 2009 07:05


All times are GMT +1. The time now is 18:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.