Good Morning / Day / Afternoon / Evening everyone.
I have a request for a certain kind of script modification.
I have Tsukihime's Core Equip along with Dynamic Equip slots
The script give you the option to create your own custom equipment types and slots
However, I would like to implement an add on that for example. I have a custom equip type in which an actor starts with 1 slot of at level 1 but grows to 3 slots of the same at level 20 for example.
You replace the actor_id with the coresponding actor id number, and the equip_type_id with the coresponding equip type id number set in yanfly's script. Not too heavely tested though.
That script call does not work on actors that would use default equip slots. Or, it rather do work, but once you push any equip slot, the default ones would not load for the given actor. As that script call is something that could help you, it might not in the example you give.
To work for the example you give, the level up method could be modified, so it pushes more slots when certain conditions are met. But you need to provide more data how exactly that should happen. That happens for all actors, or only for certain? Different actors have different levels when they would recieve new slot, and different slot type to recieve on criteria met? Or it works same for all actors? Same level criteria, same slot type added?
Edit: Only the script call by itself won't help you, as that won't remain in the save file.
The equip slot data should be stored in save data, and extracted from there loading new game, if you add this snippet at the end of the Yanfly Equip Engine:
Code:
#Add-on for Ace Equip Engine
#Purpose: Save and loads the actors equip slots.
module DataManager
class << self
alias_method :ggz_yee_make_save_contents_old, :make_save_contents
alias_method :ggz_yee_extract_save_contents_old, :extract_save_contents
end
def self.make_save_contents(*args)
contents = ggz_yee_make_save_contents_old(*args)
equip_slot_save = Array.new
$data_actors.each_with_index do |actor, i|
next unless actor
equip_slot_save[i] = actor.base_equip_slots
end
contents[:ynf_base_equip_slots] = equip_slot_save
contents
end
#--------------------------------------------------------------------------
# * Extract Save Contents
#--------------------------------------------------------------------------
def self.extract_save_contents(contents)
ggz_yee_extract_save_contents_old(contents)
equip_slot_load = contents[:ynf_base_equip_slots]
if equip_slot_load
$data_actors.each_with_index do |actor, i|
next unless actor
actor.base_equip_slots = equip_slot_load[i]
end
end
end
end
You should add that snippet at the end of "Ace Equip Engine" script, after everything else there.
That snippet only makes it so whatever changes you make, to be stored in the save.
It would not add any equip slots on level up. For that, you need to provide more info how you want it to happen.
=begin
#=====================================================================
# HIME's Dynamic Equip Slots - Add-on
# Version 1.0.01
# Author: Roninator2
# Date: 18 Aug 2019
# Latest: 19Aug 2019
#=====================================================================#
# UPDATE LOG
#---------------------------------------------------------------------#
# 18 Aug 2019 - Created notetag to add slots by level
#=====================================================================#
# NOTETAGS
#=====================================================================#
Notetag actors as many times as you require with the following:
* <add slot: Level, etype_id>
* e.g. <add slot: 5, 4>
Where `etype_id` is the equip type ID. By default, they are as follows:
0 - weapon
1 - shield
2 - headgear
3 - bodygear
4 - accessory
=end
module TH
module Dynamic_Equip_Slots
Regexlevel = /<add[-_ ]slot:[-_ ](\d+*)\,*.*?(\d+*)>/i
end
end
module RPG
class Actor
attr_reader :level
def load_notetag_level_equip_slots
results = self.note.scan(TH::Dynamic_Equip_Slots::Regexlevel)
results.each do |res|
if $game_actors[@id].level == res[0].to_i
$game_actors[@id].add_equip_slot(res[1].to_i)
end
end
end
end
end
class Game_Actor < Game_Battler
alias :r2_level_up_97bfu :level_up
def level_up
r2_level_up_97bfu
actor.load_notetag_level_equip_slots
end
end
Fix the code. For the life of me I could not get this to work without a global variable. Perhaps someone can assist with that.
=begin
#=====================================================================
# HIME's Dynamic Equip Slots - Add-on
# Version 1.0.01
# Author: Roninator2
# Date: 18 Aug 2019
# Latest: 19Aug 2019
#=====================================================================#
# UPDATE LOG
#---------------------------------------------------------------------#
# 18 Aug 2019 - Created notetag to add slots by level
#=====================================================================#
# NOTETAGS
#=====================================================================#
Notetag actors as many times as you require with the following:
* <add slot: Level, etype_id>
* e.g. <add slot: 5, 4>
Where `etype_id` is the equip type ID. By default, they are as follows:
0 - weapon
1 - shield
2 - headgear
3 - bodygear
4 - accessory
=end
module TH
module Dynamic_Equip_Slots
Regexlevel = /<add[-_ ]slot:[-_ ](\d+*)\,*.*?(\d+*)>/i
end
end
module RPG
class Actor
attr_reader :level
def load_notetag_level_equip_slots
results = self.note.scan(TH::Dynamic_Equip_Slots::Regexlevel)
results.each do |res|
if $game_actors[@id].level == res[0].to_i
$game_actors[@id].add_equip_slot(res[1].to_i)
end
end
end
end
end
class Game_Actor < Game_Battler
alias :r2_level_up_97bfu :level_up
def level_up
r2_level_up_97bfu
actor.load_notetag_level_equip_slots
end
end
Fix the code. For the life of me I could not get this to work without a global variable. Perhaps someone can assist with that.
It worked just fine without it, I leveled up my character and his slots increased, even with characters with a lower level on the party, I was able to accomplish just what I wanted.
Thank you so much, you will definitely be credited.
Hey, just to apologise. I for some reason believed you used Yanfly equip engine, although you certainly said Tsukihime. Sometimes my short term memory play me such tricks. Is not my practice when someone ask help for one script, I to go for another. Anyway, I see Roninator2 helped you .
It worked just fine without it, I leveled up my character and his slots increased, even with characters with a lower level on the party, I was able to accomplish just what I wanted.
Thank you so much, you will definitely be credited.
I was wondering if it were also possible to add something that will tell you during battle victory that when you level up to the level i specified and they get a new slot, the vocabulary could tell you that like:
"Actor1 has gained a level!
Actor 1 has gained a new (equp) slot"
That would be really cool. Maybe add in a sound effect!
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.