[Guide] How to actually edit skies and lights menu

User Tag List

Results 1 to 5 of 5
  1. #1
    schlumpf's Avatar Retired Noggit Developer

    Reputation
    755
    Join Date
    Nov 2006
    Posts
    2,759
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Guide] How to actually edit skies and lights

    July 2020 edit: keep in mind that this post was written before Wikis were good. These days wowdev.wiii/DB/Light might include more information than this guide. Make sure to also read those pages!


    Introduction
    So today I am talking to you about the actual structure of the light and skies in WoW since Pullefjun asked me if it'd be possible to make his own sky. This "guide" is not meant to be a step by step guide to do something but more a overview about the information you can get about the things you need. This text got written during a MSN convo just because I felt like it.

    Overview about the files you edit
    So.. lets just take it easy and try to make a new sky =)
    As we know we have several DBCs in order to define skies in WoW. We may have heard of them before, maybe in an other stupid guide schlumpf wrote. These files are:
    • Light
    • LightIntBand
    • LightFloatBand
    • LightParams
    • LightSkybox


    Here comes what we know about these different files and what we need to know:

    Light.dbc
    Light.dbc references all the skies and places them on the world. We have a map and a position as well as an radius given to specify where that sky is. The sky itself is defined in the other files. In this file we are just pointing to IDs in the other files.

    LightParams.dbc
    LightParams.dbc defines several values of the "sky" and light. These properties are things that don't change as the time moves on. These static things are for example the fog that defines our line of sight, the color of the environment in water and oceans and some other things.

    The other thing this file is able to define is a skybox that is made of a model. These skies are used in all outlands and some instances like the CoT or Stratholme. Again the skybox is referenced with an ID. This time the ID points to:

    LightSkybox.dbc
    This file is just a list of models that are able to be referenced in other DBCs and represent a skybox.

    Actually you could add a tauren as a skybox too, but the standard ones are just normal boxes.
    So all this file does is adding an ID to some models. This ID gets referenced in LightParams or other DBCs then.

    We find the link in field 3 of LightParams but you can see this at the structures in the end.

    LightIntBand.dbc and LightFloatBand.dbc
    These files are the ones that define the actual colors of the sky at the different daytimes. They are a bit more complicated than other dbcs like the Param or the Skyboxes one.

    The two dbcs define, as said, the colors. But since the sky isn't made of one single color as you see, we have a lot of different colors in this DBC.

    We have colors for clouds, the water from above at night and day, the sun and its halo, the fog in the background (for specific times), the different colors of the sky itself and some global lightning information used for models that are in the light's range.

    And as the title of these two DBCs say: one is filled with floats, the other one with integers.

    July 2020 edit: Please note that the Bands are **not** referenced by the Light ID but by the LightPARAM ids that are referenced by a Light. Light → which parameter (sunny, foggy, death, …?) → LightParam → id *x → LightXBand. This has often been done wrong in the past and even was a bug in noggit for a long time! Again, do NOT directly go to LightXBand based on the Light ID but via the LightParam ID. End of edit.

    And I said that they have a more complicated structure:
    They have a line for all these things I just listed above. So .. as you reference a sky in Light.dbc with only one number like 142 but LightIntBand has 18 features to describe, 18 lines are grouped into one ID per sky. They are still tagged all trough from 1 to x in LightIntBand but we see every 18th row as an entry point to a sky's information. We have to calculate a bit:

    When we reference sky number 142 in Light.dbc, we need to multiply this by 18. The number we will get then (1136) is our entry point. This one and the next 17 lines will be our description of sky number 142 in LightIntBands.
    For LightFloatBand we got 6 rows per sky. You have to take the ID*6 and the next 5 rows.

    The single lines of both DBCs look like this:
    ID
    number of entries for this parameter of the sky
    15 timestamps
    15 datafields in float or integers.

    The problem with these two files is: Noone was crazy enough to try all values and write down the things that have changed. So our information is pretty limited.
    LightIntBand is actually pretty good documented while LightFloatBand is just a collection of unknown values.

    LightIntBand.dbc
    Lets take an example for this file. To make it easier I will just take the first sky defined in this file.
    As said, we take a collection of 18 lines all the time.

    1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6199750,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1718357,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21359,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21359,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21359,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    6,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21359,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    7,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21359,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    8,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21359,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    9,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5789784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    10,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    11,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    14,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    15,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1978430,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    16,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4887,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    17,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1978430,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    18,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4887,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

    So what we see first is a lot of zeroes. But if you look closer you will see some data in the middle and the ID and a 1 on the left side. We have 1 entry per property in this sky as the 1 in field 2 tells us. The different parameters may have different numbers of entries!

    So every line has only one timestamp & data pair. Of course its always the first entry to the last one.
    So what we got from the information posted before, one property is the cloud's color. Its line number 13 (or 12 if you start indexing by 0...).

    So our entry for this sky's cloud color is:
    13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

    We got 1 timestamp with the value 0 and the data for it is 0 too.

    Thats a nice one. But, what we forgot is: How are colors defined in these files?

    Its made in the normal, hexadecimal way to define a RGBA color:
    0xAARRGGBB
    As we see: two bytes per value, alpha, red, green and blue.

    So what we have to do is "translating" this to hex before we even can say something about the color. In this case 0 is very easy easy. Its 0x00 00 00 00. For the calculation of hex-numbers google or use the calc.exe you should have.

    This 00 00 00 00 means: 0 alpha, 0 red, 0 green, 0 blue which actually is a fully transparent but black color which you don't see. As said: its transparent. You wont see black clouds.

    What we could do is making these black, invisible clouds visible rosè clouds.
    So the first step is getting the color:

    For this you can use online hex-color-sites, msPaint, Photoshop or actually any other graphic programm.

    What I will use is a color I use all the the time in the shoutbawx: rosè. The RGB hex-code for this is ff c0 cb. The normal way to write this in the web is #ffc0cb. Or for progammers: 0xffc0cb. But that is actually the same.

    Since we have a opaque (which means not transparent in any way) color in texts we haven't had a look on the alpha value yet.
    For totally opaque clouds this would be FF aka 255. Again, this is pure hex.

    This results in our full color being: FF FF C0 CB, #FFFFC0CB or 0xFFFFC0CB.
    What we will do now is getting this into a decimal number as we have in our DBCs: It is 4294951115. Yes, quite a big number.

    So our value for the color of the clouds of the sky number one at the time 0 (which actually means, since its only one entry: all the time) is 4294951115. Now get this in the file:

    Our new line is now:
    13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4294951115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    We just put this value in the first field of our data list. And this is actually how its done all the time.

    But since this is too less to write a guide, we will add another thing.
    Lets say: Let these clouds fade to an other color at mid-day aka 1200 / 12 am or whatever. But how do we express this in an integer?

    Easy: The timestamps are made in half-minutes since midnight. So we get:
    12 hrs = 12 * 60 minutes = 12 * 60 * 2 half-minutes
    Which means that our timestamp is 1440 then. And its the same procedure for every time you want.

    So first we increase the number of cloud-colors in the second field, then we add the second timestamp and an other color. Pullefjun, give me a color!

    Anders | Pullefjun @ Hemma igen :'/ says (21:35):
    : >
    Eliteuser purple

    Mmh k, let me get that.
    So our color for this is the eliteuser-purple as puLLefjun wished: #9900ff.

    And we got:
    • 13, - id
    • 2, number of entries
    • 0,1440, - our timestamps
    • 4294951115, 4288217343, - our colors

    or in the full line:
    13,2,0,1440,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4294951115,4288217343,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,

    But lets end this color juggling here. I think its your problem to find the right colors and timestamps and you should get it from the given information now. You really have all information you need.
    21:39):

    Anders | Pullefjun @ Hemma igen :'/ says (21:40):
    if I add another timestamp, lets say one hour later. 1560, would it be:
    13,2,0,1440,0,1560?

    Well. 1560/2/60=13 but increase the number of entries and place the next value right behind the last one. It shouls be:
    13,3,0,1440,1560,0,0,0,...

    And now have a last step to:

    LightFloatBand
    The problem is as said before: we know nothing.
    We just know that we have 6 rows with data per sky.

    July 2020 edit: we do know stuff these days. Check wowdev.wiki/DB/LightFloatBand. You may also want to check /LightData, which is the modern equivalent and may have more names.

    I'd really like to tell you something about this file but actually all you can do is just trying. And if you have figured out some information, feel free to add it in this thread.


    a final word
    So, this is actually the whole "guide". As always, don't think I will tell you what exactely you have to edit in order to get a perfect result or whatever. I am providing information and this is, as i see it, my role in this community. I can offer all my knowledge to help you on figuring out what you need to do in order to archive something you want. And I am happy about any kind of feedback or edits you make.
    Last edited by schlumpf; 07-12-2020 at 04:16 AM. Reason: Fixes from the future

    These ads disappear when you log in.

  2. #2
    Pullefjun's Avatar Member
    Reputation
    263
    Join Date
    Oct 2007
    Posts
    828
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats an epic guide right there! Results will be posted tmrw/day after tmrw since I'm busy atm.
    I was mentioned! Beat that!
    <3 schlumpf guides, +rep!

  3. #3
    Glitchy's Avatar ★ Elder ★
    Reputation
    1277
    Join Date
    Jun 2007
    Posts
    985
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for this great Guide i know it was very informative and shed light on some areas i didn't know about.

  4. #4
    ^Xayo's Avatar Contributor
    Reputation
    214
    Join Date
    Sep 2007
    Posts
    434
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    need to spread a bit

  5. #5
    Casola's Avatar Member
    Reputation
    3
    Join Date
    Jul 2007
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot dude, one part of model editing i've never really understood

Similar Threads

  1. [Guide] How to Run a Safe and Fun Server!
    By Errage in forum WoW EMU Guides & Tutorials
    Replies: 83
    Last Post: 10-07-2009, 03:29 PM
  2. [Guide] How to model edit and how to use them!
    By coldmrn in forum WoW ME Tools & Guides
    Replies: 0
    Last Post: 08-29-2008, 08:23 AM
  3. [Request] A Guide How to Change the Sky
    By Wolfly in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 11-05-2007, 02:39 PM
  4. [Guide] How To Model Edit in 2.3
    By Varu in forum WoW ME Tools & Guides
    Replies: 9
    Last Post: 10-18-2007, 07:07 AM
  5. [Guide] How To Model Edit in 2.3
    By Varu in forum World of Warcraft Model Editing
    Replies: 6
    Last Post: 10-16-2007, 11:26 PM
All times are GMT -5. The time now is 03:00 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2022 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search