Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old June 26, 2009, 22:29   #1
Donald Jonker
Knight
 
Join Date: Jun 2008
Posts: 593
Donald Jonker is on a distinguished road
Changing colors of uniques

So let's pretend for a moment that I'm an utter moron...

I decided I just died my last death to not recognizing a unique when I saw it and getting instadeathed. I'd like to implement Eddie's idea of changing all uniques to the color purple for easy recognition on my personal copy of V - how should I go about doing that?

Ideally it'd be a color no other monster uses, but I could change any other conflicting monsters to something else. I tried going into "interact w/ visuals" but could only seem to dump options. I probably should do something more permanent anyway, so I can easily translate it b/w versions.
__________________
Bands, / Those funny little plans / That never work quite right.
-Mercury Rev
Donald Jonker is offline   Reply With Quote
Old June 26, 2009, 23:51   #2
will_asher
DaJAngband Maintainer
 
will_asher's Avatar
 
Join Date: Apr 2007
Location: San Antonio, TX
Posts: 927
Donated: $10
will_asher is on a distinguished road
Go into monster.txt in the lib/edit folder.
The G: line for each monster entry is its symbol and color like this
G:<symbol>:<color>
So just change all the G: lines for uniques to
G:<symbol>:v (v for violet)

Then you can search the txt file for "G:<symbol>:v" to find all the non-unique monsters that use the same symbol and color and you can change their color to something else.
(It lists the color abbreviations near the beginning of monster.txt)
__________________
Will_Asher

Play DaJAngband:
http://sites.google.com/site/dajangbandwebsite/home
will_asher is offline   Reply With Quote
Old June 27, 2009, 00:18   #3
Marble Dice
Swordsman
 
Join Date: Jun 2008
Location: Columbia, MO. USA
Posts: 405
Marble Dice is on a distinguished road
Hack the source or edit the monster.txt file. Here's a run-down of color use in monster.txt:

Code:
Qty  Color        Define        EditCode 
 60  Violet       TERM_VIOLET   v
 58  Dark gray    TERM_L_DARK   D
 54  Red          TERM_RED      r
 53  White        TERM_WHITE    w
 45  Brown        TERM_UMBER    u
 43  Green        TERM_GREEN    g
 42  Yellow       TERM_YELLOW   y
 41  Light brown  TERM_L_UMBER  U
 40  Blue         TERM_BLUE     b
 40  Gray         TERM_SLATE    s
 38  Orange       TERM_ORANGE   o
 28  Light red    TERM_L_RED    R
 28  Light blue   TERM_L_BLUE   B
 24  Light green  TERM_L_GREEN  G
 23  Light gray   TERM_L_WHITE  W
  0  Black        TERM_DARK     d
If you want to hack a copy of the source, you could try modifying the grid_data_as_text function in cave.c as follows. This should force uniques to be violet, and all normally violet monsters to be light green.

Code:
                        /* Desired attr & char */
                        da = r_ptr->x_attr;
                        dc = r_ptr->x_char;

                        /* Don't use the unique color for "normal monsters" */
                        if (da == TERM_VIOLET &&
                            !(r_ptr->flags[0] & (RF0_ATTR_MULTI | RF0_ATTR_CLEAR)))
                           da = TERM_L_GREEN;

                        /* Special attr/char codes */
                        if ((da & 0x80) && (dc & 0x80))
                        {
                                /* Use attr */
                                a = da;

                                /* Use char */
                                c = dc;
                        }

                        /* Unique monster */
                        else if (r_ptr->flags[0] & (RF0_ATTR_UNIQUE))
                        {
                                /* Unique attr */
                                a = TERM_VIOLET;

                                /* Normal char */
                                c = dc;
                        }

                        /* Multi-hued monster */
                        else if (r_ptr->flags[0] & (RF0_ATTR_MULTI))
                        {
                                /* Multi-hued attr */
                                a = randint1(15);

                                /* Normal char */
                                c = dc;
                        }
You still might see that color on clear monsters or in the multi-hued cycles, but at least you'd know what to watch out for. As for what color to use, most violets are already unique or multi-hued, so that's probably a pretty good bet for uniques. I figure light green is a pretty threatening color, not unlike violet, so use that for the non-clear, non-multi-hued normally violet monsters. I haven't tested the code, and YMMV with the gameplay.
Marble Dice is offline   Reply With Quote
Old June 27, 2009, 20:53   #4
Zikke
Veteran
 
Join Date: Jun 2008
Location: Los Angeles
Posts: 1,068
Zikke is on a distinguished road
Personally, I would love for this to be a standard practice in V (having all uniques be purple). And we can change mind flayers and nexus hounds/Qs to something else.
__________________
A(3.1.0b) CWS "Fyren_V" NEW L:50 DL:127 A++ R+++ Sp+ w:The Great Axe of Eonwe
A/FA W H- D c-- !f PV+++ s? d P++ M+
C- S+ I- !So B ac++ GHB? SQ? !RQ V F:
Zikke is offline   Reply With Quote
Old June 27, 2009, 21:00   #5
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,014
Donated: $40
Pete Mack is on a distinguished road
Quote:
Originally Posted by Zikke View Post
Personally, I would love for this to be a standard practice in V (having all uniques be purple). And we can change mind flayers and nexus hounds/Qs to something else.
Before you go down this route, take a look at NPP. There uniques are easily identified, and have a similar color pattern to the basic monsters. You need 31 colors (or more) instead of 15 (not counting black.)

(Other variants use more colors, including UnAngband, but I think NPP has the about the right compromise for V.)
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
Give a meaning to object colors fph Vanilla 7 May 3, 2009 18:29
Hunting Uniques Donald Jonker Vanilla 6 October 14, 2008 04:15
Misc editing/changing Angband gameplay AirBreather Variants 7 August 19, 2008 07:53
Changing personal description Cardinal Rob Vanilla 1 April 3, 2008 15:39
Run away from uniques! slashme Vanilla 3 February 25, 2008 20:44


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


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