This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [SOLVED] [QUESTION] [DBC] Different skies in the same map  (Read 1600 times)

Kiun

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 50
    • View Profile
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.wowdev.wiki/index.php?title=Light.dbc) I can see a footer: 'LightRec::ConvertDBToGameCoords()'
but I don't understand what means '36.0f;'.  :?

Thanks in advance.
« Last Edit: June 17, 2014, 03:09:47 pm by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] [DBC] Different skies in the same map (Light.
« Reply #1 on: June 16, 2014, 10:24:28 pm »
They are the center of the light, where each coordinate is multiplied by 36.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kiun

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 50
    • View Profile
Re: [QUESTION] [DBC] Different skies in the same map (Light.
« Reply #2 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?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] [DBC] Different skies in the same map (Light.
« Reply #3 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Kiun

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 50
    • View Profile
Re: [QUESTION] [DBC] Different skies in the same map (Light.
« Reply #4 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.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »