Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old April 17, 2017, 11:04   #141
Elfin Jedi
Adept
 
Join Date: Mar 2013
Posts: 102
Elfin Jedi is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
Inventory has it's own interface with colors. I suspect it's printing black on black, or just giving up. What color did you specify in object_base.txt?
light purple for necromancy books, light green for nature books; changing prayer books to light blue. They do display properly on the ASCII map. (Light green ?, light purple ?.)
Elfin Jedi is offline   Reply With Quote
Old April 17, 2017, 12:37   #142
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,571
Donated: $60
Nick is on a distinguished road
OK, I think you probably need to add some code to obj_desc_get_basename() in obj-desc.c - mimic what is done for TV_MAGIC_BOOK and TV_PRAYER_BOOK.
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old April 17, 2017, 17:29   #143
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,159
Donated: $40
Pete Mack is on a distinguished road
Hmm. Looks like more data that belongs in object_base.txt
I'd forgotten all about that.
Edit:
The thing to do is to grep for cases for TV_MAGIC_BOOK and add new entries. This is not the only place, by a long shot. There are 10 places that need to be edited.

Last edited by Pete Mack; April 17, 2017 at 17:34.
Pete Mack is offline   Reply With Quote
Old April 18, 2017, 05:27   #144
Elfin Jedi
Adept
 
Join Date: Mar 2013
Posts: 102
Elfin Jedi is on a distinguished road
Quote:
Originally Posted by Nick View Post
OK, I think you probably need to add some code to obj_desc_get_basename() in obj-desc.c - mimic what is done for TV_MAGIC_BOOK and TV_PRAYER_BOOK.
Quote:
Originally Posted by Pete Mack View Post
The thing to do is to grep for cases for TV_MAGIC_BOOK and add new entries. This is not the only place, by a long shot. There are 10 places that need to be edited.
Already done, found this:

case TV_MAGIC_BOOK:
if (terse)
return "& Book~ #";
else
return "& Book~ of Magic Spells #";

case TV_PRAYER_BOOK:
if (terse)
return "& Book~ #";
else
return "& Holy Book~ of Prayers #";

case TV_NATURE_BOOK:
if (terse)
return "& Book~ #";
else
return "& Book~ of Nature Lore #";

case TV_NECROMANCY_BOOK:
if (terse)
return "& Book~ #";
else
return "& Book~ of Necromancy #";

I already searched for TV_MAGIC_BOOK, Book, and even TV a while ago and added more code for each of the results. Except for wiz-stats.c which only has TV_MAGIC_BOOK and has a note saying that since prayer books have the same probability only one of the two needs to be tracked. I don't know if there would be anything there that needs editing.

List of files changed: list-tvals.h, obj-desc.c, obj-randart.c, obj-tval.c, store.c, ui-knowledge.c, ui-options.c, wiz-spoil.c. Oh and list-magic-realms.h, object.txt, object_base.txt, store.txt, class.txt.

Last edited by Elfin Jedi; April 18, 2017 at 05:39.
Elfin Jedi is offline   Reply With Quote
Old April 18, 2017, 07:03   #145
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,159
Donated: $40
Pete Mack is on a distinguished road
If the issue is still happening, I suspect you'd do better to fire up the debugger. The one in MSVC is pretty easy to use. Put a breakpoint in the appropriate subroutine.
Pete Mack is offline   Reply With Quote
Old April 18, 2017, 11:59   #146
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,571
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
If the issue is still happening, I suspect you'd do better to fire up the debugger. The one in MSVC is pretty easy to use. Put a breakpoint in the appropriate subroutine.
Agreed - that's what I'd be doing now. In fact, it is what I'm doing for my tragically buggy pathfinding algorithm...
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Old April 18, 2017, 15:22   #147
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,159
Donated: $40
Pete Mack is on a distinguished road
Whoops, forgot which thread I was replying to. But even gdb is better than blind guesses
Pete Mack 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
[PosChengband] Making Realms Questions riftor_77 Development 5 August 4, 2014 12:24
Spellbooks as artifacts TJS Vanilla 48 July 29, 2010 05:12
Sangband and spell realms Malak Darkhunter Variants 21 March 18, 2009 04:03
Spellbooks curinor Variants 3 April 20, 2008 13:38
Spellbooks curinor Vanilla 1 April 19, 2008 22:07


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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.