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.
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.
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.
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.
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.
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.
Work Log 9/4/2025
Fixed a bug in the NPC magic casting that would have them failing to cast a spell due to async loading
Added in a check to make sure the NPC doesn't play a spell anim montage while already playing another.
Added in a Boolean called SpellLoading to the MagicComponent to help us with execution flow when NPC attempts to cast spells.
Fixed a bug in the NPC magic casting that would have them failing to cast a spell due to async loading
Added in a check to make sure the NPC doesn't play a spell anim montage while already playing another.
Added in a Boolean called SpellLoading to the MagicComponent to help us with execution flow when NPC attempts to cast spells.
Fixed a bug in T_GetHealingSpell task where it would never finish execution
Fixed a bug where noise events were always coming from the player inside of magic effect components even if it was a spell the NPC had cast. This was causing the NPC to evaluate noises even if they were the one making them.
Fixed a bug where NPCs were completely ignoring spell cooldowns. Spell cooldowns were only being calculated for the player on the magic effect component, but the player doesn't even use the magic component.
Changed the try to heal code so that if the NPC is in combat they will try to heal if their health is below a random float between .5 and .8, if they aren't in combat they will always try to heal to 100 percent.
Fixed a bug where NPC spell actors would never be destroyed.
Fixed a bug that would prevent NPCs from being able to cast projectile spells due to async loading
Added in a new check in the cooldown system that multiplies the cooldown time with a value based on the skill of the NPC with that school of magic, basically if an NPC is really good with destruction that can cast more fireballs faster.
Fixed a bug of projectile spells not detaching from the NPC hand sometimes.
NPC spells now have their accuracy effected by their skill in the selected magic school of the spell.
Work Log 9/3/2025
Removed a weird phantom reference to the combat status component from the Melee component.
Removed all the references to the equipment component from the melee component.
Created a new interface event for UpdateMovementSpeed previously this was handled inside the movement status component, it still technically is for now but its activated through the npc via the interface event now instead of a hard ref.
Removed a weird phantom reference to the combat status component from the Melee component.
Removed all the references to the equipment component from the melee component.
Created a new interface event for UpdateMovementSpeed previously this was handled inside the movement status component, it still technically is for now but its activated through the npc via the interface event now instead of a hard ref.
Removed all the references to the Movement Status component from the melee component
Removed all the refs to the UBPP library in the base object
Optimized the tri count of the SKM_Manny Tester hand that was referenced inside the base object
Further reduced the Base object down to 33.8mb
Fixed the bug of the health bar widget never updating.. kind of, its the same damn bug we've had for a but with things not being flagged as rendered by the engine.
Removed all of the old combat testers from the BP_AI_Parent.
Created a new Interface "BTGS_NPC_HUD_Interface" so we can update NPC hud values without direct casting.
Fixed a bug where a recovered arrow would never despawn.
Fixed a Null reference bug in the new blocking code
Changed the name of the AttemptHeal_OnInterface event to AttemptToHealViaItem_OnInterface for better clarity. Also fixed a bug in it that was causing a null ref on a destroy actor command because we were using a ref to the spawned potion, but if the npc didn't have any potions that value would always be invalid, we now check first to see if the array of potions is valid.
Renamed the AI Task T_AttemptHeal to T_AttemptHealViaItem for better clarity.
Moved the CalculateLuckChance function from the BP_AI_Parent to theStats component
Replaced all references of the old CalculateLuckChance function inside the NPCs to the new stats CalculateLuckChance
Added a new calculation to the decorator in the AI tree called D_Should_Attempt_To_Heal, we now have a random check based on the npc intelligence and luck instead of just a random bool.
Added a new check to the task T_AttemptToHealViaItem. We now check the NPCs luck and Alchemy skill level to determine if they can attempt to heal via a potion.
Added a new check to the task T_GetHealingSpell. We now check the NPCs luck and Restoration skill level to determine if they can attempt to heal via a spell.
Fixed several bugs in the Task T_GetHealingSpell where the task would never end.
Fixed a bug in the function library where spells weren't properly found in the data table.
We have two events called SendMagicSpell one in the magic component and one inside the bp_ability parent so i renamed the one inside the magic component to SendMagicSpellInMagicComp
Started Tracking down why the npcs sometimes cant heal, gonna have to tackle this tomorrow.
Work Log 9/2/2025
Demoed how to do a block out for Megan for her class.
Started work on cleaning up new player blocking code, haven't touched it since I got it working
Found a bug where the players overlap check timer was never being turned off could have killed performance later
Demoed how to do a level block out for Megan for her class.
Started work on cleaning up new player blocking code, haven't touched it since I got it working
Found a bug where the players overlap check timer was never being turned off could have killed performance later
Created an Enum for block proxies so we can use it inside the new function i created inside the BTGS_interface for toggling the collision for the block proxies on the BP_AI_Parent.
Reduced the size of the base object from 162mb to 51mb by removing old hard references due to the NPC blocking code rewrite.
Removed the base objects dependency on the combat status component
Created a new interface event to pass the status of if an NPC has drawn their weapon. We were previously calling for the Combat status component whenever we needed this, but that was messy at best and buggy at worst. This new event should allow cleaner checking and help solve some of our combat bugs notably the one where npcs can attack even if they have no weapon in their hand.
Removed the old exposed transforms that were added to the NPCs during the new block system development
Removed the dependency of the narrative base npc to the lyra anim bp.
Further reduced size of base object to 37 mb by removing hard refs inside of the melee component which itself saw a reduction from over 30 mb down to 6mb
Replaced all of the checks for weapon drawn inside of the melee component with the new interface event GetWeaponDrawnStatus.
Removed all of the references to the combat status component inside of the melee component.
Work Log 9/1/2025
Jackie found a bug in the arrow outline system. If you drop an arrow the outline stays there, so i fixed that.
Upon further inspection it looks like the same issue exists if you a drop bow the arrow outline stays, fixed that too.
Spent 3 fucking hours on figuring out why if you recovered an arrow from the world it couldn't be reused it would just sit there in the air after being fired.
Jackie found a bug in the arrow outline system. If you drop an arrow the outline stays there, so i fixed that.
Upon further inspection it looks like the same issue exists if you a drop bow the arrow outline stays, fixed that too.
Spent 3 fucking hours on figuring out why if you recovered an arrow from the world it couldn't be reused it would just sit there in the air after being fired. Turns out that you have to manually deactivate the projectile component after an impact, just reactivating doesn't work which seems like an engine bug to me.
Moved the arrow variable resets to a separate function inside the arrow component instead of a bunch of sets inside the base object
Fixed the metal sound that was playing when an arrow hit stuff instead of a wooden one.
Work Log 8/29/2025
I’m back from a well needed vacation. Still Feeling pretty exhausted though frankly.
Added time dilation back to fired arrows, this worked at some point, but was never programmed properly.
Set the arrow time dilation chance to be relative to the players block skill
Moved the sound spawning and destroying for the time dilation effect to the player character in a unified function instead of it being scattered throughout different components
Fixed the arrow ricochet bounce angle it was far too low previously
Added a max number of bounces that an arrow is allowed to have currently set at 4
Added a check to check if a fired arrow is hitting another weapon that is NOT a shield if it is we should try to ricochet it if its a shield we should follow normal angle calculations for arrow ricochet or sticking.
Added the ability for players to have a chance to recover fired arrows from the world
Added an outline to where arrows go so the player can better understand where to put notch arrows on the bow. This should solve all the problems early testers have had in trying the archery system.
Work Log 8/23/2025
Fixed a bug in the drop sound event and metasound that as causing the sound to only ever spawn at the initial spawn location.
Fixed a bug where the fail hit sound would never reset
Fixed a bug where the npc would try to play the blocking animations even if their weapon wasn't drawn
Fixed a bug where the SpawnAndPlayFailedHitSound wouldn't trigger a noise event
Added a noise event to when the player hits an enemy that isn't yet aware of them, Theoretically we would just give the impact point for the noise location but that didnt seem to work so we are gonna give some radius around where the player is for the npc to look what hit them, in testing worked pretty consistently and felt natural enough.
Fixed bow and arrow damage calculation, was previously only using bow value for damage oddly enough you would figure it would only be using the arrow damage if anything, but nope Nathan programmed that wrong, all good though simple mistake.
Removed the line trace we were doing to determine arrow damage in the arrow component seemed pointless seeing as we are now using actual hit events for everything.
Fixed the Bug of the arrow trails staying around forever if you hit a close enemy
Fixed the bug of the arrows spinning forever if you hit a close enemy
Massively cleaned up Arrow Code
Fixed the math and code for sticking arrows into objects physically, previously the arrows just kinda sat near the surface where they hit now they stick into the object they hit properly and even have a bit of randomization for how far they will stick in, might want to later make that randomness based on arrow velocity somehow, but works well enough for now, looks great!
Arrows are properly activating their hit particle effect when hitting not character targets
Work Log 8/22/2025
Set up the other 3 displays today which took 3 fucking hours for some reason, the displays were being super fucky and the new monitor mount doesn't provide enough swivel really annoying.
Found a pretty large bug in how durability and item health were being calculated, so i completely rewrote that functionality.
Moved all of the armor durability calculations into functions and loops instead of the giant functions we were using.
Work Log 8/21/2025
Added noise events to spell hits just like the noise events for dropping or hitting weapons together.
Removed the on event overlap code from the base object as we no longer use it for combat hit checks.
Spent 5 fucking hours tracing down a Niagara crash issue for the blood effects, but at least we now have 18 different blood effects when you hit someone. I really kind of hate niagara as well, sure its powerful, but we have SO MANY crashes with it. That being said its clearly my weakest area of Unreal Engine expertise, I should spend some time making some complex stuff with it.
Work Log 8/20/2025
Built the new monitor stand today to support the new 4k 144hz HDR monitors, i have 2 of them right now 3 more should be here tomorrow.
Renamed a few of the events in the melee component for clarity. The melee component ever only exists on NPCs so the events there center around the NPCs doing something like NPC attack blocked, NPC Start Blocking etc
Fixed a bug where shield bashing would only ever play the anim once
Added some code to differentiate which sound and particle effect to spawn when npc blocks based on whether or not they are holding a shield.
Fixed some incorrect references in the base object combat code.
Collapsed the code for spawning an item drop sound into a function
Added an array of sounds for metal clangs to make the MS_ParrySound Metasound more random we were previously only playing a single sound effect inside the meta sound when a parry happened, i plan to also use this sound for general weapon hits like for if you are holding two weapons and hitting them together, previously we were using the hit sounds for this, but that doesn't really make sense seeing as those are a bit meatier.
Scratch that. Cant use the parry sound for the player just hitting two held weapons together sounds fucking weird, besides the parry sound should stay specialized as it is. So i created another metasound thats the same base sound as the parry sounds but with reverb and non of the extra effects that make up the parry sound effect.
Found a bug in Gabriel's metasound design. He was sometimes using (Trigger Accumulate) to kill the metasound in locations where the full accumulation never would have happened, the node he should have been using was (Trigger Any)
Added a shield hit sound array to my new PlayerHitWeaponsTogether Metasound
Removed some code in the Melee component function EnemyBlockHit that would sometimes lead to a dead end causing the NPC to neither block or parry.
Fixed an audio bug related to dropping weapons. they would previously play a sound for if they hit something like the floor, but if they hit another weapon that had previously been picked up and dropped it wouldn't make the sound for hitting another weapon.
Added a Do Once gate to the item drop sound also pushed it into a sperate event thats resettable so we can better control how that sound effect plays and stop sound spam
These new weapons sounds now report noise events so if players are sneaking around, but then decide to start banging their weapons together it will alert NPCs.
Dropped weapons and other items also produce noise events meaning you can actually throw something to distract an npc now if they haven't detected you, pretty cool.
Work Log 8/19/2025
With the help of Jackie I fixed the hit reaction animations being too long
Generated some new temp lines for combat barks
Made another dialogue for combat taunts used for things like when the npc blocks your attack
Cleaned up combat code in melee component event graph for parrying blocking and attacking
Added a Boolean blend inside the anim graph for whether or not we should be playing blocking anims with a shield or not
Work Log 8/18/2025
Had to fix a bunch of issue related to the codex not properly uploading to GitHub. I kinda fucking hate GitHub in my opinion its only useful for toy projects that don't have tons of data. I am aware that most of the world uses it for software development… I think that is a mistake.
Got Megan's computer set up to be able to package to android, always a fucking nightmare to get android setup to package to a headset even though i've done it dozens of times at this point.
Put in some error handling code for dealing with NPCs trying to initialize dialogue when the didn't have an NPC data ref
Removed refs to the Hair and beard meshes on the BP_AI_Parent because they are removed well before the could be used. These were causing log messages about invalid refs.
Added refs to weapons to the events for parrying and blocking that way we can choose what type of sound to play when we impact for a block or parry instead of it being hard coded
Added a recoil state to the animation graph for NPCs so they can properly respond to having their attack blocked.
Added an interface event called PassWeaponOwner_OnInterface to allow us to get a direct reference to who ever is using a weapon
Parrying and Blocking are now programmatically different blocking plays one set of sound and animations and parrying plays another
Shield bashing now has a chance to knock down an NPC, one of my favorite feature adds, just feels awesome in VR.
Updated the stunning functionality to make sure the npc stops strafing around the player when stunned
Added hit reactions to the anim graph they aren't perfect yet need Jackie to modify the length of the animations they are far too long and reset the npc to a neutral pose for like half a second before they go back to fighting looks super weird
Added a check to make sure npcs cant attack when they are stunned
Added a check to make sure we can still knock down npcs, if we shield bash an npc and it knocks them down we ignore hit reaction animations.
Work Log 8/15/2025
Interviewed a prospective hire today for a new narrative writer, took most of the day but went well.
Work Log 8/14/2025
Worked on combat code, blocking is much more reliable now, we have a block proxy set up for the top and bottom of the npc, if the player is faster than the block animation then they still get blocked if the npc has chosen to block.
Ai strafing around the player during combat works again!
Implemented a new selection thing for the npcs determining if the player is using a ranged weapon or melee weapon, similar to how they know if another npc is using ranged or melee.
Distance checking for blocking is now enabled, meaning the npc shouldn't fantom block when the player isn't even nearby
Fixed doors not closing
Fixed players taking forever to die at the end of the matches
Updated the weapon broken event to auto add the broken item to the inventory so the player wont be confused and continue to try to use it
Put in a temporary workaround for the two handed weapon blocking not really working with the new block system, if the system sees that the npc is using a two handed weapon it plays the two hand block instead of the normal block animations.
Tutorial is playable all the way through again
Temporarily fixed the weird issue with arrows freaking the fuck out when you pick them up turns out that only happens when they spawn from a quiver, its something wrong with their collision that i haven't quite solved yet, changing the response to the player channel seems to make no difference even though thats how non spawned arrows handle it. for now we just check to see if the owner and the hit thing is the player character if it is we ignore hits, bad for perf sure but works for now.
Work Log 8/13/2025
Worked on administrative stuff like the new list, codex stuff.
Worked on the blocking system we have a tentative solution to the issue of weapons not hitting if moving too fast.
Work Log 8/9/2025
More work on the crowd rendering system, ran into some issues with how PSO caching was handling the crowd actors, forcing them to always use the lowest lod even though im custom calculating the lods.
Crowd rendering system is working pretty well still needs to be instanced, but the actual rendering is doing fine the textures are a bit aliased at a distance, but id rather that than blocky blurry messes.