Is it possible to use a custom item to give the player the 1/2 Magic Upgrade?
Printable View
Is it possible to use a custom item to give the player the 1/2 Magic Upgrade?
Yes
Care to expand on that a little bit? ._.
Give it a script which alters 'Game->Generic[GEN_MAGICDRAINRATE]' I think.
Not that I've ever done it, but that looks like it should work to me.
Necroposting but... I wanted to tackle this one myself as I'm actually wanting to use this idea in my own quest. So let me know if this is correct.
Code:import "std.zh"
item script BookofMidora
{
void run ()
{
Game->Generic[GEN_MAGICDRAINRATE] = 0.5
}
}
Close, you made a mistake with Game->Generic[] it's an integer not a float.
Here's how it works to give you an idea.
Code:const int GEN_MAGICDRAINRATE = 1; // Link's magic usage equals n / 2.
So by that logic, a value of 2 is normal usage but a value of 1 is half? And I would use "const int" as the declaration rather than just game->generic or was that part okay? Sorry for the stupid questions, just starting to get into this stuff.
Game->Generic[GEN_MAGICDRAINRATE ]
const int GEN_MAGICDRAINRATE is already declared and found in std.zh
Ah! That makes sense. Probably need to glance over std.zh and see what all is in there so I can avoid looking like a total n00b in the future, lol.
Hmmm. Has someone tested fraction with that? Is it confirmed to be truncated?