Making a character unselectable in the inventory for items?

There's a character in my game that I don't want to be able to have items used on.

Is there a way to remove him from the options list for items? Or is there a way to make items automatically affect only one character, negating the option box completely?
well, you can make it target none I think, then just run the effect via common events...
well, you can make it target none I think, then just run the effect via common events...
Could you explain this in more detail, please?
that's for the second question [making an effect for a specific character]...

Make the item as a "dummy" (usable item but no effects and make it's target scope to none)

Then create a common event and use the available options there to create the effect that you want for the specific character

Then go back to your dummy item and in the common event box, add your created common event

Now, when you use this item, it will be instantly used (since scope is none), then it will trigger the common event.

Of course, this is assuming that the effect that you want it doable via common event commands...
This would mean that I would have to create a common event for every single item.
Well, that is if you only want it to target a specific, predefined actor...
Or having the other character not selectable...

There are only two characters that are ever playable in my game. And one can not receive damage and thus does not need healing items.
I think it's easy to make it un-selectable for all items... but for specific items only... hmmmm...
I think it's easy to make it un-selectable for all items... but for specific items only... hmmmm...
Well yes, this character cannot use items at all.
try this:

Scene_ItemBase < Scene_MenuBase

def determine_item

    if item.for_friend?

      @actor_window.process_ok

    else

      use_item

      activate_item_window

    end

  end

end

 

class Window_MenuActor < Window_MenuStatus

 

def process_ok

    index = 1

    $game_party.target_actor = $game_party.members[index]

    call_ok_handler

  end

end

where 1 ==> position of the actor in the party

I haven't tested it though as this comp only has the Lite version...
where 1 ==> position of the actor in the party
What do you mean by this? Like, if it's the second character in the roster, it would be 2?
yes... I'm not sure if it works... the selection process is quite confusing as it's handled by too many scripts... (the call is made in scene_item, processed by scene_itembase, forwarded to menu_actorwindow, then IDK what happens after)

btw, I edited the above post... if it doesn't work, I can't help much for now as I cannot test things out by myself in this comp...
That was all gibberish to me...

I have no idea where to put that script... I have no idea how to read RGSS3.
Just open the script editor, go to the lowest parts, you'll there the word (insert here), just right click below it, and choose insert... then paste the code into the slot that you created
Yeah, it says there's a syntax error in line 13... Thank you anyway for trying, though... u_u;

EDIT: Wait, it appears to work since I can't select him. So, uh, yay!

EDIT 2: Never mind that's what the game does anyway... Sorry, it's late here...
what happens?
$game_party.members starts with index 0, not 1. So your first party member would be $game_party.members[0] and your second would be $game_party.members[1]
Okay, this is what currently shows up:

Untitled_zps66e9c943.png


Baiulus is not selectable because he never receives damage. So I'd rather have him not show up on this list at all.

I mean sure, he could be there anyway, it's not like you can choose him at all, but there was a huge problem during a betatest. It might have been because they were using XP rather than a newer OS like Windows 7, but after the first boss battle the selection was stuck on Baiulus and Annabelle could not be healed outside of battle. That has never happened before, within the hundreds of times this game has been playtested. To negate this mysterious glitch I think it would be best to not have him there.
I'm just vouching for XP here - XP is the perfect system to use any of the RPG Makers on, it's the newer versions that might run into trouble, so this is obviously not the issue.

Original thread: https://forums.rpgmakerweb.com/threads/making-a-character-unselectable-in-the-inventory-for-items.17933/