- 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
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:
