├── i ├── RTK1_Core-01.png ├── RTK1_Core-02.png ├── RTK1_Core-03.png ├── RTK1_Core-04.png ├── RTK1_Core-05.png ├── RTK1_Core-06.png ├── RTK1_Core-07.png ├── RTK1_Shop-01.png ├── RTK1_Shop-02.png ├── RTK1_Shop-03.png ├── RTK1_Shop-04.png ├── RTK1_Shop-05.png ├── RTK1_Shop-06.png ├── RTK1_Shop-07.png ├── RTK1_Shop-08.png ├── RTK1_Shop-09.png ├── RTK1_Shop-10.png ├── RTK1_Shop-11.png ├── RTK1_Shop-12.png ├── RTK1_Core-01.ja.png ├── RTK1_Core-02.ja.png ├── RTK1_Shop-05.ja.png ├── RTK1_Shop-07.ja.png ├── RTK1_Shop-10.ja.png ├── RTK1_Shop-12.ja.png ├── RTK1_Composite-01.png ├── RTK1_Composite-02.png ├── RTK1_Composite-03.png ├── RTK1_Composite-04.png ├── RTK1_Composite-05.png ├── RTK1_Composite-06.png ├── RTK1_Composite-07.png ├── RTK1_Composite-08.png ├── RTK1_Composite-09.png ├── RTK1_Composite-10.png ├── RTK1_Composite-11.png ├── RTK1_Composite-12.png ├── RTK1_Composite-13.png ├── RTK1_Composite-14.png ├── RTK1_Composite-15.png ├── RTK1_Composite-17.png ├── RTK1_Composite-18.png ├── RTK1_Composite-19.png ├── RTK1_Composite-20.png ├── RTK1_Composite-21.png ├── RTK1_Composite-22.png ├── RTK1_Difficulty-01.png ├── RTK_ActionLimit-01.png ├── RTK_ActionLimit-02.png ├── RTK_ActionLimit-03.png ├── RTK_ActionLimit-04.png ├── RTK_ActionLimit-05.png ├── RTK_ActionLimit-06.png ├── RTK_EnemySight-01.png ├── RTK_EnemySight-02.png ├── RTK_EnemySight-03.png ├── RTK_EnemySight-04.png ├── RTK_EnemySight-05.png ├── RTK_EnemySight-06.png ├── RTK_EnemySight-07.png ├── RTK_EnemySight-08.png ├── RTK_EnemySight-09.png ├── RTK_EnemySight-10.png ├── RTK_EnemySight-11.png ├── RTK_EnemySight-12.png ├── RTK_EnemySight-13.png ├── RTK_EnemySight-14.png ├── RTK_EnemySight-15.png ├── RTK_EventMatch-01.png ├── RTK_EventMatch-02.png ├── RTK_EventMatch-03.png ├── RTK_EventMatch-04.png ├── RTK_EventMatch-05.png ├── RTK_EventMatch-06.png ├── RTK_EventMatch-07.png ├── RTK_EventMatch-08.png ├── RTK_EventMatch-09.png ├── RTK_EventMatch-10.png ├── RTK_EventMatch-11.png ├── RTK_EventMatch-12.png ├── RTK_EventMatch-13.png ├── RTK_EventMatch-14.png ├── RTK_EventMatch-15.png ├── RTK_EventMatch-16.png ├── RTK_EventMatch-17.png ├── RTK_EventMatch-18.png ├── RTK1_Composite-03.ja.png ├── RTK1_Composite-04.ja.png ├── RTK1_Composite-07.ja.png ├── RTK1_Composite-08.ja.png ├── RTK1_Composite-09.ja.png ├── RTK1_Composite-10.ja.png ├── RTK1_Composite-11.ja.png ├── RTK1_Composite-12.ja.png ├── RTK1_Composite-13.ja.png ├── RTK1_Composite-14.ja.png ├── RTK1_Composite-16.ja.png ├── RTK1_Composite-23.ja.png ├── RTK1_Option_EnJa-01.png ├── RTK1_Option_EnJa-02.png ├── RTK1_Option_EnJa-03.png ├── RTK1_Option_EnJa-04.png ├── RTK1_Option_EnJa-05.png ├── RTK1_Option_EnJa-06.png ├── RTK1_Option_EnJa-07.png ├── RTK1_Option_EnJa-08.png ├── RTK1_Option_EnJa-09.png ├── RTK1_Option_EnJa-10.png ├── RTK1_Option_EnJa-11.png ├── RTK1_Option_EnJa-12.png ├── RTK1_Option_EnJa-13.png ├── RTK1_Option_EnJa-14.png ├── RTK1_Option_EnJa-15.png ├── RTK1_Option_EnJa-16.png ├── RTK1_Option_EnJa-17.png ├── RTK1_Option_EnJa-18.png ├── RTK1_Option_EnJa-19.png ├── RTK1_Option_EnJa-20.png ├── RTK1_Option_EnJa-21.png ├── RTK1_Option_EnJa-22.png ├── RTK1_Option_EnJa-23.png ├── RTK1_Option_EnJa-24.png ├── RTK1_Option_EnJa-25.png ├── RTK1_Option_EnJa-26.png ├── RTK1_Option_EnJa-27.png ├── RTK1_Option_EnJa-28.png ├── RTK1_Option_EnJa-29.png ├── RTK_TroopEncounter-01.png ├── RTK_TroopEncounter-02.png ├── RTK_TroopEncounter-03.png ├── RTK_TroopEncounter-04.png ├── RTK_TroopEncounter-05.png ├── RTK_TroopEncounter-06.png ├── RTK_TroopEncounter-07.png ├── RTK_TroopEncounter-08.png ├── RTK1_Option_EnJa-01.ja.png ├── RTK1_Option_EnJa-02.ja.png ├── RTK1_Option_EnJa-06.ja.png ├── RTK1_Option_EnJa-07.ja.png ├── RTK1_Option_EnJa-08.ja.png ├── RTK1_MapLocalVariables-01.png ├── RTK1_MapLocalVariables-02.png ├── RTK1_MapLocalVariables-03.png ├── RTK1_MapLocalVariables-04.png ├── RTK1_MapLocalVariables-05.png ├── RTK1_MapLocalVariables-06.png ├── RTK1_MapLocalVariables-07.png └── RTK1_MapLocalVariables-08.png ├── guide ├── i │ ├── plugin-dev-02.png │ ├── plugin-dev-03.png │ ├── plugin-dev-04.png │ ├── plugin-dev-05.png │ ├── plugin-dev-06.png │ ├── plugin-dev-09.png │ ├── version-131-01.png │ ├── plugin-dev-01.ja.png │ ├── plugin-dev-02-03.png │ ├── plugin-dev-03-01.png │ ├── plugin-dev-05-01.png │ ├── plugin-dev-05-02.png │ ├── plugin-dev-05-03.png │ ├── plugin-dev-05-04.png │ ├── plugin-dev-05-05.png │ ├── plugin-dev-07.ja.png │ ├── plugin-dev-08.ja.png │ ├── plugin-dev-02-01.ja.png │ └── plugin-dev-02-02.ja.png ├── RTK_Test.js ├── RTK_Test2.js ├── RTK_ShowID.js ├── plugin-dev-04.ja.md └── version-131.md ├── memo ├── i │ ├── 201606-plugin-01.png │ ├── 201607-battle-01.png │ ├── 201607-battle-02.png │ ├── 201607-battle-03.png │ ├── 201607-meta-01.png │ ├── 201607-meta-02.png │ ├── 201607-meta-03.png │ ├── 201607-pixi-01.png │ ├── 201605-2nd-try-01.png │ ├── 201605-2nd-try-02.png │ ├── 201605-2nd-try-03.png │ ├── 201605-2nd-try-04.png │ ├── 201605-2nd-try-05.png │ ├── 201605-2nd-try-06.png │ ├── 201605-2nd-try-07.png │ ├── 201605-2nd-try-08.png │ ├── 201605-2nd-try-09.png │ ├── 201605-2nd-try-10.png │ ├── 201605-2nd-try-11.png │ ├── 201605-1st-study-01.png │ ├── 201606-enhance-options-01.png │ ├── 201606-enhance-options-02.png │ ├── 201606-enhance-options-03.png │ ├── 201606-multi-language-01.png │ ├── 201606-multi-language-02.png │ ├── 201606-multi-language-03.png │ ├── 201606-multi-language-04.png │ ├── 201606-multi-language-05.png │ └── 201606-multi-language-06.png ├── 201606-plugin.md ├── 201607-meta.md ├── 201607-can-pass.md ├── 201605-2nd-try.md └── 201606-multi-language.md ├── memo.ja ├── i │ ├── 201401-jgss134_01.png │ ├── 201401-jgss134_02.png │ ├── 201401-jgss134_03.png │ ├── 201401-jgss134_04.png │ ├── 201401-jgss134_05.png │ ├── 201701-scenes2_01.png │ ├── 201701-scenes2_02.png │ ├── 201701-scenes2_03.png │ ├── 201701-scenes2_04.png │ ├── 201701-scenes2_05.png │ ├── 201701-scenes2_06.png │ ├── 201701-scenes2_07.png │ ├── 201701-scenes2_08.png │ ├── 201701-scenes2_09.png │ ├── 201701-scenes2_10.png │ ├── 201701-scenes2_11.png │ ├── 201701-scenes2_12.png │ ├── 201701-scenes_01.png │ ├── 201701-scenes_02.png │ ├── 201701-scenes_03.png │ ├── 201701-scenes_04.png │ ├── 201701-scenes_05.png │ ├── 201702-window2_01.png │ ├── 201702-window2_02.png │ ├── 201702-window2_03.png │ ├── 201702-window2_04.png │ ├── 201702-window2_05.png │ ├── 201702-window2_06.png │ ├── 201702-window2_07.png │ ├── 201702-window2_08.png │ ├── 201702-window2_09.png │ ├── 201702-window2_10.png │ ├── 201702-window2_11.png │ ├── 201702-window_01.png │ ├── 201702-window_02.png │ ├── 201702-window_03.png │ ├── 201702-window_04.png │ ├── 201702-window_05.png │ ├── 201702-window_06.png │ ├── 201702-window_07.png │ ├── 201702-window_08.png │ ├── 201702-window_09.png │ ├── 201702-window_10.png │ ├── 201703-hsrpg1_01.png │ ├── 201703-hsrpg1_02.png │ ├── 201703-hsrpg1_03.png │ ├── 201703-jgss140_01.png │ ├── 201703-jgss140_02.png │ ├── 201401-jgss134_2_01.png │ └── 201707-jgss150_2_01.png ├── index.md ├── 201703-jgss140.md └── RTK_ShopCategory.js ├── archive ├── RTK_TroopEncounter_v1.00.js ├── RTK1_TestSuite_v1.12.js ├── RTK_TroopEncounter_v1.01.js ├── RTK_ActorTraits_v1.00.js ├── RTK_EnemySight_v1.01.js ├── RTK_EnemySight_v1.00.js ├── RTK_EventMatch_v1.00.js ├── RTK_EnemySight_v1.02.js ├── RTK_ActionLimit_v1.00.js ├── RTK_TroopEncounter_v1.02.js └── RTK_ActionLimit_v1.01.js ├── RTK_VariablePacker.js ├── README.md ├── RTK1_TestSuite.js ├── RTK1_MapLocalVariables.ja.md ├── README.ja.md ├── RTK_ActionRate.js ├── RTK1_MapLocalVariables.md ├── RTK_EnemySight.js ├── RTK_ActionLimit.ja.md ├── RTK_TroopEncounter.ja.md ├── RTK_EnemySight.ja.md ├── RTK_EventMatch.js ├── RTK1_MapLocalVariables.js ├── RTK_ActorTraits.js ├── RTK_ActionLimit.js └── RTK1_Shop.ja.md /i/RTK1_Core-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Core-01.png -------------------------------------------------------------------------------- /i/RTK1_Core-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Core-02.png -------------------------------------------------------------------------------- /i/RTK1_Core-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Core-03.png -------------------------------------------------------------------------------- /i/RTK1_Core-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Core-04.png -------------------------------------------------------------------------------- /i/RTK1_Core-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Core-05.png -------------------------------------------------------------------------------- /i/RTK1_Core-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Core-06.png -------------------------------------------------------------------------------- /i/RTK1_Core-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Core-07.png -------------------------------------------------------------------------------- /i/RTK1_Shop-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-01.png -------------------------------------------------------------------------------- /i/RTK1_Shop-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-02.png -------------------------------------------------------------------------------- /i/RTK1_Shop-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-03.png -------------------------------------------------------------------------------- /i/RTK1_Shop-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-04.png -------------------------------------------------------------------------------- /i/RTK1_Shop-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-05.png -------------------------------------------------------------------------------- /i/RTK1_Shop-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-06.png -------------------------------------------------------------------------------- /i/RTK1_Shop-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-07.png -------------------------------------------------------------------------------- /i/RTK1_Shop-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-08.png -------------------------------------------------------------------------------- /i/RTK1_Shop-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-09.png -------------------------------------------------------------------------------- /i/RTK1_Shop-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-10.png -------------------------------------------------------------------------------- /i/RTK1_Shop-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-11.png -------------------------------------------------------------------------------- /i/RTK1_Shop-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-12.png -------------------------------------------------------------------------------- /i/RTK1_Core-01.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Core-01.ja.png -------------------------------------------------------------------------------- /i/RTK1_Core-02.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Core-02.ja.png -------------------------------------------------------------------------------- /i/RTK1_Shop-05.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-05.ja.png -------------------------------------------------------------------------------- /i/RTK1_Shop-07.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-07.ja.png -------------------------------------------------------------------------------- /i/RTK1_Shop-10.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-10.ja.png -------------------------------------------------------------------------------- /i/RTK1_Shop-12.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Shop-12.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-01.png -------------------------------------------------------------------------------- /i/RTK1_Composite-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-02.png -------------------------------------------------------------------------------- /i/RTK1_Composite-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-03.png -------------------------------------------------------------------------------- /i/RTK1_Composite-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-04.png -------------------------------------------------------------------------------- /i/RTK1_Composite-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-05.png -------------------------------------------------------------------------------- /i/RTK1_Composite-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-06.png -------------------------------------------------------------------------------- /i/RTK1_Composite-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-07.png -------------------------------------------------------------------------------- /i/RTK1_Composite-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-08.png -------------------------------------------------------------------------------- /i/RTK1_Composite-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-09.png -------------------------------------------------------------------------------- /i/RTK1_Composite-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-10.png -------------------------------------------------------------------------------- /i/RTK1_Composite-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-11.png -------------------------------------------------------------------------------- /i/RTK1_Composite-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-12.png -------------------------------------------------------------------------------- /i/RTK1_Composite-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-13.png -------------------------------------------------------------------------------- /i/RTK1_Composite-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-14.png -------------------------------------------------------------------------------- /i/RTK1_Composite-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-15.png -------------------------------------------------------------------------------- /i/RTK1_Composite-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-17.png -------------------------------------------------------------------------------- /i/RTK1_Composite-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-18.png -------------------------------------------------------------------------------- /i/RTK1_Composite-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-19.png -------------------------------------------------------------------------------- /i/RTK1_Composite-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-20.png -------------------------------------------------------------------------------- /i/RTK1_Composite-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-21.png -------------------------------------------------------------------------------- /i/RTK1_Composite-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-22.png -------------------------------------------------------------------------------- /i/RTK1_Difficulty-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Difficulty-01.png -------------------------------------------------------------------------------- /i/RTK_ActionLimit-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_ActionLimit-01.png -------------------------------------------------------------------------------- /i/RTK_ActionLimit-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_ActionLimit-02.png -------------------------------------------------------------------------------- /i/RTK_ActionLimit-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_ActionLimit-03.png -------------------------------------------------------------------------------- /i/RTK_ActionLimit-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_ActionLimit-04.png -------------------------------------------------------------------------------- /i/RTK_ActionLimit-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_ActionLimit-05.png -------------------------------------------------------------------------------- /i/RTK_ActionLimit-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_ActionLimit-06.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-01.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-02.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-03.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-04.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-05.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-06.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-07.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-08.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-09.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-10.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-11.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-12.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-13.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-14.png -------------------------------------------------------------------------------- /i/RTK_EnemySight-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EnemySight-15.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-01.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-02.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-03.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-04.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-05.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-06.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-07.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-08.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-09.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-10.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-11.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-12.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-13.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-14.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-15.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-16.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-17.png -------------------------------------------------------------------------------- /i/RTK_EventMatch-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_EventMatch-18.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-02.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-03.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-04.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-05.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-06.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-09.png -------------------------------------------------------------------------------- /guide/i/version-131-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/version-131-01.png -------------------------------------------------------------------------------- /i/RTK1_Composite-03.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-03.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-04.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-04.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-07.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-07.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-08.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-08.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-09.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-09.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-10.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-10.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-11.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-11.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-12.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-12.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-13.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-13.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-14.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-14.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-16.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-16.ja.png -------------------------------------------------------------------------------- /i/RTK1_Composite-23.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Composite-23.ja.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-01.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-02.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-03.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-04.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-05.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-06.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-07.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-08.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-09.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-10.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-11.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-12.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-13.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-14.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-15.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-16.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-17.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-18.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-19.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-20.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-21.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-22.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-23.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-24.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-25.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-26.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-27.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-28.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-29.png -------------------------------------------------------------------------------- /i/RTK_TroopEncounter-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_TroopEncounter-01.png -------------------------------------------------------------------------------- /i/RTK_TroopEncounter-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_TroopEncounter-02.png -------------------------------------------------------------------------------- /i/RTK_TroopEncounter-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_TroopEncounter-03.png -------------------------------------------------------------------------------- /i/RTK_TroopEncounter-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_TroopEncounter-04.png -------------------------------------------------------------------------------- /i/RTK_TroopEncounter-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_TroopEncounter-05.png -------------------------------------------------------------------------------- /i/RTK_TroopEncounter-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_TroopEncounter-06.png -------------------------------------------------------------------------------- /i/RTK_TroopEncounter-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_TroopEncounter-07.png -------------------------------------------------------------------------------- /i/RTK_TroopEncounter-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK_TroopEncounter-08.png -------------------------------------------------------------------------------- /memo/i/201606-plugin-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201606-plugin-01.png -------------------------------------------------------------------------------- /memo/i/201607-battle-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201607-battle-01.png -------------------------------------------------------------------------------- /memo/i/201607-battle-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201607-battle-02.png -------------------------------------------------------------------------------- /memo/i/201607-battle-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201607-battle-03.png -------------------------------------------------------------------------------- /memo/i/201607-meta-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201607-meta-01.png -------------------------------------------------------------------------------- /memo/i/201607-meta-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201607-meta-02.png -------------------------------------------------------------------------------- /memo/i/201607-meta-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201607-meta-03.png -------------------------------------------------------------------------------- /memo/i/201607-pixi-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201607-pixi-01.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-01.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-01.ja.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-02-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-02-03.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-03-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-03-01.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-05-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-05-01.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-05-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-05-02.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-05-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-05-03.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-05-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-05-04.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-05-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-05-05.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-07.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-07.ja.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-08.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-08.ja.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-01.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-01.ja.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-02.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-02.ja.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-06.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-06.ja.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-07.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-07.ja.png -------------------------------------------------------------------------------- /i/RTK1_Option_EnJa-08.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_Option_EnJa-08.ja.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-01.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-02.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-03.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-04.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-05.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-06.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-07.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-08.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-09.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-10.png -------------------------------------------------------------------------------- /memo/i/201605-2nd-try-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-2nd-try-11.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-02-01.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-02-01.ja.png -------------------------------------------------------------------------------- /guide/i/plugin-dev-02-02.ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/guide/i/plugin-dev-02-02.ja.png -------------------------------------------------------------------------------- /i/RTK1_MapLocalVariables-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_MapLocalVariables-01.png -------------------------------------------------------------------------------- /i/RTK1_MapLocalVariables-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_MapLocalVariables-02.png -------------------------------------------------------------------------------- /i/RTK1_MapLocalVariables-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_MapLocalVariables-03.png -------------------------------------------------------------------------------- /i/RTK1_MapLocalVariables-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_MapLocalVariables-04.png -------------------------------------------------------------------------------- /i/RTK1_MapLocalVariables-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_MapLocalVariables-05.png -------------------------------------------------------------------------------- /i/RTK1_MapLocalVariables-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_MapLocalVariables-06.png -------------------------------------------------------------------------------- /i/RTK1_MapLocalVariables-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_MapLocalVariables-07.png -------------------------------------------------------------------------------- /i/RTK1_MapLocalVariables-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/i/RTK1_MapLocalVariables-08.png -------------------------------------------------------------------------------- /memo.ja/i/201401-jgss134_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201401-jgss134_01.png -------------------------------------------------------------------------------- /memo.ja/i/201401-jgss134_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201401-jgss134_02.png -------------------------------------------------------------------------------- /memo.ja/i/201401-jgss134_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201401-jgss134_03.png -------------------------------------------------------------------------------- /memo.ja/i/201401-jgss134_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201401-jgss134_04.png -------------------------------------------------------------------------------- /memo.ja/i/201401-jgss134_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201401-jgss134_05.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_01.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_02.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_03.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_04.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_05.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_06.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_07.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_08.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_09.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_10.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_11.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes2_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes2_12.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes_01.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes_02.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes_03.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes_04.png -------------------------------------------------------------------------------- /memo.ja/i/201701-scenes_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201701-scenes_05.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_01.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_02.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_03.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_04.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_05.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_06.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_07.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_08.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_09.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_10.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window2_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window2_11.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window_01.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window_02.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window_03.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window_04.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window_05.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window_06.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window_07.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window_08.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window_09.png -------------------------------------------------------------------------------- /memo.ja/i/201702-window_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201702-window_10.png -------------------------------------------------------------------------------- /memo.ja/i/201703-hsrpg1_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201703-hsrpg1_01.png -------------------------------------------------------------------------------- /memo.ja/i/201703-hsrpg1_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201703-hsrpg1_02.png -------------------------------------------------------------------------------- /memo.ja/i/201703-hsrpg1_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201703-hsrpg1_03.png -------------------------------------------------------------------------------- /memo.ja/i/201703-jgss140_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201703-jgss140_01.png -------------------------------------------------------------------------------- /memo.ja/i/201703-jgss140_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201703-jgss140_02.png -------------------------------------------------------------------------------- /memo/i/201605-1st-study-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201605-1st-study-01.png -------------------------------------------------------------------------------- /memo.ja/i/201401-jgss134_2_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201401-jgss134_2_01.png -------------------------------------------------------------------------------- /memo.ja/i/201707-jgss150_2_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo.ja/i/201707-jgss150_2_01.png -------------------------------------------------------------------------------- /memo/i/201606-enhance-options-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201606-enhance-options-01.png -------------------------------------------------------------------------------- /memo/i/201606-enhance-options-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201606-enhance-options-02.png -------------------------------------------------------------------------------- /memo/i/201606-enhance-options-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201606-enhance-options-03.png -------------------------------------------------------------------------------- /memo/i/201606-multi-language-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201606-multi-language-01.png -------------------------------------------------------------------------------- /memo/i/201606-multi-language-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201606-multi-language-02.png -------------------------------------------------------------------------------- /memo/i/201606-multi-language-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201606-multi-language-03.png -------------------------------------------------------------------------------- /memo/i/201606-multi-language-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201606-multi-language-04.png -------------------------------------------------------------------------------- /memo/i/201606-multi-language-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201606-multi-language-05.png -------------------------------------------------------------------------------- /memo/i/201606-multi-language-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yamachan/jgss-hack/HEAD/memo/i/201606-multi-language-06.png -------------------------------------------------------------------------------- /guide/RTK_Test.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_Test.js 2016/07/30 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc テスト用プラグイン 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @help このプラグインにはプラグインコマンドはありません。 11 | * テスト用に作成したものなので、実際に利用する場合には適当にリネームしてください 12 | */ 13 | 14 | (function(_global) { 15 | // ここにプラグイン処理を記載 16 | })(this); 17 | -------------------------------------------------------------------------------- /guide/RTK_Test2.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_Test2.js 2020/08/16 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc Test Plugin 2 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @help This plugin does not provide plugin commands. 11 | * This is for the test purpose only. So, please rename for the production use. 12 | */ 13 | 14 | /*:ja 15 | * @plugindesc テスト用プラグイン2 16 | * @author Toshio Yamashita (yamachan) 17 | * 18 | * @help このプラグインにはプラグインコマンドはありません。 19 | * テスト用に作成したものなので、実際に利用する場合には適当にリネームしてください 20 | */ 21 | 22 | (function(_global) { 23 | "use strict"; 24 | var N = document.currentScript.src.replace(/^.*\/([^/]+)\.js$/, '$1'); 25 | var param = PluginManager.parameters(N); 26 | 27 | // ここにプラグイン処理を記載 28 | })(this); 29 | -------------------------------------------------------------------------------- /memo.ja/index.md: -------------------------------------------------------------------------------- 1 | [トップページに戻る](../README.ja.md) 2 | 3 | # RPGツクールMV JGSS 技術メモ 4 | 5 | RPGツクールMV で利用する JavaScript ベースの Game Scripting System (JGSS) 関連の技術メモです。 JS(JavaScript)の基本知識がある方が対象です。 6 | 7 | ## 技術メモの一覧 8 | 9 | | 公開 | タイトル | 対象ver | 概要 | 10 | |:--:|:-----------|:--:|:-------------| 11 | | 2017年1月 | [JGSS ver1.2.0 から ver1.3.4 への変化 (前編)](201401-jgss134.md) | 1.3.4 | plugins.js, rpg_core.js について | 12 | | 2017年1月 | [JGSS ver1.2.0 から ver1.3.4 への変化 (後編)](201401-jgss134_2.md) | 1.3.4 | rpg_sprites.js, rpg_objects.js, rpg_scenes.js, rpg_managers.js について | 13 | | 2017年1月 | [マップ移動中のコードの流れ](201701-scenes.md) | 1.3.4 | マップ上でキャラが動いている時のコード | 14 | | 2017年1月 | [マップ移動中のコードの流れ その2](201701-scenes2.md) | 1.3.4 | マップからマップを移動する時のコード | 15 | | 2017年2月 | [ウィンドウ表示のコードの流れ](201702-window.md) | 1.3.4 | マップ名表示のコードを眺め、いろいろと遊んでみる | 16 | | 2017年2月 | [ショップ販売のカテゴリ化プラグインを作成してみる](201702-window2.md) | 1.3.4 | ウィンドウ表示のコードの流れ、の実践編? | 17 | | 2017年3月 | [ハクスラRPG的なプラグインを作ってみる1](201703-hsrpg1.md) | 1.3.4 | まずはプラグインの構想とアイテム表示の色指定と数量の非表示 | 18 | | 2017年3月 | [JGSS ver1.3.4 から ver1.4.0 への変化](201703-jgss140.md) | 1.4.0 | JavaScriptコードにほとんど変化なし | 19 | | 2017年7月 | [JGSS ver1.4.0 から ver1.5.0 への変化 (その1)](201707-jgss150.md) | 1.5.0 | rpg_core.js の ImageCache,RequestQueue クラスについて | 20 | | 2017年7月 | [JGSS ver1.4.0 から ver1.5.0 への変化 (その2)](201707-jgss150_2.md) | 1.5.0 | rpg_core.js の ResourceHandler,JsonEx,その他の拡張 について | 21 | | 2017年7月 | [JGSS ver1.4.0 から ver1.5.0 への変化 (その3)](201707-jgss150_3.md) | 1.5.0 | rpg_objects.js と rpg_manager.js について | 22 | | 2017年7月 | [JGSS ver1.4.0 から ver1.5.0 への変化 (その4)](201707-jgss150_4.md) | 1.5.0 | rpg_sprites.js、rpg_windows.js、rpg_scenes.js について | 23 | 24 | [トップページに戻る](../README.ja.md) 25 | -------------------------------------------------------------------------------- /archive/RTK_TroopEncounter_v1.00.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_TroopEncounter.js ver1.00 2016/06/26 3 | //============================================================================= 4 | 5 | /*: 6 | * @plugindesc Control to encount Troops in Map 7 | * @author Toshio Yamashita (yamachan) 8 | * 9 | * @param tag_base 10 | * @desc Tag base name used in Troops's note. 11 | * @default encount_ 12 | * 13 | * @help This plugin does not provide plugin commands. 14 | * 15 | * Enemy Note: 16 | * # This enemy doesn't encount when switch #n is OFF 17 | */ 18 | 19 | /*:ja 20 | * @plugindesc マップで敵グループとの遭遇をコントロール 21 | * @author Toshio Yamashita (yamachan) 22 | * 23 | * @param tag_base 24 | * @desc 敵グループのノート欄で使用するタグ名のベース 25 | * @default encount_ 26 | * 27 | * @help このプラグインにはプラグインコマンドはありません。 28 | * 29 | * 敵キャラのメモ: 30 | * # 指定したn番スイッチがOFFならエンカウントしない 31 | */ 32 | 33 | //----------------------------------------------------------------------------- 34 | 35 | 36 | (function(_global) { 37 | var N = 'RTK_TroopEncounter'; 38 | 39 | var param = PluginManager.parameters(N); 40 | var tag_base = param['tag_base'] || "encount_"; 41 | 42 | var _Game_Player_meetsEncounterConditions = Game_Player.prototype.meetsEncounterConditions; 43 | Game_Player.prototype.meetsEncounterConditions = function(encounter) { 44 | var ret = _Game_Player_meetsEncounterConditions.call(this, encounter); 45 | if (ret) { 46 | var troop = $dataTroops[encounter.troopId]; 47 | for (var l=0; l 0 && !$gameSwitches._data[sw]) { 51 | return false; 52 | } 53 | } 54 | } 55 | return ret; 56 | }; 57 | })(this); 58 | 59 | -------------------------------------------------------------------------------- /RTK_VariablePacker.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_VariablePacker.js ver1.00 2016/06/26 3 | //============================================================================= 4 | 5 | /*: 6 | * @plugindesc Plugin command to pack/unpack variables 7 | * @author Toshio Yamashita (yamachan) 8 | * 9 | * @help 10 | * 11 | * Plugin Command: 12 | * VariablePacker pack 4,2,1 # pack value 4-5 (length=2) to 1 13 | * VariablePacker unpack 1,4 # unpack 1 into 4- 14 | */ 15 | 16 | /*:ja 17 | * @plugindesc 変数をパック/アンパックするプラグインコマンド 18 | * @author Toshio Yamashita (yamachan) 19 | * 20 | * @help 21 | * 22 | * プラグインコマンド: 23 | * VariablePacker pack 4,2,1 # 変数4~5(サイズが2)を1にパック 24 | * VariablePacker unpack 1,4 # 変数1から4~にアンパック 25 | */ 26 | 27 | //----------------------------------------------------------------------------- 28 | 29 | 30 | (function(_global) { 31 | var N = 'RTK_VariablePacker'; 32 | 33 | var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; 34 | Game_Interpreter.prototype.pluginCommand = function(command, args) { 35 | _Game_Interpreter_pluginCommand.call(this, command, args); 36 | if (command == "VariablePacker" && args.length == 2) { 37 | var a = args[1].split(","); 38 | if (args[0] == "pack" && a.length == 3) { 39 | var start = Number(a[0]); 40 | var len = Number(a[1]); 41 | var target = Number(a[2]); 42 | if (start > 0 && len > 0 && target > 0 && start + len <= $gameVariables._data.length) { 43 | var v = []; 44 | for (var l=0; l 0 && start > 0 && target <= $gameVariables._data.length) { 53 | var v = $gameVariables._data[target]; 54 | if (v instanceof Array && start + v.length <= $gameVariables._data.length) { 55 | for (var l=0; l # This enemy doesn't encount when switch #n is OFF 21 | * # This enemy doesn't encount when switch #n is ON 22 | */ 23 | 24 | /*:ja 25 | * @plugindesc マップで敵グループとの遭遇をコントロール 26 | * @author Toshio Yamashita (yamachan) 27 | * 28 | * @param tag base 29 | * @desc 敵グループのノート欄で使用するタグ名のベース 30 | * @default encount_ 31 | * 32 | * @param encount switch 33 | * @desc 指定したスイッチがOFFならエンカウントしない (0:OFF) 34 | * @default 0 35 | * 36 | * @help このプラグインにはプラグインコマンドはありません。 37 | * 38 | * 敵キャラのメモ: 39 | * # 指定したn番スイッチがOFFならエンカウントしない 40 | * # 指定したn番スイッチがONならエンカウントしない 41 | */ 42 | 43 | //----------------------------------------------------------------------------- 44 | 45 | 46 | (function(_global) { 47 | var N = 'RTK_TroopEncounter'; 48 | 49 | var param = PluginManager.parameters(N); 50 | var tag_base = param['tag base'] || "encount_"; 51 | var all_switch = Number(param['encount switch']||"0"); 52 | 53 | var _Game_Player_meetsEncounterConditions = Game_Player.prototype.meetsEncounterConditions; 54 | Game_Player.prototype.meetsEncounterConditions = function(encounter) { 55 | var ret = _Game_Player_meetsEncounterConditions.call(this, encounter); 56 | if (ret) { 57 | if (all_switch > 0 && !$gameSwitches._data[all_switch]) { 58 | return false; 59 | } 60 | var troop = $dataTroops[encounter.troopId]; 61 | for (var l=0; l 0 && !$gameSwitches._data[sw]) { 65 | return false; 66 | } 67 | sw = Number((enemy.meta||{})[tag_base + "!sw"]||"0"); 68 | if (sw > 0 && $gameSwitches._data[sw]) { 69 | return false; 70 | } 71 | } 72 | } 73 | return ret; 74 | }; 75 | })(this); 76 | 77 | -------------------------------------------------------------------------------- /RTK1_MapLocalVariables.ja.md: -------------------------------------------------------------------------------- 1 | [English version](RTK1_MapLocalVariables.md) | [トップページに戻る](README.ja.md) 2 | 3 | # [RTK1_MapLocalVariables](RTK1_MapLocalVariables.js) プラグイン 4 | 5 | RPGツクール MV 用に作成した、マップローカル変数を実現するプラグインです。 6 | 7 | ダウンロード: [RTK1_MapLocalVariables.js](https://raw.githubusercontent.com/yamachan/jgss-hack/master/RTK1_MapLocalVariables.js) 8 | 9 | ## 概要 10 | 11 | [RTK1_Core プラグイン](RTK1_Core.ja.md) を前提としていますので、先に読み込んでください。 なるべく新しいバージョンをダウンロードして使うようにしてください。 12 | 13 | ![Screen shot - Pligin Manager](i/RTK1_MapLocalVariables-01.png) 14 | 15 | パラメータの初期値は0になっていて、この状態だと本プラグインは無効になっています。 16 | 17 | ![Screen shot - Plugin](i/RTK1_MapLocalVariables-02.png) 18 | 19 | ## 基本的な使い方 20 | 21 | まずはマップでローカルに使用する変数の範囲を決めてください。 このマニュアルでは変数 15 ~ 20 をマップローカル変数に利用することにします。 22 | 23 | 変数の範囲をプラグインパラメータで指定してください。 24 | 25 | ![Screen shot - Plugin](i/RTK1_MapLocalVariables-03.png) 26 | 27 | それにあわせて、その範囲の変数にわかりやすい名前を付けておくことをお勧めします。 このマニュアルでは "Map local A" から "Map local F" まで名前を付けてみました。 28 | 29 | ![Screen shot - Plugin](i/RTK1_MapLocalVariables-04.png) 30 | 31 | マップローカル変数は、マップごとに用意され、0以外の値はセーブファイルにも保存されます。 セーブファイルの肥大化を防ぐためにも、変数の数はあまり多く設定せず、また不要になった値は 0 クリアしておきましょう。 32 | 33 | ## マップローカル変数とは? 34 | 35 | マップローカル変数に指定しても、通常の変数とほとんど変わりません。イベントなどで同様に利用できます。ただし通常の変数に対し、以下の点が異なります。 36 | 37 | * マップを移動するとマップローカル変数は値が変化します 38 | * そのマップに初めて入った時、マップローカル変数は全て0クリアされます 39 | * マップを移動する際、マップローカル変数はプラグインによって保存されます 40 | * そのマップに2度目以降に入った時、前回保存したマップローカル変数の値が復活します 41 | 42 | 基本的には、そのマップでしか使用しない値で、かつ保存される必要があるものをマップローカル変数に格納します。 43 | 44 | ## 理解のために 45 | 46 | 例えば、以下のように変数の値を表示するだけのシンプルなイベントを作成し、コピー&ペーストで各マップに配置します。 47 | 48 | ![Screen shot - Event edit](i/RTK1_MapLocalVariables-05.png) 49 | 50 | マップ上にゲーム変数を設定するイベントを追加し、上記のイベントで値を確認します。 51 | 52 | ![Screen shot - Event message](i/RTK1_MapLocalVariables-06.png) 53 | 54 | そして異なったマップに移動し、変数が 0 クリアされているのを確認します。 55 | 56 | ![Screen shot - Event message](i/RTK1_MapLocalVariables-07.png) 57 | 58 | そしてこの例のマップでは、左上のシスターに話しかけると変数 17 に 7 を設定するようになっています。 話しかけて結果を確認します。 59 | 60 | ![Screen shot - Event message](i/RTK1_MapLocalVariables-08.png) 61 | 62 | これでふたつのマップを移動し、それぞれの看板で異なった変数値が表示されることを確認してください。 これらの値はセーブして再起動しても変わらないはずです。 63 | 64 | これらの変数はマップごとに違った値を扱える別の存在になった、つまりはマップローカル変数になったということです。 65 | 66 | ## 更新履歴 67 | 68 | | バージョン | 公開日 | 必須ライブラリ | 更新内容 | 69 | | --- | --- | --- | --- | 70 | | ver1.15 | 2016/07/17 | [RTK1_Core](RTK1_Core.ja.md)
ver1.15 以降 | 公開 | 71 | 72 | ## ライセンス 73 | 74 | [The MIT License (MIT)](https://opensource.org/licenses/mit-license.php) です。 75 | 76 | 提供されるjsファイルからコメント等を削除しないのであれば、著作権表示は不要です。 むろん表示いただくのは歓迎します! 77 | 78 | [トップページに戻る](README.ja.md) 79 | -------------------------------------------------------------------------------- /README.ja.md: -------------------------------------------------------------------------------- 1 | [English version](README.md) 2 | 3 | # jgss-hack 4 | 5 | RPGツクールMV と JavaScript ベースの Game Scripting System (JGSS) を対象とした私の勉強メモ、および作成したプラグインの保存・公開用の GitHub リポジトリです。 6 | 7 | ## RTK1系 プラグイン 8 | 9 | | プラグイン | 説明ページ | 概要 | 10 | |:-----------|:-----------:|:-------------| 11 | | [RTK1_Core](RTK1_Core.js) | [英語](RTK1_Core.md) / [日本語](RTK1_Core.ja.md) | RTK1系ライブラリの基本(Core)部分 | 12 | | [RTK1_Option_EnJa](RTK1_Option_EnJa.js) | [英語](RTK1_Option_EnJa.md) / [日本語](RTK1_Option_EnJa.ja.md) | オプションメニューで英語/日本語環境の切り替え | 13 | | [RTK1_Composite](RTK1_Composite.js) | [英語](RTK1_Composite.md) / [日本語](RTK1_Composite.ja.md) | アイテム・武器・防具の合成メニュー&ショップ | 14 | | [RTK1_Shop](RTK1_Shop.js) | [英語](RTK1_Shop.md) / [日本語](RTK1_Shop.ja.md) | 標準のショップ機能を拡張
購入時のカテゴリ表示、価格の調整、販売リストの管理など | 15 | | [RTK1_MapLocalVariables](RTK1_MapLocalVariables.js) | [英語](RTK1_MapLocalVariables.md) / [日本語](RTK1_MapLocalVariables.ja.md) | マップローカル変数を提供 | 16 | 17 | ## 単独 プラグイン 18 | 19 | | プラグイン | 説明ページ | description | 20 | |:-----------|:-----------:|:-------------| 21 | | [RTK_TroopEncounter](RTK_TroopEncounter.js) | [日本語](RTK_TroopEncounter.ja.md) | マップでの敵との遭遇をコントロール | 22 | | [RTK_VariablePacker](RTK_VariablePacker.js) | N/A | 変数をパック/アンパックするプラグインコマンド | 23 | | [RTK_EnemySight](RTK_EnemySight.js) | [日本語](RTK_EnemySight.ja.md) | マップでイベントがプレイヤーを見かけるとスイッチをON | 24 | | [RTK_EventMatch](RTK_EventMatch.js) | [日本語](RTK_EventMatch.ja.md) | マップでイベントの条件が全て揃うとスイッチをON | 25 | | [RTK_ActorTraits](RTK_ActorTraits.js) | N/A | アクターに特徴を追加するプラグインコマンド | 26 | | [RTK_ActionRate](RTK_ActionRate.js) | N/A | メモ欄のタグでアクションの成功レートを調整する | 27 | | [RTK_ActionLimit](RTK_ActionLimit.js) | [日本語](RTK_ActionLimit.ja.md) | メモ欄のタグでアクションの実行回数などを制限する | 28 | 29 | ## 資料 30 | 31 | | タイトル | 概要 | 32 | |:-----------|:-----------| 33 | | [RPGツクールMV JGSS 技術メモ](memo.ja/index.md) | ver1.2.0 から ver1.3.4 への変化のまとめ、など
マップ上でキャラが動いている時のコード
マップ名表示のコード | 34 | | [RPGツクールMV プラグイン作成入門 (1)](guide/plugin-dev-01.ja.md) | 簡単なプラグインを作成してみる
パラメータとコマンドを実装してみる | 35 | | [RPGツクールMV プラグイン作成入門 (2)](guide/plugin-dev-02.ja.md) | 状態をセーブファイルに保存する
エネミーも対象にしてみる
プラグインとしてとりあえず完成させる | 36 | | [RPGツクールMV プラグイン作成入門 (3)](guide/plugin-dev-03.ja.md) | グローバル変数の定義
前提となるプラグインをチェックする
制御文字を使いたい、にもいろいろある | 37 | | [RPGツクールMV プラグイン作成入門 (4)](guide/plugin-dev-04.ja.md) | プラグイン開発の環境に特有のJavaScript言語の拡張のうち便利そうなものを幾つか紹介 | 38 | | [RPGツクールMV プラグイン作成入門 (5)](guide/plugin-dev-05.ja.md) | 画面表示の仕組みを理解しよう | 39 | | 技術メモ: [ショップ販売のカテゴリ化プラグインを作成してみる](201702-window2.md) | 作成入門の番外編、プラグイン作成の例として | 40 | 41 | ## ライセンス 42 | 43 | [The MIT License (MIT)](https://opensource.org/licenses/mit-license.php) です。 44 | 45 | 提供されるjsファイルからコメント等を削除しないのであれば、著作権表示は不要です。 むろん表示いただくのは歓迎します! 46 | -------------------------------------------------------------------------------- /guide/RTK_ShowID.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_ShowID.js 2016/07/31 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc アクターとエネミーにID表示するプラグイン (プラグイン作成講座のサンプル) 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @param アクター名の後にIDを表示 11 | * @desc アクター名の後にIDを表示する (0:OFF 1:ON) 12 | * @default 1 13 | * 14 | * @param エネミー名の後にIDを表示 15 | * @desc エネミー名の後にIDを表示する (0:OFF 1:ON) 16 | * @default 1 17 | * 18 | * @help 19 | * プラグインコマンド: 20 | * RTK_ShowID show_id on 21 | * RTK_ShowID show_id off 22 | * RTK_ShowID show_eid on 23 | * RTK_ShowID show_eid off 24 | * 25 | * アクターとエネミーにID表示するプラグインです 26 | * 27 | * 詳細はプラグイン作成講座(1)(2)を参照してください。 28 | * https://github.com/yamachan/jgss-hack/blob/master/README.ja.md 29 | */ 30 | 31 | (function(_global) { 32 | // ここにプラグイン処理を記載 33 | var N = 'RTK_ShowID'; 34 | var param = PluginManager.parameters(N); 35 | var show_id = Number(param['アクター名の後にIDを表示'])||1; 36 | var show_eid = Number(param['エネミー名の後にIDを表示'])||1; 37 | 38 | var _Game_Actor_name = Game_Actor.prototype.name; 39 | Game_Actor.prototype.name = function() { 40 | var ret = _Game_Actor_name.call(this); 41 | var f = $gameSystem[N + "_show_id"]; 42 | if (f === undefined ? show_id : f) { 43 | return ret + ":" + this.actorId(); 44 | } else { 45 | return ret; 46 | } 47 | }; 48 | 49 | var _Game_Enemy_name = Game_Enemy.prototype.name; 50 | Game_Enemy.prototype.name = function() { 51 | var ret = _Game_Enemy_name.call(this); 52 | var f = $gameSystem[N + "_show_eid"]; 53 | if (f === undefined ? show_eid : f) { 54 | return ret + ":" + this.enemyId(); 55 | } else { 56 | return ret; 57 | } 58 | }; 59 | 60 | var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; 61 | Game_Interpreter.prototype.pluginCommand = function(command, args) { 62 | _Game_Interpreter_pluginCommand.call(this, command, args); 63 | if (command == N) { 64 | if (args[0] == "show_id") { 65 | if (args[1] == "on") { 66 | if (show_id) { 67 | delete $gameSystem[N + "_show_id"]; 68 | } else { 69 | $gameSystem[N + "_show_id"] = 1; 70 | } 71 | } else if (args[1] == "off") { 72 | if (!show_id) { 73 | delete $gameSystem[N + "_show_id"]; 74 | } else { 75 | $gameSystem[N + "_show_id"] = 0; 76 | } 77 | } 78 | } 79 | if (args[0] == "show_eid") { 80 | if (args[1] == "on") { 81 | if (show_eid) { 82 | delete $gameSystem[N + "_show_eid"]; 83 | } else { 84 | $gameSystem[N + "_show_eid"] = 1; 85 | } 86 | } else if (args[1] == "off") { 87 | if (!show_eid) { 88 | delete $gameSystem[N + "_show_eid"]; 89 | } else { 90 | $gameSystem[N + "_show_eid"] = 0; 91 | } 92 | } 93 | } 94 | } 95 | }; 96 | })(this); 97 | -------------------------------------------------------------------------------- /memo/201606-plugin.md: -------------------------------------------------------------------------------- 1 | # 201606-plugin 2 | 3 | RPG Maker MV's plugin mechanism looks great. 4 | 5 | ## plugins.js file 6 | 7 | RPG Maker MV automatically create 'plugins.js' file to save plugin setting; 8 | 9 | ```js 10 | var $plugins = [ 11 | { 12 | "name":"RTK1_Core", 13 | "status":true, 14 | "description":"Core functions of RTK1 library for RPG Maker MV.", 15 | "parameters":{ 16 | "language":"0", 17 | "debug":"0", 18 | "json":"0" 19 | } 20 | } 21 | ]; 22 | ``` 23 | 24 | It reflects RPG Maker MV's setting UI. 25 | 26 | ![Screenshot - plugin setting](../i/RTK1_Core-02.png) 27 | 28 | ## Setup 29 | 30 | I found ''$plugins' value in 'main.js' file. 31 | 32 | ```js 33 | PluginManager.setup($plugins); 34 | ``` 35 | 36 | ```js 37 | PluginManager.setup = function(plugins) { 38 | plugins.forEach(function(plugin) { 39 | if (plugin.status && !this._scripts.contains(plugin.name)) { 40 | this.setParameters(plugin.name, plugin.parameters); 41 | this.loadScript(plugin.name + '.js'); 42 | this._scripts.push(plugin.name); 43 | } 44 | }, this); 45 | }; 46 | ``` 47 | 48 | ```js 49 | PluginManager.setParameters = function(name, parameters) { 50 | this._parameters[name.toLowerCase()] = parameters; 51 | }; 52 | ``` 53 | 54 | ```js 55 | PluginManager._path = 'js/plugins/'; 56 | 57 | PluginManager.loadScript = function(name) { 58 | var url = this._path + name; 59 | var script = document.createElement('script'); 60 | script.type = 'text/javascript'; 61 | script.src = url; 62 | script.async = false; 63 | script.onerror = this.onError.bind(this); 64 | script._url = url; 65 | document.body.appendChild(script); 66 | }; 67 | ``` 68 | 69 | OK, it's very simple and enough. It's basic JS code, nothing to study at this time... 70 | 71 | ## Expand plugin function 72 | 73 | Let's try RPG Maker MV's plugin function with using traditional JavaScript technique. :-) 74 | 75 | ### Get plugin source 76 | 77 | To get all information, try to get plugin source from its JS file. 78 | 79 | ```js 80 | RTK.getFileText = function(src){ 81 | var req = new XMLHttpRequest(); 82 | req.open("GET", src, false); 83 | req.send(null); 84 | return req.responseText; 85 | }; 86 | ``` 87 | 88 | Next, try to enhance '$plugins' list, add an author attribute. 89 | 90 | ```js 91 | RTK.pluginAuthors = function(plugins) { 92 | plugins = plugins ? plugins : $plugins; 93 | plugins.forEach(function(plugin) { 94 | if (!plugin.author) { 95 | var txt = RTK.getFileText(PluginManager._path + plugin.name + '.js'); 96 | var ret = txt.match(/@author ([^\f\n\r]+)/); 97 | if (ret && ret[1] != "") { 98 | plugin.author = ret[1]; 99 | } 100 | } 101 | }); 102 | }; 103 | ``` 104 | 105 | It works! 106 | 107 | ![](i/201606-plugin-01.png) 108 | -------------------------------------------------------------------------------- /archive/RTK_ActorTraits_v1.00.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_ActorTraits.js 2016/08/03 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc アクターに特徴を追加するプラグインコマンド 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @help 11 | * アクターに特徴を追加するプラグインコマンドを追加します。 12 | * プラグインコマンド: 13 | * RTK_ActorTraits list # 現在のアクターの特徴をコンソールにリスト表示する 14 | * RTK_ActorTraits add n {} # n番のアクターに {} の特徴を追加 15 | * RTK_ActorTraits remove n {} # n番のアクターから {} の特徴を削除 16 | * 17 | * 特徴を表現するオブジェクト {} は、いったんアクターに設定して list コマンドで調査してください 18 | * 例) {"code":43,"dataId":13,"value":1} は 13番のスキルを使えるようにする 19 | * 例) {"code":51,"dataId":7,"value":1} は 7番の種類の武器を装備できるようにする 20 | */ 21 | 22 | (function(_global) { 23 | var N = 'RTK_ActorTraits'; 24 | var param = PluginManager.parameters(N); 25 | 26 | var _DataManager_extractSaveContents = DataManager.extractSaveContents; 27 | DataManager.extractSaveContents = function(contents) { 28 | var ret = _DataManager_extractSaveContents.call(this, contents); 29 | var list = $gameSystem[N]||[]; 30 | for (var l=0; l 0) { 32 | list[l].forEach(function(json){ 33 | $gameActors.actor(l).actor().traits.push(JsonEx.parse(json)); 34 | }); 35 | } 36 | } 37 | return ret; 38 | }; 39 | 40 | var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; 41 | Game_Interpreter.prototype.pluginCommand = function(command, args) { 42 | _Game_Interpreter_pluginCommand.call(this, command, args); 43 | if (command == N) { 44 | if (args[0] == "list") { 45 | $gameParty.allMembers().forEach(function(actor){ 46 | console.log(actor.name()); 47 | actor.actor().traits.forEach(function(trait){ 48 | console.log(JsonEx.stringify(trait)); 49 | }); 50 | }); 51 | } 52 | if (args[0] == "add" && args.length > 2) { 53 | var id = Number(args[1]) || 0; 54 | var json = args.slice(2).join(" "); 55 | if (id > 0 && json != "") { 56 | var gsys = $gameSystem[N]||[]; 57 | var dat = gsys[id]||[]; 58 | if (!dat.contains(json)) { 59 | dat.push(json); 60 | gsys[id] = dat; 61 | $gameSystem[N] = gsys; 62 | $gameActors.actor(id).actor().traits.push(JsonEx.parse(json)); 63 | } 64 | } 65 | } 66 | if (args[0] == "remove" && args.length > 2) { 67 | var id = Number(args[1]) || 0; 68 | var json = args.slice(2).join(" "); 69 | if (id > 0 && json != "") { 70 | var gsys = $gameSystem[N]||[]; 71 | var dat = gsys[id]||[]; 72 | if (dat.contains(json)) { 73 | dat.splice(dat.indexOf(json),1); 74 | gsys[id] = dat.length == 0 ? undefined : dat; 75 | $gameSystem[N] = gsys; 76 | $gameActors.actor(id).actor().traits = $gameActors.actor(id).actor().traits.filter(function(o){ 77 | return JsonEx.stringify(o) != json; 78 | }); 79 | } 80 | } 81 | } 82 | } 83 | }; 84 | })(this); 85 | -------------------------------------------------------------------------------- /archive/RTK_EnemySight_v1.01.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_EnemySight.js ver1.01 2016/07/16 3 | //============================================================================= 4 | 5 | /*: 6 | * @plugindesc Set switch when map event see the player 7 | * @author Toshio Yamashita (yamachan) 8 | * 9 | * @param tag name 10 | * @desc Tag name used in Event's note. 11 | * @default sight 12 | * 13 | * @help This plugin does not provide plugin commands. 14 | * 15 | * Event Note: 16 | * # Switch s is ON when event see player within n 17 | * # n : eyeshot max (# of Tiles) 18 | * # s : A-D (self switch), 1-999 (switch) 19 | */ 20 | 21 | /*:ja 22 | * @plugindesc マップでイベントがプレイヤーを見かけるとスイッチをON 23 | * @author Toshio Yamashita (yamachan) 24 | * 25 | * @param tag name 26 | * @desc イベントのメモ欄で使用するタグ名 27 | * @default sight 28 | * 29 | * @help このプラグインにはプラグインコマンドはありません。 30 | * 31 | * イベントのメモ: 32 | * # 距離n以内にプレイヤーを発見するとsスイッチがON 33 | * # n : 距離 (タイル単位) 34 | * # s : A-D (セルフスイッチ), 1-999 (スイッチ) 35 | */ 36 | 37 | //----------------------------------------------------------------------------- 38 | 39 | (function(_global) { 40 | var N = 'RTK_EnemySight'; 41 | 42 | var param = PluginManager.parameters(N); 43 | var tag_name = param['tag name'] || "sight"; 44 | 45 | function _check(_d) { 46 | switch (this._directionFix ? this._originalDirection : this._direction) { 47 | case 2: // down 48 | if (this.x == $gamePlayer.x && this.y < $gamePlayer.y && $gamePlayer.y - this.y <= _d) { 49 | return true; 50 | } 51 | break; 52 | case 4: // left 53 | if (this.y == $gamePlayer.y && $gamePlayer.x < this.x && this.x - $gamePlayer.x <= _d) { 54 | return true; 55 | } 56 | break; 57 | case 6: // right 58 | if (this.y == $gamePlayer.y && this.x < $gamePlayer.x && $gamePlayer.x - this.x <= _d) { 59 | return true; 60 | } 61 | break; 62 | case 8: // up 63 | if (this.x == $gamePlayer.x && this.y > $gamePlayer.y && this.y - $gamePlayer.y <= _d) { 64 | return true; 65 | } 66 | break; 67 | }; 68 | return false; 69 | }; 70 | 71 | var _Game_Event_updateSelfMovement = Game_Event.prototype.updateSelfMovement; 72 | Game_Event.prototype.updateSelfMovement = function() { 73 | _Game_Event_updateSelfMovement.call(this); 74 | 75 | var m = this.event().meta[tag_name]; 76 | if (m) { 77 | var r = m.match(/\s*(\d+),\s*([A-D])\s*/); 78 | if (r) { 79 | var k = [this._mapId, this._eventId, r[2]]; 80 | if (!$gameSelfSwitches._data[k]) { 81 | r = _check.call(this, Number(r[1])); 82 | if (r) { 83 | $gameSelfSwitches.setValue(k, r); 84 | } 85 | } 86 | return; 87 | } 88 | r = m.match(/\s*(\d+),\s*(\d+)\s*/); 89 | if (r) { 90 | var k = Number(r[2]); 91 | if (!$gameSwitches.value(k)) { 92 | r = _check.call(this, Number(r[1])); 93 | if (r) { 94 | $gameSwitches.setValue(k, r); 95 | } 96 | } 97 | } 98 | } 99 | }; 100 | })(this); 101 | -------------------------------------------------------------------------------- /archive/RTK_EnemySight_v1.00.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_EnemySight.js ver1.00 2016/07/02 3 | //============================================================================= 4 | 5 | /*: 6 | * @plugindesc Set switch when map event see the player 7 | * @author Toshio Yamashita (yamachan) 8 | * 9 | * @param tag name 10 | * @desc Tag name used in Event's note. 11 | * @default sight 12 | * 13 | * @help This plugin does not provide plugin commands. 14 | * 15 | * Event Note: 16 | * # Switch s is ON when event see player within n 17 | * # n : eyeshot max (# of Tiles) 18 | * # s : A-D (self switch), 1-999 (switch) 19 | */ 20 | 21 | /*:ja 22 | * @plugindesc マップでイベントがプレイヤーを見かけるとスイッチをON 23 | * @author Toshio Yamashita (yamachan) 24 | * 25 | * @param tag name 26 | * @desc イベントのメモ欄で使用するタグ名 27 | * @default sight 28 | * 29 | * @help このプラグインにはプラグインコマンドはありません。 30 | * 31 | * イベントのメモ: 32 | * # 距離n以内にプレイヤーを発見するとsスイッチがON 33 | * # n : 距離 (タイル単位) 34 | * # s : A-D (セルフスイッチ), 1-999 (スイッチ) 35 | */ 36 | 37 | //----------------------------------------------------------------------------- 38 | 39 | (function(_global) { 40 | var N = 'RTK_Test'; 41 | 42 | var param = PluginManager.parameters(N); 43 | var tag_name = param['tag name'] || "sight"; 44 | 45 | var _Game_Event_updateSelfMovement = Game_Event.prototype.updateSelfMovement; 46 | Game_Event.prototype.updateSelfMovement = function() { 47 | _Game_Event_updateSelfMovement.call(this); 48 | 49 | function _f(_d) { 50 | switch (this._directionFix ? this._originalDirection : this._direction) { 51 | case 2: // down 52 | if (this.x == $gamePlayer.x && this.y < $gamePlayer.y && $gamePlayer.y - this.y <= _d) { 53 | return true; 54 | } 55 | break; 56 | case 4: // left 57 | if (this.y == $gamePlayer.y && $gamePlayer.x < this.x && this.x - $gamePlayer.x <= _d) { 58 | return true; 59 | } 60 | break; 61 | case 6: // right 62 | if (this.y == $gamePlayer.y && this.x < $gamePlayer.x && $gamePlayer.x - this.x <= _d) { 63 | return true; 64 | } 65 | break; 66 | case 8: // up 67 | if (this.x == $gamePlayer.x && this.y > $gamePlayer.y && this.y - $gamePlayer.y <= _d) { 68 | return true; 69 | } 70 | break; 71 | }; 72 | return false; 73 | }; 74 | 75 | var m = this.event().meta[tag_name]; 76 | if (m) { 77 | var r = m.match(/\s*(\d+),\s*([A-D])\s*/); 78 | if (r) { 79 | var k = [this._mapId, this._eventId, r[2]]; 80 | if (!$gameSelfSwitches._data[k]) { 81 | r = _f.call(this, Number(r[1])); 82 | if (r) { 83 | $gameSelfSwitches.setValue(k, r); 84 | } 85 | } 86 | return; 87 | } 88 | r = m.match(/\s*(\d+),\s*(\d+)\s*/); 89 | if (r) { 90 | var k = Number(r[2]); 91 | if (!$gameSwitches.value(k)) { 92 | r = _f.call(this, Number(r[1])); 93 | if (r) { 94 | $gameSwitches.setValue(k, r); 95 | } 96 | } 97 | } 98 | } 99 | }; 100 | 101 | })(this); 102 | -------------------------------------------------------------------------------- /memo/201607-meta.md: -------------------------------------------------------------------------------- 1 | 2 | # 201607-meta 3 | 4 | The logic and process timing of 'meta' attribute. 5 | 6 | ## About meta object 7 | 8 | We can input a tagged text in note are in database screen of RPG MakerMV. 9 | 10 | ![Database - note](i/201607-meta-03.png) 11 | 12 | The values can be found in 'meta' object in the target data object. 13 | 14 | ![Console - meta](i/201607-meta-01.png) 15 | 16 | ## Search the entry point 17 | 18 | At first, I try to search meta keyword in 'rpg_managers.js' file; 19 | 20 | ```js 21 | DataManager.onLoad = function(object) { 22 | var array; 23 | if (object === $dataMap) { 24 | this.extractMetadata(object); 25 | array = object.events; 26 | } else { 27 | array = object; 28 | } 29 | if (Array.isArray(array)) { 30 | for (var i = 0; i < array.length; i++) { 31 | var data = array[i]; 32 | if (data && data.note !== undefined) { 33 | this.extractMetadata(data); 34 | } 35 | } 36 | } 37 | }; 38 | 39 | DataManager.extractMetadata = function(data) { 40 | var re = /<([^<>:]+)(:?)([^>]*)>/g; 41 | data.meta = {}; 42 | for (;;) { 43 | var match = re.exec(data.note); 44 | if (match) { 45 | if (match[2] === ':') { 46 | data.meta[match[1]] = match[3]; 47 | } else { 48 | data.meta[match[1]] = true; 49 | } 50 | } else { 51 | break; 52 | } 53 | } 54 | }; 55 | ``` 56 | 57 | OK, it looks simple. Let's check 'extractMetadata' will be called later or not. 58 | 59 | ... search ... search ... Oh ... 60 | 61 | I couldn't find the 'extractMetadata' in other place. I guess this 'extractMetadata' function is called one time in onLoad function, and 'meta' data will not be updated anymore... 62 | 63 | ## Idea: Add a dynamic value into meta 64 | 65 | OK, 'meta' data is static. I can undesrstand, because $data* is static world in JGSS. 66 | 67 | But let's try to add a dynamic value into 'meta' information, just for fun. The following is a simple plugin code to test a dynamic value.:-) 68 | 69 | ```js 70 | (function(_global) { 71 | var _DataManager_extractMetadata = DataManager.extractMetadata; 72 | DataManager.extractMetadata = function(data) { 73 | _DataManager_extractMetadata.call(this, data); 74 | Object.defineProperty(data.meta, 'now_string', { 75 | get: function() { 76 | return (new Date()).toISOString(); 77 | } 78 | }); 79 | }; 80 | })(this); 81 | ``` 82 | 83 | The code can work; 84 | 85 | ![Console - dynamic meta](i/201607-meta-02.png) 86 | 87 | Maybe, this code has big capacity - we can control other usful plugins which depends on static meta ionformation. 88 | 89 | For example, we can replace a static meta attribute by the dynamic logic to refer the game switchs/variables, so user can change plugin's action with their event commands. 90 | 91 | This can be a big power, so we need to use this code carefully. 92 | 93 | ## Caution 94 | 95 | In the JGSS world, the 'meta' data has been static, so some plugins cache/copy necessary values in the init code of the plugin. 96 | 97 | So we must check the target plugin can follow dynamic values in 'meta' object. 98 | 99 | In the other hand, maybe, we should keep in mind about dynamic values in 'meta' object, and try to use the current values during we can do so. 100 | -------------------------------------------------------------------------------- /RTK_ActionRate.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_ActionRate.js ver1.01 2016/08/07 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc Set action's success rate by note tag 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @help This plugin does not provide plugin commands. 11 | * 12 | * NoteTags: 13 | * # Magic Reflection Rate: use n value 14 | * # Magic Reflection Rate: multiple with n value 15 | * # Counter Attack Rate: use n value 16 | * # Counter Attack Rate: multiple with n value 17 | * # Physical/Magic Evasion Rate: use n value 18 | * # Physical/Magic Evasion Rate: multiple with n value 19 | * # Critical Evasion Rate: use n value 20 | * # Critical Evasion Rate: multiple with n value 21 | * 22 | * If you add the prefix "v" to the number n, it means a value in the game variables. 23 | * e.g. will replace the Magic Reflection Rate by the game variable #10. 24 | */ 25 | 26 | /*:ja 27 | * @plugindesc メモ欄のタグでアクションの成功レートを調整する 28 | * @author Toshio Yamashita (yamachan) 29 | * 30 | * @help このプラグインにはプラグインコマンドはありません。 31 | * 32 | * スキル・アイテムのメモ: 33 | * # アクション実行時に対象の魔法反射率をnにする 34 | * # アクション実行時に対象の魔法反射率をn倍する 35 | * # アクション実行時に対象の物理反撃率をnにする 36 | * # アクション実行時に対象の物理反撃率をn倍する 37 | * # アクション実行時に対象の物理・魔法回避率をnにする 38 | * # アクション実行時に対象の物理・魔法回避率をn倍する 39 | * # アクション実行時にクリティカル発生率をnにする 40 | * # アクション実行時にクリティカル発生率をn倍する 41 | * 42 | * 数値 n の前に "v" を付与すると、その番号が示すゲーム変数の値が代わりに利用される 43 | * 例) は変数10番に入っている値が魔法反射率として使用される 44 | */ 45 | 46 | (function(_global) { 47 | var N = 'RTK_ActionRate'; 48 | var param = PluginManager.parameters(N); 49 | 50 | function conv(_s, _default) { 51 | if (_s.match(/^\s*[\d.]+\s*$/)) { 52 | return Number(_s); 53 | } 54 | var ret = _s.match(/^\s*v([\d.]+)\s*$/i); 55 | if (ret) { 56 | return $gameVariables.value(Number(ret[1])); 57 | } 58 | return _default; 59 | } 60 | function f(_key, _value, _this) { 61 | var meta = _this.item() && (_this.item().meta || {}); 62 | if (meta[_key + " value"] !== undefined) { 63 | return conv(meta[_key + " value"], _value); 64 | } 65 | if (meta[_key + " rate"] !== undefined) { 66 | return _value * conv(meta[_key + " rate"], 1); 67 | } 68 | return _value; 69 | } 70 | 71 | var _Game_Action_itemMrf = Game_Action.prototype.itemMrf; 72 | Game_Action.prototype.itemMrf = function(target) { 73 | var ret = _Game_Action_itemMrf.call(this, target); 74 | return f("mrf", ret, this); 75 | }; 76 | 77 | var _Game_Action_itemCnt = Game_Action.prototype.itemCnt; 78 | Game_Action.prototype.itemCnt = function(target) { 79 | var ret = _Game_Action_itemCnt.call(this, target); 80 | return f("cnt", ret, this); 81 | }; 82 | 83 | var _Game_Action_itemEva = Game_Action.prototype.itemEva; 84 | Game_Action.prototype.itemEva = function(target) { 85 | var ret = _Game_Action_itemEva.call(this, target); 86 | return f("eva", ret, this); 87 | }; 88 | 89 | var _Game_Action_itemCri = Game_Action.prototype.itemCri; 90 | Game_Action.prototype.itemCri = function(target) { 91 | var ret = _Game_Action_itemCri.call(this, target); 92 | return f("cri", ret, this); 93 | }; 94 | })(this); 95 | -------------------------------------------------------------------------------- /RTK1_MapLocalVariables.md: -------------------------------------------------------------------------------- 1 | [Japanese version](RTK1_MapLocalVariables.ja.md) | [Back to toppage](README.md) 2 | 3 | # [RTK1_MapLocalVariables](RTK1_MapLocalVariables.js) Plugin 4 | 5 | Plugin to use selected variables as map local ones for RPG Maker MV. 6 | 7 | Download: [RTK1_MapLocalVariables.js](https://raw.githubusercontent.com/yamachan/jgss-hack/master/RTK1_MapLocalVariables.js) 8 | 9 | ## Overview 10 | 11 | This plugin depends on [RTK1_Core plugin](RTK1_Core.jp.md). Please include it before this plugin, as follows; 12 | 13 | ![Screen shot - Pligin Manager](i/RTK1_MapLocalVariables-01.png) 14 | 15 | The default plugin parameters are 0, the plugin doesn't avtive in this setting. 16 | 17 | 18 | ![Screen shot - Plugin](i/RTK1_MapLocalVariables-02.png) 19 | 20 | ## Overview 21 | 22 | At first, you should decide the variable range for the map local. In this document, I use variable 15 - 20 for this purpose. 23 | 24 | You should set the range into the plugin parameters; 25 | 26 | ![Screen shot - Plugin](i/RTK1_MapLocalVariables-03.png) 27 | 28 | In addtion, I suggest to set the good and proper names against these game variables. For example, I use names from "Map local A" to "Map local F" as follows; 29 | 30 | ![Screen shot - Plugin](i/RTK1_MapLocalVariables-04.png) 31 | 32 | The map local variables is available for each map, and will use save file's space. So please try to keep the range size will be fit against your game. (But in face, this plugin has simple data compression logic) 33 | 34 | ## How about map local variables? 35 | 36 | Map local variables are almost same as normal game variables. You can use them for your event commands, script values, event trigers, and so on. 37 | 38 | But the following points are different; 39 | 40 | * The map local variables change when you transfer the map 41 | * At the first entry into a map, all map local variables are set by 0 42 | * The map local variables are automatically saved when you transfer the map 43 | * At the 2nd or later entry into a map, all map local variables are recovered from saved area 44 | 45 | Basically, you should use the map local variables only for values which are map unique and necessary to be saved. 46 | 47 | ## Sample to understand 48 | 49 | For example, let's add a simple event which shows game variables; 50 | 51 | ![Screen shot - Event edit](i/RTK1_MapLocalVariables-05.png) 52 | 53 | Let's kick an event which change the game variabes, then check the game variable's values with the 1st event; 54 | 55 | ![Screen shot - Event message](i/RTK1_MapLocalVariables-06.png) 56 | 57 | Let's move the another map, then check all local values became '0'; 58 | 59 | ![Screen shot - Event message](i/RTK1_MapLocalVariables-07.png) 60 | 61 | And in this map, the left-top sister event sets the game valiable 17 by 7. Let's talk with her, then check the game variable's values with the 1st event; 62 | 63 | ![Screen shot - Event message](i/RTK1_MapLocalVariables-08.png) 64 | 65 | Now, the local map variables are set and availavle in each map. 66 | 67 | Let's move among these 2 maps, and check the each variables keep map's local value. This situation will be kept, after save and load this game. 68 | 69 | ## Update history 70 | 71 | | version | date | require | update | 72 | | --- | --- | --- | --- | 73 | | ver1.15 | 2016/07/17 | [RTK1_Core](RTK1_Core.ja.md)
ver1.15 or later | Open | 74 | 75 | ## License 76 | 77 | [The MIT License (MIT)](https://opensource.org/licenses/mit-license.php) 78 | 79 | You don't need to display my copyright, if you keep my comments in .js files. Of course, I'll be happy, when you will display it. :-) 80 | 81 | [Back to toppage](README.md) 82 | -------------------------------------------------------------------------------- /memo.ja/201703-jgss140.md: -------------------------------------------------------------------------------- 1 | [トップページに戻る](../README.ja.md) | [JGSS 技術メモ](index.md) 2 | 3 | # JGSS ver1.3.4 から ver1.4.0 への変化 4 | 5 | JGSS が ver1.4.0 に更新されましたが、2nd の数字が上がったのは、バグフィックスではない何かがあるのでしょうか。コードの主要部分を眺めて、違いをざっと把握してみましょう。 6 | 7 | ## rpg_objects.js 8 | 9 | return 部分が修正されています(コメントされているのがver134)が、これは親メソッドを呼ぶようにしただけで、呼び先の処理は同じです。バグ修正でしょう。 10 | 11 | ```js 12 | Game_Actor.prototype.meetsUsableItemConditions = function(item) { 13 | if ($gameParty.inBattle() && !BattleManager.canEscape() && this.testEscape(item)) { 14 | return false; 15 | } 16 | // return this.canMove() && this.isOccasionOk(item); 17 | return Game_BattlerBase.prototype.meetsUsableItemConditions.call(this, item); 18 | }; 19 | ``` 20 | 21 | ## rpg_core.js 22 | 23 | 以下が修正されていますが、1.4.0 の間違いですよね、コレ。 24 | 25 | ```js 26 | Utils.RPGMAKER_VERSION = "1.3.5"; 27 | ``` 28 | 29 | WebAudio の部分に10行の追加がありますね。タッチ操作(touchendイベント)に対するリスナーが追加されています。例えばタッチでアプリが起こされた時、touchend しか送ってこない環境があったのかもしれませんね。 30 | 31 | ```js 32 | WebAudio._setupEventHandlers = function() { 33 | document.addEventListener("touchend", function() { // v1.4.0で追加 34 | var context = WebAudio._context; // v1.4.0で追加 35 | if (context && context.state === "suspended" && typeof context.resume === "function") { // v1.4.0で追加 36 | context.resume().then(function() { // v1.4.0で追加 37 | WebAudio._onTouchStart(); // v1.4.0で追加 38 | }) // v1.4.0で追加 39 | } else { // v1.4.0で追加 40 | WebAudio._onTouchStart(); // v1.4.0で追加 41 | } // v1.4.0で追加 42 | }); // v1.4.0で追加 43 | document.addEventListener('touchstart', this._onTouchStart.bind(this)); 44 | document.addEventListener('visibilitychange', this._onVisibilityChange.bind(this)); 45 | }; 46 | ``` 47 | 48 | これが今回、最大の変更かもしれず… 49 | 50 | ## rpg_managers.js 51 | 52 | 一か所だけ変わっていますが、これはコメントの変化で察しましょう。v1.3.4が 53 | 54 | ```js 55 | AudioManager.shouldUseHtml5Audio = function() { 56 | // We use HTML5 Audio to play BGM instead of Web Audio API 57 | // because decodeAudioData() is very slow on Android Chrome. 58 | return Utils.isAndroidChrome() && !Decrypter.hasEncryptedAudio; 59 | }; 60 | ``` 61 | 62 | で Android chrome の専用処理だったのが、v1.4.0 では以下のようにOFFられたようです。 63 | 64 | ```js 65 | AudioManager.shouldUseHtml5Audio = function() { 66 | // The only case where we wanted html5audio was android/ no encrypt 67 | // Atsuma-ru asked to force webaudio there too, so just return false for ALL 68 | // return Utils.isAndroidChrome() && !Decrypter.hasEncryptedAudio; 69 | return false; 70 | }; 71 | ``` 72 | 73 | ## rpg_sprites.js 74 | 75 | 変化なし 76 | 77 | ## rpg_windows.js 78 | 79 | 変化なし 80 | 81 | ## rpg_scenes.js 82 | 83 | 変化なし 84 | 85 | ## 結論 86 | 87 | いやー、ビックリするぐらい Script に変化がなかったです。 88 | 89 | v1.3.4 から v1.4.0 への変化は、生成されるゲームではなく、RPG Maker MV Tools や Tutorial がメニューに追加された、つまりツール側の進歩が主みたいですね。 90 | 91 | ![RPG Maker MV Tools](i/201703-jgss140_01.png) 92 | 93 | ![RPG Maker MV Tutorial](i/201703-jgss140_02.png) 94 | 95 | 96 | [トップページに戻る](../README.ja.md) | [JGSS 技術メモ](index.md) 97 | -------------------------------------------------------------------------------- /archive/RTK_EventMatch_v1.00.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_EventMatch.js ver1.00 2016/07/24 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc Set switch when all conditions are met in map events 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @param tag name 11 | * @desc Tag name used in Event's note. 12 | * @default event match 13 | * 14 | * @help This plugin does not provide plugin commands. 15 | * 16 | * Event Note: 17 | * # Switch s' condition is this event is in r region 18 | * # Switch s' condition is this event is not in r region 19 | * # Add 1 to variable v, if this event is in r region 20 | * # Add 1 to variable v, if this event is not in r region 21 | */ 22 | 23 | /*:ja 24 | * @plugindesc マップでイベントの条件が全て揃うとスイッチをON 25 | * @author Toshio Yamashita (yamachan) 26 | * 27 | * @param tag name 28 | * @desc イベントのメモ欄で使用するタグ名 29 | * @default event match 30 | * 31 | * @help このプラグインにはプラグインコマンドはありません。 32 | * 33 | * イベントのメモ: 34 | * # スイッチ s の条件はこのイベントが r リージョンにあること 35 | * # スイッチ s の条件はこのイベントが r リージョンにないこと 36 | * # このイベントが r リージョンにあれば変数 v に1を加える 37 | * # このイベントが r リージョンになければ変数 v に1を加える 38 | * 39 | * 解説ページ: 40 | * https://github.com/yamachan/jgss-hack/blob/master/RTK_EventMatch.ja.md 41 | */ 42 | 43 | //----------------------------------------------------------------------------- 44 | 45 | (function(_global) { 46 | var N = 'RTK_EventMatch'; 47 | 48 | var param = PluginManager.parameters(N); 49 | var tag_name = param['tag name'] || "event match"; 50 | 51 | var _Game_Map_updateEvents = Game_Map.prototype.updateEvents; 52 | Game_Map.prototype.updateEvents = function() { 53 | _Game_Map_updateEvents.call(this); 54 | 55 | var sws = []; 56 | var vars = []; 57 | this.events().forEach(function(event) { 58 | var meta = event.event().meta || {}; 59 | var ret = String(meta[tag_name + "_sr"]||"").match(/^\s*(\d+),(\d+)\s*$/); 60 | if (ret) { 61 | var sw = Number(ret[1]); 62 | var region = Number(ret[2]); 63 | if (sw > 0) { 64 | sws[sw] = sws[sw] === undefined ? event.regionId() == region : sws[sw] && event.regionId() == region; 65 | } 66 | } 67 | ret = String(meta[tag_name + "_!sr"]||"").match(/^\s*(\d+),(\d+)\s*$/); 68 | if (ret) { 69 | var sw = Number(ret[1]); 70 | var region = Number(ret[2]); 71 | if (sw > 0) { 72 | sws[sw] = sws[sw] === undefined ? event.regionId() != region : sws[sw] && event.regionId() != region; 73 | } 74 | } 75 | ret = String(meta[tag_name + "_vr"]||"").match(/^\s*(\d+),(\d+)\s*$/); 76 | if (ret) { 77 | var v = Number(ret[1]); 78 | var region = Number(ret[2]); 79 | if (v > 0 && event.regionId() == region) { 80 | vars[v] = vars[v] || 0; 81 | vars[v]++; 82 | } 83 | } 84 | ret = String(meta[tag_name + "_!vr"]||"").match(/^\s*(\d+),(\d+)\s*$/); 85 | if (ret) { 86 | var v = Number(ret[1]); 87 | var region = Number(ret[2]); 88 | if (v > 0 && event.regionId() != region) { 89 | vars[v] = vars[v] || 0; 90 | vars[v]++; 91 | } 92 | } 93 | }); 94 | for (var l=0; l # Switch s is ON when event see player within n 25 | * # n : eyeshot max (# of Tiles) 26 | * # s : A-D (self switch), 1-999 (switch) 27 | */ 28 | 29 | /*:ja 30 | * @plugindesc マップでイベントがプレイヤーを見かけるとスイッチをON 31 | * @author Toshio Yamashita (yamachan) 32 | * 33 | * @param tag name 34 | * @desc イベントのメモ欄で使用するタグ名 35 | * @default sight 36 | * 37 | * @param followers 38 | * @desc フォロワーも発見の対象になる (0:OFF 1:ON) 39 | * @default 0 40 | * 41 | * @param sight through 42 | * @desc 障害物を透視してプレイヤーが見えてしまう (0:OFF 1:ON) 43 | * @default 0 44 | * 45 | * @help このプラグインにはプラグインコマンドはありません。 46 | * 47 | * イベントのメモ: 48 | * # 距離n以内にプレイヤーを発見するとsスイッチがON 49 | * # n : 距離 (タイル単位) 50 | * # s : A-D (セルフスイッチ), 1-999 (スイッチ) 51 | * 52 | * 解説ページ: 53 | * https://github.com/yamachan/jgss-hack/blob/master/RTK_EnemySight.ja.md 54 | */ 55 | 56 | //----------------------------------------------------------------------------- 57 | 58 | (function(_global) { 59 | var N = 'RTK_EnemySight'; 60 | 61 | var param = PluginManager.parameters(N); 62 | var tag_name = param['tag name'] || "sight"; 63 | var followers = Number(param['followers'] || "0"); 64 | var st = Number(param['sight through'] || "0"); 65 | 66 | function _check(_d, _x, _y) { 67 | var dir = this._directionFix ? this._originalDirection : this._direction; 68 | switch (dir) { 69 | case 2: // down 70 | if (this.x == _x && this.y < _y && _y - this.y <= _d) { 71 | if (!st) { 72 | for (var y=this.y; y<_y - 1; y++) { 73 | if (!this.canPass(_x, y, dir)) { return false; } 74 | } 75 | } 76 | return true; 77 | } 78 | break; 79 | case 4: // left 80 | if (this.y == _y && _x < this.x && this.x - _x <= _d) { 81 | if (!st) { 82 | for (var x=this.x; x>_x + 1; x--) { 83 | if (!this.canPass(x, _y, dir)) { return false; } 84 | } 85 | } 86 | return true; 87 | } 88 | break; 89 | case 6: // right 90 | if (this.y == _y && this.x < _x && _x - this.x <= _d) { 91 | if (!st) { 92 | for (var x=this.x; x<_x - 1; x++) { 93 | if (!this.canPass(x, _y, dir)) { return false; } 94 | } 95 | } 96 | return true; 97 | } 98 | break; 99 | case 8: // up 100 | if (this.x == _x && this.y > _y && this.y - _y <= _d) { 101 | if (!st) { 102 | for (var y=this.y; y>_y + 1; y--) { 103 | if (!this.canPass(_x, y, dir)) { return false; } 104 | } 105 | } 106 | return true; 107 | } 108 | break; 109 | }; 110 | return false; 111 | }; 112 | 113 | function _checkAll(_d) { 114 | var r = _check.call(this, _d, $gamePlayer.x, $gamePlayer.y); 115 | return r || (followers && $gamePlayer.followers()._data.some(function(f){ 116 | return _check.call(this, _d, f.x, f.y); 117 | }, this)); 118 | } 119 | 120 | var _Game_Event_updateSelfMovement = Game_Event.prototype.updateSelfMovement; 121 | Game_Event.prototype.updateSelfMovement = function() { 122 | _Game_Event_updateSelfMovement.call(this); 123 | 124 | var m = this.event().meta[tag_name]; 125 | if (m) { 126 | var r = m.match(/\s*(\d+),\s*([A-D])\s*/); 127 | if (r) { 128 | var k = [this._mapId, this._eventId, r[2]]; 129 | if (!$gameSelfSwitches._data[k]) { 130 | if (_checkAll.call(this, Number(r[1]))) { 131 | $gameSelfSwitches.setValue(k, r); 132 | } 133 | } 134 | return; 135 | } 136 | r = m.match(/\s*(\d+),\s*(\d+)\s*/); 137 | if (r) { 138 | var k = Number(r[2]); 139 | if (!$gameSwitches.value(k)) { 140 | if (_checkAll.call(this, Number(r[1]))) { 141 | $gameSwitches.setValue(k, r); 142 | } 143 | } 144 | } 145 | } 146 | }; 147 | })(this); 148 | -------------------------------------------------------------------------------- /guide/plugin-dev-04.ja.md: -------------------------------------------------------------------------------- 1 | [トップページに戻る](../README.ja.md) | [前回の入門](plugin-dev-03.ja.md) | [次回の入門](plugin-dev-05.ja.md) 2 | 3 | # RPGツクールMV プラグイン作成入門 (4) 4 | 5 | RPGツクールMV で利用する JavaScript ベースの Game Scripting System (JGSS) で記述したプラグイン作成のための入門資料っぽい何か、です。 JS(JavaScript)の基本知識がある方が対象です。 6 | 7 | ## これまでの入門 8 | 9 | [作成入門 (1)](plugin-dev-01.ja.md) と [作成入門 (2)](plugin-dev-02.ja.md) では、アクターやエネミーの名前の後にIDを追加表示する、シンプルなプラグインを完成しました。 [RTK_ShowID.js](RTK_ShowID.js) で完成したソースコードを参照できます。 10 | 11 | [作成入門 (3)](plugin-dev-03.ja.md) ではグローバル変数の定義を説明し、前提となるプラグインをチェックする関数を定義してみて、また制御文字を使えるようにする拡張について説明しました。 12 | 13 | 今回はプラグイン開発の環境に特有の、JavaScript言語の拡張のうち便利そうなものを幾つか紹介します。 今後も発見したものは追記していきますね。 14 | 15 | ## JavaScript言語の拡張について 16 | 17 | JavaScript言語では、標準で用意されたオブジェクトの拡張も可能です。 それを提供するプラグインも数多く存在します。 18 | 19 | 開発対象におけるこれらの拡張は、その対象にあった便利なものが多く、理解してうまく利用すれば開発効率がぐっと向上します。 ある程度慣れたJavaScriptプログラマであれば、開発対象における言語拡張の有無とその詳細は、最初にチェックする重要な項目だったりします。 20 | 21 | RPGツクールMVの開発環境においても、js フォルダにある rpg_core.js が基本オブジェクトの拡張をしています。 順にみていきましょう。 22 | 23 | ## Number クラスの拡張 24 | 25 | 数値を扱う Number クラスには、以下のような関数が追加定義されています。 26 | 27 | | 関数名と引数 | 概要 | 利用例 | 28 | | --- | --- | --- | 29 | | clamp(min, max) | 数値の範囲を限定する | (6).clamp(1,5) => 5
(0).clamp(1,5) => 1 | 30 | | mod(n) | 数値の剰余をとる | (105).mod(100) => 5 | 31 | | padZero(length) | 指定した長さになるまで0で埋めた文字列にする | (11).padZero(5) => "00011" | 32 | 33 | ## String クラスの拡張 34 | 35 | 文字列を扱う String クラスには、以下のような関数が追加定義されています。 36 | 37 | | 関数名と引数 | 概要 | 利用例 | 38 | | --- | --- | --- | 39 | | format(v1, v2 ,,,) | %で指定した位置に値を代入する | "%1 is %2 years old".format("Harold", 14) => "Harold is 14 years old" | 40 | | padZero(length) | 指定した長さになるまで0で埋める | "11".padZero(5) => "00011" | 41 | | contains(string) | 指定した文字列が含まれるか確認 | "abcde".contains("bc") => true
"abcde".contains("ce") => false | 42 | 43 | ## Array クラスの拡張 44 | 45 | 配列を扱う Array クラスには、以下のような関数が追加定義されています。 46 | 47 | | 関数名と引数 | 概要 | 利用例 | 48 | | --- | --- | --- | 49 | | equals(array) | 配列の中身が同じかどうか確認する
配列を要素として含んでいる場合はそれも再帰的に比較 | [1,2].equals([1,2]) => true
[1,[2,3]].equals([1,[2,3]]) => true
[1,[2,3]].equals([1,[2,4]]) => false | 50 | | clone() | 配列のコピーを作成する
浅いコピーで含まれるオブジェクトまでは複製しない | [1,[2,3]].clone() => [1,[2,3]]
この場合含まれる[2,3]は元の要素と同じオブジェクトになる | 51 | | contains(element) | 指定した要素が配列に含まれるか確認 | [1,2,3].contains(2) => true
[1,2,3].contains(5) => false | 52 | 53 | ## データ処理に便利な関数 54 | 55 | 以下のようにデータ形式を変換したり、圧縮したりする関数も用意されています。 56 | 57 | | 関数名と引数 | 概要 | 利用例 | 58 | | --- | --- | --- | 59 | | JsonEx.stringify(object) | オブジェクトをJSON文字列に変換する | JsonEx.stringify({"value":1,"flag":true}) => '{"value":1,"flag":true}' | 60 | | JsonEx.parse(json) | JSON文字列をオブジェクトに変換する | 上記の逆変換 | 61 | | JsonEx.makeDeepCopy(object) | 対象オブジェクトをコピーする
深いコピーで含まれるオブジェクトも複製する | JsonEx.makeDeepCopy([1,[2,3]]) => [1,[2,3]]
この場合含まれる[2,3]は元の要素とは異なったオブジェクトになる | 62 | | LZString.compress(string) | 文字列を圧縮する | LZString.compress("source string") => 圧縮された文字列 | 63 | | LZString.decompress(string) | 上記の逆変換 |LZString.decompress(圧縮された文字列) => "source string" | 64 | | LZString.compressToEncodedURIComponent(string) | 文字列を圧縮しBase64表現に変換する
この表記はURLパラメータに指定するのに適しています | LZString.compressToEncodedURIComponent("source string") => "M4ewrgTgxgpgBMALhAlgOwOZAAA$" | 65 | | LZString.decompressFromEncodedURIComponent(string) | 上記の逆変換 | LZString.decompressFromEncodedURIComponent("M4ewrgTgxgpgBMALhAlgOwOZAAA$") => "source string" | 66 | | LZString.compressToBase64(string) | 文字列を圧縮しBase64表現に変換する
この表記はテキストメッセージに追加するのに適しています | LZString.compressToBase64("source string") => "M4ewrgTgxgpgBMALhAlgOwOZAAA=" | 67 | | LZString.decompressFromBase64(string) | 上記の逆変換 | LZString.decompressFromBase64("M4ewrgTgxgpgBMALhAlgOwOZAAA=") => "source string" | 68 | 69 | ## その他 便利な値や関数 70 | 71 | | 関数名と引数 | 概要 | 利用例 | 72 | | --- | --- | --- | 73 | | Math.randomInt(max) | 0からmax-1までの範囲の乱数を整数値で返す | Math.randomInt(max) => 0か1か2 | 74 | | Utils.RPGMAKER_NAME | RPGツクールの名称を返す | Utils.RPGMAKER_NAME => 'MV' | 75 | | Utils.RPGMAKER_VERSION | RPGツクールのバージョンを返す | Utils.RPGMAKER_VERSION => "1.2.0" | 76 | | Utils.isMobileDevice() | モバイル環境なら true を返す | | 77 | | Utils.isMobileSafari() | Mobile Safari環境なら true を返す | | 78 | | Utils.isAndroidChrome() | Android Chrome環境なら true を返す | | 79 | | Utils.rgbToCssColor(r, g, b) | CSSの色指定文字列を作成する | Utils.rgbToCssColor(1,2,3) => "rgb(1,2,3)" | 80 | | Bitmap.snap(stage) | ゲーム画面をキャプチャしてbitmap画像を返す | Bitmap.snap(SceneManager._scene) => 新規作成されたゲーム画面のbitmapオブジェクト | 81 | 82 | ## 便利なシステム変数や関数 83 | 84 | プラグイン中でよく参照する、ゲーム内のシステム変数や関数をまとめておきます。 85 | 86 | | 関数名と引数 | 概要 | 利用例 | 87 | | --- | --- | --- | 88 | | DataManager.isBattleTest() | バトルテストの時に true を返す | | 89 | | DataManager.isEventTest() | イベントテストの時に true を返す | | 90 | | SceneManager._scene | 現在の Scene オブジェクト | | 91 | 92 | ## 最後に 93 | 94 | 今回はちょっと短いですが、情報は引き続き更新していきます。 見つけた便利な関数などは順次紹介していきますね! 95 | 96 | [トップページに戻る](../README.ja.md) | [前回の入門](plugin-dev-03.ja.md) | [次回の入門](plugin-dev-05.ja.md) 97 | -------------------------------------------------------------------------------- /memo.ja/RTK_ShopCategory.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_ShopCategory.js 2017/02/19 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc ショップにカテゴリ選択を追加する 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @help このプラグインにはプラグインコマンドはありません。 11 | * https://github.com/yamachan/jgss-hack/blob/master/memo.ja/201702-window2.md 12 | */ 13 | 14 | (function(_global) { 15 | // ここにプラグイン処理を記載 16 | var cat_h = 64; 17 | var my_select = 0; 18 | var my_scene; 19 | 20 | // ----- MyWindow : New class ----- 21 | 22 | function MyWindow() { 23 | this.initialize.apply(this, arguments); 24 | } 25 | 26 | MyWindow.prototype = Object.create(Window_HorzCommand.prototype); 27 | MyWindow.prototype.constructor = MyWindow; 28 | 29 | MyWindow.prototype.initialize = function(width, y) { 30 | this._windowWidth = width; 31 | Window_HorzCommand.prototype.initialize.call(this, 0, y); 32 | }; 33 | MyWindow.prototype.windowWidth = function() { 34 | return this._windowWidth; 35 | }; 36 | MyWindow.prototype.maxCols = function() { 37 | return 3; 38 | }; 39 | MyWindow.prototype.makeCommandList = function() { 40 | this.addCommand(TextManager.item, 'item'); 41 | this.addCommand(TextManager.weapon, 'weapon'); 42 | this.addCommand(TextManager.armor, 'armor'); 43 | }; 44 | MyWindow.prototype.select = function(index) { 45 | var ret = Window_Selectable.prototype.select.call(this, index); 46 | my_select = index < 0 ? my_select : index; 47 | my_scene._buyWindow.refresh(); 48 | return ret; 49 | }; 50 | 51 | // ----- Window_ShopBuy : Over write ----- 52 | 53 | Window_ShopBuy.prototype.initialize = function(x, y, height, shopGoods) { 54 | var width = this.windowWidth(); 55 | y += cat_h; 56 | height -= cat_h; 57 | Window_Selectable.prototype.initialize.call(this, x, y, width, height); 58 | this._shopGoods = shopGoods; 59 | this._money = 0; 60 | this.refresh(); 61 | this.select(0); 62 | }; 63 | Window_ShopBuy.prototype.makeItemList = function() { 64 | this._data = []; 65 | this._price = []; 66 | this._shopGoods.forEach(function(goods) { 67 | var item = null; 68 | if (my_select == goods[0]) { 69 | switch (goods[0]) { 70 | case 0: 71 | item = $dataItems[goods[1]]; 72 | break; 73 | case 1: 74 | item = $dataWeapons[goods[1]]; 75 | break; 76 | case 2: 77 | item = $dataArmors[goods[1]]; 78 | break; 79 | } 80 | } 81 | if (item) { 82 | this._data.push(item); 83 | this._price.push(goods[2] === 0 ? item.price : goods[3]); 84 | } 85 | }, this); 86 | }; 87 | 88 | // ----- Scene_Shop : Over write ----- 89 | 90 | var _Scene_Shop_create = Scene_Shop.prototype.create; 91 | Scene_Shop.prototype.create = function() { 92 | var ret = _Scene_Shop_create.call(this); 93 | this.createMyWindow(); 94 | return ret; 95 | }; 96 | Scene_Shop.prototype.createMyWindow = function() { 97 | my_scene = this; 98 | this._myWindow = new MyWindow(456, this._statusWindow.y); 99 | this._myWindow.hide(); 100 | this._myWindow.setHandler('item', this.onMyWindowSelect.bind(this)); 101 | this._myWindow.setHandler('weapon', this.onMyWindowSelect.bind(this)); 102 | this._myWindow.setHandler('armor', this.onMyWindowSelect.bind(this)); 103 | this._myWindow.setHandler('cancel', this.onMyWindowCancel.bind(this)); 104 | this.addWindow(this._myWindow); 105 | } 106 | Scene_Shop.prototype.onMyWindowSelect = function() { 107 | this._myWindow.deselect(); 108 | this._buyWindow.select(0); 109 | this._buyWindow.activate(); 110 | }; 111 | Scene_Shop.prototype.onMyWindowCancel = function() { 112 | this._commandWindow.activate(); 113 | this._dummyWindow.show(); 114 | this._buyWindow.hide(); 115 | this._myWindow.hide(); 116 | this._statusWindow.hide(); 117 | this._statusWindow.setItem(null); 118 | this._helpWindow.clear(); 119 | }; 120 | 121 | Scene_Shop.prototype.activateBuyWindow = function() { 122 | this._buyWindow.setMoney(this.money()); 123 | this._buyWindow.show(); 124 | this._buyWindow.deselect(); 125 | this._myWindow.show(); 126 | this._myWindow.activate(); 127 | this._statusWindow.show(); 128 | }; 129 | Scene_Shop.prototype.onBuyCancel = function() { 130 | this._buyWindow.deselect(); 131 | this._myWindow.select(my_select); 132 | this._myWindow.activate(); 133 | }; 134 | Scene_Shop.prototype.endNumberInput = function() { 135 | this._numberWindow.hide(); 136 | switch (this._commandWindow.currentSymbol()) { 137 | case 'buy': 138 | this._buyWindow.show(); 139 | this._buyWindow.activate(); 140 | break; 141 | case 'sell': 142 | this.activateSellWindow(); 143 | break; 144 | } 145 | }; 146 | 147 | })(this); 148 | -------------------------------------------------------------------------------- /memo/201607-can-pass.md: -------------------------------------------------------------------------------- 1 | 2 | # 201607-can-pass 3 | 4 | I had used 'Game_CharacterBase.prototype.canPass' method for my plugin, but it works funny... So I try to read the code about it. 5 | 6 | ## Game_Event class 7 | 8 | ``` 9 | Game_Event 10 | Game_Character 11 | Game_CharacterBase 12 | Object 13 | ``` 14 | 15 | ## canPass 16 | 17 | ```js 18 | Game_CharacterBase.prototype.canPass = function(x, y, d) { 19 | var x2 = $gameMap.roundXWithDirection(x, d); 20 | var y2 = $gameMap.roundYWithDirection(y, d); 21 | if (!$gameMap.isValid(x2, y2)) { 22 | return false; 23 | } 24 | if (this.isThrough() || this.isDebugThrough()) { 25 | return true; 26 | } 27 | if (!this.isMapPassable(x, y, d)) { 28 | return false; 29 | } 30 | if (this.isCollidedWithCharacters(x2, y2)) { 31 | return false; 32 | } 33 | return true; 34 | }; 35 | ``` 36 | 37 | ```js 38 | Game_Map.prototype.roundXWithDirection = function(x, d) { 39 | return this.roundX(x + (d === 6 ? 1 : d === 4 ? -1 : 0)); 40 | }; 41 | 42 | Game_Map.prototype.roundYWithDirection = function(y, d) { 43 | return this.roundY(y + (d === 2 ? 1 : d === 8 ? -1 : 0)); 44 | }; 45 | ``` 46 | 47 | ## isValid 48 | 49 | '$gameMap.isValid' function checks the area range. It's simple. 50 | 51 | ```js 52 | Game_Map.prototype.isValid = function(x, y) { 53 | return x >= 0 && x < this.width() && y >= 0 && y < this.height(); 54 | }; 55 | ``` 56 | 57 | ## isThrough 58 | 59 | ```js 60 | Game_CharacterBase.prototype.isThrough = function() { 61 | return this._through; 62 | }; 63 | Game_CharacterBase.prototype.setThrough = function(through) { 64 | this._through = through; 65 | }; 66 | Game_CharacterBase.prototype.isDebugThrough = function() { 67 | return false; 68 | }; 69 | ``` 70 | 71 | ## isMapPassable 72 | 73 | ```js 74 | Game_CharacterBase.prototype.isMapPassable = function(x, y, d) { 75 | var x2 = $gameMap.roundXWithDirection(x, d); 76 | var y2 = $gameMap.roundYWithDirection(y, d); 77 | var d2 = this.reverseDir(d); 78 | return $gameMap.isPassable(x, y, d) && $gameMap.isPassable(x2, y2, d2); 79 | }; 80 | Game_CharacterBase.prototype.reverseDir = function(d) { 81 | return 10 - d; 82 | }; 83 | ``` 84 | 85 | ```js 86 | Game_Map.prototype.isPassable = function(x, y, d) { 87 | return this.checkPassage(x, y, (1 << (d / 2 - 1)) & 0x0f); 88 | }; 89 | Game_Map.prototype.isBoatPassable = function(x, y) { 90 | return this.checkPassage(x, y, 0x0200); 91 | }; 92 | Game_Map.prototype.isShipPassable = function(x, y) { 93 | return this.checkPassage(x, y, 0x0400); 94 | }; 95 | Game_Map.prototype.isAirshipLandOk = function(x, y) { 96 | return this.checkPassage(x, y, 0x0800) && this.checkPassage(x, y, 0x0f); 97 | }; 98 | ``` 99 | 100 | ```js 101 | Game_Map.prototype.checkPassage = function(x, y, bit) { 102 | var flags = this.tilesetFlags(); 103 | var tiles = this.allTiles(x, y); 104 | for (var i = 0; i < tiles.length; i++) { 105 | var flag = flags[tiles[i]]; 106 | if ((flag & 0x10) !== 0) // [*] No effect on passage 107 | continue; 108 | if ((flag & bit) === 0) // [o] Passable 109 | return true; 110 | if ((flag & bit) === bit) // [x] Impassable 111 | return false; 112 | } 113 | return false; 114 | }; 115 | ``` 116 | 117 | ## isCollidedWithCharacters 118 | 119 | ```js 120 | Game_CharacterBase.prototype.isCollidedWithCharacters = function(x, y) { 121 | return this.isCollidedWithEvents(x, y) || this.isCollidedWithVehicles(x, y); 122 | }; 123 | Game_CharacterBase.prototype.isCollidedWithEvents = function(x, y) { 124 | var events = $gameMap.eventsXyNt(x, y); 125 | return events.some(function(event) { 126 | return event.isNormalPriority(); 127 | }); 128 | }; 129 | Game_CharacterBase.prototype.isCollidedWithVehicles = function(x, y) { 130 | return $gameMap.boat().posNt(x, y) || $gameMap.ship().posNt(x, y); 131 | }; 132 | ``` 133 | 134 | Oops! I found the reason of funny Enemy's move. 135 | 136 | ```js 137 | Game_Event.prototype.isCollidedWithEvents = function(x, y) { 138 | var events = $gameMap.eventsXyNt(x, y); 139 | return events.length > 0; 140 | }; 141 | ``` 142 | 143 | The 'isCollidedWithEvents' function was overwritten in 'Game_Event' class... And as the result, an event is always collided with other Events... 144 | 145 | ## Addtional comment as 2016/07/23 146 | 147 | The '$gameMap.eventsXyNt' function checks the target event's isThrough() as follows; 148 | 149 | ```js 150 | Game_Map.prototype.eventsXyNt = function(x, y) { 151 | return this.events().filter(function(event) { 152 | return event.posNt(x, y); 153 | }); 154 | }; 155 | Game_CharacterBase.prototype.posNt = function(x, y) { 156 | // No through 157 | return this.pos(x, y) && !this.isThrough(); 158 | }; 159 | 160 | ``` 161 | -------------------------------------------------------------------------------- /RTK_EnemySight.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_EnemySight.js ver1.03 2016/07/23 3 | //============================================================================= 4 | 5 | /*: 6 | * @plugindesc Set switch when map event see the player 7 | * @author Toshio Yamashita (yamachan) 8 | * 9 | * @param tag name 10 | * @desc Tag name used in Event's note. 11 | * @default sight 12 | * 13 | * @param followers 14 | * @desc Follwers are also found by enemies (0:OFF 1:ON) 15 | * @default 0 16 | * 17 | * @param sight through 18 | * @desc Event can sight through the blocks (0:OFF 1:ON) 19 | * @default 0 20 | * 21 | * @help This plugin does not provide plugin commands. 22 | * 23 | * Event Note: 24 | * # Switch s is ON when event see player within n 25 | * # n : eyeshot max (# of Tiles) 26 | * # s : A-D (self switch), 1-999 (switch) 27 | */ 28 | 29 | /*:ja 30 | * @plugindesc マップでイベントがプレイヤーを見かけるとスイッチをON 31 | * @author Toshio Yamashita (yamachan) 32 | * 33 | * @param tag name 34 | * @desc イベントのメモ欄で使用するタグ名 35 | * @default sight 36 | * 37 | * @param followers 38 | * @desc フォロワーも発見の対象になる (0:OFF 1:ON) 39 | * @default 0 40 | * 41 | * @param sight through 42 | * @desc 障害物を透視してプレイヤーが見えてしまう (0:OFF 1:ON) 43 | * @default 0 44 | * 45 | * @help このプラグインにはプラグインコマンドはありません。 46 | * 47 | * イベントのメモ: 48 | * # 距離n以内にプレイヤーを発見するとsスイッチがON 49 | * # n : 距離 (タイル単位) 50 | * # s : A-D (セルフスイッチ), 1-999 (スイッチ) 51 | * 52 | * 解説ページ: 53 | * https://github.com/yamachan/jgss-hack/blob/master/RTK_EnemySight.ja.md 54 | */ 55 | 56 | //----------------------------------------------------------------------------- 57 | 58 | (function(_global) { 59 | var N = 'RTK_EnemySight'; 60 | 61 | var param = PluginManager.parameters(N); 62 | var tag_name = param['tag name'] || "sight"; 63 | var followers = Number(param['followers'] || "0"); 64 | var st = Number(param['sight through'] || "0"); 65 | 66 | function _canPass(x, y, d) { 67 | var x2 = $gameMap.roundXWithDirection(x, d); 68 | var y2 = $gameMap.roundYWithDirection(y, d); 69 | if (!$gameMap.isValid(x2, y2)) { 70 | return false; 71 | } 72 | if (!this.isMapPassable(x, y, d)) { 73 | return false; 74 | } 75 | if (Game_CharacterBase.prototype.isCollidedWithEvents.call(this, x2, y2) || this.isCollidedWithVehicles(x2, y2)) { 76 | return false; 77 | } 78 | return true; 79 | }; 80 | 81 | function _check(_d, _x, _y) { 82 | var dir = this._directionFix ? this._originalDirection : this._direction; 83 | switch (dir) { 84 | case 2: // down 85 | if (this.x == _x && this.y < _y && _y - this.y <= _d) { 86 | if (!st) { 87 | for (var y=this.y; y<_y - 1; y++) { 88 | if (!_canPass.call(this, _x, y, dir)) { return false; } 89 | } 90 | } 91 | return true; 92 | } 93 | break; 94 | case 4: // left 95 | if (this.y == _y && _x < this.x && this.x - _x <= _d) { 96 | if (!st) { 97 | for (var x=this.x; x>_x + 1; x--) { 98 | if (!_canPass.call(this, x, _y, dir)) { return false; } 99 | } 100 | } 101 | return true; 102 | } 103 | break; 104 | case 6: // right 105 | if (this.y == _y && this.x < _x && _x - this.x <= _d) { 106 | if (!st) { 107 | for (var x=this.x; x<_x - 1; x++) { 108 | if (!_canPass.call(this, x, _y, dir)) { return false; } 109 | } 110 | } 111 | return true; 112 | } 113 | break; 114 | case 8: // up 115 | if (this.x == _x && this.y > _y && this.y - _y <= _d) { 116 | if (!st) { 117 | for (var y=this.y; y>_y + 1; y--) { 118 | if (!_canPass.call(this, _x, y, dir)) { return false; } 119 | } 120 | } 121 | return true; 122 | } 123 | break; 124 | }; 125 | return false; 126 | }; 127 | 128 | function _checkAll(_d) { 129 | var r = _check.call(this, _d, $gamePlayer.x, $gamePlayer.y); 130 | return r || (followers && $gamePlayer.followers()._data.some(function(f){ 131 | return _check.call(this, _d, f.x, f.y); 132 | }, this)); 133 | } 134 | 135 | var _Game_Event_updateSelfMovement = Game_Event.prototype.updateSelfMovement; 136 | Game_Event.prototype.updateSelfMovement = function() { 137 | _Game_Event_updateSelfMovement.call(this); 138 | 139 | var m = this.event().meta[tag_name]; 140 | if (m) { 141 | var r = m.match(/\s*(\d+),\s*([A-D])\s*/); 142 | if (r) { 143 | var k = [this._mapId, this._eventId, r[2]]; 144 | if (!$gameSelfSwitches._data[k]) { 145 | if (_checkAll.call(this, Number(r[1]))) { 146 | $gameSelfSwitches.setValue(k, r); 147 | } 148 | } 149 | return; 150 | } 151 | r = m.match(/\s*(\d+),\s*(\d+)\s*/); 152 | if (r) { 153 | var k = Number(r[2]); 154 | if (!$gameSwitches.value(k)) { 155 | if (_checkAll.call(this, Number(r[1]))) { 156 | $gameSwitches.setValue(k, r); 157 | } 158 | } 159 | } 160 | } 161 | }; 162 | })(this); 163 | -------------------------------------------------------------------------------- /archive/RTK_ActionLimit_v1.00.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_ActionLimit.js ver1.00 2016/08/18 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc Set action's usable limit by note tag 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @param meta tag 11 | * @desc Meta tag name for Condition text in Note area 12 | * @default condition 13 | * 14 | * @help This plugin does not provide plugin commands. 15 | * 16 | * NoteTags: 17 | * # Can use this when #n switch is ON 18 | * # Actors (ID: n,m,,) can use this 19 | * # Classes (ID: n,m,,) can use this 20 | * # Can use #n times in a battle (Item only) 21 | * 22 | * If you add the prefix "v" to the number n, it means a value in the game variables. 23 | * e.g. Can use this when the switch selected by the game variable #10 is ON. 24 | * e.g. An actor selected by the game variable #10 can use this. 25 | */ 26 | 27 | /*:ja 28 | * @plugindesc メモ欄のタグでアクションの実行回数などを制限する 29 | * @author Toshio Yamashita (yamachan) 30 | * 31 | * @param meta tag 32 | * @desc ノート欄で使用条件を指定するタグ名 33 | * @default condition 34 | * 35 | * @help このプラグインにはプラグインコマンドはありません。 36 | * 37 | * スキル・アイテムのメモ: 38 | * # n番スイッチがONのときだけ戦闘で利用できる 39 | * # n,m,,番のアクターだけが戦闘で利用できる 40 | * # n,m,,番のクラスだけが戦闘で利用できる 41 | * # 1度の戦闘でn回だけ利用できる (アイテムのみ) 42 | * 43 | * 単独の数値 n の前に "v" を付与すると、その番号が示すゲーム変数の値が代わりに利用される 44 | * 例) は変数10番に入っている値に対応するスイッチがONのときだけ利用できる 45 | * 例) は変数10番に入っている値に対応するアクターだけが利用できる 46 | */ 47 | 48 | (function(_global) { 49 | var N = 'RTK_ActionLimit'; 50 | var param = PluginManager.parameters(N); 51 | var tag = String(param['meta tag'] || "condition"); 52 | 53 | function conv(_s, _default) { 54 | if (_s.match(/^\s*[\d.]+\s*$/)) { 55 | return Number(_s); 56 | } 57 | var ret = _s.match(/^\s*v([\d.]+)\s*$/i); 58 | if (ret) { 59 | return $gameVariables.value(Number(ret[1])); 60 | } 61 | return _default; 62 | } 63 | function check(_s, _v) { 64 | if ("string" != typeof _v || _v == "") { 65 | return false; 66 | } 67 | _v = _v.toLowerCase(); 68 | return String(_s||"").split(",").some(function(v){ 69 | return v.toLowerCase() == _v; 70 | }); 71 | } 72 | 73 | var _Scene_Battle_create = Scene_Battle.prototype.create; 74 | Scene_Battle.prototype.create = function() { 75 | _Scene_Battle_create.call(this); 76 | $gameTemp[N + "_items"] = []; 77 | }; 78 | 79 | var _Game_BattlerBase_isOccasionOk = Game_BattlerBase.prototype.isOccasionOk; 80 | Game_BattlerBase.prototype.isOccasionOk = function(item) { 81 | var ret = _Game_BattlerBase_isOccasionOk.call(this, item); 82 | 83 | if (ret && $gameParty.inBattle()) { 84 | var meta = item && (item.meta || {}); 85 | if (meta[tag + " switch"]) { 86 | var v = conv(meta[tag + " switch"], 0); 87 | if (v > 0) { 88 | if (!$gameSwitches.value(v)) { 89 | return false; 90 | } 91 | } 92 | } 93 | if (meta[tag + " max"]) { 94 | var v = conv(meta[tag + " max"], 0); 95 | if (v > 0) { 96 | if (DataManager.isItem(item)) { 97 | var tmp = $gameTemp[N + "_items"]; 98 | if (tmp) { 99 | tmp[item.id] = tmp[item.id] === undefined ? 0 : tmp[item.id]; 100 | if (tmp[item.id] >= v) { 101 | return false; 102 | } 103 | } 104 | } 105 | } 106 | } 107 | if (BattleManager.actor()) { 108 | if (meta[tag + " actor"]) { 109 | var v = conv(meta[tag + " actor"], 0); 110 | if (v) { 111 | if (v != BattleManager.actor().actor().id) { 112 | return false; 113 | } 114 | } else { 115 | if(!check(meta[tag + " actor"], String(BattleManager.actor().actor().id))) { 116 | return false; 117 | } 118 | } 119 | } 120 | if (meta[tag + " class"]) { 121 | var v = conv(meta[tag + " class"], 0); 122 | if (v) { 123 | ret = ret && v == BattleManager.actor()._classId; 124 | } else { 125 | ret = ret && check(meta[tag + " class"], String(BattleManager.actor()._classId)); 126 | } 127 | } 128 | } 129 | } 130 | return ret; 131 | }; 132 | 133 | var _Game_Party_consumeItem = Game_Party.prototype.consumeItem; 134 | Game_Party.prototype.consumeItem = function(item) { 135 | var ret = _Game_Party_consumeItem.call(this, item); 136 | if ($gameParty.inBattle()) { 137 | var meta = item && (item.meta || {}); 138 | if (meta[tag + " max"]) { 139 | var tmp = $gameTemp[N + "_items"]; 140 | if (tmp) { 141 | tmp[item.id] = tmp[item.id] === undefined ? 1 : tmp[item.id] + 1; 142 | } 143 | } 144 | } 145 | return ret; 146 | }; 147 | })(this); 148 | -------------------------------------------------------------------------------- /archive/RTK_TroopEncounter_v1.02.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_TroopEncounter.js ver1.02 2016/07/18 3 | //============================================================================= 4 | 5 | /*: 6 | * @plugindesc Control to encount Troops in Map 7 | * @author Toshio Yamashita (yamachan) 8 | * 9 | * @param tag base 10 | * @desc Tag base name used in Troops's note. 11 | * @default encount_ 12 | * 13 | * @param encount switch 14 | * @desc Player doesn't encount troops when this switch is OFF (0:OFF) 15 | * @default 0 16 | * 17 | * @param amulet items 18 | * @desc Player doesn't encount with these items (0:OFF) 19 | * @default 0 20 | * 21 | * @param amulet states 22 | * @desc Player doesn't encount if an actor has these states (0:OFF) 23 | * @default 0 24 | * 25 | * @help Plugin to control to encount Troops in Map 26 | * 27 | * Plugin Command: 28 | * RTK_TroopEncounter items 4,5,6 # Replace amulet items by 4,5,6 29 | * RTK_TroopEncounter items reset # Reset amulet items 30 | * RTK_TroopEncounter states 4,5,6 # Replace amulet states by 4,5,6 31 | * RTK_TroopEncounter states reset # Reset amulet states 32 | * 33 | * Enemy Note: 34 | * # This enemy doesn't encount when switch #n is OFF 35 | * # This enemy doesn't encount when switch #n is ON 36 | */ 37 | 38 | /*:ja 39 | * @plugindesc マップで敵グループとの遭遇をコントロール 40 | * @author Toshio Yamashita (yamachan) 41 | * 42 | * @param tag base 43 | * @desc 敵グループのノート欄で使用するタグ名のベース 44 | * @default encount_ 45 | * 46 | * @param encount switch 47 | * @desc 指定したスイッチがOFFならエンカウントしない (0:OFF) 48 | * @default 0 49 | * 50 | * @param amulet items 51 | * @desc 指定したアイテムを所持していたらエンカウントしない (0:OFF) 52 | * @default 0 53 | * 54 | * @param amulet states 55 | * @desc 指定した状態のアクターが居たらエンカウントしない (0:OFF) 56 | * @default 0 57 | * 58 | * @help マップで敵グループとの遭遇をコントロールするプラグイン 59 | * 60 | * プラグインコマンド: 61 | * RTK_TroopEncounter items 4,5,6 # エンカウントしないアイテムを 4,5,6 に置き換える 62 | * RTK_TroopEncounter items reset # エンカウントしないアイテムを初期値に戻す 63 | * RTK_TroopEncounter states 4,5,6 # エンカウントしない状態を 4,5,6 に置き換える 64 | * RTK_TroopEncounter states reset # エンカウントしない状態を初期値に戻す 65 | * 66 | * 敵キャラのメモ: 67 | * # 指定したn番スイッチがOFFならエンカウントしない 68 | * # 指定したn番スイッチがONならエンカウントしない 69 | */ 70 | 71 | //----------------------------------------------------------------------------- 72 | 73 | 74 | (function(_global) { 75 | var N = 'RTK_TroopEncounter'; 76 | 77 | var param = PluginManager.parameters(N); 78 | var tag_base = param['tag base'] || "encount_"; 79 | var all_switch = Number(param['encount switch']||"0"); 80 | var amulet_items = param['amulet items']||"0" 81 | var amulet_states = param['amulet states']||"0" 82 | 83 | function convItems(_v) { 84 | return (_v||"0").split(",").map(function(o){ return Number(o)||0; }).filter(function (o, i, a){ return o>0 && a.indexOf(o)===i; }); 85 | } 86 | var items = convItems(amulet_items); 87 | var states = convItems(amulet_states); 88 | 89 | function hasState(_id) { 90 | return $gameParty.aliveMembers().some(function(actor){ 91 | return actor.isStateAffected(_id); 92 | }); 93 | } 94 | 95 | var _Game_Player_meetsEncounterConditions = Game_Player.prototype.meetsEncounterConditions; 96 | Game_Player.prototype.meetsEncounterConditions = function(encounter) { 97 | var ret = _Game_Player_meetsEncounterConditions.call(this, encounter); 98 | if (ret) { 99 | if (all_switch > 0 && !$gameSwitches._data[all_switch]) { 100 | return false; 101 | } 102 | var a = $gameSystem[N + "_items"] || items; 103 | for (var l=0; l 0 && !$gameSwitches._data[sw]) { 115 | return false; 116 | } 117 | sw = Number((enemy.meta||{})[tag_base + "!sw"]||"0"); 118 | if (sw > 0 && $gameSwitches._data[sw]) { 119 | return false; 120 | } 121 | } 122 | } 123 | return ret; 124 | }; 125 | 126 | var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; 127 | Game_Interpreter.prototype.pluginCommand = function(command, args) { 128 | _Game_Interpreter_pluginCommand.call(this, command, args); 129 | if (command == N) { 130 | if (args[0] == "items") { 131 | if (args[1] == "reset" || args[1] == amulet_items) { 132 | delete $gameSystem[N + "_items"]; 133 | } else { 134 | $gameSystem[N + "_items"] = convItems(args[1]); 135 | } 136 | } else if (args[0] == "states") { 137 | if (args[1] == "reset" || args[1] == amulet_states) { 138 | delete $gameSystem[N + "_states"]; 139 | } else { 140 | $gameSystem[N + "_states"] = convItems(args[1]); 141 | } 142 | } 143 | } 144 | }; 145 | 146 | })(this); 147 | -------------------------------------------------------------------------------- /RTK_ActionLimit.ja.md: -------------------------------------------------------------------------------- 1 | [トップページに戻る](README.ja.md) 2 | 3 | # [RTK_ActionLimit](RTK_ActionLimit.js) プラグイン 4 | 5 | RPGツクール MV 用に作成した、スキルやアイテムの利用条件を設定するためのプラグインです。 6 | 7 | ダウンロード: [RTK_ActionLimit.js](https://raw.githubusercontent.com/yamachan/jgss-hack/master/RTK_ActionLimit.js) 8 | 9 | ## インストール 10 | 11 | 上記の js ファイルを RPGツクールMV プロジェクトフォルダにある js/plugins フォルダに保存し、プラグインマネージャーで ON にしてください。 12 | 13 | ![Screen shot - Pligin Manager](i/RTK_ActionLimit-01.png) 14 | 15 | 特に前提としている他のプラグインはありません。 基本的に置き換えている関数はありませんので、可能であればなるべく下のほうに配置してください。 16 | 17 | ## 基本的な使い方 18 | 19 | ある特定のアイテムを利用できるキャラクターを限定してみましょう。 20 | 例えば「忍者」という職業(クラス)を新しく追加したとします。 21 | 22 | ![Screen shot - Database class](i/RTK_ActionLimit-02.png) 23 | 24 | この忍者用に「手裏剣」という攻撃用の消費アイテムを用意してみます。 25 | 26 | 本プラグインを使用すると、この「手裏剣」アイテムは忍者しか使えない、と設定することができます。 27 | 「手裏剣」のメモ欄に <condition class:5> と入力してください。 28 | 29 | ![Screen shot - Database class](i/RTK_ActionLimit-03.png) 30 | 31 | これで「手裏剣」は忍者専用のアイテムになりました。 32 | 以下が実際の戦闘画面です。 33 | 34 | ![Screen shot - Game battle](i/RTK_ActionLimit-04.png) 35 | 36 | 忍者であるテレサがアイテムを使用する時には「手裏剣」が表示されています。 37 | それに対して、忍者ではないマーシャがアイテムを使用しようとしても、「手裏剣」が表示されていないことがわかります。 38 | 39 | ## 使用者を限定する 40 | 41 | 先ほどの「基本的な使い方」では、アイテムの利用者を以下のようにメモ欄で指定しました。 42 | 43 | ``` 44 | 45 | ``` 46 | 47 | 5はクラスの番号(ID)で、今回のサンプルでは「忍者」を示します。 48 | このIDは複数指定でき、以下のようにカンマで区切って指定します。 49 | 50 | ``` 51 | 52 | ``` 53 | 54 | この指定がされたアイテムは、クラスで1番に定義されている「勇者」と5番で定義されている「忍者」のどちらのクラスでも使用することができます。 55 | 56 | クラスのかわりにアクターで指定することができ、その場合には class のかわりに actor キーワードを使用してください。 57 | 例えば2番のアクター、マーシャだけに使えるアイテムは以下のように指定します。 58 | 59 | ``` 60 | 61 | ``` 62 | 63 | この指定はアイテムだけでなくスキルにも有効ですが、スキルはクラスごとに定義できるので、あまり使われることは無さそうです。 64 | 65 | 例えば、主人公のハロルド君はとあるイベントで勇者専用のすっごーいスキルを教わるんだけど、このスキルには制限があって、ハロルド君が勇者の時しか使えない。他の職業に転職中はこのスキルは無効になっている。とまあ、そんな感じの設定ならば、スキルにプラグインの機能で制限することで実現できます。 66 | 67 | ## 前提条件を設定する 68 | 69 | とても強力なスキルやアイテムだけど、いきなりは使えなくて、まずは準備が必要、ってパターンってありますよね。 前提条件による制限、も本プラグインで実現できます。 70 | 71 | 例えば最初から定義されている稲妻の魔法、「スパーク」のスキルですが、これに前提条件を設定してみましょう。 72 | メモ欄に <condition req item:5> と入力してください。 73 | 74 | ![Screen shot - Database skill](i/RTK_ActionLimit-05.png) 75 | 76 | これでこのスキル「スパーク」は自由には使えなくなりました。 77 | まず事前準備として、戦闘中に5番のアイテムを使う必要があります。 78 | 5番のアイテムを使用した次のターンからようやく、「スパーク」のスキルが選択可能になります。 79 | 80 | 5番のアイテムも適当に定義しちゃいましょう。 81 | こちらは特にメモ欄の設定は必要なく、スパークの前提条件なので「スパークの粉」としてみました。 82 | 使用すると威力の弱いスパークが敵を攻撃します。 83 | 84 | ![Screen shot - Database skill](i/RTK_ActionLimit-06.png) 85 | 86 | 今回はサンプルなので、この設定に深い意味はないですが… 87 | まあ、スパークの粉で空間を帯電させ、雷の精霊を呼び出した後でないと、スパークの魔法が使えない、など適当に裏設定を考えてみてください。 88 | 89 | また item を skill に置き換えると、スキルの使用を前提条件に設定することができます。 90 | 91 | ``` 92 | 93 | ``` 94 | 95 | 実際のゲームでは、例えば魔法陣を描くスキルの後でないと上級魔法が使えない、とか。 96 | 精神集中をした後でなければ奥義が使えない、とか。 97 | いろいろ表現が可能だとおもいます。 98 | 99 | 刀のスキルで 「一の太刀 疾風突き」 の後でないと 「二の太刀 燕返し」 が使えない、などの設定も面白そうです。 100 | 101 | ## スイッチで使用を限定する 102 | 103 | 魔法禁止エリアに居たり、何らかの制約があり、一部のスキルやアイテムが使えない、という状況もあるとおもいます。 104 | そこでスイッチによって利用を制限する機能を追加しました。 105 | 106 | 以下のようにメモ欄に設定すると、5番スイッチがONの時だけそのスキルやアイテムが使用可能になります。 107 | 108 | ``` 109 | 110 | ``` 111 | 112 | イベントなどと連動して、プレイヤーの戦闘行動を制限したい場合などにご利用ください。 113 | 114 | ## 利用回数を限定する 115 | 116 | あまりに強力なアイテムやスキルは、1回の戦闘中での利用数を制限したい場合があります。 117 | この場合は対象のスキルやアイテムのメモ欄に以下のように入力します。 118 | 119 | ``` 120 | 121 | ``` 122 | 123 | この設定だと、その対象のスキルやアイテムは、それぞれの戦闘中に1回しか利用できません。 124 | 1は利用できる回数です。 125 | 2の値を設定すれば戦闘中に2回、3の値を設定すれば戦闘中に3回、利用することができます。 126 | 127 | この利用回数ですが、オプションのタグを併用することで利用回数を増加することができます。 128 | 例えば以下のタグを同じメモ欄に入力すれば、戦闘中の利用回数は1回ですが、5ターンごとに1回づつ利用回数が増加します。 129 | 130 | ``` 131 | 132 | 133 | ``` 134 | 135 | この二つのタグをメモ欄に設定されたスキルは、最初1回だけ利用でき、それ以後は選択できなくなります。 136 | しかし戦闘を続けていれば、6ターン目にもう1回、利用することができます。 137 | 138 | ちなみにターン経過で単純に上限が上昇しています。 139 | よって該当スキルを1回も利用しないで戦闘を続けた場合、6ターン目以降ならば1ターンに2回利用する(2名のアクターが利用する)ことも可能です。 140 | 141 | また最初は利用回数が少なくとも、レベルが上がれば利用回数が増える設定もできます。 142 | 例えば以下の設定ですと、最初は戦闘中に1回しか使えませんが、レベルが10を越えると戦闘中に2回、レベルが20を越えると戦闘中に3回、使用可能になります。 143 | 144 | ``` 145 | 146 | 147 | ``` 148 | 149 | この判定で利用されるのは、各アクターのレベルではなく、それらのうち最大のレベルの値です。 150 | よってレベルの低い弱いパーティでも、1人だけレベルの高いキャラが居ればそれが判定の対象となります。 151 | 152 | +turn と +level は併用できます。 153 | 154 | ## 補足事項 155 | 156 | 数値を指定するところで、'v'を数値の先に付けると、その数値の示すゲーム変数の値が代わりに使われます。 157 | 例えば以下は3番アクターのみが利用できる設定ですが 158 | 159 | ``` 160 | 161 | ``` 162 | 163 | 以下のように記載すると、プラグインは3番変数の値を得て、その値が指定するアクターのみが利用できるようにします。 164 | 165 | ``` 166 | 167 | ``` 168 | 169 | 使用できない場合、アイテムはリストに表示されなくなります。 170 | それに対し、スキルは表示はされますが、文字がグレーになって選択できなくなります。 171 | これはシステムもともとの仕様ですし、使い切れば消えるアイテムに対し、消えないスキルは位置が変わると選択が面倒になるため、この仕様が妥当だとおもわれます。 172 | 173 | 利用制限は、コマンド入力の際のアイテムやスキル選択の部分を拡張して実現しています。 174 | なのでコマンド選択以外、例えば混乱して自動でそのアイテムやスキルを使用しようとする、ことまでは阻止できません。 175 | ただしこの場合、実行前のチェックでひっかかるので、その行動はスキップされ、何もしなかったことになるでしょう。 176 | 177 | ## 更新履歴 178 | 179 | | バージョン | 公開日 | 必須ライブラリ | 更新内容 | 180 | | --- | --- | --- | --- | 181 | | ver1.02 | 2016/08/20 | なし | 利用回数の増加機能の追加
前提アイテム/スキル機能の追加 | 182 | | [ver1.01](archive/RTK_ActionLimit_v1.01.js) | 2016/08/18 | なし | 公開 | 183 | 184 | ## ライセンス 185 | 186 | [The MIT License (MIT)](https://opensource.org/licenses/mit-license.php) です。 187 | 188 | 提供されるjsファイルからコメント等を削除しないのであれば、著作権表示は不要です。 むろん表示いただくのは歓迎します! 189 | 190 | [トップページに戻る](README.ja.md) 191 | -------------------------------------------------------------------------------- /guide/version-131.md: -------------------------------------------------------------------------------- 1 | [トップページに戻る](../README.ja.md) 2 | 3 | # RPGツクールMV ver1.3.1 メモ (1) 4 | 5 | RPGツクールMVも ver1.3.1 になり、pixi.js が ver4.0.0 ベースになるなど、大きな変更があったようです。 6 | プラグイン開発に影響が出ないか、従来のプラグインの動作に問題が出ないか、少し気になりますね。 7 | コードをざっとみて、修正点を確認してみたいとおもいます。 8 | 9 | ## plugins.js 10 | 11 | プロジェクトを新規作成すると、スプラッシュ画面を表示するプラグインが自動で設定されるようになったようです。 12 | 13 | ```js 14 | var $plugins = [ 15 | { 16 | "name":"MadeWithMv", 17 | "status":true, 18 | "description":"Show a Splash Screen \"Made with MV\" and/or a Custom Splash Screen before going to main screen.", 19 | "parameters":{ 20 | "Show Made With MV":"true", 21 | "Made with MV Image":"MadeWithMv", 22 | "Show Custom Splash":"false", 23 | "Custom Image":"", 24 | "Fade Out Time":"120", 25 | "Fade In Time":"120", 26 | "Wait Time":"160" 27 | } 28 | } 29 | ]; 30 | ``` 31 | 32 | ## rpg_managers.js 33 | 34 | まずは \*Manager が定義されている rpg_managers.js ファイルを見てみます。 35 | 画像と音楽の暗号化に対応した以外は大きな変化は無さそうです。 36 | 37 | ### DataManager 38 | 39 | onLoad 処理が拡張されていますが、名称からして暗号化されたコンテンツに対応したようです。 40 | Decrypter クラスは rpg_core.js で定義されています。 41 | 42 | ```js 43 | DataManager.onLoad = function(object) { 44 | // 既存コード 45 | if (object === $dataSystem) { 46 | Decrypter.hasEncryptedImages = !!object.hasEncryptedImages; 47 | Decrypter.hasEncryptedAudio = !!object.hasEncryptedAudio; 48 | Scene_Boot.loadSystemImages(); 49 | } 50 | }; 51 | ``` 52 | 53 | プロジェクトをデプロイする時に、画像と音楽を暗号化するオプションが追加されているので、これでしょうね。 54 | 55 | ![Screenshot - deployment](i/version-131-01.png) 56 | 57 | ### ImageManager 58 | 59 | ```js 60 | ImageManager._cache = {}; // before 61 | ``` 62 | 63 | 内部キャッシュが以下のように配列からクラスに変更されています。 64 | 65 | ```js 66 | ImageManager.cache = new CacheMap(ImageManager); // after 67 | ``` 68 | 69 | CacheMap クラスは rpg_core.js で定義されています。 70 | キャッシュ対象の寿命(Time to live)管理がされるようになりました。 71 | ゲーム開始時に利用イメージを一括してロードするような、キャッシュを利用したデータの先読みに影響が出るかもしれません。 72 | 要チェック項目ですね。 73 | 74 | ```js 75 | ImageManager.loadNormalBitmap = function(path, hue) { // before 76 | var key = path + ':' + hue; 77 | if (!this._cache[key]) { 78 | var bitmap = Bitmap.load(path); 79 | bitmap.addLoadListener(function() { 80 | bitmap.rotateHue(hue); 81 | }); 82 | this._cache[key] = bitmap; 83 | } 84 | return this._cache[key]; 85 | }; 86 | ``` 87 | 88 | キャッシュ機構の変更に伴い、画像などの読み込み部分も更新されています。 89 | が、このあたりは本質的な変更ではなさそうです。 90 | 91 | ```js 92 | ImageManager.loadNormalBitmap = function(path, hue) { // after 93 | var key = path + ':' + hue; 94 | var bitmap = this.cache.getItem(key); 95 | if (!bitmap) { 96 | bitmap = Bitmap.load(path); 97 | bitmap.addLoadListener(function() { 98 | bitmap.rotateHue(hue); 99 | }); 100 | this.cache.setItem(key, bitmap); 101 | } 102 | return bitmap; 103 | }; 104 | ``` 105 | 106 | ### AudioManager 107 | 108 | 静的変数がひとつ追加されているようです。 BLOB は Binary Large OBject の略でしょうか。 109 | 110 | ```js 111 | AudioManager._blobUrl = null; 112 | ``` 113 | 114 | ```js 115 | AudioManager.playBgm = function(bgm, pos) { 116 | // 既存のコード 117 | if (bgm.name) { 118 | if(Decrypter.hasEncryptedAudio && this.shouldUseHtml5Audio()){ 119 | this.playEncryptedBgm(bgm, pos); 120 | } 121 | else { 122 | // 既存のコード 123 | } 124 | } 125 | // 既存のコード 126 | }; 127 | ``` 128 | 129 | 使用している関数も上記に続いて定義されています。 130 | \_blobUrl は暗号化されたファイルのURLで、値が定義されていれば優先的に利用されるようです。 131 | 132 | ```js 133 | AudioManager.playEncryptedBgm = function(bgm, pos) { 134 | var ext = this.audioFileExt(); 135 | var url = this._path + 'bgm/' + encodeURIComponent(bgm.name) + ext; 136 | url = Decrypter.extToEncryptExt(url); 137 | Decrypter.decryptHTML5Audio(url, bgm, pos); 138 | }; 139 | 140 | AudioManager.createDecryptBuffer = function(url, bgm, pos){ 141 | this._blobUrl = url; 142 | this._bgmBuffer = this.createBuffer('bgm', bgm.name); 143 | this.updateBgmParameters(bgm); 144 | if (!this._meBuffer) { 145 | this._bgmBuffer.play(true, pos || 0); 146 | } 147 | this.updateCurrentBgm(bgm, pos); 148 | }; 149 | ``` 150 | 151 | rpg_core.js で定義されている Decrypter クラスの該当部分を少し見てみましょう。 152 | 暗号化されている音楽は、拡張子が変更されていることがわかります。 153 | 154 | ```js 155 | Decrypter.extToEncryptExt = function(url) { 156 | var ext = url.split('.').pop(); 157 | var encryptedExt = ext; 158 | 159 | if(ext === "ogg") encryptedExt = ".rpgmvo"; 160 | else if(ext === "m4a") encryptedExt = ".rpgmvm"; 161 | else if(ext === "png") encryptedExt = ".rpgmvp"; 162 | else encryptedExt = ext; 163 | 164 | return url.slice(0, url.lastIndexOf(ext) - 1) + encryptedExt; 165 | }; 166 | ``` 167 | 168 | ### SceneManager 169 | 170 | あまり変更点は無いですね。 171 | Utils.isMobileSafari() で入力処理を場合分けしていますが、何かトラブル対応でしょうかね? 172 | 173 | ImageManager のキャッシュを更新する処理が追加されています。 174 | ここを無効化すれば、旧バージョンと同様にキャッシュの寿命を永遠にできそうな気がしますね。 175 | 176 | ```js 177 | SceneManager.updateManagers = function(ticks, delta) { 178 | ImageManager.cache.update(ticks, delta); 179 | }; 180 | ``` 181 | 182 | ただ、この関数、どこから呼ばれているのでしょうか… 呼ばれていない気が… 183 | 184 | 185 | ## その他、小さな変更メモ 186 | 187 | * SceneManager.onSceneStart 実行時にタイトル画面などでは $gameMap が null な場合がありチェックが必要 188 | 189 | 190 | 191 | 192 | [トップページに戻る](../README.ja.md) 193 | -------------------------------------------------------------------------------- /RTK_TroopEncounter.ja.md: -------------------------------------------------------------------------------- 1 | [トップページに戻る](README.ja.md) 2 | 3 | # [RTK_TroopEncounter](RTK_TroopEncounter.js) プラグイン 4 | 5 | RPGツクール MV 用に作成した、敵との遭遇(エンカウント)をコントロールするためのするための単独のプラグインです。 6 | 7 | ダウンロード: [RTK_TroopEncounter.js](https://raw.githubusercontent.com/yamachan/jgss-hack/master/RTK_TroopEncounter.js) 8 | 9 | ## インストール 10 | 11 | 上記の js ファイルを RPGツクールMV プロジェクトフォルダにある js/plugins フォルダに保存し、プラグインマネージャーで ON にしてください。 12 | 13 | ![Screen shot - Pligin Manager](i/RTK_TroopEncounter-01.png) 14 | 15 | 特に前提としている他のプラグインはありません。 基本的に置き換えている関数はありませんので、可能であればなるべく下のほうに配置してください。 16 | 17 | ## 概要 18 | 19 | RPGツクールMV では、敵との遭遇をマップ画面で設定することができます。 20 | 21 | ![Screen shot - Map edit](i/RTK_TroopEncounter-02.png) 22 | 23 | このマップ画面では遭遇する敵グループの定義や、遭遇する場所、確率など詳細な設定をすることができます。 ただ欠点として、これらは全て静的な設定で、ゲーム中に柔軟に変更することが難しいです。 24 | 25 | 例えば私の制作しているゲームには昼と夜の概念があり、昼と夜では遭遇する敵の種類が異なります。 これを標準機能で実現するのはわりと難しいです。 26 | 27 | 本プラグインはスイッチなどと連動して、遭遇する敵の種類を切り替えることができます。 28 | 29 | ## 基本的なエンカウント制御 30 | 31 | 本プラグインには "encount switch" というプラグインパラメータがあり、初期値として 0 が指定されています。 ここでスイッチの番号を指定すれば、そのスイッチで敵との遭遇をコントロールすることができるようになります。 32 | 33 | ![Screen shot - Plugin parameter](i/RTK_TroopEncounter-03.png) 34 | 35 | 上記の設定では、スイッチ12 が敵との遭遇用のスイッチとなります。 このスイッチが ON の間は、これまで通りマップ上で敵グループとエンカウントします。 しかしこのスイッチが OFF の間は、マップ上を歩いても敵にはエンカウントしません。 36 | 37 | 例えばある平和な村があり、そのマップでは敵にエンカウントしないとします。しかしある出来事があり、村は荒れ果てしまい、その後は敵にエンカウントするようになってしまいました… といったシナリオを、この機能で実現することができます。 38 | 39 | ## 敵ごとのエンカウント制御 40 | 41 | RPGツクールMVには敵グループ(Troop)という概念があり、データベースで定義することができます。 42 | 43 | ![Screen shot - Database troops](i/RTK_TroopEncounter-04.png) 44 | 45 | 本当はこのレベルでエンカウントを制御したいのですが、残念ながら敵グループ設定にはメモ欄(Note)がありません。 そこで本プラグインでは、敵の設定画面にあるメモ欄を使用します。 46 | 47 | 敵のメモ欄に <encount_sw:8> と記載すると、この敵を含んだ敵グループはこのスイッチがONの時にしかエンカウントしなくなります。 48 | 49 | ![Screen shot - Database enemy](i/RTK_TroopEncounter-05.png) 50 | 51 | この敵を含んだ敵グループをマップで指定した場合、「敵グループにエンカウントするが、この敵は含まれない」 のではなく 「この敵を含んだ敵グループとはエンカウントしない」 という仕様になっています。 間違いやすい部分なので注意してください。 52 | 53 | さて、今回の例ではスイッチ8を指定しました。 この制作中のゲームには昼と夜の概念があり、スイッチ8 が ON の時は昼です。 夜にエンカウントする敵も設定してみましょう。 54 | 55 | ![Screen shot - Database enemy](i/RTK_TroopEncounter-06.png) 56 | 57 | 敵のメモ欄に <encount_!sw:8> と記載すると、この敵を含んだ敵グループはこのスイッチがOFFの時にしかエンカウントしなくなります。 さきほどとは逆ですね。 58 | 59 | さてゲーム上では、こうもり(Bat)と吸血鬼(Vampire)を含んだ敵グループとの遭遇をマップに定義しておきましょう。 すると昼(スイッチ8がON)にはわりと安全でこうもりとエンカウントするマップが、夜(スイッチ8がOFF)には危険な吸血鬼とエンカウントするマップになります。夜は危険なので出歩くな、ってわけですね。 60 | 61 | ## アイテム所持によるエンカウント制御 62 | 63 | 本プラグインには "amulet items" というプラグインパラメータがあり、初期値として 0 が指定されています。 64 | 65 | ![Screen shot - Plugin parameter](i/RTK_TroopEncounter-07.png) 66 | 67 | "amulet items" は 「魔除けのアイテム」 という意味で、ここで指定されたアイテムを所持している間、マップ上を歩いても敵とエンカウントしません。 指定する値はアイテムの ID で、カンマ(,)で区切って複数のアイテムを指定することができます。 68 | 69 | またゲーム中に以下のプラグインコマンドを使用して、魔除けのアイテムの設定を変更することができます。 変更した値はセーブファイルに保存されますので、ゲームをセーブして中断しても維持されます。 70 | 71 | ``` 72 | RTK_TroopEncounter items #IDs 73 | ``` 74 | 75 | 以下のプラグインコマンドは、上記のコマンドによる設定をクリアして、初期状態に戻します。 76 | 77 | ``` 78 | RTK_TroopEncounter items reset 79 | ``` 80 | 81 | アイテムと同様に "amulet weapons" や "amulet armors" プラグインパラメータで、武器や防具によるエンカウント制御もできます。 これらは装備していても有効です。 プラグインコマンドもアイテム同様に用意されています。 82 | 83 | ``` 84 | RTK_TroopEncounter weapons #IDs 85 | RTK_TroopEncounter weapons reset 86 | RTK_TroopEncounter armors #IDs 87 | RTK_TroopEncounter armors reset 88 | ``` 89 | 90 | ## ステートによるエンカウント制御 91 | 92 | 本プラグインには "amulet states" というプラグインパラメータがあり、初期値として 0 が指定されています。 93 | 94 | ![Screen shot - Plugin parameter](i/RTK_TroopEncounter-08.png) 95 | 96 | これは 「魔除けのアイテム」 のステート(状態)版で、パーティの中で誰かが指定したステートになっていれば、マップ上を歩いても敵とエンカウントしません。 指定する値はアイテムの ID で、カンマ(,)で区切って複数のアイテムを指定することができます。 97 | 98 | 例えば 「聖なるバリア」 というステートを作成し、「聖水」というアイテムを自身に使うとこのステートになるとします。 この 「聖なるバリア」 ステートの ID を上記のプラグインパラメーターに指定してあれば、ステートが付与されている間はずっと敵とエンカウントしなくなります。 99 | 100 | ステートは歩数で外れるように設定できますので、この機能と併用すると、ドラクエの聖水やトヘロスの呪文に近い機能が実現できそうですね。 101 | 102 | amulet states も amulet items と同様に、プラグインコマンドで対象を変更することが可能です。 103 | 104 | ``` 105 | RTK_TroopEncounter states #IDs 106 | RTK_TroopEncounter states reset 107 | ``` 108 | 109 | ## レベルによるエンカウント制御 110 | 111 | パーティの最大レベル (メンバーのうち、最もレベルの高いメンバーのレベル) をもとにエンカウントを制御することもできます。 112 | 113 | 敵のメモ欄に <encount_lv:10> と記載すると、この敵を含んだ敵グループは、パーティにレベル10以上のメンバーが居るときだけエンカウントします。 114 | 115 | 敵のメモ欄に <encount_!lv:10> と記載するとその逆で、この敵を含んだ敵グループは、パーティにレベル10以上のメンバーが居るとエンカウントしなくなります。 116 | 117 | これらは組み合わせて使用することもできます。 敵のメモ欄に <encount_lv:10><encount_!lv:20> と記載すると、この敵を含んだ敵グループは、パーティにレベル10以上のメンバーが居るとエンカウントするようになります。 しかしパーティが成長し、メンバーがレベル20以上になるとエンカウントしなくなります。 118 | 119 | もうひとつ珍しい制御方法として、レベルの倍数指定があります。 敵のメモ欄に <encount_%lv:5> と記載すると、この敵を含んだ敵グループは、パーティメンバーの最高レベルが 5の倍数 のときだけエンカウントします。 隠し敵キャラ的に利用してみてください。 120 | 121 | これら制御をうまく使って、レベルが低いときには弱い敵に、レベルが高くなると強い敵に、など敵とのエンカウントを工夫してみてください。 122 | 123 | ## 更新履歴 124 | 125 | | バージョン | 公開日 | 必須ライブラリ | 更新内容 | 126 | | --- | --- | --- | --- | 127 | | ver1.03 | 2016/07/21 | なし | amulet weapons 機能の追加
amulet armors 機能の追加
レベルによる制御の追加 | 128 | | [ver1.02](RTK_TroopEncounter_v1.02.js) | 2016/07/18 | なし | amulet item 機能の追加
amulet states 機能の追加 | 129 | | [ver1.01](RTK_TroopEncounter_v1.01.js) | 2016/07/16 | なし | encount switch パラメータ追加
!sw モードの追加 | 130 | | [ver1.00](RTK_TroopEncounter_v1.00.js) | 2016/06/26 | なし | 公開 | 131 | 132 | ## ライセンス 133 | 134 | [The MIT License (MIT)](https://opensource.org/licenses/mit-license.php) です。 135 | 136 | 提供されるjsファイルからコメント等を削除しないのであれば、著作権表示は不要です。 むろん表示いただくのは歓迎します! 137 | 138 | [トップページに戻る](README.ja.md) 139 | -------------------------------------------------------------------------------- /RTK_EnemySight.ja.md: -------------------------------------------------------------------------------- 1 | [トップページに戻る](README.ja.md) 2 | 3 | # [RTK_EnemySight](RTK_EnemySight.js) プラグイン 4 | 5 | RPGツクール MV 用に作成した、敵との遭遇(エンカウント)をコントロールするためのするための単独のプラグインです。 6 | 7 | ダウンロード: [RTK_EnemySight.js](https://raw.githubusercontent.com/yamachan/jgss-hack/master/RTK_EnemySight.js) 8 | 9 | ## インストール 10 | 11 | 上記の js ファイルを RPGツクールMV プロジェクトフォルダにある js/plugins フォルダに保存し、プラグインマネージャーで ON にしてください。 12 | 13 | ![Screen shot - Pligin Manager](i/RTK_EnemySight-01.png) 14 | 15 | 特に前提としている他のプラグインはありません。 基本的に置き換えている関数はありませんので、可能であればなるべく下のほうに配置してください。 16 | 17 | ## 基本的な使い方 18 | 19 | まずは簡単な例として 「びっくりして消えるニワトリ」 を定義してみましょう。 20 | 21 | ![Screen shot - Game event](i/RTK_EnemySight-02.png) 22 | 23 | このニワトリのイベント設定をみてみましょう。 赤枠のメモ欄に <sight:2,A> と入力してあるのがポイントです。 24 | 25 | ![Screen shot - Event edit](i/RTK_EnemySight-03.png) 26 | 27 | この <sight:2,A> が本プラグイン用の指定で、'2' は視界の距離を示します。 つまりニワトリは、自分の目の前2マスだけが見えています。 28 | 29 | 次に指定されている 'A' はこのイベントのセルフスイッチを指定しています。 このニワトリが目の前にプレイヤーを見つけると、このセルフスイッチA が ON になります。 30 | 31 | そしてセルフスイッチA が ON になったことにより、イベントの2ページ目に遷移します。 32 | 33 | ![Screen shot - Event edit](i/RTK_EnemySight-04.png) 34 | 35 | 2ページ目のイベントのコンテンツには、プレイヤーを発見したときのニワトリの動作を指定します。 起動を自動実行(Autorun)にしておくのがポイントです。 36 | 37 | イベント2ページ目の内容ですが、今回はビックリ(!)マークのバルーンを表示した後、120フレーム待ち、そしてセルフスイッチBをONにして空のページ3を有効にします。 つまりニワトリはプレイヤーを見てビックリ!し、ちょっとの間動きが止まった後、画面から消えます。 38 | 39 | なおニワトリの視界ですが、まっすぐ前しか見えません。 なのでニワトリの前を横切らず、横からニワトリに触れると、このイベントの1ページに設定したメッセージが表示されます。 40 | 41 | ![Screen shot - Game event](i/RTK_EnemySight-05.png) 42 | 43 | ニワトリを怖がらせないで、うまく話しかければ情報が得られる、って感じのイベントですね。 44 | 45 | ## 使い方の例 46 | 47 | ポケモンのように 「目の前を通りがかると近寄ってきて、戦いを挑む」 敵キャラを設定してみます。 48 | 49 | イベントの1ページ目は、さきほどのニワトリとほぼ同じです。 <sight:5,A> なので、視界が 5 と長めになっていますね。 50 | 51 | ![Screen shot - Event edit](i/RTK_EnemySight-06.png) 52 | 53 | プレイヤーから話しかけることも想定して、この1ページ目にも敵キャラの対応を設定します。 話しかけられたので 「Oops!」 と驚いてから、戦闘が始まることにしましょう。 戦闘が終了したらスイッチCをONにして、戦闘後の状態にします。 54 | 55 | セルフスイッチCがONで表示される、4ページ目を先に見てみましょう。 戦闘が終わったので 「You can go...」 と弱々しく話すだけにします。 56 | 57 | ![Screen shot - Event edit](i/RTK_EnemySight-07.png) 58 | 59 | さて、敵の目の前をプレイヤーが通ったときの処理です。 本プラグインによってセルフスイッチA がONになって、イベントの2ページ目に遷移します。 60 | 61 | ![Screen shot - Game event](i/RTK_EnemySight-08.png) 62 | 63 | ![Screen shot - Event edit](i/RTK_EnemySight-09.png) 64 | 65 | さてこの2ページ目が、ポケモンっぽい対応をする部分の前編です。 まずは自動実行(Autorun)でイベントが開始し、ビックリ!マークのバルーンを表示して、セルフスイッチBをONにして3ページ目に遷移します。 66 | 67 | 3ページ目はポケモンっぽい対応をする部分の後編、です。 このイベントがプレイヤーめがけて移動してきます。 68 | 69 | ![Screen shot - Game event](i/RTK_EnemySight-10.png) 70 | 71 | ![Screen shot - Event edit](i/RTK_EnemySight-11.png) 72 | 73 | この3ページ目では、移動の設定がポイントです。 プレイヤーを追いかける設定で、かつ移動の頻度を上げることでプレイヤーにぐんぐん迫ってくる感が出ます。 74 | 75 | そしてプレイヤーに追いつくとイベント内容が開始され 「Enemy !!」 と叫んで戦闘になり… って、実はこの部分、1ページ目のプレイヤーから話しかけた場合とセリフが違うだけなんです。 76 | 77 | なので戦闘後はページ4に遷移し、話しかけると会話するだけのキャラになります。 78 | 79 | ![Screen shot - Event edit](i/RTK_EnemySight-12.png) 80 | 81 | 以上、ポケモンっぽい敵キャラを定義してみました。 82 | 83 | ## 利用のアイデア 84 | 85 | さきほどの 「ポケモンっぽい敵」 は、セルフスイッチを利用していて、プレイヤーに気がついた敵キャラだけが迫ってくる仕組みでした。 86 | 87 | では先ほどと同様のイベントを5つほど画面に配置して、メモ欄のタグを <sight:5,15> のように、セルフスイッチではなく、通常のスイッチを ON にするよう変更したらどうなるでしょうか? そして敵キャラはそのスイッチで追跡モードのページに遷移するとしたら? 88 | 89 | そう、どれか1体の敵キャラの視界に入ってしまうと、5体全部がプレイヤーに襲い掛かってくる!ということになります。 90 | 91 | 貴重な宝箱の周りに、強そうなキャラが警備しており、もし見つかったら一斉に襲ってくる!敵キャラの視界を避けつつ、こっそり宝箱に近づく… という、ステルスゲームのような、もしくはパズルゲームのようなマップを作ってみたら、ちょっと楽しそうです。 92 | 93 | また VX Ace のページですが [押せる岩を作る](https://tkool.jp/products/rpgvxace/lecture/006_003q) のイベント設定は MV でも有効です。 この押せる岩などが画面にあれば、岩で視界を塞ぐなど、更なるパズル要素が実現できそうです。 94 | 95 | ![Screen shot - Event edit](i/RTK_EnemySight-15.png) 96 | 97 | ## 障害物について 98 | 99 | リクエストをいただいたので、ver1.02 から障害物に対応しました。 視界の途中に壁などの障害物があると、敵(イベント)はプレイヤーを発見できません。 100 | 101 | 障害物の確認はプレイヤー用の歩行可能かどうかのロジックを利用しています。 ですのでプレイヤーが通れるところは、敵の視線も通る、ということになります。 102 | 103 | "sight through" プラグインパラメータを 1 にすれば、ver1.01 までのように障害物を透視してプレイヤーを見つけます。 104 | 105 | ![Screen shot - Plagin parameter](i/RTK_EnemySight-13.png) 106 | 107 | ### 障害物についての注意点 108 | 109 | 障害物に関して、ひとつ注意点があります。 110 | 111 | 自動で動くように設定したイベントですが、RPGツクールMVでは 「移動するときに、全てのイベントとぶつかり判定がある」 という仕様になっているようです。 プライオリティが「通常キャラと同じ」ものはともかく、通常キャラの下や上に配置したイベントも通ることができません。 112 | 113 | さきほど説明した 「ポケモンっぽい敵キャラ」 の前に、プライオリティを通常キャラと異なって設定したイベントを置いた場合、プレイヤーは通行できるので、敵キャラの視線も通ります。 しかし敵キャラが追跡モードになると、その部分は通れませんので、それを避けて追いかけてきます。 もし配置したイベントに隙間がないとプレイヤーに追いつけなくなります。 114 | 115 | この場合、 「プライオリティを通常キャラと異なって設定したイベント」 それ自体の通り抜けフラグを ON にしてください。 そうすれば敵キャラもそのイベントを通れるようになります。 116 | 117 | ## フォロワーについて 118 | 119 | 先頭のプレイヤーが隠れていても、ついてくるフォロワー達が敵(イベント)に見られたらどうなるでしょうか? 実は標準の設定では、フォロワーは見られても大丈夫です。 120 | 121 | しかしフォロワーも障害物の一種なので、視界の制限が実装された今、フォロワーを使った視界の防御ができてしまいます。 これはプレイしていて楽しいのですが、ちょっとリアリティに欠けますね。 122 | 123 | "followers" プラグインパラメータを 1 にすれば、フォロワーも敵(イベント)に発見されるようになります。 124 | 125 | ![Screen shot - Plagin parameter](i/RTK_EnemySight-14.png) 126 | 127 | 128 | ## 更新履歴 129 | 130 | | バージョン | 公開日 | 必須ライブラリ | 更新内容 | 131 | | --- | --- | --- | --- | 132 | | ver1.03 | 2016/07/23 | なし | プライオリティが通常キャラと異なる場合に視線が通らないバグを修正 | 133 | | [ver1.02](archive/RTK_EnemySight_v1.02.js) | 2016/07/20 | なし | 壁などの障害物が視界を遮るよう改良
フォロワーも見つかるオプションを追加 | 134 | | [ver1.01](archive/RTK_EnemySight_v1.01.js) | 2016/07/16 | なし | ロジック修正 | 135 | | [ver1.00](archive/RTK_EnemySight_v1.00.js) | 2016/07/02 | なし | 公開 | 136 | 137 | ## ライセンス 138 | 139 | [The MIT License (MIT)](https://opensource.org/licenses/mit-license.php) です。 140 | 141 | 提供されるjsファイルからコメント等を削除しないのであれば、著作権表示は不要です。 むろん表示いただくのは歓迎します! 142 | 143 | [トップページに戻る](README.ja.md) 144 | -------------------------------------------------------------------------------- /RTK_EventMatch.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_EventMatch.js ver1.01 2016/07/24 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc Set switch when all conditions are met in map events 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @param tag name 11 | * @desc Tag name used in Event's note. 12 | * @default event match 13 | * 14 | * @help This plugin does not provide plugin commands. 15 | * 16 | * Event Note: 17 | * # Switch s' condition is this event is in r region 18 | * # Switch s' condition is this event is not in r region 19 | * # Add 1 to variable v, if this event is in r region 20 | * # Add 1 to variable v, if this event is not in r region 21 | * # Switch s' condition is this event and e event is in a same location 22 | * # Switch s' condition is this event and e event is not in a same location 23 | * # Add 1 to variable v, if this event and e event is in a same location 24 | * # Add 1 to variable v, if this event and e event is not in a same location 25 | */ 26 | 27 | /*:ja 28 | * @plugindesc マップでイベントの条件が全て揃うとスイッチをON 29 | * @author Toshio Yamashita (yamachan) 30 | * 31 | * @param tag name 32 | * @desc イベントのメモ欄で使用するタグ名 33 | * @default event match 34 | * 35 | * @help このプラグインにはプラグインコマンドはありません。 36 | * 37 | * イベントのメモ: 38 | * # スイッチ s の条件はこのイベントが r リージョンにあること 39 | * # スイッチ s の条件はこのイベントが r リージョンにないこと 40 | * # このイベントが r リージョンにあれば変数 v に1を加える 41 | * # このイベントが r リージョンになければ変数 v に1を加える 42 | * # スイッチ s の条件はこのイベントが e イベントと同じ位置にあること 43 | * # スイッチ s の条件はこのイベントが e イベントと同じ位置にないこと 44 | * # このイベントが e イベントと同じ位置にあれば変数 v に1を加える 45 | * # このイベントが e イベントと同じ位置になければ変数 v に1を加える 46 | * 47 | * 解説ページ: 48 | * https://github.com/yamachan/jgss-hack/blob/master/RTK_EventMatch.ja.md 49 | */ 50 | 51 | //----------------------------------------------------------------------------- 52 | 53 | (function(_global) { 54 | var N = 'RTK_EventMatch'; 55 | 56 | var param = PluginManager.parameters(N); 57 | var tag_name = param['tag name'] || "event match"; 58 | 59 | var _Game_Map_updateEvents = Game_Map.prototype.updateEvents; 60 | Game_Map.prototype.updateEvents = function() { 61 | _Game_Map_updateEvents.call(this); 62 | 63 | var sws = []; 64 | var vars = []; 65 | this.events().forEach(function(event) { 66 | var meta = event.event().meta || {}; 67 | var ret = String(meta[tag_name + "_sr"]||"").match(/^\s*(\d+),(\d+)\s*$/); 68 | if (ret) { 69 | var sw = Number(ret[1]); 70 | if (sw > 0) { 71 | sws[sw] = (sws[sw] === undefined ? true : sws[sw]) && event.regionId() == Number(ret[2]); 72 | } 73 | } 74 | ret = String(meta[tag_name + "_!sr"]||"").match(/^\s*(\d+),(\d+)\s*$/); 75 | if (ret) { 76 | var sw = Number(ret[1]); 77 | if (sw > 0) { 78 | sws[sw] = (sws[sw] === undefined ? true : sws[sw]) && event.regionId() != Number(ret[2]); 79 | } 80 | } 81 | ret = String(meta[tag_name + "_vr"]||"").match(/^\s*(\d+),(\d+)\s*$/); 82 | if (ret) { 83 | var v = Number(ret[1]); 84 | if (v > 0 && event.regionId() == Number(ret[2])) { 85 | vars[v] = vars[v] || 0; 86 | vars[v]++; 87 | } 88 | } 89 | ret = String(meta[tag_name + "_!vr"]||"").match(/^\s*(\d+),(\d+)\s*$/); 90 | if (ret) { 91 | var v = Number(ret[1]); 92 | if (v > 0 && event.regionId() != Number(ret[2])) { 93 | vars[v] = vars[v] || 0; 94 | vars[v]++; 95 | } 96 | } 97 | ret = String(meta[tag_name + "_se"]||"").match(/^\s*(\d+),(\d+)\s*$/); 98 | if (ret) { 99 | var sw = Number(ret[1]); 100 | var ev = $gameMap.event(Number(ret[2])) || {}; 101 | if (sw > 0) { 102 | sws[sw] = (sws[sw] === undefined ? true : sws[sw]) && event.x == ev.x && event.y == ev.y; 103 | } 104 | } 105 | ret = String(meta[tag_name + "_!se"]||"").match(/^\s*(\d+),(\d+)\s*$/); 106 | if (ret) { 107 | var sw = Number(ret[1]); 108 | var ev = $gameMap.event(Number(ret[2])) || {}; 109 | if (sw > 0) { 110 | sws[sw] = (sws[sw] === undefined ? true : sws[sw]) && (event.x != ev.x || event.y != ev.y); 111 | } 112 | } 113 | ret = String(meta[tag_name + "_ve"]||"").match(/^\s*(\d+),(\d+)\s*$/); 114 | if (ret) { 115 | var v = Number(ret[1]); 116 | var ev = $gameMap.event(Number(ret[2])) || {}; 117 | if (sw > 0 && event.x == ev.x && event.y == ev.y) { 118 | vars[v] = vars[v] || 0; 119 | vars[v]++; 120 | } 121 | } 122 | ret = String(meta[tag_name + "_!ve"]||"").match(/^\s*(\d+),(\d+)\s*$/); 123 | if (ret) { 124 | var v = Number(ret[1]); 125 | var ev = $gameMap.event(Number(ret[2])) || {}; 126 | if (sw > 0 && (event.x != ev.x || event.y != ev.y)) { 127 | vars[v] = vars[v] || 0; 128 | vars[v]++; 129 | } 130 | } 131 | }); 132 | for (var l=0; l # Can use this when #n switch is ON 18 | * # Actors (ID: n,m,,) can use this 19 | * # Classes (ID: n,m,,) can use this 20 | * # Can use #n times in a battle 21 | * 22 | * If you add the prefix "v" to the number n, it means a value in the game variables. 23 | * e.g. Can use this when the switch selected by the game variable #10 is ON. 24 | * e.g. An actor selected by the game variable #10 can use this. 25 | */ 26 | 27 | /*:ja 28 | * @plugindesc メモ欄のタグでアクションの実行回数などを制限する 29 | * @author Toshio Yamashita (yamachan) 30 | * 31 | * @param meta tag 32 | * @desc ノート欄で使用条件を指定するタグ名 33 | * @default condition 34 | * 35 | * @help このプラグインにはプラグインコマンドはありません。 36 | * 37 | * スキル・アイテムのメモ: 38 | * # n番スイッチがONのときだけ戦闘で利用できる 39 | * # n,m,,番のアクターだけが戦闘で利用できる 40 | * # n,m,,番のクラスだけが戦闘で利用できる 41 | * # 1度の戦闘でn回だけ利用できる 42 | * 43 | * 単独の数値 n の前に "v" を付与すると、その番号が示すゲーム変数の値が代わりに利用される 44 | * 例) は変数10番に入っている値に対応するスイッチがONのときだけ利用できる 45 | * 例) は変数10番に入っている値に対応するアクターだけが利用できる 46 | */ 47 | 48 | (function(_global) { 49 | var N = 'RTK_ActionLimit'; 50 | var param = PluginManager.parameters(N); 51 | var tag = String(param['meta tag'] || "condition"); 52 | var items = []; 53 | var skills = []; 54 | 55 | 56 | function conv(_s, _default) { 57 | if (_s.match(/^\s*[\d.]+\s*$/)) { 58 | return Number(_s); 59 | } 60 | var ret = _s.match(/^\s*v([\d.]+)\s*$/i); 61 | if (ret) { 62 | return $gameVariables.value(Number(ret[1])); 63 | } 64 | return _default; 65 | } 66 | function check(_s, _v) { 67 | if ("string" != typeof _v || _v == "") { 68 | return false; 69 | } 70 | _v = _v.toLowerCase(); 71 | return String(_s||"").split(",").some(function(v){ 72 | return v.toLowerCase() == _v; 73 | }); 74 | } 75 | function count(_i, _t) { 76 | var ret = 0; 77 | if (BattleManager._phase == "input") { 78 | for (var l=0; l 0) { 108 | if (!$gameSwitches.value(v)) { 109 | return false; 110 | } 111 | } 112 | } 113 | if (meta[tag + " max"]) { 114 | var v = conv(meta[tag + " max"], 0); 115 | if (v > 0) { 116 | if (DataManager.isItem(item)) { 117 | items[item.id] = items[item.id] === undefined ? 0 : items[item.id]; 118 | if (items[item.id] + count(item.id, "item") >= v) { 119 | return false; 120 | } 121 | } else if (DataManager.isSkill(item)) { 122 | skills[item.id] = skills[item.id] === undefined ? 0 : skills[item.id]; 123 | if (skills[item.id] + count(item.id, "skill") >= v) { 124 | return false; 125 | } 126 | } 127 | } 128 | } 129 | if (BattleManager.actor()) { 130 | if (meta[tag + " actor"]) { 131 | var v = conv(meta[tag + " actor"], 0); 132 | if (v) { 133 | if (v != BattleManager.actor().actor().id) { 134 | return false; 135 | } 136 | } else { 137 | if(!check(meta[tag + " actor"], String(BattleManager.actor().actor().id))) { 138 | return false; 139 | } 140 | } 141 | } 142 | if (meta[tag + " class"]) { 143 | var v = conv(meta[tag + " class"], 0); 144 | if (v) { 145 | if (v != BattleManager.actor()._classId) { 146 | return false; 147 | } 148 | } else { 149 | if (check(meta[tag + " class"], String(BattleManager.actor()._classId))) { 150 | return false; 151 | } 152 | } 153 | } 154 | } 155 | } 156 | return ret; 157 | }; 158 | 159 | var _Game_Party_consumeItem = Game_Party.prototype.consumeItem; 160 | Game_Party.prototype.consumeItem = function(item) { 161 | var ret = _Game_Party_consumeItem.call(this, item); 162 | if ($gameParty.inBattle()) { 163 | var meta = item && (item.meta || {}); 164 | if (meta[tag + " max"]) { 165 | items[item.id] = items[item.id] === undefined ? 1 : items[item.id] + 1; 166 | } 167 | } 168 | return ret; 169 | }; 170 | 171 | var _Game_BattlerBase_paySkillCost = Game_BattlerBase.prototype.paySkillCost; 172 | Game_BattlerBase.prototype.paySkillCost = function(skill) { 173 | var ret = _Game_BattlerBase_paySkillCost.call(this, skill); 174 | if ($gameParty.inBattle()) { 175 | var meta = skill && (skill.meta || {}); 176 | if (meta[tag + " max"]) { 177 | skills[skill.id] = skills[skill.id] === undefined ? 1 : skills[skill.id] + 1; 178 | } 179 | } 180 | return ret; 181 | }; 182 | 183 | })(this); 184 | -------------------------------------------------------------------------------- /memo/201605-2nd-try.md: -------------------------------------------------------------------------------- 1 | # 201605-2nd-Try 2 | 3 | ## Global game objects in game 4 | 5 | At first, see data objects in the game. 6 | 7 | ```js 8 | DataManager.setupNewGame = function() { 9 | this.createGameObjects(); 10 | this.selectSavefileForNewGame(); 11 | $gameParty.setupStartingMembers(); 12 | $gamePlayer.reserveTransfer($dataSystem.startMapId, $dataSystem.startX, $dataSystem.startY); 13 | Graphics.frameCount = 0; 14 | }; 15 | ``` 16 | 17 | ```js 18 | DataManager.createGameObjects = function() { 19 | $gameTemp = new Game_Temp(); 20 | $gameSystem = new Game_System(); 21 | $gameScreen = new Game_Screen(); 22 | $gameTimer = new Game_Timer(); 23 | $gameMessage = new Game_Message(); 24 | $gameSwitches = new Game_Switches(); 25 | $gameVariables = new Game_Variables(); 26 | $gameSelfSwitches = new Game_SelfSwitches(); 27 | $gameActors = new Game_Actors(); 28 | $gameParty = new Game_Party(); 29 | $gameTroop = new Game_Troop(); 30 | $gameMap = new Game_Map(); 31 | $gamePlayer = new Game_Player(); 32 | }; 33 | ``` 34 | 35 | In RPG Maker MV application, let's add a simple evevt object, like a signboard. You can set your custom JS code with using 'Advanced/Script...' content in it, as follows; 36 | 37 | ```js 38 | console.dir({ 39 | "$gameTemp":$gameTemp, "$gameSystem":$gameSystem, 40 | "$gameScreen":$gameScreen, "$gameTimer":$gameTimer, 41 | "$gameMessage":$gameMessage, 42 | "$gameSwitches":$gameSwitches, 43 | "$gameVariables":$gameVariables, 44 | "$gameSelfSwitches":$gameSelfSwitches, 45 | "$gameActors":$gameActors, "$gameParty":$gameParty, 46 | "$gameTroop":$gameTroop, "$gameMap":$gameMap, 47 | "$gamePlayer":$gamePlayer 48 | }); 49 | ``` 50 | 51 | ![Event Editor screenshot](i/201605-2nd-try-01.png) 52 | 53 | During the test play on RPG Maker MV, you can use Development tool by 'F8' key. This tool is very familiar for us, Web developers. 54 | 55 | When you use the signboard in test game, you can see all global objects defined in DataManager.createGameObjects funcrion in the tool's console. It's useful. 56 | 57 | ![Game play screenshot](i/201605-2nd-try-02.png) 58 | 59 | ## Global data objects in game 60 | 61 | In addition, let's add one more a sign board for data objects in game; 62 | 63 | ```js 64 | console.dir({ 65 | "$dataActors":$dataActors,"$dataClasses":$dataClasses, 66 | "$dataSkills":$dataSkills,"$dataItems":$dataItems, 67 | "$dataWeapons":$dataWeapons,"$dataArmors":$dataArmors, 68 | "$dataEnemies":$dataEnemies,"$dataTroops":$dataTroops, 69 | "$dataStates":$dataStates,"$dataAnimations":$dataAnimations, 70 | "$dataTilesets":$dataTilesets, 71 | "$dataCommonEvents":$dataCommonEvents, 72 | "$dataSystem":$dataSystem, 73 | "$dataMapInfos":$dataMapInfos,"$dataMap":$dataMap 74 | }); 75 | ``` 76 | 77 | Most of $data* objects looks simple Array. We need to understand the relationship among $data* arrays and $game* objects in game logic. 78 | 79 | ## Quick Event Creation - Treasure box 80 | 81 | RPG Maker MV has a good function to create typical events automatically. It's very useful! The following is one of them, a simple Treasure box event. 82 | 83 | ![Event editor page1](i/201605-2nd-try-03.png) 84 | 85 | I think this is a good sample to understand an event which uses a self switch only - easy to copy and paste to anywhere. You can find the self switch A is working on the 2nd page; 86 | 87 | ![Event editor page2](i/201605-2nd-try-04.png) 88 | 89 | ## Quick Event Creation - Transfer 90 | 91 | One more sample, the Transfer is too simple; 92 | 93 | ![Event editor content](i/201605-2nd-try-05.png) 94 | 95 | ## Use plugin - EnemyBook and ItemBook 96 | 97 | I like the official plugin, ItemBook and EnemyBook. 98 | 99 | ![Plugin screenshot](i/201605-2nd-try-06.png) 100 | 101 | To test both books, I had added the following test event; 102 | 103 | ![Event editor content](i/201605-2nd-try-07.png) 104 | 105 | The following is a test play of EnemyBook. This is a simple test, so it shows all enemies of the game. 106 | 107 | ![test play screenshot - EnemyBook](i/201605-2nd-try-08.png) 108 | 109 | The following is a test play of ItemBook. This is a simple test, so it shows all items of the game. It includes weapons and armours. 110 | 111 | ![test play screenshot - ItemBook](i/201605-2nd-try-09.png) 112 | 113 | ## Update ItemBook plugin 114 | 115 | I want to use WeaponBook and ArmorBook, like ItemBook. In addition, the ItemBook should not contain Weapon and Armor. I try to enhance "ItemBook" plugin a little for me. 116 | 117 | At first, I added 'type' command into Game_Interpreter.prototype.pluginCommand function in ItemBook.js. 118 | 119 | ```js 120 | case 'type': 121 | $gameSystem._ItemBookType = $gameSystem.itemBookTypeToIndex(args[1]); 122 | break; 123 | ``` 124 | 125 | 126 | Then I updated Window_ItemBookIndex.prototype.refresh function as follows; 127 | 128 | ```js 129 | Window_ItemBookIndex.prototype.refresh = function() { 130 | var i, item; 131 | this._list = []; 132 | for (i = 1; i < $dataItems.length; i++) { 133 | item = $dataItems[i]; 134 | if (item.name && item.itypeId === 1 && item.meta.book !== 'no' && !($gameSystem._ItemBookType == 1 || $gameSystem._ItemBookType == 2)) { 135 | this._list.push(item); 136 | } 137 | } 138 | for (i = 1; i < $dataWeapons.length; i++) { 139 | item = $dataWeapons[i]; 140 | if (item.name && item.meta.book !== 'no' && !($gameSystem._ItemBookType == 0 || $gameSystem._ItemBookType == 2)) { 141 | this._list.push(item); 142 | } 143 | } 144 | for (i = 1; i < $dataArmors.length; i++) { 145 | item = $dataArmors[i]; 146 | if (item.name && item.meta.book !== 'no' && !($gameSystem._ItemBookType == 0 || $gameSystem._ItemBookType == 1)) { 147 | this._list.push(item); 148 | } 149 | } 150 | this.createContents(); 151 | this.drawAllItems(); 152 | }; 153 | ``` 154 | 155 | Now, I can use 'ItemBook type [all|weapon|armor|item]' plugin command as follows; 156 | 157 | ![Event editor content](i/201605-2nd-try-10.png) 158 | 159 | For example, the following is an ItemBook which contains only Weapons (ItemBook type weapon). 160 | 161 | ![test play screenshot - ItemBook (Weapon only)](i/201605-2nd-try-11.png) 162 | -------------------------------------------------------------------------------- /RTK1_MapLocalVariables.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK1_MapLocalVariables.js ver1.15 2016/07/17 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc Use selected variables as map local ones 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @param start number 11 | * @desc ID of the first one in the map local variables 12 | * @default 0 13 | * 14 | * @param end number 15 | * @desc ID of the last one in the map local variables 16 | * @default 0 17 | * 18 | * @help 19 | * Plugin to use selected variables as map local ones 20 | * This plugin requires RTK1_Core plugin (1.14 or later) previously. 21 | * 22 | * Plugin Command: 23 | * RTK1_MapLocalVariables clear # Clear all map local variables by 0 24 | * RTK1_MapLocalVariables recover # Recover all map local variables to the map entry 25 | * 26 | * Script or Script value: 27 | * RTK.MLV.get(#n) # Get value of #n th map local variable 28 | * RTK.MLV.set(#n, #value) # Set value of #n th map local variable 29 | * RTK.MLV.clear() # Clear all map local variables by 0 30 | * RTK.MLV.clear(#s,#e) # Clear all map local variables from #s to #e by 0 31 | * RTK.MLV.recover() # Recover all map local variables to the map entry 32 | * 33 | * Manual: 34 | * https://github.com/yamachan/jgss-hack/blob/master/RTK1_MapLocalVariables.md 35 | */ 36 | 37 | /*:ja 38 | * @plugindesc 指定した範囲のゲーム変数をマップローカル変数として利用する 39 | * @author Toshio Yamashita (yamachan) 40 | * 41 | * @param start number 42 | * @desc マップローカル変数に使用する範囲の最初のID 43 | * @default 0 44 | * 45 | * @param end number 46 | * @desc マップローカル変数に使用する範囲の最後のID 47 | * @default 0 48 | * 49 | * @help 50 | * RPGツクール MV 用に作成した、マップローカル変数を実現するプラグインです。 51 | * このプラグインの前に RTK1_Core プラグイン(1.14以降)を読み込んでください。 52 | * 53 | * プラグインコマンド: 54 | * RTK1_MapLocalVariables clear # マップローカル変数を0クリアする 55 | * RTK1_MapLocalVariables recover # マップローカル変数を今回のマップ起動時の状態に戻す 56 | * 57 | * 利用できるスクリプトおよびスクリプト値: 58 | * RTK.MLV.get(#n) # マップローカル変数 n番目の値を得る 59 | * RTK.MLV.set(#n, #value) # マップローカル変数 n番目に #value を設定する 60 | * RTK.MLV.clear() # マップローカル変数を0クリアする 61 | * RTK.MLV.clear(#s, #e) # マップローカル変数 #s~#e 番目を0クリアする 62 | * RTK.MLV.recover() # マップローカル変数を今回のマップ起動時の状態に戻す 63 | * 64 | * マニュアル: 65 | * https://github.com/yamachan/jgss-hack/blob/master/RTK1_MapLocalVariables.ja.md 66 | */ 67 | 68 | 69 | (function(_global) { 70 | "use strict"; 71 | if (!_global["RTK"]) { 72 | throw new Error('This plugin requires RTK1_Core plugin previously.'); 73 | } 74 | if (RTK.VERSION_NO < 1.15) { 75 | throw new Error('This plugin requires version 1.15 or later of RTK1_Core plugin. the current version looks ' + RTK.VERSION_NO + "."); 76 | } 77 | 78 | var N = "RTK1_MapLocalVariables"; 79 | var NK = "RTK_MLV"; 80 | var M = RTK["MLV"] = RTK._modules[N] = {}; 81 | 82 | var param = PluginManager.parameters(N); 83 | M._start = Number(param['start number'] || "0"); 84 | M._end = Number(param['end number'] || "0"); 85 | M._data = M._data || {}; 86 | M._id = 0; 87 | M._info = null; 88 | 89 | if (M._start < 1 || M._end < 1 || M._start > M._end) { 90 | return; // will not affect the game :-) 91 | } 92 | 93 | M.save = function(_id) { 94 | _id = _id || M._id; 95 | if (_id > 0 && $dataMapInfos[_id]) { 96 | var start = M._start; 97 | for (var l=M._start; l<=M._end; l++) { // Skip head 0 values 98 | if ($gameVariables.value(l) != 0) { 99 | break; 100 | } 101 | start++; 102 | } 103 | var list = []; 104 | for (var l=start; l<=M._end; l++) { 105 | list.push($gameVariables.value(l)); 106 | } 107 | while (list.length > 0 && list[list.length - 1] == 0) { // Remove tail 0 values 108 | list.pop() ; 109 | } 110 | if (list.length < 1) { 111 | delete M._data["s" + _id]; 112 | delete M._data[String(_id)]; 113 | return 0; 114 | } 115 | if (start == M._start) { 116 | delete M._data["s" + _id]; 117 | } else { 118 | M._data["s" + _id] = start; 119 | } 120 | M._data[String(_id)] = list; 121 | return list.length; 122 | } 123 | return -1; 124 | }; 125 | M.clear = function(_start, _end) { 126 | _start = _start || M._start; 127 | _end = _end || M._end; 128 | for (var l=_start; l<=_end; l++) { 129 | $gameVariables.setValue(l, 0); 130 | } 131 | } 132 | M.recover = function(_id) { 133 | _id = _id || M._id; 134 | if (_id > 0 && $dataMapInfos[_id]) { 135 | var start = Math.max(M._data["s" + _id]||0, M._start); 136 | var list = M._data[String(_id)]; 137 | M.clear(M._start, M._end); 138 | if (start > 0 && start <= M._end && list) { 139 | for (var l=start; l<=M._end; l++) { 140 | $gameVariables.setValue(l, list[l - start]); 141 | } 142 | return M._end - start + 1; 143 | } else { 144 | return 0; 145 | } 146 | } 147 | return -1; 148 | } 149 | M.get = function(_no, _id) { 150 | _id = _id || M._id; 151 | if (_id == M._id) { 152 | return $gameVariables.value(M._start - 1 + _no); 153 | } else { 154 | } 155 | } 156 | M.set = function(_no, _value, _id) { 157 | _id = _id || M._id; 158 | if (_id == M._id) { 159 | $gameVariables.setValue(M._start - 1 + _no, _value); 160 | } else { 161 | } 162 | } 163 | 164 | RTK.onMapStart(function(_id){ 165 | if (M._id != _id && $dataMapInfos[_id]) { 166 | if (M._id > 0) { 167 | M.save(M._id); 168 | } 169 | M._id = _id; 170 | M._info = $dataMapInfos[_id]; 171 | M.recover(); 172 | } 173 | RTK.log(N + " mapStart [" + _id + "]"); 174 | }); 175 | 176 | RTK.onLoad(function(){ 177 | M._data = RTK.load(NK + "_data") || M._data; 178 | RTK.log(N + " load (_data)", M._data); 179 | }); 180 | RTK.onSave(function(){ 181 | if (M._id > 0) { 182 | M.save(M._id); 183 | } 184 | RTK.save(NK + "_data", M._data); 185 | RTK.log(N + " save (_data)", M._data); 186 | }); 187 | 188 | M.command = function(args) { 189 | if (args[0] == "clear") { 190 | M.clear(); 191 | } else if (args[0] == "recover") { 192 | M.recover(); 193 | } 194 | RTK.log(N + " command (" + args.join(" ") + ")"); 195 | }; 196 | RTK.onCall(N, M.command.bind(this)); 197 | })(this); 198 | 199 | /* 実装予定メモ 200 | * RTK1_MapLocalVariables clear 1-3 # マップローカル変数 1~3 番目を0クリアする (実装中) 201 | * RTK.MLV.get(n, #map) # IDが #map である他のマップの マップローカル変数 n番目の値を得る (実装中) 202 | * RTK.MLV.set(n, #value, #map) # IDが #map である他のマップの マップローカル変数 n番目 #value を設定する(実装中) 203 | 204 | 205 | */ 206 | -------------------------------------------------------------------------------- /RTK_ActorTraits.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_ActorTraits.js ver 1.01 2016/08/03 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc Plugin commands to add traits against actors 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @help 11 | * Add plugin commands to add traits against actors. 12 | * Plugin commands: 13 | * RTK_ActorTraits list # List actors' current traits to the console 14 | * RTK_ActorTraits add n {} # Add {} trait against #n actor 15 | * RTK_ActorTraits remove n {} # Remove {} trait from #n actor 16 | * RTK_ActorTraits clear n # Remove #n actor's all addtional traits 17 | * RTK_ActorTraits clear all # Remove all actors' all addtional traits 18 | * 19 | * The prefix "n" shows the actor's id. This is a default, so you can omit it. 20 | * e.g. RTK_ActorTraits add n3 {} => Add {} trait against #3 actor 21 | * 22 | * The prefix "v" shows the game valiable. The value will be used as the actor #. 23 | * 例) RTK_ActorTraits add v10 {} => Add {} trait against the actor which is found by the game valiable #10. 24 | * 25 | * The prefix "p" shows the party member. The value will be used as the order # of the party member list. 26 | * 例) RTK_ActorTraits add p1 {} => Add {} trait against the 1st actor in the party. 27 | * 28 | * To know the correct trait object value {}, set the trait to an actor, then use "list" command 29 | * e.g. {"code":43,"dataId":13,"value":1} is to enable to use #13 skill 30 | * e.g. {"code":51,"dataId":7,"value":1} is to enable to equip #7 weapon 31 | * e.g. {"code":52,"dataId":3,"value":1} is to enable to equip #3 armor 32 | */ 33 | 34 | /*:ja 35 | * @plugindesc アクターに特徴を追加するプラグインコマンド 36 | * @author Toshio Yamashita (yamachan) 37 | * 38 | * @help 39 | * アクターに特徴を追加するプラグインコマンドを追加します。 40 | * プラグインコマンド: 41 | * RTK_ActorTraits list # 現在のアクターの特徴をコンソールにリスト表示する 42 | * RTK_ActorTraits add n {} # n番のアクターに {} の特徴を追加 43 | * RTK_ActorTraits remove n {} # n番のアクターから {} の特徴を削除 44 | * RTK_ActorTraits clear n # n番のアクターの特徴を初期状態に戻す 45 | * RTK_ActorTraits clear all # 全てのアクターの特徴を初期状態に戻す 46 | * 47 | * n番を示す数値の前に "n" を付与すると、その番号が対象アクターのIDになる 48 | * これはデフォルトの動作のためこの "n" は省略可能です 49 | * 例) RTK_ActorTraits add n3 {} は3番のアクターに {} の特徴を追加する 50 | * 51 | * n番を示す数値の前に "v" を付与すると、その番号が示すゲーム変数の値がアクターの番号になる 52 | * 例) RTK_ActorTraits add v10 {} は変数10番に入っている値が示すアクターに {} の特徴を追加する 53 | * 54 | * n番を示す数値の前に "p" を付与すると、パーティメンバーの n 番目のアクターが対象になる 55 | * 例) RTK_ActorTraits add p1 {} はパーティ先頭のアクターに {} の特徴を追加する 56 | * 57 | * 特徴を表現するオブジェクト {} は、いったんアクターに設定して list コマンドで調査してください 58 | * 例) {"code":43,"dataId":13,"value":1} は 13番のスキルを使えるようにする 59 | * 例) {"code":51,"dataId":7,"value":1} は 7番の種類の武器を装備できるようにする 60 | * 例) {"code":52,"dataId":3,"value":1} は 3番の種類の防具を装備できるようにする 61 | */ 62 | 63 | (function(_global) { 64 | var N = 'RTK_ActorTraits'; 65 | var param = PluginManager.parameters(N); 66 | var backup = []; 67 | 68 | var _DataManager_extractSaveContents = DataManager.extractSaveContents; 69 | DataManager.extractSaveContents = function(contents) { 70 | var ret = _DataManager_extractSaveContents.call(this, contents); 71 | var list = $gameSystem[N]||[]; 72 | for (var l=0; l 0) { 74 | if (!backup[l]) { 75 | backup[l] = $gameActors.actor(l).actor().traits.clone(); 76 | } 77 | list[l].forEach(function(json){ 78 | $gameActors.actor(l).actor().traits.push(JsonEx.parse(json)); 79 | }); 80 | } 81 | } 82 | return ret; 83 | }; 84 | 85 | function convId(_s) { 86 | if (_s.match(/^\d+$/)) { 87 | return Number(_s) || 0;; 88 | } 89 | var ret = _s.match(/^n(\d+)$/i); 90 | if (ret) { 91 | return Number(ret[1]) || 0; 92 | } 93 | ret = _s.match(/^v(\d+)$/i); 94 | if (ret) { 95 | return $gameVariables.value(Number(ret[1])); 96 | } 97 | ret = _s.match(/^p(\d+)$/i); 98 | if (ret) { 99 | var actor = $gameParty.allMembers()[Number(ret[1]) - 1]; 100 | if (actor) { 101 | return actor.actor().id 102 | } 103 | } 104 | return 0; 105 | } 106 | function clearTrait(_id) { 107 | if (_id > 0 && backup[_id]) { 108 | $gameActors.actor(_id).actor().traits = backup[_id]; 109 | backup[_id] = undefined; 110 | var gsys = $gameSystem[N]||[]; 111 | if (gsys[_id]) { 112 | gsys[_id] = undefined; 113 | $gameSystem[N] = gsys; 114 | } 115 | } 116 | } 117 | 118 | var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; 119 | Game_Interpreter.prototype.pluginCommand = function(command, args) { 120 | _Game_Interpreter_pluginCommand.call(this, command, args); 121 | if (command == N) { 122 | if (args[0] == "list") { 123 | $gameParty.allMembers().forEach(function(actor){ 124 | console.log(actor.name()); 125 | actor.actor().traits.forEach(function(trait){ 126 | console.log(JsonEx.stringify(trait)); 127 | }); 128 | }); 129 | } 130 | if (args[0] == "add" && args.length > 2) { 131 | var id = convId(args[1]); 132 | var json = args.slice(2).join(" "); 133 | if (id > 0 && json != "") { 134 | var gsys = $gameSystem[N]||[]; 135 | var dat = gsys[id]||[]; 136 | if (!dat.contains(json)) { 137 | if (!backup[id]) { 138 | backup[id] = $gameActors.actor(id).actor().traits.clone(); 139 | } 140 | dat.push(json); 141 | gsys[id] = dat; 142 | $gameSystem[N] = gsys; 143 | $gameActors.actor(id).actor().traits.push(JsonEx.parse(json)); 144 | } 145 | } 146 | } 147 | if (args[0] == "remove" && args.length > 2) { 148 | var id = convId(args[1]); 149 | var json = args.slice(2).join(" "); 150 | if (id > 0 && json != "") { 151 | var gsys = $gameSystem[N]||[]; 152 | var dat = gsys[id]||[]; 153 | if (dat.contains(json)) { 154 | dat.splice(dat.indexOf(json),1); 155 | gsys[id] = dat.length == 0 ? undefined : dat; 156 | $gameSystem[N] = gsys; 157 | $gameActors.actor(id).actor().traits = $gameActors.actor(id).actor().traits.filter(function(o){ 158 | return JsonEx.stringify(o) != json; 159 | }); 160 | } 161 | } 162 | } 163 | if (args[0] == "clear" && args.length > 1) { 164 | if (args[1] == "all") { 165 | for (var l=1; l [Load function of Config Manager | 201606-enhance-options](https://github.com/yamachan/jgss-hack/blob/master/memo/201606-enhance-options.md#load-function-of-config-manager) 86 | 87 | ## Create language data 88 | 89 | We are lucky, because 'data/System.json' file is plane, uncompressed text file. So we can use RPG Maker MV tool itself to create a translated text data. 90 | 91 | It's easy. For example, I will create another RPG Maker MV project for Japanese text resource. I will input Japanese text into fields in Database's term tab. After input, I will copy necessary JSON data from 'data/System.json' file. 92 | 93 | For example; 94 | 95 | ```js 96 | ConfigManager.terms_Japanese = { 97 | "basic":["Level","Lv","HP","HP","MP","MP","TP","TP","EXP","EXP"], 98 | "commands":["戦う","逃げる","攻撃","防御","アイテム",,,], 99 | //... 100 | }; 101 | ``` 102 | 103 | ## Switch language 104 | 105 | Let combine this function with my previous memo -> [201606-enhance-options](https://github.com/yamachan/jgss-hack/blob/master/memo/201606-enhance-options.md) 106 | 107 | I add a new function to switch term set; 108 | 109 | ```js 110 | ConfigManager.terms_change = function() { 111 | if ($dataSystem.terms.basic) { 112 | if (!this.terms_English) { 113 | this.terms_English = $dataSystem.terms; 114 | } 115 | $dataSystem.terms = this.langSelect == "Japanese" ? this.terms_Japanese 116 | : this.langSelect == "Chinese" ? terms_Chinese 117 | : this.terms_English; 118 | } 119 | }; 120 | ``` 121 | 122 | Then, call this function in game logic; 123 | 124 | ```js 125 | Scene_Title.prototype.create = function() { 126 | Scene_Base.prototype.create.call(this); 127 | this.createBackground(); 128 | this.createForeground(); 129 | this.createWindowLayer(); 130 | ConfigManager.terms_change(); 131 | this.createCommandWindow(); 132 | }; 133 | ``` 134 | 135 | ```js 136 | Scene_Options.prototype.terminate = function() { 137 | Scene_MenuBase.prototype.terminate.call(this); 138 | ConfigManager.save(); 139 | ConfigManager.terms_change(); 140 | }; 141 | ``` 142 | 143 | ## Font probrem? 144 | 145 | ![Language option screenshot](i/201606-multi-language-03.png) 146 | 147 | The progress is great. Let's play Japanese mode... Oh? 148 | 149 | ![Game font problem screenshot](i/201606-multi-language-04.png) 150 | 151 | My RPG Maker MV is an English version, but it can handle Japanese message in Event text. And the CSS (fonts/gamefont.css) setting looks no problem for multi language... 152 | 153 | ```css 154 | @font-face { 155 | font-family: GameFont; 156 | src: url("mplus-1m-regular.ttf"); 157 | } 158 | ``` 159 | 160 | Oh! It's an entry level mistake... I forgot to change "UTF-8" code mode in JSON file... Try again! 161 | 162 | ![Game font no problem screenshot](i/201606-multi-language-05.png) 163 | 164 | The Language option menu in game also can work, and affect the game immediately. Good. 165 | 166 | ![Language option in game screenshot](i/201606-multi-language-06.png) 167 | 168 | ## Future plan? 169 | 170 | This is a technical test, so maybe, we need to enhance this for the production use; 171 | 172 | * Not change the system js, impliment it into plugin mechanism 173 | * Translate other words - Class name, Item name, Weapon name,,, 174 | 175 | --- 176 | ## Updates 177 | 178 | ### 2016/06/18 179 | 180 | Now, I have a plugin, [RTK1_Core](../RTK1_Core.md) and [RTK1_Option_EnJa](../RTK1_Option_EnJa.md). These plugins is based on this memo, but include lots of modifications. 181 | -------------------------------------------------------------------------------- /RTK_ActionLimit.js: -------------------------------------------------------------------------------- 1 | //============================================================================= 2 | // RTK_ActionLimit.js ver1.02 2016/08/20 3 | // The MIT License (MIT) 4 | //============================================================================= 5 | 6 | /*: 7 | * @plugindesc Set action's usable limit by note tag 8 | * @author Toshio Yamashita (yamachan) 9 | * 10 | * @param meta tag 11 | * @desc Meta tag name for Condition text in Note area 12 | * @default condition 13 | * 14 | * @help This plugin does not provide plugin commands. 15 | * 16 | * NoteTags: 17 | * # Can use this when #n switch is ON 18 | * # Actors (ID: n,m,,) can use this 19 | * # Classes (ID: n,m,,) can use this 20 | * # Can use #n times in a battle 21 | * # Increase max per n turn 22 | * # Increase max per n party members' max level 23 | * # Require to use %n item before this 24 | * # Require to use %n skill before this 25 | * 26 | * If you add the prefix "v" to the number n, it means a value in the game variables. 27 | * e.g. Can use this when the switch selected by the game variable #10 is ON. 28 | * e.g. An actor selected by the game variable #10 can use this. 29 | */ 30 | 31 | /*:ja 32 | * @plugindesc メモ欄のタグでアクションの実行回数などを制限する 33 | * @author Toshio Yamashita (yamachan) 34 | * 35 | * @param meta tag 36 | * @desc ノート欄で使用条件を指定するタグ名 37 | * @default condition 38 | * 39 | * @help このプラグインにはプラグインコマンドはありません。 40 | * 41 | * スキル・アイテムのメモ: 42 | * # n番スイッチがONのときだけ戦闘で利用できる 43 | * # n,m,,番のアクターだけが戦闘で利用できる 44 | * # n,m,,番のクラスだけが戦闘で利用できる 45 | * # 1度の戦闘でn回だけ利用できる 46 | * # nターンごとに利用回数がプラスされる 47 | * # パーティの最大レベルが n に達すると利用回数がプラスされる 48 | * # その戦闘中にn番のアイテムを使用後に利用可能になる 49 | * # その戦闘中にn番のスキルを使用後に利用可能になる 50 | * 51 | * 単独の数値 n の前に "v" を付与すると、その番号が示すゲーム変数の値が代わりに利用される 52 | * 例) は変数10番に入っている値に対応するスイッチがONのときだけ利用できる 53 | * 例) は変数10番に入っている値に対応するアクターだけが利用できる 54 | */ 55 | 56 | (function(_global) { 57 | var N = 'RTK_ActionLimit'; 58 | var param = PluginManager.parameters(N); 59 | var tag = String(param['meta tag'] || "condition"); 60 | var items = []; 61 | var skills = []; 62 | 63 | function conv(_s, _default) { 64 | if (_s.match(/^\s*[\d.]+\s*$/)) { 65 | return Number(_s); 66 | } 67 | var ret = _s.match(/^\s*v([\d.]+)\s*$/i); 68 | if (ret) { 69 | return $gameVariables.value(Number(ret[1])); 70 | } 71 | return _default; 72 | } 73 | function check(_s, _v) { 74 | if ("string" != typeof _v || _v == "") { 75 | return false; 76 | } 77 | _v = _v.toLowerCase(); 78 | return String(_s||"").split(",").some(function(v){ 79 | return v.toLowerCase() == _v; 80 | }); 81 | } 82 | function count(_i, _t) { 83 | var ret = 0; 84 | if (BattleManager._phase == "input") { 85 | for (var l=0; l 0) { 103 | ret += Math.floor($gameTroop.turnCount() / r); 104 | } 105 | } 106 | if (_m[tag + " max +level"]) { 107 | var r = conv(_m[tag + " max +level"], 0); 108 | if (r > 0) { 109 | ret += Math.floor($gameParty.highestLevel() / r); 110 | } 111 | } 112 | return ret; 113 | } 114 | 115 | var _Scene_Battle_create = Scene_Battle.prototype.create; 116 | Scene_Battle.prototype.create = function() { 117 | _Scene_Battle_create.call(this); 118 | items = []; 119 | skills = []; 120 | }; 121 | 122 | var _Game_BattlerBase_isOccasionOk = Game_BattlerBase.prototype.isOccasionOk; 123 | Game_BattlerBase.prototype.isOccasionOk = function(item) { 124 | var ret = _Game_BattlerBase_isOccasionOk.call(this, item); 125 | if (ret && $gameParty.inBattle()) { 126 | var meta = item && (item.meta || {}); 127 | if (meta[tag + " switch"]) { 128 | var v = conv(meta[tag + " switch"], 0); 129 | if (v > 0) { 130 | if (!$gameSwitches.value(v)) { 131 | return false; 132 | } 133 | } 134 | } 135 | if (meta[tag + " max"]) { 136 | var v = conv(meta[tag + " max"], 0); 137 | if (v > 0) { 138 | if (DataManager.isItem(item)) { 139 | items[item.id] = items[item.id] === undefined ? 0 : items[item.id]; 140 | if (items[item.id] + count(item.id, "item") >= v + plus(meta)) { 141 | return false; 142 | } 143 | } else if (DataManager.isSkill(item)) { 144 | skills[item.id] = skills[item.id] === undefined ? 0 : skills[item.id]; 145 | if (skills[item.id] + count(item.id, "skill") >= v + plus(meta)) { 146 | return false; 147 | } 148 | } 149 | } 150 | } 151 | if (meta[tag + " req item"]) { 152 | var v = conv(meta[tag + " req item"], 0); 153 | if (v > 0 && !items[v]) { 154 | return false; 155 | } 156 | } 157 | if (meta[tag + " req skill"]) { 158 | var v = conv(meta[tag + " req skill"], 0); 159 | if (v > 0 && !skills[v]) { 160 | return false; 161 | } 162 | } 163 | if (BattleManager.actor()) { 164 | if (meta[tag + " actor"]) { 165 | var v = conv(meta[tag + " actor"], 0); 166 | if (v > 0) { 167 | if (v != BattleManager.actor().actor().id) { 168 | return false; 169 | } 170 | } else { 171 | if(!check(meta[tag + " actor"], String(BattleManager.actor().actor().id))) { 172 | return false; 173 | } 174 | } 175 | } 176 | if (meta[tag + " class"]) { 177 | var v = conv(meta[tag + " class"], 0); 178 | if (v > 0) { 179 | if (v != BattleManager.actor()._classId) { 180 | return false; 181 | } 182 | } else { 183 | if (check(meta[tag + " class"], String(BattleManager.actor()._classId))) { 184 | return false; 185 | } 186 | } 187 | } 188 | } 189 | } 190 | return ret; 191 | }; 192 | 193 | var _Game_Party_consumeItem = Game_Party.prototype.consumeItem; 194 | Game_Party.prototype.consumeItem = function(item) { 195 | var ret = _Game_Party_consumeItem.call(this, item); 196 | if ($gameParty.inBattle()) { 197 | items[item.id] = items[item.id] === undefined ? 1 : items[item.id] + 1; 198 | } 199 | return ret; 200 | }; 201 | 202 | var _Game_BattlerBase_paySkillCost = Game_BattlerBase.prototype.paySkillCost; 203 | Game_BattlerBase.prototype.paySkillCost = function(skill) { 204 | var ret = _Game_BattlerBase_paySkillCost.call(this, skill); 205 | if ($gameParty.inBattle()) { 206 | skills[skill.id] = skills[skill.id] === undefined ? 1 : skills[skill.id] + 1; 207 | } 208 | return ret; 209 | }; 210 | })(this); 211 | -------------------------------------------------------------------------------- /RTK1_Shop.ja.md: -------------------------------------------------------------------------------- 1 | [English version](RTK1_Shop.md) | [トップページに戻る](README.ja.md) 2 | 3 | # [RTK1_Shop](RTK1_Shop.js) プラグイン 4 | 5 | RPGツクール MV 用に作成した、標準のショップ機能を拡張するプラグインです。 6 | 7 | ダウンロード: [RTK1_Shop.js](https://raw.githubusercontent.com/yamachan/jgss-hack/master/RTK1_Shop.js) 8 | 9 | ## 概要 10 | 11 | [RTK1_Core プラグイン](RTK1_Core.ja.md) を前提としていますので、先に読み込んでください。 なるべく新しいバージョンをダウンロードして使うようにしてください。 12 | 13 | ![Screen shot - Pligin Manager](i/RTK1_Shop-01.png) 14 | 15 | パラメータは全て初期値のままで、特に変更する必要はありません。 16 | 17 | ![Screen shot - Plugin](i/RTK1_Shop-02.png) 18 | 19 | ## 購入画面のカテゴリ表示 20 | 21 | ショップの購入画面はカテゴリ分けされていませんが 22 | 23 | ![Screen shot - Shop](i/RTK1_Shop-10.ja.png) 24 | 25 | プラグインパラメータの "buy category" を 0 から 1 に変更すると 26 | 27 | ![Screen shot - Plugin parameter](i/RTK1_Shop-11.png) 28 | 29 | 以下のようにカテゴリ分けして表示されるようになります。 30 | 31 | ![Screen shot - Shop](i/RTK1_Shop-12.ja.png) 32 | 33 | ゲーム中にプラグインコマンドで変更することもできます。 34 | 35 | ``` 36 | RTK1_Shop category on 37 | RTK1_Shop category off 38 | ``` 39 | 40 | ## 基本的な使い方 41 | 42 | ショップを開くには、以下のようにイベントコマンドを使います。 43 | 44 | ![Screen shot - Event command](i/RTK1_Shop-03.png) 45 | 46 | 私の場合、販売する商品の数が増えてくると、このショップの販売リストの管理を少し面倒に感じるようになりました。 ゲーム開発の終盤にアイテムを1つ新規追加したら、マップを全部みて各ショップのリストに加えていく、あたりの作業も時間がかかります。 47 | 48 | 合成機能のプラグイン([RTK1_Composite.js](RTK1_Composite.ja.md))を作成した時、'i1-8,w1-4,a1-4' など範囲指定できるようにしたのが便利でしたので、この指定方法を標準ショップでも利用できるようにしたのが本プラグインです。 それに加えて幾つか自分で望む機能を追加してみました。 49 | 50 | 本プラグインを導入すると、上記と同じ品揃えのショップを以下のプラグインコマンドで開くことができます。 51 | 52 | ``` 53 | RTK1_Shop open i1-6,w1-2,a1-2 54 | ``` 55 | ![Screen shot - Event command](i/RTK1_Shop-04.png) 56 | 57 | ![Screen shot - Game shop](i/RTK1_Shop-05.ja.png) 58 | 59 | i + 数値がアイテム、w + 数値が武器、a + 数値が防具で、数値はIDです。 カンマ(,)で値を区切り、ハイフン(-)でIDの範囲も指定できます。 60 | 61 | 特に販売する種類が多い場合、いちいちドロップダウンリストから1つ1つ選択していくより、だいぶ楽になるとおもいます。 62 | 63 | また価格が 0 のものはリストに追加しませんので、データベース上で定義せずに飛ばした項目は表示されません。 序盤の店では i1-30、中盤の店では i20-40、終盤の店では i30-50 を販売する、などと使用するIDの範囲を最初から決めておくと、管理も容易ですし、ショップ定義も楽になります。 64 | 65 | ## 販売専用のショップ 66 | 67 | イベントコマンドには販売専用のショップを設定できるフラグがあります。 68 | 69 | ![Screen shot - Event command](i/RTK1_Shop-06.png) 70 | 71 | プラグインコマンドでショップを開く際に、open の第2引数に true を指定すると同様に販売専用ショップになります。 72 | 73 | ``` 74 | RTK1_Shop open i1-6,w1-2,a1-2 true 75 | ``` 76 | 77 | この第2引数のデフォルト値は false で、省略すると売却もできる通常のショップになります。 78 | 79 | ## ショップ名の表示 80 | 81 | ショップに名前があるほうが雰囲気がでる場合もあります。 以下のように第3引数にショップ名を指定すれば、購入・売却をしていない時はショップ名が上部に表示されるようになります。 82 | 83 | ``` 84 | RTK1_Shop open i1,i3-8 false トミーのセレクトショップ 85 | ``` 86 | ![Screen shot - Game shop](i/RTK1_Shop-07.ja.png) 87 | 88 | ショップ名に空白スペースを含む場合には、かわりに "%20" を指定してください。 89 | 90 | ## 価格と売価のコントロール 91 | 92 | イベントコマンドと違い、本プラグインのプラグインコマンドではアイテムごとの個別の価格を設定できません。データベースで設定した価格のままとなります。 売価は価格の半額です。 93 | 94 | 補助的な手段として "buy rate" と "sell rate" のプラグインパラメータを用意しました。 95 | 96 | ![Screen shot - Plugin](i/RTK1_Shop-08.png) 97 | 98 | "buy rate" は購入価格の計算に使用される倍率です。 データベースで設定した価格に、この値を掛けたものがショップでの販売価格となります。 初期値は 1 ですので、データベースで設定した価格と同じ値になります。 これを 2 に変更すると、ショップで販売される価格は倍になります。 99 | 100 | "sell rate" は売却価格の計算に使用される倍率です。 データベースで設定した価格に、この値を掛けたものがショップでの売却価格となります。 初期値は 0.5 ですので、データベースで設定した価格の半額となります。これを 0.8 に変更すると、元値の 80% の価格でショップに売却できます。 101 | 102 | 売却価格は、販売価格ではなく、データベースで設定された価格から計算されることに注意してください。例えば buy rate を 10 と大きくしたのに、sell rate が 0.5 のままだと、もともと 50G のポーションが 500G で販売されるのに対し、売却価格が 25G と低すぎる値になります。 103 | 104 | buy rate と sell rate は、ゲーム中に以下のプラグインコマンドで変更することができます。 変更された値はセーブファイルに保存されます。 105 | 106 | ``` 107 | RTK1_Shop buy 1.2 108 | RTK1_Shop sell 0.8 109 | ``` 110 | 111 | またゲーム用の変数の値を buy rate や sell rate に代入することができます。 この場合には switch (sw でも可) を併用して以下のように変数番号を指定してください。 112 | 113 | ``` 114 | RTK1_Shop buy switch 10 115 | RTK1_Shop sell switch 11 116 | ``` 117 | 118 | マップに配置した自動実行のイベントや、マップ移動のイベントで buy rate や sell rate を設定するようにすれば、地方ごとの物価の違いが表現できるでしょう。 119 | 120 | ## より高度な使い方 121 | 122 | ### 商品リストのコントロール 123 | 124 | ショップで販売される商品の一覧をコマンドでより細かくコントロールできます。 125 | 126 | | コマンドと引数 | 説明 | 127 | | --- | --- | 128 | | clear | リストを空にする | 129 | | clear item/weapon/armor | リストから指定された種類を全て削除する | 130 | | complete | リストに全ての商品を追加する | 131 | | complete item/weapon/armor | リストに指定された種類を全て追加する | 132 | | add IDs | 指定された IDs の商品をリストに追加する | 133 | | remove IDs | 指定された IDs の商品をリストから削除する | 134 | | max_id #value | #value 以下の ID の商品を残し、他を削除する | 135 | | min_id #value | #value 以上の ID の商品を残し、他を削除する | 136 | | max_price #value | #value 以下の価格の商品を残し、他を削除する | 137 | | min_price #value | #value 以上の価格の商品を残し、他を削除する | 138 | 139 | 事前に定義されたショップを開くには、商品の IDs を指定しません。 第二引数を指定したい場合には none を指定します。 140 | 141 | ``` 142 | RTK1_Shop open 143 | RTK1_Shop open none true 144 | RTK1_Shop open none false トミーのセレクトショップ 145 | ``` 146 | 147 | 例えば、以下は 「100Gショップ」 を開くプラグインコマンドのリストになります。 148 | 149 | ``` 150 | RTK1_Shop clear 151 | RTK1_Shop complete 152 | RTK1_Shop max_price 100 153 | RTK1_Shop min_price 100 154 | RTK1_Shop open none true すべて%20100G%20のお店 155 | ``` 156 | 157 | ### セット商品の登録と利用 158 | 159 | 商品リストのコントロールの際、セット商品の機能を利用すると更に便利です。 160 | 161 | | コマンドと引数 | 説明 | 162 | | --- | --- | 163 | | set #name | 現在のリストの内容を商品セット #name として登録する
同じ #name を指定すると上書きします
リストが空の状態で実行すると #name 定義を削除します | 164 | | add #name | 商品セット #name に含まれる商品をリストに追加する | 165 | | remove #name | 商品セット #name に含まれる商品をリストから削除する | 166 | 167 | 商品セットはセーブファイルに保存されるため、ゲームの開始時に定義しておけば、ゲーム中はいつでも利用することができます。 168 | 169 | 例えば、以下は回復薬ばかりを含んだ "Potions" 商品セットを定義しています。 170 | 171 | ``` 172 | RTK1_Shop clear 173 | RTK1_Shop add i1,i5-6 174 | RTK1_Shop set Potions 175 | ``` 176 | 177 | 以後は以下のようにいつでも、この商品セットを店の商品リストに加えることができます。 178 | 179 | ``` 180 | RTK1_Shop clear 181 | RTK1_Shop add Portions 182 | RTK1_Shop open none false 回復薬のお店 183 | ``` 184 | 185 | 回復薬ばかりを含んだ "Potions" 商品セットは、ゲーム中に任意に再定義できます。 これをうまく使えば、新しい薬が発見されるたびに商店にも並ぶ、という仕組みが簡単に実現できるでしょう。 186 | 187 | ## 他プラグインとの連携 188 | 189 | ### RTK1_Difficulty プラグインとの連携 190 | 191 | RTK1_Difficulty プラグインは 「とても簡単」から「とても難しい」まで5段階のゲーム難易度を提供します。 192 | 193 | 本プラグインはプラグインパラメータ 'difficulty buy rate' と 'difficulty sell rate' で連携します。 それぞれ初期値は 0 となっており、この状態ではゲーム難易度とは連携しません。 194 | 195 | ![Screen shot - Plugin](i/RTK1_Shop-09.png) 196 | 197 | 'difficulty buy rate' は商店での値段を調整しますが、設定した値によって商品の価格は以下のように変わります。 198 | 199 | | 設定値 | とても簡単 | 簡単 | 普通 | 難しい | とても難しい | 200 | | :---: | :---: | :---: | :---: | :---: | :---: | 201 | | 0 | 100% | 100% | 100% | 100% | 100% | 202 | | 0.05 | 90% | 95% | 100% | 105% | 110% | 203 | | 0.1 | 80% | 90% | 100% | 110% | 120% | 204 | | 0.2 | 60% | 80% | 100% | 120% | 140% | 205 | | 0.3 | 40% | 70% | 100% | 130% | 160% | 206 | 207 | 'difficulty sell rate' は商店での販売価格を調整しますが、設定した値によって価格は以下のように変わります。 208 | 209 | | 設定値 | とても簡単 | 簡単 | 普通 | 難しい | とても難しい | 210 | | :---: | :---: | :---: | :---: | :---: | :---: | 211 | | 0 | 100% | 100% | 100% | 100% | 100% | 212 | | 0.05 | 110% | 105% | 100% | 95% | 90% | 213 | | 0.1 | 120% | 110% | 100% | 90% | 80% | 214 | | 0.2 | 140% | 120% | 100% | 80% | 60% | 215 | | 0.3 | 160% | 130% | 100% | 70% | 40% | 216 | 217 | 難易度が高いほど、商品の価格は高くなり、販売価格は安くなります。 資金繰りが厳しくなるわけですね。 218 | 219 | ## 更新履歴 220 | 221 | | バージョン | 公開日 | 必須ライブラリ | 更新内容 | 222 | | --- | --- | --- | --- | 223 | | ver1.15 | 2016/07/25 | [RTK1_Core](RTK1_Core.ja.md)
ver1.14 以降 | 購入時のカテゴリ表示機能を追加 | 224 | | [ver1.14](archive/RTK1_Shop_v1.14.js) | 2016/07/15 | [RTK1_Core](RTK1_Core.ja.md)
ver1.14 以降 | 公開 | 225 | 226 | ## ライセンス 227 | 228 | [The MIT License (MIT)](https://opensource.org/licenses/mit-license.php) です。 229 | 230 | 提供されるjsファイルからコメント等を削除しないのであれば、著作権表示は不要です。 むろん表示いただくのは歓迎します! 231 | 232 | [トップページに戻る](README.ja.md) 233 | --------------------------------------------------------------------------------