Master of Magic

Master of Magic

평점이 부족합니다.
[Spell] Counter Magic Fix
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
태그: 2017923788
파일 크기
게시일
업데이트일
198.149 KB
2024년 2월 4일 오후 9시 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일 오후 7시 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일 오후 3시 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일 오후 3시 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일 오후 4시 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.