Changing colors of uniques

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Donald Jonker
    Knight
    • Jun 2008
    • 593

    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
  • will_asher
    DaJAngband Maintainer
    • Apr 2007
    • 1124

    #2
    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
    aka LibraryAdventurer

    My old variant DaJAngband:
    http://sites.google.com/site/dajangbandwebsite/home (defunct and so old it's forked from Angband 3.1.0 -I think- but it's probably playable...)

    Comment

    • Marble Dice
      Swordsman
      • Jun 2008
      • 412

      #3
      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;
      
                              [COLOR="Lime"]/* 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;[/COLOR]
      
                              /* Special attr/char codes */
                              if ((da & 0x80) && (dc & 0x80))
                              {
                                      /* Use attr */
                                      a = da;
      
                                      /* Use char */
                                      c = dc;
                              }
      
                              [COLOR="Lime"]/* Unique monster */
                              else if (r_ptr->flags[0] & (RF0_ATTR_UNIQUE))
                              {
                                      /* Unique attr */
                                      a = TERM_VIOLET;
      
                                      /* Normal char */
                                      c = dc;
                              }[/COLOR]
      
                              /* 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.

      Comment

      • Zikke
        Veteran
        • Jun 2008
        • 1069

        #4
        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:

        Comment

        • Pete Mack
          Prophet
          • Apr 2007
          • 6883

          #5
          Originally posted by Zikke
          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.)

          Comment

          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎