- Joined
- Feb 22, 2016
- Messages
- 2,758
- Reaction score
- 2,309
- First Language
- English
- Primarily Uses
- RMMV
I'm trying to find a script call with the same effect as the following notetag:
<Skill Tier 1 Slots: +1>
The reason I can't use a notetag in this situation is because it's for my stat allocation system which also allows players to upgrade the number of skill slots. It is all done in @SomeFire's Skill Tree plugin. Basically, the player "learns" a skill that triggers a common event that contains a script call which increases the player's skill slots for a certain skill tier by +1. The same common event then causes the player to "unlearn" said skill so that he/she can increase skill slots multiple times. I'm not certain, but perhaps one of the following functions is involved?
Edit: I just tried
<Skill Tier 1 Slots: +1>
The reason I can't use a notetag in this situation is because it's for my stat allocation system which also allows players to upgrade the number of skill slots. It is all done in @SomeFire's Skill Tree plugin. Basically, the player "learns" a skill that triggers a common event that contains a script call which increases the player's skill slots for a certain skill tier by +1. The same common event then causes the player to "unlearn" said skill so that he/she can increase skill slots multiple times. I'm not certain, but perhaps one of the following functions is involved?
JavaScript:
DataManager.processESTierNotetags2 = function(group) {
var note1 = /<(?:SKILL TIER)[ ](\d+)[ ](?:SLOTS|SLOT):[ ]([\+\-]\d+)>/i;
for (var n = 1; n < group.length; n++) {
var obj = group[n];
var notedata = obj.note.split(/[\r\n]+/);
obj.equipTierSlot = {
1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0
};
for (var i = 0; i < notedata.length; i++) {
var line = notedata[i];
if (line.match(note1)) {
var tier = parseInt(RegExp.$1).clamp(1, 6);
obj.equipTierSlot[tier] = parseInt(RegExp.$2);
}
}
}
};
JavaScript:
Game_Actor.prototype.getEquipSkillTierCount = function(tier) {
var value = 0;
for (var i = 0; i < this.battleSkillsRaw().length; ++i) {
if (this.battleSkillsRaw()[i] === 0) continue;
var skill = $dataSkills[this.battleSkillsRaw()[i]];
if (skill.equipTier === tier) value += 1;
}
return value;
};
JavaScript:
Game_Actor.prototype.getEquipSkillTierMax = function(tier) {
var value = Yanfly.Param.ESTierMaximum[tier];
value = value.clamp(0, this.maxBattleSkills());
value += this.actor().equipTierSlot[tier];
value += this.currentClass().equipTierSlot[tier];
for (var i = 0; i < this.battleSkillsRaw().length; ++i) {
var skill = $dataSkills[this.battleSkillsRaw()[i]];
if (skill) value += skill.equipTierSlot[tier];
}
for (var i = 0; i < this.states().length; ++i) {
var state = this.states()[i];
if (state) value += state.equipTierSlot[tier];
}
for (var i = 0; i < this.equips().length; ++i) {
var equip = this.equips()[i];
if (equip) value += equip.equipTierSlot[tier];
}
return value.clamp(0, Yanfly.Param.EBSMaxSlots);
};
$gameParty.menuActor().equipTierSlot[1] += 1;
but to no avail...
Last edited: