Refactoring Neutral hand and alliances

Making AI to attack neutral aggressive animals (and their dens) proved to be more complicated than I thought. Why is that?


Existing AI attacks work quite simple – AI has a list of attacks it needs to run at certain times (or periods), which are “nearest unit”, “nearest house”, “go to location”. Then AI checks if it has enough troops and launches the attack. To this time, I have planned for neutral hand to own both inert and hostile animals and houses. Which means that in order for AI to attack “any” enemy, it needs to check all enemy hands assets and also to check all neutral hand’s assets individually (to pick only hostile ones). Which is sub-optimal both from programming and from code-design point of view (especially the “individual” alliance setting).

Hence I’m looking into splitting neutral hand into two separate hands: inert and hostile, so that alliance settings between hands become simple again (either “ally” or “enemy”). Rules go like in order of priority:

  • Hand is always ally to itself
  • Neutral Inert hand (Ni) will be ally to anyone
  • Neutral Hostile hand (Nh) will be enemy for anyone (except self and inert)
  • All other alliances are governed by mapmaker and mission setup (except listed above)
  • And I get rid of that temp “it depends” alliance setting )

New problems arise though. Currently in Game and in MapEd all hands are tightly packed and each hand can be of any type atm. It’s a good time to fix this too. E.g. you can have 1 human hand and 7 separate neutral hands. Which is a waste of space really. Now there needs to be up to 2 different neutral hands – Ni and Nh (if hand has no assets it gets skipped). Still tightly packed on save and always on the right side of the hands palette in MapEd. Reordering hands is a bit complicated since hands hold a lot of cross-references (e.g. Goals/Objectives/Alliances/etc). Processing example goes like so: load a map into MapEd with 1/2/3/Nh hands. Append 8 more hands. Make the last hand Ni. Swap hands around for Ni and Nh to occupy the 11th and 12th slot. Do the map editing. Remove hands without assets before saving.

Another complication: previously I stored hand type in 2 fields in mission data: allowHuman and allowAI. 4 combinations of which described 4 hand types that were – Human, AI, Skirmish and Neutral. Now 5th type is needed, to split Neutral. For that I’m planning to add allowNeutralType flag/command.

There are other minor issues of course (and some bigger ones I haven’t stumbled upon yet), but overall I’m feeling confident and happy about this refactoring – it will make things a bit more complicated in one small area (Ni and Nh management),but much more simple in other broader areas (since larger parts of the game work with alliances).

On to the refactoring! )

Posted in How things work, Sidenotes | 5 Comments

Alpha 10.1

Alpha 10.1 is out. It features following bugfixes:

  • Fixed mission save warning message text in MapEd being clipped (and having duplicate lines)
  • Fixed repeating objects near borders when resizing a map
  • Fixed popup message shown when replays has ended
  • Fixed crash on selecting dying unit
  • Autosaved savegames should not go to the Recycle Bin
  • Fixed wares render in houses
  • Fixed changing of groups and units position in MapEd using RMB
  • Fixed Blanks dying inside Cottages without ever going to Tavern to eat
  • Fixed removal of Coalmaker’s smoke emitter after destroying the house

Download links:
Knights Province Alpha 10.1 (installer)
Knights Province Alpha 10.1 (7z package)

Posted in Downloads, News | 21 Comments

Alpha 10 is ready

What’s new in Alpha 10:

  • Particle effects (smoke for houses work, smoke for damaged houses, dust effects for plans placement and for house destruction, emitters that could be placed on terrain in MapEd (e.g. mist).
  • SSAO (aka prettier lighting)
  • New custom antialiasing (FXAA2 and FXAA3.11 partially)
  • Smoothed out unit animations
  • Revised house-placement (Trees and other objects block house placement from all 4 sides now, Added house plan icon showing where the road for the entrance needs to be)
  • Imported more unit models and animations
  • New maps from 2018 mini-competition
  • Allowed builders to uproot trees and small stones
  • Revised fish-catching
  • Quick unit/house selection panel in game UI on the right (Ctrl+1//0)
  • Revised wind effects to act uniformly on flags, particles and map objects
  • Expanded undo/redo in MapEd (units, houses, etc.)
  • Unified main menu and gameplay options pages
  • Separate volume controls for sounds (alerts, effects, menu)
  • New map decoration objects – stockade fences
  • Revised and fixed house unlock order
  • Reworked AI
  • Revised food nutritious values
  • Sound for messages opened and closed
  • Displaying proper music titles in options menu
  • And as always a whole lot of bugfixes and smaller improvements

Download links:

Knights Province Alpha 10 (installer)
Knights Province Alpha 10 (7z package)

Posted in Downloads, News | 26 Comments

Recap of events since Alpha 9

In loosely chronological order:

  • Finally set up Patreon page in June. If you wanted to support the game’s development – now there’s a way!
  • Set up itch.io page. Nothing major, just another location to advertise the game.
  • The game was reviewed by Nookrium and Dan Field. Collecting as much as 100k views on YouTube combined!
  • We’ve had 2018 mini-competition for mapmakers (see earlier news)
  • Github issues tracker is getting more attention now. If you have an account and need to report an issue with the game – feel free to use it.
  • Discord server is active as ever. There are different channels for general discussions, mapmaking, bugreports, ideas and others.
Posted in Events, Site | 2 Comments

2018 Christmas/NewYear mini-competition results

Mini-competition is over and I’m happy to announce the results!

We have 5 maps in the competition:

  • “Hodor” by Thibmo
  • “Longfingers Legacy” by Klassix
  • “Winter Stand” by Krom
  • “Xmas Tree Combat” by DarkianMaker
  • “Man Versus Man Versus Beast” by Eduardo Beltrame

Hodor

Score 22.

Comments from judges:

  • Nice skirmish map
  • Nice map but approaches to camps are very wide for the size of the map

Longfingers Legacy

Score 22.5.

Comments from judges:

  • Very much like the details and usage of game assets
  • The maps looks OK, but please, less copy-pasta!
  • Would work well for a competitive map but could do with some more asymmetry. Could also do with a natural expansion of sorts for players to compete for

Winter Stand

Score 24.

Comments from judges:

  • The map looks great, nice addition for sure. Personally I would enjoy iron being available, though not all maps should have iron.
  • A lovely asynchronous map, but the river choke point is really too narrow for a proper fight against a defender

Xmas Tree Combat

Score 21.

Comments from judges:

  • Minimap and the whole idea look very nice to me. Simple and fun )
  • Very obvious X-mas reference. Haven’t seen a pure battle map yet, brings back KaM memories, bonus points for that. 🙂

Man Versus Man Versus Beast

Score 21,67.

Comments from judges:

  • Unusual experimental map!
  • A very chaotic but interesting map, think it could’ve done with some more playtesting though
  • The amount of wolf dens…. wow. Interesting concept, too. But does need polishing.

Winners and prizes are:

  • 1st place with score 24 – Winter Stand by Krom
  • 2nd place with score 22,5 – Longfingers Legacy by Klassix (awarded Steam game of his choice (up to 15$ or equivalent))
  • 3rd place with score 22 – Hodor by Thibmo
  • All participants with maps scoring 20 or more – awarded with a small Steam game by Dah, called “You Can(Not) Survive”:

Posted in Events, News | Leave a comment

2018 Christmas/NewYear mapmakers mini-competition

Due to lack of time and small number of maps sent in, competition is prolonged till next week – 30 Dec!

Winter is coming along with Alpha 10 of the Knights Province! Let’s celebrate this with a competition! Task is simple – create an addon map for the game using built-in map editor (and optionally, dynamic scripts). Submit the map until December 23rd 30th. Await for results and get your prize soon after.

Participation rules:

  • New single-player map (can have support for upcoming skirmish/coop play)
  • Created in Alpha 10 wip (latest version available on Discord #new_versions)
  • Meet basic quality standards and be playable
  • Size M+ and any player count
  • Can be several maps per participant, but only one best one is competing for the prize
  • Jury members can participate, but are not eligible for 1st and 2nd place prizes
  • Best maps will be included into the game (for that you will need to write explicit permission, giving map away under CC BY SA)
  • Any map can be disqualified for undisclosed reasons by anonymous jury’s decision
  • Submit to kromster80@gmail.com or Discord #general_eng until midnight December 22nd 29th CET
  • Judging will be starting on December 23rd

Each map will be judged by the jury (DarkianMaker, Krom, Lewin, Maps, Thibmo). Map with the most points – wins. Points will be awarded in the following categories:

  • Visually pleasing design (up to 10 points)
  • Gameplay (up to 5 points)
  • Detalization (map objects, emitters, etc.) (up to 5 points)
  • Quest elements (dynamic script) (up to 5 points)
  • NewYear/Christmas references (up to 3 points)
  • Support for skirmish/coop play (up to 5 points)

Prizes are:

  • Scores 20 and above – small Steam game from community member Dah. Mention on the games website
  • 3rd place, small Steam game, mapmakers role on Discord channel
  • 2nd place, small Steam game, mapmakers role, Steam game of your choice (up to 15$ or equivalent)
  • 1st place, small Steam game, mapmakers role, Steam game of your choice (up to 25$ or equivalent), attribution in map description as mini-contest winner

FAQ

Feel free to ask for clarifications, they will be answered here.

Posted in Events, News | 3 Comments

Food values

All Knights Province units need food to eat (well, except machines and animals). Otherwise they die of hunger. So dedicating a large portion of town to a food production is a good thing. But how much food is needed anyway? Let’s look into how much units eat:

Warriors can not leave their duty, so they get their food delivered by serf, which gets picked randomly in Camp/Store and tops warrior’s condition to 100%.

When citizen get hungry, they come to nearest Tavern that has free places inside (each Tavern can fit only 6 units at once). Typically when unit comes to Tavern he is at 13% full. When inside, unit will eat food in order it is listed in the Tavern until being 90% full.

I’ve been asked several times about food values for citizen, so here’s a small chart:

  • Fish – 0.5
  • Cider – 0.3
  • Bread – 0.4
  • Sausages – 0.6
  • Ale – 0.3

Please note, that above values are subject to change and should be considered correct only for current Alpha 9.1. In upcoming Alpha 10 values will be tweaked to:

  • Fish – 0.4
  • Cider – 0.2
  • Bread – 0.4
  • Sausages – 0.6
  • Ale – 0.3

So for example, in well stocked Tavern, unit will eat Fish+Cider+Bread and walk out, keeping Sausages and Ale intact.

Posted in How things work | 8 Comments

Alpha 10 nearing its release

Alpha 10 is going out of “work in progress” stage. Now its features are mostly done and last bugs are being ironed out.

Come by and take a stab at it in “Knights Province” Discord channel. Feedback is welcome!

Posted in News | Leave a comment

Site updates

Links page:
Updated Polish site forum link, as it moved to new hosting. Reorganized links order a bit, to bring more active hubs to the top.

Contributing page:
Added Patreon link to the top. Ungreyed some contributing activities.

Posted in Site | 5 Comments

Misty Mountains

There’s a new map being made for Alpha 10 of Knights Province. Called Misty Mountains. Giving word to map’s author Klassix:

“Mainly this map is for the future multiplayer, but of course AI handles it too, but surely it won’t use the flanking mechanics I tried to apply in the corners . You can be attacked in early game by 2 sides. Wolfs and Bruno the brown bear will take care of any fool trying to fast push you with 3 militia through the middle.

If we will be able one day to slow down unit movement with a special snow texture (or option) I will apply this on the middle to slow things down a bit. I did my best to balance things for all 3 players and suggestions are as always welcome.

Cheers!”

You can check out the map in Alpha 10 wip available on Discord channel.

Posted in Live progress | 2 Comments