Page 1 of 1

Room Enviroment Color

Posted: Fri Jan 27, 2012 7:02 pm
by Aico
A little bit confused here, I am currently looking at the Aetolia map and the room environment id does not match with any key in the CustomEnvColors table. I tried to see if the link is via the EnvColors table but the values of the EnvColors table also don't match to any of the keys from the CustomEnvColors table either. Am I missing something, how do I find which colour each room environment id points to?

Re: Room Enviroment Color

Posted: Fri Jan 27, 2012 7:58 pm
by Vadi
The colors are hard-coded by Mudlet since the start, so it "knows" them. The IRE mapping script equates them with the mmp.envids table that was tailored to each IRE game.

Re: Room Enviroment Color

Posted: Fri Jan 27, 2012 7:58 pm
by Vadi
The colors are hard-coded by Mudlet since the start, so it "knows" them. The IRE mapping script equates them with the mmp.envids table that was tailored to each IRE game.

Re: Room Enviroment Color

Posted: Sun Jan 29, 2012 7:15 am
by Aico
Do you remember which source file the hard coded values can be referenced from?

Re: Room Enviroment Color

Posted: Sun Jan 29, 2012 9:08 am
by Vadi
No, and it doesn't remember them by name either, only by their IRE ID as they're referenced in the MMP maps.

Your best solution is to look at the IRE mapping script instead.

Re: Room Enviroment Color

Posted: Sun Jan 29, 2012 10:11 am
by Heiko
Aico wrote:A little bit confused here, I am currently looking at the Aetolia map and the room environment id does not match with any key in the CustomEnvColors table. I tried to see if the link is via the EnvColors table but the values of the EnvColors table also don't match to any of the keys from the CustomEnvColors table either. Am I missing something, how do I find which colour each room environment id points to?
Downloadable maps via MMP define env colors on the basis of the classical 16 ansi color system. The user can customize these 16 MUD defined ansi colors. Consequently, a room env value of 1 can be mapped to any RGB color depending on the user's taste.
Custom env colors allow for additional env colors definitions.

Re: Room Enviroment Color

Posted: Sun Jan 29, 2012 11:03 am
by Aico
Ok I think I understand now, so let me confirm if I have got this. The environment id for a room points to the envColor table. The value corresponding to the matched key in the envColor table can either be a value from 1 to 16 which then maps to the predefined colours that the users can change from the Settings->Mapper dialog or it can be a key from the customEnvColors table that points to the custom colour. Is this right?

Re: Room Enviroment Color

Posted: Sun Jan 29, 2012 5:43 pm
by chris
The hardcoded values are:

Code: Select all

    customEnvColors[257] = mpHost->mRed_2;
    customEnvColors[258] = mpHost->mGreen_2;
    customEnvColors[259] = mpHost->mYellow_2;
    customEnvColors[260] = mpHost->mBlue_2;
    customEnvColors[261] = mpHost->mMagenta_2;
    customEnvColors[262] = mpHost->mCyan_2;
    customEnvColors[263] = mpHost->mWhite_2;
    customEnvColors[264] = mpHost->mBlack_2;
    customEnvColors[265] = mpHost->mLightRed_2;
    customEnvColors[266] = mpHost->mLightGreen_2;
    customEnvColors[267] = mpHost->mLightYellow_2;
    customEnvColors[268] = mpHost->mLightBlue_2;
    customEnvColors[269] = mpHost->mLightMagenta_2;
    customEnvColors[270] = mpHost->mLightCyan_2;
    customEnvColors[271] = mpHost->mLightWhite_2;
    customEnvColors[272] = mpHost->mLightBlack_2;

Re: Room Enviroment Color

Posted: Sun Jan 29, 2012 7:16 pm
by Heiko
Aico wrote:Ok I think I understand now, so let me confirm if I have got this. The environment id for a room points to the envColor table. The value corresponding to the matched key in the envColor table can either be a value from 1 to 16 which then maps to the predefined colours that the users can change from the Settings->Mapper dialog or it can be a key from the customEnvColors table that points to the custom colour. Is this right?
No, it's a bit more complicated. IRE environment values are game specific and can only be interpreted on the basis of the environment color table which is part of the map.xml file that Mudlet downloads for their games. These environment values have nothing to do with Mudlet's environment IDs which purely relate to standard or user defined colors.

The envColor table holds all valid color IDs either standard or user defined. While user defined colors will display the same way on all machines, standard colors can be remapped individually by users.

Re: Room Enviroment Color

Posted: Mon Jan 30, 2012 5:02 pm
by Aico
OK got room colors working now, thank you to everyone who offer help.