I've released version 0.15 of my game.
The Hero decision making logic has been completely rewritten to take in to account differing personalities, and as a result the game balance is completely different in terms of how the heroes behave.
There should be a reasonable connection now between sales activity and hero movements in town, and they are in general much less likely to go in and beat the living crap out of the dungeons for no reason.
Fighters, barbarians, thieves etc. still spend plenty of time in the dungeons, with the less combat-oriented heroes spending more time messing about in town.
I'd love to hear any feedback on the end result, I'm pretty happy with it - but whether it is any more fun will clearly be a subjective thing.
Get it at the Bay12 Forums thread:
http://www.bay12forums.com/smf/index.php?topic=105835.msg4194939
v0.15
*Hero AI rewrite, each guild gets different personalities based on Loot, Wealth, Leadership, Balance, Contracts, Glory, Social and Knowledge
*Sales metrics introduced to better inform hero sales decisions, personality based; generally:
-> Balance: Heroes seek out unpopular shops
-> Wealth: Heroes seek out popular shops, lots of sales
-> Loot: Heroes seek out shops, lots of purchases
-> Social: Heroes seek out popular shops, attendance
*Heroes come to town more often if the contract list is well populated (i.e. lots of work available)
*Dungeon crawling logic rewritten based on contracts and personalities
*Phases of operation for heroes should clear up behaviour a little;
*Better transparency for hero decision making in general
*Basis laid for Mayoress, noticeboard, and contracts, implemented in part.
*Some rumours started, but no effects on behaviour yet.
*Contracts moved to a new class, data storage and methods etc.
*Monsters moved to new contract / decision flow system.
*Dungeons expanded slightly, with floor by floor features that can de discovered, with different effects for each feature.
*First pass on game balance for new systems.
*Numpad works where numbers are viable input.
Monday, 22 April 2013
Thursday, 11 April 2013
BRAINS!!!
After much strife and worry, the hero behaviour has been further refined - or at least the method of controlling things has been framed out, and now I just need to slop the wet paper on to the chickenwire and wait for it to dry. It will take a little bit of time (thinking and doing), but I reckon I know what it should look like, and it seems reasonable in concept.
They now have a bunch of driving forces, which are effectively weightings towards acting a certain way. A merchant will be entirely interested in the creation or dispersal of wealth, a swashbuckler will have an insatiable lust for idle chat, and possibly doing things that make him/her look good (a trait they share with the Barbarian - for different reasons). Fighters go for leadership, mages seek knowledge, Druids are hand in hand with balance, thieves and loot, assassins looking for paid work etc. All of course mixed about, and with context specific missions for each driving motive.
The hero is now looking entirely within the bounds of the town for something to do - that is - they do not necessarily have any real knowledge of what is going on in 'The Ruins of Pyromania' or whatever the latest dungeon to be created has been called. This is abstracted away, so that they must check the town noticeboard (which is generally maintained by the Mayoress, and can be inputted in to by the shops or the player) for a compatible contract.
If there aren't any contracts available, they will revert to a default action type for that motive.
Social motives, for instance, would likely generate - as a default - a mission that makes them wander about town looking for other heroes to chat with. On the other hand, a fighter may issue a 'Call to Arms', which might prove to be a more interesting (and lucrative) role for the socially active hero to pursue.
Wealth and Loot motives would generate, as a default, consumerist actions such as buying a replacement sword, or selling a redundant sack shirt. Alternatively, a thief may enjoy the prospect of going on an 'item hunt' for a shop keeper. By generating context specific sets of goals, the system should allow for a hero to know that they are after an item for a shopkeeper, the shopkeeper should know that the hero ACTUALLY WANTS to find an item, so would be happier about shelling out a few coins to the thieves guild en masse to populate their shop with ill-gotten gains. An enterprising thief would probably even think about going on his own item hunt, if things were looking quiet in town (activated in conjunction with the 'Loot' motive).
A player creating a contract to go and kick the living crap out of that monster that has just been sprung from the dungeon would appeal to an assassin (looking for paid work), a Barbarian (looking for glory) and possibly a Druid (seeking balance). I'm toying with a different method of determining contracts, as an experiment, whereby the highest price contracts will be the preferred ones to be accepted by heroes. They then decide whether or not a contract is appropriate by the danger level. Presently it is a bit of a hack-job where they only accept contracts if they are at a certain threshold (ungainly and opaque to the player). If I end up with a system whereby cheaper contracts get ignored because there are more lucrative things to do - not just because some arbitrary thing has been met - I will be happy.
Not all contracts will be visible to the player, as some of them will be decidedly 'meta' - to generate interesting movements of heroes rather than be an actual binding contract between the Town, the Player, the hero etc. but the hope is that the contract board will look rather interesting, as townfolk start complaining about the influx of monsters ruining their lumber / crop operations and generating small bounties appropriately. This approach should also throttle the utter destruction of the dungeons a little - once they are small enough, they should cease being a real issue, but it will allow them to grow again back to the point where they are an issue.
The player could however facilitate the destruction of a dungeon by paying lots of small bounties for people to delve repeatedly. This makes me think I should make them spend less time in the dungeon based on the reward, which should be relatively trivial, and a hard lower limit might even be necessary. It's a bit artificial but probably required to stop lots of $1 contracts skewing things unnecessarily.
The main reason for all this work is just that my previous abomination of code was not only opaque to the player in some ways, it was beginning to be very opaque to me, and I had no idea why the heroes were doing some of the things they were doing (or not). Hopefully this will streamline their decision making, allowing for more varied, interesting, and robust behaviours and allow the code to grow far easier.
It certainly seems to be getting there, anyway:
They now have a bunch of driving forces, which are effectively weightings towards acting a certain way. A merchant will be entirely interested in the creation or dispersal of wealth, a swashbuckler will have an insatiable lust for idle chat, and possibly doing things that make him/her look good (a trait they share with the Barbarian - for different reasons). Fighters go for leadership, mages seek knowledge, Druids are hand in hand with balance, thieves and loot, assassins looking for paid work etc. All of course mixed about, and with context specific missions for each driving motive.
The hero is now looking entirely within the bounds of the town for something to do - that is - they do not necessarily have any real knowledge of what is going on in 'The Ruins of Pyromania' or whatever the latest dungeon to be created has been called. This is abstracted away, so that they must check the town noticeboard (which is generally maintained by the Mayoress, and can be inputted in to by the shops or the player) for a compatible contract.
If there aren't any contracts available, they will revert to a default action type for that motive.
Social motives, for instance, would likely generate - as a default - a mission that makes them wander about town looking for other heroes to chat with. On the other hand, a fighter may issue a 'Call to Arms', which might prove to be a more interesting (and lucrative) role for the socially active hero to pursue.
Wealth and Loot motives would generate, as a default, consumerist actions such as buying a replacement sword, or selling a redundant sack shirt. Alternatively, a thief may enjoy the prospect of going on an 'item hunt' for a shop keeper. By generating context specific sets of goals, the system should allow for a hero to know that they are after an item for a shopkeeper, the shopkeeper should know that the hero ACTUALLY WANTS to find an item, so would be happier about shelling out a few coins to the thieves guild en masse to populate their shop with ill-gotten gains. An enterprising thief would probably even think about going on his own item hunt, if things were looking quiet in town (activated in conjunction with the 'Loot' motive).
A player creating a contract to go and kick the living crap out of that monster that has just been sprung from the dungeon would appeal to an assassin (looking for paid work), a Barbarian (looking for glory) and possibly a Druid (seeking balance). I'm toying with a different method of determining contracts, as an experiment, whereby the highest price contracts will be the preferred ones to be accepted by heroes. They then decide whether or not a contract is appropriate by the danger level. Presently it is a bit of a hack-job where they only accept contracts if they are at a certain threshold (ungainly and opaque to the player). If I end up with a system whereby cheaper contracts get ignored because there are more lucrative things to do - not just because some arbitrary thing has been met - I will be happy.
Not all contracts will be visible to the player, as some of them will be decidedly 'meta' - to generate interesting movements of heroes rather than be an actual binding contract between the Town, the Player, the hero etc. but the hope is that the contract board will look rather interesting, as townfolk start complaining about the influx of monsters ruining their lumber / crop operations and generating small bounties appropriately. This approach should also throttle the utter destruction of the dungeons a little - once they are small enough, they should cease being a real issue, but it will allow them to grow again back to the point where they are an issue.
The player could however facilitate the destruction of a dungeon by paying lots of small bounties for people to delve repeatedly. This makes me think I should make them spend less time in the dungeon based on the reward, which should be relatively trivial, and a hard lower limit might even be necessary. It's a bit artificial but probably required to stop lots of $1 contracts skewing things unnecessarily.
The main reason for all this work is just that my previous abomination of code was not only opaque to the player in some ways, it was beginning to be very opaque to me, and I had no idea why the heroes were doing some of the things they were doing (or not). Hopefully this will streamline their decision making, allowing for more varied, interesting, and robust behaviours and allow the code to grow far easier.
It certainly seems to be getting there, anyway:
Friday, 5 April 2013
The Mayoress
The Mayoress is going to be an entity that stores some information about the town as a whole. She needs to understand how much cash the town has access to, where the threats are likely to come from, and the current state of the town so that she can respond appropriately.
If the Mayoress is wealthy (or feels a little underdefended), she may consider it appropriate to hire a couple of the town peasants to shift up to guard duty, at a cost to equipment and an ongoing wage. So she needs to understand at what level of threat the town is at, how much cash she holds, what else she might need that cash for in the near future, and how much income she is enjoying. At the start of the game, there are plenty of shops in town (13), and they all pay about $25 per month. So the Mayoress will probably receive in the region of $325 on the 1st February. This gives a baseline to balance stuff around, which will hopefully start to drop off pretty rapidly if things start getting too chaotic.
Hopefully she can be pretty proactive about things, although sometimes that might not be enough. If (for instance) a monster is sprung from one of the dungeons, she will need to take a quick view on how safe the town is. She could:
a) Hire some guards and hope they can stop the menace. Or perhaps raise a militia from the townfolk.
b) Set up a contract for one of the Heroes to stop the menace.
c) Do nothing, hoping that it will take care of itself. Maybe she has been blessed with some foresight, and already has the town set up sufficiently.
She will want to stop the monster, as it is in her interest to keep order so that she can charge more taxes per month. If she gets particularly clever - she may recognise that the order of the town is on a downwards trend, perhaps due to a particularly successful dungeon, and she may make a concerted effort to purge that dungeon of demonic inhabitants (by raising contracts for heroes to pick up).
In the future she will also need to understand what material resources the town currently holds (say these are primary goods such as iron ore, cattle and wood, with secondary goods like leather, paper, charcoal and iron) and either react to low supplies or stockpile goods as necessary. She might need to build a charcoal burners hut, a tanners, a paper makers (?) and a smelter, if she doesn't already have one. Monsters also need to recognise that these things are valuable targets, and the town industry should protect them and lament their loss (as it represents their route to producing cheap items for sale). This should be pretty straightforward, as I imagine the town will operate on a fairly communist manifesto (outside the specific shops), so any workers would just gather stuff up and dump it at the feet of the Mayoress.
She will maintain a noticeboard, from where she will pin a few jobs for the heroes to examine. She will use this to generate here own contracts if she needs to sub-contract the protection of the town. She may even feel the need to take a more active stance in telling the heroes of the town various things. So the noticeboard should function as something that the heroes can look at, and also something that can be put in front of the heroes noses.
This goes hand in hand with the heroes getting new brains and desires, and hopefully it should be quite a neat but coherent solution to collecting the needs of the town and communicating that to the heroes - and the player - whilst allowing for some interesting expansion of the various mechanics in the future (town industry, for one thing).
But whatever she does, she needs to look after the town.
And perhaps most interestingly, that should include the desire to destroy the player, if that is what is required.
Hmm.
If the Mayoress is wealthy (or feels a little underdefended), she may consider it appropriate to hire a couple of the town peasants to shift up to guard duty, at a cost to equipment and an ongoing wage. So she needs to understand at what level of threat the town is at, how much cash she holds, what else she might need that cash for in the near future, and how much income she is enjoying. At the start of the game, there are plenty of shops in town (13), and they all pay about $25 per month. So the Mayoress will probably receive in the region of $325 on the 1st February. This gives a baseline to balance stuff around, which will hopefully start to drop off pretty rapidly if things start getting too chaotic.
Hopefully she can be pretty proactive about things, although sometimes that might not be enough. If (for instance) a monster is sprung from one of the dungeons, she will need to take a quick view on how safe the town is. She could:
a) Hire some guards and hope they can stop the menace. Or perhaps raise a militia from the townfolk.
b) Set up a contract for one of the Heroes to stop the menace.
c) Do nothing, hoping that it will take care of itself. Maybe she has been blessed with some foresight, and already has the town set up sufficiently.
She will want to stop the monster, as it is in her interest to keep order so that she can charge more taxes per month. If she gets particularly clever - she may recognise that the order of the town is on a downwards trend, perhaps due to a particularly successful dungeon, and she may make a concerted effort to purge that dungeon of demonic inhabitants (by raising contracts for heroes to pick up).
In the future she will also need to understand what material resources the town currently holds (say these are primary goods such as iron ore, cattle and wood, with secondary goods like leather, paper, charcoal and iron) and either react to low supplies or stockpile goods as necessary. She might need to build a charcoal burners hut, a tanners, a paper makers (?) and a smelter, if she doesn't already have one. Monsters also need to recognise that these things are valuable targets, and the town industry should protect them and lament their loss (as it represents their route to producing cheap items for sale). This should be pretty straightforward, as I imagine the town will operate on a fairly communist manifesto (outside the specific shops), so any workers would just gather stuff up and dump it at the feet of the Mayoress.
She will maintain a noticeboard, from where she will pin a few jobs for the heroes to examine. She will use this to generate here own contracts if she needs to sub-contract the protection of the town. She may even feel the need to take a more active stance in telling the heroes of the town various things. So the noticeboard should function as something that the heroes can look at, and also something that can be put in front of the heroes noses.
This goes hand in hand with the heroes getting new brains and desires, and hopefully it should be quite a neat but coherent solution to collecting the needs of the town and communicating that to the heroes - and the player - whilst allowing for some interesting expansion of the various mechanics in the future (town industry, for one thing).
But whatever she does, she needs to look after the town.
And perhaps most interestingly, that should include the desire to destroy the player, if that is what is required.
Hmm.
Subscribe to:
Posts (Atom)