Jump to content
Eternal Lands Official Forums
Entropy

Special effects

Recommended Posts

Oh, just another thing about performance:

 

Particle systems, more than most 3d, require processing both the graphics card and the CPU. The version that I'm running here was built in debug mode with no optimization flags turned on.

Share this post


Link to post
Share on other sites

Ok, I will add some server notification for a few extra things, such as the harvest events. Once I am done, I will post the defs here so you can add them to the client and CVS. BTW, check your PMs.

Share this post


Link to post
Share on other sites

wow looking good

cant wait to see this in game

 

p.s shouldnt the mana drain spell be blue-ish effect and the life drain red ?

Share this post


Link to post
Share on other sites

Mana drain is purple all the way through. Purple seems more "mana-ish" to me.

 

Life drain starts out red on the target. Orbs of red light form on the target, spin around and through them, then fly toward the caster. En route to the caster, they shift to that glowing green that I used for most healing effects. I.e., it's red on the thing that it hurts, green on the thing that it heals. :)

Share this post


Link to post
Share on other sites

Ok, I added the followig triggers, all of them sending only the actor_id as a parameter, unless otherwise specified. They should be added in client_Server.h after the other ones. The server does send the triggers, except for the last two (they will be sent later on).

 

So after you add them to the client, can you please commit the code?

 

//when a player finds a rare stone
#define SPECIAL_EFFECT_HARVEST_RARE_STONE 13

//when a player is blessed by MN with exp
#define SPECIAL_EFFECT_HARVEST_MN_EXP_BLESSING 14

//when a player is blessed by MN with money
#define SPECIAL_EFFECT_HARVEST_MN_MONEY_BLESSING 15

//when a wall colapses over a player
#define SPECIAL_EFFECT_HARVEST_WALL_COLAPSE 16

//when a bees sting a player
#define SPECIAL_EFFECT_HARVEST_BEES 17

//when a radeon hits
#define SPECIAL_EFFECT_HARVEST_RADEON 18

//when a tool breaks
#define SPECIAL_EFFECT_HARVEST_TOOL_BREAKS 19

//when teleport nexus actor_id,x1,y1,x2,y2
#define SPECIAL_EFFECT_HARVEST_TELEPORT_NEXUS 20

//when MN takes your health
#define SPECIAL_EFFECT_HARVEST_MOTHER_NATURE_PISSED 21

The next two are not implemented in the server yet.

//when a manufacture tool breaks
#define SPECIAL_EFFECT_MANUFACTURE_TOOL_BREAKS 22

//when a special item is created
#define SPECIAL_EFFECT_MANUFACTURE_RARE_ITEM 23

Share this post


Link to post
Share on other sites

Well, a couple notes from tonight's integration work: some SFX are not defined:

 

* Teleport to the portals room

* Bones to gold

* Magic protection

* Magic immunity

* Life drain

 

The following are defined in ways that aren't useful to me.

 

* Heal summoned (my effect is unified -- the spell leaves the caster's hands and flies to the targets to impact. Here, we get one effect called on each target. I can't correlate the two situations.)

* Smite summoned (same)

 

Additional things that will be needed

 

* Shield, magic protection, and magic immunity "decay" (weakening over time), including when they disappear.

 

Things I need more information about:

 

* Teleport to range and invasion beaming don't seem to have sfx called on them. What are var_a and var_b in these contexts? On targetted magic, they're the caster and the target. Yet, the target of a teleport isn't an actor; it's a location.

* What exactly is "invasion beaming"?

 

I'll keep updated anything else that I find.

Edited by KarenRei

Share this post


Link to post
Share on other sites

New issue:

 

* If I want to spawn an effect around an actor's hand, given a pointer to an actor struct, how would I go about doing that? For now, I'll just use the actor's overall x, y, and z.

Share this post


Link to post
Share on other sites

I think a bone would have to be defined for that, right?

 

Anyway, for the magic immunity, protection and shield, do you want it to be like a buff, the same mechanism as used for invisibility?

Share this post


Link to post
Share on other sites

New issue:

 

* If I want to spawn an effect around an actor's hand, given a pointer to an actor struct, how would I go about doing that? For now, I'll just use the actor's overall x, y, and z.

 

To save you some time when it comes to integration, the right hand bone (which I assume roja will use for animations? I could be wrong) is boneId 25, ie.

 

float points[1024][3];
float x, y, z;

CalSkeleton_GetBonePoints(CalModel_GetSkeleton(actor->calmodel), &points[0][0]);
x = points[25][0];
y = points[25][1];
z = points[25][2];

 

Of course, I haven't tested this yet, but I suspect it should be reasonably close.

Share this post


Link to post
Share on other sites

Well, this weekend was kind of a waste. The ice storm that hit the midwest took out our power for most of the weekend. I did manage to rig up some emergency power, but not enough to run my PC, which hosts the files I've been editing. Even if I had, much of my time was spent working on getting the house warm and getting a way to cook food ;)

 

Entropy: I'm not sure what you mean by "a buff". Shield, at least, if I remember right, gives +5 for the first minute, +4 for the second, and so on until it's down to zero. The special effects for shield, protection, and immunity are designed to become fainter as time goes on until they disappear altogether.

 

CrusadingKnight: Thanks, I forgot about that post. I'll give that a shot.

 

New issue: Where do actors get deleted? I searched through actors.c, but didn't see an actor delete function. I'm making a manager for references to special effects, and it needs to keep track of what actor is the caster, what actor is the target, etc so that it can update the positions. However, if an actor gets deleted, I need to delete the effects associated with them, or they'll be accessing a dangling pointer.

Edited by KarenRei

Share this post


Link to post
Share on other sites

The actors are deleted here:

 

	case REMOVE_ACTOR:
		{
#ifdef EXTRA_DEBUG
ERR();
#endif
			destroy_actor(SDL_SwapLE16(*((short *)(in_data+3))));
		}
		break;

 

By buff I mean an effect that an actor has. Right now only the invisibility buff is sent, but I can send other effects such as the one I mentioned (shield, etc.)

And I don't mean sending you the spell icon to know what spells you have active, but so that others can see it.

Once I add a few new buffs, I'll explain it to you.

Share this post


Link to post
Share on other sites

Sounds good. I'll keep at it on the effects that I have enough info to work with. Perhaps by Friday I'll be ready to commit an initial version.

 

Once all of my issues/concerns above are taken care of, and once I can get the rest of the easy-to-hook-in effects in and tested, I suppose I'll need to move onto the map editor. The fireflies, blowing leaves, and cloud effects would be great to have, but they'll undoubtedly need to be added to maps using the editor. I suppose for effects like smoke, I can go ahead and look at what .part files would normally be called; if I have an equivalent replacement, I'll have it use that effect instead. I'd also probably want to tweak the wrapper so that it recalls the firefly effect during daylight hours and restores it during nighttime.

 

Quick question for testing: My test char is an uter n00b. How would I test a lot of the spells or combat effects in practice? Heck, my char doesn't even know how to mine anything, and doesn't have any leather gloves for sulphur, so I couldn't even get a lot of the harvesting effects :) I suppose I could borrow my partner's character, but she hasn't been working on combat or magic nearly as much as she has worked on production (alchemy, potions, crafting, etc), so that would only give me about half of the options at my disposal.

Edited by KarenRei

Share this post


Link to post
Share on other sites

Don't worry about it, once you implement the special effects, we'll have some people over to the test server to help you with stuff like spells, harvesting, etc.

Share this post


Link to post
Share on other sites

Bug:

 

* Finding a bag of gold spawns SPECIAL_EFFECT_HARVEST_MOTHER_NATURE_PISSED, not SPECIAL_EFFECT_HARVEST_MN_MONEY_BLESSING.

 

Status:

 

* F9 campfires, bag drop, and bag pickup look fine, as do the harvesting effects I've gotten to see (apart from that one). I'll need some testing from other people to try out spells and get the other harvesting effects.

* Effects not mentioned, as well as the two multi-target spells, are not included yet. I will enumerate all non-included effects and list what I need or need to do in order to get them into the game.

* Before I commit, I want to make it so that FX are only processed when they're on the screen. I'm noticing that I'm getting random bag drop/pickup effects all the time, and I can see

* Also before I commit, I'm going to want to try and overload the specialeffects system to try and make the frame rate suffer, and then fine tune the level of detail reduction system to pick up the slack. If simple tuning isn't enough, I can modify the system to be based on the frame rate, not the particle count.

* Lastly, before I commit, I'm going to tweak some effects to allow for them to adjust the transparency of objects - for example, to make a person being teleported fade out, then back in at the new location.

Edited by KarenRei

Share this post


Link to post
Share on other sites

Sorry about the harvest effect. Fixed now, but will commit probably in a few days.

Let us know when you need people to help you test, and what spells you need tested.

Share this post


Link to post
Share on other sites

No problem :) Also, just a note: it'd probably be better to use enums than defines for things like listing commands. I already had one problem with all of the defines of common words that you use -- defining "idle" as a number messed up a simple "idle" function call with a confusing error. Enums avoid these problems, as well as helping with other error checking.

 

Quick question: I'm not familiar with cal3d. How can I make an actor render with a given alpha? I've tried enabling GL_BLEND and setting color4f to supply an alpha, but that didn't do the trick. Nor did setting the existing flag "has_alpha" help.

Share this post


Link to post
Share on other sites

No problem :) Also, just a note: it'd probably be better to use enums than defines for things like listing commands. I already had one problem with all of the defines of common words that you use -- defining "idle" as a number messed up a simple "idle" function call with a confusing error. Enums avoid these problems, as well as helping with other error checking.

 

Quick question: I'm not familiar with cal3d. How can I make an actor render with a given alpha? I've tried enabling GL_BLEND and setting color4f to supply an alpha, but that didn't do the trick. Nor did setting the existing flag "has_alpha" help.

The 'has_alpha' flag is new to the client and is set to indicate if a slpha blend file was loaded for that player. Compiling with -DALPHA_ACTORS is needed and the proper bit maps need to be found during adding the actor or equipment change for it to make any difference.

Share this post


Link to post
Share on other sites

Okay, then back to the original question: how can I adjust the transparency of an actor? Or is there no way to do that?

 

On another vein: I would like to make it so that when you teleport, you fade out in half a second, then fade in over half a second. Obviously, I wouldn't want the camera to move during that half second. For ranged teleports, you would fade out, then fly toward the new location, then fade in. In each case, I would want:

 

* The map not to change (say, teleport to portals room, or whatnot) during that first half second

* Preferably, the player not be able to move during the teleport time

* The special effect to have control over player (camera) positioning and alpha during this time.

 

What method would be kosher to do this?

Edited by KarenRei

Share this post


Link to post
Share on other sites

I don't know exactly how to adjust the transparency, but it is possible because we have it already implemented (the invisible actors).

Look for SEND_BUFFS in multiplayer.c then check to see how the invisible thing is done.

 

The teleport thingy, I am not sure we can do it, sometimes it is very important that the map changes ASAP, such as if you teleport to a combat area or something. Besides, the teleport effect should be visible for others, not for the one that teleports.

Share this post


Link to post
Share on other sites

Hmm.

 

We would be having the person who teleports see something different from everyone else? Do they get no teleportation effect, then, or do we need two teleportation effects? What are you picturing?

Edited by KarenRei

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×