RMMV Condition isEnabled on Switch / Variable / StateAffected

xabileug

Veteran
Veteran
Joined
Jul 1, 2014
Messages
157
Reaction score
35
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
894
Reaction score
477
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
157
Reaction score
35
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
894
Reaction score
477
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
157
Reaction score
35
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

So, as i finish setting up my items for part 1 of my game, I realized I forgot to finalize an ENTIRE category of items. Know which ones? The Fallen Feathers....BTW my game is called "Fallen Feather"
and_remember_tomorrow_exploding_puzzle_logo.jpg

Made some new friends, and blew up a puzzle... Happens. :LZSwink:
A new RPG Maker music pack is coming out soon! Below is a demo of one of the compositions in the pack, Heroic Battle. More details coming soon!

Trying to build a child-size body. Mostly happy with it except the sideview arms - can't get them to move quite right yet. Anyway, here's the work-in-progress, with an adult for size comparison.
ChildTest-01.gif

I started in VXAce and I liked how the kids flapped their arms so that's why it's just flapping.
A character theme... finally posted some of the music tonight as celebration for 500 followers. I really like how this song came out.

Forum statistics

Threads
111,137
Messages
1,058,626
Members
144,368
Latest member
PLKx
Top