Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Change Max Money/mana

Seeing this report:
I like Serena Wrote:I can see what happened with the tweaker:
Tlaloc's mana jumped to -32768 exactly, after which he did not do anything anymore.
With the tweaker I set his mana back to 30000, after which he recoved and was not defeated but only banished!
Now to find why his mana jumped to that particular figure...

Edit3: For reference, I've tried it with vanilla.
Turns out that Tlaloc does not cast any spells, so that has certainly improved in Insecticide.
At the end he still has 30000 mana, so the bug does not manifest (at least not in this way).
And he is only banished.

I wonder: can we mod the maximum amount of mana/money a Wizard can store?
Can it be different for each mage or for AI/us?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply

FrancoK Wrote:Seeing this report:

Hehe


Quote:I wonder: can we mod the maximum amount of mana/money a Wizard can store?
Can it be different for each mage or for AI/us?

The maximum is set at a number of places in the code and is in each case generic for all wizards.

Easiest would be to change the cap that is applied when we get to a new turn.

wizards.exe:95a14 - 30000 - tests if you have passed the mana cap
wizards.exe:95a25 - 30000 - applies the mana cap if applicable.

wizards.exe:959f4 - 30000 - tests if you have passed the money cap
wizards.exe:95a05 - 30000 - applies the money cap if applicable.
--I like ILSe
Reply

Thank you. thumbsup

So, if in my mod I limit the mana to 15000, the bug "you cannot cast spell" in my tower will not happen, right? smile
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply

FrancoK Wrote:Thank you. thumbsup

So, if in my mod I limit the mana to 15000, the bug "you cannot cast spell" in my tower will not happen, right? smile

I assume you mean the bug "enemy cannot cast spell in his fortress"?

Just to make sure, I've tested it just now.
And.... it works like a charm!
At least now Tlaloc defends himself normally, making it much more interesting. jive
--I like ILSe
Reply

I like Serena Wrote:I assume you mean the bug "enemy cannot cast spell in his fortress"?
In effect I mean "every wizard has problems with more than 16383 in his fortress". wink

Tlaloc had problem not being able to cast Spell of return (and so being eliminated by the game) because he had too many mana, I have a problem in my fortress: if another wizard attacks me, I'm unable to cast any spell.

Did not test this rigorously, but with less than 15000 mana I have no problem, with more than 18000 mana I cannot cast spell and have to rely on heroes/normal units.
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it. rolleye
Reply

I like Serena Wrote:I assume you mean the bug "enemy cannot cast spell in his fortress"?

Just to make sure, I've tested it just now.
And.... it works like a charm!
Changing the mana processing to an unsigned would also do that, but might be more work or might allow underflow abuses. In any case, I can't see any negatives to reducing max mana, it means you don't get quite as much mana when you raze an enemy fortress, but that's not necessarily a flaw.
Reply



Forum Jump: