Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Unholy Nation Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=223)
-   -   Global weather effects. (https://forums.graalonline.com/forums/showthread.php?t=134259331)

Chakrah 05-28-2010 08:39 AM

Global weather effects.
 
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 08: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 09:08 AM

I smell a big concoction of lag!

Cloven 05-28-2010 09: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 10:52 AM

Quote:

Originally Posted by Fulg0reSama (Post 1579116)
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 11:06 AM

Quote:

Originally Posted by Cloven (Post 1579120)
- 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 12: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 01:09 PM

Quote:

Originally Posted by TSAdmin (Post 1579128)

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 05:57 PM

Quote:

Originally Posted by TSAdmin (Post 1579128)
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.

HTML Code:

//#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 06:18 PM

Quote:

Originally Posted by xAndrewx (Post 1579147)
HTML Code:

//#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 06:22 PM

Quote:

Originally Posted by TSAdmin (Post 1579154)
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 06:22 PM

Quote:

Originally Posted by TSAdmin (Post 1579154)
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 06:46 PM

yeah, implement weather so i can swiftly /disable it

Chakrah 05-28-2010 06:50 PM

Quote:

Originally Posted by Crono (Post 1579161)
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 09:54 PM

Quote:

Originally Posted by Chakrah (Post 1579110)
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?


All times are GMT +2. The time now is 10:01 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.