This is my personal blog its main purpose is just as a sort of work log for myself, but maybe someone might find some part of it interesting or useful at some point. I started keeping this log back in July 2025, but it was just on a text file on my desktop so everything up until the creation of this website will have a listed date in the title.

Robert Aldridge Robert Aldridge

Added the stunned damage multiplier to the calculate damage function.

Cleaned up the code inside of the Calculate damage function it was a bit of a mess

Fixed a bug in the stun calculation

Fixed a naming bug in the GetIsStunned_OnInterface function, it was returning MidDraw instead of IsStunned, must have forgotten to change it.

Added the stunned damage multiplier to the calculate damage function.

Cleaned up the code inside of the Calculate damage function it was a bit of a mess

Fixed a bug in the stun calculation

Added a call in editor debug event to our NPC to reset all the skills to 5, why the fuck haven’t i done this sooner. No more tracing down which skills are set in debugging mode.

Fixed a bug in the magic system where we were never resetting the spell loading value if the NPC ran out of magic.

Found a bug where the magic regeneration is happening even if a spell is charged which is a bit broken.

Added an interface event called IsSpellCharged_OnInterface to help us stop the magic regeneration if you or an NPC is actively casting a spell.

Magic no longer regenerates while casting a spell!

The math for calculating spell cost inside the T_DetermineMagicSpell was not using the correct formula.

Fixed a bug where spell cost was being paid twice for NPCs.

If NPCs run out of magic they now have a chance to switch to another weapon if they have one.

Added an interface event for GetHighestCombatSkill_OnInterface this returns what the highest skill is for the Character and whether or not its magic

Fixed a bug where we were still resetting the skills when reevaluating the weapons.

Created a new function in the AI Parent to get the highest combat skill excluding magic. The idea being we need to be able to force the NPC to a different combat method if they are out of magic.

Changed the Reevaluate weapon function to include an input for if we should exclude magic when reevaluating

Fixed a bug in the S_Strafe service causing it to not compile due to the Get is stunned event update.

Fixed a bug in execution flow of new determine highest combat skill functions.

Fixed a bug where the magic regeneration timer was always ticking even when at 100 percent magic.

Fixed a bug where NPCs would spam weapon switching

Fixed a bug where NPCs would sprint around the player while aiming with magic… hilarious to look at but not fun at all.

Added a in interface function to the BTGS Interface called GetMagicPercentage_OnInterface to help us make sure we arent trying to switch to magic combat when we don’t have enough magic to likely be able to cast spells.

Fixed a bug where we would attempt to switch to magic combat while already trying to switch combat causing a loop

Fixed a bug where we would switch to magic when we should have switched to ranged weapons instead.

NPCs can now reliably switch in and out of magic combat based on their amount of magic!

Added interface events for set and get invisibility, we already had events for setting the active state used for things like completing narrative events or updating behavior, but nothing to actually set the actual variable in the stats component… which also didnt exist until now.

NPCs now correctly respond to player using invisibility

Updated how we are clearing targets inside the BP AI Controller

NPCs now correctly respond to players losing invisibility

Fixed the bug where npcs couldnt detect players in bushes.

Read More
Robert Aldridge Robert Aldridge

Fixed the dialogues not being played properly for the endless spawning characters.

Created the new dialogue assets for the rest of the characters.

Generated and imported all the new temp combat barks.

Fixed the dialogues not being played properly for the endless spawning characters.

Created the new dialogue assets for the rest of the characters.

Generated and imported all the new temp combat barks.

Read More
Robert Aldridge Robert Aldridge

Bug fixes continued

Fixed a large bug where ground spells would still activate their damage on dead targets

Fixed a quite frustrating and persistent bug where NPCs couldn’t reach the player turned out to be an issue with some things blocking the nav mesh.

Generated a bunch of temporary audio lines for combat testing of things like oofs and combat barks.

Fixed a large bug where ground spells would still activate their damage on dead targets

Fixed a quite frustrating and persistent bug where NPCs couldn’t reach the player turned out to be an issue with some things blocking the nav mesh.

Generated a bunch of temporary audio lines for combat testing of things like oofs and combat barks.

Fixed some missing audio lines for aviamon.

Created the new dialogue assets for the Nymaa Mid Age Males

Spent a bit debugging why i cant get the new voice lines to play, but havent solved it yet, muts be missing something will have to solve tomorrow.

Read More
Robert Aldridge Robert Aldridge

Optimizations and bug Fixes!

Fixed a bug in the scaling of our crowd actors

Removed the old code and cleaned up the code for reducing magic in the magic component.

Added a loop to destroy all the components in the character when they die instead of having them all plugged into one destroy so we can do an is valid check.

Started the process of optimizing a bunch of the files related to our VFX files a significant point of performance issues for us.

Fixed a bug in the scaling of our crowd actors

Removed the old code and cleaned up the code for reducing magic in the magic component.

Added a loop to destroy all the components in the character when they die instead of having them all plugged into one destroy so we can do an is valid check.

There was a bug where spells that hit anything would give experience and attempt to do damage or effects to it.

Fixed a bug in checking for offhand weapons in the melee component.

Added a validated get for the magic component inside the bp ability parent before reducing magic.

Fixed a bug where spell would never go away if you dropped a charged wand

Fixed a null ref when trying to destroy a slowly cast spell in the player character

Fixed a bug where spawned wand spells would be destroyed if you dropped the wand

Added a lifespan of 30 seconds spells spawned from wands

Fixed a bug where spells hitting weapons wouldnt actually damage the one holding it, this was originally designed this way, but it just isnt fun and looks like a bug to users.

Fixed bug where we would try to stop magic charge on interface on an invalid spell

Added a delay and do once to the crowd sound triggers to make sure we werent just playing a bunch of sounds over each other.

Fixed a bug in the endless NPC spawner where hair would spawn with helmets

Added a function to the BP AI Parent to check if an npc has a backup weapon, this returns a boolean for melee or ranged, purpose is to have a check inside the behavior tree so we can try to switch weapons to melee if player is too close or marksman if they are too far away.

Added an interface event to the BTGS AI Interface called Does NPC Have Backup Weapons this returns a cached value from the previously implemented function to check the same. This cached value is updated every time the character is spawned or reevaluates their weapons

Added a function to the BTGS AI Interface to return whether or not we are currently revaluating the npcs weapon

The NPCs now have a chance to switch to Melee weapons if they have one and you get close to them while they are in ranged combat mode.

Added a cooldown for how often hit reactions can play it was possible for the player to basically permanently stun lock the NPC making things way too easy.

Removed the ref to the old HUD from all the creatures

Removed the old Attack Group checking code from the AI controller, we no longer use attack groups

Removed the old attack group setting code from the AI controller.

Fixed a missing weapon socket on the base skeleton

Fixed a bug inadvertently created earlier when i fixed the null off hand weapon issue in the melee component. Becuase of the new execution flow we were never unsetting the IsAttemptingShieldBash Boolean leading to npcs playing the wrong attack animations and not actually doing any damage.

Added an interface event for DoesPlayHaveSpawnedSpell? I’m sure this’ll come in handy in a bunch of places later, but right now i need it to let the NPC know if a player is using magic as of right now they only understand if the player is holding a melee or ranged weapon.

Added an interface event for GetPlayerSpawnedSpells Returns the left or right spawned spell.

Added the check for magic in the EnemyIsRangedOrMagic function inside the setting ai behavior service.

Adjusted the distance that is considered valid for an npc to be from the player before attacking with a melee weapon they were far too close before. Current calculation is 80 percent of weapon length plus the length of a metahuman arm which is around 90cm I believe.

Fixed a null reference in the top and bottom blocking code for spawning particle effects that would happen if the NPCs shield broke during combat.

Shortened the distance an npc could be from the player when using hand to hand weapons

Fixed a bug in the melee component where we tried to get the world location of a component that didnt exist.

NPCs now have a chance to switch to a ranged weapon if they have one and you get too far from them while they are in melee combat mode.

NPCs now have a chance to switch to a melee weapon if they have one and you get too close to them while they are in magic combat mode.

Read More
Robert Aldridge Robert Aldridge

The combat polishing begins!

Created the Endless spawner level and populated some racks with weapons

Added a new event call ResortSpells to the spell inventory component so we can have access to spells added after event begin play We could call learn spell, but this is if we wanted to add multiple at one time easily and refresh all the arrays of spell types.

Fixed a bug where we were never updating the faction of the NPC at runtime causing combat to not start sometimes

Added a new particle effect for when staves are being charged.

Fixed a bug in choosing staves.

Added new socket on skeleton for holding staves

Reworked how we get the socket to attach weapons to, its much cleaner now!

Fixed a bug in the animation graph where weapon stance wouldnt get updated.

Added Staff and Wand as options in the E_WeaponType enum.

Created new wand and staff state machine in the anim bp for these new enum values, they are placeholder for now but work better than what was there.

Shields were never taking durability damage when blocking, thats been fixed.

Fixed bug where NPC to NPC combat wouldn’t activate due to the recent changes to how player combat activates

Fixed a bug where if an NPCs staff casting anim was interrupted like from being hit the charge effect would never go away.

Created a new animation notify for death ragdolling

Fixed a bug in the release magic charge function that would stop a death ragdoll from playing

Ragdolling kind of works now.

Fixed an engine crash when we would ragdoll if still moving using the character movement component

Replaced our physics asset override in our character this one seems to work a lot better less creepy neck stuff

Added a new boolean AvailableForDialogue to the btgs stats component for a better way of checking if we should allow an NPC to start dialogue instead of a bunch of other more complex checks we had.

Fixed the dialogue not starting when using the new tutorial player characters

Cleaned up the weapon range code.

Cleaned up the begin play event for NPCs broke things up into events for better readability

Removed all the old dialogue card code from the BP AI Parent seeing as its now part of its own dialogue UI.

Removed the super old code from the original demo that we used to kill the bandits.

Removed the old facial animation code from when we tried to use a plugin for facial animation before our custom system.

Removed the old code for player weapon swing direction checking, now that that lives in the weapon itself.

Cleaned up the readability of all my recent interface events in the BP ai parent, was looking a bit spaghetti

Created the Endless spawner level and populated some racks with weapons

Added a new event call ResortSpells to the spell inventory component so we can have access to spells added after event begin play We could call learn spell, but this is if we wanted to add multiple at one time easily and refresh all the arrays of spell types.

Fixed a bug where we were never updating the faction of the NPC at runtime causing combat to not start sometimes

Disconnected the mesh merging for now because it breaks armor reevaluation, I think i know how I wanna fix that just gonna be time consuming and isnt the highest focus tonight.

We apparently never actually connected the armor equipping function to the revaluate armor function fixed that.

Created an Endless Arena Spawner manager that can randomize armor, weapons, and spells of NPCs and then spawn them in one at a time although there isnt really a reason that couldn’t be more.

Fixed a bunch of broken textures on the NPCs… again, really wish epic would fix that bug.

The endless game mode version basically works now albeit with a fair amount of bugs mostly due to player actions or the fact that we have some blocking loads for armor pieces that shouldn’t be there.

Tomorrow it just needs to be played a lot to gather bugs and then fix those, also need to work on the optimization a bit there some defined pain points such as new spells spawning in or new animations loading in.

Read More
Robert Aldridge Robert Aldridge

Wands

Fixed a bug where NPCs could equip shields when using staves.

Added Max Charge values to all the staves in the data table, will probably need to balance it later.

Added the missing frost ground spell VFX

Fixed a bug where NPCs could equip shields when using staves.

Added Max Charge values to all the staves in the data table, will probably need to balance it later.

Added the missing frost ground spell VFX

Fixed a bug where non staves and wands would get an event to charge a particle effect

Wands are now working fully!

Spent a couple hours curating new animations for the staves and wands what we have isnt great.

Read More
Robert Aldridge Robert Aldridge

Added an interface event for SetStaffCooldownStatus_OnInterface to the BTGS_Interface

Added a variable for StaffCooldownActive to the combat status component. Not sure I love having it there we will be passing data between the character, the staff, the combat status component and the melee component because thats weirdly enough were staves fire from not sure why we programmed it that way frankly, system is complex… seems like a lot of failure points.

Added an interface for GetStaffCoolDownStatus_OnInterface to the BTGS_Interface

Started tracking down why staves are not working properly for NPCs, They would cast the spell but none of the effects would show up even though the player was taking damage.

Added an interface event for SetStaffCooldownStatus_OnInterface to the BTGS_Interface

Added a variable for StaffCooldownActive to the combat status component. Not sure I love having it there we will be passing data between the character, the staff, the combat status component and the melee component because thats weirdly enough were staves fire from not sure why we programmed it that way frankly, system is complex… seems like a lot of failure points.

Added an interface for GetStaffCoolDownStatus_OnInterface to the BTGS_Interface

Added a check in the melee component attack conditions to check to see if the staff attack is on cooldown

Added an additional check to the setting AI behavior service to make the AI strafe if the staff attack is on cooldown.

Added an interface event to the I_Weapon interface for StartStaffCooldown this is to help us deal with a race condition due to async loading

Fixed a bug where Randomly selected weapons werent getting a valid charge.

Moved the calculation for whether or not a staff spell could be charged we were previously removing charge from the staff at the end of the execution line.

Fixed a bug where the staff charge would continue dropping below 0

Added a variable to the base object to keep track of whether or not a weapon is out of charge.

Added an interface event GetIsWeaponOutOfCharge

Updated the previously existing Weapon out charge interface to be called Set Weapon Out Of Charge for better clarity

Fixed a bug where NPCs could pick a staff or wand that hand no charge as their active weapon

Created a new interface event GetItemCurrentCharge_OnInterface

Added a new tagged dialogue type for when weapons break so the NPCs can bark something if their weapon breaks.

Added a new tagged dialogue type for when weapons run out of charge so NPCs can bark something if their staff runs out of charge.

Added a temp sound in for when weapons break like a snapping metal kind of sound, need to replace with a proper metasound but sound so good already, cant believe I didnt think about that sound effect before now.

Added a temp sound effect for when a staff runs out of charge, need to replace with a proper meta sound.

Fixed a bug where the reevaluate weapon function would get stuck in an infinite loop if the weapon they should sheathe gets destroyed mid sheath.

Fixed a bug where the reevaluate weapon function would fail to sheath the shield if the main hand weapon broke during sheathing.

Read More
Robert Aldridge Robert Aldridge

Now that our weapon switching is working pretty consistently, I’ve plugged the reevaluate weapon function back into weapon broken event. Now if an NPC weapon breaks they will immediately reevaluate their weapon.

Modified the formula for weapon range calculations inside of the Setting AI behavior service. It was calculating differently than the values used inside the actual character causing distance based bugs.

Fixed a bug where NPCs would never put away their shield if their weapon broke.

Now that our weapon switching is working pretty consistently, I’ve plugged the reevaluate weapon function back into weapon broken event. Now if an NPC weapon breaks they will immediately reevaluate their weapon.

Modified the formula for weapon range calculations inside of the Setting AI behavior service. It was calculating differently than the values used inside the actual character causing distance based bugs.

Fixed a bug where NPCs would never put away their shield if their weapon broke.

Fixed a bug where NPCs would destroy the ref to their fist weapon when switching from magic.

Read More
Robert Aldridge Robert Aldridge

Fixing the hand to hand combat.

Ran the combat overnight to check for bugs, none were noticed until spell number 3748 was cast, when the fireball got stuck to the npc hand again, gonna put some check in later down the combat execution path to make sure that if there is a spell and we arent in magic combat mode it gets destroyed.

Fixed a bug where npcs could select broken weapons from their inventory to fight with, causing them to never switch to hand to hand combat.

Apparently our hand to hand combat has been broken for over a year and I never noticed because none of our npcs for the Arena tutorial or alpha are were designed to fight with fists, they can properly switch to fists now.

Ran the combat overnight to check for bugs, none were noticed until spell number 3748 was cast, when the fireball got stuck to the npc hand again, gonna put some check in later down the combat execution path to make sure that if there is a spell and we arent in magic combat mode it gets destroyed.

Fixed a bug where npcs could select broken weapons from their inventory to fight with, causing them to never switch to hand to hand combat.

Apparently our hand to hand combat has been broken for over a year and I never noticed because none of our npcs for the Arena tutorial or alpha are were designed to fight with fists, they can properly switch to fists now.

The animations for fist combat werent properly named or assigned to the data table for the left or right fist, they both had all the hand to hand combat anims. Causing bugs in hit detection. Fixed it.

The code for actually throwing a Left punchwas never actually programmed in we were only ever checking for if the left hand weapon was a shield for shield bashing, I added in some checks to see if the left hand weapon was a fist if it is we have a 50 percent chance of using the left fist instead of the right one.

Fixed a bug where the fist objects would be destroyed when reevaluating weapons when no others were available.

Fixed a bug when fist references wouldnt be set when switching from Magic to hand to hand.

Fixed a execution flow issue in evaluating the chance to throw a left punch in the melee component.

Finally fixed the issue of NPC attacking when they were no where near the player in two ways, first the code for actually defining the range based in weapon length sometimes had invalid refs to the weapon, and second I added a check to see how far away the NPC is from the player and if they arent within that distance they return negative on their can attack check. We were previously only using that range to tell the npc where to run during combat, but there was nothing stoping them from still attacking if they got to an invalid location until now. This does sometimes result in the NPC just standing there if they cant get to the player, but thats better than them attacking aimlessly, in practice it just looks like the npc is waiting in the player to make their next move which is a cool side effect.

Fixed a bug where the magic casting animations went on way to long even after a spell was done firing.

Added a new socket for the hand to hand weapons because none of the existing sockets worked well, modified the logic of the weapon attach to hand function to use this new socket.

Hand to hand weapons working just like the rest!

NPC can now taunt the player if they cant reach them including playing a sound and an animation! Basically if the NPC cant reach they player they will say something like come on strike me coward!! Fucking awesome addition that only took a few minutes.

Read More
Robert Aldridge Robert Aldridge

BUGS BUGS BUGS

Took all day, but i finally solved the…hopefully actually this time. Where npcs would sometimes have spells or arrows stuck to their hands after switching to a different combat style. Really difficult bug to track down due to it being so inconsistent.

Adjusted the magic regeneration rate for npcs it was way too high.

Fixed the bug where npcs would spawn more weapons on top of existing weapons.

NPC combat can now switch between magic, two handed weapons, archery, and multiple types of one handed weapons.

Took all day, but i finally solved the…hopefully actually this time. Where npcs would sometimes have spells or arrows stuck to their hands after switching to a different combat style. Really difficult bug to track down due to it being so inconsistent.

Adjusted the magic regeneration rate for npcs it was way too high.

Fixed the bug where npcs would spawn more weapons on top of existing weapons.

NPC combat can now switch between magic, two handed weapons, archery, and multiple types of one handed weapons.

Read More
Robert Aldridge Robert Aldridge

Turns out the stuff I did yesterday works great unless the NPC has a shield, so its a bit of back to the drawing board for that system.

Previously we were sequentially calling the draw events for the main and off hand weapon with just minor variable changes this was kind of dumb in retrospect, I’ve created a new event inside the Combat status component to allow us to just pass the proper weapon variables.

I’ve created a new interface event inside the BTGS Interface called SetWeaponDrawnStatus_OnInterface, it makes more sense and should simplify the code and solve some bugs to store the Actual drawn state of the weapon inside of it instead of inside the combat status component.

Turns out the stuff I did yesterday works great unless the NPC has a shield, so its a bit of back to the drawing board for that system.

Previously we were sequentially calling the draw events for the main and off hand weapon with just minor variable changes this was kind of dumb in retrospect, I’ve created a new event inside the Combat status component to allow us to just pass the proper weapon variables.

I’ve created a new interface event inside the BTGS Interface called SetWeaponDrawnStatus_OnInterface, it makes more sense and should simplify the code and solve some bugs to store the Actual drawn state of the weapon inside of it instead of inside the combat status component.

We already had an interface event for GetWeaponDrawnStatus_OnInterface, but were never using it so taht’s been fixed as well.

Pretty large rewrite of the combat systems conditions stretching from AI tasks to animation blueprint changes to base object changes. The System now works with shields and main hand weapons again and is much more consistent. Still some issues with switching into weapons that are already used on a slot for instance if an axe is holstered on the NPCs hip and they try to spawn a short sword it will spawn on top of the axe, should be bale to fix that soon though.

Read More
Robert Aldridge Robert Aldridge

Weapon Switching Fully working!!

Added some debug commands for camera rotation

Fixed the material on the Quiver, it was somehow still set to a default lit material.

Took all fucking day, but we finally have consistent switching between the 3 possible combat styles. Melee, Marksman, and Magic!

Fixed a small bug with the placement of the VR player hands.

Added some debug commands for camera rotation

Fixed the material on the Quiver, it was somehow still set to a default lit material.

Took all fucking day, but we finally have consistent switching between the 3 possible combat styles. Melee, Marksman, and Magic!

Read More
Robert Aldridge Robert Aldridge

The character overhaul continues.

Added a new function to the BTGS_Interface called GetSkillOfItem because a check we do frequently is to get the item info break the struct and then compare its skill to a given skill for flow control, this simplifies that code.

Removed references to the Cell state manager from the BP AI Parent, it was used by the old saving and loading system, dont need it for the new one.

Removed a bunch of old weapon attachment code from the combat status component

Added a new function to the BTGS_Interface called GetSkillOfItem because a check we do frequently is to get the item info break the struct and then compare its skill to a given skill for flow control, this simplifies that code.

Removed references to the Cell state manager from the BP AI Parent, it was used by the old saving and loading system, dont need it for the new one.

Removed a bunch of old weapon attachment code from the combat status component

Fixed a pretty large bug in the weapon switching where NPCs would continue to use their previous weapons animations.

Added some booleans for hip holster occupied and back holster occupied to help us with NPC weapon switching during combat the idea being that if they need to reevaluate their weapon they wont spawn one in an already occupied holster.

Fixed an animation bug where NPCs would briefly play animations for the attack of their previously equipped weapon, separate from the above bug.

Weapon switching between ranged and melee is working pretty consistently.

Fixed the bug where NPCs couldnt switch to magic casting from melee weapons.

Many small bug fixes mostly not listed here.

Read More
Robert Aldridge Robert Aldridge

The character overhaul begins!!!

Removed the references to the debug faction component

Removed the references to the old HUD

Removed Level Streaming Check function, we don’t use world partition anymore so we dont need it anymore.

Pretty much every line here will be in reference to the BP AI Parent unless otherwise stated

Removed the references to the debug faction component

Removed the references to the old HUD

Removed Level Streaming Check function, we don’t use world partition anymore so we dont need it anymore.

Collapsed a section of the graph dealing with facial animations to a new function called SetupNPCHeadAnim for the sake of readability

Removed the references to the Physical Animation Component, we disabled it a bit ago because of performance concerns.

Removed the Set Physical Animation Graph.

Added an event called UpdateQuiverMesh to allow us to change the quiver mesh, right now only one quiver mesh is ever used, theoretically if an NPC changed arrows during combat we would need this.

Added a Has Ammo Boolean variable to the BTGS_InventoryComponent we already have a function for this, but it requires us to search through the entire inventory which is costly so this is more of a cached value.

Added an item validation check and IsMarksman check into the choose best weapon function for better event graph readability.

Moved the Choose Best Arrow function to after choose best weapon no reason to run a loop to check for arrows if we arent even choosing a bow.

Added an item validation check to the ChooseBestShield function.

Finally Removed the entire patrol system, it wasnt really doing much as there was never a reference to a patrol blueprint. We dont do patrolling AI, Synapse AI will take over all those functions anyway.

Fixed a bug in combat execution that a previous optimization broke. Basically we were calling the interface event for begin attack on the wrong component.

Removed the player valid check timer it wasn’t doing much anymore and we have much better player proximity optimization now anyway.

Removed refs and setup function for the original stats widget

Moved the Weapon range calculations into a new event for better readability and an eventual plan to move it to a different component.

Removed Ref to the Physical animation component inside of the Resource component

Removed Ref to the Physical animation component inside of the Taking Damage component

Added an interface event called GetIsStunned_OnInterface to the BTGS Interface so we can pass that value around instead of relying on a hard ref to the melee component.

Added an interface event called GetIsMidDraw_OnInterface to the BTGS Interface so we can pass that value around instead of relying on a hard ref to the combat status component.

Got the the old temp non combat AI Integrated into the main behavior tree

Added an interface event called ToggleHealthWidget_OnInterface to the BTGS Interface so we turn the health UI on and off via a Service on the behavior tree.

Completely removed the old AI activation system, we now handle whether or not the NPC is in combat between the behavior tree and the AI controller.

Many many other changes inside the BP Ai Parent… the code is so much cleaner and more efficient.

Read More
Robert Aldridge Robert Aldridge

Further testing of the individual combat systems in preparation for the Character overhaul

Found some missing VFX in the magic effects data table gonna pass that over to Jackie on Monday.

Replaced some references to the movement status component inside of the T_SetMovementSpeed with the interface event UpdateMovementSpeed.

Cleaned up the code inside of T_SetEnemyAsFocus

Found some missing VFX in the magic effects data table gonna pass that over to Jackie on Monday.

Replaced some references to the movement status component inside of the T_SetMovementSpeed with the interface event UpdateMovementSpeed.

Cleaned up the code inside of T_SetEnemyAsFocus

Removed references to the input buffer component and movement status component inside of the Ranged Component

Fixed a bug in the archery combat where the NPC Arrow would never be destroyed if they sheathed their weapon

Replaced the old GetStatsComponent function with the new one inside of the T_CheckNeedToHeal, this was sometimes causing a crash in both the engine and game.

Found a pretty large bug, that I’m not quite sure how to fix yet. If an NPC loses sight of the player and returns to their location they can never reactivate their AI even if looking right at the player.

Removed some old animation references from T_SendOffAttack.

Created a new Interface event called EventAttackOnInterface to allow us to call for an attack without an explicit reference to the melee component.

Reduced size of T_SendOffAttack from 35 mb and 1200 references down to 2.1mb and 165 references, by removing references to the melee component.

Cleaned up the code in the task T_DrawArrow.

Removed a ref to the Magic component from the S_MageStrafe service.

Read More
Robert Aldridge Robert Aldridge

More bug fixes in the magic system.

Added in a check to make sure that channel spells cant activate if the player is too far away.

The individual spell types (Channel, Rune, Ground, Sky, Self, Projectile) all seem to be working so I finally tied all the code in to allow the NPCs to switch between all types of spells available to them including some random variation with weighted bools. Might want to eventually make this tied to skill level or something.

Wrote a nice new function that can determine and fill out if we have certain kinds of spells like rune or ground spells as a sort of early out for when we are determining what type of spell to cast.

Added in a check to make sure that channel spells cant activate if the player is too far away.

The individual spell types (Channel, Rune, Ground, Sky, Self, Projectile) all seem to be working so I finally tied all the code in to allow the NPCs to switch between all types of spells available to them including some random variation with weighted bools. Might want to eventually make this tied to skill level or something.

Wrote a nice new function that can determine and fill out if we have certain kinds of spells like rune or ground spells as a sort of early out for when we are determining what type of spell to cast.

Added an early out for what school of magic to cast a spell from.

Realized NPCs could never cast resotration spells other than Restoring health. Added a new branch to the T_DetermineMagicSpell to allow them to cast other spells in restoration school.

Cleaned up the code inside of T_DetermineMagicSpell using some new events to clean up the spaghetti.

Removed all of the old spell selection code inside of T_DetermineMagicSpell, previously it was designed around the idea of having certain types of mages that could cast a type of spell instead of having universal characters that could cast anything based on their skills and spell inventory.

Fixed a massive bug in the strafing movement code where NPCs would jitter back and forth while a spell was loading.

Read More
Robert Aldridge Robert Aldridge

Ground and Sky spell conversion to Rune Style casting

Cleaned up the massive amount of spaghetti code in the BP Ability Parent.

Created a new actor called BP_PhysicalPlacementSpell for us to spawn just like the Physical Rune objects.

Added a new event to the BTGS_MagicInterafce called SetupPhysicalPlacementSpell_OnInterface which we are using to actually set up all the required stuff for the new physical placement spell actor.

Cleaned up the massive amount of spaghetti code in the BP Ability Parent.

Created a new actor called BP_PhysicalPlacementSpell for us to spawn just like the Physical Rune objects.

Added a new event to the BTGS_MagicInterafce called SetupPhysicalPlacementSpell_OnInterface which we are using to actually set up all the required stuff for the new physical placement spell actor.

Converted all the of NPC Ground and Sky spell Casting to using the new BP_PhysicalPlacementSpell took several hours but well worth it much cleaner and compartmentalized code!

Several more hours of testing and bug fixing the new Placement spell actor.

Read More
Robert Aldridge Robert Aldridge

Bug fixes in the magic system.

Fixed the collision profile on the rune overlap volumes. Previously they collided with weapons, which while funny, is unintended behavior.

Fixed a order of operation issue where runes would sometimes not count as being destroyed and would not update the current number of spawned runes.

Removed references to the Input Buffer component from the Taking Damage component, the eventual goal is still to get rid of the taking damage component.

Fixed the collision profile on the rune overlap volumes. Previously they collided with weapons, which while funny, is unintended behavior.

Fixed a order of operation issue where runes would sometimes not count as being destroyed and would not update the current number of spawned runes.

Removed references to the Input Buffer component from the Taking Damage component, the eventual goal is still to get rid of the taking damage component.

Implemented the Event Stop Magic Charge on interface event on the BP AI Parent to fix the bug where an interruption would put the NPC in a loop where they couldnt cast spells.

Put a check in the task T_ChargeSpell to make sure we arent trying to charge a spell if we already have an active one.

Another day, another shit storm of Niagara related crashes. Absolute dog shit system.

Duplicated the BTGSFunctionLibrary and named it BTGSMagicFunctionLibrary so we could rip out all of the magic functions from it to better isolate the systems form each other for less dependencies. The regular function library has a lot of dependencies related to the base object that we dont need for anything magic related.

Created a new event inside the BTGSInterface called ResetMeleeAttackOnInterface this is so we can reset melee attacks without a hard ref to the melee component inside of the BP AI Controller.

Implemented the new event inside the AI Parent so that we can now reset the melee attack without the hard ref inside the AI controller.

Created a new event inside the BTGSInterface called AIRollBackwards_OnInterface so we can force the NPC to roll backwards when they are using a bow without hard references.

Reduced the size of the Magic component from 35mb down to 2.3mb. Also reduced its number of references from over 1200 down to 165.

Removed references to the Input buffer component and melee component from the combat status component.

Created a new event inside the BTGSInterface called EndNPCBlocking_OnInterface this is so i could get rid of the hard ref inside of the combat status component.

Removed a reference to the resource component from the equipment component. The plan is still to get rid of the resource component all together at some point.

Found that all of our spell effects VFX files are not set properly passing that off to Megan to be fixed.

Found that all the colors for our destruction projectile spells aren’t nearly noticeable enough Jackie previously set all the colors on the smoke on them but not the flames leading them to all look the same. She is gonna fix those now.

Created a new interface event called UpdateCurrentNumberOfGroundSpells_OnInterface, this is to help us track and control how many ground spells the character can cast.

Created a new interface event called UpdateCurrentNumberOfSkySpells_OnInterface, this is to help us track and control how many sky spells the character can cast.

Added new variables to the BTGS Stats component for max and current number of active sky and ground spells.

Added a pure function to the BTGS Stats component to return whether or not we can cast a ground spell.

Added a pure function to the BTGS Stats component to return whether or not we can cast a sky spell.

Started debugging the issues where the NPC could cast multiple Ground spells even with our new variables and functions. The issue seems to stem from the way we originally designed ground spells to work they were and are channel spells meaning that the npc is supposed to not be able to do anything else until that spell is done, but they act more like projectile spells now in that they cast the spell and then its damage tick is handled inside the same BP_AbilityParent because these are AOE effects. I think we need to convert these to basically be handled the same way as we do rune spells. We spawn the ground spell at a location and then let that newly spawned object handle the damage tick and the updating of the total number of current active ground spells. I can’t really foresee an issue with this method so far. Ill need to continue working on it tomorrow.

Read More
Robert Aldridge Robert Aldridge

More work on the Magic system.

Discovered that we are missing some animation notifies on the rune spells which is part of the reason they arent working.

Got rune spell casting working again for NPCs.

Players cant seem to out run the rune spells so I put in a slight delay of .5 seconds when the rune spawns to actually turn on its collision. Not a great solution but works well enough for now.

Set up my OBS to be able to record streams of development stuff

Discovered that we are missing some animation notifies on the rune spells which is part of the reason they arent working.

Got rune spell casting working again for NPCs.

Players cant seem to out run the rune spells so I put in a slight delay of .5 seconds when the rune spawns to actually turn on its collision. Not a great solution but works well enough for now.

Remove some Input buffer code from the BP_ABility_Parent that was causing the npc to not be able to cast more than 1 rune spell

Added a couple variables to the stats component to track the current and max number of runes for a given character.

Added an interface event UpdateCurrentNumberOfRunes_OnInterface so we can actually keep track of the number of runes an NPC has cast and stop them from casting too many.

Added a new function to the stats component to return whether or not we can cast a new rune spell just returns true or false.

Added a new function inside the spell inventory component to return an array of Destruction rune spells.

Changed the functionality of that new function so that it actually can take in any spell type instead of just rune spells.

Added the UpdateCurrentNumberOFRunes_OnInterface event to the BP_AIParent

Fixed backwards logic in the calculation of current number of runes

Fixed a bug where the npc would stop casting spells if their rune expired

Put in a check to determine what type of damage is being done to the npc so we can disable hit animation om magic hits, we might add different hit effects for magic later, but right now they just sometimes break magic combat

The NPC can now switch properly between rune and projectile spells.

Read More
Robert Aldridge Robert Aldridge

New Site Setup!

Decided to finally start putting my work logs on a dedicated blog instead of just a windows notepad. Spent a couple hours setting up this new website.

Decided to finally start putting my work logs on a dedicated blog instead of just a windows notepad. Spent a couple hours setting up this new website.

Moved some of the booleans for the execution flow that helps us determine if an async load for the spells was still in progress in an attempt to fix some issues related to first time loads of VFX on spells.

Fixed a bug where some spells would never charge successfully due to an async loading issue… noticing a pattern here.

Removed a delay that was causing magic effects to sometimes not destroy on impact, we previously needed a delay due to the nature of the original design of the system. We no longer need that due to the redesign months ago but that delay was never removed.

Added a new event to the BP_Ability_Parent called PreloadMagicEEffectVFX this solves the issue spell impact effects sometimes not spawning fast enough, there is still an async load inside the actual magic effect just in case they still dont load in time.

Took an hour to track down a weird issue were sometimes the NPC would never get out of their spell charge state, turns out we had a few animations that werent updated in the spells data table. Not sure what happened there but some of them had 17 animations and some of them had 20.

With the help of Jackie I fixed a weird offset issue with our shock hit effect that was causing the hit effect to spawn in the wrong location. We also made the effect larger to better match some of the other effects.

Watched the NPC fire spells at the player for a good 20 minutes without any significant failures, SICK!

Loaded up the NPC with all the damage X projectile spells and watched them fire at the player for like 30 minutes. Everything is mostly fine, the only real issue is sometimes heavier VFX files still dont load in time. So clearly we need to load them earlier in the chain or something, need a better way to cache them still.

Read More