Okay, I just tried this.
There is a subtlety here that makes it a little more difficult. The entire script is run before the number of HCP's is updated. So when you pick up the first one, the script runs and reports that you have zero HCPs. But this is "workaroundable."
Attach this script to the standard HCP to run at pickup (no new item required).
*code removed, see edit*
With this, when the first piece is picked up, the internal HCP/HC goes to two before it records that you have 1. At the next piece, you have two so it completes a HC. At the next piece, it thinks you have 0 so it increases the counter again (to 3). Rinse, repeat.
To have the standard 9 containers' worth of pieces, you'd need 54 HCPs. If you started at one instead of two, you'd need 45. If you wanted a (223334456) scheme, well, I don't know how you'd accomplish that. (Like I said, I'm pretty sure global variables don't save.)
EDIT:
I further refined the script, since it didn't exactly work with an initial HCP/HC of 1.
import "std.zh"
item script hcp{
void run()
{
if(Game->Generic[GEN_HEARTPIECES] ==
Game->Generic[GEN_HCPPERHC] - 1)
{
Game->Generic[GEN_HCPPERHC]++;
Game->Generic[GEN_HEARTPIECES] = -1;
Link->MaxHP += 16;
Link->HP += 16;
}
}
}
With this code, set the init data to whatever you truly want it to be at start.
Edit Again:
Verified that global variables don't save. I tried this code
import "std.zh"int repeat;
item script hcp{
void run()
{
if(Game->Generic[GEN_HEARTPIECES] ==
Game->Generic[GEN_HCPPERHC] - 1)
{
if(Game->Generic[GEN_HCPPERHC] == 2)
{
if(repeat < 1)
{
repeat++;
}
else
{
Game->Generic[GEN_HCPPERHC]++;
repeat = 0;
}
}
else if(Game->Generic[GEN_HCPPERHC] == 3)
{
if(repeat < 2)
{
repeat++;
}
else
{
Game->Generic[GEN_HCPPERHC]++;
repeat = 0;
}
}
else if(Game->Generic[GEN_HCPPERHC] == 4)
{
if(repeat < 1)
{
repeat++;
}
else
{
Game->Generic[GEN_HCPPERHC]++;
repeat = 0;
}
}
else if(Game->Generic[GEN_HCPPERHC] > 4)
{
Game->Generic[GEN_HCPPERHC]++;
repeat = 0;
}
Game->Generic[GEN_HEARTPIECES] = -1;
Link->MaxHP += 16;
Link->HP += 16;
}
}
}
which is setup to allow for (223334456) upgrading. It works if you don't save and quit. If you do, "repeat" always gets set back to zero.
HOWEVER,
I belive you could infact get around even this. You could create two new miscellaneous items, and check Link->Item[] to see if he has them. Basically, having neither is like repeat == 0, having the first is like repeat == 1, and having both is like repeat == 2.
My final answer is, yes even with all these limitations, you can in fact have a non-buggy 223334456 HCP/HC progression. Don't ask me about the subscreen. :googly: