A little difficult to have a game that heavily features looting - without having an inventory to buy, sell, upgrade and equip that loot! So the last month has been mostly spent making an interactive inventory system.
The system is fairly simple, sell loot at campfires for XP, then upgrade your stats so that you can equip and wear better combinations of the weapons and armour that you have looted!
The game features a rather classic RPG attributes system of STR, DEX, CON, etc as well as two career paths, of High Knight Noble and Low Knight Errant, which increase the player's wearable AP stat. The High Path costs more XP whilst increasing Rage Bar buffs - when critical strikes in battle negate enemy defence and massively increase damage - whilst the Low Path allows for quicker AP increases for far less Rage buffing. No more running about in your underpants once you unlock an armour type.
STR and DEX stats allow ever increasing weapon equipment, whilst CON is HP and STA allows for more sprinting, dodging, jumping, and heavy attacks. There is also ATH(letics) for faster running and further jumping and dodging. All very classic RPG style statistics and behaviours that any gamer (video or tabletop) would recognize - to the extent that I've only used the 3 letter abbreviations for the names (except ATHlectics which could equally be called AGIlity).
Whilst I might keep saying "simple" in this blogpost, actually getting the inventory working was a huge mix of trial and error (especially with gamepad only usage) and took the whole month of development.
And here it is in video action!
With the player now able to loot and gain XP from it, and spend that XP to enhance and equip their character, the next big development milestone is to allow interaction with the NPC warbands. Whilst the various factions happily play the game all by themselves that is not particularly interesting for the squidgy humanoid sat behind the screen - so next up is making friends and enemies of the roaming NPC raiders! And after that, it's sorting out a page on the Steam Store for early access release! (which looks like it will be after the summer sale with the vetting time).
Smoke Signals, telling Yogi Bear the picnic table is occupied
So after much huffing and rather a lot puffing, and even more debugging ... warbands are running about doing warband things, in both day and night!
Warbands now move around from loot point to loot point, doing the lootening, as loot points suggest may happen, and light the bonfires on said loot points to signal to all nearby that the lootening is occurrening - and that this would also be a great time to raid that said specific loot point and try and slaughter all within to loot their loot.
Did I mention loot?
Well the player can now loot corpses, which was a main aim of the gameplay, and not only can he swipe the swag that the fallen is clad in, stripping them down to their underpants, he also buries said unfortunate recently deceased, leaving a small gravemarker to mark their passing. Failure to loot and bury said dearly departed, results in their equipment being lost to eternity, and their corpses rotting away to leave a skull, marking their departure from this earthly plane.
The Freshly Slain
The Not So Fresh After Remaining Unburied
I had a play around with the ScatterSky and TimeOfDay objects, and after some faffing in the code, decided the easiest way - at least in network overhead - to get really red dusks and dawns, was to use the built in TimeOfDay callback with a little custom C++ to change to change the rayleigh scattering and ambient colour. This callback also allows for the campfires to light up on sunset and extinguish at dawn, giving more markers as to places the warbands are likely to head. View distance for the warbands changes according to the time of day, and leads to some rather nasty surprise battles during the hours of darkness, when bands or burley warriors bump into each other in the pitch black.
Archery now works rather nicely, though required considerable faffing due to the blending of animations for aiming, which threw off the IK animations which I had created for use with two-handed pole weapons (hello Dane Axe). After many huntings through C++ to try and find out WTF was going on (I still think it's all down to the laterally animation movement which the engine isn't expecting) it turned out easier to define a specific look/head arm animation for pole weapons and then manually alter the animation to get it to align to the IK by around -4 degrees on the XZ axis. Not the cleanest way of getting a working result but game development, and inface coding in general seems to be very much to be a matter of workarounds and use more duct tape. And duct tape fixes everything! (as long as you use enough)
Here's a test of leading aim with longbows at just short of 300m, which works a lot better on a flat surface than undulating terrain for obvious reasons of consistent direction and velocity.
Currently all bows look like crossbows, due to this being the only model and animations I have currently made, whilst I decide on how best to animate traditional bows, with their hold in left and draw with right animations. As my current warband timeline only goes up the 11th Century at the moment, the English warbow/longbow has yet to appear, but researching some historical composite bows for the Magyars, it was interesting to note that they used very light arrows on very strong composite bows to out-range their enemies at the expense of projectiles which were weaker in the strike, and would break when they hit the ground (which of course stops the guy you just missed from picking it up and shooting it back). To this result, the Magyar have by far the longest range (to be honest 400m is kinda pushing it but hey vidya gaemz), but with stopping power only marginly better than a 100m short bow.
Remember kids, when you see the horse archers run away, do not follow.
So, here's some edited highlights of archery, melee, point blank night battles, corpses rotting to skulls, and general AI powered gameplay in action.
So all that leaves us with our not so heroic player, still running about in his underpants armed only with a Bollock Dagger.
Nice lack of kit you have there oh level 1 noob
But, as shown in the first video far above, the player can actually loot corpses of their equipment, armour and weapons. So the next major job is to come up with a Game User Interface (GUI) so that the player can actually decide what stolen swag they want to equip, to boost their avatar's chances of survival in a good old fashioned scrap. Alongside that, I need to create interfaces for the leveling system and career progression, all of which is already coded, but currently inaccessible due to lack of tailor made input screens.
Behold, The Wonder Of Clothing! Coming Soon™
Speaking of input screens, I modified the visual performance settings, so things liek groundCover (that's grass to most people) not only increases and decreases in number, but also expands and ... er ... despans(?) in range from the camera. I found that there was already a variable for this, originally created in mind to reduce the range, but with a little tweaking of code I could get the radius to which grass is drawn on screen to increase/decrease in line with element numbers.
In other news some dastardly swine stole an hour of my sleep in return for British Summer Time, so I sat out in the sun with a bottle of wine, and it was freezing cold and cloudy and I probably now have hyper/hypo-thermia ... which ever one involves a brass monkey dropping it's balls all over the place.
I used to be an adventurer like you, but then - whizzzzzz ack! Since this video there is a cool motion trail effect courtesy of a ribbon particle behind each arrow as it cuts through the air.
So archery has been somewhat missing as I have been concentrating on devising an animation led melee combat system. This now work rather nicely (except when it inexplicable doesn't play the prepAttack animation and I have to throw in a safety call to get it back on track) so it was time to get on to ranged weaponry.
Cue Clannad and the greatest decade in history, the 1980s.
Now, because I've upended the whole stock animation system, it turns out that mouse aiming system no longer works, because who wants mouse aiming to override a melee based animation system? Well no one, so that will take a bit of looking into to fix. However the actual aiming and shooting works, even if the AI and client Player doesn't currently animate correctly to look like it, due to the removal of most of the blend animation code.
I have a variety of ranged weapons coded, both differing sizes of bows and crossbows, with bows requiring greater stats in both STRength and DEXterity for use which make them much more expensive in XP spend to use, but having hugely quicker reloading than crossbows.
Projectile damage is based on a singular strike to the target's hitboxes, so whilst a heavy melee attack can cause damage to multiple hitboxes with a wide slashing motion, arrows cause damage based on range to target to simulate increased velocity from loosing up close and the archer's ability to pinpoint weak areas in the target's defences. Getting struck at maximum range whilst wearing a full harness is most likely to plink off, but getting shot up close with 300lb of draw weight is another matter.
The main level has had a bit of a revamp, with more trees and shrubs in the open side of the map, but there is still plenty of nice open space for longbows to wreak havoc.
I also converted my AiPlayer routines to use the new stock engine AiController system, which can be attached to any playable class including those usually restricted to clients, to turn them into Ai controlled - hence the new classname. This class has a lot of dynamic avoidance and automatic repathing systems, but even without those I found it to be very heavy on processing. Whilst still useful for being able to control the usual client based objects, it's clearly something to be used sparingly, and to keep the standard Ai based classes to themselves.
Archery is pretty much the final part of the Ai warbands and battle system, and with it now functioning materially (if not animating aiming perfectly) I need to integrate it's use into the AiPlayer combat routines. The most obvious example is for a warband that outranges an opponent is for them to stop, hold fast, and pepper the enemy at distance whilst they themselves seek to move to attack.
Whilst this is all in the works, here's a video of meeting engagement between the Norse and the Magyars, the latter of whom will be one of the more heavy ranged weaponry factions in the future.
Aside from fitting archery into the individual AiPlayers' combat routine, I need to come up with a method of allowing the player to use archery effectively, regardless of their third person rotatable camera system. The obvious cop-out here would be to follow Elden Ring's lead and switch to first person for aiming. Maybe I can come up with something else which retains the third person view ... ?
Speaking of the player, to be honest they haven't really got a lot to do at the moment, as all my efforts have centered around making the AiPlayer's work as cohesive raiding parties, so next up after I tackle the blended aiming animations, is to give the actual client player something to play.
It's February, and it's ending early, somebody stole 2 extra days that I could have been coding!