Today was a giant step forward as far as groundwork goes, and as far as aesthetics go. I’ll detail all the changes;

Corpses – I wanted that right click Task button to work, so I needed bodies to bury. I drew up a few gory skeletons then made them into objects that are created at the villagers death. Then I went a bit crazy with particles.

I made some green particles for tree leaves, when a tree is cut (mixed with brown) and then made the residue that would stay on the ground for 5 seconds. Then made the same for rocks, the particles look heavier, fly faster. Leave a grey, white residue. Then made blood. Then I made green blood.

I got crazy and wrote a few snippits of code to decide who’s being attacked, and drop the appropriate blood. Skeletons don’t bleed so they drop stone chips (look like bone chips) spiders/goblins bleed green. The rest bleed red. I haven’t done blue yet, but I will for the slimes.

Went further, made some dirt particles. So now when you buried a corpse, you saw dirt fly. But I wasn’t satisfied, so I made a grave marker. And I still didn’t want to work on the inventory (an all day sort of brainstorm) so I made a ghost that will pop out and fly away when you click the grave!

Ate a Delisio pizza, played Farcry 4, got yelled at by my 4 year old because he really wants to kill Pagen Min and we’re not on that mission yet because he deleted the last file I had where it was all beat…anyway;

I made the global inventory, being the items that you have, but aren’t with any of your units. Then I made the villagers have local inventories. Then slowly but surely wrote in so far 34 different items, including 15 different foods, that can be made, crafted, found. I created an object that had a variable Id to match the global inventory id’s. So now when I chop a tree, an item drops and is automatically assigned that id. When the villager picks it up (which was a who other struggle) that id is transferred to his own inventory.

I wrote a quick algorithm to check villager inventories to be empty or have a free spot. In the version I had before, it was something like 50 lines of nested if’s, this new one is a clean 10 lines using a for loop returning the value of i!

I am very happy with the progress today, I took my time, but the way it was written makes it all very versatile. Just changing a 1 to a 2 changes dropping wood to dropping stone; now it’s just a matter of making the conditions right to drop what needs to drop. Tomorrow I’ll figure out a way to put your mouse over the items the villager has, and see what it is.

Anyway, I think I’ll slip off for tonight and come back tomorrow just as fired up. Thanks for reading!