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

Create an account  

 
Caster of Magic II Bug Reports!

(August 21st, 2023, 11:38)Seravy Wrote:
Quote:This occurs at the start of a fresh new game (modded), on the very first turn. Attached is the Game Mods with the save files. The 1st save file is the one in question.

Confirmed. It's crashing on trying to display the spell description for a spell.
Spell 217 has 4 lines of text but the game can only display 3 lines.

I can also confirm the text is longer than the original, so it's not a bug.

Edit : I'll add a warning about this to Desc.INI in the next update.

Wow! That really solved the issue. Thank you. Now I know the descriptions in desc.ini has a character limit like twitter. Have to be mindful and more succinct   in my descriptions from this point forth.
Reply

(August 21st, 2023, 11:38)Seravy Wrote:
Quote:This occurs at the start of a fresh new game (modded), on the very first turn. Attached is the Game Mods with the save files. The 1st save file is the one in question.

Confirmed. It's crashing on trying to display the spell description for a spell.
Spell 217 has 4 lines of text but the game can only display 3 lines.

I can also confirm the text is longer than the original, so it's not a bug.

Edit : I'll add a warning about this to Desc.INI in the next update.

May I fill in more detail? Display limit in desc.ini is not limit by character count but depend on how many letter can put in that 3 lines, and each letter occupied different space size and if word is too long it will start new line and completely waste space it could not fit in before it. So limitation of 3 lines is fluid and varies. Limit letter counts would not neatly solve problem.
Reply

Hi, not sure if its a bug or am I incorrectly implementing the display coding. I managed to implement a custom ability, but while it manages to show up on the Over Land Screen, it does not show in the Combat Screen. The ability works fine though. But it would be nice to read about it while in the midst of combat if I somehow needed the information.

For Displaying the Ability, I put it in DisAbil.cas as mentioned with the following line of code.

IF (GETSTAT(U,SBattleRage,0)=1) THEN
{
        AddAbilityLine 0,242,"Battle Rage","Battle Rage";
}

The other non custom abilities are showing, so I assume I am missing a step somewhere? Also, like to ask, starting from 100, I am up to 104, but based on the Modding description, I can only go up to 119 for custom unit abilities, what happens if I go beyond 119? Will the game completely break? If so, I will make do with using custom enchantments as a pseudo way to implement a custom unit ability by using the city script to enchant an unremovable version of the latter on creation. (Super hacky, but compromises must be made.)

Out Of Topic, I intend to use this as a custom racial ability for the Orcs Race. Giving them a Battle Rage mechanic seems to be fitting in from a general fantasy lore perspective. Still need to tweak the numbers a bit here and there depending on unit type.


Images below.

OL Battle Rage
https://drive.google.com/file/d/110oI-vW...sp=sharing
https://drive.google.com/file/d/11y9nAcS...sp=sharing

Combat Battle Rage not showing
https://drive.google.com/file/d/1YycobH4...sp=sharing

Mod File is attached below with the save games
https://drive.google.com/file/d/1alO3-p-...sp=sharing
Reply

I have tried giving spelllock enchantment through item on hero but it seem to not prevent other unit enchantment on hero from being dispelled while spell lock still intact. It is a bug or I misunderstand how spell lock works?
Reply

Quote:Also, like to ask, starting from 100, I am up to 104, but based on the Modding description, I can only go up to 119 for custom unit abilities, what happens if I go beyond 119? Will the game completely break?

They are stored in an array of 20 so going beyond will either crash or do nothing, not sure which.
In worst case it might even overwrite whatever unit data is stored behind that array.

Quote:Hi, not sure if its a bug or am I incorrectly implementing the display coding. I managed to implement a custom ability, but while it manages to show up on the Over Land Screen, it does not show in the Combat Screen. The ability works fine though. But it would be nice to read about it while in the midst of combat if I somehow needed the information.

There doesn't seem to be anything in the script that makes it specific to combat/overland. I'll try to debug it tomorrow.

Quote:I have tried giving spelllock enchantment through item on hero but it seem to not prevent other unit enchantment on hero from being dispelled while spell lock still intact. It is a bug or I misunderstand how spell lock works?

Spell Lock triggers on the overland version of the base unit flag. Other versions have no effect, as it wasn't possible to cast other versions of the spell without modding. I'll change it to trigger based on the normal enchantment flag for the next update.
Reply

(August 23rd, 2023, 17:16)Seravy Wrote:
Quote:I have tried giving spelllock enchantment through item on hero but it seem to not prevent other unit enchantment on hero from being dispelled while spell lock still intact. It is a bug or I misunderstand how spell lock works?

Spell Lock triggers on the overland version of the base unit flag. Other versions have no effect, as it wasn't possible to cast other versions of the spell without modding. I'll change it to trigger based on the normal enchantment flag for the next update.

Thank you. It is working now as I do what you said.
Reply

Hi, need to report another CTD. When I enter any lair with God Mode enabled, I click Auto then choose, "Fight No Spell" Options. I get an immediate Crash to Desktop with no warnings. Refer to the Screenshot below.
https://drive.google.com/file/d/1CrW10nc...sp=sharing

Surprisingly, if I just fight with God mode on, but do it manually, everything works out as planned.

I attached the mod and save file for reference.
https://drive.google.com/file/d/1qomVXKS...sp=sharing
Reply

It's a division by zero on the hero's spell ability.
I also get a crash when trying to look at the hero.
It probably has an invalid spellability set.
The spell ID was 273 but the last spell is 272.
Reply

(August 24th, 2023, 04:36)Seravy Wrote: It's a division by zero on the hero's spell ability.
I also get a crash when trying to look at the hero.
It probably has an invalid spellability set.
The spell ID was 273 but the last spell is 272.

I found out why! The spell Description issue wasn't the problem, but thanks for the reminder nevertheless. 

The main problem was I set spells 272 and 273 to zero mana cost. Turns out, I need to set all combat spells to at least 1 mana for the AI to function correctly! That being said, the 2 culprits had such a low casting cost that the computer was trying to spam them preemptively early on. 

That while not a problem kind of bugs them out the AI. This is because 272 and 273 tries to replenish MP and Ranged Attack shots to the unit at their end of the combat turn. They attempt to spam them all even though they had not used their Mana/Ranged attacks yet.

Look like I will need to take a look at how the AI handles restoration spells. *Shudders with no confidence.  shakehead
Reply

Quote:Look like I will need to take a look at how the AI handles restoration spells. *Shudders with no confidence.

It doesn't, that's not a spell group. The existing healing spells all have hardcoded AI and use the "other spells" spell group.
So the priority will be based on whichever spell group you used out of those that are supported for modding. In general this will be the CustomPriority value from Spells.INI plus any modifiers that generally apply to that spell type.

Unfortunately for anything more detailed, spell priority scripts would be necessary but that feature doesn't exist in the current version.
Reply



Forum Jump: