Hi, folks. I've had an idea. An item has a certain ability that it grants when equipped- that's pretty standard. Only, in my idea, the player can choose to 'analyze' the item, which has a chance to bestow that ability permanently. How would I implement this?
Learning from Items
RPG Maker VXAce SupportWith or without scripts?
If you want to do it without scripts, then you need to have an external map event to check that chance and to destroy/remove the item (for example a workbench), because equippable things can't be used (and thereby can't call an event by default).
But even then, the workbench-event would need to be very complex, checking for all possible items in inventory and getting the skills to the correct actors and so on.
With skripts, you could perhaps use one of the scripts that call events on equipping something, asking the player if he wants to equip or analyse the item.
If you want to do it with more than a few special equipments, it would be better to request or commission a script that will process data from notetags for setting the function of a new analyse equipment screen, because with the second option (script call on equip) you would still need a lot of common events to check each item.
If you want to do it without scripts, then you need to have an external map event to check that chance and to destroy/remove the item (for example a workbench), because equippable things can't be used (and thereby can't call an event by default).
But even then, the workbench-event would need to be very complex, checking for all possible items in inventory and getting the skills to the correct actors and so on.
With skripts, you could perhaps use one of the scripts that call events on equipping something, asking the player if he wants to equip or analyse the item.
If you want to do it with more than a few special equipments, it would be better to request or commission a script that will process data from notetags for setting the function of a new analyse equipment screen, because with the second option (script call on equip) you would still need a lot of common events to check each item.
I've moved this thread to VX Ace Support (with potentially a future move to one of the Scripts forums). Please be sure to post your threads in the correct forum next time. Thank you.
you can probably utilize the script here for Weapon Randomization (made by Vlue I believe) to have permanent random features for the "analyzed" item.
I'm not sure of the details in what you are wanting to accomplish, but I would think you could just trigger an event that checks which items the character has equipped and then give the player a choice rather or not to analyze the item. If the player chooses yes - just use a random number to determine if they learn a new ability or not. For example:
Conditional Branch: [Eric] is [spear] equipped
Text:
:Analyze Spear?
Show Choices: Yes, No
When [Yes]
Control Variables: [0001:Temp.Variable:0] = Random No (1....2)
Conditional Branch: [0001:Temp.Variable:0] == 1
Text:
:You failed to analyze Item
Branch End
Conditional Branch: [0001:Temp.Variable:0] == 2
Text:
:You succeed at analyzing Item
Change Skills: [Eric], + [spear Attack]
Branch End
When [No]
Branch End
Branch End
Original thread: https://forums.rpgmakerweb.com/threads/learning-from-items.19106/