Page 1 of 1

Add "effects" to entity

Posted: Tue Oct 25, 2016 4:55 pm
by BlackSalander
This class would hold a list of the class "effect" with the following template

class Effect{
string EffectName; //The name of this effect
string Type; //Type of effect ( "Postive" | "Negative" | "Neutral" | "Both" | "None" )

float HealthBonusREL; //Relative health bonus (the bonus depends on the entity's max health)
float HealthBonusABS; //Absolute health bonus
float HealthRegBonus; //

float SpeedBonusREL; //Relative speed bonus (the bonus depends on the entity's max speed)
float SpeedBonusABS; //Absolute speed bonus

uint64 TicksToDie; //How many ticks this effect will last(or have left)

float DamagePerTick; //How much damage the entity recieves per tick

//don't know if the ones bellow are doable
IMG* EffectMask; //An image to overlay on the entity as effect
ANM* EffectAnm; //Some kind of animation to overlay on the entity

string pre_effect; //Name of event to be called right before the effect takes place
string pos_effect; //Name of event to be called right after the effect is over
}

The idea is to make entities (enemies, character or vehicles) able to receive effects given by other entities or world it self.

This would give Modders a lot of space to create lots os cools stuff like:
-Temporary max health bonus
-Temporary speed bonus
-Poison spitters (apply damage over time on other entities)
-More possible interactions between player and enemies
-Time Bomb?

Re: Add "effects" to entity

Posted: Tue Oct 25, 2016 8:31 pm
by Rseding91
That's what the sticker entity is for. It attaches to an entity and applies some effect over time for some duration.

Re: Add "effects" to entity

Posted: Tue Oct 25, 2016 8:40 pm
by aubergine18
You can see examples of stickers from vanilla game searching this dump of data.raw: https://raw.githubusercontent.com/auber ... r/data.raw

@Rseding91 do stickers of the same type stack?

Re: Add "effects" to entity

Posted: Tue Oct 25, 2016 8:47 pm
by Rseding91
aubergine18 wrote:You can see examples of stickers from vanilla game searching this dump of data.raw: https://raw.githubusercontent.com/auber ... r/data.raw

@Rseding91 do stickers of the same type stack?
Currently no.

Re: Add "effects" to entity

Posted: Tue Oct 25, 2016 11:19 pm
by BlackSalander
aubergine18 wrote:You can see examples of stickers from vanilla game searching this dump of data.raw: https://raw.githubusercontent.com/auber ... r/data.raw

@Rseding91 do stickers of the same type stack?
Thanks, I'll take a look at that

Re: Add "effects" to entity

Posted: Wed Oct 26, 2016 6:43 pm
by BlackSalander
How do I use that?

Re: Add "effects" to entity

Posted: Fri Oct 28, 2016 6:50 am
by Mooncat
@BlackSalander to use a sticker, first you create a sticker entity. Then use "action" to deliver the sticker entity to target. Check "slowdown-capsule" for quick example.

But currently, we only have 2 stickers in the game: "fire-sticker" and "slowdown-sticker". They show limited properties.
Besides damage_per_tick, fire_spread related thingy, and target_movement_modifier, may I know are there any other properties we can use?
And what will happen if two different stickers with different values on target_movement_modifier are applied to the same entity? :)