PDA

View Full Version : Setting fog level via script


provocating
10-29-2015, 01:52 PM
I am not seeing anything to do this, may not exist but thought I would consult the hive mind. Things i want to set are ztype and your fog clip and fog colors.

provocating
10-29-2015, 01:54 PM
Well seconds later I think I figured it out. I can set the fog colors in the zone file, since it does not normally have fog it does not matter what they are normally. Then I can do a #setsky 255 to turn the fog on, or do it via script.

Tabasco
10-29-2015, 08:51 PM
When you say zone file, are you talking about the zone table in the database? If not, you can control it all there.
Since modern hardware can handle it in most zones, I like to push the clipping planes way out for greater zone visibility. It's a minor change that I find I really notice when I play on other servers.

provocating
10-29-2015, 08:55 PM
Yeah I meant zone table. I really want to control more via Lua, I seem to be limited a bit.

provocating
10-29-2015, 10:36 PM
Also I wonder if turning up the zone clipping distance will effect how much traffic the server sends back to the individual clients.

Zaela_S
10-30-2015, 12:39 AM
Also I wonder if turning up the zone clipping distance will effect how much traffic the server sends back to the individual clients.

Unlikely. The client is basically omniscient about what's going on in a zone, except that beyond a certain (fixed?) distance mob position updates won't be pushed as frequently, animation triggers might not be sent, etc. Doubt that the max clipping distance setting for the zone is factored in anywhere.

Yeah I meant zone table. I really want to control more via Lua, I seem to be limited a bit.

Pretty niche, probably no functions exported for it. From the looks of it you'd just need to send OP_NewZone / NewZone_Struct to all the clients in the zone; most of the details could probably be copied from command_zclip and command_zsky in command.cpp (I don't know if those commands actually work, too lazy to get a server up to test).