Era of Miracles fantasy mod - developer diary

A few words about the unit maintenance costs:

I don't like the maintenance formula used in the vanilla game (cost depending on number of units and the current turn number using a complicated equation). Instead I made every unit have a gold maintenance cost, just like buildings. High level units have higher costs. Currently the cost of most units is 1, 1.5, 2 or 3 gold per turn, but it's subject to balancing. I even managed to make this cost displayed in tooltips and civilopedia :)

It seems the purpose of exponentially increasing maintenance costs was to punish the players who have too many units. But there is another mechanic that can do it: the unit supply limit. In the vanilla game it doesn't serve its purpose, because it's ridiculously high. I reduced it considerably, so you (or the AI) can no longer create "carpets of doom".

I think gold maintenance costs are enough even when they function linearly (like they do in Thal's VEM mod), I don't see the need for an extra separate mechanic that limits army size. The supply mechanic isn't needed.
 
Wouldn't it make sense for some civs to have that though? I mean, consider the Divello in FfH. That's their whole war strategy basically. Or consider an archetypical "goblin" civ. Large amounts of weak troops seem to be a "thing" for certain civ styles. Just my two cents.

Hmm, in my current plans there is no such civ - perhaps the Orcs, but their units should be pretty strong (melee units get an attack bonus), so I'm not sure if it's a good idea to increase the supply for them. And I don't even know if it's possible - there is no such thing in Traits (but of course it should be possible with the DLL).

I found a "UnitSupplyMod" tag in Policies though, so I'm thinking about creating a policy that increases the unit quantity (higher supply limit, lower maintenance costs, faster production), maybe at the expense of quality (some combat penalty).

I think gold maintenance costs are enough even when they function linearly (like they do in Thal's VEM mod), I don't see the need for an extra separate mechanic that limits army size. The supply mechanic isn't needed.

Well, it's already in the game, so I'm going to use it. And I think it is needed, because making it only gold costs makes the allowed army size only a matter of economy. It doesn't take into account the fact that a larger nation can field a larger army.

---

I'm playing NiGTHS recently, and I really like it, it's a relief to play the game with properly functioning happiness mechanic :)
 
Well, it's already in the game, so I'm going to use it.
That doesn't really seem like an optimal design approach to me.
And it's in the engine; it isn't really in the game, it never binds. I think they experimented with it and then found it didn't work well, so they set the limits so high that it would never be binding.

because making it only gold costs makes the allowed army size only a matter of economy. It doesn't take into account the fact that a larger nation can field a larger army.
Sure it does. Larger nations have bigger economies. They have larger populations, which mean they work more tiles and generate more trade route income.

More to the point, I think hardcaps in general are a bad idea. I think a much better design approach is to use marginal incentives. And there are already reasons not to have too big an army, because the bigger your military gets the more congestion effects kick in, so it becomes less and less useful to pay the extra marginal maintenance cost.
There is no need for a sudden wall where you can't get a bigger army regardless of economy.

A hardcap like this also ends up hurting the AI more than the human player, because the human can use a given number of units much more efficiently, and the AI is much more likely to rely on brute force quantity for military power. Given AI weaknesses, I think mods should usually attempt to avoid introducing mechanics that hinder the AI relative to the human.

It also risks having a snowball effect, where a civ that is behind suffers even more because they can't build an army, or a civ that loses a city to a surprise attack all of a sudden can't build/buy more military units.

Anyway, just my opinion, as always.
 
That doesn't really seem like an optimal design approach to me.
And it's in the engine; it isn't really in the game, it never binds. I think they experimented with it and then found it didn't work well, so they set the limits so high that it would never be binding.

Well, of course I don't have to use everything that is in the game, but I like this idea, so I have no reason to remove it. I just set the limits to values that are reasonable in my opinion.

Sure it does. Larger nations have bigger economies. They have larger populations, which mean they work more tiles and generate more trade route income.

It's not always true, larger nations also have higher costs to upkeep buildings and routes, and can be on terrain that is not very good for producing gold, and have less policies that give them gold bonuses. But still their large population should allow them to support a bigger army. I wouldn't like a game where focusing on gold economy and policies will automatically give you the ability to have a much bigger army.

More to the point, I think hardcaps in general are a bad idea. I think a much better design approach is to use marginal incentives. And there are already reasons not to have too big an army, because the bigger your military gets the more congestion effects kick in, so it becomes less and less useful to pay the extra marginal maintenance cost.
There is no need for a sudden wall where you can't get a bigger army regardless of economy.

It's not a hard cap (like in Master of Mana), it's a -10% modifier to production in all cities per unit above the limit.

A hardcap like this also ends up hurting the AI more than the human player, because the human can use a given number of units much more efficiently, and the AI is much more likely to rely on brute force quantity for military power. Given AI weaknesses, I think mods should usually attempt to avoid introducing mechanics that hinder the AI relative to the human.

The AI gets much more unit supply, and lower unit maintenance costs (especially on high difficulty levels), there are modifiers for AI supply and maintenance in the Handicaps table, and I use them.

It also risks having a snowball effect, where a civ that is behind suffers even more because they can't build an army, or a civ that loses a city to a surprise attack all of a sudden can't build/buy more military units.

I haven't checked it, but I think you can buy units when you're above the supply limit. Building them is not so easy due to the production penalty, but generally the limit won't be so low that you can't have a good army. It should be at a reasonable level, so you can wage a war effectively even if you lose a city or two.

Anyway, just my opinion, as always.

Of course, thanks for sharing it with me even if I disagree with it :)
 
Well...the advantage of a mod is that it can be playtested. If, by chance, the limits you set are too harsh, then they can be adjusted. :shrug:
 
In current plans there are 6 types of Great People:

  1. Pioneer
    • Can build a Town - improvement that gives food, production, gold and culture; it's the only Great Person improvement in the game, except those that are unique to specific civs.
    • Can claim territory (works like the culture bomb in vanilla Civ5).

  2. Great Merchant
    • Can conduct a trade mission.
    • Can find a new resource (this feature probably won't be implemented in the first version, will be temporarily replaced by the ability to start a Golden Age, so like other non-combat Great People you'll have 2 actions to choose from).

  3. Great Prophet (generated not only from Mana (renamed Faith), but also by some buildings and Priest specialists)
    • Can found or enhance a religion (if I figure out how to do it, I want them to add only one belief at a time, so you need more of them than 2 to create a fully developed religion).
    • Can spread religion (there are no Missionaries or Inquisitors in this mod, so it's only "natural" spread and Prophets).
    • (Calx only) Can build a Creator Statue - improvement that gives culture and mana, and a strength bonus for nearby Calx units.

  4. Great Warrior (hero)
    • Combat unit, different civs have different hero types, they have Leadership, but it works only in 1 hex radius, not 2 like GGs in unmodded game; generated from combat by Great General points, as well as from some buildings. In the final version I want the heroes (including the 2 other types below) to have random extra promotions, so they are different from each other.

  5. Great Mage (magical hero)
    • Combat unit with magical abilities. Different types for different civs. Not generated by GG points, only by buildings and specialists.

  6. Flagship
    • Combat ship (ranged), like heroes has 1 hex Leadership; generated by Great Admiral points and from other sources.

Edit: Changed some plans, edited the post accordingly. For now I think in the final version none of the Great People will have the ability to start a Golden Age, so it will only happen due to happiness accumulation, and perhaps also from some policies and buildings.
 
Just fyi I frequently hit the supply cap when trying to field large scale wars in the early parts of the game. It made fighting wars more costly than expanding peacefully in several cases. Mid game, about the time I have some reasonable population I have yet to see this crop up. I usually run out of resources or income before supply.

As far as I'm aware the supply mechanic was meant to disuade players from using rush strategies not act as a long term limit to units. However by reducing supply the AI will be encouraged to prioritize infastructure over units. Unfortunately this will both A: not work very well, and B: cause the AI to recieve a gold income boost (that is going to be overkill) unless their auto-cheats get removed.
 
Just fyi I frequently hit the supply cap when trying to field large scale wars in the early parts of the game. It made fighting wars more costly than expanding peacefully in several cases. Mid game, about the time I have some reasonable population I have yet to see this crop up. I usually run out of resources or income before supply.

Yes, in early game the cap is sometimes limiting. That's why I'm mainly reducing supply per population (one unit per 2 citizens is way too many IMO) rather than the base supply and supply per city.

As far as I'm aware the supply mechanic was meant to disuade players from using rush strategies not act as a long term limit to units. However by reducing supply the AI will be encouraged to prioritize infastructure over units. Unfortunately this will both A: not work very well, and B: cause the AI to recieve a gold income boost (that is going to be overkill) unless their auto-cheats get removed.

I'm going to calibrate all the AI's bonuses carefully. They will get much more supply than the human player, and other bonuses will be adjusted according to playtesting results. The happiness bonuses will be much lower for sure, because happiness is the key to get more cities in this mod, and the AI should have a similar number of cities as the human player. Also, if I find a way to do it, on higher difficulty levels the AI units should get additional XP or promotions that make them stronger in combat.

---

Progress report: Currently I'm digging through AssignStartingPlots.lua - it's a real monster, and I already removed large parts of it, those that govern resource and natural wonder placement. My resource placement method is much simpler, and governed by XML tags, so it's easy to change the relative quantities of resources that appear on various terrain and feature types. It's purely random, so there won't be any additional resources at civ start locations or anything like that.
 
  • Can found or enhance a religion (if I figure out how to do it, I want them to add only one belief at a time, so you need more of them than 2 to create a fully developed religion)
You can do this and the function is very straightforward (something like EnhanceReligion ... look in the API thread in the SDK/Lua section). Actually, the system seems quite moddable via Lua (look in the Medieval scenario for good examples). The only odd limitation I've found about religion is that religious units you init yourself via Lua don't seem to have a religion, and so can't/won't do the base functions. That's not a problem for me because I'm Lua coding all great people actions myself anyway. It's also not a problem if you rely on the base Faith accumulation/buying system to generate these units for you.
 
You can do this and the function is very straightforward (something like EnhanceReligion ... look in the API thread in the SDK/Lua section). Actually, the system seems quite moddable via Lua (look in the Medieval scenario for good examples). The only odd limitation I've found about religion is that religious units you init yourself via Lua don't seem to have a religion, and so can't/won't do the base functions. That's not a problem for me because I'm Lua coding all great people actions myself anyway. It's also not a problem if you rely on the base Faith accumulation/buying system to generate these units for you.

You mean that I can change things that happen when clicking on "Found Religion" or "Enhance Religion" (and when these actions are available)? I'd prefer not to create new unit actions, because then I'd have to make the AI use it, which I have no idea how to do. So it's better to use the existing actions, if possible.
 
You mean that I can change things that happen when clicking on "Found Religion" or "Enhance Religion" (and when these actions are available)? I'd prefer not to create new unit actions, because then I'd have to make the AI use it, which I have no idea how to do. So it's better to use the existing actions, if possible.

There are a couple new GameEvents, which are presently mysterious to me. So I'm not sure about new triggers or if it is possible to add prereqs to beliefs. What you can do, though, is add (and I think take away but I'm not positive) beliefs through your own triggering code. So, for example, my mod has specific beliefs added when the player adopts a particular policy (using the existing adopt policy GameEvent as trigger). Or your Lua code could check for whatever conditions you want at turn start and add beliefs based on that. There are also good functions for converting population from one religion to another.
 
I don't fully understand what you're talking about, but I'll look into it when working on religion.
 
I'm going to calibrate all the AI's bonuses carefully. They will get much more supply than the human player, and other bonuses will be adjusted according to playtesting results.

You misunderstand. I am saying the computer should get -less- supply than the player. The primary reason for AI stupidity is focus on units rather than infastructure. The reason I say less and not equal (though equal might be okay if it is adequately restrictive enough), is that the computer builds units until it exceeds the strength of their neighbors. This creates a never ending cycle where they pump out units until they hit supply, which is currently near impossible.

If you can program the AI to do things intelligently then this is unecessary, but giving them extra supply is more likely to harm than to help. The AI tactical strategy in gods and king's isn't too bad. Telling them to upgrade their damn units would go a long way to improving their efficiency.
 
You misunderstand. I am saying the computer should get -less- supply than the player. The primary reason for AI stupidity is focus on units rather than infastructure. The reason I say less and not equal (though equal might be okay if it is adequately restrictive enough), is that the computer builds units until it exceeds the strength of their neighbors. This creates a never ending cycle where they pump out units until they hit supply, which is currently near impossible.

If you can program the AI to do things intelligently then this is unecessary, but giving them extra supply is more likely to harm than to help. The AI tactical strategy in gods and king's isn't too bad. Telling them to upgrade their damn units would go a long way to improving their efficiency.

Well, I think with reduced maintenance costs and construction time, the AI can have a higher unit limit than the player, without spending too much resources on army. If it has less units, then it would be too easy to win wars - perhaps the AI tactics got better, but still it's quite bad against an experienced human player.
 
Currently I'm working on buildings that are used to specialize your cities. There are 2 levels of specialization, and you can have only one level 1 building, and one level 2 building. Also I'll probably use some mechanic that doesn't allow building the same specialization buildings in all cities.

The current list of specialization buildings is as follows:

  • Warriors Guild
    • Fortress (greatly improves city defense, should be built in border cities)
    • Military Academy (extra XP for land units, except priests, mages and other magical units)
    • Naval Academy (extra XP for naval units, can only be built in coastal cities)
  • Merchants Guild
    • Bank (extra gold as a percentage, so it should be built in cities that already have high gold income)
    • Food Depot (extra food, should be built in low food cities)
    • Docks (extra production, can only be built in coastal cities*)
    • Luxury District (extra happiness, can only be built near some types of resources**)
  • Sages Guild
    • University (science)
    • Wizard's Tower (magic)
    • Cathedral (religion)
* There won't be a production specialization building available in inland cities, if you have a city in flatland areas where production is low, you can use the Workshop improvement, which works similar as in Civ4 (although I'm not sure if it will decrease food).
** As I wrote earlier in this thread, there are no "luxury resources" in this mod, in the sense of resources that directly increase happiness. Only some of the "former luxuries" allow you to build this building.

The list can be expanded if I get more ideas (if you have any, post them here :)). Of course the AI can have problems with building the right buildings in the right cities, but it has problems with almost all aspects of the game ;) Testing will show how I need to adjust the AI bonuses to offset its incompetence.
 
I don't like how the tech tree looks. There are lots of long lines everywhere, which makes it look messy and complicated...

When choosing prerequisite techs, I wanted to make them logical, unlike the base game (where Compass requires Theology, for example). But to avoid lines going up and down in the same place, I had to increase the number of columns, which caused these ugly long lines to appear. I think I should do something with it, but I'm not sure what it should be. Change the prerequisite techs, so the tech tree looks better, but the connections are less realistic and logical? Make several separate tech trees with dependencies between techs from different trees not shown, like in Community Call to Power? Or one tree with some connections invisible, like in Civ4? Keep it as it is? Any other suggestions?

The attached screenshot shows a part of the tech tree in the current version of the mod. Btw how do you like my way of doing building descriptions?
 

Attachments

  • tech tree.jpg
    tech tree.jpg
    145.9 KB · Views: 113
Building descriptions look fine to me.

I think gameplay is more important than aesthetics for designing your tech tree, but I also think that Civ5 did a good job over previous civs by having more formal tiers. It led to easier tech cost and effect balancing.

Techs in the same tier should in general have the same cost, similar power, and similar numbers of pre-requisites. Pre-requisites should IMO be driven more by gameplay reasons than by specific technological logic requirements.

For example, in your screenshot, coinage appears to be the same tier as code of laws, but also seems to have many more requirements, so getting to coinage would take a lot longer than getting to code of laws. That can be confusing and can lead to poor balance.
 
I think it does look a bit messy, because of the lines crossing like many of the Ship Building prerequisite lines do.

I have two suggestions to solve this, one harder and one easier:

1. Rework the technology screen, so that tech prerequisites more than 1 tier away show as small icons on the arrows from the tech prerequisites which are just 1 tier away.

OR

2. Just remove prerequisites more than 1 tier away when their arrows happen to cross with those that are just 1 tier away.
 
Thanks for your advice, I think I will rework the tech tree, to make it look more clear I'm going to group the techs by category (so techs about a similar area of development, like agriculture, trade, or construction, will be placed in the same row); in most cases a tech will require the previous tech in the same category, and a tech from a lower tier, which won't have the connection shown (adding Civ4-style icons is possible later). Also required techs will be listed in the tooltip. You won't see all connections as lines in the tech tree, but I think these changes will make it look better.
 
Top Bottom