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

Абониране, за да се свали
[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.