Project1
标题: SummonCore 召唤插件无法正确设置等级 [打印本页]
作者: q3226257 时间: 2019-5-9 11:08
标题: SummonCore 召唤插件无法正确设置等级
1. 设置等级之后,血量不满
该问题主要是与 YEP_BaseParamControl 插件冲突,其属性被一级的时候缓存了,导致正确的初始化,可以修改插件如下
Game_Summon.prototype.initialize = function(actorId, level, turns, introAni, exitAni, masterId) {
Game_Actor.prototype.initialize.call(this, actorId);
this._level = level;
this._turns = turns;
this._introAnimation = introAni;
this._exitAnimation = exitAni;
if(this._baseParamCache){
this._baseParamCache = []
}
this.setMasterId(masterId || 0);
this.recoverAll();
};
Game_Summon.prototype.initialize = function(actorId, level, turns, introAni, exitAni, masterId) {
Game_Actor.prototype.initialize.call(this, actorId);
this._level = level;
this._turns = turns;
this._introAnimation = introAni;
this._exitAnimation = exitAni;
if(this._baseParamCache){
this._baseParamCache = []
}
this.setMasterId(masterId || 0);
this.recoverAll();
};
2. 设置等级后,攻防属性还是一级,这是因为没有在 GameActors 里面添加召唤物,可以修改如下
Game_Action.prototype.createSummons = function() {
const item = this.item();
const result = [];
for(let i = 0; i < item.summonInfo.length; i++) {
const actor = $gameActors.actor(this._subjectActorId);
const info = item.summonInfo[i];
const id = eval(info.id);
const lvl = eval(info.lvl);
const turns = eval(info.turn);
const introAni = eval(info.ani);
const exitAni = eval(info.exit);
const summon = $gameParty.summonActor(id, lvl, turns, introAni, exitAni, this._subjectActorId);
//不添加会二次初始化
$gameActors._data[id] = summon;
if(!summon) break;
actor.addSummon(summon);
summon.setX(info.x);
summon.setY(info.y);
if(this.isSkill()) {
summon.setSkillId(item.id, 's');
} else if(this.isItem()) {
summon.setSkillId(item.id, 'i');
}
BattleManager._spriteset.registerSummonSprite(summon);
result.push(summon);
}
return result;
};
Game_Action.prototype.createSummons = function() {
const item = this.item();
const result = [];
for(let i = 0; i < item.summonInfo.length; i++) {
const actor = $gameActors.actor(this._subjectActorId);
const info = item.summonInfo[i];
const id = eval(info.id);
const lvl = eval(info.lvl);
const turns = eval(info.turn);
const introAni = eval(info.ani);
const exitAni = eval(info.exit);
const summon = $gameParty.summonActor(id, lvl, turns, introAni, exitAni, this._subjectActorId);
//不添加会二次初始化
$gameActors._data[id] = summon;
if(!summon) break;
actor.addSummon(summon);
summon.setX(info.x);
summon.setY(info.y);
if(this.isSkill()) {
summon.setSkillId(item.id, 's');
} else if(this.isItem()) {
summon.setSkillId(item.id, 'i');
}
BattleManager._spriteset.registerSummonSprite(summon);
result.push(summon);
}
return result;
};
不知道我用的插件是有问题还是什么回事,还是没人用 SRD的这个召唤插件啊。。。为什么这个问题我没搜到答案呢?
作者: guoyongchao999 时间: 2019-5-10 17:26
我在用,但是脸图和其他插件冲突了,召唤出来的人物会覆盖在其他人的脸图上,这才是最让我头疼的。。。。。。。。。。
作者: q3226257 时间: 2019-5-13 09:33
.........没遇见过诶
欢迎光临 Project1 (https://rpg.blue/) |
Powered by Discuz! X3.1 |