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.