Try this :
item script LevelUpItem{
void run(int IDitem, int max, int power, int offset){
itemdata itm = Game->LoadItemData(IDitem);
int Orig = itm->OriginalTile
if(itm->Level < max){
if(Power >0)itm->Power += power;
itm->OriginalTile = Orig+offset;
itm->Level += 1;
}
else Quit();
}
}
Create an another item, put LevelUpItem in 'Pickup Script' and set
D0 : Id Sword
D1 : Max Level
D2 : If you want upgrade power, leave 0 ignore power
D3 : Change Origin Tile item by that.
Wouldn't that still leave the item in its original form on the subscreen (due to scripts not running while the subscreen is up)? I used a self-upgrading drop with multiple items for the same effect:
This should allow you to just drop the level 1 sword (or an item bundle containing it, provided it drops an item on Link, rather than just setting the Link->Item[] value to "true") and have it increase in level every time you pick it up, increasing damage is up to you, if you want to increase damage from your sword, you can use a whimsical ring set to 1/1 chance with a damage bonus of whatever you want (note, the damage bonus is in HP, which is half of what the sword's power says, so if you want to double the power of the L1 sword (power: 1), you'd use a damage bonus of 2, doubling the white sword (power: 2) would be a damage bonus of 4, etc.)
Edited by Binx, 26 April 2017 - 11:35 AM.