It's probably worth adding as an optional feature later.
Caster of Magic II Brainstorming Megathread
|
“In particular for your example, the overfarming seems to kick in at citizen 3 and every farmer after that produces halved food. Even with your idea, it would be 3,3,1.5,1.5,1.5,1.5, and not 2,2,2,2,2,2.
Not sure if there are any similar non-linear formulas in other resources though, maybe not.” Production is conceptually linear, but it has even bigger rounding effects and that is pure rounding effect without the cutoff like in overfarming. I found new examples in COM II when the jumps are even bigger than I reported before. For example: 5, 1, 5, 1, 4, 2. So I need to keep using my farmer/worker micro like before to play optimally. Any strong AI or competitive player would benefit from doing this as well. The game design motivates and rewards micromanagement. If this ever becomes a competitive multiplayer game, this will be awkward to do every turn. “And yes, you are the only one asking. I've never, ever seen any person micromanage the game to anywhere near this level in the 6 years I spent working on it, even less tell me they spend 200 hours to win a single game due to micromanagement. Yes, people like to get 2-3 more hammers each turn. But they value their time higher than those hammers so ignore them.” I understand. >200 hours on a large map. More unit micromanagement than city. 200+ individual spearmen and magic spirits on different tiles chocking the AIs, etc. I think many other players value their time about equally as me playing MOM, COM, COM II games. These are very good games. I think there are people out there who spent more time playing these games than me. They just value their time playing more game instances and loading earlier game states if they did not get the desired outcome, etc. I value my time playing through individual games I started and I really try to win. Similar to how a competitive chess game is intended for example. I am curious, how many players won on Phantasm level of COM II 1.02 with Plane of Water, No Trading, Against the Worlds, Monsters Gone Wild, but no other displayed Score Modifiers? I just have my first such win. Partly due to my excessive micromanagement.
Like I said before, the production script is in the data folder.
If you can come up with a way to make it more linear and convenient, I'll gladly include that as the default as long as it's functionally equivalent other than having more optimal rounding. (September 21st, 2021, 11:17)Seravy Wrote: Like I said before, the production script is in the data folder. Thanks. I found the file. I worked out the math in Excel. It aggregates all % bonuses into 1 output. It does not round the farmer production output. So these are fractions. Rounding happens only once at the very last step since you said that must be int. It is beautiful. It is linear except rarely it increases by 1 more. Excel file attached with 4 actual city examples. I also attached the game file with the corresponding city examples. 1. Can this logic be implemented in your script file? Not sure about syntax for fractions in the script file and how to output them to the UI. So far it crashed for me when played with modified syntax. 2. I recommend a visual display of fractions in the game UI. I consider this a small price to pay for the major math and micromanagement improvement this can bring.
You can't output fractions. I'm not changing the UI. Stop asking for that.
You have to make each line show an integer value. The syntax is explained in Scripts.txt. Two possible ways to solve this can be : 1. Calculate the total. Calculate each line rounded down. Add 1 to the value of each line until the total is equal to the value of each line. 2. Calculate the total. Calculate the sum of each line. Display the difference in a new line labelled as "Leftovers" However, I just remembered I've set up the numbers on Omniscient in a way that the rounding gives the intended amount on each building so it shouldn't be changed. Both of these would also be confusing for the players. Not to mention if we change this, we end up getting complaints because the calculations will be inconsistent with other types of resources - we only change production, not gold, food, power or research. You have to accept there is no perfect solution to this problem. However you can still change your own script files and use the better rounding if you prefer, and possibly share here or anywhere else if you think other people would want to use it.
“You can't output fractions. I'm not changing the UI. Stop asking for that.”
I just slightly changed the UI by outputting half production for farmers in text. Please check out my solution in the attached file. I think this takes care of everything I wanted for production rounding within the boundaries of the existing project design. Nearly constant output by each worker, with rare exceptions when they produce 1 more. Constant output by each farmer. I hope other players will prefer this solution too. Of course it will need more testing to know more. “Two possible ways to solve this can be : 1. Calculate the total. Calculate each line rounded down. Add 1 to the value of each line until the total is equal to the value of each line. 2. Calculate the total. Calculate the sum of each line. Display the difference in a new line labelled as "Leftovers"” Thanks, but I chose a 3rd solution. “However, I just remembered I've set up the numbers on Omniscient in a way that the rounding gives the intended amount on each building so it shouldn't be changed. Both of these would also be confusing for the players. Not to mention if we change this, we end up getting complaints because the calculations will be inconsistent with other types of resources - we only change production, not gold, food, power or research.” First, I would like to know if my current solution conflicts with Omniscient in some way. So far it looks good. Then we go from there. “You have to accept there is no perfect solution to this problem. However you can still change your own script files and use the better rounding if you prefer, and possibly share here or anywhere else if you think other people would want to use it.” I accept that there is no perfect solution at this time. But I think I can create the optimal solution for this problem. Maybe the version I upload here now is already optimal, but if not, I will work on it more.
That doesn't list each building separately.
People will also have absolutely no idea what the "1/2 farmers" line is for, I don't, either. My guess is it forces rounding the 1/2 production from farmers up, instead of down. Except as far as I remember the game already does that by default. I'm glad that you found a solution to your problem, nothing stops you from using it. The whole purpose of modding support is to let people implement the features they want without forcing it on everyone else.
Added a poll just in case to see what people think about this but I'm expecting 90% "I don't care" votes to be honest.
https://www.realmsbeyond.net/forums/show...#pid796249
“That doesn't list each building separately.”
Yes, because this is the most accurate and most simple way I could find. Also, it would be less accurate and more confusing math to display those values. But I will be happy to create other more detailed, but less accurate version if anyone needs it. Someone needs to specifically ask me, since I don’t need it myself. “People will also have absolutely no idea what the "1/2 farmers" line is for, I don't, either.” Yes, this game is full of features that people have absolutely no idea about, until they read the manual, ask people, or play the game for a few decades. (No disrespect, you improved a lot from MoM, but these games are complex and not mainstream in anything). I can change it to “1/2 by farmers” if that helps. Takes more space though. “My guess is it forces rounding the 1/2 production from farmers up, instead of down.” It does not round either way. It only rounds down the final total at the very last step since you said that must be integer.
So my friend got involved in an endgame battle with Sss'ra because he had the Spell of Mastery and was blocking him from getting the Win button. After defeating him, he still doesn't have the Win button because someone else got the Spell of Mastery and he doesn't know who it is. Would it be possible to give a list of wizards who have the Spell of Mastery in the Familiar screen, alongside the Win percentage button?
|