Float comments from mes file can be colored

Discussion in 'General Modification' started by Sitra Achara, Jun 21, 2008.

Remove all ads!
  1. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,622
    Likes Received:
    538
    Just a little something I've discovered while doing some scripting. Inspired by Ted's adjustment to Zombies (the "brains... brains..." float) I added a floating comment to indicate when you find the traders' shortsword under the counter. By chance, I tried appending another number to the command, and it seems that it controls the color of the float (though I was originally hoping to control the duration).

    The colors available are:
    0 - white (default)
    1 - red
    2 - green
    3 - blue
    4 - yellow
    5 - azure
    6 - dark blue
    7 - blue (same as 3)
    8 - grey/dark green
    9 - light/pinkish red
    10 - light green
    11 - dark blue (same as 6)
    12 - black

    The command is then:
    attachee.float_mesfile_line( 'mes\\narrative.mes', line_ID_number, color_ID)

    Can this be added to the Dialog\Python Commands thread?
    (that thread could use a cleanup in general, by the way)

    I suppose we could also colour the zombies' float red or something...
     
  2. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,743
    Likes Received:
    374
    Interesting: I was just using the colours themselves:

    attachee.float_mesfile_line('mes\\spell.mes', 20052, tf_red)

    Thanks for codifying this though :) It should go in the 'well whaddya know?' thread or somewhere similar be amended.
     
Our Host!