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:


No comments:

Post a Comment