Clanfolk is a colony sim set in the Scottish Highlands. Harness your environment to survive - fish, gather, hunt, and farm as you prepare for the winter. Build an inn, trade with other clans, have children and marry them off - live life and prosper across the generations.
Hi Everyone,
Update 13's major addition is the Story Generator framework, which I will describe below. In Addition, there have been many quality of life improvements, a major optimization pass for late game (up to 40% improvement), and an engine upgrade from Unity 2019->Unity 2021.
Update 13 covers versions 0.420->0.456 from the Testing Branch.
(Note: anyone can join the testing branch under Clanfolk/Properties/Betas, and it is updated multiple times a week)
Let's dive right in.
[img]{STEAM_CLAN_IMAGE}/41036152/786f820773fe287189556721ce87709403d692de.jpg[/img]
[h2]The Story Generator has Arrived![/h2]
The Story Generator's main purpose is to add more variety to each play through. The Story Generator triggers Story Elements based on external events as well as player choices. These Story Elements form chains that evolve over time.
Currently there is one example Story Chain called the "Outcast Mother." She will not arrive until after the first winter (Day 30.) When she arrives, you will be given some choices (avoiding spoilers,) depending on these choices, new Story Elements will unlock over time. This initial story chain will take place over around 12 days after the Outcast Mother's arrival. It is an example case that will be greatly added to in the future.
For Update 14, I will be heavily investing my time into expanding on the Story Element content. Right now I have a very robust system to manage and serve up the elements, and the next step will be lots of content for it.
Interestingly, anything can be a Story Element, not just external events. So Births, Deaths, Marriages, Sickness, Bad Weather, literally anything can interact with the Story Generator and be tracked. This leads to a very cool side effect. I should be able to build a Menu similar to the Ideas Panel which can track the Clan's History using these events and even has search toggles like the Ideal Panel has along the top!
Since Story Elements act as preconditions for the triggering of future Story Elements, this allows the actions the player takes in the game to have a direct impact on how the story unfolds while still allowing the story to flow with some level of logic.
There was also an incredibly powerful Eureka moment this update when I was working on one of the Outcast Mother's Story Elements. It turned out that I needed her to run some very specific logic for that element that was not part of her normal Clanfolk Brain. Note: The Clanfolk's brains currently prioritize 87 tasks to figure out what to do next. I foresaw a problem because if there were hundreds of story elements each with unique AI needs, I could not just keep adding generic tasks to the brain. It would just become unworkable due to all the special case logic.
SO! I offloaded the usual Brain Logic for the Clanfolk (and any Unit really) to the Story Element as well by giving Story Elements the power to override one of the tasks in the Unit Brains. So that was cool and allowed for unlimited and clean AI additions, BUT it allowed for something very new as well. Group Logic!
To explain, currently the AI uses the 87 tasks to figure out (What should "I" do) but since a Story Element has multiple actors and the story element can control multiple brains now, it allows for (What should "WE" do) This is an important distinction as it allows units to have roles in complex tasks. This was so exciting that I jumped out of my chair.
So at the most complex level, something like a wedding or funeral Story event could now assign roles to multiple actors and have them each fulfill their own tasks within the Story Element.
I will be experimenting with this in Update 14. I would like to try to have ambient events like snowball fights, or a child playing chase with a dog, or hide and seek, so 2 person elements at first to get the standards down for writing these new events. I think that they will add a ton of atmosphere to Clanfolk!
[img]{STEAM_CLAN_IMAGE}/41036152/13ad8c475b05f65a26126b7a41c446ae8bddf0c9.jpg[/img]
[h2]Messenger System[/h2]
Currently the Story Generator is using the new Messenger System to deliver the Story Elements. Messengers come from off the map just like Job Seekers, Traders, and Travelers.
It is possible to build a Messenger Post to provide an anchor for them to travel toward, but if no Messenger Post exists, they will find someone else in the Clan to speak to directly. So Messengers cannot just be ignored like Travelers by turning off the sign.
This is important because in the future, Messengers will bring requirements from the King, or collect taxes, or may have other demands, and these cannot just be ignored by closing a sign.
The Outcast Mother mentioned above is the first Example of a Messenger. When a messenger arrives, there will be a new Alert on the right side panel as well as an Icon in the Unit's bar at the bottom of the screen with a Mail icon on top of it. Clicking on the Messenger will present a choice that will lead to an outcome at some point in the future.
Note: Story Elements will not repeat for a minimum of 40 days, so once the Outcast Mother comes, another one will not come for at least a year.
Also: The Outcast Mother will not come until the first Spring (Day 31)
[img]{STEAM_CLAN_IMAGE}/41036152/9427e694a5f60d44b31e540f3562f7b401dde7f4.jpg[/img]
[h2]Emergency Boost[/h2]
Priority Boost has become Emergency Boost. There has been a long time problem with the overuse of the Boosting mechanic. So in those 87 Tasks listed in the Clanfolk Brains, very near the top, and well above any work tasks, is "Handle Priority Boosts."
So this means that if a Boost is active, it is more important than ANY other task in the world. This is why it is now called Emergency Boost to better describe its function. The problem arises when many boosts are placed at once (sometimes hundreds.)
With too much boosting, all the prioritized logic in the brains is meaningless, and all the other tasks to keep the Homestead running are ignored. Some people then try to solve this with even more boosts and the entire system collapses in on itself. Because once everything is priority, nothing is.
So a good example of an Emergency Boost would be to get food out of the rain. A bad example of an Emergency Boost is to Cut Down a Forest. With the Forest example, each and every person will go grab an axe and cut wood. No one will cook, no one will feed the baby, nothing else will happen.
So to help with this, the Task Button now warns you if you are over boosting as well.
So Emergency Boosts are good for short term fixes, but for anything long term it is much better to reprioritize the skills of your Clanfolk to have someone prioritize that job instead. Then just use regular old skill priority to get them to pick that job first.
Note: The warnings on the Task Button do not artificially lower productivity, but are there to let you know that by "over boosting," the overall productivity will be much worse due to non optimal people doing tasks.
[img]{STEAM_CLAN_IMAGE}/41036152/32e1e130f60381b4d571de14f4eb71cd3d82edf6.jpg[/img]
[h2]Smart Drag[/h2]
[list]
[*] Used for Harvest/Grass Cutting Jobs.
[*] When dragging harvest jobs, if players start the drag on a tile with a type of grass, ONLY that type of grass will be selected.
[*] This system makes cases like selecting all the reeds around a lake without selecting surrounding grass easier, or to select all the wild oats scattered among other grasses.
[*] To select everything as before, start the drag on a tile without grass, then everything is valid.
Added a Toggle to the Jobs menu for this system for cases where people preferred the old system.
[/list]
[img]{STEAM_CLAN_IMAGE}/41036152/a8f15d75ce0341d6352905735933e924ef5a497e.jpg[/img]
[h2]Smart Select[/h2]
[list]
[*] To use Smart Select, click on an item, object, or unit that you want to multi select.
Once the entity is selected, hold the left mouse button to drag a box over other similar objects.
[*] Release the left mouse button, and all similar objects in the box will now be multi selected.
[*] This augments the Left Shift + Click to select all entities of the selected type in the world, and also Ctrl + Left Click to add/remove entities from the selection.
[*] A good use case for this new system is to select a small section of walls to make higher priority. In the past, the player would need to either Ctrl + Click all the pieces they wanted to change, or move the wall to be the only thing on screen and then double click to "select all" on screen. Now it is a lot easier. [*] Just select one wall piece and then drag anywhere else to select more of the same.
[*] Note: The smart select is aware or different wall and floor types and will not mix them. It is also aware of different grass cutting job types, like Smart Drag
[*] So in simple terms selecting an entity now sets the template for the drag selection. If you drag the mouse more than one tile when an entity is already selected, it will try to drag select.
[/list]
[img]{STEAM_CLAN_IMAGE}/41036152/e441c4cd845f24b7696bfe496f7ed530c9456017.jpg[/img]
[h2]New Idea Presentation[/h2]
[list]
[*] The Idea unlocks can now be shown up to 8 at a time and should be less overwhelming to new players.
[*] Left Clicking the unlocked Idea images will navigate to that idea's location in the menus
[*] Right Clicking the unlocked Idea images will dismiss the Idea images
[*] Left Clicking the parent Idea Announcement where the "cards" come out of will go to the Ideas Menu
[*] Right Clicking it will dismiss the idea images as well.
[/list]
[img]{STEAM_CLAN_IMAGE}/41036152/fa6696b8227a17a587ea943928aedbb997eaec5f.jpg[/img]
[h2]New Customizable Automated Task Priorities[/h2]
[list]
[*] Add Water, Auto Replant, Add Fertilizer, and Auto Harvest can now all have their default priorities set by clicking on their button.
[*] When the priorities of the auto tasks are changed, all auto tasks of that type in the world will also have their priorities updated.
[*] One exception to this is Auto Planting since it is not an Auto Task that deletes itself, whatever priority it is set to on spawn will remain.
[/list]
[h2]Late Game Optimizations[/h2]
Over many years, some Homesteads just get absolutely huge. I built Clanfolk with a family of 20 in mind, but over time have pushed it out to 40 (which is approaching a village,) but in some cases I have seen Clans of over 100. In these cases, things can slow down considerably, so I want to tackle that case even though I still would not push past 40 really.
In very late game homesteads, there are also lots of items and lots of stockpiles. This could end up being very expensive when calculating hauling tasks, and I ended up creating new systems to cache data to alleviate most of this.
The end result is that in very late game I got some pretty major improvements in frame rate, sometimes up to 40% but also the framerate was a lot smoother. Those cases where "all the stockpiles" X all "the items" would have to happen in a frame were minimized so the spikes mostly went away.
Overall things should just feel a lot smoother for players.
[h2]Adaptive Brightness Option[/h2]
For a long while, some people have struggled with seeing indoors at night. I created a new Adaptive Brightness System that modifies the brightness indoors in such a way as to not wash it out during the day, but to keep things visible at night. (Settings/Video)
[list]
[*] The new brightness setting makes only minor changes during daylight, but as it gets darker, rooms can become much brighter or darker than the current default.
[*] In combination with the Brighter Nights Setting, the Adaptive Room Brightness should make it pretty easy to see on darker monitors now
[*] Note: By default, this new system is off (1x multiplier) and everything will look as it always has.
[/list]
[h2]Better Grazing/Multi Troughs[/h2]
[list]
[*] Livestock will now try to fully fill up when grazing instead of just getting past 50%, this will mean that they will graze much less often. (giving grass a chance to grow)
[*] Livestock will prefer to graze grasses that are 100% grown instead of at 1/10 (50% grown) this will allow the shorter grass to grow back and will be more efficient long term
[*] When Livestock cannot find nearby 100% grass, they will revert back to using the Troughs before trying to graze and less ready grass
[*] If no troughs or 100% grazing is available, then the Livestock will try to graze grasses that are above 50% growth until they are not hungry, but they will not fill up on the non finished grasses.
[*] If Livestock are starving and there are no 50% grass tiles within 30 tiles, then they will start to strip the grass right from the roots, but only when starving.
[*] Livestock troughs (hay, grain, water) all allows 3 users at a time now! This should relieve some feeding congestion and looks more natural as well.
[/list]
[h2]Smarter Baby Care[/h2]
The goal here was to have the rest of the Clan be better able to pitch in to help with the baby instead of the mother being called home so often for nursing.
The nursing tasks should also now be triggered when a mother's task ends instead of interrupting one in progress.
Here is how the logic flows.
[list]
[*] Full baby wanders around having fun. Usually follows closest parent.
[*] As the baby becomes more hungry, it will become more demanding on the mother to nurse.
[*] When the baby is hungry (<50% bar), it will start to follow the mother and stay close by. If the mother is busy she will finish that task before nursing the baby.
[*] If a baby gets to hunger critical (<15% bar) and is further than 50 tiles from the mother and the mother is still busy, other Clanfolk will try to feed the baby using the Doctor/BabyCare skill
[*] If no Clanfolk can help the hunger critical baby, then the busy mother will roll her eyes and break out of her active task to nurse the baby as before.
[*] High priority chained tasks, like picking up and hauling a hunted bunny home will be uninterruptible by a following baby.
[*] If it is < 15c outside, babies will not follow mothers when hungry
[*] If the mother is doing a dangerous task like hunting, the baby will not follow
[/list]
[h2]Engine Upgrade[/h2]
I upgraded Clanfolk from Unity 2019 -> Unit 2021. This was a pretty major update with over 2 years of improvements and fixes from the Unity side.
The major reason for this upgrade though was to get a Draggable Resizable windowed mode with docking to the side of the screen.
So if you are in windowed mode and drag Clanfolk to the side of the monitor, Windows will know how to properly dock it to take up half the screen so other apps can use used on the other side.
[h2]Worth Noting[/h2]
[list]
[*] Screen Edge Panning changed such that the panning will stop if the game is not in focus, like with Alt-Tab
[*] Filter states are now saved on the Ideas Panel between save/load game
[*] Added Unit Shadows Toggle to the Video Settings. This can get back roughly 10% GPU late game when there are lots of units and items.
[/list]
[h2]The Big List Of Everything[/h2]
For those interested in detailed change logs, following this link and starting at V0.420 will give you a listing of all the changes since Update 12 (Hearth and Home)
https://steamcommunity.com/app/1700870/discussions/0/3183488858470509508/?ctp=19
[h2]Road Map[/h2]
There is a lot more to come! Please take a look at the Road Map for further long term details as well.
https://store.steampowered.com/news/app/1700870/view/3388412789658793666
Diving back into the code now.
Thanks very much for playing Clanfolk!
Andrew Hume (Blorf)
MinMax Games Ltd.