Master of Magic

Master of Magic

十分な評価がありません
[Spell] Counter Magic Fix
   
アワード
お気に入り
お気に入り
お気に入りから削除
タグ: 2017923788
ファイルサイズ
投稿日
更新日
198.149 KB
2024年2月4日 21時29分
2024年5月10日 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  [作成者] 2024年5月14日 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  [作成者] 2024年2月19日 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  [作成者] 2024年2月19日 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  [作成者] 2024年2月8日 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  [作成者] 2024年2月7日 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.