PDA

View Full Version : Global weather effects.


Chakrah
05-28-2010, 09:39 AM
I've been thinking, during my long and boring awayness from Unholy Nation.

Maybe the use of weather effects should be scripted, and maybe a forecast system.

It could be like, rain would be pouring down one area of the gmap, snowing in another, storming in one, tornado, flash floods, etc in others, and so on;

.midi, or .wav files could be added for the sound effects of the weather to match them.

with this, players could also have the option to turn them off, like the day/night system.

Chakrah
05-28-2010, 09:42 AM
DOUBLE POST

also, a player position might be added e.i;

(Unholy Weather)

and could have the ability to log on, and give the forecast of each week on Unholy's Ingame forums, or the chief of Unholy Weather could make it whereas the npcserver will tell you the forecast of said week every time you log onto Unholy Nation.

Fulg0reSama
05-28-2010, 10:08 AM
I smell a big concoction of lag!

Cloven
05-28-2010, 10:47 AM
I just think that on Graal, if weather is going to be done, it needs to do the following:

- Not look like <swear word>
- Not cause lag
- Serve a legitimate purpose

Chakrah
05-28-2010, 11:52 AM
I smell a big concoction of lag!


if said person is lagging due to the weather effects, this is where the on/off system would come in.^^

Hiro
05-28-2010, 12:06 PM
- Serve a legitimate purpose
atmosphere?

the rain should imitate a link to the past's intro rain. that would be cool

TSAdmin
05-28-2010, 01:00 PM
I made a weather system that was not even noticeable to cause local or server lag but the whole thing is compiled on my dev server which has no time and I have no backups of it sadly. I didn't touch it for a while but I was tempted to take it further and make the weather locally on the client reflect the client's actual location weather. EG: Contacting a weather site via script, retrieve the current weather in the client's location, and they'd see that weather on their screen. But that's another story.

Point is, it's entirely possible to have a fully functioning weather system that works for all seasons and definitely possible to split up into sections on the gmap. It'd work even better for gmaps that have say different style islands such as an Amazonian style island to the east that's rainy often and a desert island to the west that is constantly dry but has dust storms, etc etc.

Chakrah
05-28-2010, 02:09 PM
Point is, it's entirely possible to have a fully functioning weather system that works for all seasons and definitely possible to split up into sections on the gmap. It'd work even better for gmaps that have say different style islands such as an Amazonian style island to the east that's rainy often and a desert island to the west that is constantly dry but has dust storms, etc etc.

that's the kind of thinking i like to hear!

i'd love to see this implemented into the game, would be nice:p

xAndrewx
05-28-2010, 06:57 PM
I made a weather system that was not even noticeable to cause local or server lag but the whole thing is compiled on my dev server which has no time and I have no backups of it sadly. I didn't touch it for a while but I was tempted to take it further and make the weather locally on the client reflect the client's actual location weather. EG: Contacting a weather site via script, retrieve the current weather in the client's location, and they'd see that weather on their screen. But that's another story.

Point is, it's entirely possible to have a fully functioning weather system that works for all seasons and definitely possible to split up into sections on the gmap. It'd work even better for gmaps that have say different style islands such as an Amazonian style island to the east that's rainy often and a desert island to the west that is constantly dry but has dust storms, etc etc.


//#CLIENTSIDE
function onCreated() {
this.w_drizzle.particles = 30;
this.w_drizzle.image = "weather_raindrop.gif";
this.w_drizzle.control = 1;

this.w_rain.particles = 130;
this.w_rain.image = "weather_raindrop.gif";
this.w_rain.control = 2;

this.w_snow.particles = 10;
this.w_snow.image = "era_snowflake.png";
this.w_snow.control = 3;

this.w_hail.particles = 10;
this.w_hail.image = "era_snowball.png";
this.w_hail.control = 4;
this.w_hail.zoom = 0.5;

this.w_clear.control = 0;

onTimeOut();
}

function onTimeOut() {
temp.newmode = serverr.weather;

if (temp.newmode != this.mode) {
this.mode = temp.newmode;

this.onChangeEffect(this.mode);
//Invoke function
cancelevents("onDrawEffect");
scheduleevent(2, "onDrawEffect", this.mode);
}

if (this.mode == "rain") {
scheduleevent(random(0, 10), "Thunder", "");
}

setTimer(10);
}

function onChangeEffect(mode) {
with (findimg(200)) {
with (emitter) {
addlocalmodifier("range", 0,0.2, "alpha", "replace", 0.3,0.5);
addlocalmodifier("range", 0.2,1, "alpha", "replace", 0.5,0);
addlocalmodifier("range", 0 ,1, "zoom", "replace", 1,0.3);
}
}
}

function onDrawEffect(mode) {
hideimg(200);

if (temp.mode == "clear" || !player.level.name.starts("tsa_")) {
return;
}

temp.modes = this.("w_" @ mode).getdynamicvarnames();
for (temp.i: temp.modes) {
temp.val = this.("w_" @ mode).(@ i);
if (temp.i == "particles") {
temp.pcles = val;
}
else {
temp.("c_" @ i) = val;
}
}

with (findimg(200)) {
// Emitter attributes
layer = 2;
x = player.x;
y = player.y;

with (emitter) {
delaymin = 0.25;
delaymax = 0.4;
nrofparticles = temp.pcles;
emissionoffset = {0, -8, 1};
attachtoowner = true;

with(particle) {
lifetime = int(random(5, 15));
for (temp.i: temp.modes) {
(@ i) = temp.("c_" @ i);
}
alpha = random(.6, .7);
mode = 1;
}
addlocalmodifier("once", 0, 0, "angle", "replace", degtorad(210), degtorad(300));
addlocalmodifier("once", 0, 0, "x", "add", - int(screenwidth / 16 / 2), int(screenwidth / 16 / 2));
addlocalmodifier("once", 0, 0, "y", "add", - int(screenheight / 16 / 2), int(screenheight / 16 / 2));
addlocalmodifier("once", 0, 0, "speed", "replace", 30, 40);
}
}
}

function onThunder() {
cancelevents("Thunder");
if (this.mode != "rain" || !player.level.name.starts("tsa_")) {
return;
}

for (temp.i = 0; temp.i < 5; temp.i++) {
seteffect(0.5, 0.5, 0.5, ("0." @ i));

if (random(0, 10) > 7) {
play("era_thunder.wav");
}
sleep(0.1);
}

seteffect(0, 0, 0, 0);

onTimeOut();
}

This one? ;p

TSAdmin
05-28-2010, 07:18 PM
//#CLIENTSIDE
function onCreated() {
this.w_drizzle.particles = 30;
this.w_drizzle.image = "weather_raindrop.gif";
this.w_drizzle.control = 1;

this.w_rain.particles = 130;
this.w_rain.image = "weather_raindrop.gif";
this.w_rain.control = 2;

this.w_snow.particles = 10;
this.w_snow.image = "era_snowflake.png";
this.w_snow.control = 3;

this.w_hail.particles = 10;
this.w_hail.image = "era_snowball.png";
this.w_hail.control = 4;
this.w_hail.zoom = 0.5;

this.w_clear.control = 0;

onTimeOut();
}

function onTimeOut() {
temp.newmode = serverr.weather;

if (temp.newmode != this.mode) {
this.mode = temp.newmode;

this.onChangeEffect(this.mode);
//Invoke function
cancelevents("onDrawEffect");
scheduleevent(2, "onDrawEffect", this.mode);
}

if (this.mode == "rain") {
scheduleevent(random(0, 10), "Thunder", "");
}

setTimer(10);
}

function onChangeEffect(mode) {
with (findimg(200)) {
with (emitter) {
addlocalmodifier("range", 0,0.2, "alpha", "replace", 0.3,0.5);
addlocalmodifier("range", 0.2,1, "alpha", "replace", 0.5,0);
addlocalmodifier("range", 0 ,1, "zoom", "replace", 1,0.3);
}
}
}

function onDrawEffect(mode) {
hideimg(200);

if (temp.mode == "clear" || !player.level.name.starts("tsa_")) {
return;
}

temp.modes = this.("w_" @ mode).getdynamicvarnames();
for (temp.i: temp.modes) {
temp.val = this.("w_" @ mode).(@ i);
if (temp.i == "particles") {
temp.pcles = val;
}
else {
temp.("c_" @ i) = val;
}
}

with (findimg(200)) {
// Emitter attributes
layer = 2;
x = player.x;
y = player.y;

with (emitter) {
delaymin = 0.25;
delaymax = 0.4;
nrofparticles = temp.pcles;
emissionoffset = {0, -8, 1};
attachtoowner = true;

with(particle) {
lifetime = int(random(5, 15));
for (temp.i: temp.modes) {
(@ i) = temp.("c_" @ i);
}
alpha = random(.6, .7);
mode = 1;
}
addlocalmodifier("once", 0, 0, "angle", "replace", degtorad(210), degtorad(300));
addlocalmodifier("once", 0, 0, "x", "add", - int(screenwidth / 16 / 2), int(screenwidth / 16 / 2));
addlocalmodifier("once", 0, 0, "y", "add", - int(screenheight / 16 / 2), int(screenheight / 16 / 2));
addlocalmodifier("once", 0, 0, "speed", "replace", 30, 40);
}
}
}

function onThunder() {
cancelevents("Thunder");
if (this.mode != "rain" || !player.level.name.starts("tsa_")) {
return;
}

for (temp.i = 0; temp.i < 5; temp.i++) {
seteffect(0.5, 0.5, 0.5, ("0." @ i));

if (random(0, 10) > 7) {
play("era_thunder.wav");
}
sleep(0.1);
}

seteffect(0, 0, 0, 0);

onTimeOut();
}

This one? ;p

Yeah, but it has changed since that version of it. Though it would be entirely possible to build off of that if anyone wants it. However, that's just the weapon NPC. I couldn't give you the new images I used for the snow or anything, I don't have those either to replace the Era-style snow for example.

xAndrewx
05-28-2010, 07:22 PM
Yeah, but it has changed since that version of it. Though it would be entirely possible to build off of that if anyone wants it. However, that's just the weapon NPC. I couldn't give you the new images I used for the snow or anything, I don't have those either to replace the Era-style snow for example.

Ahh, I found a copy on my HD hehe ^^

Chakrah
05-28-2010, 07:22 PM
Yeah, but it has changed since that version of it. Though it would be entirely possible to build off of that if anyone wants it. However, that's just the weapon NPC. I couldn't give you the new images I used for the snow or anything, I don't have those either to replace the Era-style snow for example.



Hopefully, instead of any other type of weather, the effects would have classic side scroll snes graphic-styles.

Crono
05-28-2010, 07:46 PM
yeah, implement weather so i can swiftly /disable it

Chakrah
05-28-2010, 07:50 PM
yeah, implement weather so i can swiftly /disable it

pluffy smell really bad when wet, no one wanted you around anyways :cry:

Unkownsoldier
05-28-2010, 10:54 PM
DOUBLE POST

also, a player position might be added e.i;

(Unholy Weather)

and could have the ability to log on, and give the forecast of each week on Unholy's Ingame forums, or the chief of Unholy Weather could make it whereas the npcserver will tell you the forecast of said week every time you log onto Unholy Nation.

I like the other idea, but I don't support this. I just think it should be random, since the weather has really no effect on how you play.. then who needs a forecast?

Chakrah
05-28-2010, 11:15 PM
Whenever town center is destroyed by a tornado and you are unaware you tell me when you dont need a forecast ahhhhhh

Crono
05-28-2010, 11:52 PM
pluffy smell really bad when wet, no one wanted you around anyways :cry:

The way servers implement day/night + weather is annoying. Would be interesting to see how many people have these effects on or off on Era and UN.

Fulg0reSama
05-29-2010, 02:33 AM
The way servers implement day/night + weather is annoying. Would be interesting to see how many people have these effects on or off on Era and UN.

Well let me help ya

1.

Unkownsoldier
05-29-2010, 06:03 PM
Well, don't you think it would be cool if we link all the servers together? Not like, so you can log onto one and then travel into a different one, but weather wise. Like take Europe of example, they have a lot of little countries everywhere, so generally when storms come around, it affects more than just one. Imagine if we correlated the severs like that. Where as, it rains in two different servers and lets assume the storm is moving east, so then it will effect the two/one servers to the east, I think that would be quite cool.

Chakrah
05-30-2010, 09:30 AM
all of the era players would try to mug everyone with their e-pistols

and then US would gallop heroic-like into battle on their unicorns, yes i said unicorns, and trample them.

and I, Chakrah would absolve their souls into eternal damnation.

BACK ON TOPIC.