MagicPlugin icon indicating copy to clipboard operation
MagicPlugin copied to clipboard

Allow required_tags on a wand upgrade item

Open Jazzkuh opened this issue 3 years ago • 15 comments

Hello i was wondering since there is a way to upgrade the icon of a wand but is there also a way to upgrade the inactive_icon?

Jazzkuh avatar May 21 '21 17:05 Jazzkuh

I think you can simply put icon_inactive: stick{12345} on the upgrade item. It will get copied to the target wand.

The only reason there is a separate upgrade_icon property for upgrading the main icon is that icon is required to give the upgrade item itself an appearance, but you don't always wand an upgrade to replace the wand's icon.

I believe you can also do icon_inactive: "" to clear the inactive icon, but I haven't tested that myself in a while.

Hope that makes sense, please let me know if you have any trouble setting this up!

NathanWolf avatar May 21 '21 18:05 NathanWolf

Works now thank you, I also have another question i've set auto_absorb to true but it still requires me to drop it on my wand?

Jazzkuh avatar May 21 '21 18:05 Jazzkuh

That's possibly a bug, though that is a relatively new feature, is it possible you're not up to date? What does /version magic say?

NathanWolf avatar May 21 '21 18:05 NathanWolf

It says 8.5.2-401b4ee

Jazzkuh avatar May 21 '21 18:05 Jazzkuh

Thank you- apparently I was wrong though, that feature was added way back in 7.10

I'll have to try it out myself when I get a chance, could be it got broken somehow.

You're putting that right on the wand config, correct? auto_absorb: true

NathanWolf avatar May 21 '21 18:05 NathanWolf

Oh wait, reading again- you're setting that on the upgrade item, maybe? It only works on the wand itself, that tells the wand to automatically absorb any upgrades in your inventory when you hold the wand.

NathanWolf avatar May 21 '21 18:05 NathanWolf

Yes its on the upgrade item

Jazzkuh avatar May 21 '21 18:05 Jazzkuh

I've set it on the wand now and it works now, thank you! Last question is there also a way to limit upgrade items to certain wands?

Jazzkuh avatar May 21 '21 18:05 Jazzkuh

Oh great- yes, but I think the only way to do that currently is via paths. So you can set your upgrade item to a specific path and it'll only upgrade wands on that same path. This doesn't really work out so well though.

Normally I have GUIs set up that make sure you only apply specific upgrades to specific items, usually using wand tags and the required_tags Selector option. This is how the builtin progressmenu works, for instance, so it can have different icon menus for the bow versus wands versus swords.

If that doesn't work for you though I could probably add a similar tag-matching feature to the upgrade items themselves.

NathanWolf avatar May 21 '21 18:05 NathanWolf

Some sort of tag matching feature would be a nice thing to have

Jazzkuh avatar May 21 '21 18:05 Jazzkuh

Im sorry for the amount of questions but one last question popped into my head, is there a way that you can remove deleted wands from the config by automatically removing them from the inventory or something?

Jazzkuh avatar May 21 '21 18:05 Jazzkuh

Hm, good question but I don't think so.

For one, Magic generally does not scan players' inventories so anything you do would only take effect when the deleted wand is held.

Of course if you're deleted/disabled a wand then it won't work anymore in-game. But it will still appear as an item.

What I will often do in this case is create a "destroyed wand" wand item, something with an icon that has no value (maybe sulphur to represent it crumbling to dust). Then instead of deleting a wand config, I'll add migrate_to: destroyed. When held, the wand will turn to dust.

I could probably add an option so they get destroyed when held, or possibly even add inventory-scanning, but I fear both of these would be somewhat confusing to the player or lead to a lot of "my wands are disappearing" bug reports.

NathanWolf avatar May 21 '21 18:05 NathanWolf

Yea i was thinking of some sort of migration to but it doesnt allow me to change the icon to air because then it would really be destroyed

Jazzkuh avatar May 21 '21 18:05 Jazzkuh

yeah wands aren't allowed to have air icons is probably why that's not working.

But if you do need some sort of self-destruct mechanism, that could be added- but as I said, I feel like that would be very jarring to players.

NathanWolf avatar May 21 '21 18:05 NathanWolf

Yea maybe add like a message with that feature? Like "your wand has been deleted from the configs and therefore destroyed"?

Jazzkuh avatar May 21 '21 18:05 Jazzkuh