Making a character unselectable in the inventory for items?

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
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?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
well, you can make it target none I think, then just run the effect via common events...
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
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?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
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...
 
Last edited by a moderator:

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
This would mean that I would have to create a common event for every single item.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
Well, that is if you only want it to target a specific, predefined actor...
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
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.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
I think it's easy to make it un-selectable for all items... but for specific items only... hmmmm...
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
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.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
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...
 
Last edited by a moderator:

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
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?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
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...
 
Last edited by a moderator:

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
That was all gibberish to me...

I have no idea where to put that script... I have no idea how to read RGSS3.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
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
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
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...
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,005
First Language
Tagalog
Primarily Uses
RMVXA
what happens?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,199
Reaction score
14,239
First Language
English
Primarily Uses
RMMV
$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]
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
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.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,558
Reaction score
5,595
First Language
Dutch
Primarily Uses
RMMV
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Is it necroposting if I ask for more info in my own months old thread? All the information in the thread is relevant
JRPG TextBox HTML - Part 2:
So I'm resuming work on the Shadowstar Trilogy. I've decided that it will take place between the end of G4 and the start of G5, and two of the Lost Rulers will be Twilight Sparkle and Sunset Shimmer (who is the moon princess in my AU).
Been working on some sprites, My favorite out of all of them is this guy, his name is Moss:

Forum statistics

Threads
108,958
Messages
1,040,868
Members
141,418
Latest member
Emileewitt
Top