Posts: 131
Threads: 3
Joined: Apr 2014
(December 30th, 2016, 14:07)Seravy Wrote: (December 30th, 2016, 13:52)GermanJoey Wrote: I too would love a multi-city start... or at least a multi-settler start.
Another thing that would be cool would be an option to start a wizard with random book/retort picks, in the same vein as how the AIs make their picks.
There is an external random wizard generator included, though it doesn't use the same method as the AI. Hadriex used it for the last video but got some very...unusual, or maybe we can even say unfortunate result : https://www.youtube.com/watch?v=3YGfOT1rS2A
I hope he gets something more playable next game.
I was starting to look at writing a random game generator for CoM but I see you've already done it, which is great. I'd be interested in knowing more about the algorithm you're using to generate random games. In particular, will your algorithm generate retorts such as Archmage or Mana Focusing (which require a certain number of spellbooks before they become pickable) less often than other retorts which have no spellbook requirements? Or did you add some mechanism to deal with that? When I wrote my random game generator for MoM (see the link in my signature), I designed it so all retorts would be generated with about equal frequency, so I'm curious if you'd taken the same approach.
Posts: 10,463
Threads: 394
Joined: Aug 2015
(January 3rd, 2017, 18:03)thrawn Wrote: A suggestion for rushing production - instead of buying 100% of the hammers now and then overflowing the current turn's production to the next project, how about purchasing just the extra hammers you need?
For example: a town has 12 production per turn and 34 accumulated hammers. I want to buy a marketplace (90). Currently I'd need to spend (90-34)*2=112 gold. Otherwise I'd need only (90-34-12)*2 = 88 gold.
At the start of a game I often find myself in a situation where I'm just a bit short and am looking for a slightly smaller project I can purchase and then switch so I can complete it on the next turn. In the above example if I have 100 gold I won't be able to buy the marketplace directly but would be able to buy a granary if it's not yet built, switch and complete the marketplace.
I considered that a long time ago but decided against it - if the production output of the city changes by any small amount after buying, the building won't get completed and it's easy for that to happen by accident. Ultimately it's always the player's fault (raised taxes, more farmers, moving out units, moving fortress, cancelling enchantments) but it is far more annoying to pay for something and not get it than to spend a bit of extra gold, and this situation would come up many times each game, as cities are prompted before players can do any of the other stuff that affects it. Ultimately this would act as a trap for the player to encourage misplays, and that's not a good thing to have in a game of this type. It's complex enough as is.
(January 3rd, 2017, 18:11)Tlaloc Wrote: I was starting to look at writing a random game generator for CoM but I see you've already done it, which is great. I'd be interested in knowing more about the algorithm you're using to generate random games. In particular, will your algorithm generate retorts such as Archmage or Mana Focusing (which require a certain number of spellbooks before they become pickable) less often than other retorts which have no spellbook requirements? Or did you add some mechanism to deal with that? When I wrote my random game generator for MoM (see the link in my signature), I designed it so all retorts would be generated with about equal frequency, so I'm curious if you'd taken the same approach.
The source code should be included - generate.pas.
There isn't anything special for that but there aren't all that many retorts left that still require anything extra.
Which reminds me, I have to remove the required 2 realms from Sage Master in the generator, it's been removed a while ago in the game. And that leaves only Archmage and Mana Focusing to still require books.
Which actually leaves the question : Do we even need that restriction? I guess a 3 book wizard is kinda weakish to be called an Archmage but it's not contributing much to gameplay, is it?
January 3rd, 2017, 19:27
(This post was last modified: January 3rd, 2017, 19:29 by Seravy.)
Posts: 10,463
Threads: 394
Joined: Aug 2015
(January 3rd, 2017, 19:08)thrawn Wrote: (January 3rd, 2017, 18:42)Seravy Wrote: I considered that a long time ago but decided against it - if the production output of the city changes by any small amount after buying, the building won't get completed and it's easy for that to happen by accident. Ultimately it's always the player's fault (raised taxes, more farmers, moving out units, moving fortress, cancelling enchantments) but it is far more annoying to pay for something and not get it than to spend a bit of extra gold, and this situation would come up many times each game, as cities are prompted before players can do any of the other stuff that affects it. Ultimately this would act as a trap for the player to encourage misplays, and that's not a good thing to have in a game of this type. It's complex enough as is.
You are right, it can lead to problems. How about something in the middle then - you are always allowed to "buy" even if you don't have enough money to complete the project, in that case you'd buy as many hammers as you can afford and remain with 0 or 1 gp.
The player does not know exactly how many hammers are remaining from completion, as it is displayed in increments of 10. The greater problem, having the player calculate (missing production-hammers produced)*2 every time to know if they get it done if they buy would probably result in the least user friendly game I have ever played, especially because the gold the player has is not even displayed on the city screen and production is represented by dozens of tiny icons instead of a number. I think this would be even worse than the other one.
January 3rd, 2017, 19:42
(This post was last modified: January 3rd, 2017, 21:15 by Tlaloc.)
Posts: 131
Threads: 3
Joined: Apr 2014
(January 3rd, 2017, 18:42)Seravy Wrote: (January 3rd, 2017, 18:11)Tlaloc Wrote: I was starting to look at writing a random game generator for CoM but I see you've already done it, which is great. I'd be interested in knowing more about the algorithm you're using to generate random games. In particular, will your algorithm generate retorts such as Archmage or Mana Focusing (which require a certain number of spellbooks before they become pickable) less often than other retorts which have no spellbook requirements? Or did you add some mechanism to deal with that? When I wrote my random game generator for MoM (see the link in my signature), I designed it so all retorts would be generated with about equal frequency, so I'm curious if you'd taken the same approach.
The source code should be included - generate.pas.
There isn't anything special for that but there aren't all that many retorts left that still require anything extra.
Which reminds me, I have to remove the required 2 realms from Sage Master in the generator, it's been removed a while ago in the game. And that leaves only Archmage and Mana Focusing to still require books.
Which actually leaves the question : Do we even need that restriction? I guess a 3 book wizard is kinda weakish to be called an Archmage but it's not contributing much to gameplay, is it?
Ah yes, thanks for mentioning generate.pas - I'll have a look.
It looks like Simtex originally designed Archmage and Mana Focusing to require books more for game flavor (RPG) purposes rather than gameplay (balance) purposes. It does feel a bit weird to be playing an Archmage wizard with hardly any books, or a Mana Focusing wizard that is not really focused in any school of magic. From a balance perspective, I can understand having book requirements for Archmage and Mana Focusing if they were stronger than the other 1-pick retorts, but they aren't. (In fact Mana Focusing is probably one of the weaker picks). From a gameplay perspective I don't think you need the book requirements for those two, so it comes to down to how much you value the original RPG flavor of those two retorts. Certainly the easiest way to equalize the retort distribution of the random game generator would be to drop the book requirements for those two. However even then the retort distribution would not be perfectly equal since the 2-pick retorts would still be picked somewhat less often than the 1-pick ones.
Posts: 4
Threads: 0
Joined: Mar 2015
DOS games are nice and easy to emulate on Android, and turn based strategy works well on tablets, so whenever I travel I end up playing HoMM2 or Mom. It's always nice to come back and see that there's still progress being made on this mod.
Posts: 5,648
Threads: 30
Joined: Mar 2014
Archmage is definitely not one of the weaker retorts, but maybe one of the strongest. But, I don't know if it would be really that amazing with just a few books in total, and it would certain help multi-realm stuff (like 3/3 or 3/3/3).
Mana Focusing, OTOH, is more average, and my experience with multi-realm games so far seems to be that they feel far more desperate for mana, as compared to SP or RP, than my single-realm games. So that one might be a good one to remove the restriction from.
Posts: 10,463
Threads: 394
Joined: Aug 2015
(January 4th, 2017, 04:19)thrawn Wrote: (January 3rd, 2017, 19:27)Seravy Wrote: The player does not know exactly how many hammers are remaining from completion, as it is displayed in increments of 10. The greater problem, having the player calculate (missing production-hammers produced)*2 every time to know if they get it done if they buy would probably result in the least user friendly game I have ever played, especially because the gold the player has is not even displayed on the city screen and production is represented by dozens of tiny icons instead of a number. I think this would be even worse than the other one.
Do you believe the feature itself is worthwhile if there is a good UI for it?
The feature is most likely good but the UI is not possible to do, and even if it was, this is the kind of thing you either have from the start or don't have at all, it's too confusing to change in a game people already played and got used to one way. Also even if the player can tell if the production gets completed or not, the first problem (lowering production causing the building to not complete) can still happen, just becomes significantly less frequent.
I think the best solution here would be a BUY system that applies the effect at end of turn (at which point production cannot change anymore), but that's also confusing to players in an entirely different way : the gold doesn't get spent until you finish your turn so you might try to spend it on buying more things than you can afford - even worse the enemy might steal it if you lose battles!
I believe the currently existing solution is good because it's easy to understand and simple.
Posts: 17
Threads: 0
Joined: Sep 2016
(January 4th, 2017, 06:21)Seravy Wrote: I believe the currently existing solution is good because it's easy to understand and simple.
I agree. The current way works fine.
Seravy, how much control do you have over how the AI groups units into stacks? I note that the AI seems to attack with less than full stacks sometimes, and that's too bad, because at the same time it has individual units wandering around a lot which would make full stacks much stronger. Full stacks are much stronger than the sum of their parts, with the combat AI able to use them synergistically in various interesting ways. Do you know of any way to encourage the AI to build and send full stacks by default, rather than smaller units?
Thanks for all your work on this - it's amazing how much better this is than the original!
Posts: 10,463
Threads: 394
Joined: Aug 2015
(January 4th, 2017, 14:51)sayke Wrote: (January 4th, 2017, 06:21)Seravy Wrote: I believe the currently existing solution is good because it's easy to understand and simple.
I agree. The current way works fine.
Seravy, how much control do you have over how the AI groups units into stacks? I note that the AI seems to attack with less than full stacks sometimes, and that's too bad, because at the same time it has individual units wandering around a lot which would make full stacks much stronger. Full stacks are much stronger than the sum of their parts, with the combat AI able to use them synergistically in various interesting ways. Do you know of any way to encourage the AI to build and send full stacks by default, rather than smaller units?
Not much control, but I have a little.
This is how stackbuilding works :
On each continent the AI selects a rally point. Each turn, it makes a list of units that are available* and sends the X most powerful on that list towards the rally point, where X is the empty space there. This is the only mechanism the AI uses for intentionally building stacks. However it also builds them by accident in two cases : If a city keeps producing units that are not used, they will stay where they are, and as the city keeps producing more, the stack grows. This is a very effective way to have many large stacks form during peace. The second, if multiple stacks attack the same target, and the attack is successful on the first try, the remaining units will still move there if able, merging all the units together (original AI wasn't able to do this, I had to enable multi-attacks on nearby targets).
There is such a thing as "ideal stack size" but it's pretty much always 9 except in the very early game.
However, the size of the stack unfortunately does not depend on that. That is the maximal amount but stacks can be used for attacks even if they aren't full, and the rally point is not an exception. This is a good thing, otherwise the AI might wait forever for that Hydra from the end of the world to arrive when the stack already has 8 great drakes.
Which means, the stack will be as big as needed before the AI is allowed to use it for an attack.
Currently, this means the AI stack has to be at least 0.75x as powerful as the target, but this is changed to 1.5 if the AI stack contains any heroes.
Altering this number is possible but it has a global effect. If it's too low, the AI will be aggressive and make attacks that are pointless and waste units. If it's too high, the AI will miss opportunities and will be too easy to scare away from attacking the player, and will have a hard time taking advantage of their combat spells to win battles using inferior forces.
The AI always sends the stack containing the oldest unit towards the first valid target, the second to the next etc. If the stack being formed contains an old unit, a single enemy spearmen is enough to make that stack go and attack the spearmen, no matter how many units are gathered - however in this case 9 other units will start moving towards the rally point, and they'll most likely be newer and not affected easily : the previous stack sent out and various other leftover units will react first to any further weak threats. This way the AI maintains constant pressure on the enemy while still producing maximal size stacks often enough.
*I can alter the procedure that decides what unit counts as "available".
January 4th, 2017, 16:13
(This post was last modified: January 4th, 2017, 16:18 by Seravy.)
Posts: 10,463
Threads: 394
Joined: Aug 2015
I ran a test on generate.pas, which collected the data of 10000 random wizards.
Archmage and Mana Focusing has ~3.5% chance to appear. Other single pick retorts are ~9.5%, double pick retorts are ~9%. The effect on Archmage and Mana Focusing is far greater than expected!
Also calculated the chance for the highest number of books the player has in a realm :
0 books : never rolled
1 books : ~0.1%
2 books : 2.64%
3 books : 8%
4 books :15%
5 books : 18%
6 books : 18.5%
7 books : 14.5%
8 books : 10.4%
9 books : 6%
10 books : 6%
I think this is a reasonable distribution.
Chance to have books from
1 realm : 6%
2 realms : 37%
3 realms : 38%
4 realms : 16%
5 realms : 2%
however, chance to have at least 3 books from
no realms : 3%
1 realm : 40%
2 realms : 48%
3 realms : 8%
4 realms : 0.04%
I think these are also acceptable numbers.
Number of retorts generates :
0 retorts : 45%
1 retort : 12%
2 retorts : 12%
3 retorts : 11%
4 retorts : 8%
5 retorts : 5%
6 retorts : 4.5%
The chance of 5-6 retorts might be too high?
As we now know the chance of those two retorts being about one third of the normal, we can triple their chance to prevent this effect. Tests made with a tripling effect generates them at around 7.5%, still lower than normal but not significantly. I think removing the restriction from the game is a better solution though. Archmage+Mana Focusing with 2 books in each realm might actually be a pretty fun and playable wizard for early game strategies.
|