Useable Magic Items

Any bugs found while playing or testing the engines for both PC and Android

Useable Magic Items

Postby Dorateen » Thu Nov 16, 2017 7:30 pm

I wanted to document the issues I have experienced with the creation of magic items that can be used by characters in combat.

For the example, I made a circlet of blasting that can be activated by the user to fire a mage bolt.

The first issue has to do with trying to use equipped items. In the screenshot below, the character has the circlet equipped on his head slot. But when the player clicks on the item, there is no option to use it, only the box about not being able to equip/unequip during combat. Had it been a weapon or shield item, then clicking would only go to the inventory screen to unequip or swap it, but again no option to use the item.
hearkMIa.jpg
hearkMIa.jpg (220.97 KiB) Viewed 125 times


Now, it is possible to use the item by keeping it in the party inventory. This means anyone can click on the circlet on their turn, and they will get the option to use the item. The problem here is that sometimes the character can use the item this way, and their turn does not end. Thus they can take another action, or even use the item a second time, before the character's turn ends. In the screenshot below, Greenwood has used the circlet of blasting twice in one turn.
hearkMIb.jpg
hearkMIb.jpg (268.81 KiB) Viewed 125 times


A third issue has to do with charges that can be assigned to an item's blueprint in the toolset. As shown below, the circlet of blasting has 5 charges. However, working from the inventory, the party was able to keep using the circlet in battle. Everyone on their turn could activate the mage bolt, some even twice in a turn, as noted above. I would say they easily got 10 uses out of the item, despite the property of 5 charges. It seems the only option in the toolset is to destroy an item after one use, like potions. Below is a screenshot of the circlet's blueprint in the toolset.
hearkMIc.jpg
hearkMIc.jpg (127.77 KiB) Viewed 125 times


At this time, there are some workarounds to make useable magic items. They cannot be equipped (or if they have equipped properties such as resistances, they must be unequipped and back in the party inventory in order to be used). And it would seem best to make an item one use only, being destroyed after activation, if you don't want it to be used indefinitely. It would certainly cause players to consider the right time to expend such a limited use item.

Obviously, this is not the ultimate intention. Wands, rings, staves, etc. ought to have charges to allow multiple uses before disappearing. And it would be nice to make necklaces, or really any kind of item that can be equipped by a character, and give it a useable ability as well. Hopefully this will help illustrate what needs to be functioning so we can have a variety of creative itemization.
User avatar
Dorateen
Backer
Backer
 
Posts: 798
Joined: Mon Nov 26, 2012 2:08 pm

Re: Useable Magic Items

Postby youngneil1 » Thu Nov 16, 2017 8:05 pm

That is awesome input and definetly very helpful for debugging (failing to end turn sometimes, no charges consumed) and adding additional functionality (use equipped items). I think we might also add a "useable only when equipped" property while at it.
User avatar
youngneil1
Backer
Backer
 
Posts: 4121
Joined: Sat Dec 08, 2012 7:51 am

Re: Useable Magic Items

Postby youngneil1 » Fri Nov 17, 2017 7:54 am

This bug roots deeper than I thought. I will need to do quite a few adjustments for useable items in general... it will take time, but - as always - we will get there :) .
User avatar
youngneil1
Backer
Backer
 
Posts: 4121
Joined: Sat Dec 08, 2012 7:51 am

Re: Useable Magic Items

Postby Dorateen » Fri Nov 17, 2017 1:59 pm

That sounds fine, youngneil1. One thought I had regarding the application of spells used through items: perhaps it has to do with the Spell/Effect section of the item properties. This is where I assigned the mage bolt spell tag in the onUseItemCastSpellTag. That did achieve creating the spell. But note, that potions have their own script such as itRegenSPLight.cs

And that is placed in the onUseItem field of the Scripts properties.

So if we want to design a wand, or whatever, that shoots mage bolts and consumes charges and is treated as an action for a character's turn, perhaps all this needs to be put in a separate script and attached to an item accordingly.

I do like the Spell/Effect system better and hope we can get this method to work, as it is easier to just assign the spell tags to an item's blueprint, no additional coding required.
User avatar
Dorateen
Backer
Backer
 
Posts: 798
Joined: Mon Nov 26, 2012 2:08 pm

Re: Useable Magic Items

Postby youngneil1 » Sat Nov 18, 2017 9:15 am

A good observation there. Indeed the code branches differently for spell or script on item use. I agree that we should fully integrate the spell and effect system for the items. Much of this is in already, but there are also quite some omissions so far. E.g. charges are not really used by the code at all (maybe I accidentally deleted/replaced this at some point).

Easiest way for charges is using quantity it seems. This way an item would diretcly display the number of remaining charges/quantity. A difference will be that an item without charges will still exist in inventory (but not be useable anymore), so I have to take that into account.
User avatar
youngneil1
Backer
Backer
 
Posts: 4121
Joined: Sat Dec 08, 2012 7:51 am

Re: Useable Magic Items

Postby Dorateen » Sat Nov 18, 2017 4:03 pm

I wouldn't mind if items get destroyed after using up the last charge, and disappear from the inventory. But allowing 0 charges items to remain does open up the possibilities to re-charge items. Either way is cool.
User avatar
Dorateen
Backer
Backer
 
Posts: 798
Joined: Mon Nov 26, 2012 2:08 pm

Re: Useable Magic Items

Postby youngneil1 » Mon Nov 20, 2017 9:38 am

Yes, I was thinking of a recharge script. So, certain specialists like eg the Mage's guild could offer recharging for money or favours.

I am looking into items generally right now and will sort a few properties in the editor, too. Likely I will do a separate tutorial post on item creation in order to make setting them up a bit easier (for myself later on, too).
User avatar
youngneil1
Backer
Backer
 
Posts: 4121
Joined: Sat Dec 08, 2012 7:51 am


Return to Engine Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron