- Joined
- Apr 9, 2004
- Messages
- 502
Hello All,
for the longest time I've had a project in mind that I've fleshed out quite a bit but the problem is I suck at coding and the reality is there's now systems to make things a lot easier for a lot of mappers except. Hence I have a lot of reassources but (a) i'm not aware of what can be used for what and (b) even if I find a resource I THINK is correct for what I want to achieve, I don't know how to use it despite the instructions.
So I'm asking for help to figure out these issues so that I can understand the intent and restrictions of using systems for my custom map.
I have a list of systems below that I want to implement, I have an idea of how I want them to work, I just don't know what sort of setup can achieve that type of effect code wise, mainly in such a way that doesn't leak or slow down on a large AoS sized scale. Items are listed below:
1) Damage detection system:
This one's pretty basic but essentially I'm splitting damage into melee and ranged but the twist is that the damage source is important. For instance, damage can come from melee attacks, bonus damage modifiers (i.e. copy the the damage source but not necessarily the damage type) low arc projectiles, high arc projectiles, lightning (acts as a high speed projectile for collision detection, then once linked as a normal lightining effect), instant effects (ie instant buff or single target effect like an explosion or bomb), from the ground up (think impale or earthquake etc.) or from the sky down (think lightning strike). In any case, I want to be able to distinguish the source such that, say for instance, a unit in the air cannot be harmed by ground effects and a unit with a shield over his head can't be hit by air to ground or high arc'd projectiles.
After damage source I have damage type:
There is 3 main damage types: Physical, Magical, and Pure.
Physical damage is further split into physical damage type (slashing, bashing, weaponless, piercing, seige) which interacts with armor types (leather,metal,cloth,stone,armorless).
Magical damage is split into 5 elemental types (Fire, Water, Wind, and Earth, and Pure) The 4 main interact where as pure magical damage has no associated element and is only affected my magic resistance.
Pure damage is damage that is not reduced by physical or magical resistance. Only special resistances such as invulnerability can stop pure damage.
On top of that I have damage modifiers which increases or reduce damage such as shields (shield life not affected by armor and has resistance value of it's own), weapon and armor enchantments etc.
This one seems fairly straight forward and almost any damage detection system would do, although I'd need to know how to configure to easily assign a damage source and type to the damage (i.e. source is projectile type is magical).
From there we have a
2) Projectile system.
Now for this system, I looked into some of the systems, but one thing that I wanted to incorporate was a few environment mechanisms such as gravity and tracking (homing). Missiles are launched with a certain force and arc which allows a maximum range from where they're fired. They can also have tracking properties, such as a max deviation for tracking, max turn rate etc, such that if you fire a missile and a unit can move perpendicular to the missile's travel path fast enough (i.e. with a high mobility spell or ability, or just very high movement speed) then even some projectiles that would normally hit would miss and just fly forward until they fell to the ground.
Another thing for projectiles is that they'd have to be dynamically manipulate-able such that you could alter their targeting and motion style at any time to, for instance, change the intended target, or direction, change the target-able units (i.e. for unit specific targeting, if it loses tracking it becomes a rogue missile that can hurt any unit it hits) etc. etc.
For this system i thought it would be easy to simply create an array for each projectile to track all these variables, I'm just not sure how to set it up so I can simply run this as a function every time I want to generate a projectile as such I'd have complete control at creation and even during each instance.
The other big thing is I'd need to be able to grab any projectile and get any information about that projectile too, so that I could look up what it was going to do and change it (i.e. maybe an energy field makes all enemy projectiles that pass through it deal bonus fire damage or something, or even heal instead of harm allies)
One other thing to consider is that I'd like the possibility to using units as projectiles too, for the purpose of supporting a knockback system.
3) Buff System
For this system, I want to track all buffs in play, such that I can manipulate buff interaction (i.e. if you has buff A, effect A happens, if you has buff B, effect B happens, if you has buff A and B, effect C happens etc)
For 99% of this, I know I can get away with using the tornado passive and I'd like to trigger everything around this if possible. However, I'm not sure if I can do this and still use things like silence or stuns properly. I know there are some interesting ways to silence units through engineering upgrade and other things like that but stuns seem to require a spell of some sort.
Again I think this is doable in a way similar to the projectiles where I simply track each buff in a way that I can assign the buffs to any specific unit for any specific effect. Again, the big thing is to be able to look up a buff and pull any information or edit it at any point in time from a separate event (i.e. a unit has a spell where they slowly drain a buff away from a unit, essentially adding a buff to themselves and increasing it's duration while reducing the duration of the buff on the affected unit)
4) Cooldown system
I already have found a method for this (i think there's a thread in the lab section pertaining to it) but the next trick is applying this to all abilities and creating a system that I can preload each ability into the game with an associated cooldown on the ability it self and a cooldown modifier for the unit that would create the overall cooldown for that ability for that unit. Making it multi-instanceable such that I can run it on a 5v5 hero AoS where even non-hero units have cooldowns that follow this.
5) Casting system
Because of the limitations in allowing for casting during certain affects, every unit would have a 0 cast time and all abilities would be based off of channel. Now the interesting thing I want to have here is the ability to manipulate casting time. Now there has to be a minimum as for most abilities units have to turn around or play a firing animation, although some may allow to skip that. In comes this system which will control how quickly a unit casts an ability. This applies to charging abilities as well as regular spells. Now essentially what happens as the channel itself has 0 cooldown so if the ability is cancelled before the triggered casting time the ability won't fire, won't trigger cooldown, and won't expend mana (the mana consumption will be triggered). Again, this an ability+unit specific set so I need to track the unit and abilities for that unit (because not all units have the same animation, if any units share a similar ability, the effect and casting time may not be exactly the same). Again, I need a way to track the unit+ability combination for all combinations, I'm guessing a system similar to the projectile and buff system would work too.
I'd need to be able to look-up the ability-unit combinations as well (i.e. in a case where the unit is paused but we don't want to terminate the effect [i.e. time freeze or something] we can pause right where they were in their cast and resume as soon as we unpause them.
6) Dynamic terrain tracking system
I want to be able to control the terrain of every single tile on the map. The reasoning is simply, I have some abilities and effects that temporarily alter the ground and using splats to create these effects doesn't work as well as changing the terrain due to the way that terrain tiles automatically link up in a way that I don't have to stack multiple areas and still be easily capable of determining if units are on a certain terrain type).
A good example is I want to trigger water terrain instead of using the water settings currently in game. Why? because you can't dynamically place a water palette overtop the terrain without severely changing pathing of the terrain. SO if I want something like a water bomb that leaves a puddle on the ground that slowly evaporates, then I can do that with minimal setup.
7) Universal constant properties system
Nothing crazy, but there will be some universal constants that apply to all units except when a secondary modifier is applied. These are time, gravity, weight etc. Things that don't change and affect most abilities and units on the map with only exceptions to the rule.
These would allow for things like a time freeze zone where units are essentially put into a stasis field, and everything is frozen (regen, cooldowns, buffs etc.) or custom gravity zones where, for instance, units or projectiles are weight down and can't fly as far or something of that nature.
8) Vision system
I would want a way so I could manipulate a units vision of every single unit on the map. The way i'm working this is there are two tiers of invisibility. 1 tier can be revealed and thus seen with dispel or others, whereas another cannot be revealed unless under special circumstances.
for instance, there is a hero who remains unsee-able while near his illusions and the only way to see him is to destroy those illusions.
9) Miscellanious systems
a) way to treat lightning as a projectile so it can be manipulated a similar way
b) tracking unit motion
c) a way to allow units to move through or alternatively on top of trees and alter vision in such cases. This also applies to cliffs (i.e. a unit has a dash ability, they can dash off a cliff to a lower terrain but not vice versa)
d) mouse tracking on abilities. I.e. once an ability is cast you can use the mouse to manipulate targeting or change direction instead of reselecting.
The biggest thing with all of this is that I have the ideas but I don't know how I would setup or use the systems available to do these things. I'm trying to make a proper "sub-engine" i guess so that the actual ability creation is more just about tweaking the already established parameters. Anyways, any guidance for how to setup these systems would be greatly appreciated.
for the longest time I've had a project in mind that I've fleshed out quite a bit but the problem is I suck at coding and the reality is there's now systems to make things a lot easier for a lot of mappers except. Hence I have a lot of reassources but (a) i'm not aware of what can be used for what and (b) even if I find a resource I THINK is correct for what I want to achieve, I don't know how to use it despite the instructions.
So I'm asking for help to figure out these issues so that I can understand the intent and restrictions of using systems for my custom map.
I have a list of systems below that I want to implement, I have an idea of how I want them to work, I just don't know what sort of setup can achieve that type of effect code wise, mainly in such a way that doesn't leak or slow down on a large AoS sized scale. Items are listed below:
1) Damage detection system:
This one's pretty basic but essentially I'm splitting damage into melee and ranged but the twist is that the damage source is important. For instance, damage can come from melee attacks, bonus damage modifiers (i.e. copy the the damage source but not necessarily the damage type) low arc projectiles, high arc projectiles, lightning (acts as a high speed projectile for collision detection, then once linked as a normal lightining effect), instant effects (ie instant buff or single target effect like an explosion or bomb), from the ground up (think impale or earthquake etc.) or from the sky down (think lightning strike). In any case, I want to be able to distinguish the source such that, say for instance, a unit in the air cannot be harmed by ground effects and a unit with a shield over his head can't be hit by air to ground or high arc'd projectiles.
After damage source I have damage type:
There is 3 main damage types: Physical, Magical, and Pure.
Physical damage is further split into physical damage type (slashing, bashing, weaponless, piercing, seige) which interacts with armor types (leather,metal,cloth,stone,armorless).
Magical damage is split into 5 elemental types (Fire, Water, Wind, and Earth, and Pure) The 4 main interact where as pure magical damage has no associated element and is only affected my magic resistance.
Pure damage is damage that is not reduced by physical or magical resistance. Only special resistances such as invulnerability can stop pure damage.
On top of that I have damage modifiers which increases or reduce damage such as shields (shield life not affected by armor and has resistance value of it's own), weapon and armor enchantments etc.
This one seems fairly straight forward and almost any damage detection system would do, although I'd need to know how to configure to easily assign a damage source and type to the damage (i.e. source is projectile type is magical).
From there we have a
2) Projectile system.
Now for this system, I looked into some of the systems, but one thing that I wanted to incorporate was a few environment mechanisms such as gravity and tracking (homing). Missiles are launched with a certain force and arc which allows a maximum range from where they're fired. They can also have tracking properties, such as a max deviation for tracking, max turn rate etc, such that if you fire a missile and a unit can move perpendicular to the missile's travel path fast enough (i.e. with a high mobility spell or ability, or just very high movement speed) then even some projectiles that would normally hit would miss and just fly forward until they fell to the ground.
Another thing for projectiles is that they'd have to be dynamically manipulate-able such that you could alter their targeting and motion style at any time to, for instance, change the intended target, or direction, change the target-able units (i.e. for unit specific targeting, if it loses tracking it becomes a rogue missile that can hurt any unit it hits) etc. etc.
For this system i thought it would be easy to simply create an array for each projectile to track all these variables, I'm just not sure how to set it up so I can simply run this as a function every time I want to generate a projectile as such I'd have complete control at creation and even during each instance.
The other big thing is I'd need to be able to grab any projectile and get any information about that projectile too, so that I could look up what it was going to do and change it (i.e. maybe an energy field makes all enemy projectiles that pass through it deal bonus fire damage or something, or even heal instead of harm allies)
One other thing to consider is that I'd like the possibility to using units as projectiles too, for the purpose of supporting a knockback system.
3) Buff System
For this system, I want to track all buffs in play, such that I can manipulate buff interaction (i.e. if you has buff A, effect A happens, if you has buff B, effect B happens, if you has buff A and B, effect C happens etc)
For 99% of this, I know I can get away with using the tornado passive and I'd like to trigger everything around this if possible. However, I'm not sure if I can do this and still use things like silence or stuns properly. I know there are some interesting ways to silence units through engineering upgrade and other things like that but stuns seem to require a spell of some sort.
Again I think this is doable in a way similar to the projectiles where I simply track each buff in a way that I can assign the buffs to any specific unit for any specific effect. Again, the big thing is to be able to look up a buff and pull any information or edit it at any point in time from a separate event (i.e. a unit has a spell where they slowly drain a buff away from a unit, essentially adding a buff to themselves and increasing it's duration while reducing the duration of the buff on the affected unit)
4) Cooldown system
I already have found a method for this (i think there's a thread in the lab section pertaining to it) but the next trick is applying this to all abilities and creating a system that I can preload each ability into the game with an associated cooldown on the ability it self and a cooldown modifier for the unit that would create the overall cooldown for that ability for that unit. Making it multi-instanceable such that I can run it on a 5v5 hero AoS where even non-hero units have cooldowns that follow this.
5) Casting system
Because of the limitations in allowing for casting during certain affects, every unit would have a 0 cast time and all abilities would be based off of channel. Now the interesting thing I want to have here is the ability to manipulate casting time. Now there has to be a minimum as for most abilities units have to turn around or play a firing animation, although some may allow to skip that. In comes this system which will control how quickly a unit casts an ability. This applies to charging abilities as well as regular spells. Now essentially what happens as the channel itself has 0 cooldown so if the ability is cancelled before the triggered casting time the ability won't fire, won't trigger cooldown, and won't expend mana (the mana consumption will be triggered). Again, this an ability+unit specific set so I need to track the unit and abilities for that unit (because not all units have the same animation, if any units share a similar ability, the effect and casting time may not be exactly the same). Again, I need a way to track the unit+ability combination for all combinations, I'm guessing a system similar to the projectile and buff system would work too.
I'd need to be able to look-up the ability-unit combinations as well (i.e. in a case where the unit is paused but we don't want to terminate the effect [i.e. time freeze or something] we can pause right where they were in their cast and resume as soon as we unpause them.
6) Dynamic terrain tracking system
I want to be able to control the terrain of every single tile on the map. The reasoning is simply, I have some abilities and effects that temporarily alter the ground and using splats to create these effects doesn't work as well as changing the terrain due to the way that terrain tiles automatically link up in a way that I don't have to stack multiple areas and still be easily capable of determining if units are on a certain terrain type).
A good example is I want to trigger water terrain instead of using the water settings currently in game. Why? because you can't dynamically place a water palette overtop the terrain without severely changing pathing of the terrain. SO if I want something like a water bomb that leaves a puddle on the ground that slowly evaporates, then I can do that with minimal setup.
7) Universal constant properties system
Nothing crazy, but there will be some universal constants that apply to all units except when a secondary modifier is applied. These are time, gravity, weight etc. Things that don't change and affect most abilities and units on the map with only exceptions to the rule.
These would allow for things like a time freeze zone where units are essentially put into a stasis field, and everything is frozen (regen, cooldowns, buffs etc.) or custom gravity zones where, for instance, units or projectiles are weight down and can't fly as far or something of that nature.
8) Vision system
I would want a way so I could manipulate a units vision of every single unit on the map. The way i'm working this is there are two tiers of invisibility. 1 tier can be revealed and thus seen with dispel or others, whereas another cannot be revealed unless under special circumstances.
for instance, there is a hero who remains unsee-able while near his illusions and the only way to see him is to destroy those illusions.
9) Miscellanious systems
a) way to treat lightning as a projectile so it can be manipulated a similar way
b) tracking unit motion
c) a way to allow units to move through or alternatively on top of trees and alter vision in such cases. This also applies to cliffs (i.e. a unit has a dash ability, they can dash off a cliff to a lower terrain but not vice versa)
d) mouse tracking on abilities. I.e. once an ability is cast you can use the mouse to manipulate targeting or change direction instead of reselecting.
The biggest thing with all of this is that I have the ideas but I don't know how I would setup or use the systems available to do these things. I'm trying to make a proper "sub-engine" i guess so that the actual ability creation is more just about tweaking the already established parameters. Anyways, any guidance for how to setup these systems would be greatly appreciated.