Master of Magic
Недостатньо оцінок
[Spell] Counter Magic Fix
   
Нагородити
До улюбленого
В улюблених
Прибрати
Позначки: 2017923788
Розмір файлу
Додано
Оновлено
198.149 KB
4 лют. 2024 о 21:29
10 трав. 2024 о 7:02

Підпишіться, аби завантажити
[Spell] Counter Magic Fix

Опис
This is an experimental fix to the reported issues with Counter Magic / Dispel Magic:

1. Not using the Mana from the Slider Popup Dialog Box.
2. Not using the correct Casting Cost to include mana spent.
3. Exaggerating the Casting Cost of Spells by unfairly applying range-based adjustments to only 1 side (and not both).
4. Counter-Magic now has a mana pool that can be exhausted, per original MoM.

This Mod disables ranged-based adjustments to the Casting Costs used in the following formula:

Chance of Dispelling = Casting Cost of Dispel / (Casting Cost of Target + Casting Cost of Dispel)

Additional messages will be logged to the Player.log and GameLog.txt files, located: DRIVE:\Users\USER\AppData\LocalLow\MuHa Games\MoM\

If you feel the logging is too verbose, it can be disabled as follows:

Set the 'bLoggingEnabled' variable to 'false' in the following script files:
- EnchantmentScripts_CMF.cs
- GameScripts_CMF.cs
- SpellScripts_CMF.cs

Disclaimer: While this Mod greatly helps to address some of the shortcomings, it is not perfect and up to my standards. There remain edge cases I have been unable to work around, such as Fleeing combat does not clear the Counter Magic pools correctly until you restart the game.

This is due to the state they left MoM in with much of the Modding engine undocumented and partially unfinished.


Коментарів: 5
Dorian Gray  [автор] 14 трав. 2024 о 19:59 
FYI - Based on the uploaded screen shot, I believe there may be an ordering issue in the combat log where I may be logging changes to the Counter Magic Pool before MOM logs the Counter Magic results.

Will be looking if I can delay the logging.
Dorian Gray  [автор] 19 лют. 2024 о 15:28 
A temp work around is to save and reload the game - which forces a reset of the pools.

This is only an issue if you flee from combat.
Dorian Gray  [автор] 19 лют. 2024 о 15:27 
FYI - Encountered another bug where the CM Pool is not getting cleared when you flee from Battle. This is due to the Game not calling the EndBattleEffect callback when you flee. I have submitted an F8 regarding it.

So, basically it means that the next battle will not begin with CM Pools set to 0, but will continue with what both sides had from last battle. (annoying, I know...)
Dorian Gray  [автор] 8 лют. 2024 о 10:34 
FYI - I am working on using a mana pool for Counter Magic, like the original. but still have more work to do on it. I did update some of the logging and fixed the issue I discovered as disclosed, below.

The scripting APIs are currently undocumented. Which means trying to utilize the variables being passed from the core game requires a lot of "trial & error" as some could be null or lack meaningful values.

Part of the reason for the excessive logging was to help discover this and then adjust as needed.
Dorian Gray  [автор] 7 лют. 2024 о 16:34 
FYI - I have encountered some minor issues with the logging. For example "AI" being listed when it was not an "AI" event. This is being looked at, but is only cosmetic and does not impact the other functionality.