Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old June 8, 2009, 20:24   #1
Magnate
Veteran
 
Join Date: May 2007
Location: London, UK
Posts: 1,615
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Dynastic character numbering - r1433

Evening all - with the help of a lurker I've implemented roman numeral name suffices, so those of us who die a lot can have automatic numbering for new characters if we want.

So, if you give your character a name ending in " I" (that's a space and then a capital i), it will notice that, and put a counter in the savefile. All subsequent characters will default to the same name (even if you change the race/class) with the suffix properly incremented (up to 255). If you change the name to one that doesn't end in " I", it will turn off the numbering and all subsequent characters will get the same name.

It does not work with any suffix other than the first - that would need an entire "de-romanify" function which we didn't write. This means that you cannot change the suffix of a dynasty once you've started (e.g. if one dies an embarrassing death) - you either have to carry on or restart at I.

Please test and report any bugs in this thread. We used a spare byte in the savefile, so there should be no savefile compatibility issues.

(Edit: do not forget the space. It won't work without a space as the penultimate character, and a capital i as the last.)

Last edited by Magnate; June 8, 2009 at 20:34.
Magnate is offline   Reply With Quote
Old June 8, 2009, 21:47   #2
Atarlost
Swordsman
 
Join Date: Apr 2007
Posts: 368
Atarlost is on a distinguished road
A number arabicizer wouldn't be too hard to write and if you cutoff at 255 you could just read look for a last word with nothing but CLXVI in it. No counter needed.
__________________
One Ring to rule them all. One Ring to bind them.
One Ring to bring them all and in the darkness interrupt the movie.
Atarlost is offline   Reply With Quote
Old June 8, 2009, 22:35   #3
Magnate
Veteran
 
Join Date: May 2007
Location: London, UK
Posts: 1,615
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by Atarlost View Post
A number arabicizer wouldn't be too hard to write and if you cutoff at 255 you could just read look for a last word with nothing but CLXVI in it. No counter needed.
If you had an arabiciser/deromanify, you wouldn't need to stop at 255 (that's a limitation of the 1-byte counter). If anyone wants to write one and send it to me, I'll happily expand this functionality to accommodate changes to the suffices, starting at numbers other than I etc.
Magnate is offline   Reply With Quote
Old June 9, 2009, 11:57   #4
Cauldron
Apprentice
 
Join Date: May 2009
Posts: 62
Cauldron is on a distinguished road
Quote:
Originally Posted by Atarlost View Post
A number arabicizer wouldn't be too hard to write and if you cutoff at 255 you could just read look for a last word with nothing but CLXVI in it. No counter needed.
I think you mean CCLV.

Quote:
Originally Posted by Bart_Simpson
Roman Numerals!? They never even *tried* to teach us that in school!
__________________
I miss autoscum... but not that much.
Cauldron is offline   Reply With Quote
Old June 9, 2009, 22:37   #5
Marble Dice
Swordsman
 
Join Date: Jun 2008
Location: Columbia, MO. USA
Posts: 405
Marble Dice is on a distinguished road
CCLV is indeed 255, but when he said CLXVI he was referring to the set of characters necessary to recognize roman numerals no higher than 255 i.e. you wouldn't even need to look for the characters D or M. If fact, the set [IVXLC]+ would get you all the way up to 399 or CCCXCIX.
Marble Dice is offline   Reply With Quote
Old June 10, 2009, 01:34   #6
Cauldron
Apprentice
 
Join Date: May 2009
Posts: 62
Cauldron is on a distinguished road
Quote:
Originally Posted by Marble Dice View Post
CCLV is indeed 255, but when he said CLXVI he was referring to the set of characters necessary to recognize roman numerals no higher than 255 i.e. you wouldn't even need to look for the characters D or M. If fact, the set [IVXLC]+ would get you all the way up to 399 or CCCXCIX.
OK that makes sense. I think 399 is properly CCCIC, though. Which is the problem with roman numerals. The problem is incrementing the roman numeral. Rather, converting from arabic to roman. Though someone has probably written a conversion function.
__________________
I miss autoscum... but not that much.
Cauldron is offline   Reply With Quote
Old June 10, 2009, 04:59   #7
Marble Dice
Swordsman
 
Join Date: Jun 2008
Location: Columbia, MO. USA
Posts: 405
Marble Dice is on a distinguished road
Some sources consider it improper to prefix a larger roman numeral with a smaller one to indicate subtraction when the larger roman numeral is more than one order of magnitude larger than the smaller one. If you go by that rule, then IX (9) is the last time you can use I as a prefix, and the only prefix you would use on C would be XC (90).

But there's tons of inconsistencies like that. Sometimes you see IIII instead of IV, sometimes you see IIX instead of VIII, and then sometimes people make an exception for numbers over 1000, since the characters after M (1000) have bars over them, which is difficult to render. So instead of M,V-bar for 4000, sometimes you'll see MMMM.

Arabic to roman is significantly easier than roman to arabic, in my opinion, although you can find algorithms for either. If you're doing arabic-to-roman you can just pick a consistent set of rules and run with them, but when you're doing roman-to-arabic, you may want to accept multiple methods of writing the numbers, or you might want to exclude poorly-formed numerals.

I'm glad I never had to do math with roman numerals.
Marble Dice is offline   Reply With Quote
Old June 10, 2009, 05:04   #8
d_m
Knight
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 29
Posts: 628
d_m is on a distinguished road
Quote:
Originally Posted by Marble Dice View Post
I'm glad I never had to do math with roman numerals.
I remember hearing some opinion from a historian (or maybe some random wacko on the internet) that ultimately Roman engineering was limited by how hard doing arithmetic in Roman numerals was.
d_m is offline   Reply With Quote
Old June 10, 2009, 07:40   #9
Magnate
Veteran
 
Join Date: May 2007
Location: London, UK
Posts: 1,615
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by d_m View Post
I remember hearing some opinion from a historian (or maybe some random wacko on the internet) that ultimately Roman engineering was limited by how hard doing arithmetic in Roman numerals was.
I think the fact that they didn't have the number zero also made engineering pretty hard ...

... and here's me thinking people would just say "Gee, I've wanted this functionality for ages - thanks"
Magnate is offline   Reply With Quote
Old June 10, 2009, 20:38   #10
Colbey
Scout
 
Join Date: Feb 2008
Posts: 49
Colbey is on a distinguished road
I've hoped for this feature for a long time. I express my gratitude!
Colbey 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
New character, diving, and questions Sirridan Vanilla 7 May 5, 2009 02:08
Help with my character pedrorf Vanilla 1 April 20, 2009 14:16
Jammy character Hampton AAR 1 November 15, 2008 05:31
character of the game will_asher Vanilla 0 February 1, 2008 20:59
How do I do a character dump? quaxocal Oook! 6 July 4, 2007 20:54


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


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.