As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
Caster of Magic Release thread : latest version 6.06!

(May 17th, 2020, 03:12)Seravy Wrote: You mean a random game generator?
There is one included but it's not integrated into the game, you run it from DOS, it tells you the random settings and you select them manually.
Of course you can share yours! Whether I want to include it or not I can only say after seeing it though.

New Random game generation algorithm for Caster of Magic 6.01 (2020 May 16):
 
Begin
 
Choose your own Difficulty. If you won your last game play at same level or 1 level higher. If you lost last game play at same level or 1 level lower. [Revolting Raiders counts as +1 level difficulty, Monsters Gone Wild counts as +1 level difficulty]. So there are a total of 9 levels of difficulty now.

Generate random integer from 1 to 10. If rolled >3 choose 4 opponents. Else choose rolled number of opponents.
 
Generate random integer from 1 to 5. Choose Land Size accordingly. (1=tiny)
 
Generate random integer from 1 to 5. Choose Power accordingly. (1=min)
 
Generate random integer from 1 to 3. Choose Minerals accordingly. (1=poor)
 
Generate random integer from 1 to 3. Choose Climate accordingly. (1=dry)
 
Generate random integer from 1 to 14, which determines Wizard picture. (1=Merlin, 2=Raven)
 
Generate random integer from 1 to 5
If 1, choose Plan A
If 2, choose Custom then Wizard picture then go to Plan B
If 3, choose Custom then Wizard picture then go to Plan C
If 4, choose Custom then Wizard picture then go to Plan D
If 5, choose Custom then Wizard picture then go to Plan E
 
Plan A [given Wizard]:
  Select Wizard that corresponds to Wizard picture. 
  Go to Select Race.
 
Plan B [throwing darts at the board blindfolded]:
  Count number of skills still available [initially 18. 1=Alchemy, 2=Warlord,…]
  Count number of empty book slots still available [initially 50]
  Generate random integer from 1 to max total [available skills + available book slots]. [initially it is 68].
  Pick that individual skill or 1 book [initially 10/68 probability to choose a single life book]
  If there are 0 picks to spend go to Select Spells
  If you were in Plan E before go to Plan E
  Go to Plan B
 
Plan C [Book favor]:
  Generate random integer from 1 to 2
  If 1 then go to Roll a Skill
  If 2 then go to Roll Books
 
  Roll a Skill:
    Generate random integer from 1 to # of skills not already check marked [initially 18]. Each skill has equal chance of being selected. Select the skill that was given by random integer
    If there are 0 picks to spend go to Select Spells
    If you were in Plan E before go to Plan E
    Go to Plan C
 
  Roll Books:
    Generate random integer from 1 to number of book colors that still has empty book slot [initially 5]. This determines what color of books you will choose next. Generate random integer from 1 to LesserOf(number of empty books slots available to be chosen in that color, number of picks available to spend). Select # of books in color given by the integer. 
    If there are 0 picks to spend go to Select Spells
    If you were in Plan E before go to Plan E
    Go to Plan C
 
Plan D [Skill favor]:
  Generate random integer from 1 to NumberOf(unchecked skills + available number of book colors) [initially 23, 1-18 corresponds to individual skills, 19- 23 to individual books in each of the 5 colors]. A random integer represents a skill or a single book in one color.
  If there are 0 picks to spend go to Select Spells
  If you were in Plan E before go to Plan E
  Go to Plan D
 
Plan E: 
  Generate random number from 1 to 3. 
  If 1 go to Plan B
  If 2 go to Plan C
  If 3 go to Plan D
 
Select Spells
  Uncheck all spells.
  Repeat:
    Generate random integer from 1 to # of unchecked spells at Common Spell level [first time: 1 to 10]. Select spell that corresponds to random integer [first column is 1 to 5].
  End Repeat
  Do same for Uncommon Spells
  Do same for Rare Spells 

Select Race:
  If Myrran then generate random integer from 1 to 4. 
  If 1 go to Arcanus race. 
  If >1 go to Myrran race.
 
Arcanus Race:
  Generate random integer from 1 to 9. Select Arcanus race that corresponds to the integer.
 
Myrran Race:
  Generate random integer from 1 to 5. Select Myrran race that corresponds to the integer.
 
Select Color:
  Generate random integer from 1 to 5. Select color that corresponds to random integer.
 
End
 
It’s not perfect, but pretty close to be considered fully random. If there is a demand, I could improve it further, but this worked pretty well for myself. I can do a probability analysis on it, which I have not done yet.
======
How can I access your Random Game generator? Also, what is its pseudocode?
Reply

Quote:How can I access your Random Game generator? Also, what is its pseudocode?

It's generate.exe and generate.pas for source code, both files already included in CoM.
Reply

6.01 More bugs, feature requests, and suggestions:

Resist Elements spell is confusing. +4 resistance to magic of nature and improved +4 against all spells. Sounds like +8 vs nature spells and +4 vs other spells.

AI successfully cast Confusion on my unit that had Resist Elements then cast Dispel Magic on it. (poor AI decision)

Forester skill not applied in battle. High elf unit was not able to pass through tree with 1 movement point.

Not clear what Foresters Guild and Miners Guild bonuses apply to. Exactly what counts as production?

How does rounding in city output work? Is rounding applied per city?

How does road/river/ocean gold income get calculated?

I have 11 books. My fortress produces 21 power, but formula gives 19.5.

Wave of Despair explanation and formula are not clear

Text for Confusion spell are different in research and combat. Effects should be explained in Research too.

There were a lot of ambiguous and incomplete text for spells. Also inconsistencies. I recommend language editing for accuracy and usability. Some of these are old from MoM, some are new from CoM.

When high elf city grows in size it increased overall mana production. Food production prediction for next turn was updated, but mana production prediction was not updated. It displayed it wrong but executed it correctly for next turn.
Reply

Quote:+4 resistance to magic of nature and improved +4 against all spells. Sounds like +8 vs nature spells and +4 vs other spells.

It's 4 resistance vs Nature and 4 Defense against everything. Is the word "defense" missing from somewhere?

Quote:Forester skill not applied in battle. High elf unit was not able to pass through tree with 1 movement point.
This is unfixable, same for mountaineer.

Quote:Not clear what Foresters Guild and Miners Guild bonuses apply to. Exactly what counts as production?
Production = the hammer icons.

Quote:How does rounding in city output work? Is rounding applied per city?
No, the game uses only integer variables so rounding down is done on every calculation step.

Quote:How does road/river/ocean gold income get calculated?
https://masterofmagic.fandom.com/wiki/Ro...Ocean_Gold
Reply

Hi. I'm new to the forums.
Old to MoM!

Is this the right thread to report bugs in the latest CoM version?
Because almost all I see everywhere is a discussion about gameplay mechanics...
Reply

Yes, you can report bugs here, or you can make a new thread, whichever you prefer.
Reply

Ok, there's always that one independent city, at least on the world of Mirror, which is located like 2 or 3 fields above the bottom pole which seems to remain permanently below the City spell range. At least I was never able to bring the screen low enough to cast a spell on the city. Something is blocking it... . So there seems to be a dead zone on the map not accessible for City or Unit Spells.
Reply

Can I have a save file for that? I have never seen that happen.
Reply

“It's 4 resistance vs Nature and 4 Defense against everything. Is the word "defense" missing from somewhere?”
In the current CoM version I can’t find case where word “defense” is missing. But a confusion I still have after 26 years of playing MoM is how certain spells work/fail on opponent targets. For example Nature spell Ice Bolt in current CoM is stated to be 35 strength magical cold attack. Resist Elements gives +4 defense against spells. I interpret this to work against Ice Bolt, since it is a spell. Resist Elements also stated +4 resistance against nature magic. I interpret this to work against Ice Bolt, since it is nature magic. 4+4=8. Alternatively, Ice Bolt hits Defense (Shields) or Resistance (crosses), but not both. But which one does it hit and why? Most importantly, how would other players know? I imagine I am not the only one who is confused. (Note that I am also a game designer and game developer, so I am looking at this from Usability and Human Factors point of view.)

“This is unfixable, same for mountaineer.”
Sorry to hear. Pathfinding works fine though. Berserkers had no problem climbing hill in battle. Nagas have no problem swimming on river in battle.

“Production = the hammer icons.” 
Confusing. For example my city displays:
10 hammer icons for Workers
2 for Farmers
5 for terrain
6 for Sawmill
2 for Forester’s Guild
5 for Miner’s Guild
2 for Stables
5 for Omniscent
2 for Smithy
Forester’ Guild text says increasing production by 10%. I could guess that it is only applied to hammers from Workers, Farmers, and terrain, which is 17. 10% is 1.7 which is rounded up (and not down as you say below) to 2. Is this it?

“No, the game uses only integer variables so rounding down is done on every calculation step.”
OK. This may explain the Fortress overproducing mana. But in that instance, it is rounding 0.5 mana up to 1 for each magic realm. Not down. 0.5+0.5+0.5=3
Reply

Quote:Alternatively, Ice Bolt hits Defense (Shields) or Resistance (crosses), but not both.

Everything in the game hits Defense, unless it specifically states it uses resistance, either by using the wording "save at -X or" or "resist at -X or", or otherwise specifies resistance (like Wave of Despair).

It clearly says so on the description of the resistance stat. (right click it)

Quote:Forester’ Guild text says increasing production by 10%. I could guess that it is only applied to hammers from Workers, Farmers, and terrain, which is 17. 10% is 1.7 which is rounded up (and not down as you say below) to 2. Is this it?

Almost. The 10% applies to all amounts not the result of another percentage bonus.
So you get an extra 10% on the sum of Workers, Farmers, Stables, Sawmill, Smithy - all of these generate a fixed amount of production.

Basically, your total production = (sum of production generated) * (100+Total percentage bonus from all sources)%.

Gold works exactly the same. There is no percentage bonus for the other resources.

Quote:OK. This may explain the Fortress overproducing mana. But in that instance, it is rounding 0.5 mana up to 1 for each magic realm. Not down. 0.5+0.5+0.5=3
I suspect the difference comes from the "double that for books after the Xth" I think it was book 9?
Maybe it starts a book earlier than expected or maybe it uses >= instead of > for that number.
It makes little difference ever since Magic Market was added to the game.
Reply



Forum Jump: