PDA

View Full Version : DoD Random Skymap (v1.2)


diamond-optic
07-10-2006, 11:09 PM
DoD Random Skymap
- Version 1.2
- 08.06.2006
- diamond-optic

Information:
- Will select a random skymap at the start of each map
- Selects from the 12 defualt dod skymaps

- ** Requires AMXX 1.75 or higher **CVARs:
dod_random_skymap "1" //Turn on(1)/off(0) Extra:
- By looking at the code, you'll see its very easy to edit
it to include any custom skymaps you want to use... ChangeLog:
- 06.15.2006 Version 1.0
Initial release

- 07.01.2006 Version 1.1
Removed ENGINE module (requires amxx 1.75+)

- 08.06.2006 Version 1.2
Changed the returns in the precache functionDOWNLOAD URL: http://www.avamods.com/download.php?view.52

TigerMan4
08-24-2006, 02:04 AM
works great... I like the changing skies on the maps.

diamond-optic
09-17-2006, 10:31 PM
update to v1.2:
- 08.06.2006 Version 1.2
Changed the returns in the precache function

jondoe
05-02-2007, 11:30 PM
So Optic, If i wanted to just run only 4 out of the twelve default skys would this be how i edit your plugin. The thing is some of the maps i run are pretty dark and with another maps darker sky, its too dark for the players to see well.


#include <amxmodx>

public plugin_init()
{
register_plugin("DoD Random Skymap", "1.2", "AMXX DoD Team")
register_cvar("dod_random_skymap", "1")
}

public plugin_precache()
{
if(get_cvar_num("dod_random_skymap") != 1)
return PLUGIN_CONTINUE

switch(random_num(1, 12))
{
case 1: {
server_cmd("sv_skyname ava")
precache_generic("gfx/env/avart.tga")
precache_generic("gfx/env/avalf.tga")
precache_generic("gfx/env/avaft.tga")
precache_generic("gfx/env/avadn.tga")
precache_generic("gfx/env/avabk.tga")
precache_generic("gfx/env/avaup.tga")
}
case 2: {
server_cmd("sv_skyname dashnight256")
precache_generic("gfx/env/dashnight256rt.tga")
precache_generic("gfx/env/dashnight256lf.tga")
precache_generic("gfx/env/dashnight256ft.tga")
precache_generic("gfx/env/dashnight256dn.tga")
precache_generic("gfx/env/dashnight256bk.tga")
precache_generic("gfx/env/dashnight256up.tga")
}
case 3: {
server_cmd("sv_skyname jagd")
precache_generic("gfx/env/jagdrt.tga")
precache_generic("gfx/env/jagdlf.tga")
precache_generic("gfx/env/jagdft.tga")
precache_generic("gfx/env/jagddn.tga")
precache_generic("gfx/env/jagdbk.tga")
precache_generic("gfx/env/jagdup.tga")
}
case 4: {
server_cmd("sv_skyname dmcw")
precache_generic("gfx/env/dmcwrt.tga")
precache_generic("gfx/env/dmcwlf.tga")
precache_generic("gfx/env/dmcwft.tga")
precache_generic("gfx/env/dmcwdn.tga")
precache_generic("gfx/env/dmcwbk.tga")
precache_generic("gfx/env/dmcwup.tga")
}
}
return PLUGIN_CONTINUE
}

|OnEHiTwOnDeR|SoCal
05-02-2007, 11:43 PM
since its 4 not twelve change the

switch(random_num(1, 12))

to

switch(random_num(1, 4))


otherwise to me it looks fine

diamond-optic
05-02-2007, 11:46 PM
that should work fine.. just be sure to make the change that |OnEHiTwOnDeR|SoCal pointed out..

jondoe
05-03-2007, 12:55 AM
Great thank you both. :)

ijack
03-07-2008, 09:56 PM
I understand that you have 12 different sky's do you have to wait untill map change to see all of them? will it rotate throgh all of them or is it hit and miss?

also you said you can have 4 maps and to change it to 1, 4,
what if you did something like 2,6,3,8? would just them load?
thanks for your time

Ba5ic
03-09-2008, 05:08 AM
Hi Guys

I run the random skymap, bit of a noob question :S, but where can i view them to pick the ones i would like instead of all 12, i don't really want to sit on the server and try to cycle thru them > :)

Thanks in advance

Drek
03-09-2008, 08:19 AM
I understand that you have 12 different sky's do you have to wait untill map change to see all of them? will it rotate throgh all of them or is it hit and miss?
They only change at map change and it is random, so it is hit and miss.

also you said you can have 4 maps and to change it to 1, 4,
what if you did something like 2,6,3,8? would just them load?
Yes.

I run the random skymap, bit of a noob question :S, but where can i view them to pick the ones i would like instead of all 12, i don't really want to sit on the server and try to cycle thru them > :)
You need to download GCFScape (http://nemesis.thewavelength.net/index.php?p=26), and use it to unpack the contents of your "dod/gfx/env" folder, then use some kind of picture viewer (I use Irfanview (http://www.irfanview.com/)) to view the files. Just look in the code to see which files apply to which number.

diamond-optic
03-09-2008, 02:14 PM
thanks drek.. :) ive been a bit busy to keep up with everything here lol


i did at one point plan on making this use a cfg file to load which skymaps it would select but i never got around to it.. I'd like to find time to still do that but i cant make any promises

Drek
03-09-2008, 03:36 PM
Welcome. :)

Ba5ic
03-16-2008, 08:49 AM
I want to cycle 4-5 random sky maps, rather than the 12, but there is one specific skymap i would like to include, i think i saw it on D-O's server, whilst playing hill classic, it looked like a space scene with 2 moons, quite a light skymap if memory serves.

Any idea's on what it was called and where i can DL the .tga files.

Thanks in advance.