Score screen still need some help figuring it out?

Posted by Wrath on Thu 29 Jul 2004 10:33 AM — 3 posts, 15,719 views.

USA #0
Ok I went to "void do_score" in act_info.c and found the score screen information. I have two or three snippets which show me somethings but not all I just need to know how to space out and add borders to the score screen. Sorry still new to this and have tried for 2 weeks and can never get it to work right.

1) I want to change the look from:


You are Admin the Implementor, level 60, 17 years old (0 hours).
   You were born on 21/7/390 (D/M/Y)
Race: human  Sex: male  Class: warrior
You have 660/660 hit, 218/218 mana, 451/454 movement.
You have 64 practices and 62 training sessions.
You are carrying 5/1000 items with weight 14/1000000 pounds.
Str: 16(16)  Int: 13(13)  Wis: 13(13)  Dex: 13(13)  Con: 13(13)
You have scored 60000 exp, and have 0 gold and 0 silver coins.
Wimpy set to 0 hit points.
You are standing.
Armor: pierce: 95  bash: 95  slash: 95  magic: 99
You are defenseless against piercing.
You are defenseless against bashing.
You are defenseless against slashing.
You are defenseless against magic.
Holy Light: off
Hitroll: 2  Damroll: 2.
Alignment: 0.  You are neutral.
You are not affected by any spells


To this :


======================================================================
* Name : Wrath     Level   :   22          Clan :                    
* Race : Drow      Age     :   18 years    Rank :                    
* Class: Mage      Played  :   20 hours    Deity:                    
* Sex  : Male      Position: standing                                
*====================================================================*
* Str: 16 (21)     Experience :  39865     Hit  :  242/242           
* Int: 21 (23)     Next Level :  1580      Mana :  418/418           
* Wis: 18 (20)     Questpoints:  45        Move :  760/760           
* Dex: 21 (21)     Practice   :  10                                  
* Con: 18 (22)     Training   :  0       Wimpy:  0 hitpoints       
*====================================================================*
* Hitroll: 18      Hunger     : none    Carrying :  4 items    
* Damroll: 15      Thirst     : none    Weight   :  147 lbs      
* Gold   :  14895  Adrenalin  : none    Alignment:    
* Silver :  19899  Drunk      : not     Explored :  22%           
*====================================================================*
* Piercing: -45  Bashing: -40   Slashing: -42  Magic: -30       
* Piercing: divinely armored    Bashing: divinely armored         
* Slashing: divinely armored    Magic  : almost invulnerable      
*====================================================================*

Well mostly like this the page is smaller then the way it looks on the mud screen. I designed it in the welcome screen to see what it would look like in the mud and I like it but can't figure out how to space the decriptions out and add the values correctly if someone could just point me in the right direction or just show me the code for makeing the spacing correct I should be able to figure out the rest.

I did get this one to work from snippet but like mine more:

=================================================================
Aarelan, Leader of the Church of Pelor.
=================================================================
Level: 60   Age: 17   Played: 12 hours.
Title: Arch-Priest   Clan: Immortal  Clan Rank: Head Coder
=================================================================
Race: Half-Elf  Sex: male  Class: Cleric
Str: 25(25)  Int: 25(25)  Wis: 25(25)  Dex: 25(25)  Con: 25(25)
=================================================================
HP: 32548 of 32548   MANA: 31353 of 31353   MOVE: 32046 of 32046
Practices: 681  Trains: 344
=================================================================
Items: 24 of 1000  Weight: 99 of 1000000 pounds.
Gold: 43  Silver: 2345
=================================================================
Alignment: 996  You are angelic.
=================================================================
Wimpy: 0 hit points.
You are standing.
=================================================================
Armor: pierce: -65  bash: -67  slash: -67  magic: -51
You are very well-armored against piercing.
You are very well-armored against bashing.
You are very well-armored against slashing.
You are very well-armored against magic.
=================================================================
Holy Light: on
You will subdue in combat.
Hitroll: 506  Damroll: 509


Any help would be great I searched the forum but only found refrences to what file to edit and thats about it.

I have rom24b4a for windows I also have Rom24b6a called rom24win32 in zip file. Please anything would be great.

After looking at it in the post the spacing doesn't show up here correctly so if you goto http://home.comcast.net/~cyberaww/score.txt you can see what it looks like once set up.
Amended on Fri 30 Jul 2004 02:19 AM by Nick Gammon
Australia Forum Administrator #1
I added [code] to your post so we can see what you meant.

Basically to make things like up you need to use the "width" option when doing a sprintf. Read up on sprintf to find more about it.

A snippet from SMAUG will show the general idea ...


 pager_printf(ch, "YEARS: %-6d      Class: %-11.11s", 
        get_age(ch), capitalize(get_class(ch)));



The %-6d means show a number, but allow 6 spaces, similarly with the %-11.11s for a string. Using something like that you can make columns line up.
USA #2
Thanks that helps allot I got the top working out already you Rock.