DNI Skill Core System (Daikenouichi) Script modification request

Good Morning / Day / Afternoon / Evening everyone.

I have a request for a certain kind of script modification.

Once again, it must have this script in mind. I hope I am not violating any rules!

http://dainekoichi.blogspot.com/2015/10/rmvxa-skill-core-system_5.html

Dainekoichi's script allows users to equip a skill core, you don't need to set any skill types either because the script will do it automatically for you (if you have a magic skill type skill and a special skill type skill within the same core, the character will gain both types)

However, I would like to implement two major modifications but unfortunately I don't have enough knowledge of RGSS to implement them properly:

1. Being able to forcefully remove all of the equipped skill cores available via a script call to an actor or all of them (This because in my game there will be times where characters will leave the party or will be seperated. This way I can prompt the player to reconfigure their skill cores at certain points in the game. I tested it and when I remove a party member there is no way I could remove the skill core from him/her)

2. Implementing a progression system where available skill score slots are added as characters level up (for example at level 1 can only equip 2 skill cores ant at level 99 can equip 8).

I did try contact the original creator but to no avail...

Is there any easy way to implement these?
Hey there,

You could try this as an addon to the script:
Spoiler
Code:
#============================================================================
#
#  "Skillcore Unlock and Unequip" - Addon
#  Version 1.02 (July 25th, 2019)
#  by Another Fen <forums.rpgmakerweb.com>
# 
#  This is an unofficial extension for the "DNI Skill Core System" by
#  DaiNekoIchi, which can be found here: http://dainekoichi.blogspot.com/
#
# Contents: -----------------------------------------------------------------
#  This script adds the ability to unlock additional skill cores at specific
#  actor levels. It also offers a script command to unequip any skill core an
#  actor may have currently equipped.
#
# Usage: --------------------------------------------------------------------
#  Add this as a new script below the "DNI Skill Core System" in the script
#  editor and save your project.
#
#  To unlock a new skillcore slot at a specific level, add
#    <add skillcore: 20>
#  to the actors notebox. Alternatively, you can also add this to noteboxes
#  of their classes, states or equipment items.
#  Replace 20 by the respective unlock level.
# 
#  To unequip skillcores of an actor, use this as a script command:
#    unequip_actor_skillcores(10)
#  Replace 10 by the actors database ID, or by 0 to unequip all skillcores
#  available to the party.
#
#============================================================================

class RPG::BaseItem

  def skillcore_unlock_levels
    @skillcore_unlock_levels ||= extract_skillcore_unlock_levels
  end
 
  def extract_skillcore_unlock_levels
    regexp = /<add\s?skillcore(?:(?:\s?at\s?level)?(?:\s?\:)?\s*(\d+))?>/i
    return self.note.scan(regexp).map { |match|
      match[0] ? Integer(match[0]) : 0
    }
  end
end


class Game_Actor
 
  alias_method(:setup_ILC_refreshSkillcoreSlots, :setup)
  def setup(actor_id)
    setup_ILC_refreshSkillcoreSlots(actor_id)
    # Initial refresh, as @skillcores is set up last:
    refresh_skillcore_slots
  end
 
  alias_method(:refresh_ILC_refreshSkillcoreSlots, :refresh)
  def refresh
    refresh_ILC_refreshSkillcoreSlots
    # Skillcores may not be set up yet:
    refresh_skillcore_slots  if @skillcores
  end
 
  def refresh_skillcore_slots
    slotnumber = skillcore_equip_slots
    while @skillcores.length < slotnumber
      @skillcores.push(-1)
    end
    while @skillcores.length > slotnumber
      remove_skillcore(@skillcores.length - 1)  if @skillcores.last != -1
      @skillcores.pop
    end
  end
 
  def skillcore_equip_slots
    return feature_objects.reduce(DAI::SKILLCORES::EQUIP_COUNT) { |result, obj|
      result + obj.skillcore_unlock_levels.count { |lv| lv <= self.level }
    }
  end
 
  def unequip_all_skillcores
    self.skillcores.each_index { |i|
      remove_skillcore(i)  if self.skillcores[i] != -1
    }
  end
end


class Game_Interpreter
 
  def unequip_actor_skillcores(actor_id)
    if actor_id == 0
      actors = $game_party.skillcores.map { |core| $game_actors[core[:actor]] }
      actors = actors.uniq.compact
      actors.each { |actor| actor.unequip_all_skillcores }
    else
      $game_actors[actor_id].unequip_all_skillcores
    end
  end
end
I just cannot thank you enough for this, I would pay you if I could, this is absolutely amazing....

You will undoubtedly be credited for this.

Thank you, very much, sir.

Original thread: https://forums.rpgmakerweb.com/threads/dni-skill-core-system-daikenouichi-script-modification-request.111449/