Wednesday 14 March 2012

Post Battle Reports, Promotions, Recruitment, Losses

 Post battle reports! Randomized Camera placement during enemy hidden movement to increase the tension and stop the player from getting bored! Promotions! Recruitment! Doom! Exclamaition marks!

All good things come to an end ... also ... bad things. And which it is is all rather dependant on your performance during the battle. Introducing ... Post Battle Performance Screen! With an individual breakdown of each troops performance, kills and status, featuring the ability to recruit new conscripts who did well - and survived - into your core veteran troops, as well as dismiss (I actually use the term "retire", it's kinda nicer, like you're sending the old fellow back to enjoy his twilight years rather than just sacking him out of hand) veterans which you think aren't up to it, or that you have just ended up with too many of one class and need to make room for different class members.


Initially I'd thought of allowing the player as many veterans as they liked ... or at least could get to survive, but eventually decided on restricting it to just 16 - and 6 classes into 16 does not make 3 each. So the player is forced to evaluate his replacements for each battle carefully. I have been thinking that this might be a little on the stingy side ... but there needs to be a limit somewhere or else the value of a veteran will start to wane - and I want them to mean something to the player, for the player to be struck with panic when he sees his favourite Marksman Captain fall under a hail of bullets, feel a sudden wave of relief when they see the "critically wounded" sign appear over the still twitching body ... and then panic again whilst trying to find someone with a firstaid kit who can get over there and have the casualty saved by medivac.

Individual results

Conscripts who survive and gain at least one kill are then converted into the rank of Lance-Corporal and whatever class their initial attributes decide that they are best suited to. Surviving veterans also increase their experience. Killing enemies increase experience, and killing an enemy who is better than the trooper who felled them doubles the experience.
So here is the simple formula:
Survive = 1 xp
Kill enemy equal or weaker = 2 xp
Kill enemy stronger = 4 xp
Promotion on 5 xp + rank level.
So a corporal (rank 2) needs 7 xp for promotion, whilst a Captain (rank 6) requires 11 xp to become a Major. If the Captain bags a couple of Colonels and a Brigadier, he's promoted. Score 4 Sergeant-Majors and he's still 2 xp short after surviving a mission.

Promotions and recruitments

I've designed a formula on overall battle performance, depandant on troop numbers, experience, weapon advancements and funding, which give 24 different types of final result depending on victory or defeat. This would seem to be the ideal thing to turn into achievements eventually too, but for now it's just to give the player feedback how they did. Every weapon that is lying around or in the victorious side's possession has it's financial value added up and is then awarded to the victor's team. If you've fought and defeated a well equipped side with basic weaponry you can turn a tidy profit, or at least offset the cost of deploying veterans. Veterans cost 10 cash (which will probably be sovereigns in the final thing) per rank level, consript milita are free to deploy.

Bum whupped ... but I was outnumbered 2-1

All your promotions, losses, retirements and recruits are duly noted and saved out to your veteran file, so when I have the whole thing intergrated with the campaign, there's already a fully functioning system for saving and progressing your troops.

In other news, I've created a new feedback system of randomly locating the camera during the enemy's turn so that it will show a random location every time the enemy switches to initiate a new trooper. This is another little thing of feedback to tell the player that stuff is happening and the game hasn't locked up and make passivity a little less dull.

And that didn't go so well :(

And here's a video showing a whole load of stuff about that. And if you're wondering about the names, I was playing as the Zulu Nation (names done as givenName surName regardless of faction culture).

I've also gone and redone a whole load of behind the scenes stuff like alter the whole way targeting is done and integrate it into other systems like action point deduction during movement. Originally I'd had multiple schedules running and various overlapping - all of which had to be cancelled at gazillions of possible places depending on various factors and various emergency calls having to be made if it all ended on odd cycles. Things are now much more streamlined - though obviously I created a shedload of new bugs which I have since fixed.

Still to do, still to do ... plenty! I've got to fix the bugs (read - rewrite) in the Ai's ability to find dropped ammo and weapons when they need them, sort out enemy boobytraps, get the Ai to decide on the best solution when attacking an armoured target, redo the playHUD, try a new pathfinding and cover node concept, transfer hidden movement cam to this (at least this one should be easy), create my own preload of data or integrate middleware (I've bought middleware called AFX2 by Jeff Faust that can do this amongst other things but have been implementing my own concepts of various things in it without referencing it as this helps me think and learn ---- though Jeff's methods are all far superior to my hacky make it up as I go allow route), create armoured cavalry, fix the flammenwerfer which has too many drawbacks for something very expensive, make sure the save/load system works fully, herp the derp, etc, etc ... but to be honest we're not that far from needing to create an actual map with proper assets and to end our testing (our = Royal "we" ... it is just me and the imaginery girlfriend) on these quickly made test arenas. It's just that I'm mindful of trying to avoid the constant chop and change between making assets and functionality.