Call of Duty 4: Sun

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This tutorial assumes that you already know how to create, compile & create GSCs,CSVs & FastFiles for your maps

This tutorial explain how to get a sun & sunflare in your MP/SP maps like this one:

Cod4:MW raw files contains a few sun file usuable:

sun_flare_rainbow
sun_flare_marksman
sun_flare_icbm
sun_flare_aftermath
sun_flare
sun

Create the sun file

- Create a new file under cod4root/raw/sun (create the folder sun is not there already) - Copy this in the new file:

r_sunsprite_shader "sun"
r_sunsprite_size "28.8433"
r_sunflare_shader "sun_flare_icbm"
r_sunflare_min_size "237.8"
r_sunflare_min_angle "40.869"
r_sunflare_max_size "669.9"
r_sunflare_max_angle "2.14669"
r_sunflare_max_alpha "0.62536"
r_sunflare_fadein "0.2604"
r_sunflare_fadeout "0.2992"
r_sunblind_min_angle "33.9543"
r_sunblind_max_angle "9.9647"
r_sunblind_max_darken "0.20934"
r_sunblind_fadein "0.5"
r_sunblind_fadeout "1"
r_sunglare_min_angle "10.6101"
r_sunglare_max_angle "48.2526"
r_sunglare_max_lighten "0.21569"
r_sunglare_fadein "2.263"
r_sunglare_fadeout "3"
r_sun_fx_position "X Y Z"

All can be customize to suit you, especially r_sunsprite_shader/r_sunflare_shader. One parameters is VERY important:

r_sun_fx_position

You need to replace X Y Z by your Worldspawn value for "sundirection", example mp_backlot:

"sundirection" "-43.5 25.11 0" so r_sun_fx_position would be

r_sun_fx_position "-43.5 25.11 0"

Once happy, save the file as mp_yourmap.sun (youmap being your map name)

Add sunfile to Zonefile

Add the following line to your Zone File:

rawfile,sun/mp_yourmap.sun

--Zeroy. 12:46, 15 October 2008 (UTC)