[SOLVED] Need help creating a item requirement plugin

Portachar

Villager
Member
Joined
Apr 21, 2019
Messages
5
Reaction score
1
First Language
French/English
Primarily Uses
RMMV
I guys !

The plugin i'm wishing to build look like that (no code for now) :
-if the notebox contains <Class : x> (x is the classe name)
then the item is only useable for the class (usable in the item menu)
-else the item is useable for all classes

I'm pretty sure to know how to check what is inside the notebox BUT after that step i'm totally lost : i don't know on which function i need to do something and how the game can know when items can be used or not.

Thanks for reading my post and waiting for help if someone know how to do !
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,091
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Maybe alias Game_BattlerBase.prototype.meetsUsableItemConditions (cf rpg_objects.js).
 

Portachar

Villager
Member
Joined
Apr 21, 2019
Messages
5
Reaction score
1
First Language
French/English
Primarily Uses
RMMV
is that function used for the item requirment for the item menu (not in battle) ?
 

Portachar

Villager
Member
Joined
Apr 21, 2019
Messages
5
Reaction score
1
First Language
French/English
Primarily Uses
RMMV
here is my code :
Sans titre.png
 
Last edited:

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
444
Reaction score
208
First Language
English
Primarily Uses
RMMV

Portachar

Villager
Member
Joined
Apr 21, 2019
Messages
5
Reaction score
1
First Language
French/English
Primarily Uses
RMMV
i have it but the main problem is that it only works in the battle scene.

I'm trying to make scrolls that are only useable by a certain class in the menu (NOT in battle). Those scrolls add competence so i don't want a warrior to learn a magic spell or things like that.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,091
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Oops, yes, the plugin is working fine, it's just that the meetsUsableItemRequirements function checks the item user (in the menu I think this is the highest PHA party member) rather than the item target. I should have remembered that... :kaoslp:

I'm not sure if there's a way around that using Lunatic Mode or something. :kaoswt2:

Maybe try this plugin by Himeworks instead: http://himeworks.com/2016/02/effect-conditions/ :kaophew:
 

Portachar

Villager
Member
Joined
Apr 21, 2019
Messages
5
Reaction score
1
First Language
French/English
Primarily Uses
RMMV
Oops, yes, the plugin is working fine, it's just that the meetsUsableItemRequirements function checks the item user (in the menu I think this is the highest PHA party member) rather than the item target. I should have remembered that... :kaoslp:

I'm not sure if there's a way around that using Lunatic Mode or something. :kaoswt2:

Maybe try this plugin by Himeworks instead: http://himeworks.com/2016/02/effect-conditions/ :kaophew:
Oh ! thanks a lot man !!! That's exacly what i was looking for before i started learning javascript for creating my own plugin !!!
I'll use it thanks ! You save around 2 weeks of my time ! In addition i can learn own it works !
Thanks again !!!

This adventure made me wanting learning how all of that stuff works and then maybe creating my own things one day. In a few months i'll can help others !
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top