Changelog
All notable changes to this project, SPAM Ability Framework, will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[3.0.0] 2024-04 | Ranks
This version is a major release, which means that there might be breaking changes you need to accommodate for in your project. Please read though the changed section carefully and backup/source control your project before upgrading.
This version adds the possibility to add ranks, or variants, to an ability. Ranks allow any property to be changed, which means that you can change everything from cooldown to VFX / projectile prefab between ranks, and with a single call at runtime completely change how your ability behaves.
It also contains multiple quality-of-life fixes and changes, which will greatly speed up some workflows.
Great care has been taken to make sure any previous abilities aren't broken if you upgrade from a pre-3.0.0 version, but as usual make sure to keep a backup before upgrading.
If you encounter any issues, please reach out via Discord or Email.
Changed
- All properties on the underlying ability scriptable object(s) have been converted to methods which accepts a rank. If you are reading these values and get compilation errors after upgrading, you should be able to just add
(1)
after every property (f.eg. fromability.Cooldown
toability.Cooldown(1)
) to make your project compile again. When you then start to use ranks, you can adjust your code where applicable. - Projectiles have been detached from their ability, making them just a visual carrier. This means that if you have abilities that share projectile prefabs, you can now reuse the projectile across abilities, resulting in a much lower footprint and total projectile count.
- The method you implement for custom effects,
effect.ApplyTo()
, has gotten an additional property:int castRank
. All custom effects have to be upgraded accordingly. - The argument
AbilityInvoker projectileInvoker
has been removed from the abstract methodOnSetupForMove()
, and all publicMoveToXXX()
methods on projectile. - The effect ExplosionForce no longer resolves the explosion radius from the ability, it's now a property on the effect itself.
KeepAlive
on projectile pool have been moved to Projectile Ability Component instead, and the behavior is now flipped so pools will stay in the scene until either explicitly removed or when you checkRemove Pool On Destroy
on a Projectile Ability Component.Enemies in the sample game will now rank up every 30 seconds and become stronger. This showcases how you can use ranks at runtime.
Added
Ability ranks. For more information you can check out the documentation either online (https://spam.infinitevoid.games) or in the PDF supplied in the package.
- Custom object selector for projectiles. This will open a new popup that only shows the projectiles available in your project. Requires Unity 2021.3+ since it depends on Unity Search
- "Create new projectile"-button next to the projectile prefab filed on projectile abilities. Now you don't need to dig through the project folders to create prefab variants anymore. The functions have also been added to the right-click context menu in the project window.
- Targeted projectile aim: When casting a targeted projectile at an
IAbilityTarget
, you can now choose if you want to aim at the base, center, or top of the target. - The correct tags & layers have been included into the example project. The FAQ has been updated on how to use and setup this.
- A new effect: Ranked Damage Effect. This can be used as inspiration for how to create ability-rank-scaled damage.
- You can spawn all projectile pools required for all ability ranks at start by checking
Prespawn All Ranks
at the projectile ability component. - A button on every ability component which allows you to directly open the current ability in the ability window.
- Invoker now has a new property:
Default Projectile Spawn
. If you set this to a transform all projectile abilities you add to the caster will have their projectile spawn set to this transform by default. - The ability list can now be sorted.
You can now choose per spawned projectile if you want it to apply effects or not.
Fixed
A bug where in some circumstances projectile would spawn with the wrong initial rotation for one frame, making them "flicker" into position.
Various documentation errors and typos.
Removed
The property
NumInPool
on ProjectilePool, which was marked obsolete, has been removed.- The property
KeepAlive
has been removed from ProjectilePool. This is now controlled viaProjectile Ability Component
instead.
[2.1.2] 2024-01 | Fixing reported errors
Happy new year!
Big shoutout and thanks to everyone who took the time to report errors. It's highly appreciated.
Changed
- Improved error messages when required references are missing.
When some references are missing that can be resolved in play-mode, they will now be resolved in play-mode with an error message describing how to fix this error in edit-mode.
Fixed
Issue with shatter shot in the example game. Would you dare say it was shattered?
- Issue where spawning multiple projectiles with curved movement would under some circumstances make the projectiles spawn along the path instead of at their spawn point.
- Issue where the sample project would fail to load after import.
- Issue with serialization of some ability VFXs in the sample project.
[2.1.1] 2023-10 | Compilation issues
Fixed
- Issue with conditional compilation prevented the project from being built. This is has been resolved.
[2.1.0] 2023-05 | Pooling and VFX
This version adds two new VFX properties: Impact VFX and Cast VFX, along with giving more control over the pooling used internally by SPAM. For more information about these features, refer to the documentation either provided in the package or online at spam.infinitevoid.games
Debug mode can now be switched on by a menu toggle, making it easier for both you to troubleshoot issues in your game and me to help you when you reach out for support.
Last but not least: Directional abilities can now do a box-cast for AOE checks, and SPAM can now handle rotation of VFX, giving you even more control over how your game looks.
Added
- Pooling window. This window gives you a central point where you configure the pooling of Projectiles and On Hit VFX.
- Projectiles can now be modified just before they are cast by assigning a function to
ProjectileAbility.PreCastProjectileSetup
. Note that not everything can be modified, but it's very useful if you wish to change layer(s) or tag of a projectile. - You can open the pool settings window from any projectile pool.
- More helpful log messages when common user errors occur, like projectiles hitting their caster and giving a direction vector to an ability instead of a "cast towards"-point.
- A debug mode switcher in the Tools menu under SPAM Framework. Enabling debug mode enables heavy logging to console so you can see what's going on under the covers of SPAM.
- Directional abilities can now do Box Cast for their area of effect, instead of only Wedge/triangle.
- Most sections in the editor windows have gotten a icon-link to the online documentation for quick reference lookup of properties and settings.
- SPAM Editor Windows now have a SPAM logo visible next to their name.
- Rotation support for VFX.
- Impact VFX. This can be spawned at various positions when an impact hits. Rotation can be configured.
- Cast VFX. This can be spawned at a fixed position on every cast of the ability. Rotation can be configured
- The visualization of a directional ability's area of effect can now be rotated.
Changed
- Projectile pools have had their usage improved, and more control has been given on when they should be filled (edit- or runtime).
- Projectile abilitiy components no longer resolve their ability from the pool they're assigned, but keep that data to themselves for future reference (like when resolving a pool).
- Projectile pools no longer hold the number of projectiles to instantiate on the component, but in the Pooling Window. The Num In Pool field has been marked obsolete and will be removed in a future version.
- On Hit VFX is now reused across all abilities that reference that specific VFX Prefab, when the Instance count is set to "Shared Pool".
- Rewritten some error messages and logs to be more concise and clear.
Fixed
- When using unity in light mode, the SPAM windows were sometimes borderline unreadable. This has been fixed so all windows now are legible and usable in both light- and dark mode.
[2.0.0] 2023-02 | Projectiles
This version reworks projectiles, adding more customisability and quality-of-life changes. In short, projectiles has now been separated from the ability so a projectile ability can spawn multiple, independent, projectiles. This unlocks the possibility to create very complex and visually pleasing projectile abilities. Also, projectiles now move independently and can be moved by either animation curve or straight towards the target, and can be set to rotate in different directions out of the box. The animation curved movement is highly configurable, and can also be somewhat randomised for less repetitive movement.
The release includes general stability fixes. Since this version is a major upgrade, you MUST remove your previous SPAM installation (delete the folder) before upgrading, or you will encounter issues. Also make sure to read through the "Changed" section as this is where the major breaking changes are specified.
If you encounter any issues while upgrading, don't hesitate to ask on Discord or by email for help.
Added
- Abilities can now contain customisable data that makes sense for your project. Just create a class that derives from
CustomAbilitySettings
and you can assign this in the editor. You can then get your settings at runtime withAbilityBaseSO.GetCustomAbilityData<T>()
where T is the type of your settings class. - A preview is now displayed of the selected projectile prefab in projectile ability.
- Logging capabilities that can be turned on and off with compiler directives. This allows for better support when you need help, and easier handling of code stripping in builds. The logger is located under
SpamFramework.Core.Infrastructure.Logging.SpamLogger
, and if you wish more feedback from the framework for debugging purposes you can add the directive "SPAM_DEBUG". - Better support for 2D/2.5D projectiles.
- Prefabs for 2D projectiles.
- AbilityTarget2D component for 2D projectiles.
- New effect:
ConditionScaledDamageEffect
. This effect applies higher damage if the target has a given condition. Remember that effects are the backbone of your game and you're encouraged to use the pre-supplied as templates/inspiration for creating your own effects. - Projectile abilities can now spawn multiple projectiles per cast, and they can move independently from each other.
AbilityBase.Description
want exposed, so a public property has been added to it.- Checkbox for "Add as child" when you add an ability to a GameObject. This will add the ability as a child GameObject (with the same name as the ability) to the selected object.
- Area of effect can now be either a sphere- or box cast. This adds support for grid-based game where the area of effect of an ability should be f.eg. 3x4 tiles, 2x2 tiles etc.
- It's now possible to visualize the direction cone (area of effect area) for directional abilities in the editor. You turn this on by checking "Visualize Aoe" under the directional ability component.
- It's also possible to visualize the Area of effect for targeted abilities. The toggle for this is located under the targeted ability component.
Changed
Most of the changes are breaking changes, so please read through them carefully.
- Projectile prefabs have been updated to more properly reflect their intended usage.
AbilityEffect.ApplyTo
has been changed to include more data and allow for easier unit testing effects. This will break custom effects, but in most cases the change will be very minor to fix for your project.- The property "Move in 3D" was moved from ability to Projectile Movement. It's tooltip is also updated to reflect its intended usage: allow projectiles to be targeted (and travel towards) a point that's at a different height than their spawn point.
OnHitSpawnOnHitAtImpactPoint
was renamed toSpawnOnHitAtImpactPoint
. Only the public name has been changed so it wont break your currently saved settings, but will break any custom code that's reading it.- Renamed
noInPool
for projectile pools tonumInPull
for consistency and clarity. Projectile
is now a base class, with different kind of projectiles (2D/3D) deriving from it. This also allows you to implement your own projectiles by derving your custom script fromProjectile
and implementing the methods required by SPAM.
Fixed
- Custom effects where not showing up under the Effects window.
- Issues in the documentation (dead links, formatting, typos...)
- Deprecation warnings has been fixed in later Unity versions.
- Some issues with Unity 2022 fixed. Note that 2022 is not yet officially supported, but minor testing will be done in this version until it is formally released as an LTS version.
- A bug where a null reference exception was filling up the log after a domain rebuild.
- A bug where the right components where not added to the GameObject you had targeted for an ability under some circumstances.
[1.2.0] 2022-09 | Conditions
This version adds a completely new system to the framework: Conditions.
Conditions is a versatile and powerful system that can be used to create alot of diverse effects, like the following (non-exhaustive) list of examples:
- Add condition(s) to targets on ability hit (stunned, on fire).
- Apply additional effects when a target has or lacks a certain condition (if target is on fire, deal additional damage and remove on fire).
- Only apply effects from abilities when the target/caster meets certain pre-conditions (can only be used on targets that are frozen. Can only be used when caster is shielded).
- Add VFX to a target when it's under a certain condition (on fire can display burning VFX).
- Allow for emergent gameplay (targets/caster gets wet when standing in water, which could enable/disable the use of some abilities or change how they work).
- Add states to targets when they equip a certain item (equipping a shield grants the shielded condition).
- Add elemental groups / types to your game (human, undead, troll... which then could be used as "if caster is vampire and target is human heal caster").
Conditions can be customized in a lot of ways, and has more uses than the ones outlined above. Please see the documentation either online or supplied with the package for more information.
Added
- The conditions system (duh).
- A "rename asset"-button to effects, which is visible when the underlying effect-asset doesn't have the same name as the effect. This makes it easier to select effects in effect-pickers.
- AbilityEffects can now be applied to caster instead of target by checking "On caster" in the "Main Effects"-list.
- An example condition to the sample game provided.
Changed
- Adding the same ability to multiple casters created lots of pools. Abilities now tries to reuse pools when they're added so you don't get drowned in them.
- AbilityInvoker now also implements IAbilityTarget to support applying effects to the caster instead of the target.
- The menu-items for SPAM-windows under "Tools" have been grouped under "Spam Framework".
Fixed
- Effects were applied twice per cast under some circumstances. This was not intentional and has been nerfed back to it's intended "once per cast" behaviour.
- The new input system is now supported out of the box. It's a very bare implementation but atleast it won't break your project on import.
- "On Hit Rotation" has been un-hidden from the Ability VFX settings.
- An exception were sometimes thrown when creating assets in a directory outside of Assets/ or in a subfolder that didn't exists. This has been fixed to assets will always be created under the chosen path, but never outside the Assets folder.
[1.1.2] - 2022-08
Fixed
- The documentation had some embrarrasssing typos, these have been corrected.
- The quick-start part of the documentation wasn't as quick as intended. It is now rewritten to let you hit the ground running!
- Context menus for SPAM were a little more "spammy" than originally planned. They have now been grouped.
[1.1.1] - 2022-08
Changed
- Abilities previously required effects to spawn their VFX and SFX, this has been changed so it's no longer a requirement. Abilities can now be seen and heard without any effect what-so-ever on the game world.
- The offline-documentation was previously dead (hidden). It has been resurrected into the root of the project.
Added
- Added a readme to explain how to install the sample project and where to find the documentation.
Fixed
- An exception was thrown when removing a VFX that had been assigned to an ability. This exception is now gone.
- The timing between ability effects in the ability effects-list was not being saved under some circumstances. Now it's always saved.
- The list of ability effects did not like to be reordered. It was sent to counseling and now understands the importance of being reordered.
- The list of ability effects did also not understand the concept of "be large enough to fit all items". The concept has been explain thoroughly to it and it now understands how to fit all its children properly.
- The namespace in the sample project was way outside of world bounds, throwing compilation errors like there was no tomorrow. After adjusting the namespace the sample now sits in place, ready to serve, like a proper NPC.
[1.1.0] - 2022-08
Changed
- Project structure updated to "UPM Package"-format. This means the framework now installs to ~/Packages instead of ~/Assets, keeping you project folder clean. If you encounter any difficulties while upgrading, please remove any prior versions and reimport. If you still have issues, please send an email to: help@infinivtevoid.games
Added
- This changelog.
[1.0.1] - 2022-08
Fixed
- Removed references from core framework to example project.
- Fixed bug with abilities window not loading correctly in Unity version 2021.2 or newer.
- Fixed bug with projectiles without telegraphs.
- Fixed layout of effect list on lower resolution screens.
[1.0.0] - 2022-08
Initial release