Wednesday, December 2, 2015

Myriad Magic

One focus I have in my game is allowing for a ton of different magical options and systems. Ideally by harnessing different granular aspects of magic and combining them in weird ways, nearly every society in a single game or potentially across many games will have quite differently functioning magic systems. In this post I am going to lay out all the potential aspects of magic.

One of the major systems of magic is trait channeling. You can have a character or populace give away part of their power, or you can steal someone's power, and gift those powers to others. For instant you may gift a unit in your army with the stolen essence of an imprisoned dragon. You can also perform actions essentially similar to communions in Dominions4. You could also steal the knowledge or strength of slaves to give to your people. Stealing the traits of your citizens can incur a political cost, assuming you don't utilize propaganda to make it culturally acceptable. You can also drain the life of an entity to increase the life of another. The way that systems interact in my game the possibilities are limitless. Trading the weight of a spy but gifting them strength or something. Giving your pikemen or shield using troops strength and weight to defeat charges. All sorts of fun stuff.

You also have the more conventional magic systems. Elemental magic, killing spells, etc. Not much to explain.

Another powerful tool is environmental magic. You can alter the traits of a province like the temperature or the rain and so forth. You can also combine this with physical terraforming. There are options like creating a storm or snowfall in a pass, freezing rivers, and various spells like locust swarms and crap.

One of the rather unique systems of magic besides trait exchange is the mental arts. You have the ability of farsight and more interestingly, a sort of foresight. Foresight is more about discovering secrets than actual future vision since the game has no actual future state. Perhaps you get a vision of betrayal in war or of your death, which signifies various plots against you.

Magic in this game can affect economics as well. Magical vs technical automation for instance. Magic powered machines. Doing things like creating roads with magic. Transmutation, conjuring power from magic. Creating fridges using magic to transport or store food. Some sort of time proof field could provide similar effects.

Advancing The Idea Of Research In 4X Games

Research is a wildly undervalued area of 4x games. My belief has always been that all aspects of 4x should have the depth of the combat part and I have set out to make that so. Below I will lay out my vision for an incredible 4x research system.

First I'll start with the most boring part. For basic things like crop growing I don't think interactive research is super valuable. My plan is that provinces will slowly advance in this area mostly automatically. You will gain general crop knowledge that will slowly disseminate across your empire and you will gain regional and biome crop knowledge as well. I am considering knowledge for every specific crop as well, may be too much. You will also slowly gain knowledge in areas like construction, livestock management, etc. You can invest in infrastructure later in the game to increase the growth and spread of this knowledge.

Now we can get to the more interesting areas of research. This aspect involves magical and technical skills. In a previous post I described broad worldly issues regarding magic. Magic has a total level of power and it becomes increasingly difficult to generate new magical knowledge as you approach the total. However the specifics of how research is conducted must be addressed. Every character in the game is capable of research. Using their resources they can put money, time, minions, etc into their research budget. Any character involved in research gains the fruits of their own labor and their controller if they have one does as well.

This system has many implications. There is a substantial incentive to do most serious research yourself or to not allow subordinates access to more powerful knowledge. These people could easily sell you out or attempt to supplant you. However you can also engage in sneaky plots to steal supporters and knowledge from your enemies or even allies.

You have some interesting political and economic choices as well. You could create a highly educated magical society but that may reduce your relative power. Hoarding knowledge will make it harder to get more research done but will allow you to have extremely serious leverage over the less magically gifted. It is probably easier for dictatorial rulers to hoard knowledge and populist ones to spread it around. But both groups still have their troubles.

What knowledge you actually get is somewhat random. You can sort of research magical fields or focus on improving existing knowledge, and your learning is somewhat granular. There is no option to research say, a "levitating airship/weapons platform."

Magical knowledge can come from discovery or boons from supernatural forces as well. Its not purely a research game. I may put up some other articles about the connection of research to society and culture later. But I think the character focused system, which is unlike even the character based system in Stellaris by Paradox, is unique and has a lot of potential for emergence.

Monday, November 30, 2015

Death And Destruction, AKA Combat Mechanics

I am currently putting together a very simplified version of my combat mechanics under the theory that getting simplified major systems working will allow me to slowly complexify things over time while doing some early testing of my basic gameloop.

However, the final combat mechanics will be quite detailed even if you can't really do much during a battle, for time reasons.

I'm still working out exactly how the final version will work and I'm going to discuss some early thoughts here.

The basic mechanics are a simplification of reality. You have "Units" in your army composed of specific groups of troops you define. There is a combat range system to represent magic and ranged weapons and artillery. A unit is comprised of its type, swordsman, pikeman, archer, etc. as well as its population, that is the group of entities you choose for it. A 4 armed pikeman will have advantages over a 2 armed one and similar for height and weight. Units will have a single other unit as a target but may work in concert and at the same time be targeted by more than one enemy. You can't actually see this, all you get is a battle report, but it should influence the way you design your armies.

Larger units can take more hits, have bonuses in melee, etc. Faster units are better for position.

Aside from magic, in theory the potential populations you have available for military units and your army composition should affect the way you fight. You and your enemies will always be trying out strategies to gain an advantage. It will take a long period of time to develop new units and strategies so in theory a nation that cleverly counters an enemy will enjoy a large advantage. Imperial nations will tend to be more resistant to this since they can support multiple schools of military learning, have built up knowledge of many army compositions over time, and have access to a larger pool of potential base populations for their units. Unlike games like Paradox ones where you can tramp across Europe during a single battle, there will be a lot of positioning to win strategic campaigns. You cannot move a large army from one side of a vast empire to another side easily or without serious logistics and either way it takes time. Also because of the time it takes to understand and counter an enemy's strategy, a clever opponent has a long window where they can take advantage of getting ahead of their enemy.

Essentially its all about long term planning and strategic instead of tactical thinking. You do still direct the armies around as in Dom4 or EU4 but you won't give extensive orders ala Dom4 and making an army is much harder than 4 cavalry 12 infantry and 10 cannons ala EU4.

Climate Change, Pollution, And Global Warming

One part of my game I am really digging at is how to incorporate environmental factors into the game. I have biomes which determine certain resource availability as well as temperature stuff. I'm hoping to go a bit further, and also combine this with the racial evolution. From a lore perspective magical ambient energy increases the speed of beneficial evolutionary changes to account for changes needing to come fast for game play reasons.

Climate change will be spurring conflict over resources, pollution will be a powerful factor in industrial nations, and populations will slowly adapt to their environment as it changes.
The scale of the game is such that a 50000 year campaign is an option. That would take approximately 1644 real life years at max turn length but depending on how long you generate history vs playing from month one it probably won't be that much, especially if you don't scale massively to world spanning empire. 164 years from day one I'd expect. You can turn autoplay on and off however, so maybe it'd only take a few decades depending on how much you timeskip.

Propaganda In Strategy Games

I've made a decision in my game to try and add certain aspects of real life that have significant effects on politics and diplomacy because of the way that my project is focused on bringing more stuff into the game besides combat. I've described many of these things in previous threads but I have not yet addressed propaganda.

Propaganda/messaging/w.e you want to call it has several powerful effects in the game. You can use propaganda for all sorts of purposes and all characters in the game are capable of utilizing it to push their agenda.

Instead of clicking fabricate claim or forging a trade war you can apply propaganda to build support for any issue and other actors can counter you. Propaganda also applies to the beliefs of the people and characters in your nation on various political issues. Including imaginary ones like magic vs tech and whether dragons are good or bad or racial interbreeding.

Propaganda needn't be uniformly applied either. You may only need to use it on specific characters or populations especially depending on your government. Propaganda costs money but it also costs time. A low spending level over time can achieve impressive results especially if combined with more nefarious methods.

Does your enemy have magical weapons on mass destruction? Who knows but he is a filthy foreigner and you control the intelligence services and the media anyways and he blew up the Summer Palace with suicide dragons. Let's color bomb that fucker. Yes, false flag attacks are in.

Your effectiveness at propaganda has many modifiers. Intelligence score, the many relationship factors of the people you are trying to convince, magical bonuses, relationship between the target audience and the goal.

Pushing your society towards becoming more accepting of change or magic or war are all options.

I am currently designing the baseline systems for espionage/intelligence and propaganda/campaigning and trying to find a good balance between performance, granularity, and implementation/data. Hopefully by the end of the week I will be testing a working version in various ways.

Gameplay Variation Based On In Game Choices

I'm bored and when I'm bored I type out long walls of game design stuff, so here you go:
I made a lot of effort to allow for a wide variety of national playstyles in my current game project. I have all the standard stuff. If you play the tribal start you can create your own immortal leader(who will probably die in a couple thousand years or ascend beyond the material plane eventually) and your own race. So Dominions4+ style nation design. You make your ruler AND your race.
Your leader and race are generally somewhat independent of your national policies on trade and diplomacy and shit. However, certain choices you make, and which the AI nations will sometimes include as well, can drastically affect your gameplay in general. How does this work? That is the topic of this wall of text post.
One of the choices you can make is to create an immortal powered by worship. Basically, instead of working on more material and mundane jobs, some portion of your populace must be focused on worshipping your god. Building cool temples and shit helps as well, but takes away from your material capital the way worshippers take away from your human capital. Also magical races, or half breeds, get a buff to worship power. Aside from temples and worshippers, stuff like expensive worship garments and idols and decorations and shit also boost worship.
You can also find spirits, or demons, in the game that are worship powered. Like your national immortal they provide blessings and buffs to your nation based on worship.
Worship powered immortals, demons, and spirits function the most like the common depiction of real life gods. Using a non worship based immortal is more like having a powerful Malazan like Ascendant on your side. For instance Pretenders in Dominions are much more like Ascendants than actual gods.
Some in game creatures, demons, and spirits, function more like Elder gods of many different fantasy settings. Worship doesn't directly empower them, merely draw their favor. And excessive worship is more capped with entities whose power doesn't derive from worship. Whereas the aforementioned worship powered gods gain power limitlessly as worship increases. This power doesn't grow linearly of course. The higher your worship value gets, the more worship is needed for each increase in power. Otherwise it would be super overpowered.
Other playstyles are not decided at character creation but must be obtained from the world. For instance, there will be some provinces in the game that will contain an entity that wishes to cover the world. Your nation can choose to exist in symbiosis with this entity. One example is an entity somewhat based on planet brains or the real life giant ass mushroom in Oregon. This entity has an overriding public goal to cover as much land as possible. It will attempt to cleanse/infect land itself as a sort of ascendant like a national immortal. But if you enter into treaty with it and follow through in fulfilling it goals, it will provide buffs and work in concert with you. There are dozens of types of these entities with different goals and powers and things it will ask of a potential symbiotic nation. They will be generated at world start and what map has what entities is pretty random.
Another playstyle that is quite different from a normal one but not too similar to the above two styles is the single resource of failure society. There are certain in game resources that are immensely valuable and provide unique magical or technological or magitechnological options. But they have no substitute good in the economic sense. That means that although they grant you great power, you are totally dependent on them. If you run out, any construction that depends on that resource will become dormant and useless or even collapse depending on how it integrates the resource. Your society will be very focused on obtaining more of this resource. Similarly, other races using the resource will be a huge problem. They will need to be wiped out quickly, especially as the AI might not be quite so optimal in how they use the resource as you are. This will be one of the ways the game fairly represents the rise and fall of powerful societies. A great empire may collapse if it burns through its supply of super powerful magic energy crystals causing its technology to fail and remnants to fight among themselves over the remnants of available crystals.
Note that all these game options are choices. You are not trapped in them at race selection. You could burn a potential world swallowing forest to the ground instead of allying it, you could bury the discovery of energy crystals, and if you like, you can simply stop worshipping a worship powered entity. Granted world forests would fight back and a failing god might try to bully people into worshipping it, either threatening you, or coercing another weaker nation into becoming its thralls and then trying to build up and avenge itself on you for abandoning it. Maybe a crystal based society finds out about your hoard and you have to employ it to defend yourself as they switch the focus of their military machine to you alone. Choices have consequences after all.

Potential Early Phase Tribal Mechanics

When I was trying to set up the starting phase of my current project I had some issues since I had been balancing mechanics around the permanent phase. Now, I'd expect most players to start the game using the world gen, which catapults you directly into the permanent phase. This is because certain major features of the game only exist in that phase. Trade, politics, diplomacy, national policy, magic, industry, etc. can only exist in a rich, complex, full world. But I am letting the early phase be playable since it needs to exist for world gen anyways and I happen to enjoy it personally.
Expansion in the early phase is a big problem, at least fun per turn wise. Colonizing wasn't appropriate really, too early, assuming I include it at all. Armies were sorta okay but didn't make too much sense. In both cases expansion was relatively slow and offered few choices or actions to take.
As far as intragroup mechanics, stuff was scaled far more for the permanent phase. Revolts were rather non-sensical and cultural integration is much more of a nation-state based system. There were no merchants or even deep econ to contend with yet. Classes in general couldn't exist since populations were too low.
Instead I opted to try something else. In the early phase I'm going to try and run it more like King of Dragon Pass. I already incorporated some stuff from there event wise but I figured I could do more. Tribal gameplay will focus more on events, while growth will be achieved through the actions of your god-king. Every turn you can perform various actions, which differ based on the characteristics of your god/ruler. Your god ruler is also going to determine some cultural values and your actions will do the same.
The basics first. As a ruler you control an amount of population in your starting province. Your population will grow through neutral populations being absorbed. You have two choices, as does the AI, and here is where nations being to differentiate themselves.
First you can expand by subjugation. This involves raising armies and attacking neutral populations. In this phase of the game subjugation is achieved merely by force. Neutral populations lack a coherent identity requiring the cultural integration that will be modeled in the permanent phase. Basically the population takes some casualties, your army loses some men, and the majority of the neutral population is added to your tribe in the province.
Secondly you can expand by assimilation. In this strategy you attempt to provide pressure to join your tribe through having a happy and prestigious populace. However the most important aspect is the prestige of your ruler. He can go on hunts, perhaps quests, fight in duels, and so forth. He must also repel attacks by monsters or other leaders. Successful efforts result in a prestige boost. Populations will slowly gravitate towards the most prestigious tribes in the province.
Note that you can interleave these two methods into your expansion policy, its not one or the other.
Expanding into other provinces involves the same process, excepting that you must build a for/settlement comprised of some number of your citizens in a new province to get the ball rolling. This replaces the original colonization mechanic. Although neutral populations will proceed along the tribal cohesion path, they will generally merge into a single tribe more slowly. However, they will coalesce enough that combat will probably be harder and attacks on you will be stronger. Other tribes led by their own god will of course be as dangerous as the player, or perhaps more if their nation style is more suited to the early game.
Your nation's character will be more drastically changed in the starting phase by the choices you make. You'll actually design an immortal ruler and your race itself before loading a game which may set you on a particular path from the start, but its wont be as major as national ideas in EU4 or the pretender design and nation pick of Dominions 4. A major goal of the game is that you develop as a nation based on long term and continuous policies during the game.
In previous threads I've made here I discussed how actions in the permanent phase of the game affect your nation. Similar but more limited effects are applied in the starting phase. The populations of your nation will be forming expectations of how nations are ruled based on how you expand your nation and how you rule it. If you rule by conquest and fear and give great power to aristocracy that will shape your nations for millennia to come. In the permanent phase it will be more difficult to integrate populations with national cultures opposed to your own and nations will interact with you diplomatically in a similar manner. 

Annexation, Subordinate States, And Cultural Integration

So I spent a long time considering what to do with certain elements of political simulation. Since Paradox is really the only extant example I draw my comparisons and contrasts there but I didn't base my ideas off of theirs.
Consider how EU4 handles what they call diplomatic annexation. There is a 10 year timer from establishing a vassal. You must pay bird mana and it takes a few years to absorb the state. You get bonuses based on religion and culture.
This is extremely limiting and abstract, even aside from all vassals behaving identically across the whole world with identical duties.
The system I am currently planning on implementing works this way: There is no such thing as a hardcoded vassal, protectorate, or colony. As part of the diplomatic system there are many different terms one can put into a treaty. Treaties can be performed in peace with all options in play aside from a truce since there is no war. A war treaty is the same a peace one excepting the truce, and a certain pressure to assent to terms based on the current state of the war. Treaties contain various terms regarding money sent back and forth, royal marriage, hostages, fostering, land exchanges of many kinds, defense pacts, offense pacts and so forth. A nation may exist as a series of states with various agreements in place. You may use tiers based on a template treaty to represent something like the members, electors, free cities, and emperor of the HRE.
Directly controlled land allows full sovereignty and control. You may perform any province based action. This is land directly controlled by your character. You may establish a bureaucracy of non noble offices to administer your land. You will assign them goals and duties and access to resources with which to act. Since such people don't have any significant power they will not be represented in game by an actual character and cannot perform actions characters can. You will pay a general fee to these people to operate your stuff for you. So a large bureaucracy is expensive but cannot initiate rebellions the same way characters can. However bureaucrats are represented as a population as you assign them. Based on racial traits and your experience with institutional bureaucracy they can handle more duties. The default base is 2. You'll actually assign duties to the population itself, not an individual member since they are not characters. Other populations will react poorly if a specific race, religion, nation of origin, and so forth gets all the cushy posts.
Governors or nobles will be full characters which can handle far more work than a bureaucrat. But they can amass personal wealth and power and have standing with all relevant populations, so they can secede or engage in plots and do other crap. Nobles can act among themselves, moving lands and such things around but they maintain populace opinion whereas a governor who dies loses all standing and a new governor lacks any standing upon appointment. Populations will have similar reactions if all governors or nobles are of a given demographic. Governors are not a hardcoded system, its simply a flavor way to differentiate between hereditary and non-hereditary positions within my posts.
Why am I talking about administrative stuff in a post about annexation and cultural acceptance? Because that is how it is defined. You can levy taxes and other obligations on populations any way you like. But this affects their opinion of you personally and how they regard your state. Instead of some stupid base tax calculation or a change culture button or w/e, how your state treats people determines their feelings about the state. Citizens will be willing to meet more obligations if they feel more represented and accepted in a state. There is also an affect based on how populations view each other. If your state is 70% main culture and main culture hates your minorities they have a worse opinion of you and the state. If you work to change their status they like you more and if your actions cause the majority population to like them more they are more loyal to the state.
Note that nobles and governors have their own relations and acceptances. Both them personally and the land they control work the same way as your personal land. But its not as easy as just giving proportional aristocratic, bureaucratic, and administrative positions to out. Because previously privileged populations will dislike governors of other groups if they have a poor opinion of that group. And they will dislike you for appointing them. Populations are divided among religion, race, caste, nation of origin, and also faction. Some populations will have the faction for racial purity or the faction for nationalism or w/e.
Note that its no use being a beacon of cultural acceptance if you cause your main population to hate you and revolt. All characters have more than a faction. Part of their consciousness data involves desires that can relate to race, land, religion, political appointments and so forth. If for whatever reason you appoint a minority to a position and a certain noble wanted it he will be mad at both you and that guy who "stole" his job. He may initiate plots or propaganda campaigns against you and/or that person.
Yes, there is propaganda. Its sort of like the espionage system. You spend resources to promote ideas, appoint people from populations who agree, and so forth. Your propaganda can slowly change the political beliefs of your populace over time. Certain populations take more effect from certain propaganda.
Also note that if you assign a state religion or religions people of those religions will like you more and people not of them will like you less. Also the more you add the more diluted the bonuses are. Well the hate of non-sanctioned religions grows as more others are accepted and theirs aren't.
As far as vassal states themselves, any land not directly controlled by you or your governors is not really YOUR land per say. Nobles are basically part of your state by treaty. The noble family and the populace become more and more in favor of the treaty over time as it persists, though the populace and the nobles have distinct feelings about it. Thusly, if you create a new subordinate ruler and state, the populace will retain their current feelings about you and have positive feelings about the treaty. As will the noble. If you conquer a noble and/or their land by force or build up support and progressively more powerful treaties, support starts at 0 and builds up. To "integrate" a vassal state you keep it in treaty for a long time, slowly add duties that it must meet towards you, and slowly appoint its nobles or populace to positions of power and authority within your lands and vassals' lands. Integration is more about the chance of the treaty being broken and the vassal or populace receding or rebelling. You must perform actions and dedicate resources after the treaty is initially signed in order to convince the ruler and/or populace that a stronger treaty will benefit them.
Ways outside of taxes and treaties and appointments and building relations with the ruling classes to make a state want to be diplomatically more integrated involve preventing them from being damaged by conflict, spending from the national treasury to build up their state, assigning more troops and so forth. Propaganda campaigns also slowly increase their opinion of you over time.
You get substantial bonuses to "integration" speed if you have a high respect rating with the ruling classes and the populace. Respect indicates peoples' opinion of you as a ruler. How you treat citizens and nobles and so forth, whether you keep your word. Fear is how seriously they take threats. Regular opinion/influence is the slow build up of good feelings by being part of your state for a long time. Acceptance of a leading religious figure of the proper kind also has benefits.
As far as breaking your word, when you sign treaties you'll agree to certain things, perhaps protection and tax limits and money to build or rebuild infrastructure or provide positions and offices. When you break such a treaty this lowers the respect value of interested parties based on their closeness to you and the people you broke trust with.
Anyway a major theme of my game that infuses all the mechanics is the idea of direct action and gradual change rather than abstraction, timers, and arbitrary button clicking.

Espionage And Dirty Politics In 4X Games

So Espionage in most 4x games is shit. Its not even a debate. Paradox is all about waiting for timers to tick and dice to roll. Civ barely has one. Dominions only has what is essentially magic espionage plus scouts.
Lets talk about the way the world should be instead of the way it is. Granted I'll be using some game specific mechanics from my game since I'm describing the system I myself am making as the best way to do it.
First, you have characters. These are the rulers and nobles of nations, archmages and possibly regular mages, important merchants and factors, and various religious dignitaries. These people have both known and secret desires, said desires generating based on the history of their religion, state, etc. Nobles want to own the land their grandfathers conquered but their fathers lost, plus of course more land if the opportunity presents itself. Same for leaders of state. They want to reach or exceed their days of glory. Mages want money and resources for their research, access to ancient texts, and other things. Merchants and factors want trade deals, tax relief, access to new markets. Religious people want to expand their religion, recruit important characters as members and so forth.
Other characters will try to enact plots if the conditions are right but since the game part is essentially the same, I'll focus on the player.
As a player you want stuff. You could buy it/trade for it or conquer it. But you can also use sneaky dealings. First you as the ruler of a state have intelligence infrastructure. You can invest in it, research it, try to trade for the knowledge of others. Also like all systems in my game, the more you perform espionage the better you become. Having a well funded and long running and active intelligence organization provides slow growth in their ability, this represents training and internal culture. Your spy agency will study nobles, either randomly or if you have a specific goal then as you direct. As you allocate funding, human capital, and time to a given important character you will slowly dig out their dirty secrets, hidden desires and possibly catch win of their own intelligence activities. You can blackmail them with dirty secrets, support or counter their plots, and bribe them with their wildest dreams. Assuming they have something of value that you want.
You could also sell your knowledge to another character, perhaps their long time rival or the target of their plot, in return for that character's favor which you can then use later to get them to help you in your own plots. Note that if you make a deal with someone you don't have to follow through at the end, but then that person won't trust you and may tell their friends and allies, or even the whole world, of your duplicity depending on how angry you make them. Note that you need to break several deals before no one will work with you, early on you just have to give them better deals for their assistance. And deals you keep counteract deals you break, at least a little.
Perhaps you find out that some noble in another kingdom desires a certain piece of land owned by your or his liege. As it is one of his secret and not open desires, its worth a lot to him. He is quite powerful, perhaps he owns the 3rd most land in the kingdom. You are an empire. You make a deal to get him that land and make him king in return for backstabbing his current ruler. His acceptance will depend on how people view you as a liege, his own moral alignment, how his people feel about you and his current ruler and so forth. But he'll ignore quite a bit of negativity to get the land stolen from his great grandfather which was returned to the crown when the son of the thief died without an heir. You either invade openly and make him your puppet king when he turns to your side or provide troops and money, he seizes power, and swears as your vassal. The political consequences in his kingdom depends on how the people view you, him, the old king, and the way shit went down. Note that, since technically your overall plot was to take the kingdom without an all out war, you could have other plots such as certain nobles arriving late to the enemy's assistance, or abstaining from conflict, or swearing allegiance to the puppet king or w/e. Even multiple traitors. Also other nations finding out through their own intelligence operations could intervene or get negative opinion modifiers after finding out about the bribes and blackmail you employed. Maybe someone else knew about the secret desire of the noble and that counts as them realizing you bribed him.
There is also a propaganda system you can play with that will effect the opinions of your espionage and military actions but that's another thread.
Plots can also be directed at your own citizens, like mages and merchants and your own nobles. Maybe a noble is getting to strong so you have him killed, reveal a dirty secret to turn off his allies, or something. Maybe a mage has a book you want for the national magic academy so you bribe or blackmail him or something. You can also catch traitors, if your intelligence infrastructure is good, and blackmail them into double agents, have them hanged for treason and their property confiscated, and so forth.
This all derives from the secret desires, dirty secrets, open desires and general desires. Everyone wants a higher rank or more money or land or w/e. But open and secret desires carry more weight when met than general ones.
Secret desires can also be met diplomatically of course. If a noble loves his firstborn daughter you can get him a powerful match, a match that will treat her well, or marry her yourself if the noble has a good opinion of you, thus gaining his favor and even political support. Marrying her yourself meets both a general desire of increased prestige and/or rank if she is the heir, and his specific desire of a good man to make her happy. Granted, if you divorce her, or have her killed and he finds out, then you lose both the favor of the act itself, and double penalties for breaking your previous agreements.
Also, you have 3 sort of reputations that affect how people view you. Fear, how much they are afraid of your armies or your torture chamber or your rampant executions, respect, how they view you as a leader based on your accomplishments, and opinion/influence. This includes stuff like your dynasty/personal/national right to be their liege, giving them money or land and all the stuff that you might see in a Paradox game like royal marriages, plus extra like fostering kids and shit. Each person has a separate value for each. Someone who really fears you will be more likely to fall to blackmail, someone who respects you will trust you to keep your word, and in the case of becoming a vassal, to treat them well.
The main goal of the espionage system was to make it more like war. Doing recon, finding out who is willing to side with you, gathering your forces, like in the case of rebellious nobles, and so forth. There are unfortunately some timers like applying your spies and waiting for find out info, but info you find is forever so in some cases you might have the info before you formulate the plan and then you don't have to wait. But ideally its all focused on actions you take with direct results. Marry daughter, get support of father, bribe greedy noble for support. Next Imperial election become Emperor.
Ideally you could be a noble in a state similar to the HRE or the Eastern Empire of the Valdemar series and spends hundreds of years working with building alliances and bribes and assassinations and not fighting a single battle but still having the joy of becoming the Emperor through planning and skill. Of course you CAN fight battles and the combat and conquest systems are large parts of the game.

Tuesday, October 6, 2015

Magic Systems In Fantasy Strategy; Leaving Even Dominions Behind

One thing I've always really wanted in a fantasy strategy game is a super awesome magic system. Now Dominions has a magic system but the whole game is super combat focused and a lot of the magic system isn't super open to exploration. Spells are complete entities that do one specific thing. Not only that but the different potential options available were quite limited.

In order to fulfill my dream of a fabulous magical component in a 4x/empire building game I came up with a combination of atomic parts drawn from dozens of magical systems in games and novels. The goal is that nearly every society in the game will be able to assemble its own almost unique magic system, similar in differentiation to the static premade magical capabilities of Dominions3-4 but with many more options. Magic changes somewhat over the course of the game and the historical pattern itself will probably be different every game.

In the early phase start you have a randomized map as well as a number of randomized tribes that will eventually form nations. Various spirits and deities will inhabit the world, including the players option of designing their own race and deity. Special magical races will have their own standard set of magical capabilities at the start, but this will only constitute a small part of their overall magical nature. Tribes will be able to make deals with various spirits and deities as well as conduct independent magical research and potentially integrate or be taught by populations of the already magical races.

In the early start there is a large bonus to magical research and magic in general sort of signifying the traditional age of magic/legends/enchantment in fantasy stories. The world is simply more magical at the dawn of time.

There is a set of primal gods which exist at the start of every game, a set of randomly generated lesser gods, the player's god immortal designer character, and the potential for various races to sort of will their own god into existence. Gods with similar powers draw from the same well, so if you have a god of the hearth, god of the sun, god of the forge, etc, they all draw from the well of fire. Or if multiple races have their own gods of the forge or w/e they still draw from the well of fire.

When a race/religion generates its own god through an act of magical and mental will that god is bound to that religion. However gods require sacrifices and worship to act on a race's behalf and may act against a race that changes their beliefs. Thus spawning a god is not a permanent increase in power for a temporary cost in various resources like magic or the heat of a volcano or w/e. Gods have multiple attributes that define their desires which must be dealt with to gain their blessing. These attributes are drawn from the creators of the gods at the time of creation. For gods who are primal or randomly generated at the start, as well as nature and elemental spirits, these gods mostly tend to reward those who support their essence. Racial gods are a lot more into punishment as part of their closer link to their creators than natural deities. A war god will often bless any nation/tribe that shows reverence for war. A racial war god will punish its race if they start to deviate from its desires as well as perform blessings. Racial gods tend to only bless their creator nation/tribe/race.

Created gods are powered by worship and will slowly fade away as their number of followers falls. Natural gods are sometimes empowered by worship but don't ever really pass on for the same reason. Worship powered gods can grow in power while natural gods generally don't. They do start out stronger. Because all gods/spirits of similar natures draw from the same well primal gods may be dethroned if another god surpasses them in power. Generally primal gods will have more tricks related to their nature than created or even randomly spawned gods. Their nature will be more focused on their well primary attribute.

Gods are implemented as regular characters in the code and they can actually do things like lead a nation. A player designed immortal will generally start as the initial ruler of their people. Similarly a regular character though generally only a mage or ruler, can gain power equal to that of a god through magic and worship.

Beyond the deities/immortals in the setting magic can exist naturally. The overall level of magic slowly drops over time but is also influenced by the actions of groups in the game. Magic decreases based on the population of sentient creatures in the game but this mainly affects the nature of magic research. That is, research into magic is sort of an act of creation. Magic solidifies into a natural law as it is created. Essentially magic begins as a primal and undirected force. As more magical power is directed its harder to find new magic to direct and eventually its tapped out. Already directed magical power remains in the world so whatever magic is discovered will always exist and function. Magic must be rediscovered in ancient ruins or learned from spirits/deities/immortals and can't be created by "research" anymore when its all gone. Therefore over time as magic is lost to time it seems that the world is less magical. However existing magical knowledge spreads, making it more difficult for it to be wiped out, so there is a sort of magical rock bottom below which you cannot go.

It is possible to directly wipe out a specific type of magical knowledge or to go after magical knowledge in general and it is also possible to lock away ambient magical energy. When sealing away magical energy although knowledge is not lost all magic becomes weaker as the total pool of magic is limited. You can however attempt to shatter magical seals and release magic back into the world. You can also collect and lock away magical items. Various natural resources, geographic locations, magical beings, and magical items can be used to draw out magical energy for use in various actions.

As far as the actual options for magic go there are various atomic effects you can combine. You can magically transfer attributes between populations and characters to enhance one at the expense of the other. You can expend a larger amount of magical energy to enchant items or units/characters to have boosted stats in a similar way. There are all the common kinds of elemental magic like fire and shadow and crap as well as areas of effect and ranges and what not. You can summon or create creatures, affect weather, boost crop yields, cover the land in shadow, generate storms, terraform the land, create portals to other dimensions or gate between locations. You can build or power structures. You can use magical tools or spells to spawn roads or dig out harbors, or do it the old fashioned way. Mages can combine powers for greater effect. You can boost the life span of a character or grant them immortality.

I had several major goals in the system. Magical resources are something to fight over, gods or nations can wage war between each other to strike down other gods who use the same power well, some gods and spirits function as characters with various goals.

Goals of spirits or deities can include a sentient forest that wants to cover all land and can provide various benefits within its controlled land. Ascendants or immortal could have more standard temporal political goals. Fights can break out over banning certain magics or preventing a nation from controlling too much of the total magic, you can fight for causes like removing magic from the world. Various primal entities will be in conflict and may independently offer you aid for completing their goals. You, or the AI nations, must decide how to interact with various beings, actually siding with them, accepting aid and then backstabbing them, etc.

Magic can fill in technological or climate gaps. For instance ice mages could supply the necessary temperature changes to allow for underground food storage vs living in an icy place or importing ice and having special buildings to mitigate temperature change. You can as mentioned build structures and roads. Of course you can use magic for combat.

The actual system functions mostly sort of emergently. There are the overarching rules and the various atomic magical effects. These combine with each other and with the other game systems in a way that allows for a great deal of depth and complexity even though the input, the rules and effects, and not super complex, because the combinations of the input are what populate the system.

The vast possibility space for the player to discover comes at a relatively small dev cost vs hardcoding every single spell or action or w/e as games like Dominions3-4 do. Of course most 4x/empire/political/conquest/grand strategy games lack any sort of interesting magic system at all.

Wednesday, September 30, 2015

Bandaids And Abstraction: Why 4X Games Fail To Solve Problems At All Much Less Realistically

There are a lot of games in the 4x genre trying to solve the major issues. From longevity to stacks of doom they are all going about it in entirely the wrong way. The most common solutions for these issues involve abstractions and bandaids/limitations added to curtail player strategies. Instead of artificially limiting players, games need to provide systems where the desired behavior is a productive strategy for the player.

Since I've talked about longevity before I think I'll address the famous doomstack this time. A doomstack is when the player, or the AI, assembles its entire military into a single army. The goal is this is that combat algorithms in most 4x games give a higher kill to death ratio the more units there are between the totals of competing armies. 400 to 100 you lose 20 and 200 to 100 you lose 50. Paradox games allow for much more likely routs against smaller armies basically making armies disappear and need to be rebuilt instead of running away and then regenerating.

Many different studios and games attempted to resolve this issue. These were the most common solutions:
1UPT
Tile caps
Attrition %
Multi unit damage

These are merely treating the effects and not the cause. The solution to this problem and almost all the others in the 4x genre has always been to go after the causes. Contrary to popular belief, the cause of all the problems the 4x genre suffers is simplicity. There are trade offs of course but you have a choice of either adding complexity or accepting defeat as far as the historical problems the genre faces are concerned.

In this specific case there are several necessary systems and mechanics to be invoked. Attrition, logistics, and other specific systems must be employed the but the issue extends beyond that. Games must include reasons to split up stacks. Dominions3-4 deals with this issue somewhat in that you cannot leave provinces undefended without risking capture but its still a bit abstract and simplistic. In the ancient empires garrisons were necessary for defense from both internal and external assaults. Paradox games simulate this somewhat with the limitation that garrisons are non-interactive and are basically just a number but we can do much better.

In the majority of military history many victories were won by generals who cleverly attacked multiple fronts instead of grouping up and hunting down enemy doomstacks. Night attacks, sneak attacks, assassinations, feints and parries on the scale of armies. Paradox does the best job of dealing with the sort of rock and a hard place traps that often were important in warfare but like always they fall short of what can and should be done. Armies can charge in from all over the world as battles are fought over months or sometimes even years. Meanwhile defense is handled by the aforementioned automatic garrisons. Their recent EU4 switch to a fort system would be better if again they didn't implement it so abstractly.

Part of the failing of EU4 is how generic the combat units are. There is no training, no unique units, everything is drawn from a general manpower pool and Paradox games never implement the economics to go with their combat. Here the depth of Dominions3-4 is somewhat unique. Units are mostly unique to the provinces they were trained in. Racial units can often only be built in the original capital province of a race because they spawn based on special structures. Sadly you cannot build the special units of other races and there is generally only one province per nation with special training areas. Similarly in Paradox titles the nature of each province is rather unimportant and generic, perhaps barring trading bonused provinces and a couple really high tax ones.

So you need the time to get stuff done before armies can coalesce, interesting and significant provinces/cities to capture, logistics, attrition, and a system where huge numbers don't massively disadvantage weaker armies, whether that weakness is in quantity or quality of units.

Another alternative is war/espionage systems that offer other ways to fight a war. Rapid movement, chaff shredders, immunities, sabotage, and other ways to get things done and cause your opponent to have to shake up their tactics and strategies, but that's a topic for another post,

Saturday, March 28, 2015

Snowballing, Map Painting, Blobbing: Solutions

Note that this is a post about "meta" game, but not metagame, mechanics. Actual in world gameplay mechanics are not really discussed.

I have thought long and hard about how to handle an certain issue in almost all types of strategy games, but probably the most annoying in TBS, Grand Strategy, and 4X strategy games. In games that simulate you ruling over some kind of nation, and especially with a long time scale, there is a tipping point when you become untouchable. Below is the method I devised to resolve this issue. Be warned, I expect both that my method will work and be elegant, and that 80%+ of strategy gamers will despise it.

The reason that games attempting to simulate or abstract wars between various organizations and nation-states cannot do so is because of the player. the player ruins everything. Each different game attempts to account for the player but they all fail. The reason for this is that they are not identifying the problem correctly, whether because of intellectual shortcomings, or because doing so causes a sort of cognitive dissonance which they avoid by trying to solve a substitute problem, subconsciously rejecting the true explanation.

There are 3 major issues with the player as well as lesser issues related to the particular genre:
1. The player has limitless time to solve their problem.

2. The player has infinite redos if they mess up.

3. The player can crowdsource solutions via the internet.

In more poetic terms, specifically related to games that supposedly follow a nation-state over centuries, the problem is restated thusly:
In comparison to a true ruler in the medieval age, because even space games tend to simply change up the setting while retaining the underlying politics/theme, the player possesses many anomalous qualities. The player is immortal, relentless in their pursuit of a single overarching goal, almost perfectly pragmatic, immune to the constraints of time, possessing personal mental energies vastly outweighing that of their many silicon adversaries, and may gain the guidance of vastly more experienced entities of the same divine nature.

To use an example, this describes every person who ever copied a strategy first formulated by DDRJake in gaining one of the Steam Achievements of Europa Universalis 4. If you think about it for a second you see that this is the distilled essence of how a player approaches that situation.

As mentioned previously every game makes some attempts to level the playing field between both the player and the real life rulers and the player and the vastly inferior simulacrums they face off with in the digital game world. Some games give the AI powerful bonuses regarding resources and game data. Perhaps they provide map vision, better leaders if the game has those, superior starting resources, other AI who will suicide the player sacrificing themselves so another AI may win. Perhaps there are +1s to dice rolls. Yet it must be possible for the player to win. And here we see why crowdsourcing of solutions is an issue. If one person can defeat the AI on the highest difficulty through personal brilliance, invariably many can do so and will publish step by step guides online so as to gain the adoration and gratitude of other internet goers.

Indeed creating a challenging game based on knowledge and information has all the issues that plague people who possess great intellect. The law you discover can be applied by nearly any living human once you have done the hard work of figuring it out. Whereas talents that are physical cannot be spread in this way. Thus the greater popularity of physically challenging activities over mentally challenging ones. A human being cannot absorb the physical muscles of another through reading some text. Any attempt to create an intellectual challenge that remains static is doomed to fail as such challenges need only be solved once and introducing small random factors only requires the aspirant to hit reload or restart a couple times to gain a favorable result.

The first step to creating a robust intellectual challenge is thus obvious. A new challenge must be generated for each aspirant. This is not a perfect solution. You can still crowdsource the solution, and if arbitrary saving is enabled you can roll back a failure. But you cannot find a solution already written and the denizens of the internet are unlikely to solve a complex pussle for you with little benefit to themselves. You still have the benefit of limitless time as well. This simulates the real life experience of a historical general or ruler, where they could apply theory gained from solving related problems but could not study the exact answer to their current problem in advance.

The next step of the process has one major answer and many minor refinements. A time cap. Yes, you may grant the player 10 minutes a turn or some other arbitrary number, but you must have a cap that will eventually become less than what is necessary to plan out and flawlessly execute each minute, miniscule, microscopic decision. Thus contrary to the current design of most games, the tipping point is not the point where you become invincible, but the point at which diminishing returns on expansion begin to set in. This simulates the real life experience of a historical ruler or general, who simply could not personally manage every aspect of their army or state. Now you may formulate a system for them to offload that responsibility, while remaining able to take control of whatever particular aspect they deem most important, while delegating less critical tasks to an inferior mind, or simply a mind better attuned to those tasks. Specialization of labor of the art of sovereignty. An example of the classic axiom of economics, comparative advantage. Even if you don't create a system that would make equal or better choices than the player, as long as it isn't terrible, the time cap provides incentive to automate some aspects of their responsibilities because they can no longer accept the tedium of micromanagement to gain the benefit of optimal actions.

The goal of the time cap is that smarter players, or simply more experienced ones, would be able to make more and better decisions within the time limit. Compare to games such as RTSes or MOBAs or shooters where players with twitch skills have the advantage. This is intended to simulate the way that superior rulers in real life quickly forged great empires which quickly collapsed after their deaths. Europa Universalis was famously unable to create a system in which players, OR the AI, could perform a conquest which mimicked these real life rulers, because taking a lot of land fast merely meant snowballing harder, there was no downswing. It is extremely difficult to make a mistake when you have infinite planning time and can wait a couple days to ask superior players what to do.

This goal combines in my personal with attempting to have players roll their own unique map, although you could save and trade scenarios, so that you can make a choice without easily being able to plot all future consequences. A smarter player will be able to handle this better, thus allowing the game to replicate the real life situation of giant empires collapsing instead of snowballing as they grow.

The final step is what many games actually figured out and applied. No saves. Ironman. But importantly, a no save game in which one or even ten bad decisions will not permanently cripple the player. Paradox games do this very well. Although truly, if your time cap and randomized scenarios are implemented well, this step may not be strictly necessary. If you have reached the limit of your on the fly cognitive capabilities, no amount of save scumming will allow your empire to expand because you will keep making sub-optimal decisions. Granted you could simply spend your time limit grabbing game data, save the game and quit, and then work from there, but even then that would provide limited assistance unless you had human readable text files describing current game state.

I expect that many players will rage at a time cap in a turn based game, but you can't please everyone.


Disclaimer:
The inspiration for this post was the game I am making for which this blog is named. It applies mainly to turn based games, although variations for RT/WP games are simple to construct, for instance a time limited pause function. It primarily focuses on games that are single player and which you cannot "win". Dominions, on a suitably large map, or a Paradox game are probably the best widely known examples. Civilization might work as well.