设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1443|回复: 5
打印 上一主题 下一主题

[已经过期] 请教下脚本问题

[复制链接]

Lv4.逐梦者

梦石
0
星屑
5732
在线时间
1556 小时
注册时间
2011-6-14
帖子
520
跳转到指定楼层
1
发表于 2016-10-2 11:26:41 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
下面是一个阵形脚本, 我想问下该怎么设定新的阵形和效果

JAVASCRIPT 代码复制
  1. //
  2. //  陣形 ver1.03
  3. //
  4. // ------------------------------------------------------
  5. // Copyright (c) 2016 Yana
  6. // Released under the MIT license
  7. // [url]http://opensource.org/licenses/mit-license.php[/url]
  8. // ------------------------------------------------------
  9. //
  10. // author Yana
  11. //
  12.  
  13. var Imported = Imported || {};
  14. Imported['BattleFormation'] = 1.03;
  15. /*:
  16.  * @plugindesc ver1.03/陣形の仕組みを追加します。
  17.  * @author Yana
  18.  *
  19.  * @param
  20.  * @param 【基本設定】
  21.  *
  22.  * @param BasicFormationText
  23.  * @desc 基本陣形の名称です。
  24.  * @default 基本陣形
  25.  *
  26.  * @param BasicFormationHelp
  27.  * @desc 基本陣形に表示するヘルプです。
  28.  * @default もっとも基本となる陣形。特に特別な効果はない。
  29.  *
  30.  * @param
  31.  * @param 【メニューの設定】
  32.  *
  33.  * @param AddMenuBattleFormation
  34.  * @desc メニューに陣形の項目を追加するかの設定です。
  35.  * @default true
  36.  *
  37.  * @param MenuBattleFormationTitle
  38.  * @desc メニューに表示する陣形の名称です。
  39.  * @default 陣形
  40.  *
  41.  * @param BattleFormationInfoX
  42.  * @desc 陣形を表示するウィンドウのX座標です。evalで評価されます。
  43.  * cw:commandW sw:statusW gw:goldW h:height w:width
  44.  * @default 0
  45.  *
  46.  * @param BattleFormationInfoY
  47.  * @desc 陣形を表示するウィンドウのY座標です。evalで評価されます。
  48.  * cw:commandW sw:statusW gw:goldW h:height w:width
  49.  * @default Graphics.boxHeight - (gw.height + h)
  50.  *
  51.  * @param
  52.  * @param 【シーンの設定】
  53.  *
  54.  * @param FormationListWidth
  55.  * @desc 陣形シーン時のリスト部分の横幅です。
  56.  * @default 320
  57.  *
  58.  * @param LevelSymbol
  59.  * @desc レベルを示すシンボルです。
  60.  * 2文字以上でx:1のようなテキスト、数値でゲージ表示になります。
  61.  * @default ★
  62.  *
  63.  * @param LevelColor
  64.  * @desc レベルを示すシンボルの色です。
  65.  * Window.pngの右下のカラーのインデックスで指定してください。
  66.  * @default 6
  67.  *
  68.  * @param ExpGaugeColor1
  69.  * @desc 経験値ゲージの色1です。rgba(r,g,b,a)で指定してください。
  70.  * r,g,bは0~255の数値、aは0~1.0の数値です。
  71.  * @default rgba(128,128,255,1.0)
  72.  *
  73.  * @param ExpGaugeColor2
  74.  * @desc 経験値ゲージの色2です。rgba(r,g,b,a)で指定してください。
  75.  * r,g,bは0~255の数値、aは0~1.0の数値です。
  76.  * @default rgba(0,0,255,1.0)
  77.  *
  78.  * @param ShowParamWindow
  79.  * @desc 陣形の詳細を表示するためのウィンドウを使用するかの設定です。
  80.  * @default true
  81.  *
  82.  * @param ParamColor
  83.  * @desc 詳細ウィンドウに表示する特徴の色設定です。
  84.  * 順番に基本色、システム色、上昇色、下降色です。
  85.  * @default 6,4,24,2
  86.  *
  87.  * @param AddSkillText
  88.  * @desc 詳細ウィンドウに表示するクラスで習得するスキルの項目名です。
  89.  * @default スキル追加:
  90.  *
  91.  * @param ParamText1
  92.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  93.  * 1は有効度と無効化です。
  94.  * @default  有効度,弱体有効度,無効化
  95.  *
  96.  * @param ParamText2
  97.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  98.  * 2は追加能力値です。
  99.  * @default 命中率,回避率,会心率,会心回避,魔法回避,魔法反射率,反撃率,再生率
  100.  *
  101.  * @param ParamText3
  102.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  103.  * 3は特殊能力値です。
  104.  * @default 狙われ率,防御効果率,回復効果率,薬の知識,消費率,チャージ率,物理ダメージ率,魔法ダメージ率,床ダメージ率,経験値獲得率
  105.  *
  106.  * @param ParamText4
  107.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  108.  * 4は攻撃タブです。
  109.  * @default 攻撃属性付与:,攻撃時ステート付与:,攻撃速度,攻撃回数
  110.  *
  111.  * @param ParamText5
  112.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  113.  * 5はスキルタブです。
  114.  * @default スキルタイプ追加:,スキルタイプ封印:,スキル追加:,スキル封印:
  115.  *
  116.  * @param ParamText6
  117.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  118.  * 6は装備タブです。
  119.  * @default 武器タイプ追加:,防具タイプ追加:,装備固定:,装備封印:,二刀流
  120.  *
  121.  * @param ParamText7
  122.  * @desc 詳細ウィンドウに表示する特徴の表示名です。
  123.  * 7はその他タブです。
  124.  * @default 行動回数追加,自動戦闘,防御,身代わり,持越し,消滅エフェクト,エンカウント半減,エンカウント無効,不意打ち無効,先制率アップ,取得金額倍化,アイテム取得率倍化
  125.  *
  126.  * @param DefeatText
  127.  * @desc 消滅エフェクトで使用するサブテキストです。基本使用しません。
  128.  * @default 通常,ボス,瞬間消去,消えない
  129.  *
  130.  * @param ParamWindowWidth
  131.  * @desc 陣形の詳細を表示するためのウィンドウの横幅です。
  132.  * @default 220
  133.  *
  134.  * @param BasicWinExp
  135.  * @desc 勝利時に加算される陣形経験値の基本値です。
  136.  * @default 1
  137.  *
  138.  * @param MasterText
  139.  * @desc 陣形をマスターした時にNext欄に表示されるテキストです。
  140.  * @default Master!
  141.  *
  142.  * @param LevelUpText
  143.  * @desc 陣形のレベルが上がった時に表示されるテキストです。
  144.  * @default _nameの熟練度が上がった!
  145.  *
  146.  * @param MasterFormText
  147.  * @desc 陣形のレベルが最高値に達した時に表示されるテキストです。
  148.  * @default _nameをマスターした!
  149.  *
  150.  * @param ActiveHelpText
  151.  * @desc ステータスがアクティブなときに表示される操作ヘルプです。
  152.  * @default 決定:並び替え ←,キャンセル:リストに戻る
  153.  *
  154.  * @param DeactiveHelpText
  155.  * @desc ステータスが非アクティブなときに表示される操作ヘルプです。
  156.  * @default 決定:陣形を変更 →:陣形の詳細を確認,並び替え
  157.  *
  158.  * @param
  159.  * @param 【ホームの設定】
  160.  *
  161.  * @param HomePosition1
  162.  * @desc メンバーが1人の時のアクターのホームポジションです。
  163.  * x,yで記述してください。
  164.  * @default 700,267
  165.  *
  166.  * @param HomePosition2
  167.  * @desc メンバーが2人の時のアクターのホームポジションです。
  168.  * x,y x,yで記述してください。
  169.  * @default 640,242 700,292
  170.  *
  171.  * @param HomePosition3
  172.  * @desc メンバーが3人の時のアクターのホームポジションです。
  173.  * x,y x,y x,yで記述してください。
  174.  * @default 640,217 670,267 700,317
  175.  *
  176.  * @param HomePosition4
  177.  * @desc メンバーが4人の時のアクターのホームポジションです。
  178.  * x,y x,y x,y x,yで記述してください。
  179.  * @default 640,192 660,242 680,292 700,342
  180.  *
  181.  * @param HomePosition5
  182.  * @desc メンバーが5人の時のアクターのホームポジションです。
  183.  * x,y x,y x,y x,y x,yで記述してください。
  184.  * @default 630,187 650,227 670,267 690,307 710,347
  185.  *
  186.  * @param HomePosition6
  187.  * @desc メンバーが6人の時のアクターのホームポジションです。
  188.  * x,y x,y x,y x,y x,y x,yで記述してください。
  189.  * @default 620,167 640,207 660,247 680,287 700,327 720,367
  190.  *
  191.  * @param HomePosition7
  192.  * @desc メンバーが7人の時のアクターのホームポジションです。
  193.  * x,y x,y x,y x,y x,y x,y x,yで記述してください。
  194.  * @default 610,177 630,207 650,237 670,267 690,297 710,327 730,357
  195.  *
  196.  * @param HomePosition8
  197.  * @desc メンバーが8人の時のアクターのホームポジションです。
  198.  * x,y x,y x,y x,y x,y x,y x,y x,yで記述してください。
  199.  * @default 600,162 620,192 640,222 660,252 680,282 700,312 720,342 740,372
  200.  *
  201.  * @param HomePosition9
  202.  * @desc メンバーが9人の時のアクターのホームポジションです。
  203.  * x,y x,y x,y x,y x,y x,y x,y x,y x,yで記述してください。
  204.  * @default 590,167 610,192 630,217 650,242 670,267 690,292 710,317 730,342 750,367
  205.  *
  206.  * @param HomePosition10
  207.  * @desc メンバーが10人の時のアクターのホームポジションです。
  208.  * x,y x,y x,y x,y x,y x,y x,y x,y x,y x,yで記述してください。
  209.  * @default 580,159 600,183 620,207 640,231 660,255 680,279 700,303 720,327 740,351 760,375
  210.  *
  211.  * @help ------------------------------------------------------
  212.  * プラグインコマンド
  213.  * ------------------------------------------------------
  214.  * このプラグインには、以下のプラグインコマンドがあります。
  215.  *
  216.  * 陣形 シーン呼び出し
  217.  * BattleFormation callScene
  218.  * ・陣形シーンを呼び出します。
  219.  *
  220.  * 陣形 設定 アイテムID
  221.  * BattleFormation Set アイテムID
  222.  * ・陣形をアイテムIDに設定します。
  223.  *
  224.  * ------------------------------------------------------
  225.  * 使用方法
  226.  * ------------------------------------------------------
  227.  * ―――基本的なこと―――
  228.  * 陣形とは、アクターの位置を特定の位置に設定して、場所によってアクターの能力を強化する機能です。
  229.  * この際一人でも戦闘不能者がいると、陣形崩壊となり陣形効果は無効になります。
  230.  * いずれかの戦闘メンバーの特徴オブジェクトのメモに
  231.  * <陣形無効>
  232.  * <InvalidFormation>
  233.  * のいずれかが記述されている場合、陣形効果は無効となります。
  234.  * また、上記いずれかの要因で陣形が無効化された状態で戦闘が終了すると、陣形経験値は入手できません。
  235.  *
  236.  * ―――陣形を作る―――
  237.  * ・陣形の基本設定
  238.  * アイテムのメモ欄で設定します。
  239.  * 設定したアイテムを入手することで、その陣形が使用可能になります。
  240.  *
  241.  * 以下の設定がある場合、そのアイテムは陣形アイテムとして扱われます。
  242.  * アイテムのメモに
  243.  * <陣形設定>
  244.  * 一人目のX座標,Y座標,使用するクラスID[,配置条件]
  245.  * 二人目のX座標,Y座標,使用するクラスID[,配置条件]
  246.  * 三人目のX座標,Y座標,使用するクラスID[,配置条件]
  247.  * ・・・
  248.  * </陣形設定>
  249.  * と記述します。
  250.  *
  251.  * 一人目までなら一人陣形、二人目までなら二人、三人目までなら三人陣形・・・となります。
  252.  * クラスIDはこの位置に配置されたアクターの能力や特徴にそのクラスで設定したものが追加される設定です。
  253.  * 配置条件の記述は任意です。この部分がevalで判定され、全員がtrueの場合は陣形が有効になります。
  254.  * 省略した場合は、常にtrueとして扱われます。
  255.  *
  256.  * また、アイテム名はそのまま陣形の名前として、アイテムの説明は陣形の説明として使用されます。
  257.  *
  258.  * ・陣形経験値の設定
  259.  * 同じように、アイテムのメモに
  260.  * <陣形経験値設定:Lv2までの必要値,Lv3までの必要値,Lv4までの必要値…>
  261.  * <FormationExpSetting:Lv2までの必要値,Lv3までの必要値,Lv4までの必要値…>
  262.  * と記述することで、陣形にレベルを設定することができます。
  263.  *
  264.  * レベルの最大値は設定した個数+1となります。
  265.  * 陣形の経験値は戦闘に勝利することで蓄積されていきます。
  266.  * 陣形のレベルは、以下で解説するクラスの設定でのレベルによるステータスの補正や、習得スキルで使用されます。
  267.  *
  268.  * ―――陣形の中身を設定する―――
  269.  * 陣形の各ポジションによる補正はクラスを使用して行います。
  270.  * クラスに設定した特徴やステータス値、更に習得するスキルがそのポジションにいるアクターに追加されます。
  271.  * この際、このクラスのレベルの値は、陣形レベルが使用されます。
  272.  *
  273.  * このクラスに設定した名前は、陣形シーンで各ポジションの特徴などを確認するウィンドウに表示されます。
  274.  *
  275.  * 以下のいずれかを記述をすることで、クラスの詳細を確認するウィンドウにテキストを追加することができます。
  276.  *
  277.  * <陣形効果テキスト追加:前:表示したいテキスト>
  278.  * <陣形効果テキスト追加:後:表示したいテキスト>
  279.  * <AddFormationEffectText:F:表示したいテキスト>
  280.  * <AddFormationEffectText:L:表示したいテキスト>
  281.  *
  282.  * この際、前やFを指定した場合はほかの効果よりも前に、
  283.  * 後やLを指定した場合は他の効果より後にテキストが追加されます。
  284.  * また、
  285.  * <陣形効果テキスト追加:前:Lv2:表示したいテキスト>
  286.  * のように、前後の指定の後にLv○:を追加することで、そのレベル以上で追加されるテキストとなります。
  287.  *
  288.  * それに加えて、陣形で設定されたクラスの習得スキルのメモに
  289.  * <陣形非表示>
  290.  * <HideFormation>
  291.  * のいずれかの記述があると、そのスキルは詳細ウィンドウに表示されなくなります。
  292.  *
  293.  * ―――陣形経験値について―――
  294.  * 陣形経験値は基本的には勝利することで1ポイント追加されます。
  295.  * このポイントは、エネミーのメモに
  296.  * <陣形経験値:x>
  297.  * <BattleFormationExp:x>
  298.  * のいずれかを記述することで、そのエネミーを倒した際に追加でxポイントの陣形経験値を加算します。
  299.  *
  300.  * また、アクターやクラス等特徴を持ったオブジェクトのメモ欄に
  301.  * <陣形経験値倍率:x>
  302.  * <BattleFormationExpRate:x>
  303.  * のいずれかを記述すると、最終的に得られる陣形経験値がx倍になります。
  304.  * これらは全てのアクターで個別に反映され、重複して乗算されていくので、設定には注意してください。
  305.  * (アクター5人がそれぞれ2倍の設定を持っていると、最終的に32倍になる)
  306.  *
  307.  * ―――リストの表示について―――
  308.  * 陣形リストで表示される経験値の表記は、アイテムのメモを使ってカスタマイズできます。
  309.  * アイテムのメモに
  310.  * <レベルシンボル:x>
  311.  * <LevelSymbol:x>
  312.  * のいずれかを記述すると、その陣形の経験値のシンボルをxに指定します。
  313.  * この時、xに2文字以上を指定すると、x:1のような数値表示に、
  314.  * xに数値を指定すると、それを目盛りの幅として、||||||||のようなゲージ表示になります。
  315.  *
  316.  * 同じようにアイテムのメモに
  317.  * <シンボルカラー:x>
  318.  * <SymbolColor:x>
  319.  * と記述すると、そのシンボルやゲージ、テキストの色をxに設定します。
  320.  * xはWindow.pngの右下に並んでいるカラーのインデックスで指定してください。
  321.  *
  322.  * 更に、
  323.  * <経験値ゲージカラー1:rgba(r,g,b,a)>
  324.  * <ExpGaugeColor1:rgba(r,g,b,a)>
  325.  * のいずれかを記述することで、経験値カラーの左側をrgbaのカラーに、
  326.  *
  327.  * <経験値ゲージカラー2:rgba(r,g,b,a)>
  328.  * <ExpGaugeColor2:rgba(r,g,b,a)>
  329.  * のいずれかを記述することで、経験値カラーの右側をrgbaのカラーに変更します。
  330.  * r,g,bはそれぞれ、赤、緑、青で0~255の数値を、aは透明度で0~1.0の数値を指定してください。
  331.  *
  332.  * ------------------------------------------------------
  333.  * 利用規約
  334.  * ------------------------------------------------------
  335.  * 当プラグインはMITライセンスで公開されています。
  336.  * 使用に制限はありません。商用、アダルト、いずれにも使用できます。
  337.  * 二次配布も制限はしませんが、サポートは行いません。
  338.  * 著作表示は任意です。行わなくても利用できます。
  339.  * 要するに、特に規約はありません。
  340.  * バグ報告や使用方法等のお問合せはネ実ツクールスレ、または、Twitterにお願いします。
  341.  * [url]https://twitter.com/yanatsuki_[/url]
  342.  * 素材利用は自己責任でお願いします。
  343.  * ------------------------------------------------------
  344.  * 更新履歴:
  345.  * ver1.03:
  346.  * 詳細ウィンドウに表示する項目名を設定できるように変更。
  347.  * 経験値のレイアウトに関する設定を追加。
  348.  * ver1.02:
  349.  * 陣形で設定したクラスのパラメータが正常に反映されていないバグを修正。
  350.  * メニュー画面の現在の陣形を表示するウィンドウの座標を設定する項目を追加。
  351.  * ver1.01:
  352.  * 陣形の種類が増えた時、ウィンドウが画面外にはみ出すバグを修正。
  353.  * ver1.00:
  354.  * 公開
  355.  */
  356.  
  357. (function() {
  358.     ////////////////////////////////////////////////////////////////////////////////////
  359.  
  360.     var parameters = PluginManager.parameters('BattleFormation');
  361.     var basicFormationText = parameters['BasicFormationText'] || '基本陣形';
  362.     var basicFormationHelp = parameters['BasicFormationHelp'] || '';
  363.     var addMenuBattleFormation = parameters['AddMenuBattleFormation'] === 'true';
  364.     var battleFormationInfoX = parameters['BattleFormationInfoX'];
  365.     var battleFormationInfoY = parameters['BattleFormationInfoY'];
  366.     var formationListWidth = Number(parameters['FormationListWidth']) || 320;
  367.     var showParamWindow = parameters['ShowParamWindow'] === 'true';
  368.     var paramWindowWidth = Number(parameters['ParamWindowWidth']) || 220;
  369.     var menuBattleFormationTitle = parameters['MenuBattleFormationTitle'];
  370.     var basicWinExp = parseInt(parameters['BasicWinExp'],10);
  371.     var masterText = parameters['MasterText'];
  372.     var levelUpText = parameters['LevelUpText'];
  373.     var masterFormText = parameters['MasterFormText'];
  374.     var activeHelpText = parameters['ActiveHelpText'];
  375.     var deactiveHelpText = parameters['DeactiveHelpText'];
  376.     var addSkillText = parameters['AddSkillText'];
  377.     var levelSymbol = parameters['LevelSymbol'];
  378.     var levelColor = Number(parameters['LevelColor']);
  379.     var defeatText = parameters['DefeatText'].split(',');
  380.     var paramColor = parameters['ParamColor'].split(',');
  381.     var expGaugeColor1 = parameters['ExpGaugeColor1'] || 'rgba(128,128,255,1.0)';
  382.     var expGaugeColor2 = parameters['ExpGaugeColor2'] || 'rgba(0,0,255,1.0)';
  383.     var basicFormations = [];
  384.     var paramVocab = [];
  385.  
  386.     for (var i=1;i<=10;i++) {
  387.         var key = 'HomePosition' + i;
  388.         basicFormations[i-1] = parameters[key].split(' ');
  389.     }
  390.  
  391.     for (var i=1;i<=7;i++) {
  392.         var key = 'ParamText' + i;
  393.         paramVocab[i-1] = parameters[key].split(',');
  394.     }
  395.  
  396.     ////////////////////////////////////////////////////////////////////////////////////
  397.  
  398.     DataManager.formationStatus = function(item) {
  399.         if (!item) return this.basicFormation();
  400.         if (item._formationStatus) return item._formationStatus;
  401.         item._formationStatus = [];
  402.         var texts = item.note.split('\n');
  403.         for (var i=0,max=texts.length;i<max;i++) {
  404.             var text = texts[i];
  405.             if (text.match(/^<陣形設定>/)) {
  406.                 for (var j=i;j<max;j++) {
  407.                     var stext = texts[j];
  408.                     if (stext.match(/<\/陣形設定>/)) {
  409.                         i = j;
  410.                         break;
  411.                     }
  412.                     if (stext.match(/(\d+),(\d+),(\d+),?(.+)?/)) {
  413.                         var obj = {
  414.                             x:parseInt(RegExp.$1,10),
  415.                             y:parseInt(RegExp.$2,10),
  416.                             classId:parseInt(RegExp.$3,10),
  417.                             cond:RegExp.$4
  418.                         };
  419.                         item._formationStatus.push(obj);
  420.                     }
  421.                 }
  422.             }
  423.         }
  424.         return item._formationStatus;
  425.     };
  426.  
  427.     DataManager.bfExps = function(item) {
  428.         if (!item) return [];
  429.         var ary = [];
  430.         if (item && item.meta['陣形経験値設定'] || item.meta['FormationExpSetting']) {
  431.             if (item.meta['陣形経験値設定']) {
  432.                 ary = item.meta['陣形経験値設定'].split(',').map(function (n) {
  433.                     return parseInt(n, 10)
  434.                 });
  435.             } else if (item.meta['FormationExpSetting']) {
  436.                 ary = item.meta['FormationExpSetting'].split(',').map(function(n){
  437.                     return parseInt(n,10)
  438.                 });
  439.             }
  440.         }
  441.         return ary;
  442.     };
  443.  
  444.     DataManager.basicFormation = function() {
  445.         var size = $gameParty.battleMembers().length;
  446.         var homes = basicFormations[size-1];
  447.         var ary = [];
  448.         for (var i=0;i<size;i++) {
  449.             var home = homes[i].split(',').map(function(n){ return parseInt(n,10) });
  450.             ary.push({x:home[0],y:home[1],classId:0});
  451.         }
  452.         return ary;
  453.     };
  454.  
  455.     ////////////////////////////////////////////////////////////////////////////////////
  456.  
  457.     var __BManager_startBattle = BattleManager.startBattle;
  458.     BattleManager.startBattle = function() {
  459.         __BManager_startBattle.call(this);
  460.     };
  461.  
  462.     var __BManager_startInput = BattleManager.startInput;
  463.     BattleManager.startInput = function() {
  464.         __BManager_startInput.call(this);
  465.         $gameParty.checkBattleFormation();
  466.     };
  467.  
  468.     var __BManager_processVictory = BattleManager.processVictory;
  469.     BattleManager.processVictory = function() {
  470.         var lv = $gameParty.currentBfLevel();
  471.         $gameParty.increaseFormationExp();
  472.         this._upBfLevel = lv < $gameParty.currentBfLevel();
  473.         __BManager_processVictory.call(this);
  474.     };
  475.  
  476.     var __BManager_displayRewards = BattleManager.displayRewards;
  477.     BattleManager.displayRewards = function() {
  478.         __BManager_displayRewards.call(this);
  479.         if (this._upBfLevel) this.displayBfLevel();
  480.     };
  481.  
  482.     BattleManager.displayBfLevel = function() {
  483.         var item = $gameParty.battleFormation();
  484.         var text = '';
  485.         if ($gameParty.isMaxBfLevel(item.id)) {
  486.             text = masterFormText.replace(/_name/,item.name);
  487.         } else {
  488.             text = levelUpText.replace(/_name/,item.name);
  489.         }
  490.         $gameMessage.add('\\.' + text);
  491.     };
  492.  
  493.  
  494.     ////////////////////////////////////////////////////////////////////////////////////
  495.  
  496.     var __GInterpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
  497.     Game_Interpreter.prototype.pluginCommand = function(command, args) {
  498.         __GInterpreter_pluginCommand.call(this, command, args);
  499.         if (command === '陣形' || command === 'BattleFormation') {
  500.             switch (args[0]) {
  501.                 case 'シーン呼び出し':
  502.                 case 'callScene':
  503.                     this.callSceneBattleFormation();
  504.                     break;
  505.                 case '設定':
  506.                 case 'Set':
  507.                     var id = parseInt(args[1],10);
  508.                     var item = $dataItems[id];
  509.                     $gameParty.setBattleFormation(item);
  510.             }
  511.         }
  512.     };
  513.  
  514.     Game_Interpreter.prototype.callSceneBattleFormation = function() {
  515.         SceneManager.push(Scene_BattleFormation);
  516.     };
  517.  
  518.     ////////////////////////////////////////////////////////////////////////////////////
  519.  
  520.     var __GActor_paramPlus = Game_Actor.prototype.paramPlus;
  521.     Game_Actor.prototype.paramPlus = function(paramId) {
  522.         var value = __GActor_paramPlus.call(this, paramId);
  523.         if ($gameParty.formationEnable() && this._bfClass) {
  524.             var cl = $dataClasses[this._bfClass];
  525.             if (cl.params[paramId][$gameParty.currentBfLevel()] > 1) {
  526.                 value += cl.params[paramId][$gameParty.currentBfLevel()];
  527.             }
  528.         }
  529.         return value;
  530.     };
  531.  
  532.     var __GActor_traitObjects = Game_Actor.prototype.traitObjects;
  533.     Game_Actor.prototype.traitObjects = function() {
  534.         var result = __GActor_traitObjects.call(this);
  535.         if ($gameParty.formationEnable() && this._bfClass) {
  536.             var cl = $dataClasses[this._bfClass];
  537.             result.push(cl);
  538.         }
  539.         return result;
  540.     };
  541.  
  542.     var __GActor_skills = Game_Actor.prototype.skills;
  543.     Game_Actor.prototype.skills = function() {
  544.         var result = __GActor_skills.call(this);
  545.         return result.concat(this.bfClassSkills());
  546.     };
  547.  
  548.     Game_Actor.prototype.bfClassSkills = function() {
  549.         var result = [];
  550.         if ($gameParty.formationEnable() && this._bfClass) {
  551.             var cl = $dataClasses[this._bfClass];
  552.             for (var i=0,max=cl.learnings.length;i<max;i++) {
  553.                 var l = cl.learnings[i];
  554.                 if ($gameParty.currentBfLevel() >= l.level) {
  555.                     result.push($dataSkills[l.skillId]);
  556.                 }
  557.             }
  558.         }
  559.         return result;
  560.     };
  561.  
  562.     Game_Actor.prototype.checkFormationEnable = function(cond, id) {
  563.         if (this.isDead()) return false;
  564.         if (this.traitObjects().some(function(t){
  565.             return (t.meta['陣形無効'] || t.meta['InvalidFormation']) })) return false;
  566.         var pf = $gameParty.battleFormation();
  567.         if (pf && id === pf.id) cond = this._bfCond;
  568.         if (!cond) return true;
  569.         var a = $gameActors.actor(this.actorId());
  570.         var v = $gameVariables._data;
  571.         return eval(cond);
  572.     };
  573.  
  574.     if (Imported['yPassiveSkill']) {
  575.         var __GActor_enableSkills = Game_Actor.prototype.enableSkills;
  576.         Game_Actor.prototype.enableSkills = function() {
  577.             var skills = __GActor_enableSkills.call(this);
  578.             return skills.concat(this.bfClassSkills());
  579.         }
  580.     }
  581.  
  582.     ////////////////////////////////////////////////////////////////////////////////////
  583.  
  584.     Game_Party.prototype.refreshBattleFormation = function() {
  585.         var formation = this.battleFormation();
  586.         this.setBattleFormation(formation);
  587.         this.checkBattleFormation();
  588.     };
  589.  
  590.     Game_Party.prototype.battleFormation = function() {
  591.         if (!this._battleFormation) this._battleFormation = [];
  592.         var id = this._battleFormation[this.battleMembers().length];
  593.         return $dataItems[id];
  594.     };
  595.  
  596.     Game_Party.prototype.setBattleFormation = function(formation) {
  597.         if (!this._battleFormation) this._battleFormation = [];
  598.         var members = this.battleMembers();
  599.         var size = members.length;
  600.         var id = 0;
  601.         var data = DataManager.formationStatus(formation);
  602.         if (formation) id = formation.id;
  603.         if (id) size = data.length;
  604.         this._battleFormation[size] = id;
  605.         if (size === members.length) {
  606.             for (var i = 0; i < size; i++) {
  607.                 var member = members[i];
  608.                 var d = data[i];
  609.                 member._bfHome = [d.x, d.y];
  610.                 member._bfClass = d.classId;
  611.                 member._bfCond = d.cond;
  612.             }
  613.         }
  614.     };
  615.  
  616.     Game_Party.prototype.checkBattleFormation = function() {
  617.         this._formationEnable = this.isEnableBattleFormation();
  618.     };
  619.  
  620.     Game_Party.prototype.isEnableBattleFormation = function(id) {
  621.         var members = this.battleMembers();
  622.         var status = DataManager.formationStatus($dataItems[id]);
  623.         for (var i=0,max=members.length;i<max;i++) {
  624.             var member = members[i];
  625.             if (!member.checkFormationEnable(status[i].cond, id)) {
  626.                 return false;
  627.             }
  628.         }
  629.         return true;
  630.     };
  631.  
  632.     Game_Party.prototype.formationEnable = function() {
  633.         return this.inBattle() && this._formationEnable;
  634.     };
  635.  
  636.     Game_Party.prototype.bfLevel = function(id) {
  637.         if (!this._bfExps) return 1;
  638.         if (!this._bfExps[id]) return 1;
  639.         return this.levelForBfExp(id);
  640.     };
  641.  
  642.     Game_Party.prototype.currentBfLevel = function() {
  643.         var item = this.battleFormation();
  644.         if (!item) return 1;
  645.         return this.bfLevel(item.id);
  646.     };
  647.  
  648.     Game_Party.prototype.levelForBfExp = function(id) {
  649.         var item = $dataItems[id];
  650.         var exps = DataManager.bfExps(item);
  651.         var exp = this._bfExps[item.id];
  652.         var value = 0;
  653.         for (var i=0,max=exps.length;i<max;i++) {
  654.             value += exps[i];
  655.             if (exp < value) return i+1;
  656.         }
  657.         return i+1;
  658.     };
  659.  
  660.     Game_Party.prototype.bfExpForLevel = function(id, level) {
  661.         var item = $dataItems[id];
  662.         var exps = DataManager.bfExps(item);
  663.         var value = 0;
  664.         var max = Math.min(level-1, exps.length);
  665.         for (var i=0;i<max;i++) value += exps[i];
  666.         return value;
  667.     };
  668.  
  669.     Game_Party.prototype.increaseFormationExp = function() {
  670.         if (!this.battleFormation()) return;
  671.         var id = this.battleFormation().id;
  672.         var count = this.winExp();
  673.         var bfExp = this.bfExp(id);
  674.         this._bfExps[id] = bfExp + count;
  675.     };
  676.  
  677.     Game_Party.prototype.bfExp = function(id) {
  678.         if (!this._bfExps) this._bfExps = {};
  679.         if (!this._bfExps[id]) this._bfExps[id] = 0;
  680.         return this._bfExps[id];
  681.     };
  682.  
  683.     Game_Party.prototype.isMaxBfLevel = function(id) {
  684.         var item = $dataItems[id];
  685.         var exps = DataManager.bfExps(item);
  686.         var maxLevel = exps.length + 1;
  687.         return this.bfLevel(id) >= maxLevel;
  688.     };
  689.  
  690.     Game_Party.prototype.winExp = function() {
  691.         if (!this.isEnableBattleFormation(this.battleFormation().id)) return 0;
  692.         var value = basicWinExp;
  693.         $gameTroop.members().forEach(function(e){
  694.             if (e.enemy().meta['陣形経験値']) value += parseInt(e.enemy().meta['陣形経験値'],10);
  695.             if (e.enemy().meta['BattleFormationExp']) value += parseInt(e.enemy().meta['BattleFormationExp'],10);
  696.         }.bind(this));
  697.         $gameParty.battleMembers().forEach(function(m){
  698.             m.traitObjects().forEach(function(t){
  699.                 if (t.meta['陣形経験値倍率'] !== undefined) value *= Number(t.meta['陣形経験値倍率']);
  700.                 if (t.meta['BattleFormationExpRate'] !== undefined) value *= Number(t.meta['BattleFormationExpRate']);
  701.             }.bind(this));
  702.         }.bind(this));
  703.         return value;
  704.     };
  705.  
  706.     ////////////////////////////////////////////////////////////////////////////////////
  707.  
  708.     var __SActor_setActorHome = Sprite_Actor.prototype.setActorHome;
  709.     Sprite_Actor.prototype.setActorHome = function(index) {
  710.         __SActor_setActorHome.call(this, index);
  711.         if (!this._actor._bfHome) $gameParty.setBattleFormation(null);
  712.         var home = this._actor._bfHome;
  713.         this.setHome(home[0], home[1] + 80);
  714.         if (this._actor._home) {
  715.             this._actor._home = this._actor._bfHome;
  716.         }
  717.     };
  718.  
  719.     ////////////////////////////////////////////////////////////////////////////////////
  720.  
  721.     function Window_BFFormationList() {
  722.         this.initialize.apply(this, arguments);
  723.     }
  724.  
  725.     Window_BFFormationList.prototype = Object.create(Window_Command.prototype);
  726.     Window_BFFormationList.prototype.constructor = Window_BFFormationList;
  727.  
  728.     Window_BFFormationList.prototype.initialize = function(y) {
  729.         if ($gameParty.battleFormation() === undefined) $gameParty.setBattleFormation(null);
  730.         //this._oy = y;
  731.         Window_Command.prototype.initialize.call(this, 0, y);
  732.         this.openness = 0;
  733.         //var yy = (Graphics.boxHeight - this._oy) / 2 - (this.windowHeight() / 2) + this._oy;
  734.         //this.y = yy;
  735.         this.selectExt($gameParty.battleFormation());
  736.     };
  737.  
  738.     Window_BFFormationList.prototype.windowWidth = function() {
  739.         return formationListWidth;
  740.     };
  741.  
  742.     Window_BFFormationList.prototype.makeCommandList = function() {
  743.         this.addCommand(basicFormationText,'set',true);
  744.         var items = $gameParty.items();
  745.         for (var i=0,max=items.length;i<max;i++) {
  746.             var item = items[i];
  747.             if (item.meta['陣形設定']) {
  748.                 var data = DataManager.formationStatus(item);
  749.                 if (data.length === $gameParty.battleMembers().length) {
  750.                     this.addCommand(item.name,'set',true,item);
  751.                 }
  752.             }
  753.         }
  754.     };
  755.  
  756.     Window_BFFormationList.prototype.lineHeight = function() {
  757.         return 48;
  758.     };
  759.  
  760.     Window_BFFormationList.prototype.offsetHeight = function() {
  761.         return 0;
  762.     };
  763.  
  764.     Window_BFFormationList.prototype.maxPageItems = function() {
  765.         var hw = this._helpWindow ? this._helpWindow.height : 108;
  766.         var max = ((Graphics.boxHeight - hw) - this.standardPadding() * 2) / this.lineHeight();
  767.         return Math.floor(max);
  768.     };
  769.  
  770.     Window_BFFormationList.prototype.refresh = function() {
  771.         this.clearCommandList();
  772.         this.makeCommandList();
  773.         var l = Math.min(this._list.length,this.maxPageRows());
  774.         var mh = this.lineHeight() * this.maxPageItems() + this.standardPadding() * 2;
  775.         this.height = Math.min(l * this.lineHeight() + this.standardPadding() * 2 + this.offsetHeight(),mh);
  776.         this._upArrowSprite.y += this.offsetHeight();
  777.         this.createContents();
  778.         Window_Selectable.prototype.refresh.call(this);
  779.     };
  780.  
  781.     Window_BFFormationList.prototype.drawItem = function(index) {
  782.         var rect = this.itemRectForText(index);
  783.         var align = this.itemTextAlign();
  784.         var item = this._list[index].ext;
  785.         var exps = DataManager.bfExps(item);
  786.         var enable = !(item && !$gameParty.isEnableBattleFormation(item.id));
  787.         this.contents.fontSize = 24;
  788.         this.resetTextColor();
  789.         if (exps.length > 0) rect.y -= 8;
  790.         if (this._list[index].ext === $gameParty.battleFormation()) this.changeTextColor('rgba(128,255,128,1.0)');
  791.         this.changePaintOpacity(enable);
  792.         this.drawText(this.commandName(index), rect.x, rect.y, rect.width, align);
  793.         if (!enable) {
  794.             this.changeTextColor(this.textColor(2));
  795.             this.drawText('×', rect.x, rect.y, rect.width, 'right');
  796.         }
  797.         if (exps.length > 0) {
  798.             this.resetTextColor();
  799.             this.contents.fontSize = 16;
  800.             var id = item.id;
  801.             var exp = $gameParty.bfExp(id);
  802.             var lv = $gameParty.bfLevel(id);
  803.             var next = $gameParty.bfExpForLevel(id, lv + 1);
  804.             var crt = $gameParty.bfExpForLevel(id, lv);
  805.             var max = exps.length + 1;
  806.             var rate = next - crt > 0 ? Math.min((exp - crt) / (next - crt),1.0) : 1.0;
  807.             this.drawFormationLevel(rect,lv,max,item);
  808.             var gc1 = item.meta['経験値ゲージカラー1'] || item.meta['ExpGaugeColor1'] || expGaugeColor1;
  809.             var gc2 = item.meta['経験値ゲージカラー2'] || item.meta['ExpGaugeColor2'] || expGaugeColor2;
  810.             this.drawGauge(rect.x + 172, rect.y + 8, rect.width - 168, rate, gc1,gc2);
  811.             if ($gameParty.isMaxBfLevel(id)) {
  812.                 this.drawText(masterText,rect.x + 172, rect.y + 22, rect.width - 168, 'center');
  813.             } else {
  814.                 this.changeTextColor('rgba(180,180,255,1.0)');
  815.                 this.drawText('Next',rect.x + 172, rect.y + 22, rect.width - 168);
  816.                 this.resetTextColor();
  817.                 this.drawText((exp-crt)+'/'+(next-crt),rect.x + 172, rect.y + 22, rect.width - 168, 'right');
  818.             }
  819.         }
  820.     };
  821.  
  822.     Window_BFFormationList.prototype.drawFormationLevel = function(rect, lv, max, item) {
  823.         var symbol = item.meta['LevelSymbol'] || item.meta['レベルシンボル'] || levelSymbol;
  824.         var color = Number(item.meta['SymbolColor'] || item.meta['シンボルカラー'] || levelColor);
  825.         color = this.textColor(color);
  826.         if (isNaN(symbol)) {
  827.             if (symbol.length > 1) {
  828.                 this.changeTextColor(color);
  829.                 this.drawText(symbol + ':' + lv, rect.x, rect.y + 22, rect.width - 120);
  830.             } else {
  831.                 if (symbol) {
  832.                     this.changeTextColor(color);
  833.                     var text = '';
  834.                     for (var i = 0; i < lv; i++) text += symbol;
  835.                     this.drawText(text, rect.x, rect.y + 22, rect.width - 120);
  836.                     var tw = this.textWidth(text);
  837.                     this.changeTextColor('rgba(128,128,128,0.5)');
  838.                     text = '';
  839.                     for (var i = 0; i < max - lv; i++) text += symbol;
  840.                     this.drawText(text, rect.x + tw, rect.y + 22, rect.width - 120);
  841.                 }
  842.             }
  843.         } else {
  844.             var w = Number(symbol);
  845.             for (var i = 0; i < lv; i++) this.contents.fillRect(rect.x + (w + 1) * i, rect.y + 38, w, 16, color);
  846.             for (var i = lv; i < max; i++) this.contents.fillRect(rect.x + (w + 1) * i, rect.y + 38, w, 16, 'rgba(0,0,0,0.5)');
  847.         }
  848.         this.resetTextColor();
  849.     };
  850.  
  851.     Window_BFFormationList.prototype.formation = function() {
  852.         return DataManager.formationStatus(this.currentExt());
  853.     };
  854.  
  855.     Window_BFFormationList.prototype.updateHelp = function() {
  856.         var item = this.currentExt();
  857.         if (item) {
  858.             this.setHelpWindowItem(item);
  859.         } else {
  860.             this._helpWindow.setText(basicFormationHelp);
  861.         }
  862.     };
  863.  
  864.  
  865.     Window_BFFormationList.prototype.cursorRight = function(wrap) {
  866.         if (this.currentExt()) {
  867.             SoundManager.playOk();
  868.             this.callHandler('right');
  869.         } else {
  870.             SoundManager.playBuzzer();
  871.         }
  872.     };
  873.  
  874.     ////////////////////////////////////////////////////////////////////////////////////
  875.  
  876.  
  877.     function Window_BFStatus() {
  878.         this.initialize.apply(this, arguments);
  879.     }
  880.  
  881.     Window_BFStatus.prototype = Object.create(Window_Selectable.prototype);
  882.     Window_BFStatus.prototype.constructor = Window_BFStatus;
  883.  
  884.     Window_BFStatus.prototype.initialize = function(x,y) {
  885.         this._frameCount = 0;
  886.         this._lockIndex = -1;
  887.         var w = Graphics.boxWidth - x;
  888.         var h = Graphics.boxHeight - y + 4;
  889.         Window_Selectable.prototype.initialize.call(this, x, y, w, h);
  890.         this._actorSprites = [];
  891.         var members = $gameParty.battleMembers();
  892.         for (var i=0,max=members.length;i<max;i++) {
  893.             var actor = members[i];
  894.             var bitmap = ImageManager.loadSvActor(actor._battlerName);
  895.             var sprite = new Sprite(bitmap);
  896.             sprite.setFrame(0,0,64,64);
  897.             sprite._actor = actor;
  898.             sprite.ox = 0;
  899.             sprite.oy = 0;
  900.             this.addChild(sprite);
  901.             this._actorSprites.push(sprite);
  902.         }
  903.         this.opacity = 0;
  904.         //this.openness = 0;
  905.     };
  906.  
  907.     Window_BFStatus.prototype.standardFontSize = function() {
  908.         return 20;
  909.     };
  910.  
  911.     Window_BFStatus.prototype.standardPadding = function() {
  912.         return 8;
  913.     };
  914.  
  915.     Window_BFStatus.prototype.maxItems = function() {
  916.         return $gameParty.battleMembers().length;
  917.     };
  918.  
  919.     Window_BFStatus.prototype.itemRect = function(index) {
  920.         var fr = this._commandWindow.formation()[index];
  921.         var xx = fr.x - 420;
  922.         var yy = fr.y - 48;
  923.         return { x:xx, y:yy, width:64, height:64 };
  924.     };
  925.  
  926.     Window_BFStatus.prototype.refresh = function() {
  927.         Window_Selectable.prototype.refresh.call(this);
  928.         var text = this.active ? activeHelpText : deactiveHelpText;
  929.         this.resetTextColor();
  930.         this.drawTextEx(text, 0, this.contentsHeight() - 28, this.contentsWidth(),'right');
  931.     };
  932.  
  933.     Window_BFStatus.prototype.drawItem  = function(index) {
  934.         if (this._commandWindow) {
  935.             this.resetTextColor();
  936.             var rect = this.itemRect(index);
  937.             var item = this._commandWindow.currentExt();
  938.             if (index === this._lockIndex) {
  939.                 var color = 'rgba(180,180,180,0.5)';
  940.                 this.contents.fillRect(rect.x,rect.y,rect.width,rect.height,color);
  941.             }
  942.             if (this.isFixed(index)) {
  943.                 var color = 'rgba(255,128,128,0.5)';
  944.                 this.contents.fillRect(rect.x,rect.y,rect.width,rect.height,color);
  945.             }
  946.             var actor = this._actorSprites[index]._actor;
  947.             var status = DataManager.formationStatus(item);
  948.             if (item && !actor.checkFormationEnable(status[index].cond)){
  949.                 this.changeTextColor(this.textColor(2));
  950.                 this.drawText('×',rect.x + 64, rect.y + 32);
  951.                 this._actorSprites[index].ox = 6;
  952.                 this._actorSprites[index].oy = 2;
  953.             } else {
  954.                 this._actorSprites[index].ox = 0;
  955.                 this._actorSprites[index].oy = 0;
  956.             }
  957.             this._actorSprites[index].x = rect.x + 8;
  958.             this._actorSprites[index].y = rect.y + 8;
  959.             this.drawText(index+1,rect.x + 64, rect.y);
  960.         }
  961.     };
  962.  
  963.     Window_BFStatus.prototype.setCommandWindow = function(window) {
  964.         this._commandWindow = window;
  965.         this.refresh();
  966.     };
  967.  
  968.     Window_BFStatus.prototype.update = function() {
  969.         Window_Selectable.prototype.update.call(this);
  970.         if (this._frameCount % 12 === 0) this.updateSprite();
  971.         this._frameCount++;
  972.     };
  973.  
  974.     Window_BFStatus.prototype.updateSprite = function() {
  975.         for (var i=0,max=this._actorSprites.length;i<max;i++) {
  976.             var sprite = this._actorSprites[i];
  977.             var frame = Math.floor(this._frameCount / 12) % 3;
  978.             var sw = sprite.bitmap.width / 9;
  979.             var sh = sprite.bitmap.height / 6;
  980.             var ox = sprite.ox;
  981.             var oy = sprite.oy;
  982.             if (sprite._actor.isDead()) { ox = 6; oy = 5; }
  983.             sprite.setFrame(sw * frame + ox * sw, oy * sh, sw, sh);
  984.         }
  985.     };
  986.  
  987.     Window_BFStatus.prototype.isLock = function() {
  988.         return this._lockIndex >= 0;
  989.     };
  990.  
  991.     Window_BFStatus.prototype.setLock = function() {
  992.         this._lockIndex = this._index;
  993.         this.refresh();
  994.     };
  995.  
  996.     Window_BFStatus.prototype.clearLock = function() {
  997.         this._lockIndex = -1;
  998.         this.refresh();
  999.     };
  1000.  
  1001.     Window_BFStatus.prototype.changeActorFormation = function() {
  1002.         if (!this.isLock()) return;
  1003.         $gameParty.swapOrder(this._index, this._lockIndex);
  1004.         var ary = [];
  1005.         var members = $gameParty.battleMembers();
  1006.         for (var i=0,max=members.length;i<max;i++) {
  1007.             for (var j=0,jmax=this._actorSprites.length;j<jmax;j++) {
  1008.                 if (this._actorSprites[j]._actor === members[i]) {
  1009.                     ary.push(this._actorSprites[j]);
  1010.                     break;
  1011.                 }
  1012.             }
  1013.         }
  1014.         this._actorSprites = ary;
  1015.     };
  1016.  
  1017.     Window_BFStatus.prototype.cursorLeft = function(wrap) {
  1018.         SoundManager.playCancel();
  1019.         this.callHandler('cancel');
  1020.     };
  1021.  
  1022.     Window_BFStatus.prototype.isCurrentItemEnabled = function() {
  1023.         return !this.isFixed(this._index);
  1024.     };
  1025.  
  1026.     Window_BFStatus.prototype.isFixed = function(index) {
  1027.         if (Imported['SceneFormation']) {
  1028.             var actor = $gameParty.battleMembers()[index];
  1029.             if (actor._fixed === undefined) actor._fixed = actor.initFixed();
  1030.             if (actor._fixed) return true;
  1031.         }
  1032.         return false;
  1033.     };
  1034.  
  1035.     ////////////////////////////////////////////////////////////////////////////////////
  1036.  
  1037.     function Window_BFParameter() {
  1038.         this.initialize.apply(this, arguments);
  1039.     }
  1040.  
  1041.     Window_BFParameter.prototype = Object.create(Window_Base.prototype);
  1042.     Window_BFParameter.prototype.constructor = Window_BFParameter;
  1043.  
  1044.     Window_BFParameter.prototype.initialize = function() {
  1045.         Window_Selectable.prototype.initialize.call(this, 0,0,144,50);
  1046.         this.openness = 0;
  1047.     };
  1048.  
  1049.     Window_BFParameter.prototype.standardPadding = function() {
  1050.         return 6;
  1051.     };
  1052.  
  1053.     Window_BFParameter.prototype.standardFontSize = function() {
  1054.         return 16;
  1055.     };
  1056.  
  1057.     Window_BFParameter.prototype.setStatusWindow = function(window) {
  1058.         this._statusWindow = window;
  1059.     };
  1060.  
  1061.     Window_BFParameter.prototype.setCommandWindow = function(window) {
  1062.         this._commandWindow = window;
  1063.     };
  1064.  
  1065.     Window_BFParameter.prototype.lineHeight = function() {
  1066.         return 24;
  1067.     };
  1068.  
  1069.     Window_BFParameter.prototype.refresh = function() {
  1070.         if (showParamWindow && this._commandWindow && this._statusWindow) {
  1071.             var item = this._commandWindow.currentExt();
  1072.             var status = DataManager.formationStatus(item);
  1073.             var index = this._statusWindow._index;
  1074.             var c = $dataClasses[status[index].classId];
  1075.             var color = paramColor;
  1076.             var id = item.id;
  1077.             var ary = [];
  1078.             var ary2 = [];
  1079.             var texts = c.note.split(',');
  1080.             var level = $gameParty.bfLevel(id);
  1081.             for (var i=0,max=texts.length;i<max;i++) {
  1082.                 var text = texts[i];
  1083.                 if (text.match(/<(?:陣形効果テキスト追加|AddFormationEffectText):([前後FL]):?(?:Lv(\d+))?:(.+)>/)) {
  1084.                     if (!RegExp.$2 || Number(RegExp.$2) <= level) {
  1085.                         if (['前', 'F'].contains(RegExp.$1)) {
  1086.                             ary.push(RegExp.$3);
  1087.                         } else {
  1088.                             ary2.push(RegExp.$3);
  1089.                         }
  1090.                     }
  1091.                 }
  1092.             }
  1093.             for (var i=0,max=c.learnings.length;i<max;i++) {
  1094.                 var l = c.learnings[i];
  1095.                 var s = $dataSkills[l.skillId];
  1096.                 if (s && l.level <= level && !(l.note.includes('<陣形非表示>') || l.note.includes('<HideFormation>'))) {
  1097.                     var text = '\\C['+color[1]+']' + addSkillText + '\\C['+color[0]+']' + s.name;
  1098.                     ary.push(text);
  1099.                 }
  1100.  
  1101.             }
  1102.             for (var i=0;i<8;i++) {
  1103.                 var value = c.params[i][$gameParty.bfLevel(id)];
  1104.                 if (value > 1) {
  1105.                     ary.push([i,value]);
  1106.                 }
  1107.             }
  1108.             for (var i=0,max=c.traits.length;i<max;i++) {
  1109.                 var trait = c.traits[i];
  1110.                 if (!(trait.code === 23 && trait.dataId === 10) && !(trait.code === 55 && trait.dataId === 0)) {
  1111.                     ary.push(trait);
  1112.                 }
  1113.             }
  1114.             ary = ary.concat(ary2);
  1115.             var size = 18;
  1116.             this.height = (ary.length * (size + 2)) + this.lineHeight() + this.standardPadding() * 2 + 8;
  1117.             this.width = Math.max(this.textWidth(c.name) + 18, paramWindowWidth);
  1118.             if (ary.length > 0) this.height += 4;
  1119.             this.createContents();
  1120.             this.contents.fontSize = 20;
  1121.             this.drawText(c.name,0,1,this.contentsWidth(),'center');
  1122.             if (ary.length > 0) this.contents.fillRect(4,25,this.contentsWidth()-8,2,'rgba(255,255,255,0.5)');
  1123.             this.contents.fontSize = size;
  1124.             var n = 0;
  1125.             for (var i=0,max=ary.length;i<max;i++) {
  1126.                 if (typeof ary[i] === 'string') {
  1127.                     this.drawTextEx(ary[i], 4, (size+2) * n + 30);
  1128.                     n++;
  1129.                 } else if (ary[i][1]) {
  1130.                     var text = '\\C['+color[1]+']' + TextManager.param(ary[i][0]) + '\\C['+color[2]+']+' + ary[i][1];
  1131.                     this.drawTextEx(text, 4, (size+2) * n + 30);
  1132.                     n++;
  1133.                 } else {
  1134.                     var trait = ary[i];
  1135.                     if (this.drawTraits(trait,4, (size+2) * n + 30)) n++;
  1136.                 }
  1137.             }
  1138.             this.height = (n * (size + 2)) + this.lineHeight() + this.standardPadding() * 2 + 8;
  1139.         }
  1140.     };
  1141.  
  1142.     Window_BFParameter.prototype.drawTraits = function(trait, x, y) {
  1143.         var vocab = paramVocab;
  1144.         var color = paramColor;
  1145.         var text = '';
  1146.         var dataId = trait.dataId;
  1147.         var value = trait.value;
  1148.         var sys = '\\C['+color[1]+']';
  1149.         var cl = '\\C['+color[0]+']';
  1150.         var ud = value > 1.0 ? '\\C['+color[2]+']' : '\\C['+color[3]+']';
  1151.         var sym = value > 0 ? '+' : '';
  1152.         switch (trait.code) {
  1153.             case 11:
  1154.                 if (vocab[0][0]) {
  1155.                     var ele = $dataSystem.elements[dataId];
  1156.                     ud = value < 1.0 ? '\\C['+color[2]+']' : '\\C['+color[3]+']';
  1157.                     text = cl + ele + sys + vocab[0][0] + ud + 'x' + Math.floor(value * 100) + '%';
  1158.                 }
  1159.                 break;
  1160.             case 12:
  1161.                 if (vocab[0][1]) {
  1162.                     var param = TextManager.param(dataId);
  1163.                     ud = value < 1.0 ? '\\C['+color[2]+']' : '\\C['+color[3]+']';
  1164.                     text = cl + param + sys + vocab[0][1] + ud + 'x' + Math.floor(value * 100) + '%';
  1165.                 }
  1166.                 break;
  1167.             case 13:
  1168.                 if (vocab[0][0]) {
  1169.                     var state = $dataStates[dataId].name;
  1170.                     ud = value < 1.0 ? '\\C['+color[2]+']' : '\\C['+color[3]+']';
  1171.                     text = cl + state + sys + vocab[0][0] + ud + 'x' + Math.floor(value * 100) + '%';
  1172.                 }
  1173.                 break;
  1174.             case 14:
  1175.                 if (vocab[0][2]) {
  1176.                     var state = $dataStates[dataId].name;
  1177.                     text = cl + state + sys + vocab[0][2];
  1178.                 }
  1179.                 break;
  1180.             case 21:
  1181.                 var param = TextManager.param(dataId);
  1182.                 text = sys + param + ud + 'x' + Math.floor(value * 100) + '%';
  1183.                 break;
  1184.             case 22:
  1185.                 var xparam = vocab[1][dataId];
  1186.                 if (xparam) {
  1187.                     //if (dataId === 0 && xparam) xparam = TextManager.param(8);
  1188.                     //if (dataId === 1 && xparam) xparam = TextManager.param(9);
  1189.                     if (dataId === 7 && xparam) xparam = TextManager.hpA + xparam;
  1190.                     if (dataId === 8 && xparam) xparam = TextManager.mpA + vocab[1][7];
  1191.                     if (dataId === 9 && xparam) xparam = TextManager.tpA + vocab[1][7];
  1192.                     ud = value > 0 ? '\\C['+color[2]+']' : '\\C['+color[3]+']';
  1193.                     text = sys + xparam + ud + sym + Math.floor(value * 100) + '%';
  1194.                 }
  1195.                 break;
  1196.             case 23:
  1197.                 var sparam = vocab[2][dataId];
  1198.                 if (sparam) {
  1199.                     if (dataId === 0) ud = cl;
  1200.                     if (dataId === 4) { sparam = TextManager.mpA + sparam; ud = value < 1.0 ? '\\C['+color[2]+']' : '\\C['+color[3]+']'; }
  1201.                     if (dataId === 5) TextManager.tpA + sparam;
  1202.                     if (dataId === 6 || dataId === 7 || dataId === 8) ud = value < 1.0 ? '\\C['+color[2]+']' : '\\C['+color[3]+']';
  1203.                     text = sys + sparam + ud + 'x' + Math.floor(value * 100) + '%';
  1204.                 }
  1205.                 break;
  1206.             case 31:
  1207.                 if (vocab[3][0]) {
  1208.                     var ele = $dataSystem.elements[dataId];
  1209.                     text = sys + vocab[3][0] + cl + ele;
  1210.                 }
  1211.                 break;
  1212.             case 32:
  1213.                 if (vocab[3][1]) {
  1214.                     var state = $dataStates[dataId].name;
  1215.                     text = sys + vocab[3][1] + cl + state;
  1216.                 }
  1217.                 break;
  1218.             case 33:
  1219.                 if (vocab[3][2]) {
  1220.                     text = sys + vocab[3][2] + ud + sym + value;
  1221.                 }
  1222.                 break;
  1223.             case 34:
  1224.                 if (vocab[3][3]) {
  1225.                     text = sys + vocab[3][3] + cl + '+' + value + '回';
  1226.                 }
  1227.                 break;
  1228.             case 41:
  1229.             case 42:
  1230.                 var stype = $dataSystem.skillTypes[dataId];
  1231.                 var v = trait.code === 41 ? vocab[4][0] : vocab[4][1];
  1232.                 if (v) text = sys + v + cl + stype;
  1233.                 break;
  1234.             case 43:
  1235.             case 44:
  1236.                 var skill = $dataSkills[dataId];
  1237.                 var v = trait.code === 43 ? vocab[4][2] : vocab[4][3];
  1238.                 if (v) text = sys + v + cl + skill.name;
  1239.                 break;
  1240.             case 51:
  1241.             case 52:
  1242.                 var type = trait.code === 51 ? $dataSystem.weaponTypes[dataId] : $dataSystem.armorTypes[dataId];
  1243.                 var v = trait.code === 51 ? vocab[5][0] : vocab[5][1];
  1244.                 if (v) text = sys + v + cl + type;
  1245.                 break;
  1246.             case 53:
  1247.             case 54:
  1248.                 var etype = $dataSystem.equipTypes[dataId];
  1249.                 var v = trait.code === 53 ? vocab[5][2] : vocab[5][3];
  1250.                 if (v) text = sys + v + cl + etype;
  1251.                 break;
  1252.             case 55:
  1253.                 if (vocab[5][4]) text = sys + vocab[5][4];
  1254.                 break;
  1255.             case 61:
  1256.                 if (vocab[6][0]) {
  1257.                     ud = value > 0 ? '\\C['+color[2]+']' : '\\C['+color[3]+']';
  1258.                     text = sys + vocab[6][0] + ud + sym + (value * 100) + '%';
  1259.                 }
  1260.                 break;
  1261.             case 62:
  1262.                 if (vocab[6][1+dataId]) {
  1263.                     if (dataId === 2) text = TextManager.tpA + text;
  1264.                     text = sys + vocab[6][1 + dataId];
  1265.                 }
  1266.                 break;
  1267.             case 63:
  1268.                 if (vocab[6][5]) text = sys + vocab[6][5] + defeatText[dataId];
  1269.                 break;
  1270.             case 64:
  1271.                 if (vocab[6][6+dataId]) text = sys + vocab[6][6+dataId];
  1272.                 break;
  1273.         }
  1274.  
  1275.         if(text) this.drawTextEx(text, x, y);
  1276.         return !!text;
  1277.     };
  1278.  
  1279.     Window_BFParameter.prototype.updatePosition = function() {
  1280.         if (this._statusWindow && this._statusWindow.active) {
  1281.             var index = this._statusWindow._index;
  1282.             var rect = this._statusWindow.itemRect(index);
  1283.             this.x = rect.x - this.width + this._statusWindow.x;
  1284.             if (this._statusWindow.x > this.x){
  1285.                 this.x = rect.x + this._statusWindow.x + 80;
  1286.             }
  1287.             var y = rect.y - this.height / 2 + this._statusWindow.y + (rect.height / 2);
  1288.             y = y.clamp(this._statusWindow.y,Graphics.boxHeight - this.height);
  1289.             this.y = y;
  1290.             if (index !== this._index) {
  1291.                 this.refresh();
  1292.                 this._index = index;
  1293.             }
  1294.         }
  1295.     };
  1296.  
  1297.     ////////////////////////////////////////////////////////////////////////////////////
  1298.  
  1299.     function Window_BFInfo() {
  1300.         this.initialize.apply(this, arguments);
  1301.     }
  1302.  
  1303.     Window_BFInfo.prototype = Object.create(Window_Base.prototype);
  1304.     Window_BFInfo.prototype.constructor = Window_BFInfo;
  1305.  
  1306.     Window_BFInfo.prototype.initialize = function(x,y,w,h) {
  1307.         Window_Base.prototype.initialize.call(this, x,y,w,h);
  1308.         this.refresh();
  1309.     };
  1310.  
  1311.     Window_BFInfo.prototype.standardPadding = function() {
  1312.         return 6;
  1313.     };
  1314.  
  1315.     Window_BFInfo.prototype.refresh = function() {
  1316.         var text = $gameParty.battleFormation() ? $gameParty.battleFormation().name : basicFormationText;
  1317.         this.contents.fontSize = 22;
  1318.         this.changeTextColor(this.textColor(4));
  1319.         this.drawText(menuBattleFormationTitle,8,0,this.contentsWidth()-16,'center');
  1320.         this.contents.fillRect(4,32,this.contentsWidth()-8,2,'rgba(255,255,255,0.5)');
  1321.         this.changeTextColor(this.normalColor());
  1322.         this.drawText(text,8,32,this.contentsWidth()-16,'center');
  1323.     };
  1324.  
  1325.     ////////////////////////////////////////////////////////////////////////////////////
  1326.  
  1327.     var __WMCommand_addOriginalCommands = Window_MenuCommand.prototype.addOriginalCommands;
  1328.     Window_MenuCommand.prototype.addOriginalCommands = function() {
  1329.         __WMCommand_addOriginalCommands.call(this);
  1330.         if (addMenuBattleFormation){
  1331.             this.addCommand(menuBattleFormationTitle, 'battleFormation', true);
  1332.         }
  1333.     };
  1334.  
  1335.     var __SMenu_create = Scene_Menu.prototype.create;
  1336.     Scene_Menu.prototype.create = function() {
  1337.         __SMenu_create.call(this);
  1338.         this.createFormationInfoWindow();
  1339.     };
  1340.  
  1341.     Scene_Menu.prototype.createFormationInfoWindow = function() {
  1342.         var cw = this._commandWindow;
  1343.         var sw = this._statusWindow;
  1344.         var gw = this._goldWindow;
  1345.         var v = $gameVariables._data;
  1346.         var s = $gameSwitches._data;
  1347.         var h = this._goldWindow.height + 8;
  1348.         var w = this._goldWindow.width;
  1349.         var x = eval(battleFormationInfoX) || 0;
  1350.         var y = eval(battleFormationInfoY) || 0;
  1351.         this._fInfoWindow = new Window_BFInfo(x,y,w,h);
  1352.         this.addWindow(this._fInfoWindow);
  1353.     };
  1354.  
  1355.     var __SMenu_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
  1356.     Scene_Menu.prototype.createCommandWindow = function() {
  1357.         __SMenu_createCommandWindow.call(this);
  1358.         this._commandWindow.setHandler('battleFormation',   this.commandBattleFormation.bind(this));
  1359.     };
  1360.  
  1361.     Scene_Menu.prototype.commandBattleFormation = function() {
  1362.         SceneManager.push(Scene_BattleFormation);
  1363.     };
  1364.  
  1365.     ////////////////////////////////////////////////////////////////////////////////////
  1366.  
  1367.     function Scene_BattleFormation() {
  1368.         this.initialize.apply(this, arguments);
  1369.     }
  1370.  
  1371.     Scene_BattleFormation.prototype = Object.create(Scene_MenuBase.prototype);
  1372.     Scene_BattleFormation.prototype.constructor = Scene_BattleFormation;
  1373.  
  1374.     Scene_BattleFormation.prototype.initialize = function() {
  1375.         Scene_MenuBase.prototype.initialize.call(this);
  1376.     };
  1377.  
  1378.     Scene_BattleFormation.prototype.create = function() {
  1379.         Scene_MenuBase.prototype.create.call(this);
  1380.         this.createBackSprite();
  1381.         this.createWindowLayer();
  1382.         this.createHelpWindow();
  1383.         this.createCommandWindow();
  1384.         this.createStatusWindow();
  1385.         this.createParameterWindow();
  1386.     };
  1387.  
  1388.     Scene_BattleFormation.prototype.createBackSprite = function() {
  1389.         var back1 = new Sprite(ImageManager.loadBattleback1($gameMap._battleback1Name));
  1390.         back1.move(-92,-58);
  1391.         var back2 = new Sprite(ImageManager.loadBattleback2($gameMap._battleback2Name));
  1392.         back2.move(-92,-58);
  1393.         this.addChild(back1);
  1394.         this.addChild(back2);
  1395.     };
  1396.  
  1397.     Scene_BattleFormation.prototype.update = function() {
  1398.         if (!this.isBusy()) {
  1399.             this._commandWindow.open();
  1400.         }
  1401.         Scene_MenuBase.prototype.update.call(this);
  1402.         if (this._preIndex !== this._commandWindow.index()) {
  1403.             this._statusWindow.refresh();
  1404.             this._preIndex = this._commandWindow.index();
  1405.         }
  1406.         if (showParamWindow && this._statusWindow.active) this._paramWindow.open();
  1407.         this._paramWindow.updatePosition();
  1408.     };
  1409.  
  1410.     Scene_BattleFormation.prototype.isBusy = function() {
  1411.         return this._commandWindow.isClosing() || Scene_MenuBase.prototype.isBusy.call(this);
  1412.     };
  1413.  
  1414.     Scene_BattleFormation.prototype.terminate = function() {
  1415.         Scene_MenuBase.prototype.terminate.call(this);
  1416.     };
  1417.  
  1418.     Scene_BattleFormation.prototype.createCommandWindow = function() {
  1419.         var y = this._helpWindow.y + this._helpWindow.height;
  1420.         this._commandWindow = new Window_BFFormationList(y);
  1421.         this._commandWindow.setHandler('cancel', this.popScene.bind(this));
  1422.         this._commandWindow.setHandler('set', this.setFormation.bind(this));
  1423.         this._commandWindow.setHandler('right', this.commandStatus.bind(this));
  1424.         this.addWindow(this._commandWindow);
  1425.         this._commandWindow.setHelpWindow(this._helpWindow);
  1426.     };
  1427.  
  1428.     Scene_BattleFormation.prototype.createStatusWindow = function() {
  1429.         var x = this._commandWindow.x + this._commandWindow.width;
  1430.         var y = this._helpWindow.y + this._helpWindow.height;
  1431.         this._statusWindow = new Window_BFStatus(x,y);
  1432.         this._statusWindow.setHandler('cancel', this.onCancelStatus.bind(this));
  1433.         this._statusWindow.setHandler('ok', this.onOkStatus.bind(this));
  1434.         this._statusWindow.setCommandWindow(this._commandWindow);
  1435.         this.addWindow(this._statusWindow);
  1436.     };
  1437.  
  1438.     Scene_BattleFormation.prototype.createParameterWindow = function() {
  1439.         this._paramWindow = new Window_BFParameter();
  1440.         this._paramWindow.setStatusWindow(this._statusWindow);
  1441.         this._paramWindow.setCommandWindow(this._commandWindow);
  1442.         this.addChild(this._paramWindow);
  1443.     };
  1444.  
  1445.     Scene_BattleFormation.prototype.setFormation = function() {
  1446.         $gameParty.setBattleFormation(this._commandWindow.currentExt());
  1447.         this._commandWindow.refresh();
  1448.         this._commandWindow.activate();
  1449.     };
  1450.  
  1451.     Scene_BattleFormation.prototype.commandStatus = function() {
  1452.         this._commandWindow.deactivate();
  1453.         this._statusWindow.activate();
  1454.         this._statusWindow.select(0);
  1455.         this._statusWindow.refresh();
  1456.         this._paramWindow.refresh();
  1457.     };
  1458.  
  1459.     Scene_BattleFormation.prototype.onCancelStatus = function() {
  1460.         this._paramWindow.close();
  1461.         this._statusWindow.clearLock();
  1462.         this._statusWindow.deselect();
  1463.         this._statusWindow.deactivate();
  1464.         this._statusWindow.refresh();
  1465.         this._commandWindow.activate();
  1466.     };
  1467.  
  1468.     Scene_BattleFormation.prototype.onOkStatus = function() {
  1469.         if (!this._statusWindow.isLock()) {
  1470.             this._statusWindow.setLock();
  1471.             this._statusWindow.activate();
  1472.             this._statusWindow.refresh();
  1473.         } else {
  1474.             this._statusWindow.changeActorFormation();
  1475.             $gameParty.setBattleFormation(this._commandWindow.currentExt());
  1476.             this._statusWindow.clearLock();
  1477.             this._statusWindow.activate();
  1478.             this._commandWindow.refresh();
  1479.             this._statusWindow.refresh();
  1480.         }
  1481.     };
  1482.  
  1483.     ////////////////////////////////////////////////////////////////////////////////////
  1484.  
  1485.     var __SBattle_initialize = Scene_Battle.prototype.initialize;
  1486.     Scene_Battle.prototype.initialize = function() {
  1487.         $gameParty.refreshBattleFormation();
  1488.         __SBattle_initialize.call(this);
  1489.     };
  1490.  
  1491.     Scene_Battle.prototype.resetActorPosition = function() {
  1492.         this._spriteset._actorSprites.forEach(function(actor){
  1493.             actor.startMove(0,0);
  1494.         }.bind(this));
  1495.     };
  1496.  
  1497.     if (Imported['SceneFormation']) {
  1498.  
  1499.         var __SBattle_onMemberOk = Scene_Battle.prototype.onMemberOk;
  1500.         Scene_Battle.prototype.onMemberOk = function() {
  1501.             __SBattle_onMemberOk.call(this);
  1502.             if (this._scopeIndex === null){
  1503.                 $gameParty.refreshBattleFormation();
  1504.                 this.resetActorPosition();
  1505.             }
  1506.         };
  1507.  
  1508.         var __SBattle_onStandOk = Scene_Battle.prototype.onStandOk;
  1509.         Scene_Battle.prototype.onStandOk = function() {
  1510.             __SBattle_onStandOk.call(this);
  1511.             if (this._scopeIndex === null){
  1512.                 $gameParty.refreshBattleFormation();
  1513.                 this.resetActorPosition();
  1514.             }
  1515.         };
  1516.  
  1517.         var __SBattle_onRelease = Scene_Battle.prototype.onRelease;
  1518.         Scene_Battle.prototype.onRelease = function() {
  1519.             __SBattle_onRelease.call(this);
  1520.             $gameParty.refreshBattleFormation();
  1521.             this.resetActorPosition();
  1522.         };
  1523.  
  1524.         var __SBattle_onAdd = Scene_Battle.prototype.onAdd;
  1525.         Scene_Battle.prototype.onAdd = function() {
  1526.             __SBattle_onAdd.call(this);
  1527.             $gameParty.refreshBattleFormation();
  1528.             this.resetActorPosition();
  1529.         };
  1530.     }
  1531.  
  1532.     ////////////////////////////////////////////////////////////////////////////////////
  1533. }());

Lv6.析梦学徒

老鹰

梦石
40
星屑
33469
在线时间
6556 小时
注册时间
2012-5-26
帖子
3178

极短24评委极短23参与极短22参与极短21评委老司机慢点开短篇十吟唱者组别冠军开拓者剧作品鉴家

2
发表于 2016-10-2 12:29:26 | 只看该作者
211行以下的注释

  1. * @help ------------------------------------------------------
  2. * プラグインコマンド
  3. * ------------------------------------------------------
  4. * このプラグインには、以下のプラグインコマンドがあります。
  5. *
  6. * 陣形 シーン呼び出し
  7. * BattleFormation callScene
  8. * ・陣形シーンを呼び出します。
  9. *
  10. * 陣形 設定 アイテムID
  11. * BattleFormation Set アイテムID
  12. * ・陣形をアイテムIDに設定します。
复制代码


在 插件命令 中输入 BattleFormation callScene 来呼叫阵型窗口, 输入 BattleFormation Set アイテムID 来将当前阵型设置为ID号物品所代表的阵型(其中 アイテムID 替换为 物品id号)

挑这个主要的说下,其他的请谷歌翻译

  1. * ―――陣形を作る―――
  2. * ・陣形の基本設定
  3. * アイテムのメモ欄で設定します。
  4. * 設定したアイテムを入手することで、その陣形が使用可能になります。
  5. *
  6. * 以下の設定がある場合、そのアイテムは陣形アイテムとして扱われます。
  7. * アイテムのメモに
  8. * <陣形設定>
  9. * 一人目のX座標,Y座標,使用するクラスID[,配置条件]
  10. * 二人目のX座標,Y座標,使用するクラスID[,配置条件]
  11. * 三人目のX座標,Y座標,使用するクラスID[,配置条件]
  12. * ・・・
  13. * </陣形設定>
  14. * と記述します。
复制代码


在 物品 界面中的备注栏输入
<陣形設定>
第一个角色的x坐标, y坐标, 使用的class id [,附加条件]
第二个角色的………………
</陣形設定>

输入了几个角色,就是几个人的阵型
class id似乎是指处在该位置的角色的id号属性值会被附加算上(不知道阵法到底是干啥的,推荐结合默认脚本的角色属性编号去试试看)
附加条件可选,此处内容会被eval然后当做js脚本处理,如果全员的附加条件都返回true,阵型才有效

这个物品的名字就是阵型的名字,物品的简介就是阵型的简介。


好了,更详细的(一直到331行都是说明)请去自己翻译,因为我看着这个莫名其妙没有截图效果的插件烦了,我也不会JS
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
5732
在线时间
1556 小时
注册时间
2011-6-14
帖子
520
3
 楼主| 发表于 2016-10-2 13:02:29 | 只看该作者
本帖最后由 347780682 于 2016-10-2 13:03 编辑


额 补下效果图

说明翻译我也是看过 但是还是不会做呢,我已经按照他说明的来设置了,但是还是没有见显示新设置的阵形


点评

範例:https://t.co/QdaMYvd5dx サガ風戦闘レイアウト ver1.00 MV用サンプルプロジェクト  发表于 2016-10-2 15:16
我以为这种东西都会有个范例的,没有范例的话还是推荐插件开头的注释一行行看过去吧,我是懒得看了  发表于 2016-10-2 13:34
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
5732
在线时间
1556 小时
注册时间
2011-6-14
帖子
520
4
 楼主| 发表于 2016-10-3 13:05:58 | 只看该作者
347780682 发表于 2016-10-2 13:02
额 补下效果图

说明翻译我也是看过 但是还是不会做呢,我已经按照他说明的来设置了,但是还是没有见显 ...

@tseyik 大神你的范例我下载了 ,但是有个问题 同样的设置同样的插件,范例里面可以用, 拿出来到新工程里面就用不了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-16 16:45

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表