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.