Modcraft - The community dedicated to quality WoW modding!

Content creation => Level Design => Topic started by: Kiun on June 16, 2014, 10:07:53 pm

Title: [SOLVED] [QUESTION] [DBC] Different skies in the same map
Post by: Kiun on June 16, 2014, 10:07:53 pm
I'm looking for someone who can help me to figure out how Light.dbc works. Specifically columns 3-5 which are float values of position.

I want different entries in Light.dbc for the same map but with different coordinates so the sky/light/fog would change depending of the zone.
E.g. Outland map (entry 530 in Map.dbc) have multiple entries in Light.dbc to use different skies in its different zones (Hellfire Peninsula, Shadowmoon Valley...)

The problem is that I can't figure out how coordinates work, those columns 3-5 maybe are a bounding box? Are the coordinates the same as in ingame? :?

At Light.dbc wiki (http://www.pxr.dk/wowdev/wiki/index.php?title=Light.dbc (http://www.pxr.dk/wowdev/wiki/index.php?title=Light.dbc" onclick="window.open(this.href);return false;)) I can see a footer: 'LightRec::ConvertDBToGameCoords()'
but I don't understand what means '36.0f;'.  :?

Thanks in advance.
Title: Re: [QUESTION] [DBC] Different skies in the same map (Light.
Post by: schlumpf on June 16, 2014, 10:24:28 pm
They are the center of the light, where each coordinate is multiplied by 36.
Title: Re: [QUESTION] [DBC] Different skies in the same map (Light.
Post by: Kiun on June 17, 2014, 12:32:03 pm
Ok, if they are the center of the light I assume columns 6 and 7 are radius, but still don't understand how the formule works.

pos.x (1) = 17066.666 - pos.x (2) / 36.0f;

pos.x (1) is the DBT coordinate or the ingame coordinate?
pos.x (2) will be which is not the pos.x (1), right?
Title: Re: [QUESTION] [DBC] Different skies in the same map (Light.
Post by: schlumpf on June 17, 2014, 12:57:43 pm
That function is called on the dbc entries, thus
Code: [Select]
pos.x(1) = 17066.666 - pos.x(2) / 36.0f; will convert the db coordinate (2) to the world coordinate (1) by dividing by 36, and subtracting from 17066.666.
Title: Re: [QUESTION] [DBC] Different skies in the same map (Light.
Post by: Kiun on June 17, 2014, 03:08:53 pm
Solved, I was doing the function right but the columns 3, 4 and 5 are Y Z X respectively and I was assuming it was X Y Z.

Thanks again schlumpf.