Make Unselectable

GammaVD

Veteran
Veteran
Joined
Oct 29, 2015
Messages
70
Reaction score
3
First Language
English
Ok, so I've made an 'Item' version of Silence I'm calling 'Klutz' (meaning one can not use Items)

The problem is that an actor can still select an 'Item' to use, they just won't perform the action of using it

I not sure what I need to change so that like Silence the player can't select an 'Item' to use so they don't waste an action

Edit: When only one actor is in battle and effected by this state the Items won't appear, however they do appear if there is a second party member who is not effected, my guess is that 'Items' are displayed if the "party" can use them, rather than checking the individual actor

If anybody can figure out how to check when actor X checks for meetsItemConditions(itemId) and get it to act on their unique list it should fix this minor bug

Edit 2: Ok fond the function I need to change

Window_BattleItem.prototype.includes = function(item) {

    return $gameParty.canUse(item);

};

 

The problem now is how do I check if an actor is affected and only when that actor is trying to bring up this menu

 

Also found this code difference between Window_ItemList and Window_SkillList

 

Window_ItemList.prototype.isEnabled = function(item) {

    return $gameParty.canUse(item);

};

 

Window_SkillList.prototype.isEnabled = function(item) {

    return this._actor && this._actor.canUse(item);

};

 

If I understand correctly, Window_BattleItem creates an ItemList to then populate the 'Item' window in battle, and only checks if the "party" has the item in their inventory and it can be used by the "party" rather than by the actor

 

In this realisation, I'm going to need one hell of a fix just to make them un-selectable as I need to make a special case for when in battle for an Item list as when out of battle there is no active battler...definitely not going to be a simple fix
 
Last edited by a moderator:

Jeremy Cannady

Coldfire
Veteran
Joined
Oct 25, 2015
Messages
449
Reaction score
268
First Language
English
Do you mean the whole party can't use items or just an actor in battle?
 

GammaVD

Veteran
Veteran
Joined
Oct 29, 2015
Messages
70
Reaction score
3
First Language
English
Just the individual actor who is affected by the state
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top