Today brought a bunch of new features and progress along with some pains in the butt. I’ll do a list and just explain all the things that went on.

Right click an item in the unit’s inventory to drop it on the ground – this was super simple surprisingly, I found the code that displayed the description then just wrote in a small blip to handle being right clicked. When it is right click it drops a new item on the ground that is actually a big new feature!

Dropped Items – This item appears as a little green/yellow ball of garbage. If you hover the mouse over it, it will show you what it is. This new item won’t be grabbed by any units so it can effectively disappear. The trick here is when the timer on this item ticks down 15 seconds, it creates a new object that has been predetermined in the global inventory array – so a cherry dropped becomes a cherry tree sprout. This is pretty big because now you can have your villager grab some cherries from the inventory and “plant” them for easy access food. But depending on what you drop it could have consequences! I made spider legs become a spider eggsac – which will hatch 8-20 spider babies, terrifying! And there may be lots more surprises in store.

A toggle button on villagers to auto deposit a full inventory – When testing these new features it got extremely obnoxious that the villager would run to the townhall and empty it’s inventory. So now you can click a little item icon on the villagers display picture and if it’s opaque the villager will not deposit items automatically.

Trinkets – So far there are only 3, HP+ Ring, HP++ Ring, HP+++ Ring — It’s a naming style I think I’ll use throughout. The + indicates 10% bonus – the effect is also in the description. I did have some trouble getting this to work efficiently. I tried using a script with an argument, using the item ID number – then I have a condition in the script to handle all trinket ID’s. Somewhere along the line a variable wouldn’t work for me so I just placed trinket handling, cutting the middle man, back into the stat handling script. Then – I had to duke it out with math, the HP was adding 10% every frame – 60 times per second. I didn’t want to make a bunch of new variables but it came down to making place holders that would remember the original value of the stats(HP,INT,STR,etc). So the beginning of the stats handling it initializes the Stats to the memory variable – then it runs the trinket handling which will alter the HP stat(but not the memory) and it will display the new value – then repeat. It all works flawlessly now! And it’s set up effectively enough that I can alter any stat using the same method.

I’m pretty happy with all the stuff that got done – on top of some gym time and a trip in the big blinkey red truck too. I also beat all the Hurk missions last night in Far Cry 4, I’m not sure if I mentioned that this morning. I was up until 1am last night.

Anyway, I think I’m going to draw up a hilarious new monster for the game, then maybe do some more Far Cry; if I get it done tonight I’ll put it on twitter. Thanks for reading!