|
You last visited: Today at 17:01
Advertisement
fun idea
Discussion on fun idea within the CO2 Private Server forum part of the Conquer Online 2 category.
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 >_____>
|
|
|
05/15/2013, 21:04
|
#17
|
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.
|
|
|
05/15/2013, 21:09
|
#18
|
elite*gold: 0
Join Date: Mar 2013
Posts: 118
Received Thanks: 95
|
Quote:
Originally Posted by InfamousNoone
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.
|
|
|
05/15/2013, 21:13
|
#19
|
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
|
|
|
05/15/2013, 21:22
|
#20
|
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).
|
|
|
05/15/2013, 21:36
|
#21
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
|
Quote:
Originally Posted by InfamousNoone
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.
|
|
|
05/15/2013, 21:47
|
#22
|
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
|
|
|
05/15/2013, 22:38
|
#23
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
|
Quote:
Originally Posted by LordGragen.
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.
|
|
|
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.
...
|
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.
|
|
|
05/15/2013, 23:03
|
#25
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
|
Quote:
Originally Posted by pro4never
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
|
|
|
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
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
|
|
|
05/15/2013, 23:14
|
#27
|
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
|
|
|
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.
|
|
|
05/15/2013, 23:47
|
#29
|
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
|
|
|
05/15/2013, 23:53
|
#30
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 67
|
Quote:
Originally Posted by pro4never
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
|
|
|
|
|
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.
|
|