DNI Skill Core System (Dainekouichi) Script modification request

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
158
Reaction score
11
First Language
Portuguese
Primarily Uses
RMVXA
Good Morning / Day / Afternoon / Evening everyone.

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

I have Dainekoichi's Skill Core system in mind. It allows characters to equip skill cores as an alternative to the traditional skill learning.

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

I was wondering if it was possible to have an add on that would do the following:

1. Play a sound effect of my choice when equipping them on the menu and also a sound effect at once the skill core levels up;

2. Include an option where I can add a notetag to a state to the that allows an actor to recieve 2 times to 4 times the default (or whatever amount I assign on the enemies or provide sc exp via script call) Skill Core EXP (like the skills Double AP in FFX) .


If this isn't too difficult I would really appreciate the help
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
638
Reaction score
416
First Language
English
Primarily Uses
RMVXA
Here you go:
Ruby:
module DAI
  module SKILLCORES
    # Sound to play when equipping skillcore
    EQUIP_SE = ["Equip1", 90, 100]
    
    # Sound to play when skillcore levels up
    LVUP_SE = ["Flash1", 90, 100]
    
    # To boost skillcore EXP, use the following notetag:
    #   <skillcore exp: X>
    # where X should be a float, e.g. 2.0, 4.0, 1.5
    
    
    SC_EXP_BOOST_REGEX = /<skillcore[ _-]+exp:\s+(\d+\.\d+)>/i
  end
end

class RPG::BaseItem
  attr_accessor :skillcore_exp_boost

  def load_skillcore_exp_notetags
    @skillcore_exp_boost = 1.0
    self.note.split(/[\r\n]+/).each do |line|
      case line
      when DAI::SKILLCORES::SC_EXP_BOOST_REGEX
        @skillcore_exp_boost = $1.to_f
      end
    end
  end
  
end

module DataManager
  class << self; alias :amn_dsc_datamgr_loaddb :load_database; end
  
  def self.load_database
    amn_dsc_datamgr_loaddb
    load_skillcore_exp_notetags
  end

  def self.load_skillcore_exp_notetags
    for group in [$data_actors, $data_classes, $data_weapons, $data_armors, $data_states]
      group.each { |obj| obj.load_skillcore_exp_notetags unless obj.nil? }
    end
  end
  
end

class Game_BattlerBase
  
  def objects_skillcore_exp_boost
    feature_objects.inject(1.0) {|r, obj| r *= obj.skillcore_exp_boost }
  end
  
end

class Game_Party < Game_Unit  
  
  alias amn_dsc_gameparty_msgskillcorelvup  message_skillcore_lvup
  def message_skillcore_lvup(core)
    RPG::SE.new(*DAI::SKILLCORES::LVUP_SE).play
    amn_dsc_gameparty_msgskillcorelvup(core)
  end

  alias amn_dsc_gameparty_addscexp  add_skillcore_exp
  def add_skillcore_exp(core, amt)
    actor = members.find { |a| a.skillcores.include?(core) }
    amt = (amt * actor.objects_skillcore_exp_boost).to_i if actor
    amn_dsc_gameparty_addscexp(core, amt)
  end

end

class Scene_SkillCore < Scene_MenuBase

  alias amn_dsc_sceneskillcore_oncoresok  on_cores_ok
  def on_cores_ok
    RPG::SE.new(*DAI::SKILLCORES::EQUIP_SE).play if @cores_window.current_data[:ext]
    amn_dsc_sceneskillcore_oncoresok
  end
  
end

Put that in a new slot below the skill core script.
 

Panda_Artist

Humble RPG Fan
Veteran
Joined
Dec 22, 2018
Messages
158
Reaction score
11
First Language
Portuguese
Primarily Uses
RMVXA
Okay I tested everything and so far SO GOOD!

Thank you so much for this. I couldn't have done it without you!! You will definitely be credited for all your efforts!
 

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

Latest Threads

Latest Profile Posts

Yo Ho Ho... Time flies when you are having rum...

I'm rewatching Glee, just watched grilled cheesus.
Now I'm not sure if I'm hungry or I want to cry.
I just completed Ara Fell - completing the game unlocks an Epilogue. An interesting thing to possibly consider for my games.
I decided to try to make a mucha-styled artwork, and by now I've sunk more time in studies and sketches than I usually do in the whole thing. Fingers crossed it's worth it!

Forum statistics

Threads
99,452
Messages
965,437
Members
131,067
Latest member
LeoWolf
Top