Register for your free account! | Forgot your password?

You last visited: Today at 17:01

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



fun idea

Discussion on fun idea within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 05/15/2013, 19:54   #16
 
elite*gold: 0
Join Date: Mar 2013
Posts: 118
Received Thanks: 95
The screen shake effect in CO is ******* ridiculously annoying because the client doesn't center the screen after the effect is over >_____>
Smaehtin is offline  
Old 05/15/2013, 21:04   #17
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
well i just finished abstracting pcs's weather system (yes, I'm doing minor work with them) got permission from ffc that it's ok to post this code:

Code:
    public class RainSupplier : WeatherSupplier
    {
        public RainSupplier(GameMap map)
            : base(map, 3) // max 3 per quadrant
        {
            WeatherSpeed = 10000;
            BlendFactor = 0.5;
            ModifyColor = Color.Gray;
            WeatherColor = Color.Cyan;
            Direction = 165;
            Intensity = 1000;
            Type = WeatherType.Rain;
        }
        protected override void BeginProcess(GameMapArea q, DateTime time)
        {
            base.BeginProcess(q, time);

            // create our effects
            int amount = r.Next(1, EffectAmount);
            for (int i = 0; i <= amount; i++)
            {
                int x = q.X + r.Next(0, GameMap.QuadrantSize);
                int y = q.Y + r.Next(0, GameMap.QuadrantSize);
                SetEffect(i, 1000, 0, x, y);
            }
        }
        protected override void RenderEffects(IEntity entity, DateTime time, int index)
        {
            base.RenderEffects(entity, time, index);

            var strikePos = GetEffectPosition(index);
            // to-do: did this entity get hit by the lightning?
        }
    }
so as fang said, the over all idea is super easy lol, just combining a few packets at best; and yeah I haven't found a way to recenter the screen after shaking it either.
InfamousNoone is offline  
Old 05/15/2013, 21:09   #18
 
elite*gold: 0
Join Date: Mar 2013
Posts: 118
Received Thanks: 95
Quote:
Originally Posted by InfamousNoone View Post
well i just finished abstracting pcs's weather system (yes, I'm doing minor work with them) got permission from ffc that it's ok to post this code:
Lol bad coder using var and stuff.
Smaehtin is offline  
Old 05/15/2013, 21:13   #19
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
no you're right I don't know whats being returned is a Position, the GetEffectPosition isn't a dead give away... nor is the suffix strikePos, let's not start this bullshit again
InfamousNoone is offline  
Old 05/15/2013, 21:22   #20
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
I didn't evaluate the problem in the same way. It doesn't seem to be that the weather itself is the problem for the original poster. I'm fairly sure there are examples of weather on the forum, and I know you have a public example in your packet library. The problem the original poster seems to be having is with showing the thunder. I recommended that he used effects to do so. I'm not sure how weather is created in the client, but a solution using string packets would work (it would also synchronize the thunder for characters on the map).
Spirited is offline  
Old 05/15/2013, 21:36   #21
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Quote:
Originally Posted by InfamousNoone View Post
well i just finished abstracting pcs's weather system (yes, I'm doing minor work with them) got permission from ffc that it's ok to post this code:

Code:
    public class RainSupplier : WeatherSupplier
    {
        public RainSupplier(GameMap map)
            : base(map, 3) // max 3 per quadrant
        {
            WeatherSpeed = 10000;
            BlendFactor = 0.5;
            ModifyColor = Color.Gray;
            WeatherColor = Color.Cyan;
            Direction = 165;
            Intensity = 1000;
            Type = WeatherType.Rain;
        }
        protected override void BeginProcess(GameMapArea q, DateTime time)
        {
            base.BeginProcess(q, time);

            // create our effects
            int amount = r.Next(1, EffectAmount);
            for (int i = 0; i <= amount; i++)
            {
                int x = q.X + r.Next(0, GameMap.QuadrantSize);
                int y = q.Y + r.Next(0, GameMap.QuadrantSize);
                SetEffect(i, 1000, 0, x, y);
            }
        }
        protected override void RenderEffects(IEntity entity, DateTime time, int index)
        {
            base.RenderEffects(entity, time, index);

            var strikePos = GetEffectPosition(index);
            // to-do: did this entity get hit by the lightning?
        }
    }
so as fang said, the over all idea is super easy lol, just combining a few packets at best; and yeah I haven't found a way to recenter the screen after shaking it either.
I thought it was only the 'bounce' effect that messed with the screen? o.O

As for re-centering the screen, any alteration to the clients screen in that manner cannot be controlled server-side afaik.
_DreadNought_ is offline  
Old 05/15/2013, 21:47   #22
 
LordGragen.'s Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 67
i have made a exmaple here but i am sure its horible,

idk how to make the thunder effect hit random so i made it this for for testing.

Code:
 if (client.Entity.MapID == 1505)
            {

                Weather weather = new Weather(true);
                weather.WeatherType = Weather.Rain;
                weather.Direction = 165;
                weather.Intensity = 1000;
                weather.Send(client);

            }
 if (client.Entity.MapID == 1505)
                            {

                                _String str = new _String(true);
                                str.UID = client.Entity.UID;
                                str.TextsCount = 1;
                                str.Type = _String.Effect;
                                str.Texts.Add("Thunder");
                                client.SendScreen(str, true);
                                System.Threading.Thread.Sleep(5000);
                            }
and its was prty fun but

just need to fix sending the thunder in different place since the code i used it hitting on you only
LordGragen. is offline  
Old 05/15/2013, 22:38   #23
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Quote:
Originally Posted by LordGragen. View Post
i have made a exmaple here but i am sure its horible,

idk how to make the thunder effect hit random so i made it this for for testing.

Code:
 if (client.Entity.MapID == 1505)
            {

                Weather weather = new Weather(true);
                weather.WeatherType = Weather.Rain;
                weather.Direction = 165;
                weather.Intensity = 1000;
                weather.Send(client);

            }
 if (client.Entity.MapID == 1505)
                            {

                                _String str = new _String(true);
                                str.UID = client.Entity.UID;
                                str.TextsCount = 1;
                                str.Type = _String.Effect;
                                str.Texts.Add("Thunder");
                                client.SendScreen(str, true);
                                System.Threading.Thread.Sleep(5000);
                            }
and its was prty fun but

just need to fix sending the thunder in different place since the code i used it hitting on you only
Cast it as an actual spell :O (Since you will be adding damage I presume.
_DreadNought_ is offline  
Old 05/15/2013, 22:51   #24
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by LordGragen. View Post
...

I think the issue there is that if you code it as part of the actual weather system there is

A: No way to check where a bolt hits (so nothing dynamic can be done such as hitting specific objects)

B: No way to check WHEN a bolt hits (for sounds)

C: Pretty sure it won't look right (all weather effects blow accross screen rather than a static animation). Could be that you could edit it to work for your needs but it will never look as good or be as useful as casting a spell at random location.



If you don't like the 0 then there are ways to display an effect at X/Y. None of them will look as good but it CAN be done.


Casting spell at X/Y is ideal because it handles the following automatically.

-Proper animation at known location
-Proper sound on activation
-Damage calculations and targeting in small AOE around hit location


You can edit the spell to look/sound however you want (larger spell, ground breaking apart effect, new sounds, etc) but the method they are demonstrating is likely the most effective in the game.

Shaking is likely possible but gets a bit more tricky to do properly is all.
pro4never is offline  
Old 05/15/2013, 23:03   #25
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
Quote:
Originally Posted by pro4never View Post
I think the issue there is that if you code it as part of the actual weather system there is

A: No way to check where a bolt hits (so nothing dynamic can be done such as hitting specific objects)

B: No way to check WHEN a bolt hits (for sounds)

C: Pretty sure it won't look right (all weather effects blow accross screen rather than a static animation). Could be that you could edit it to work for your needs but it will never look as good or be as useful as casting a spell at random location.



If you don't like the 0 then there are ways to display an effect at X/Y. None of them will look as good but it CAN be done.


Casting spell at X/Y is ideal because it handles the following automatically.

-Proper animation at known location
-Proper sound on activation
-Damage calculations and targeting in small AOE around hit location


You can edit the spell to look/sound however you want (larger spell, ground breaking apart effect, new sounds, etc) but the method they are demonstrating is likely the most effective in the game.

Shaking is likely possible but gets a bit more tricky to do properly is all.
A/B/C are all covered in my posted code... uh?
The 0 can be removed, we're working on it
InfamousNoone is offline  
Old 05/15/2013, 23:13   #26
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by InfamousNoone View Post
A/B/C are all covered in my posted code... uh?
The 0 can be removed, we're working on it
I'm referring to him wanting his lightening to be a custom weather effect rather than spell casts....


Your system is how it should be done and what I'm arguing for him to use (well, something similar)


<edit>

Just noticed that I got ninja'd when I posted. I'll make sure I'm quoting him so it's clear. Figured being the direct next response that it would be obvious who i was talking to <3
pro4never is offline  
Old 05/15/2013, 23:14   #27
 
LordGragen.'s Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 67
infamouse, i did not understand your code well but is the part you send your thunder diferent places, coz the way i made with the loop it only hits on you.

Code:
   protected override void BeginProcess(GameMapArea q, DateTime time)
        {
            base.BeginProcess(q, time);

            // create our effects
            int amount = r.Next(1, EffectAmount);
            for (int i = 0; i <= amount; i++)
            {
                int x = q.X + r.Next(0, GameMap.QuadrantSize);
                int y = q.Y + r.Next(0, GameMap.QuadrantSize);
                SetEffect(i, 1000, 0, x, y);
            }
        }
is this sending the thunder random place in the screen?

and pro4never, yes i am going to use his way since i love the idea that store hiting the players time to time XD its more epic for dungeons
LordGragen. is offline  
Old 05/15/2013, 23:35   #28
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
If the spell is hitting your location then you are using targetUID rather than sending spell with a X/Y value instead.


The code you quoted is taking the entire quadrant of a map and generating a random location within it. It then sends that spell to all clients within visible range of that random location.
pro4never is offline  
Old 05/15/2013, 23:47   #29
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
BeginProcess is called when weather is being rendered for a specific quadrant, this is to prepare any nessecary effects for that quadrant, so it generates a possibility of 3 thunder effects (on random x,y's within the quadrant)

RedenderEffect is called for each entity in the quadrant, and displays the effect(s) to them, any additional processing can be done in this function as well; refer to comment

EndProcess which is not shown here, since it's not needed to be overidden is used to clean up any additional resources your BeginProcess may have created

SetEffect places a spell effect on a specific x,y coordinate
InfamousNoone is offline  
Old 05/15/2013, 23:53   #30
 
LordGragen.'s Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 67
Quote:
Originally Posted by pro4never View Post
If the spell is hitting your location then you are using targetUID rather than sending spell with a X/Y value instead.


The code you quoted is taking the entire quadrant of a map and generating a random location within it. It then sends that spell to all clients within visible range of that random location.
gotcha, yah what i think is better if i make the storm hit the player like you say by using targetUID

i think it will be better hitting the player every 20-30 sec prob like 200 dmg per atk,

i am just having a bit problem how to build the atk system instead of just the effect going on you.

and ty infamous for explaining
LordGragen. is offline  
Reply


Similar Threads Similar Threads
New Bypass Idea *IDEA NOT A HACK*
01/19/2009 - Soldier Front - 5 Replies
Think about it..xfire to bypass GameGuard. I dunno about anyone else or why it hasn't been mentioned ..or maybe it has. But let me give you an example of what i mean. You would Inject your "wallhack.dll" into the xfire.exe process. Then Login to xFire.Then login to SF and let your Xfire ingame Load up. Since xfire layers its chat windows over the SF screen freely without causing the ALT+TAB error that means its has some kind of control over the D3D.
[Idea] just an idea about having more power..
11/22/2007 - Kal Online - 5 Replies
Hello .. I know i know ..everyone will replay with (SERVER SIDED) but we all thought the (Job Change) is Server Sided & we also thought (Cooldown Hack) is Server Sided .. bla bla bla but im not talking about adding STR or Agility because i know whatever you add it will just show as a number & wont have any effects ... & you will give the same damage .. the point of this is .. in (Speed Hack) the normal speed is 0 & with Speed-up its 45 .. right ? .. & the Speed-up is just a potions (buff)...
Good idea or bad idea?
05/22/2007 - Conquer Online 2 - 4 Replies
I have a water(110)-Trojan(130) but i dont know if i should go to trojan again for 2nd rb or should i rb to water? If i am water(110)-trojan(130)-water(130) how much hp would i have if i went melee and had about 2.4k mana?
Idea:Possibly good potential idea!
10/26/2005 - Conquer Online 2 - 3 Replies
Well today I was thinking and it was stated that it's impossible to view if you have a +1 item unless you look in your inventory, but it is generated before its picked up. This could be a big job, could be worth it if it was possible and done correctly though. Turn the items on the floors into items in your inventory images, I should probably explain a bit more. The images that are used in your inventory, put those on the floor. That way if you moused over the image it'd show the +1...



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


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.