Intro
I was not certain I should put this bug under ToME bugs or not, since it is more of an engine bug, but does not occur in ToME itself...
Also, I am not certain if this is a "bug" or not, but it may be me missing something in the code. (AFAICT, however, this is not the case.)
Desc
The bug appeared when I was revising the monster list for the next release of Annals. I have been putting in new monster races and individual monsters, which I require to "shimmer". That means not the uncontrolled colour changes shown by, say an AMHD, but the more limited changes of, for example, an Ancient green dragon.
AFAICT from the descriptions at the start of the r_edit.txt file, a monster of 'v'iolet colour with the ATTR_MULTI flag should change colour in the AMHD fashion. A monster with any of the other colours (such as 'g'reen) should simply shimmer, using the given colour as a base. However, this does not happen. While certain colours do work ('r'ed and 'w'hite for example) others ('g'reen, 'b'lue, 'y'ellow) do not. They instead do the AMHD-style colour changes.
I have looked in the "pref" folder for any file which might affect this, but have found none. "422color.prf" seems not do do anything, AFAIK, while "font-win.prf" controls symbol, but not colour (anyway, not shimmering). The other pref files seem to be of no more help.
I cannot see anything in the code to suggest I have done anything wrong, and cannot see anything which might control shimmering.
Please help. Thanks, TheFalcon.
(This has been continued from the forum where I could, unfortunately, find no answers, and so I have reported it here as a bug.)
Chatter
TheFalcon: Unless I can find a solution to this soon, I'm going to have to re-revise the monster list
Anyone have any suggestions?
JulesBean: According to cave.c, it's all done in the function multi_hued_attr(). I'll paste the comment here, it says it clearly enough:
/* * Multi-hued monsters shimmer acording to their breaths. * * If a monster has only one kind of breath, it uses both colors * associated with that breath. Otherwise, it just uses the first * color for any of its breaths. * * If a monster does not breath anything, it can be any color. */
PS: The Angband code is extremely well commented. The variant authors have tried to maintain that level of commenting. Even if your C is less-than fluent, the ability to do a multi-file-search through the source code to answer these questions will be very helpful. In emacs use the M-x tags-search command. Most other programmers editors should have a multiple file search, or, alternatively, grep is your friend.
TheFury: I must have missed that. I knew that it was handled in cave.c, but using notepad to go through a c file is a real pain.
So one cannot have shimmering monsters unless they have a breath weapon?
TheFalcon:
I completely missed that!!! (*headdesk*) I went through that file with notepad too, and even searched for the word "shimmer", but still missed it. Hmmm, what is the maximum 1_IN_x value? (I.e. if I put it at, say 1_IN_999999, will it produce an error message or not?). *goes off to see*.
Thanks, you'll get a special mention in credits for observational skills!
TheFury: Just get ready for this message to appear on the forum within a few weeks: Guest: A yellow mushroom patch just breathed mana at me! I was in the barrow downs! This is a cruel way to treat you players.
TheFalcon: Yes, I guess at least the "GWOP" was harmless
. Well, I hope I can get by without resorting to that, I really only *NEED* it for dragons, which isn't too much of a problem. It means I must do some revision, but I think I'll do a bit of experimenting with colours first.
ToME Wiki