Room Enviroment Color

All and any discussion and development of the Mudlet Mapper.
Post Reply
Aico
Posts: 27
Joined: Wed Jan 20, 2010 3:46 pm

Room Enviroment Color

Post 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?

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Room Enviroment Color

Post 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.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Room Enviroment Color

Post 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.

Aico
Posts: 27
Joined: Wed Jan 20, 2010 3:46 pm

Re: Room Enviroment Color

Post by Aico »

Do you remember which source file the hard coded values can be referenced from?

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Room Enviroment Color

Post 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.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Room Enviroment Color

Post 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.

Aico
Posts: 27
Joined: Wed Jan 20, 2010 3:46 pm

Re: Room Enviroment Color

Post 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?

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Room Enviroment Color

Post 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;

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Room Enviroment Color

Post 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.

Aico
Posts: 27
Joined: Wed Jan 20, 2010 3:46 pm

Re: Room Enviroment Color

Post by Aico »

OK got room colors working now, thank you to everyone who offer help.

Post Reply