#How to disable item use

32 messages · Page 1 of 1 (latest)

earnest iris
#

Heyo. For P3R, I've been trying to figure out how to disable items in battle and in menus. So far I've sleuthed through the following uassets, but no luck.

DatSkillNormalDataAsset
DatItemCommonDataAsset

I've modded a few things now, so I think I'd be able to figure it out if I was pointed in the right direction. Any advice would be appreciated. Thanks!

brazen ferry
#

it's the "use" flag in SkillNormalData that sets skill/items to be battle-only-use, but if you mean you want an item completely unusable, i think you'd have to change the item's skill to be unusable in battle under any circumstances. i assume changing its skill id to 0 would just make it softlock, but there's probably some way to make a skill with no possible use scenario. i just haven't tried it.

#

maybe weird target rules or weird target area, cure an ailment that doesn't exist. i know a random blank consumable in your inventory can't be used in battle, but only because it has no item category to appear in and be selected, i think.

#

you could do that too, i guess. make all item skills only usable in battle, then make all items have invalid categories that won't appear in the battle menu.

earnest iris
#

Hmmm, I couldn't get it to work. Here's what I did. I changed the "Use" variable to 1, which I think means "usable in menus" as it's what Traesto Gem uses.

#

Then I changed the Attr variable to 17 in DatSkillDataAsset, which is what skills that can't be used in menus like Tarukaja use.

#

This was for Medicine (skill id: 600).

#

But when I went to test it out, my medicines were functioning like normal. I could use them in both menus and in battle.

#

My other changes to DatSkillNormalDataAsset are appearing fine. I'm confounded.

brazen ferry
#

i'm pretty sure 0 and 2 are battle-only, and 1 and 3 are menu-enabled. not sure if there's a difference since it uses 1 sometimes and 3 sometimes. traesto gems don't exist, the traesto skill is unused, and i think it does absolutely nothing. to my understanding, skill affinity doesn't affect its use case, and the use flag is what stops support skills from appearing in the menu.

#

skills in the menu can't be used if they have no out-of-battle effect, though, like tarukaja

earnest iris
#

Just tested another scenario. I changed Use to 2 (i.e., usable in battles) and Attr to 255 (i.e., Passive).

That prevented me from using the item in the menu, but I could still use it in battle.

brazen ferry
#

i don't think there's a flag that disables skill-using consumables from being able to be used in battle. you'd need to make them a different category of item or make their skill have no use-case scenario in battle.

earnest iris
#

Just reading your previous messages. Ah okay, so no need to edit DatSkillDataAsset.

brazen ferry
#

yeah

earnest iris
#

So in theory, if I set Use to 1, then change the skill id to say 185 (Tarukaja), it should work (?)

brazen ferry
#

no, that's how the buff consumables work. to my understanding, you'd need to: 1. change every consumable item type to 0 so it won't appear in the battle menu (like how incenses don't despite being consumables), and 2. change every consumable item's skill id to something that can't be used out-of-battle..

#

ignore DatSkillDataAsset entirely, i think

#

you'd basically want to blank out every item's values to 0

earnest iris
#

Okay. Thank in advance.

By "change every item type to 0", do you mean the Use variable?

brazen ferry
#

no, "ItemType" in DatItemCommonData. like, 8192 means battle consumable, 524288 is used for some other stuff, incenses, i think.

#

if it's 0, it will only appear in the out-of-battle menu under recently-obtained items. which is why you'd want to also change their skill id's to 0 or something else that won't do anything.

#

i think that would disable all consumable item use

earnest iris
#

Ohhhh. That makes sense. Do you happen to have a 010 template for DatItemCommonData? I downloaded Light's repository of templates, but the only one they had for items was skill cards.

brazen ferry
#

i've been meaning to make one, but no. you could open the table in ue4 if you know how to do that.

earnest iris
#

Darn. All good. I can figure out the hex myself with a calculator.

#

I'll test your suggestion now.

brazen ferry
#

yeah, ctrl+f 8192 could do half the work

earnest iris
#

Alrighty, I'm back. No need to change the ItemType to 0 or 524288 (which ended up being webbooks). Doing so does remove it from the Consumable Items filter in the party menu (making it only appear in Order Obtained), but it'll still appear in the battle menu. Just setting the skill id to 0 will simultaneously disable usage in the party menu and remove it from the battle menu.

#

With this implementation, I'm a bit worried about how medicines will behave when used by a panicked party member. Skill id 0 is just a character's basic attack I believe. So, will characters attack each other? I'll need to do further testing.

earnest iris
#

Thanks again for your help!

earnest iris
#

I've confirmed that setting the skill id to 0 for items that can be used when confused doesn't break the game. Your characters will either use Money Distributor or do nothing.