[VX ACE] Displaying Certain Values/Text in Yami's Skill Equip

Howdy! This is my first post here on the RPG Maker forums so I'm really sorry if this is in the wrong place...

I'm currently using Yami's Skill Equip in a project I'm working on, and would like some scripting help for displaying certain values. When selecting a skill to equip, a menu will show up displaying the skill's type, cost, speed fixture, and hit rate. I was hoping I could get help in finding a way to display extra information in this specific window.

Ideally, I'd like to be able to display addtional properties and values using the skill note window, so I could add categories for things like a skill's base power, element, or physical/magical classification and tweak the exact text displayed for each property to my liking.

While my years using VX Ace have helped me learn how to tweak certain aspects of Ruby scripts, I still have no clue how to make one myself, and would really appreciate assistance in modifying Yami's Skill Equip script to display extra properties in such a way.

Thank you!
Give us a mockup of how you want it to look like with all the values you want added.
It should not be a problem to add to the display.
Glancing at the script I would assume you want the data to be in the Window_Properties_Slot
And the script has support for yanfly skill cost manager. Are you using that?
Oh, of course! Sorry about that.

Thank you for responding so fast..! Ideally, this is what the window would look like in game...
Spoiler: Image
1725412294503.png

And the values would be configurable in a skill's note window like...
Spoiler: Image2
1725412512171.png

And actually, I'm using the Victor Engine Tech Point system instead of a tradtional MP/TP system. (Unfortunately, I've been having problems with that script as well, but that's a thread I'll make another time.) That's why I'd like to be able to display the maximum Tech Points a move has as "PP".
Here is a working script that you need to use manual entries in the note box.
Script below
<display text: Type, Fire>
<display text: Category, Physical>
<display text: PP, 16>
<display text: Power, 65>
<display text: Accuracy, 100%>
<display text: Priority, 0>
I just plugged this in, and it worked like a charm! Thank you so much for the help!

I have twos question, though. If I try writing out anything with a space in it, the entire line of text doesn't appear at all. This shouldn't be a problem, I'm pretty sure I shouldn't need a space in any of the property windows, but I was wonder why this occurs.

Additionally, due to my afformentioned problems with the VE Tech Point script, I might need to fall back on the in game MP system for a replacement system. I was wondering if there was an easy way to reimpliment one of the properties being displayed to be MP if needed.

Again, thank you so much!

Edit: Actually, this also occurs when displaying certain symbols like the "+" and "-" symbol, which I do plan to use for the priority property, so some sort of fix or work around would this would be appreciated.
I have twos question, though. If I try writing out anything with a space in it, the entire line of text doesn't appear at all. This shouldn't be a problem, I'm pretty sure I shouldn't need a space in any of the property windows, but I was wonder why this occurs.

Additionally, due to my afformentioned problems with the VE Tech Point script, I might need to fall back on the in game MP system for a replacement system. I was wondering if there was an easy way to reimpliment one of the properties being displayed to be MP if needed.
I'll look into it. It's a matter of finding a proper regex that works.

Got it. Code updated above.

Tell me the issue with tech points. I have it in my test project and I don't see issues.
Thanks for the fix!

Regarding the tech point script, my main problem is that there's no good way to have items recover it, especially in combat, and that it might be awkward in combonation with skill equip script.

The method of tech recovery in the script is based on skill ID, but it seems only a single skill can be listed for recovery in an item's notes window. I'd like the item to recover a certain amount of tech points to every skill equipped, or maybe even by the player's choice (but that's much harder to implement as it's not a feature in the original script). As far as my testing went, I wasn't able to get an item to recover more than one skill's tech points at a time.

Additionally, the system is meant to represent PP (the project I'm working on is a PMD fangame), but PP has a special property when learning/equipping new moves in the same slot. The new equipped move retains the amount of PP left of the replaced move, i.e. a move with 10/20 PP remaining would set the any new move put in that same slot a remaining PP to 10 (without overflowing its maximum). Obviously, the tech point script wasn't designed with the skill equip script in mind, and thus would allow the bypass of the game's tech point management. Adding in a feature like this seems like a much larger task than adding some text, and I'd feel bad asking for a scripter to basically rewrite much of the code, so I'm leaning more towards creating a skill cost method using the in-engine MP system.

Thank you for all of your help so far, hopefully displaying MP cost again shouldn't be too taxing.
Try this
Spoiler: pics
1725552818842.png

1725552840112.png

1725552886207.png
Thanks for another script! This one seems pretty cool, but unfortunately it has some problems in it.

For one, the individual skill selection option crashes the game after backing out of the menu and reselecting the same character. In addition, I've had issues getting tech point recovery to work in combat, which is was one of my main issues with the original script's recovery method.
The other methods are similarly buggy out of combat, where backing out and reselecting the same character causes the use of the item upon the menu being brought up.

I may just be using the script incorrectly, or it could be some sort of compatibility issue, but regardless I can't get it to work right.

Just in case it's a compatibility issue, I'm currently using the scripts:
YEA Ace Core Engine
VE Basic Module
YEA Party System
YEA Buff & State Manager
Yami Skill Equip
Your Skill Equip Addon
VE Tech Points
Your Tech Point Addon

Honestly, I think just not using the tech point script may be best. I've kinda already accepted it won't work very well, but I really appreciate all the help you've given me so far!
crashes the game after backing out of the menu and reselecting the same character.
I don't get that. no crashes at all.

I've had issues getting tech point recovery to work in combat, which is was one of my main issues with the original script's recovery method.
This is supposed to fix that, if you do as I demonstrated.

The other methods are similarly buggy out of combat, where backing out and reselecting the same character causes the use of the item upon the menu being brought up.
I need to see that process. Perhaps a demo from you with the issue.

I'll try to add in those scripts on my end and see if the problems show up.

I also just updated that script above to be used in battles as well.
Sorry if I'm sounding rude, I'm really not trying to... I really do appreciate all your help.

Here's how the "crashing on repeated uses" error occurs on my end:
Spoiler: Repeated Use Error
1725562075764.png

It occurs on this screen, when selecting the target of the item.

1725562111160.png

After opening the menu once...

1725562133855.png

Backing out of the menu, and reselecting the same character...

1725562175251.png

I'm met with this script error.

In regards to recovering tech points in combat, a similar crash occurs upon attempting to select a skill to recover, displaying this crash screen:

1725562314640.png


Additionally, backing out of the skill recovery menu in combat skips that user's turn (at least if they're fighting alone, I haven't tried it with a party), and if you press any buttons while the turn is playing out after backing out of said menu, you get this error:

1725562464111.png


I'm not sure what's causing any of this, but I assume I'm just doing something wrong here.
Sorry if I'm sounding rude, I'm really not trying to... I really do appreciate all your help.
I couldn't tell, lol.

I just updated to fix the backing out issue I was seeing.
But I'm not getting the crash.
I got that when I was first working on the script a while ago, but everything seems fine to me.
I have all those scripts added.
I'm really not sure what's wrong either. I've even tried re-ordering the scripts, but still no dice. It keeps crashing when I try to select a move to recover.

Could you maybe send a screenshot of what the skill and item you're using look like, so I can see if I set either up incorrectly?
Could you maybe send a screenshot of what the skill and item you're using look like, so I can see if I set either up incorrectly?
The items are up above.
This is the only skill I've been testing.
1725566317410.png
I was able to get it to work without crashing! The item I was using was set up incorrectly, I'm pretty sure. Sorry for the concern...
I guess the main concern now is the afformentioned glitch caused by backing out of the skill recovery menu in battle.
I was also wondering if you still planned on adding the MP cost back to the properties window of the Skill Equip script. I know you said you'd look into it, and you've already done so much to help, but it is still something I'd like to see at some point, if that's alright.

Thank you for the continued help!
adding the MP cost back to the properties window of the Skill Equip script.
Ah, didn't realize that was a goal. Should not be a problem, but where will it go?

the afformentioned glitch caused by backing out of the skill recovery menu in battle.
Let me test that, but I didn't have any issue that I remember. Except unless you exit and don't select a skill. that might use an item up without doing anything.
Ideally I'd like MP to be able to put in the same spot as PP as a sort of togglable replacement, but I'm not sure how possible that is. This is for some abilities that may use MP instead of the Tech Point system in the future.
And in regards to the glitch, it's a crash that occurs if you waste the item by cancelling back out of the skill recovery menu, and then press any interact button (Z, X, Enter, etc.) while the turn is playing out.
I'd like MP to be able to put in the same spot as PP as a sort of togglable replacement
Spoiler: skill equip display
Ruby:
# ╔═══════════════════════════════════════════════╦════════════════════╗
# ║ Title: Skill Equip Display mod                ║  Version: 1.00     ║
# ║ Author: Roninator2                            ║                    ║
# ╠═══════════════════════════════════════════════╬════════════════════╣
# ║ Function:                                     ║   Date Created     ║
# ║                                               ╠════════════════════╣
# ║   Script Function                             ║    05 Sep 2024     ║
# ╚═══════════════════════════════════════════════╩════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Requires: Yami Engine Symphony - Skill Equip                       ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Brief Description:                                                 ║
# ║       Allow note tag control of text                               ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Instructions:                                                      ║
# ║   Use note tag <mp_pp: X> to control which value is displayed for  ║
# ║   the skill. MP or PP. 0 = MP, 1 = PP, 2 = both with switching     ║
# ║                                                                    ║
# ║   Use note tag for controlling the text to display                 ║
# ║     <display text: text, other text>                               ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Updates:                                                           ║
# ║ 1.00 - 05 Sep 2024 - Script finished                               ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Credits and Thanks:                                                ║
# ║   Roninator2                                                       ║
# ║                                                                    ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Terms of use:                                                      ║
# ║  Follow the original Authors terms of use where applicable         ║
# ║    - When not made by me (Roninator2)                              ║
# ║  Free for all uses in RPG Maker except nudity                      ║
# ║  Anyone using this script in their project before these terms      ║
# ║  were changed are allowed to use this script even if it conflicts  ║
# ║  with these new terms. New terms effective 03 Apr 2024             ║
# ║  No part of this code can be used with AI programs or tools        ║
# ║  Credit must be given                                              ║
# ╚════════════════════════════════════════════════════════════════════╝

module YES
  module SKILL_EQUIP
    ITEM_REGEX = /<display[-_ ]*text:[ ](\w*),(...*)>/i
    INPUT_SWITCH = :X # A button
    MP_PP_REGEX = /<mp[-_ ]*pp:[ ](\d+)>/i
  end
end
# ╔════════════════════════════════════════════════════════════════════╗
# ║                      End of editable region                        ║
# ╚════════════════════════════════════════════════════════════════════╝

#==============================================================================
# ¡ Window_Properties_Slot
#==============================================================================

class Window_Properties_Slot < Window_Base
  
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    return unless @actor
    if @item.nil? || @item == 0
      reset_font_settings
      change_color(normal_color, false)
      draw_icon(YES::SKILL_EQUIP::EMPTY_SKILL_ICON, 0, 0, false)
      draw_text(24, 0, contents.width, line_height, YES::SKILL_EQUIP::EMPTY_SKILL_TEXT)
    end
    return if @item.nil? || @item == 0
    reset_font_settings
    #---
    draw_item_name(@item, 0, 0)
    #---
    return if @item.nil?
    @text_data = []
    @text_data = @item.note.scan(YES::SKILL_EQUIP::ITEM_REGEX)
    draw_skill_data
  end
    
  #--------------------------------------------------------------------------
  # draw_skill_data
  #--------------------------------------------------------------------------
  def draw_skill_data
    if @item.note.scan(YES::SKILL_EQUIP::MP_PP_REGEX)[0]
      sw_data = @item.note.scan(YES::SKILL_EQUIP::MP_PP_REGEX)[0][0].to_i
    end
    i = 1
    @text_data.each { |line|
      group = line[0]; value = line[1]
      w = contents.width
      case sw_data
      when 0
        if group == "PP"
          draw_skill_cost(i*line_height)
        else
          change_color(system_color)
          draw_text(0, i * line_height, w, line_height, group)
          change_color(normal_color)
          draw_text(0, i * line_height, w, line_height, value, 2)
        end
      when 1
        change_color(system_color)
        draw_text(0, i * line_height, w, line_height, group)
        change_color(normal_color)
        draw_text(0, i * line_height, w, line_height, value, 2)
      when 2
        if @mp_pp == true && group == "PP"
          draw_skill_cost(i*line_height)
        else
          change_color(system_color)
          draw_text(0, i * line_height, w, line_height, group)
          change_color(normal_color)
          draw_text(0, i * line_height, w, line_height, value, 2)
        end
      else
        change_color(system_color)
        draw_text(0, i * line_height, w, line_height, group)
        change_color(normal_color)
        draw_text(0, i * line_height, w, line_height, value, 2)
      end
      i += 1
    }
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias r2_update_mp_pp   update
  def update
    r2_update_mp_pp
    if Input.trigger?(YES::SKILL_EQUIP::INPUT_SWITCH)
      @mp_pp = !@mp_pp 
      refresh
    end
  end
end
Updated to be full script.

Figured out that glitch. I made a mistake with the processing for battles.

Code above is now updated.
This script is awesome! Thank you so much!
Do you think you could also add a feature where I can tag certain skills to only display either PP or MP?
This script is awesome! Thank you so much!
Do you think you could also add a feature where I can tag certain skills to only display either PP or MP?
done, right above you

Original thread: https://forums.rpgmakerweb.com/threads/vx-ace-displaying-certain-values-text-in-yamis-skill-equip.171649/