RMMV Condition isEnabled on Switch / Variable / StateAffected

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
174
Reaction score
37
I found this lines part of TMCard

JavaScript:
    // wether to show the card in the list
    Window_DeckEditItem.prototype.isEnabled = function(item) {
        if (item === null) return true;
        if (!TMPlugin.Card.SameCard && this._otherSlotCardIds.contains(item.id)) {
            return false;
        }
        return this._capacity >= +item.meta.cardCost && item.id !== this._currentCardId;
    };

I was wondering how to include the following:
1. When a switch is ON / OFF
2. When a variable value is less, greater, equal to.. .etc..
3. When the player is affected by a state.

I checked out triacontane's EquipConditionExtend, but was unsuccessful just adding the inequalities..
This is the part that grays out the card making in unable to equip on the deck. Thank you for the solution.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
957
Reaction score
504
First Language
English
Primarily Uses
RMMV
It's always helpful to give a link to the plugin you're talking about, so people helping you don't have to look it up on their own :wink:

All of your questions would be very quickly answered by Googling them, rather than making a post and waiting for answers. For example, looking for "RPG Maker MV variable value" immediately comes up with threads listing the appropriate JavaScript calls.

But here are the answers:
1. $gameSwitches.value(ID)
2. $gameVariables.value(ID)
3. variableThatIsAnActor.isStateAffected(ID)

In all cases you'd replace "ID" with the numerical ID of the switch/variable/state from your database.
 

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
174
Reaction score
37
It's always helpful to give a link to the plugin you're talking about, so people helping you don't have to look it up on their own :wink:

All of your questions would be very quickly answered by Googling them, rather than making a post and waiting for answers. For example, looking for "RPG Maker MV variable value" immediately comes up with threads listing the appropriate JavaScript calls.

But here are the answers:
1. $gameSwitches.value(ID)
2. $gameVariables.value(ID)
3. variableThatIsAnActor.isStateAffected(ID)

In all cases you'd replace "ID" with the numerical ID of the switch/variable/state from your database.
here's the plugin. EquipConditionExtend
I think i forgot the code has uses note tags, that's why im asking help. And i know how to use event script calls.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
957
Reaction score
504
First Language
English
Primarily Uses
RMMV
We're not talking about events. But please clarify: if you already knew how to use the functions that were the answers to your questions, then what is your question beyond that?
 

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
174
Reaction score
37
I need the functions EquipConditionExtend.. that disables an item from being selected... when the following conditions are present : SWTICH, VARIABLE, and STATE.. (using note tags on the item note tags) on that snippet from tomoaky TMCard.

for example another plugin EventItemCondition by Triacontane.. This plugin puts conditions when using the Window Event Item.. merely changing the Window Event Item to Window Deck Edit Item, the conditions are not taking effect in game..

So what i need to learn is how to set the note tags to enable / disable the item based on those conditions.
 

Latest Threads

Latest Posts

Latest Profile Posts

Working on a case. Get all the evidence to prosecute some bad guys. :kaojoy:
But, the game development schedule delayed. :kaoswt2:
The moral of the story: No good deed goes unpunished... I guess...
Now, hopefully, some certain people will not be stupid enough to leak my name on the reports.
just beat ff7 original for the first time since 2010. having played remake last year, I have a much better appreciation for the original oddly enough. I still like some of the character presentation in remake more, but the original's got a lot going for it.
Ever reach that moment in your life when your juggling a dozen or more projects that you know will never be made but don't have the heart to delete them? Ugh, I hate those moments...
:kaosigh: Why must you hurt me so?
my main character isn't the warrior of light or the chosen one, he's a self righteous, invasive try hard who gets ahead of himself and makes a critical error, resulting in a downward moral spiral that, eventually, leads him to truths that make him a better man, and im DAMN proud of that.

Forum statistics

Threads
111,448
Messages
1,061,188
Members
144,817
Latest member
tocurse
Top