Initial Commit

This commit is contained in:
Dazed 2024-02-20 17:12:30 -06:00
commit 31710e95cb
235 changed files with 2639105 additions and 0 deletions

13
.gitignore vendored Normal file
View file

@ -0,0 +1,13 @@
# Ignore all files
*.*
# Except
!*.json
!*.js
!*.zip
!*.7z
!*.csv
!.gitignore
!README.md
# Images

49
README.md Normal file
View file

@ -0,0 +1,49 @@
# Apply Patch
1. Click Code
2. Click Download ZIP
3. Extract to game folder and Replace All.
# How To Contribute
TLDR 3 steps.
Fork the repository.
Make the changes.
Submit a pull request to the project owner.
If everything looks good and doesn't break things I'll merge it in.
Longer Version:
Things that are needed:
* [VSCode](https://code.visualstudio.com/) Make sure you check all the boxes for context menus. ![image](https://github.com/DazedMTL/Dungeon-With-Girl/assets/96628874/7a84b624-32fe-4845-a0f6-2b9f39795070)
* The Game
* [Git](https://git-scm.com/downloads) (Use the default for everything. Just keep clicking Next)
* Motivation to learn
Installation:
1. Fork the repo using the fork button at the top. Click Code > HTTPS > Copy URL.
2. Right click on the game folder and click 'Open with VSCode' (Shift+Right_Click if you are on Windows 11)
3. Click on the Source Control Button and click initialize repository.
![image](https://github.com/DazedMTL/Dungeon-With-Girl/assets/96628874/61e818e6-11f9-450d-9d7d-263d109dbf56)
4. At the top click on Terminal > New Terminal. Enter the following: `git clone [URL_YOU_COPIED_ABOVE]`.
5. Copy the contents of the new folder created with git clone into the game folder and replace all.
6. Your source control menu should be good to go and look like this.
![image](https://github.com/DazedMTL/Dungeon-With-Girl/assets/96628874/c19787a0-172d-4a08-a37a-e3b56e70e86a)
Now you are all setup, all you need to do is play the game and look for any changes that need to be made. Stuff like spelling errors, wrong names, inconsistencies, spacing issues, etc.
7. Use the FIND functionality to search for what you are trying to fix. For example if a character's name is wrong, type that into the search menu and start looking, then make the change. Try not to mess with any scripts or variables you might see.
![image](https://github.com/DazedMTL/Dungeon-With-Girl/assets/96628874/589eccaf-7f86-43f7-a917-7e6e477b381a)
8. After you are satisfied with your changes it's time to put in a PR. Go to source control to see all your changes. Add a message and click the `Commit` button to save them all.
![image](https://github.com/DazedMTL/Dungeon-With-Girl/assets/96628874/a9a8973b-bc01-4184-bea9-63a925d961a2)
8. Click Sync to push your changes to your fork. Now all that's left is to put in a pull request.
9. Go to Pull Requests > New Pull Requests. Look at the arrow, your fork should be pointing to the original repo (mine). Add in details on what you fixed and Submit. If everything looks good I'll merge it in and you would have successfully contributed.
Got questions? Just shoot me a message, more than happy to walk you through any of the tools.

12
package.json Normal file
View file

@ -0,0 +1,12 @@
{
"name": "",
"main": "www/index.html",
"js-flags": "--expose-gc",
"window": {
"title": "",
"toolbar": false,
"width": 816,
"height": 624,
"icon": "www/icon/icon.png"
}
}

945
www/data/Actors.json Normal file
View file

@ -0,0 +1,945 @@
[
null,
{
"id": 1,
"battlerName": "Actor1_1",
"characterIndex": 0,
"characterName": "Actor1",
"classId": 17,
"equips": [
3,
130,
13,
37,
0
],
"faceIndex": 0,
"faceName": "Actor1",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "ハロルド",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 2,
"battlerName": "Actor1_7",
"characterIndex": 6,
"characterName": "Actor1",
"classId": 3,
"equips": [
3,
130,
46,
37,
0
],
"faceIndex": 6,
"faceName": "Actor1",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "アレン",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 3,
"battlerName": "Actor1_8",
"characterIndex": 7,
"characterName": "Actor1",
"classId": 4,
"equips": [
39,
130,
46,
37,
0
],
"faceIndex": 7,
"faceName": "Actor1",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "テレーゼ",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 4,
"battlerName": "Actor2_1",
"characterIndex": 0,
"characterName": "Actor2",
"classId": 5,
"equips": [
57,
139,
46,
37,
0
],
"faceIndex": 0,
"faceName": "Actor2",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "リョウ",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 5,
"battlerName": "Actor1_3",
"characterIndex": 2,
"characterName": "Actor1",
"classId": 6,
"equips": [
75,
124,
13,
4,
0
],
"faceIndex": 2,
"faceName": "Actor1",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "ヴァイス",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 6,
"battlerName": "Actor1_5",
"characterIndex": 4,
"characterName": "Actor1",
"classId": 7,
"equips": [
93,
139,
13,
4,
0
],
"faceIndex": 4,
"faceName": "Actor1",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "フレデリック",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 7,
"battlerName": "Actor1_6",
"characterIndex": 5,
"characterName": "Actor1",
"classId": 8,
"equips": [
111,
139,
13,
4,
0
],
"faceIndex": 5,
"faceName": "Actor1",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "エリザ",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 8,
"battlerName": "Actor2_8",
"characterIndex": 7,
"characterName": "Actor2",
"classId": 9,
"equips": [
111,
139,
13,
4,
0
],
"faceIndex": 7,
"faceName": "Actor2",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "セリーヌ",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 9,
"battlerName": "Actor3_8",
"characterIndex": 7,
"characterName": "Actor3",
"classId": 10,
"equips": [
147,
139,
79,
70,
0
],
"faceIndex": 7,
"faceName": "Actor3",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "マーシャ",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 10,
"battlerName": "Actor2_7",
"characterIndex": 6,
"characterName": "Actor2",
"classId": 11,
"equips": [
165,
139,
79,
70,
0
],
"faceIndex": 6,
"faceName": "Actor2",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "ルキウス",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 11,
"battlerName": "Actor2_4",
"characterIndex": 3,
"characterName": "Actor2",
"classId": 12,
"equips": [
93,
139,
79,
70,
0
],
"faceIndex": 3,
"faceName": "Actor2",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "ウェンディ",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 12,
"battlerName": "Actor3_7",
"characterIndex": 6,
"characterName": "Actor3",
"classId": 13,
"equips": [
147,
139,
79,
70,
0
],
"faceIndex": 6,
"faceName": "Actor3",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "ノエル",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 13,
"battlerName": "Actor2_2",
"characterIndex": 1,
"characterName": "Actor2",
"classId": 14,
"equips": [
3,
139,
79,
37,
0
],
"faceIndex": 1,
"faceName": "Actor2",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "イリア",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 14,
"battlerName": "Actor2_5",
"characterIndex": 4,
"characterName": "Actor2",
"classId": 15,
"equips": [
183,
139,
79,
70,
0
],
"faceIndex": 4,
"faceName": "Actor2",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "ダグラス",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 15,
"battlerName": "Actor1_4",
"characterIndex": 3,
"characterName": "Actor1",
"classId": 16,
"equips": [
111,
111,
13,
4,
0
],
"faceIndex": 3,
"faceName": "Actor1",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "アヤメ",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 16,
"battlerName": "Actor1_2",
"characterIndex": 1,
"characterName": "Actor1",
"classId": 19,
"equips": [
3,
139,
111,
122,
0
],
"faceIndex": 1,
"faceName": "Actor1",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "レオナ",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 17,
"battlerName": "Actor3_5",
"characterIndex": 4,
"characterName": "Actor3",
"classId": 20,
"equips": [
183,
139,
111,
102,
0
],
"faceIndex": 4,
"faceName": "Actor3",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "オリバー",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 18,
"battlerName": "Actor2_3",
"characterIndex": 2,
"characterName": "Actor2",
"classId": 21,
"equips": [
111,
139,
111,
102,
0
],
"faceIndex": 2,
"faceName": "Actor2",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "ピーター",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 19,
"battlerName": "Actor3_6",
"characterIndex": 5,
"characterName": "Actor3",
"classId": 22,
"equips": [
183,
139,
111,
102,
0
],
"faceIndex": 5,
"faceName": "Actor3",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "アニエス",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 20,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 21,
"battlerName": "アレシア戦闘",
"characterIndex": 0,
"characterName": "アレシア",
"classId": 31,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "顔グラ-1",
"traits": [
{
"code": 13,
"dataId": 56,
"value": 1
},
{
"code": 21,
"dataId": 6,
"value": 10
}
],
"initialLevel": 1,
"maxLevel": 99,
"name": "アレシア",
"nickname": "",
"note": "<LevelUpCommonEvent: 2>\n<Speech/Start:私が片付けてやろう, 足を引っ張るなよ>\n<Speech/Turn:いくぞ!, どうするか>\n<Speech/Dying:諦めるものか……!>\n<Speech/Skill:はぁっ!, せいっ!, くらえ!>\n<Speech/Skill[401]:はぁぁ……!>\n<Speech/Skill[402]:はぁぁ……!>\n<Speech/Skill[403]:はぁぁ……!>\n<Speech/Skill[404]:はぁぁ……!>\n<Speech/Skill[405]:はぁぁ……!>\n<Speech/Skill[406]:はぁぁ……!>\n<Speech/Skill[407]:はぁぁ……!>\n<Speech/Skill[408]:はぁぁ……!>\n<Speech/Item:\\1 を使う!>\n<Speech/Victory:たわいもない, 造作もないことだ>\n<Speech/Damage:くっ!, うっ!>\n<Speech/Recovery[23]:助かる、\\1>\n<Speech/Miss:どこを狙っている?>\n<Speech/Evasion:食らうものか!>\n<Speech/Dead:こんな…ところで…>",
"profile": ""
},
{
"id": 22,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "ロイ",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 23,
"battlerName": "キャラ2チャラ男",
"characterIndex": 0,
"characterName": "キャラ2チャラ男",
"classId": 32,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "顔グラ-5",
"traits": [
{
"code": 62,
"dataId": 0,
"value": 1
},
{
"code": 13,
"dataId": 56,
"value": 0.5
}
],
"initialLevel": 1,
"maxLevel": 99,
"name": "エドガー",
"nickname": "",
"note": "<LevelUpCommonEvent: 2>\n<Speech/Dying:これはやべえ……>\n<Speech/Skill:ほらよ, くらっとけ, オラッ!>\n<Speech/Skill[25]:・・・>\n<Speech/Skill[413]:これを使うぜ>\n<Speech/Skill[414]:これを使うぜ>\n<Speech/Item:\\1 を使うぜ>\n<Speech/Damage:ぐっ!, げっ!, ぐえっ!>\n<Speech/Recovery[21]:助かるっすわ>\n<Speech/Miss:おおっと>\n<Speech/Evasion:くらうかよ>\n<Speech/Dead:くそったれが…>",
"profile": ""
},
{
"id": 24,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 25,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 26,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "デレク",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 27,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "ドビー",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 28,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "エドマン",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 29,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "グレッグ",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 30,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 31,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 32,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 33,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 34,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 35,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 36,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 37,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 38,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 39,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
},
{
"id": 40,
"battlerName": "",
"characterIndex": 0,
"characterName": "",
"classId": 1,
"equips": [
0,
0,
0,
0,
0
],
"faceIndex": 0,
"faceName": "",
"traits": [],
"initialLevel": 1,
"maxLevel": 99,
"name": "",
"nickname": "",
"note": "",
"profile": ""
}
]

1374612
www/data/Animations.json Normal file

File diff suppressed because it is too large Load diff

5374
www/data/Armors.json Normal file

File diff suppressed because it is too large Load diff

45529
www/data/Classes.json Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

279850
www/data/CommonEvents.json Normal file

File diff suppressed because it is too large Load diff

11711
www/data/Enemies.json Normal file

File diff suppressed because it is too large Load diff

5880
www/data/Items.json Normal file

File diff suppressed because it is too large Load diff

2219
www/data/Map001.json Normal file

File diff suppressed because it is too large Load diff

5543
www/data/Map002.json Normal file

File diff suppressed because it is too large Load diff

9786
www/data/Map003.json Normal file

File diff suppressed because it is too large Load diff

53939
www/data/Map004.json Normal file

File diff suppressed because it is too large Load diff

23431
www/data/Map005.json Normal file

File diff suppressed because it is too large Load diff

13012
www/data/Map006.json Normal file

File diff suppressed because it is too large Load diff

6547
www/data/Map007.json Normal file

File diff suppressed because it is too large Load diff

3591
www/data/Map008.json Normal file

File diff suppressed because it is too large Load diff

11745
www/data/Map009.json Normal file

File diff suppressed because it is too large Load diff

798
www/data/Map010.json Normal file
View file

@ -0,0 +1,798 @@
{
"autoplayBgm": false,
"autoplayBgs": false,
"battleback1Name": "",
"battleback2Name": "",
"bgm": {
"name": "",
"pan": 0,
"pitch": 100,
"volume": 90
},
"bgs": {
"name": "",
"pan": 0,
"pitch": 100,
"volume": 90
},
"disableDashing": false,
"displayName": "",
"encounterList": [],
"encounterStep": 30,
"height": 12,
"note": "",
"parallaxLoopX": false,
"parallaxLoopY": false,
"parallaxName": "",
"parallaxShow": true,
"parallaxSx": 0,
"parallaxSy": 0,
"scrollType": 0,
"specifyBattleback": false,
"tilesetId": 3,
"width": 9,
"data": [
1536,
1536,
1536,
1536,
1536,
1536,
1536,
1536,
1536,
1536,
6835,
6833,
6833,
6833,
6833,
6833,
6837,
1536,
1536,
6832,
7186,
7186,
7186,
7186,
7186,
6832,
1536,
1536,
6832,
7192,
7192,
7192,
7192,
7192,
6832,
1536,
1536,
6832,
3234,
3220,
3220,
3220,
3236,
6832,
1536,
1536,
6832,
3216,
3200,
3200,
3200,
3224,
6832,
1536,
1536,
6832,
3216,
3200,
3200,
3200,
3224,
6832,
1536,
1536,
6832,
3216,
3200,
3200,
3200,
3224,
6832,
1536,
1536,
6832,
3216,
3200,
3200,
3200,
3224,
6832,
1536,
1536,
6832,
3240,
3228,
3228,
3212,
3238,
6832,
1536,
1536,
6841,
6833,
6833,
6845,
3244,
6843,
6839,
1536,
1536,
1536,
1536,
1536,
1536,
1536,
1536,
1536,
1536,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
3194,
0,
0,
0,
0,
0,
0,
0,
0,
3193,
3197,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
18,
160,
164,
165,
0,
0,
0,
0,
0,
26,
168,
66,
67,
0,
0,
0,
0,
80,
0,
0,
74,
75,
0,
0,
0,
0,
88,
0,
0,
0,
413,
0,
0,
0,
0,
0,
0,
0,
0,
104,
0,
0,
0,
0,
0,
0,
0,
0,
97,
0,
0,
0,
0,
369,
0,
0,
0,
104,
0,
0,
0,
0,
354,
339,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
5,
0,
0,
0,
0,
0,
5,
0,
0,
5,
0,
0,
0,
0,
0,
5,
0,
0,
5,
0,
0,
0,
0,
0,
5,
0,
0,
5,
0,
0,
0,
0,
0,
5,
0,
0,
5,
0,
0,
0,
0,
0,
5,
0,
0,
5,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"events": [
null,
{
"id": 1,
"name": "EV001",
"note": "",
"pages": [
{
"conditions": {
"actorId": 1,
"actorValid": false,
"itemId": 1,
"itemValid": false,
"selfSwitchCh": "A",
"selfSwitchValid": false,
"switch1Id": 1,
"switch1Valid": false,
"switch2Id": 1,
"switch2Valid": false,
"variableId": 1,
"variableValid": false,
"variableValue": 0
},
"directionFix": false,
"image": {
"characterIndex": 0,
"characterName": "",
"direction": 2,
"pattern": 0,
"tileId": 0
},
"list": [
{
"code": 111,
"indent": 0,
"parameters": [
12,
"Input.isTriggered('tab')"
]
},
{
"code": 352,
"indent": 1,
"parameters": []
},
{
"code": 0,
"indent": 1,
"parameters": []
},
{
"code": 412,
"indent": 0,
"parameters": []
},
{
"code": 111,
"indent": 0,
"parameters": [
12,
"Input.isTriggered('O')"
]
},
{
"code": 355,
"indent": 1,
"parameters": [
"SceneManager.push(Scene_Options);"
]
},
{
"code": 0,
"indent": 1,
"parameters": []
},
{
"code": 412,
"indent": 0,
"parameters": []
},
{
"code": 0,
"indent": 0,
"parameters": []
}
],
"moveFrequency": 3,
"moveRoute": {
"list": [
{
"code": 0,
"parameters": []
}
],
"repeat": true,
"skippable": false,
"wait": false
},
"moveSpeed": 3,
"moveType": 0,
"priorityType": 0,
"stepAnime": false,
"through": false,
"trigger": 4,
"walkAnime": true
}
],
"x": 8,
"y": 0
},
null,
null,
null
]
}

8982
www/data/Map011.json Normal file

File diff suppressed because it is too large Load diff

6819
www/data/Map012.json Normal file

File diff suppressed because it is too large Load diff

16997
www/data/Map013.json Normal file

File diff suppressed because it is too large Load diff

6514
www/data/Map014.json Normal file

File diff suppressed because it is too large Load diff

6695
www/data/Map015.json Normal file

File diff suppressed because it is too large Load diff

8558
www/data/Map016.json Normal file

File diff suppressed because it is too large Load diff

8280
www/data/Map017.json Normal file

File diff suppressed because it is too large Load diff

10551
www/data/Map018.json Normal file

File diff suppressed because it is too large Load diff

7002
www/data/Map019.json Normal file

File diff suppressed because it is too large Load diff

7002
www/data/Map020.json Normal file

File diff suppressed because it is too large Load diff

8881
www/data/Map021.json Normal file

File diff suppressed because it is too large Load diff

7245
www/data/Map022.json Normal file

File diff suppressed because it is too large Load diff

7161
www/data/Map023.json Normal file

File diff suppressed because it is too large Load diff

7428
www/data/Map024.json Normal file

File diff suppressed because it is too large Load diff

9792
www/data/Map025.json Normal file

File diff suppressed because it is too large Load diff

9293
www/data/Map026.json Normal file

File diff suppressed because it is too large Load diff

9476
www/data/Map027.json Normal file

File diff suppressed because it is too large Load diff

9476
www/data/Map028.json Normal file

File diff suppressed because it is too large Load diff

12407
www/data/Map029.json Normal file

File diff suppressed because it is too large Load diff

10059
www/data/Map030.json Normal file

File diff suppressed because it is too large Load diff

9798
www/data/Map031.json Normal file

File diff suppressed because it is too large Load diff

9378
www/data/Map032.json Normal file

File diff suppressed because it is too large Load diff

9378
www/data/Map033.json Normal file

File diff suppressed because it is too large Load diff

12044
www/data/Map034.json Normal file

File diff suppressed because it is too large Load diff

12327
www/data/Map035.json Normal file

File diff suppressed because it is too large Load diff

13226
www/data/Map036.json Normal file

File diff suppressed because it is too large Load diff

13478
www/data/Map037.json Normal file

File diff suppressed because it is too large Load diff

12722
www/data/Map038.json Normal file

File diff suppressed because it is too large Load diff

15806
www/data/Map039.json Normal file

File diff suppressed because it is too large Load diff

11826
www/data/Map040.json Normal file

File diff suppressed because it is too large Load diff

12489
www/data/Map041.json Normal file

File diff suppressed because it is too large Load diff

12489
www/data/Map042.json Normal file

File diff suppressed because it is too large Load diff

12489
www/data/Map043.json Normal file

File diff suppressed because it is too large Load diff

12489
www/data/Map044.json Normal file

File diff suppressed because it is too large Load diff

14034
www/data/Map045.json Normal file

File diff suppressed because it is too large Load diff

12722
www/data/Map046.json Normal file

File diff suppressed because it is too large Load diff

10188
www/data/Map047.json Normal file

File diff suppressed because it is too large Load diff

1615
www/data/Map048.json Normal file

File diff suppressed because it is too large Load diff

10001
www/data/Map049.json Normal file

File diff suppressed because it is too large Load diff

6107
www/data/Map050.json Normal file

File diff suppressed because it is too large Load diff

6261
www/data/Map051.json Normal file

File diff suppressed because it is too large Load diff

1569
www/data/Map052.json Normal file

File diff suppressed because it is too large Load diff

471
www/data/MapInfos.json Normal file
View file

@ -0,0 +1,471 @@
[
null,
{
"id": 1,
"expanded": true,
"name": "スタート",
"order": 1,
"parentId": 0,
"scrollX": 584.5714285714286,
"scrollY": 501.4285714285714
},
{
"id": 2,
"expanded": true,
"name": "ダンジョン",
"order": 9,
"parentId": 0,
"scrollX": 708,
"scrollY": 952.2857142857142
},
{
"id": 3,
"expanded": true,
"name": "戦闘テスト用",
"order": 3,
"parentId": 1,
"scrollX": 570.8571428571428,
"scrollY": 487.71428571428567
},
{
"id": 4,
"expanded": true,
"name": "ミデルズベリー",
"order": 43,
"parentId": 0,
"scrollX": 824.5714285714286,
"scrollY": 1768.2857142857142
},
{
"id": 5,
"expanded": true,
"name": "アレシアとロイの家",
"order": 44,
"parentId": 4,
"scrollX": 1023,
"scrollY": 877.5
},
{
"id": 6,
"expanded": false,
"name": "\\V[85]の家",
"order": 45,
"parentId": 5,
"scrollX": 584.5714285714286,
"scrollY": 501.4285714285714
},
{
"id": 7,
"expanded": false,
"name": "\\V[87]の家",
"order": 46,
"parentId": 5,
"scrollX": 584.5714285714286,
"scrollY": 501.4285714285714
},
{
"id": 8,
"expanded": false,
"name": "\\V[93]の家",
"order": 47,
"parentId": 5,
"scrollX": 584.5714285714286,
"scrollY": 501.4285714285714
},
{
"id": 9,
"expanded": true,
"name": "公園",
"order": 50,
"parentId": 4,
"scrollX": 584.5714285714286,
"scrollY": 501.4285714285714
},
{
"id": 10,
"expanded": false,
"name": "\\V[89]の家",
"order": 48,
"parentId": 5,
"scrollX": 584.5714285714286,
"scrollY": 501.4285714285714
},
{
"id": 11,
"expanded": true,
"name": "\\V[91]の家",
"order": 49,
"parentId": 5,
"scrollX": 584.5714285714286,
"scrollY": 501.4285714285714
},
{
"id": 12,
"expanded": false,
"name": "草原 エリア1",
"order": 14,
"parentId": 2,
"scrollX": 816,
"scrollY": 678
},
{
"id": 13,
"expanded": true,
"name": "町 予備",
"order": 7,
"parentId": 1,
"scrollX": 584.5714285714286,
"scrollY": 1751.142857142857
},
{
"id": 14,
"expanded": true,
"name": "森 エリア1",
"order": 10,
"parentId": 2,
"scrollX": 824.5714285714286,
"scrollY": 952.2857142857142
},
{
"id": 15,
"expanded": true,
"name": "森 エリア2",
"order": 11,
"parentId": 14,
"scrollX": 816,
"scrollY": 702
},
{
"id": 16,
"expanded": true,
"name": "森 エリア3",
"order": 12,
"parentId": 15,
"scrollX": 785.1428571428571,
"scrollY": 655.7142857142857
},
{
"id": 17,
"expanded": false,
"name": "回想部屋",
"order": 2,
"parentId": 1,
"scrollX": 584.5714285714286,
"scrollY": 501.4285714285714
},
{
"id": 18,
"expanded": false,
"name": "森 エリア4",
"order": 13,
"parentId": 16,
"scrollX": 816,
"scrollY": 800
},
{
"id": 19,
"expanded": false,
"name": "草原 エリア2",
"order": 15,
"parentId": 12,
"scrollX": 816,
"scrollY": 702
},
{
"id": 20,
"expanded": false,
"name": "草原 エリア3",
"order": 16,
"parentId": 12,
"scrollX": 816,
"scrollY": 800
},
{
"id": 21,
"expanded": false,
"name": "草原 エリア4",
"order": 17,
"parentId": 12,
"scrollX": 816,
"scrollY": 798
},
{
"id": 22,
"expanded": false,
"name": "沼地 エリア1",
"order": 18,
"parentId": 2,
"scrollX": 869.1428571428571,
"scrollY": 799.7142857142857
},
{
"id": 23,
"expanded": false,
"name": "沼地 エリア2",
"order": 19,
"parentId": 22,
"scrollX": 726.5454545454546,
"scrollY": 638.1818181818182
},
{
"id": 24,
"expanded": false,
"name": "沼地 エリア3",
"order": 20,
"parentId": 22,
"scrollX": 799.1999999999999,
"scrollY": 702
},
{
"id": 25,
"expanded": false,
"name": "沼地 エリア4",
"order": 21,
"parentId": 22,
"scrollX": 1145.142857142857,
"scrollY": 798.8571428571428
},
{
"id": 26,
"expanded": true,
"name": "洞窟 エリア1",
"order": 22,
"parentId": 2,
"scrollX": 848.5714285714286,
"scrollY": 897.4285714285713
},
{
"id": 27,
"expanded": false,
"name": "洞窟 エリア2",
"order": 23,
"parentId": 26,
"scrollX": 880.8,
"scrollY": 997.1999999999999
},
{
"id": 28,
"expanded": false,
"name": "洞窟 エリア3",
"order": 24,
"parentId": 26,
"scrollX": 880.8,
"scrollY": 997.1999999999999
},
{
"id": 29,
"expanded": false,
"name": "洞窟 エリア4",
"order": 25,
"parentId": 26,
"scrollX": 1109.142857142857,
"scrollY": 487.71428571428567
},
{
"id": 30,
"expanded": false,
"name": "砂漠 エリア1",
"order": 26,
"parentId": 2,
"scrollX": 944.5714285714286,
"scrollY": 1113.4285714285713
},
{
"id": 31,
"expanded": false,
"name": "砂漠 エリア2",
"order": 27,
"parentId": 30,
"scrollX": 888,
"scrollY": 780
},
{
"id": 32,
"expanded": false,
"name": "砂漠 エリア3",
"order": 28,
"parentId": 30,
"scrollX": 888,
"scrollY": 900
},
{
"id": 33,
"expanded": false,
"name": "砂漠 エリア4",
"order": 29,
"parentId": 30,
"scrollX": 880.8,
"scrollY": 997.1999999999999
},
{
"id": 34,
"expanded": false,
"name": "砂漠 エリア5",
"order": 30,
"parentId": 30,
"scrollX": 944,
"scrollY": 1114
},
{
"id": 35,
"expanded": true,
"name": "古代遺跡 エリア1",
"order": 37,
"parentId": 2,
"scrollX": 1088.5714285714284,
"scrollY": 1279.7142857142856
},
{
"id": 36,
"expanded": false,
"name": "古代遺跡 エリア2",
"order": 38,
"parentId": 35,
"scrollX": 1128,
"scrollY": 1017.3333333333334
},
{
"id": 37,
"expanded": false,
"name": "古代遺跡 エリア3",
"order": 39,
"parentId": 35,
"scrollX": 1128,
"scrollY": 1046.6666666666667
},
{
"id": 38,
"expanded": false,
"name": "古代遺跡 エリア4",
"order": 40,
"parentId": 35,
"scrollX": 1032,
"scrollY": 1046.6666666666667
},
{
"id": 39,
"expanded": false,
"name": "古代遺跡 エリア6",
"order": 42,
"parentId": 35,
"scrollX": 1120.8,
"scrollY": 1237.2
},
{
"id": 40,
"expanded": false,
"name": "氷の洞穴 エリア1",
"order": 31,
"parentId": 2,
"scrollX": 1088.5714285714284,
"scrollY": 693.4285714285713
},
{
"id": 41,
"expanded": false,
"name": "氷の洞穴 エリア2",
"order": 32,
"parentId": 40,
"scrollX": 1032,
"scrollY": 1113.3333333333333
},
{
"id": 42,
"expanded": false,
"name": "氷の洞穴 エリア3",
"order": 33,
"parentId": 40,
"scrollX": 1032,
"scrollY": 1092
},
{
"id": 43,
"expanded": false,
"name": "氷の洞穴 エリア4",
"order": 34,
"parentId": 40,
"scrollX": 888,
"scrollY": 758.6666666666666
},
{
"id": 44,
"expanded": false,
"name": "氷の洞穴 エリア5",
"order": 35,
"parentId": 40,
"scrollX": 1032,
"scrollY": 758.6666666666666
},
{
"id": 45,
"expanded": false,
"name": "氷の洞穴 エリア6",
"order": 36,
"parentId": 40,
"scrollX": 1131.4285714285713,
"scrollY": 1121.142857142857
},
{
"id": 46,
"expanded": false,
"name": "古代遺跡 エリア5",
"order": 41,
"parentId": 35,
"scrollX": 1128,
"scrollY": 1237.2
},
{
"id": 47,
"expanded": true,
"name": "予備 公園",
"order": 51,
"parentId": 9,
"scrollX": 584.5714285714286,
"scrollY": 501.4285714285714
},
{
"id": 48,
"expanded": false,
"name": "公園 小屋",
"order": 52,
"parentId": 9,
"scrollX": 1781.3333333333333,
"scrollY": 1242.6666666666667
},
{
"id": 49,
"expanded": true,
"name": "戦闘テスト用予備",
"order": 4,
"parentId": 3,
"scrollX": 726.8571428571428,
"scrollY": 801.4285714285713
},
{
"id": 50,
"expanded": true,
"name": "MAP050",
"order": 5,
"parentId": 49,
"scrollX": 726.8571428571428,
"scrollY": 801.4285714285713
},
{
"id": 51,
"expanded": false,
"name": "MAP051",
"order": 6,
"parentId": 49,
"scrollX": 909.3333333333334,
"scrollY": 780
},
{
"id": 52,
"expanded": true,
"name": "タイトル読み込み",
"order": 8,
"parentId": 1,
"scrollX": 909.3333333333334,
"scrollY": 780
}
]

33249
www/data/Skills.json Normal file

File diff suppressed because it is too large Load diff

8306
www/data/States.json Normal file

File diff suppressed because it is too large Load diff

2567
www/data/System.json Normal file

File diff suppressed because it is too large Load diff

64195
www/data/Tilesets.json Normal file

File diff suppressed because it is too large Load diff

7344
www/data/Troops.json Normal file

File diff suppressed because it is too large Load diff

7273
www/data/Weapons.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,100 @@
Level,Actor21,Actor23,Actor3,Actor6
1,0,0,0,0
2,3,3,6,6
3,6,6,15,15
4,9,9,28,28
5,12,12,45,45
6,17,17,70,70
7,22,22,100,100
8,27,27,130,130
9,32,32,170,170
10,37,37,210,210
11,45,45,270,270
12,53,53,350,350
13,61,61,450,450
14,69,69,550,550
15,77,77,700,700
16,89,89,850,850
17,101,101,1100,1100
18,112,113,1400,1400
19,125,125,1800,1800
20,137,137,2400,2400
21,153,153,9999,9999
22,,,9999,9999
23,,,9999,9999
24,,,9999,9999
25,,,9999,9999
26,,,9999,9999
27,,,9999,9999
28,,,9999,9999
29,,,9999,9999
30,,,9999,9999
31,,,9999,9999
32,,,9999,9999
33,,,9999,9999
34,,,9999,9999
35,,,9999,9999
36,,,9999,9999
37,,,9999,9999
38,,,9999,9999
39,,,9999,9999
40,,,9999,9999
41,,,9999,9999
42,,,9999,9999
43,,,9999,9999
44,,,9999,9999
45,,,9999,9999
46,,,9999,9999
47,,,9999,9999
48,,,9999,9999
49,,,9999,9999
50,,,9999,9999
51,,,9999,9999
52,,,9999,9999
53,,,9999,9999
54,,,9999,9999
55,,,9999,9999
56,,,9999,9999
57,,,9999,9999
58,,,9999,9999
59,,,9999,9999
60,,,9999,9999
61,,,9999,9999
62,,,9999,9999
63,,,9999,9999
64,,,9999,9999
65,,,9999,9999
66,,,9999,9999
67,,,9999,9999
68,,,9999,9999
69,,,9999,9999
70,,,9999,9999
71,,,9999,9999
72,,,9999,9999
73,,,9999,9999
74,,,9999,9999
75,,,9999,9999
76,,,9999,9999
77,,,9999,9999
78,,,9999,9999
79,,,9999,9999
80,,,9999,9999
81,,,9999,9999
82,,,9999,9999
83,,,9999,9999
84,,,9999,9999
85,,,9999,9999
86,,,9999,9999
87,,,9999,9999
88,,,9999,9999
89,,,9999,9999
90,,,9999,9999
91,,,9999,9999
92,,,9999,9999
93,,,9999,9999
94,,,9999,9999
95,,,9999,9999
96,,,9999,9999
97,,,9999,9999
98,,,9999,9999
99,9999,9999,9999,9999
1 Level Actor21 Actor23 Actor3 Actor6
2 1 0 0 0 0
3 2 3 3 6 6
4 3 6 6 15 15
5 4 9 9 28 28
6 5 12 12 45 45
7 6 17 17 70 70
8 7 22 22 100 100
9 8 27 27 130 130
10 9 32 32 170 170
11 10 37 37 210 210
12 11 45 45 270 270
13 12 53 53 350 350
14 13 61 61 450 450
15 14 69 69 550 550
16 15 77 77 700 700
17 16 89 89 850 850
18 17 101 101 1100 1100
19 18 112 113 1400 1400
20 19 125 125 1800 1800
21 20 137 137 2400 2400
22 21 153 153 9999 9999
23 22 9999 9999
24 23 9999 9999
25 24 9999 9999
26 25 9999 9999
27 26 9999 9999
28 27 9999 9999
29 28 9999 9999
30 29 9999 9999
31 30 9999 9999
32 31 9999 9999
33 32 9999 9999
34 33 9999 9999
35 34 9999 9999
36 35 9999 9999
37 36 9999 9999
38 37 9999 9999
39 38 9999 9999
40 39 9999 9999
41 40 9999 9999
42 41 9999 9999
43 42 9999 9999
44 43 9999 9999
45 44 9999 9999
46 45 9999 9999
47 46 9999 9999
48 47 9999 9999
49 48 9999 9999
50 49 9999 9999
51 50 9999 9999
52 51 9999 9999
53 52 9999 9999
54 53 9999 9999
55 54 9999 9999
56 55 9999 9999
57 56 9999 9999
58 57 9999 9999
59 58 9999 9999
60 59 9999 9999
61 60 9999 9999
62 61 9999 9999
63 62 9999 9999
64 63 9999 9999
65 64 9999 9999
66 65 9999 9999
67 66 9999 9999
68 67 9999 9999
69 68 9999 9999
70 69 9999 9999
71 70 9999 9999
72 71 9999 9999
73 72 9999 9999
74 73 9999 9999
75 74 9999 9999
76 75 9999 9999
77 76 9999 9999
78 77 9999 9999
79 78 9999 9999
80 79 9999 9999
81 80 9999 9999
82 81 9999 9999
83 82 9999 9999
84 83 9999 9999
85 84 9999 9999
86 85 9999 9999
87 86 9999 9999
88 87 9999 9999
89 88 9999 9999
90 89 9999 9999
91 90 9999 9999
92 91 9999 9999
93 92 9999 9999
94 93 9999 9999
95 94 9999 9999
96 95 9999 9999
97 96 9999 9999
98 97 9999 9999
99 98 9999 9999
100 99 9999 9999 9999 9999

101
www/data/actor_exp.csv Normal file
View file

@ -0,0 +1,101 @@
Level,Actor21,Actor23,Actor3,Actor6
1,0,0,0,0
2,3,3,6,6
3,6,6,15,15
4,9,9,28,28
5,12,12,45,45
6,17,17,70,70
7,22,22,100,100
8,27,27,130,130
9,32,32,170,170
10,37,37,210,210
11,45,45,270,270
12,53,53,350,350
13,61,61,450,450
14,69,69,550,550
15,77,77,700,700
16,89,89,850,850
17,101,101,1100,1100
18,112,113,1400,1400
19,125,125,1800,1800
20,137,137,2400,2400
21,153,153,9999,9999
22,169,169,9999,9999
23,185,185,9999,9999
24,201,201,9999,9999
25,217,217,9999,9999
26,237,237,9999,9999
27,257,257,9999,9999
28,277,277,9999,9999
29,297,297,9999,9999
30,317,317,9999,9999
31,342,342,9999,9999
32,367,367,9999,9999
33,392,392,9999,9999
34,417,417,9999,9999
35,442,442,9999,9999
36,474,474,9999,9999
37,506,506,9999,9999
38,538,538,9999,9999
39,570,570,9999,9999
40,610,610,9999,9999
41,650,650,9999,9999
42,690,690,9999,9999
43,730,730,9999,9999
44,770,770,9999,9999
45,810,810,9999,9999
46,860,860,9999,9999
47,910,910,9999,9999
48,960,960,9999,9999
49,1010,1010,9999,9999
50,1060,1060,9999,9999
51,1110,1110,9999,9999
52,1160,1160,9999,9999
53,1210,1210,9999,9999
54,1260,1260,9999,9999
55,1310,1310,9999,9999
56,1360,1360,9999,9999
57,1410,1410,9999,9999
58,1460,1460,9999,9999
59,1510,1510,9999,9999
60,1560,1560,9999,9999
61,1620,1620,9999,9999
62,1680,1680,9999,9999
63,1740,1740,9999,9999
64,1800,1800,9999,9999
65,1860,1860,9999,9999
66,1920,1920,9999,9999
67,1980,1980,9999,9999
68,2040,2040,9999,9999
69,2100,2100,9999,9999
70,2160,2160,9999,9999
71,2230,2230,9999,9999
72,2300,2300,9999,9999
73,2370,2370,9999,9999
74,2440,2440,9999,9999
75,2510,2510,9999,9999
76,2580,2580,9999,9999
77,2650,2650,9999,9999
78,2720,2720,9999,9999
79,2790,2790,9999,9999
80,2860,2860,9999,9999
81,2940,2940,9999,9999
82,3020,3020,9999,9999
83,3100,3100,9999,9999
84,3180,3180,9999,9999
85,3260,3260,9999,9999
86,3340,3340,9999,9999
87,3420,3420,9999,9999
88,3500,3500,9999,9999
89,3580,3580,9999,9999
90,3660,3660,9999,9999
91,3760,3760,9999,9999
92,3860,3860,9999,9999
93,3960,3960,9999,9999
94,4060,4060,9999,9999
95,4160,4160,9999,9999
96,4260,4260,9999,9999
97,4360,4360,9999,9999
98,4460,4460,9999,9999
99,5000,5000,9999,9999
100,9999,9999,9999,9999
1 Level Actor21 Actor23 Actor3 Actor6
2 1 0 0 0 0
3 2 3 3 6 6
4 3 6 6 15 15
5 4 9 9 28 28
6 5 12 12 45 45
7 6 17 17 70 70
8 7 22 22 100 100
9 8 27 27 130 130
10 9 32 32 170 170
11 10 37 37 210 210
12 11 45 45 270 270
13 12 53 53 350 350
14 13 61 61 450 450
15 14 69 69 550 550
16 15 77 77 700 700
17 16 89 89 850 850
18 17 101 101 1100 1100
19 18 112 113 1400 1400
20 19 125 125 1800 1800
21 20 137 137 2400 2400
22 21 153 153 9999 9999
23 22 169 169 9999 9999
24 23 185 185 9999 9999
25 24 201 201 9999 9999
26 25 217 217 9999 9999
27 26 237 237 9999 9999
28 27 257 257 9999 9999
29 28 277 277 9999 9999
30 29 297 297 9999 9999
31 30 317 317 9999 9999
32 31 342 342 9999 9999
33 32 367 367 9999 9999
34 33 392 392 9999 9999
35 34 417 417 9999 9999
36 35 442 442 9999 9999
37 36 474 474 9999 9999
38 37 506 506 9999 9999
39 38 538 538 9999 9999
40 39 570 570 9999 9999
41 40 610 610 9999 9999
42 41 650 650 9999 9999
43 42 690 690 9999 9999
44 43 730 730 9999 9999
45 44 770 770 9999 9999
46 45 810 810 9999 9999
47 46 860 860 9999 9999
48 47 910 910 9999 9999
49 48 960 960 9999 9999
50 49 1010 1010 9999 9999
51 50 1060 1060 9999 9999
52 51 1110 1110 9999 9999
53 52 1160 1160 9999 9999
54 53 1210 1210 9999 9999
55 54 1260 1260 9999 9999
56 55 1310 1310 9999 9999
57 56 1360 1360 9999 9999
58 57 1410 1410 9999 9999
59 58 1460 1460 9999 9999
60 59 1510 1510 9999 9999
61 60 1560 1560 9999 9999
62 61 1620 1620 9999 9999
63 62 1680 1680 9999 9999
64 63 1740 1740 9999 9999
65 64 1800 1800 9999 9999
66 65 1860 1860 9999 9999
67 66 1920 1920 9999 9999
68 67 1980 1980 9999 9999
69 68 2040 2040 9999 9999
70 69 2100 2100 9999 9999
71 70 2160 2160 9999 9999
72 71 2230 2230 9999 9999
73 72 2300 2300 9999 9999
74 73 2370 2370 9999 9999
75 74 2440 2440 9999 9999
76 75 2510 2510 9999 9999
77 76 2580 2580 9999 9999
78 77 2650 2650 9999 9999
79 78 2720 2720 9999 9999
80 79 2790 2790 9999 9999
81 80 2860 2860 9999 9999
82 81 2940 2940 9999 9999
83 82 3020 3020 9999 9999
84 83 3100 3100 9999 9999
85 84 3180 3180 9999 9999
86 85 3260 3260 9999 9999
87 86 3340 3340 9999 9999
88 87 3420 3420 9999 9999
89 88 3500 3500 9999 9999
90 89 3580 3580 9999 9999
91 90 3660 3660 9999 9999
92 91 3760 3760 9999 9999
93 92 3860 3860 9999 9999
94 93 3960 3960 9999 9999
95 94 4060 4060 9999 9999
96 95 4160 4160 9999 9999
97 96 4260 4260 9999 9999
98 97 4360 4360 9999 9999
99 98 4460 4460 9999 9999
100 99 5000 5000 9999 9999
101 100 9999 9999 9999 9999

34
www/data/class_exp.csv Normal file
View file

@ -0,0 +1,34 @@
Level,Actor1,Actor2,Actor3,Actor6
1,0,0,0,0
2,6,6,6,6
3,15,15,15,15
4,28,28,28,28
5,45,45,45,45
6,70,70,70,70
7,100,100,100,100
8,130,130,130,130
9,170,170,170,170
10,210,210,210,210
11,270,270,270,270
12,350,350,350,350
13,450,450,450,450
14,550,550,550,550
15,700,700,700,700
16,850,850,850,850
17,1100,1100,1100,1100
18,1400,1400,1400,1400
19,1800,1800,1800,1800
20,2400,2400,2400,2400
21,2625,2625,2625,2625
22,2750,2750,2750,2750
23,2875,2875,2875,2875
24,3000,3000,3000,3000
25,3125,3125,3125,3125
26,3250,3250,3250,3250
27,3375,3375,3375,3375
28,3500,3500,3500,3500
29,3625,3625,3625,3625
30,3750,3750,3750,3750
31,3875,3875,3875,3875
32,4000,4000,4000,4000
33,4125,4125,4125,4125
1 Level Actor1 Actor2 Actor3 Actor6
2 1 0 0 0 0
3 2 6 6 6 6
4 3 15 15 15 15
5 4 28 28 28 28
6 5 45 45 45 45
7 6 70 70 70 70
8 7 100 100 100 100
9 8 130 130 130 130
10 9 170 170 170 170
11 10 210 210 210 210
12 11 270 270 270 270
13 12 350 350 350 350
14 13 450 450 450 450
15 14 550 550 550 550
16 15 700 700 700 700
17 16 850 850 850 850
18 17 1100 1100 1100 1100
19 18 1400 1400 1400 1400
20 19 1800 1800 1800 1800
21 20 2400 2400 2400 2400
22 21 2625 2625 2625 2625
23 22 2750 2750 2750 2750
24 23 2875 2875 2875 2875
25 24 3000 3000 3000 3000
26 25 3125 3125 3125 3125
27 26 3250 3250 3250 3250
28 27 3375 3375 3375 3375
29 28 3500 3500 3500 3500
30 29 3625 3625 3625 3625
31 30 3750 3750 3750 3750
32 31 3875 3875 3875 3875
33 32 4000 4000 4000 4000
34 33 4125 4125 4125 4125

445
www/js/libs/fpsmeter.js Normal file
View file

@ -0,0 +1,445 @@
/*! FPSMeter 0.3.1 - 9th May 2013 | https://github.com/Darsain/fpsmeter */
(function (m, j) {
function s(a, e) {
for (var g in e)
try {
a.style[g] = e[g];
} catch (j) {}
return a;
}
function H(a) {
return null == a
? String(a)
: "object" === typeof a || "function" === typeof a
? Object.prototype.toString
.call(a)
.match(/\s([a-z]+)/i)[1]
.toLowerCase() || "object"
: typeof a;
}
function R(a, e) {
if ("array" !== H(e)) return -1;
if (e.indexOf) return e.indexOf(a);
for (var g = 0, j = e.length; g < j; g++) if (e[g] === a) return g;
return -1;
}
function I() {
var a = arguments,
e;
for (e in a[1])
if (a[1].hasOwnProperty(e))
switch (H(a[1][e])) {
case "object":
a[0][e] = I({}, a[0][e], a[1][e]);
break;
case "array":
a[0][e] = a[1][e].slice(0);
break;
default:
a[0][e] = a[1][e];
}
return 2 < a.length
? I.apply(null, [a[0]].concat(Array.prototype.slice.call(a, 2)))
: a[0];
}
function N(a) {
a = Math.round(255 * a).toString(16);
return 1 === a.length ? "0" + a : a;
}
function S(a, e, g, j) {
if (a.addEventListener)
a[j ? "removeEventListener" : "addEventListener"](e, g, !1);
else if (a.attachEvent) a[j ? "detachEvent" : "attachEvent"]("on" + e, g);
}
function D(a, e) {
function g(a, b, d, c) {
return y[0 | a][Math.round(Math.min(((b - d) / (c - d)) * J, J))];
}
function r() {
f.legend.fps !== q &&
((f.legend.fps = q), (f.legend[T] = q ? "FPS" : "ms"));
K = q ? b.fps : b.duration;
f.count[T] = 999 < K ? "999+" : K.toFixed(99 < K ? 0 : d.decimals);
}
function m() {
z = A();
L < z - d.threshold &&
((b.fps -= b.fps / Math.max(1, (60 * d.smoothing) / d.interval)),
(b.duration = 1e3 / b.fps));
for (c = d.history; c--; )
(E[c] = 0 === c ? b.fps : E[c - 1]),
(F[c] = 0 === c ? b.duration : F[c - 1]);
r();
if (d.heat) {
if (w.length)
for (c = w.length; c--; )
w[c].el.style[h[w[c].name].heatOn] = q
? g(h[w[c].name].heatmap, b.fps, 0, d.maxFps)
: g(h[w[c].name].heatmap, b.duration, d.threshold, 0);
if (f.graph && h.column.heatOn)
for (c = u.length; c--; )
u[c].style[h.column.heatOn] = q
? g(h.column.heatmap, E[c], 0, d.maxFps)
: g(h.column.heatmap, F[c], d.threshold, 0);
}
if (f.graph)
for (p = 0; p < d.history; p++)
u[p].style.height =
(q
? E[p]
? Math.round((O / d.maxFps) * Math.min(E[p], d.maxFps))
: 0
: F[p]
? Math.round((O / d.threshold) * Math.min(F[p], d.threshold))
: 0) + "px";
}
function k() {
20 > d.interval
? ((x = M(k)), m())
: ((x = setTimeout(k, d.interval)), (P = M(m)));
}
function G(a) {
a = a || window.event;
a.preventDefault
? (a.preventDefault(), a.stopPropagation())
: ((a.returnValue = !1), (a.cancelBubble = !0));
b.toggle();
}
function U() {
d.toggleOn && S(f.container, d.toggleOn, G, 1);
a.removeChild(f.container);
}
function V() {
f.container && U();
h = D.theme[d.theme];
y = h.compiledHeatmaps || [];
if (!y.length && h.heatmaps.length) {
for (p = 0; p < h.heatmaps.length; p++) {
y[p] = [];
for (c = 0; c <= J; c++) {
var b = y[p],
e = c,
g;
g = (0.33 / J) * c;
var j = h.heatmaps[p].saturation,
m = h.heatmaps[p].lightness,
n = void 0,
k = void 0,
l = void 0,
t = (l = void 0),
v = (n = k = void 0),
v = void 0,
l = 0.5 >= m ? m * (1 + j) : m + j - m * j;
0 === l
? (g = "#000")
: ((t = 2 * m - l),
(k = (l - t) / l),
(g *= 6),
(n = Math.floor(g)),
(v = g - n),
(v *= l * k),
0 === n || 6 === n
? ((n = l), (k = t + v), (l = t))
: 1 === n
? ((n = l - v), (k = l), (l = t))
: 2 === n
? ((n = t), (k = l), (l = t + v))
: 3 === n
? ((n = t), (k = l - v))
: 4 === n
? ((n = t + v), (k = t))
: ((n = l), (k = t), (l -= v)),
(g = "#" + N(n) + N(k) + N(l)));
b[e] = g;
}
}
h.compiledHeatmaps = y;
}
f.container = s(document.createElement("div"), h.container);
f.count = f.container.appendChild(
s(document.createElement("div"), h.count)
);
f.legend = f.container.appendChild(
s(document.createElement("div"), h.legend)
);
f.graph = d.graph
? f.container.appendChild(s(document.createElement("div"), h.graph))
: 0;
w.length = 0;
for (var q in f) f[q] && h[q].heatOn && w.push({ name: q, el: f[q] });
u.length = 0;
if (f.graph) {
f.graph.style.width =
d.history * h.column.width +
(d.history - 1) * h.column.spacing +
"px";
for (c = 0; c < d.history; c++)
(u[c] = f.graph.appendChild(
s(document.createElement("div"), h.column)
)),
(u[c].style.position = "absolute"),
(u[c].style.bottom = 0),
(u[c].style.right =
c * h.column.width + c * h.column.spacing + "px"),
(u[c].style.width = h.column.width + "px"),
(u[c].style.height = "0px");
}
s(f.container, d);
r();
a.appendChild(f.container);
f.graph && (O = f.graph.clientHeight);
d.toggleOn &&
("click" === d.toggleOn && (f.container.style.cursor = "pointer"),
S(f.container, d.toggleOn, G));
}
"object" === H(a) && a.nodeType === j && ((e = a), (a = document.body));
a || (a = document.body);
var b = this,
d = I({}, D.defaults, e || {}),
f = {},
u = [],
h,
y,
J = 100,
w = [],
W = 0,
B = d.threshold,
Q = 0,
L = A() - B,
z,
E = [],
F = [],
x,
P,
q = "fps" === d.show,
O,
K,
c,
p;
b.options = d;
b.fps = 0;
b.duration = 0;
b.isPaused = 0;
b.tickStart = function () {
Q = A();
};
b.tick = function () {
z = A();
W = z - L;
B += (W - B) / d.smoothing;
b.fps = 1e3 / B;
b.duration = Q < L ? B : z - Q;
L = z;
};
b.pause = function () {
x && ((b.isPaused = 1), clearTimeout(x), C(x), C(P), (x = P = 0));
return b;
};
b.resume = function () {
x || ((b.isPaused = 0), k());
return b;
};
b.set = function (a, c) {
d[a] = c;
q = "fps" === d.show;
-1 !== R(a, X) && V();
-1 !== R(a, Y) && s(f.container, d);
return b;
};
b.showDuration = function () {
b.set("show", "ms");
return b;
};
b.showFps = function () {
b.set("show", "fps");
return b;
};
b.toggle = function () {
b.set("show", q ? "ms" : "fps");
return b;
};
b.hide = function () {
b.pause();
f.container.style.display = "none";
return b;
};
b.show = function () {
b.resume();
f.container.style.display = "block";
return b;
};
b.destroy = function () {
b.pause();
U();
b.tick = b.tickStart = function () {};
};
V();
k();
}
var A,
r = m.performance;
A =
r && (r.now || r.webkitNow)
? r[r.now ? "now" : "webkitNow"].bind(r)
: function () {
return +new Date();
};
for (
var C = m.cancelAnimationFrame || m.cancelRequestAnimationFrame,
M = m.requestAnimationFrame,
r = ["moz", "webkit", "o"],
G = 0,
k = 0,
Z = r.length;
k < Z && !C;
++k
)
M =
(C =
m[r[k] + "CancelAnimationFrame"] ||
m[r[k] + "CancelRequestAnimationFrame"]) &&
m[r[k] + "RequestAnimationFrame"];
C ||
((M = function (a) {
var e = A(),
g = Math.max(0, 16 - (e - G));
G = e + g;
return m.setTimeout(function () {
a(e + g);
}, g);
}),
(C = function (a) {
clearTimeout(a);
}));
var T =
"string" === H(document.createElement("div").textContent)
? "textContent"
: "innerText";
D.extend = I;
window.FPSMeter = D;
D.defaults = {
interval: 100,
smoothing: 10,
show: "fps",
toggleOn: "click",
decimals: 1,
maxFps: 60,
threshold: 100,
position: "absolute",
zIndex: 10,
left: "5px",
top: "5px",
right: "auto",
bottom: "auto",
margin: "0 0 0 0",
theme: "dark",
heat: 0,
graph: 0,
history: 20,
};
var X = ["toggleOn", "theme", "heat", "graph", "history"],
Y = "position zIndex left top right bottom margin".split(" ");
})(window);
(function (m, j) {
j.theme = {};
var s = (j.theme.base = {
heatmaps: [],
container: {
heatOn: null,
heatmap: null,
padding: "5px",
minWidth: "95px",
height: "30px",
lineHeight: "30px",
textAlign: "right",
textShadow: "none",
},
count: {
heatOn: null,
heatmap: null,
position: "absolute",
top: 0,
right: 0,
padding: "5px 10px",
height: "30px",
fontSize: "24px",
fontFamily: "Consolas, Andale Mono, monospace",
zIndex: 2,
},
legend: {
heatOn: null,
heatmap: null,
position: "absolute",
top: 0,
left: 0,
padding: "5px 10px",
height: "30px",
fontSize: "12px",
lineHeight: "32px",
fontFamily: "sans-serif",
textAlign: "left",
zIndex: 2,
},
graph: {
heatOn: null,
heatmap: null,
position: "relative",
boxSizing: "padding-box",
MozBoxSizing: "padding-box",
height: "100%",
zIndex: 1,
},
column: { width: 4, spacing: 1, heatOn: null, heatmap: null },
});
j.theme.dark = j.extend({}, s, {
heatmaps: [{ saturation: 0.8, lightness: 0.8 }],
container: {
background: "#222",
color: "#fff",
border: "1px solid #1a1a1a",
textShadow: "1px 1px 0 #222",
},
count: { heatOn: "color" },
column: { background: "#3f3f3f" },
});
j.theme.light = j.extend({}, s, {
heatmaps: [{ saturation: 0.5, lightness: 0.5 }],
container: {
color: "#666",
background: "#fff",
textShadow:
"1px 1px 0 rgba(255,255,255,.5), -1px -1px 0 rgba(255,255,255,.5)",
boxShadow: "0 0 0 1px rgba(0,0,0,.1)",
},
count: { heatOn: "color" },
column: { background: "#eaeaea" },
});
j.theme.colorful = j.extend({}, s, {
heatmaps: [{ saturation: 0.5, lightness: 0.6 }],
container: {
heatOn: "backgroundColor",
background: "#888",
color: "#fff",
textShadow: "1px 1px 0 rgba(0,0,0,.2)",
boxShadow: "0 0 0 1px rgba(0,0,0,.1)",
},
column: { background: "#777", backgroundColor: "rgba(0,0,0,.2)" },
});
j.theme.transparent = j.extend({}, s, {
heatmaps: [{ saturation: 0.8, lightness: 0.5 }],
container: {
padding: 0,
color: "#fff",
textShadow: "1px 1px 0 rgba(0,0,0,.5)",
},
count: { padding: "0 5px", height: "40px", lineHeight: "40px" },
legend: { padding: "0 5px", height: "40px", lineHeight: "42px" },
graph: { height: "40px" },
column: {
width: 5,
background: "#999",
heatOn: "backgroundColor",
opacity: 0.5,
},
});
})(window, FPSMeter);

View file

@ -0,0 +1,207 @@
/*! npm.im/iphone-inline-video */
var makeVideoPlayableInline = (function () {
"use strict"; /*! npm.im/intervalometer */
function e(e, n, r, i) {
function t(r) {
(d = n(t, i)), e(r - (a || r)), (a = r);
}
var d, a;
return {
start: function () {
d || t(0);
},
stop: function () {
r(d), (d = null), (a = 0);
},
};
}
function n(n) {
return e(n, requestAnimationFrame, cancelAnimationFrame);
}
function r(e, n, r, i) {
function t(n) {
Boolean(e[r]) === Boolean(i) && n.stopImmediatePropagation(), delete e[r];
}
return e.addEventListener(n, t, !1), t;
}
function i(e, n, r, i) {
function t() {
return r[n];
}
function d(e) {
r[n] = e;
}
i && d(e[n]), Object.defineProperty(e, n, { get: t, set: d });
}
function t(e, n, r) {
r.addEventListener(n, function () {
return e.dispatchEvent(new Event(n));
});
}
function d(e, n) {
Promise.resolve().then(function () {
e.dispatchEvent(new Event(n));
});
}
function a(e) {
var n = new Audio();
return (
t(e, "play", n),
t(e, "playing", n),
t(e, "pause", n),
(n.crossOrigin = e.crossOrigin),
(n.src = e.src || e.currentSrc || "data:"),
n
);
}
function o(e, n, r) {
(m || 0) + 200 < Date.now() && ((e[g] = !0), (m = Date.now())),
r || (e.currentTime = n),
(A[++k % 3] = (100 * n) | 0);
}
function u(e) {
return e.driver.currentTime >= e.video.duration;
}
function s(e) {
var n = this;
n.video.readyState >= n.video.HAVE_FUTURE_DATA
? (n.hasAudio ||
((n.driver.currentTime =
n.video.currentTime + (e * n.video.playbackRate) / 1e3),
n.video.loop && u(n) && (n.driver.currentTime = 0)),
o(n.video, n.driver.currentTime))
: n.video.networkState !== n.video.NETWORK_IDLE ||
n.video.buffered.length ||
n.video.load(),
n.video.ended && (delete n.video[g], n.video.pause(!0));
}
function c() {
var e = this,
n = e[b];
return e.webkitDisplayingFullscreen
? void e[E]()
: ("data:" !== n.driver.src &&
n.driver.src !== e.src &&
(o(e, 0, !0), (n.driver.src = e.src)),
void (
e.paused &&
((n.paused = !1),
e.buffered.length || e.load(),
n.driver.play(),
n.updater.start(),
n.hasAudio ||
(d(e, "play"),
n.video.readyState >= n.video.HAVE_ENOUGH_DATA && d(e, "playing")))
));
}
function v(e) {
var n = this,
r = n[b];
r.driver.pause(),
r.updater.stop(),
n.webkitDisplayingFullscreen && n[T](),
(r.paused && !e) ||
((r.paused = !0),
r.hasAudio || d(n, "pause"),
n.ended && ((n[g] = !0), d(n, "ended")));
}
function p(e, r) {
var i = (e[b] = {});
(i.paused = !0),
(i.hasAudio = r),
(i.video = e),
(i.updater = n(s.bind(i))),
r
? (i.driver = a(e))
: (e.addEventListener("canplay", function () {
e.paused || d(e, "playing");
}),
(i.driver = {
src: e.src || e.currentSrc || "data:",
muted: !0,
paused: !0,
pause: function () {
i.driver.paused = !0;
},
play: function () {
(i.driver.paused = !1), u(i) && o(e, 0);
},
get ended() {
return u(i);
},
})),
e.addEventListener(
"emptied",
function () {
var n = !i.driver.src || "data:" === i.driver.src;
i.driver.src &&
i.driver.src !== e.src &&
(o(e, 0, !0),
(i.driver.src = e.src),
n ? i.driver.play() : i.updater.stop());
},
!1
),
e.addEventListener("webkitbeginfullscreen", function () {
e.paused
? r && !i.driver.buffered.length && i.driver.load()
: (e.pause(), e[E]());
}),
r &&
(e.addEventListener("webkitendfullscreen", function () {
i.driver.currentTime = e.currentTime;
}),
e.addEventListener("seeking", function () {
A.indexOf((100 * e.currentTime) | 0) < 0 &&
(i.driver.currentTime = e.currentTime);
}));
}
function l(e) {
var n = e[b];
(e[E] = e.play),
(e[T] = e.pause),
(e.play = c),
(e.pause = v),
i(e, "paused", n.driver),
i(e, "muted", n.driver, !0),
i(e, "playbackRate", n.driver, !0),
i(e, "ended", n.driver),
i(e, "loop", n.driver, !0),
r(e, "seeking"),
r(e, "seeked"),
r(e, "timeupdate", g, !1),
r(e, "ended", g, !1);
}
function f(e, n, r) {
void 0 === n && (n = !0),
void 0 === r && (r = !0),
(r && !h) ||
e[b] ||
(p(e, n),
l(e),
e.classList.add("IIV"),
!n && e.autoplay && e.play(),
/iPhone|iPod|iPad/.test(navigator.platform) ||
console.warn(
"iphone-inline-video is not guaranteed to work in emulated environments"
));
}
var m,
y =
"undefined" == typeof Symbol
? function (e) {
return "@" + (e || "@") + Math.random();
}
: Symbol,
h =
"object-fit" in document.head.style &&
/iPhone|iPod/i.test(navigator.userAgent) &&
!matchMedia("(-webkit-video-playable-inline)").matches,
b = y(),
g = y(),
E = y("nativeplay"),
T = y("nativepause"),
A = [],
k = 0;
return (f.isWhitelisted = h), f;
})();

629
www/js/libs/lz-string.js Normal file
View file

@ -0,0 +1,629 @@
var LZString = {
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
_f: String.fromCharCode,
compressToBase64: function (e) {
if (e == null) return "";
var t = "";
var n, r, i, s, o, u, a;
var f = 0;
e = LZString.compress(e);
while (f < e.length * 2) {
if (f % 2 == 0) {
n = e.charCodeAt(f / 2) >> 8;
r = e.charCodeAt(f / 2) & 255;
if (f / 2 + 1 < e.length) i = e.charCodeAt(f / 2 + 1) >> 8;
else i = NaN;
} else {
n = e.charCodeAt((f - 1) / 2) & 255;
if ((f + 1) / 2 < e.length) {
r = e.charCodeAt((f + 1) / 2) >> 8;
i = e.charCodeAt((f + 1) / 2) & 255;
} else r = i = NaN;
}
f += 3;
s = n >> 2;
o = ((n & 3) << 4) | (r >> 4);
u = ((r & 15) << 2) | (i >> 6);
a = i & 63;
if (isNaN(r)) {
u = a = 64;
} else if (isNaN(i)) {
a = 64;
}
t =
t +
LZString._keyStr.charAt(s) +
LZString._keyStr.charAt(o) +
LZString._keyStr.charAt(u) +
LZString._keyStr.charAt(a);
}
return t;
},
decompressFromBase64: function (e) {
if (e == null) return "";
var t = "",
n = 0,
r,
i,
s,
o,
u,
a,
f,
l,
c = 0,
h = LZString._f;
e = e.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (c < e.length) {
u = LZString._keyStr.indexOf(e.charAt(c++));
a = LZString._keyStr.indexOf(e.charAt(c++));
f = LZString._keyStr.indexOf(e.charAt(c++));
l = LZString._keyStr.indexOf(e.charAt(c++));
i = (u << 2) | (a >> 4);
s = ((a & 15) << 4) | (f >> 2);
o = ((f & 3) << 6) | l;
if (n % 2 == 0) {
r = i << 8;
if (f != 64) {
t += h(r | s);
}
if (l != 64) {
r = o << 8;
}
} else {
t = t + h(r | i);
if (f != 64) {
r = s << 8;
}
if (l != 64) {
t += h(r | o);
}
}
n += 3;
}
return LZString.decompress(t);
},
compressToUTF16: function (e) {
if (e == null) return "";
var t = "",
n,
r,
i,
s = 0,
o = LZString._f;
e = LZString.compress(e);
for (n = 0; n < e.length; n++) {
r = e.charCodeAt(n);
switch (s++) {
case 0:
t += o((r >> 1) + 32);
i = (r & 1) << 14;
break;
case 1:
t += o(i + (r >> 2) + 32);
i = (r & 3) << 13;
break;
case 2:
t += o(i + (r >> 3) + 32);
i = (r & 7) << 12;
break;
case 3:
t += o(i + (r >> 4) + 32);
i = (r & 15) << 11;
break;
case 4:
t += o(i + (r >> 5) + 32);
i = (r & 31) << 10;
break;
case 5:
t += o(i + (r >> 6) + 32);
i = (r & 63) << 9;
break;
case 6:
t += o(i + (r >> 7) + 32);
i = (r & 127) << 8;
break;
case 7:
t += o(i + (r >> 8) + 32);
i = (r & 255) << 7;
break;
case 8:
t += o(i + (r >> 9) + 32);
i = (r & 511) << 6;
break;
case 9:
t += o(i + (r >> 10) + 32);
i = (r & 1023) << 5;
break;
case 10:
t += o(i + (r >> 11) + 32);
i = (r & 2047) << 4;
break;
case 11:
t += o(i + (r >> 12) + 32);
i = (r & 4095) << 3;
break;
case 12:
t += o(i + (r >> 13) + 32);
i = (r & 8191) << 2;
break;
case 13:
t += o(i + (r >> 14) + 32);
i = (r & 16383) << 1;
break;
case 14:
t += o(i + (r >> 15) + 32, (r & 32767) + 32);
s = 0;
break;
}
}
return t + o(i + 32);
},
decompressFromUTF16: function (e) {
if (e == null) return "";
var t = "",
n,
r,
i = 0,
s = 0,
o = LZString._f;
while (s < e.length) {
r = e.charCodeAt(s) - 32;
switch (i++) {
case 0:
n = r << 1;
break;
case 1:
t += o(n | (r >> 14));
n = (r & 16383) << 2;
break;
case 2:
t += o(n | (r >> 13));
n = (r & 8191) << 3;
break;
case 3:
t += o(n | (r >> 12));
n = (r & 4095) << 4;
break;
case 4:
t += o(n | (r >> 11));
n = (r & 2047) << 5;
break;
case 5:
t += o(n | (r >> 10));
n = (r & 1023) << 6;
break;
case 6:
t += o(n | (r >> 9));
n = (r & 511) << 7;
break;
case 7:
t += o(n | (r >> 8));
n = (r & 255) << 8;
break;
case 8:
t += o(n | (r >> 7));
n = (r & 127) << 9;
break;
case 9:
t += o(n | (r >> 6));
n = (r & 63) << 10;
break;
case 10:
t += o(n | (r >> 5));
n = (r & 31) << 11;
break;
case 11:
t += o(n | (r >> 4));
n = (r & 15) << 12;
break;
case 12:
t += o(n | (r >> 3));
n = (r & 7) << 13;
break;
case 13:
t += o(n | (r >> 2));
n = (r & 3) << 14;
break;
case 14:
t += o(n | (r >> 1));
n = (r & 1) << 15;
break;
case 15:
t += o(n | r);
i = 0;
break;
}
s++;
}
return LZString.decompress(t);
},
compressToUint8Array: function (e) {
var t = LZString.compress(e);
var n = new Uint8Array(t.length * 2);
for (var r = 0, i = t.length; r < i; r++) {
var s = t.charCodeAt(r);
n[r * 2] = s >>> 8;
n[r * 2 + 1] = s % 256;
}
return n;
},
decompressFromUint8Array: function (e) {
if (e === null || e === undefined) {
return LZString.decompress(e);
} else {
var t = new Array(e.length / 2);
for (var n = 0, r = t.length; n < r; n++) {
t[n] = e[n * 2] * 256 + e[n * 2 + 1];
}
return LZString.decompress(String.fromCharCode.apply(null, t));
}
},
compressToEncodedURIComponent: function (e) {
return LZString.compressToBase64(e).replace(/=/g, "$").replace(/\//g, "-");
},
decompressFromEncodedURIComponent: function (e) {
if (e) e = e.replace(/$/g, "=").replace(/-/g, "/");
return LZString.decompressFromBase64(e);
},
compress: function (e) {
if (e == null) return "";
var t,
n,
r = {},
i = {},
s = "",
o = "",
u = "",
a = 2,
f = 3,
l = 2,
c = "",
h = 0,
p = 0,
d,
v = LZString._f;
for (d = 0; d < e.length; d += 1) {
s = e.charAt(d);
if (!Object.prototype.hasOwnProperty.call(r, s)) {
r[s] = f++;
i[s] = true;
}
o = u + s;
if (Object.prototype.hasOwnProperty.call(r, o)) {
u = o;
} else {
if (Object.prototype.hasOwnProperty.call(i, u)) {
if (u.charCodeAt(0) < 256) {
for (t = 0; t < l; t++) {
h = h << 1;
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
}
n = u.charCodeAt(0);
for (t = 0; t < 8; t++) {
h = (h << 1) | (n & 1);
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
n = n >> 1;
}
} else {
n = 1;
for (t = 0; t < l; t++) {
h = (h << 1) | n;
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
n = 0;
}
n = u.charCodeAt(0);
for (t = 0; t < 16; t++) {
h = (h << 1) | (n & 1);
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
n = n >> 1;
}
}
a--;
if (a == 0) {
a = Math.pow(2, l);
l++;
}
delete i[u];
} else {
n = r[u];
for (t = 0; t < l; t++) {
h = (h << 1) | (n & 1);
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
n = n >> 1;
}
}
a--;
if (a == 0) {
a = Math.pow(2, l);
l++;
}
r[o] = f++;
u = String(s);
}
}
if (u !== "") {
if (Object.prototype.hasOwnProperty.call(i, u)) {
if (u.charCodeAt(0) < 256) {
for (t = 0; t < l; t++) {
h = h << 1;
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
}
n = u.charCodeAt(0);
for (t = 0; t < 8; t++) {
h = (h << 1) | (n & 1);
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
n = n >> 1;
}
} else {
n = 1;
for (t = 0; t < l; t++) {
h = (h << 1) | n;
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
n = 0;
}
n = u.charCodeAt(0);
for (t = 0; t < 16; t++) {
h = (h << 1) | (n & 1);
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
n = n >> 1;
}
}
a--;
if (a == 0) {
a = Math.pow(2, l);
l++;
}
delete i[u];
} else {
n = r[u];
for (t = 0; t < l; t++) {
h = (h << 1) | (n & 1);
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
n = n >> 1;
}
}
a--;
if (a == 0) {
a = Math.pow(2, l);
l++;
}
}
n = 2;
for (t = 0; t < l; t++) {
h = (h << 1) | (n & 1);
if (p == 15) {
p = 0;
c += v(h);
h = 0;
} else {
p++;
}
n = n >> 1;
}
while (true) {
h = h << 1;
if (p == 15) {
c += v(h);
break;
} else p++;
}
return c;
},
decompress: function (e) {
if (e == null) return "";
if (e == "") return null;
var t = [],
n,
r = 4,
i = 4,
s = 3,
o = "",
u = "",
a,
f,
l,
c,
h,
p,
d,
v = LZString._f,
m = { string: e, val: e.charCodeAt(0), position: 32768, index: 1 };
for (a = 0; a < 3; a += 1) {
t[a] = a;
}
l = 0;
h = Math.pow(2, 2);
p = 1;
while (p != h) {
c = m.val & m.position;
m.position >>= 1;
if (m.position == 0) {
m.position = 32768;
m.val = m.string.charCodeAt(m.index++);
}
l |= (c > 0 ? 1 : 0) * p;
p <<= 1;
}
switch ((n = l)) {
case 0:
l = 0;
h = Math.pow(2, 8);
p = 1;
while (p != h) {
c = m.val & m.position;
m.position >>= 1;
if (m.position == 0) {
m.position = 32768;
m.val = m.string.charCodeAt(m.index++);
}
l |= (c > 0 ? 1 : 0) * p;
p <<= 1;
}
d = v(l);
break;
case 1:
l = 0;
h = Math.pow(2, 16);
p = 1;
while (p != h) {
c = m.val & m.position;
m.position >>= 1;
if (m.position == 0) {
m.position = 32768;
m.val = m.string.charCodeAt(m.index++);
}
l |= (c > 0 ? 1 : 0) * p;
p <<= 1;
}
d = v(l);
break;
case 2:
return "";
}
t[3] = d;
f = u = d;
while (true) {
if (m.index > m.string.length) {
return "";
}
l = 0;
h = Math.pow(2, s);
p = 1;
while (p != h) {
c = m.val & m.position;
m.position >>= 1;
if (m.position == 0) {
m.position = 32768;
m.val = m.string.charCodeAt(m.index++);
}
l |= (c > 0 ? 1 : 0) * p;
p <<= 1;
}
switch ((d = l)) {
case 0:
l = 0;
h = Math.pow(2, 8);
p = 1;
while (p != h) {
c = m.val & m.position;
m.position >>= 1;
if (m.position == 0) {
m.position = 32768;
m.val = m.string.charCodeAt(m.index++);
}
l |= (c > 0 ? 1 : 0) * p;
p <<= 1;
}
t[i++] = v(l);
d = i - 1;
r--;
break;
case 1:
l = 0;
h = Math.pow(2, 16);
p = 1;
while (p != h) {
c = m.val & m.position;
m.position >>= 1;
if (m.position == 0) {
m.position = 32768;
m.val = m.string.charCodeAt(m.index++);
}
l |= (c > 0 ? 1 : 0) * p;
p <<= 1;
}
t[i++] = v(l);
d = i - 1;
r--;
break;
case 2:
return u;
}
if (r == 0) {
r = Math.pow(2, s);
s++;
}
if (t[d]) {
o = t[d];
} else {
if (d === i) {
o = f + f.charAt(0);
} else {
return null;
}
}
u += o;
t[i++] = f + o.charAt(0);
r--;
f = o;
if (r == 0) {
r = Math.pow(2, s);
s++;
}
}
},
};
if (typeof module !== "undefined" && module != null) {
module.exports = LZString;
}

524
www/js/libs/pixi-picture.js Normal file
View file

@ -0,0 +1,524 @@
var __extends =
(this && this.__extends) ||
function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype =
b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
};
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var shaderLib = [
{
vertUniforms: "",
vertCode: "vTextureCoord = aTextureCoord;",
fragUniforms: "uniform vec4 uTextureClamp;",
fragCode:
"vec2 textureCoord = clamp(vTextureCoord, uTextureClamp.xy, uTextureClamp.zw);",
},
{
vertUniforms: "uniform mat3 uTransform;",
vertCode: "vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;",
fragUniforms: "",
fragCode: "vec2 textureCoord = vTextureCoord;",
},
{
vertUniforms: "uniform mat3 uTransform;",
vertCode: "vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;",
fragUniforms:
"uniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;",
fragCode:
"vec2 textureCoord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;" +
"\ntextureCoord = (uMapCoord * vec3(textureCoord, 1.0)).xy;" +
"\ntextureCoord = clamp(textureCoord, uClampFrame.xy, uClampFrame.zw);",
},
];
var PictureShader = (function (_super) {
__extends(PictureShader, _super);
function PictureShader(gl, vert, frag, tilingMode) {
var lib = shaderLib[tilingMode];
_super.call(
this,
gl,
vert
.replace(/%SPRITE_UNIFORMS%/gi, lib.vertUniforms)
.replace(/%SPRITE_CODE%/gi, lib.vertCode),
frag
.replace(/%SPRITE_UNIFORMS%/gi, lib.fragUniforms)
.replace(/%SPRITE_CODE%/gi, lib.fragCode)
);
this.bind();
this.tilingMode = tilingMode;
this.tempQuad = new PIXI.Quad(gl);
this.tempQuad.initVao(this);
this.uniforms.uColor = new Float32Array([1, 1, 1, 1]);
this.uniforms.uSampler = [0, 1];
}
PictureShader.blendVert =
"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform mat3 projectionMatrix;\nuniform mat3 mapMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n %SPRITE_CODE%\n vMapCoord = (mapMatrix * vec3(aVertexPosition, 1.0)).xy;\n}\n";
return PictureShader;
})(PIXI.Shader);
extras.PictureShader = PictureShader;
})((extras = PIXI.extras || (PIXI.extras = {})));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var overlayFrag =
"\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n vec4 source = texture2D(uSampler[0], textureCoord) * uColor;\n vec4 target = texture2D(uSampler[1], vMapCoord);\n\n //reverse hardlight\n if (source.a == 0.0) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n //yeah, premultiplied\n vec3 Cb = source.rgb/source.a, Cs;\n if (target.a > 0.0) {\n Cs = target.rgb / target.a;\n }\n vec3 multiply = Cb * Cs * 2.0;\n vec3 Cs2 = Cs * 2.0 - 1.0;\n vec3 screen = Cb + Cs2 - Cb * Cs2;\n vec3 B;\n if (Cb.r <= 0.5) {\n B.r = multiply.r;\n } else {\n B.r = screen.r;\n }\n if (Cb.g <= 0.5) {\n B.g = multiply.g;\n } else {\n B.g = screen.g;\n }\n if (Cb.b <= 0.5) {\n B.b = multiply.b;\n } else {\n B.b = screen.b;\n }\n vec4 res;\n res.xyz = (1.0 - source.a) * Cs + source.a * B;\n res.a = source.a + target.a * (1.0-source.a);\n gl_FragColor = vec4(res.xyz * res.a, res.a);\n}\n";
var HardLightShader = (function (_super) {
__extends(HardLightShader, _super);
function HardLightShader(gl, tilingMode) {
_super.call(
this,
gl,
extras.PictureShader.blendVert,
overlayFrag,
tilingMode
);
}
return HardLightShader;
})(extras.PictureShader);
extras.HardLightShader = HardLightShader;
})((extras = PIXI.extras || (PIXI.extras = {})));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
function mapFilterBlendModesToPixi(gl, array) {
if (array === void 0) {
array = [];
}
array[PIXI.BLEND_MODES.OVERLAY] = [
new extras.OverlayShader(gl, 0),
new extras.OverlayShader(gl, 1),
new extras.OverlayShader(gl, 2),
];
array[PIXI.BLEND_MODES.HARD_LIGHT] = [
new extras.HardLightShader(gl, 0),
new extras.HardLightShader(gl, 1),
new extras.HardLightShader(gl, 2),
];
return array;
}
extras.mapFilterBlendModesToPixi = mapFilterBlendModesToPixi;
})((extras = PIXI.extras || (PIXI.extras = {})));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var normalFrag =
"\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n\n vec4 sample = texture2D(uSampler[0], textureCoord);\n gl_FragColor = sample * uColor;\n}\n";
var normalVert =
"\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n %SPRITE_CODE%\n}\n";
var NormalShader = (function (_super) {
__extends(NormalShader, _super);
function NormalShader(gl, tilingMode) {
_super.call(this, gl, normalVert, normalFrag, tilingMode);
}
return NormalShader;
})(extras.PictureShader);
extras.NormalShader = NormalShader;
})((extras = PIXI.extras || (PIXI.extras = {})));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var overlayFrag =
"\nvarying vec2 vTextureCoord;\nvarying vec2 vMapCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler[2];\nuniform vec4 uColor;\n%SPRITE_UNIFORMS%\n\nvoid main(void)\n{\n %SPRITE_CODE%\n vec4 source = texture2D(uSampler[0], textureCoord) * uColor;\n vec4 target = texture2D(uSampler[1], vMapCoord);\n\n //reverse hardlight\n if (source.a == 0.0) {\n gl_FragColor = vec4(0, 0, 0, 0);\n return;\n }\n //yeah, premultiplied\n vec3 Cb = source.rgb/source.a, Cs;\n if (target.a > 0.0) {\n Cs = target.rgb / target.a;\n }\n vec3 multiply = Cb * Cs * 2.0;\n vec3 Cb2 = Cb * 2.0 - 1.0;\n vec3 screen = Cb2 + Cs - Cb2 * Cs;\n vec3 B;\n if (Cs.r <= 0.5) {\n B.r = multiply.r;\n } else {\n B.r = screen.r;\n }\n if (Cs.g <= 0.5) {\n B.g = multiply.g;\n } else {\n B.g = screen.g;\n }\n if (Cs.b <= 0.5) {\n B.b = multiply.b;\n } else {\n B.b = screen.b;\n }\n vec4 res;\n res.xyz = (1.0 - source.a) * Cs + source.a * B;\n res.a = source.a + target.a * (1.0-source.a);\n gl_FragColor = vec4(res.xyz * res.a, res.a);\n}\n";
var OverlayShader = (function (_super) {
__extends(OverlayShader, _super);
function OverlayShader(gl, tilingMode) {
_super.call(
this,
gl,
extras.PictureShader.blendVert,
overlayFrag,
tilingMode
);
}
return OverlayShader;
})(extras.PictureShader);
extras.OverlayShader = OverlayShader;
})((extras = PIXI.extras || (PIXI.extras = {})));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
function nextPow2(v) {
v += v === 0 ? 1 : 0;
--v;
v |= v >>> 1;
v |= v >>> 2;
v |= v >>> 4;
v |= v >>> 8;
v |= v >>> 16;
return v + 1;
}
var PictureRenderer = (function (_super) {
__extends(PictureRenderer, _super);
function PictureRenderer(renderer) {
_super.call(this, renderer);
}
PictureRenderer.prototype.onContextChange = function () {
var gl = this.renderer.gl;
this.drawModes = extras.mapFilterBlendModesToPixi(gl);
this.normalShader = [
new extras.NormalShader(gl, 0),
new extras.NormalShader(gl, 1),
new extras.NormalShader(gl, 2),
];
this._tempClamp = new Float32Array(4);
this._tempColor = new Float32Array(4);
this._tempRect = new PIXI.Rectangle();
this._tempRect2 = new PIXI.Rectangle();
this._tempRect3 = new PIXI.Rectangle();
this._tempMatrix = new PIXI.Matrix();
this._tempMatrix2 = new PIXI.Matrix();
this._bigBuf = new Uint8Array(1 << 20);
this._renderTexture = new PIXI.BaseRenderTexture(1024, 1024);
};
PictureRenderer.prototype.start = function () {};
PictureRenderer.prototype.flush = function () {};
PictureRenderer.prototype._getRenderTexture = function (
minWidth,
minHeight
) {
if (
this._renderTexture.width < minWidth ||
this._renderTexture.height < minHeight
) {
minHeight = nextPow2(minWidth);
minHeight = nextPow2(minHeight);
this._renderTexture.resize(minWidth, minHeight);
}
return this._renderTexture;
};
PictureRenderer.prototype._getBuf = function (size) {
var buf = this._bigBuf;
if (buf.length < size) {
size = nextPow2(size);
buf = new Uint8Array(size);
this._bigBuf = buf;
}
return buf;
};
PictureRenderer.prototype.render = function (sprite) {
if (!sprite.texture.valid) {
return;
}
var tilingMode = 0;
if (sprite.tileTransform) {
tilingMode = this._isSimpleSprite(sprite) ? 1 : 2;
}
var blendShader = this.drawModes[sprite.blendMode];
if (blendShader) {
this._renderBlend(sprite, blendShader[tilingMode]);
} else {
this._renderNormal(sprite, this.normalShader[tilingMode]);
}
};
PictureRenderer.prototype._renderNormal = function (sprite, shader) {
var renderer = this.renderer;
renderer.bindShader(shader);
renderer.state.setBlendMode(sprite.blendMode);
this._renderInner(sprite, shader);
};
PictureRenderer.prototype._renderBlend = function (sprite, shader) {
var renderer = this.renderer;
var spriteBounds = sprite.getBounds();
var renderTarget = renderer._activeRenderTarget;
var matrix = renderTarget.projectionMatrix;
var flipX = matrix.a < 0;
var flipY = matrix.d < 0;
var resolution = renderTarget.resolution;
var screen = this._tempRect;
var fr = renderTarget.sourceFrame || renderTarget.destinationFrame;
screen.x = 0;
screen.y = 0;
screen.width = fr.width;
screen.height = fr.height;
var bounds = this._tempRect2;
var fbw = fr.width * resolution,
fbh = fr.height * resolution;
bounds.x =
(spriteBounds.x + matrix.tx / matrix.a) * resolution + fbw / 2;
bounds.y =
(spriteBounds.y + matrix.ty / matrix.d) * resolution + fbh / 2;
bounds.width = spriteBounds.width * resolution;
bounds.height = spriteBounds.height * resolution;
if (flipX) {
bounds.y = fbw - bounds.width - bounds.x;
}
if (flipY) {
bounds.y = fbh - bounds.height - bounds.y;
}
var screenBounds = this._tempRect3;
var x_1 = Math.floor(Math.max(screen.x, bounds.x));
var x_2 = Math.ceil(
Math.min(screen.x + screen.width, bounds.x + bounds.width)
);
var y_1 = Math.floor(Math.max(screen.y, bounds.y));
var y_2 = Math.ceil(
Math.min(screen.y + screen.height, bounds.y + bounds.height)
);
var pixelsWidth = x_2 - x_1;
var pixelsHeight = y_2 - y_1;
if (pixelsWidth <= 0 || pixelsHeight <= 0) {
return;
}
var rt = this._getRenderTexture(pixelsWidth, pixelsHeight);
renderer.bindTexture(rt, 1, true);
var gl = renderer.gl;
if (renderer.renderingToScreen && renderTarget.root) {
var buf = this._getBuf(pixelsWidth * pixelsHeight * 4);
gl.readPixels(
x_1,
y_1,
pixelsWidth,
pixelsHeight,
gl.RGBA,
gl.UNSIGNED_BYTE,
this._bigBuf
);
gl.texSubImage2D(
gl.TEXTURE_2D,
0,
0,
0,
pixelsWidth,
pixelsHeight,
gl.RGBA,
gl.UNSIGNED_BYTE,
this._bigBuf
);
} else {
gl.copyTexSubImage2D(
gl.TEXTURE_2D,
0,
0,
0,
x_1,
y_1,
pixelsWidth,
pixelsHeight
);
}
renderer.bindShader(shader);
renderer.state.setBlendMode(PIXI.BLEND_MODES.NORMAL);
if (shader.uniforms.mapMatrix) {
var mapMatrix = this._tempMatrix;
mapMatrix.a = bounds.width / rt.width / spriteBounds.width;
if (flipX) {
mapMatrix.a = -mapMatrix.a;
mapMatrix.tx =
(bounds.x - x_1) / rt.width -
(spriteBounds.x + spriteBounds.width) * mapMatrix.a;
} else {
mapMatrix.tx =
(bounds.x - x_1) / rt.width - spriteBounds.x * mapMatrix.a;
}
mapMatrix.d = bounds.height / rt.height / spriteBounds.height;
if (flipY) {
mapMatrix.d = -mapMatrix.d;
mapMatrix.ty =
(bounds.y - y_1) / rt.height -
(spriteBounds.y + spriteBounds.height) * mapMatrix.d;
} else {
mapMatrix.ty =
(bounds.y - y_1) / rt.height - spriteBounds.y * mapMatrix.d;
}
shader.uniforms.mapMatrix = mapMatrix.toArray(true);
}
this._renderInner(sprite, shader);
};
PictureRenderer.prototype._renderInner = function (sprite, shader) {
var renderer = this.renderer;
if (shader.tilingMode > 0) {
this._renderWithShader(sprite, shader.tilingMode === 1, shader);
} else {
this._renderSprite(sprite, shader);
}
};
PictureRenderer.prototype._renderWithShader = function (
ts,
isSimple,
shader
) {
var quad = shader.tempQuad;
var renderer = this.renderer;
renderer.bindVao(quad.vao);
var vertices = quad.vertices;
var _width = ts._width;
var _height = ts._height;
var _anchorX = ts._anchor._x;
var _anchorY = ts._anchor._y;
var w0 = _width * (1 - _anchorX);
var w1 = _width * -_anchorX;
var h0 = _height * (1 - _anchorY);
var h1 = _height * -_anchorY;
var wt = ts.transform.worldTransform;
var a = wt.a;
var b = wt.b;
var c = wt.c;
var d = wt.d;
var tx = wt.tx;
var ty = wt.ty;
vertices[0] = a * w1 + c * h1 + tx;
vertices[1] = d * h1 + b * w1 + ty;
vertices[2] = a * w0 + c * h1 + tx;
vertices[3] = d * h1 + b * w0 + ty;
vertices[4] = a * w0 + c * h0 + tx;
vertices[5] = d * h0 + b * w0 + ty;
vertices[6] = a * w1 + c * h0 + tx;
vertices[7] = d * h0 + b * w1 + ty;
vertices = quad.uvs;
vertices[0] = vertices[6] = -ts.anchor.x;
vertices[1] = vertices[3] = -ts.anchor.y;
vertices[2] = vertices[4] = 1.0 - ts.anchor.x;
vertices[5] = vertices[7] = 1.0 - ts.anchor.y;
quad.upload();
var tex = ts._texture;
var lt = ts.tileTransform.localTransform;
var uv = ts.uvTransform;
var mapCoord = uv.mapCoord;
var uClampFrame = uv.uClampFrame;
var uClampOffset = uv.uClampOffset;
var w = tex.width;
var h = tex.height;
var W = _width;
var H = _height;
var tempMat = this._tempMatrix2;
tempMat.set(
(lt.a * w) / W,
(lt.b * w) / H,
(lt.c * h) / W,
(lt.d * h) / H,
lt.tx / W,
lt.ty / H
);
tempMat.invert();
if (isSimple) {
tempMat.append(mapCoord);
} else {
shader.uniforms.uMapCoord = mapCoord.toArray(true);
shader.uniforms.uClampFrame = uClampFrame;
shader.uniforms.uClampOffset = uClampOffset;
}
shader.uniforms.uTransform = tempMat.toArray(true);
var color = this._tempColor;
var alpha = ts.worldAlpha;
PIXI.utils.hex2rgb(ts.tint, color);
color[0] *= alpha;
color[1] *= alpha;
color[2] *= alpha;
color[3] = alpha;
shader.uniforms.uColor = color;
renderer.bindTexture(tex, 0, true);
quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0);
};
PictureRenderer.prototype._renderSprite = function (sprite, shader) {
var renderer = this.renderer;
var quad = shader.tempQuad;
renderer.bindVao(quad.vao);
var uvs = sprite.texture._uvs;
var vertices = quad.vertices;
var vd = sprite.vertexData;
for (var i = 0; i < 8; i++) {
quad.vertices[i] = vd[i];
}
quad.uvs[0] = uvs.x0;
quad.uvs[1] = uvs.y0;
quad.uvs[2] = uvs.x1;
quad.uvs[3] = uvs.y1;
quad.uvs[4] = uvs.x2;
quad.uvs[5] = uvs.y2;
quad.uvs[6] = uvs.x3;
quad.uvs[7] = uvs.y3;
quad.upload();
var frame = sprite.texture.frame;
var base = sprite.texture.baseTexture;
var clamp = this._tempClamp;
var eps = 0.5 / base.resolution;
clamp[0] = (frame.x + eps) / base.width;
clamp[1] = (frame.y + eps) / base.height;
clamp[2] = (frame.x + frame.width - eps) / base.width;
clamp[3] = (frame.y + frame.height - eps) / base.height;
shader.uniforms.uTextureClamp = clamp;
var color = this._tempColor;
PIXI.utils.hex2rgb(sprite.tint, color);
var alpha = sprite.worldAlpha;
color[0] *= alpha;
color[1] *= alpha;
color[2] *= alpha;
color[3] = alpha;
shader.uniforms.uColor = color;
renderer.bindTexture(base, 0, true);
quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0);
};
PictureRenderer.prototype._isSimpleSprite = function (ts) {
var renderer = this.renderer;
var tex = ts._texture;
var baseTex = tex.baseTexture;
var isSimple =
baseTex.isPowerOfTwo &&
tex.frame.width === baseTex.width &&
tex.frame.height === baseTex.height;
if (isSimple) {
if (!baseTex._glTextures[renderer.CONTEXT_UID]) {
if (baseTex.wrapMode === PIXI.WRAP_MODES.CLAMP) {
baseTex.wrapMode = PIXI.WRAP_MODES.REPEAT;
}
} else {
isSimple = baseTex.wrapMode !== PIXI.WRAP_MODES.CLAMP;
}
}
return isSimple;
};
return PictureRenderer;
})(PIXI.ObjectRenderer);
extras.PictureRenderer = PictureRenderer;
PIXI.WebGLRenderer.registerPlugin("picture", PictureRenderer);
PIXI.CanvasRenderer.registerPlugin("picture", PIXI.CanvasSpriteRenderer);
})((extras = PIXI.extras || (PIXI.extras = {})));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var PictureSprite = (function (_super) {
__extends(PictureSprite, _super);
function PictureSprite(texture) {
_super.call(this, texture);
this.pluginName = "picture";
}
return PictureSprite;
})(PIXI.Sprite);
extras.PictureSprite = PictureSprite;
})((extras = PIXI.extras || (PIXI.extras = {})));
})(PIXI || (PIXI = {}));
var PIXI;
(function (PIXI) {
var extras;
(function (extras) {
var PictureTilingSprite = (function (_super) {
__extends(PictureTilingSprite, _super);
function PictureTilingSprite(texture) {
_super.call(this, texture);
this.pluginName = "picture";
}
return PictureTilingSprite;
})(extras.TilingSprite);
extras.PictureTilingSprite = PictureTilingSprite;
})((extras = PIXI.extras || (PIXI.extras = {})));
})(PIXI || (PIXI = {}));
//# sourceMappingURL=pixi-picture.js.map

1113
www/js/libs/pixi-tilemap.js Normal file

File diff suppressed because it is too large Load diff

48989
www/js/libs/pixi.js Normal file

File diff suppressed because it is too large Load diff

9
www/js/main.js Normal file
View file

@ -0,0 +1,9 @@
//=============================================================================
// main.js
//=============================================================================
PluginManager.setup($plugins);
window.onload = function () {
SceneManager.run(Scene_Boot);
};

1274
www/js/plugins.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,397 @@
//=============================================================================
// AdjustPictureGraphical.js
// ----------------------------------------------------------------------------
// Copyright (c) 2015 Triacontane
// This plugin is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.2.1 2017/09/13 DWindow.jsなどピクチャコンテナにピクチャ以外を入れる一部のプラグインとの競合を解消
// 1.2.0 2017/08/13 パラメータの型指定機能に対応
// 1.1.1 2016/01/24 ピクチャが回転しているときも位置を把握できるよう修正
// 1.1.0 2015/12/26 グリッドの表示機能とグリッドにスナップ機能を追加
// Ctrl+Cで座標をコピーできる機能を追加
// 任意のマップを読み込んでテストする機能を追加
// 1.0.3 2015/12/20 ピクチャのボタン化プラグインとの競合を解消
// 1.0.2 2015/11/23 競合防止のため、タッチ関連の処理をSprite_Pictureに定義
// 1.0.1 2015/11/21 ピクチャ番号を出力するよう機能修正
// コンソールにログを出す機能を追加
// 1.0.0 2015/11/20 初版
// ----------------------------------------------------------------------------
// [Blog] : http://triacontane.blogspot.jp/
// [Twitter]: https://twitter.com/triacontane/
// [GitHub] : https://github.com/triacontane/
//=============================================================================
/*:
* @plugindesc Plugin that adjust picture to graphical
* @author triacontane
*
* @param GridSize
* @desc View grid line
* @default 48
* @type number
*
* @param TestMapId
* @desc Event test map id
* @default -1
* @type number
* @min -1
*
* @help Plugin that adjust picture to graphical.
* Drag and drop on test screen.
* this is support plugin. No impact for game.
* Start for Event Test(Ctrl+R)
*
* Caution!
* When you set status 'on' this plugin at Plugin Manager,
* you have to save project(Ctrl+S) before test
*
* This plugin is released under the MIT License.
*/
/*:ja
* @plugindesc ピクチャのグラフィカルな位置調整プラグイン
* パラメータを変更したらプロジェクトの保存Ctrl+S
* @author トリアコンタン
*
* @param グリッドサイズ
* @desc ピクチャ調整中に指定サイズでグリッドを表示します0を指定すると非表示になります
* @default 48
* @type number
*
* @param テストマップID
* @desc 任意のマップをイベントテストの舞台に設定できます
* @default -1
* @type number
* @min -1
*
* @help イベントコマンドのテスト時にピクチャの表示位置を
* ドラッグドロップで微調整できます
* 左上のタイトルバーに選択したピクチャの座標が表示されるので
* テスト画面を表示させつつピクチャの座標を調整してください
* なおイベントコマンドのテスト以外では機能しません
* イベントコマンドのテストはイベントエディタからイベントコマンドを
* 選択して右クリックテストCtrl+Rで実行できます
*
* 注意
* プラグインマネージャーから当プラグインを有効にしたら
* テストを行う前にプロジェクトの保存Ctrl+Sを行ってください
*
* このプラグインにはプラグインコマンドはありません
*
* 利用規約
* 作者に無断で改変再配布が可能で利用形態商用18禁利用等
* についても制限はありません
* このプラグインはもうあなたのものです
*/
(function () {
"use strict";
// イベントテスト時以外は一切の機能を無効
if (!DataManager.isEventTest()) return;
var pluginName = "AdjustPictureGraphical";
//=============================================================================
// ローカル関数
// プラグインパラメータやプラグインコマンドパラメータの整形やチェックをします
//=============================================================================
var getParamNumber = function (paramNames, min, max) {
var value = getParamOther(paramNames);
if (arguments.length < 2) min = -Infinity;
if (arguments.length < 3) max = Infinity;
return (parseInt(value, 10) || 0).clamp(min, max);
};
var getParamOther = function (paramNames) {
if (!Array.isArray(paramNames)) paramNames = [paramNames];
for (var i = 0; i < paramNames.length; i++) {
var name = PluginManager.parameters(pluginName)[paramNames[i]];
if (name) return name;
}
return null;
};
//=============================================================================
// Input
// [c]を追加定義します。
//=============================================================================
Input.keyMapper[67] = "copy";
//=============================================================================
// DataManager
// テスト用マップの読み込みを追加定義します。
//=============================================================================
var _DataManager_setupEventTest = DataManager.setupEventTest;
DataManager.setupEventTest = function () {
_DataManager_setupEventTest.call(this);
var mapId = getParamNumber(["TestMapId", "テストマップID"], -1, 9999);
if (mapId > 0) $gamePlayer.reserveTransfer(mapId, 8, 6);
};
//=============================================================================
// Game_Picture
// ピクチャを掴んだ場合に移動を中断します。
//=============================================================================
Game_Picture.prototype.resetMove = function (x, y) {
this._x = x;
this._y = y;
this._duration = 0;
};
//=============================================================================
// Game_Screen
// 最後に選択したピクチャの座標を保存します。
//=============================================================================
var _Game_Screen_initialize = Game_Screen.prototype.initialize;
Game_Screen.prototype.initialize = function () {
_Game_Screen_initialize.call(this);
this._lastPictureX = null;
this._lastPictureY = null;
this._copyCount = 0;
this._infoPicture = "";
this._infoHelp =
"Shift:ウィンドウ表示切替 Ctrl+マウス:グリッドにスナップ Ctrl+C:座標コピー ";
this._infoCopy = "";
this._documentTitle = "";
};
var _Game_Screen_updatePictures = Game_Screen.prototype.updatePictures;
Game_Screen.prototype.updatePictures = function () {
_Game_Screen_updatePictures.call(this);
if (
Utils.isNwjs() &&
Input.isPressed("control") &&
Input.isTriggered("copy")
) {
if (this._lastPictureX == null || this._lastPictureY == null) return;
var clipboard = require("nw.gui").Clipboard.get();
var copyValue = "";
if (this._copyCount % 2 === 0) {
copyValue = this._lastPictureX.toString();
this._infoCopy = " X座標[" + copyValue + "]をコピーしました。";
} else {
copyValue = this._lastPictureY.toString();
this._infoCopy = " Y座標[" + copyValue + "]をコピーしました。";
}
clipboard.set(copyValue, "text");
this._copyCount++;
}
var docTitle = this._infoHelp + this._infoPicture + this._infoCopy;
if (docTitle !== this._documentTitle) {
document.title = docTitle;
this._documentTitle = docTitle;
}
};
//=============================================================================
// Scene_Map
// テストイベント時の特別な処理
//=============================================================================
var _Scene_Map_update = Scene_Map.prototype.update;
Scene_Map.prototype.update = function () {
if (!$gameMap.isEventRunning()) this.updateEventTest();
_Scene_Map_update.call(this);
};
Scene_Map.prototype.updateEventTest = function () {
this._spriteset.checkDragPictures();
if (Input.isTriggered("shift")) {
if (!this._messageWindow.isOpen()) {
this._messageWindow.open();
} else {
this._messageWindow.close();
}
}
};
Scene_Map.prototype.isMapTouchOk = function () {
return false;
};
//=============================================================================
// Spriteset_Base
// 配下のピクチャから掴んでいるものを探します。
//=============================================================================
Spriteset_Base.prototype.checkDragPictures = function () {
this._pictureContainer.children.reverse().some(function (picture) {
return picture.checkDrag && picture.checkDrag();
}, this);
this._pictureContainer.children.reverse();
};
var _Spriteset_Base_createLowerLayer =
Spriteset_Base.prototype.createLowerLayer;
Spriteset_Base.prototype.createLowerLayer = function () {
_Spriteset_Base_createLowerLayer.call(this);
this.createGridSprite();
};
Spriteset_Base.prototype.createGridSprite = function () {
var size = getParamNumber(
["GridSize", "グリッドサイズ"],
0,
Math.max(this.width, this.height)
);
if (size === 0) return;
this._gridSprite = new Sprite();
this._gridSprite.setFrame(0, 0, this.width, this.height);
var bitmap = new Bitmap(this.width, this.height);
for (var x = 0; x < this.width; x += size) {
bitmap.fillRect(x, 0, 1, this.height, "rgba(255,255,255,1.0)");
}
for (var y = 0; y < this.height; y += size) {
bitmap.fillRect(0, y, this.width, 1, "rgba(255,255,255,1.0)");
}
this._gridSprite.bitmap = bitmap;
this.addChild(this._gridSprite);
};
//=============================================================================
// Sprite_Picture
// テストイベント時にピクチャを掴みます。
//=============================================================================
var _Sprite_Picture_initialize = Sprite_Picture.prototype.initialize;
Sprite_Picture.prototype.initialize = function (pictureId) {
_Sprite_Picture_initialize.call(this, pictureId);
this._holding = false;
this._dx = 0;
this._dy = 0;
};
Sprite_Picture.prototype.checkDrag = function () {
var picture = this.picture();
if (picture != null) {
if (this.updateDragMove()) {
var result =
"PictureNum:[" +
this._pictureId +
"] X:[" +
this.x +
"] Y:[" +
this.y +
"]";
$gameScreen._lastPictureX = this.x;
$gameScreen._lastPictureY = this.y;
$gameScreen._infoPicture = result;
$gameScreen._infoCopy = "";
if (!this._holding) console.log(result);
picture.resetMove(this.x, this.y);
return true;
}
}
return false;
};
Sprite_Picture.prototype.updateDragMove = function () {
if (this.isTriggered() || (this._holding && TouchInput.isPressed())) {
if (!this._holding) this.hold();
var x = TouchInput.x - this._dx;
var y = TouchInput.y - this._dy;
if (Input.isPressed("control")) {
var size = getParamNumber(
["GridSize", "グリッドサイズ"],
0,
Math.max(this.width, this.height)
);
if (size !== 0) {
x % size > size / 2 ? (x += size - (x % size)) : (x -= x % size);
y % size > size / 2 ? (y += size - (y % size)) : (y -= y % size);
}
}
this.move(x, y);
return true;
} else if (this._holding) {
this.release();
return true;
}
return false;
};
Sprite_Picture.prototype.hold = function () {
this._holding = true;
this._dx = TouchInput.x - this.x;
this._dy = TouchInput.y - this.y;
this.setBlendColor([255, 255, 255, 192]);
};
Sprite_Picture.prototype.release = function () {
this._holding = false;
this.setBlendColor([0, 0, 0, 0]);
};
//=============================================================================
// Sprite_Picture
// タッチ操作を可能にする共通部分
//=============================================================================
Sprite_Picture.prototype.screenWidth = function () {
return (this.width || 0) * this.scale.x;
};
Sprite_Picture.prototype.screenHeight = function () {
return (this.height || 0) * this.scale.y;
};
Sprite_Picture.prototype.screenX = function () {
return (this.x || 0) - this.anchor.x * this.screenWidth();
};
Sprite_Picture.prototype.screenY = function () {
return (this.y || 0) - this.anchor.y * this.screenHeight();
};
Sprite_Picture.prototype.minX = function () {
var width = this.screenWidth();
return Math.min(this.screenX(), this.screenX() + width);
};
Sprite_Picture.prototype.minY = function () {
var height = this.screenHeight();
return Math.min(this.screenY(), this.screenY() + height);
};
Sprite_Picture.prototype.maxX = function () {
var width = this.screenWidth();
return Math.max(this.screenX(), this.screenX() + width);
};
Sprite_Picture.prototype.maxY = function () {
var height = this.screenHeight();
return Math.max(this.screenY(), this.screenY() + height);
};
Sprite_Picture.prototype.isTouchPosInRect = function () {
var dx = TouchInput.x - this.x;
var dy = TouchInput.y - this.y;
var sin = Math.sin(-this.rotation);
var cos = Math.cos(-this.rotation);
var rx = this.x + Math.floor(dx * cos + dy * -sin);
var ry = this.y + Math.floor(dx * sin + dy * cos);
return (
rx >= this.minX() &&
rx <= this.maxX() &&
ry >= this.minY() &&
ry <= this.maxY()
);
};
Sprite_Picture.prototype.isTouchable = function () {
return (
this.bitmap != null &&
this.visible &&
this.scale.x !== 0 &&
this.scale.y !== 0
);
};
Sprite_Picture.prototype.isTriggered = function () {
return this.isTouchEvent(TouchInput.isTriggered);
};
Sprite_Picture.prototype.isTouchEvent = function (triggerFunc) {
return (
this.isTouchable() &&
triggerFunc.call(TouchInput) &&
this.isTouchPosInRect()
);
};
})();

945
www/js/plugins/AllIsMine.js Normal file
View file

@ -0,0 +1,945 @@
//=============================================================================
// AllIsMine.js
// ----------------------------------------------------------------------------
// Copyright (c) 2017 Tsumio
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.0.3 2017/07/24 オフセットにマイナスの値を設定できるように変更。
// 1.0.2 2017/07/19 SE設定機能を追加。
// 1.0.1 2017/07/17 吹き出しの表示・非表示をスイッチでも切り替えられるように変更。
// 1.0.0 2017/07/17 公開。
// ----------------------------------------------------------------------------
// [Blog] : http://ntgame.wpblog.jp/
// [Twitter]: https://twitter.com/TsumioNtGame
//=============================================================================
/*:
* @plugindesc This plugin display baloon when picking up item.
* @author Tsumio
*
* @param ----Baloon Settings----
* @desc
* @default
*
* @param BaloonSwitchNum
* @type switch
* @desc When this switch is ON, baloon window is displayed.
* @default 101
*
* @param BaloonImage
* @type file
* @require 1
* @desc Sets the image of the balloon window. Load 'img\system' folder
* @dir img/system
* @default Window
*
* @param OffSetX
* @type number
* @min -1000
* @max 1000
* @desc This is a setting sets the offset of X position.
* @default 0
*
* @param OffSetY
* @type number
* @min -1000
* @max 1000
* @desc This is a setting sets the offset of Y position.
* @default 0
*
* @param BaloonWindowMargin
* @type number
* @desc This is a setting sets the margin inside the baloon window.
* @default 35
*
* @param WaitTime
* @type number
* @desc This is a setting time to display the next item.60 = about 1 minute
* @default 60
*
* @param ----String To Display----
* @desc
* @default
*
* @param ItemNameColor
* @type number
* @desc This is a setting sets color of obtained item(or gold etc.).The color follows to the contents of BaloonImage.
* @default 1
*
* @param WhenPickUpGold
* @type string
* @desc Display string when gold is picked up.
* @default Picked Up !
*
* @param GoldIconNum
* @type number
* @desc This is a setting sets the number of gold icon.
* @default 314
*
* @param WhenGetItem
* @type string
* @desc Display string when item is geted.
* @default Got
*
* @param ----SE Settings----
* @desc
* @default
*
* @param GoldSeName
* @desc The filename of the SE when you pick up gold.
* @default
* @require 1
* @dir audio/se/
* @type file
*
* @param GoldSeVolume
* @type number
* @desc This is a setting sets the volume when you picu up gold.
* @default 100
*
* @param GoldSePitch
* @type number
* @desc This is a setting sets the pitch when you picu up gold.
* @default 100
*
* @param WeaponSeName
* @desc The filename of the SE when you get weapon(s).
* @default
* @require 1
* @dir audio/se/
* @type file
*
* @param WeaponSeVolume
* @type number
* @desc This is a setting sets the volume when you get weapon(s).
* @default 100
*
* @param WeaponSePitch
* @type number
* @desc This is a setting sets the pitch when you get weapon(s).
* @default 100
*
* @param ArmorSeName
* @desc The filename of the SE when you get armor(s).
* @default
* @require 1
* @dir audio/se/
* @type file
*
* @param ArmorSeVolume
* @type number
* @desc This is a setting sets the volume when you get armor(s).
* @default 100
*
* @param ArmorSePitch
* @type number
* @desc This is a setting sets the pitch when you get armor(s).
* @default 100
*
* @param ItemSeName
* @desc The filename of the SE when you get item(s).
* @default
* @require 1
* @dir audio/se/
* @type file
*
* @param ItemSeVolume
* @type number
* @desc This is a setting sets the volume when you get item(s).
* @default 100
*
* @param ItemSePitch
* @type number
* @desc This is a setting sets the pitch when you get item(s).
* @default 100
*
* @param ----Others----
* @desc
* @default
*
* @param EnglishMode
* @type boolean
* @desc If you use English, you should set 'true'.
* @default true
*
* @help This plugin shows baloon window when player get a item(or gold etc.) from from event command.
* In the baloon window, the item name, icon, number of items, etc. are displayed.
* You can toggle display and non-display of baloon window by using the plugin command or using switch operation of the event command..
*
* ----how to use----
* The initial value of this plugin is "Stop_AllIsMine".
* So, if you want to display the balloon, you should make sure "Start_AllIsMine" from the plugin command.
* Or you need to turn on the switch with the specified number (initial value: 101) by switch operation of the event command.
* Note : Although plugin commands are left for compatibility, I recommend using switch operation of the event command.
*
* ----when to play se----
* SE is played when balloon window is displayed.
* In other words,even if the player gets items and equipments at the same time,
* SE are played one by one at the timing of balloon window switching so that no sounds are played simultaneously.
* It is ears-friendly specification.
*
* ----plugin command----
* Start_AllIsMine #Show baloon window when get a item.
* Stop_AllIsMine #Don't show baloon window when get a item.
*
* ----acknowledgments----
* TinyGetInfoWnd maked by Sasuke KANNAZUKI &
* MessageWindowPopup maked by Triacontane provided inspiration to this plugin.
* Tnaks !
*
*/
/*:ja
* @plugindesc アイテム等を入手したときに吹き出しを表示させます
* @author ツミオ
*
*
*
* @param ----吹き出しの設定----
* @desc
* @default
*
* @param 吹き出しのスイッチ番号
* @type switch
* @desc このスイッチがONのときに吹き出しが表示されます
* @default 101
*
* @param 吹き出しの画像
* @type file
* @require 1
* @desc 吹き出しウィンドウの画像を設定しますimg\systemフォルダから読み込み
* @dir img/system
* @default Window
*
* @param X座標のオフセット
* @type number
* @min -1000
* @max 1000
* @desc X座標のオフセットを設定します
* @default 0
*
* @param Y座標のオフセット
* @type number
* @min -1000
* @max 1000
* @desc Y座標のオフセットを設定します
* @default 0
*
* @param 吹き出しの余白
* @type number
* @desc 吹き出しウィンドウの内側の余白を設定します
* @default 30
*
* @param 表示時間
* @type number
* @desc 次のアイテムを表示するまでの時間を設定します60 = 約1秒
* @default 60
*
* @param ----表示する文字----
* @desc
* @default
*
*
* @param アイテム名の色
* @type number
* @desc 入手したアイテム名やゴールド等の色を設定します文字色は吹き出しの画像の内容に準じます
* @default 1
*
* @param ゴールド取得時の表示文字列
* @type string
* @desc ゴールドを取得した時に表示する文字列を設定します
* @default 拾った
*
* @param ゴールドのアイコン番号
* @type number
* @desc ゴールドのアイコン番号を設定します
* @default 314
*
* @param アイテム取得時の表示文字列
* @type string
* @desc アイテムを取得した時に表示する文字列を設定します
* @default 個手に入れた
*
*
* @param ----SEの設定----
* @desc
* @default
*
* @param ゴールド入手時のSE名
* @desc ゴールドを取得した時に再生されるSEのファイル名を設定します
* @default
* @require 1
* @dir audio/se/
* @type file
*
* @param ゴールド取得時のSE音量
* @type number
* @desc ゴールドを取得した時に再生されるSEの音量を設定します
* @default 100
*
* @param ゴールド取得時のSEピッチ
* @type number
* @desc ゴールドを取得した時に再生されるSEのピッチを設定します
* @default 100
*
* @param 武器取得時のSE名
* @desc 武器を取得した時に再生されるSEのファイル名を設定します
* @default
* @require 1
* @dir audio/se/
* @type file
*
* @param 武器取得時のSE音量
* @type number
* @desc 武器を取得した時に再生されるSEの音量を設定します
* @default 100
*
* @param 武器取得時のSEピッチ
* @type number
* @desc 武器を取得した時に再生されるSEのピッチを設定します
* @default 100
*
* @param 防具取得時のSE名
* @desc 防具を取得した時に再生されるSEのファイル名を設定します
* @default
* @require 1
* @dir audio/se/
* @type file
*
* @param 防具取得時のSE音量
* @type number
* @desc 防具を取得した時に再生されるSEの音量を設定します
* @default 100
*
* @param 防具取得時のSEピッチ
* @type number
* @desc 防具を取得した時に再生されるSEのピッチを設定します
* @default 100
*
* @param アイテム取得時のSE名
* @desc アイテムを取得した時に再生されるSEのファイル名を設定します
* @default
* @require 1
* @dir audio/se/
* @type file
*
* @param アイテム取得時のSE音量
* @type number
* @desc アイテムを取得した時に再生されるSEの音量を設定します
* @default 100
*
* @param アイテム取得時のSEピッチ
* @type number
* @desc アイテムを取得した時に再生されるSEのピッチを設定します
* @default 100
*
* @param ----その他----
* @desc
* @default
*
* @param 英語モード
* @type boolean
* @desc 英語での表示を前提とした表示にします
* @default false
*
* @help このプラグインを導入するとイベントコマンドからアイテムやゴールドを入手したときに
* 吹き出しを表示させることができるようになります
* 吹き出しにはアイテムの名前やアイコン個数などが表示されます
* プラグインコマンドもしくはスイッチを操作することにより吹き出しの表示非表示が切り替えられます
*
* 使用方法
* このプラグインの初期値はStop_AllIsMineです
* つまり吹き出しを表示させたい場合必ずプラグインコマンドからStart_AllIsMineさせる必要があります
* もしくはイベントのスイッチ操作で指定された番号のスイッチ初期値101をONにする必要があります
* 互換性のためにプラグインコマンドを残していますが基本的にはイベントでスイッチを操作することをオススメします
*
*SE再生のタイミング
* SEは吹き出しが表示されたときに流されます
* つまり複数のアイテムや装備を同時に入手した場合もSEは吹き出しが切り替わるタイミングで一つ一つ流されるため
* いくつもの音が同時に鳴ることはありません
* 耳に優しい仕様です
*
* プラグインコマンド
* Start_AllIsMine #アイテム入手時に吹き出しを表示するようにします
* Stop_AllIsMine #アイテム入手時に吹き出しを表示しないようにします
*
* 謝辞
* このプラグインは神無月サスケさんのTinyGetInfoWnd
* トリアコンタンさんのフキダシウィンドウプラグインに着想を得て作成しました
* 感謝
*
* 利用規約
* 作者に無断で改変再配布が可能で利用形態商用18禁利用等
* についても制限はありません
* 自由に使用してください
*/
(function () {
"use strict";
var pluginName = "AllIsMine";
//Declare NTMO namespace.
var NTMO = NTMO || {};
//Create se type(enum).
NTMO.SE_TYPE = {
Gold: 1,
Weapon: 2,
Armor: 3,
Item: 4,
};
//-----------------------------------------------------------------------------
// Settings for plugin command.
//-----------------------------------------------------------------------------
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (command === "Stop_AllIsMine") {
NTMO.Queue.stopQueue();
} else if (command === "Start_AllIsMine") {
NTMO.Queue.startQueue();
}
};
//=============================================================================
// Local function
// These functions checks & formats pluguin's command parameters.
// I borrowed these functions from Triacontane.Thanks!
//=============================================================================
var getParamString = function (paramNames) {
if (!Array.isArray(paramNames)) paramNames = [paramNames];
for (var i = 0; i < paramNames.length; i++) {
var name = PluginManager.parameters(pluginName)[paramNames[i]];
if (name) return name;
}
return "";
};
var getParamNumber = function (paramNames, min, max) {
var value = getParamString(paramNames);
if (arguments.length < 2) min = -Infinity;
if (arguments.length < 3) max = Infinity;
return (parseInt(value) || 0).clamp(min, max);
};
//=============================================================================
// Get and set pluguin parameters.
//=============================================================================
var param = {};
param.pickUpGold = getParamString([
"WhenPickUpGold",
"ゴールド取得時の表示文字列",
]);
param.offsetX = getParamNumber(["OffSetX", "X座標のオフセット"]);
param.offsetY = getParamNumber(["OffSetY", "Y座標のオフセット"]);
param.imgWindowName = getParamString(["BaloonImage", "吹き出しの画像"]);
param.goldIconNum = getParamString(["GoldIconNum", "ゴールドのアイコン番号"]);
param.windowMargin = getParamNumber(["BaloonWindowMargin", "吹き出しの余白"]);
param.waitTime = getParamNumber(["WaitTime", "表示時間"]);
param.itemNameColor = getParamNumber(["ItemNameColor", "アイテム名の色"]);
param.gettingItemStr = getParamString([
"WhenGetItem",
"アイテム取得時の表示文字列",
]);
param.englishMode = getParamString(["EnglishMode", "英語モード"]);
param.visibleSwitch = getParamNumber([
"BaloonSwitchNum",
"吹き出しのスイッチ番号",
]);
//Gold SE settings.
param.goldSeName = getParamString(["GoldSeName", "ゴールド入手時のSE名"]);
param.goldSeVolume = getParamString([
"GoldSeVolume",
"ゴールド取得時のSE音量",
]);
param.goldSePitch = getParamString([
"GoldSePitch",
"ゴールド取得時のSEピッチ",
]);
//Weapon SE settings.
param.weaponSeName = getParamString(["WeaponSeName", "武器取得時のSE名"]);
param.weaponSeVolume = getParamString([
"WeaponSeVolume",
"武器取得時のSE音量",
]);
param.weaponSePitch = getParamString([
"WeaponSePitch",
"武器取得時のSEピッチ",
]);
//Armor SE settings.
param.armorSeName = getParamString(["ArmorSeName", "防具取得時のSE名"]);
param.armorSeVolume = getParamString(["ArmorSeVolume", "防具取得時のSE音量"]);
param.armorSePitch = getParamString(["ArmorSePitch", "防具取得時のSEピッチ"]);
//Item SE settings.
param.itemSeName = getParamString(["ItemSeName", "アイテム取得時のSE名"]);
param.itemSeVolume = getParamString([
"ItemSeVolume",
"アイテム取得時のSE音量",
]);
param.itemSePitch = getParamString([
"ItemSePitch",
"アイテム取得時のSEピッチ",
]);
//=============================================================================
// NTMO.Queue(static)
// This is a class that implement the queue.
// I borrowed this class from http://keicode.com/script/scr25.php. Thanks!
//=============================================================================
NTMO.Queue = function () {
this._arry = new Array();
this._type = new Array();
};
NTMO.Queue.initialize = function () {
if (this._arry === undefined) {
this._arry = new Array();
this._type = new Array();
}
};
NTMO.Queue.enqueue = function (o, type) {
if (this.canUseQueue()) {
this._arry.push(o);
this._type.push(type);
}
};
NTMO.Queue.dequeue = function () {
if (this._arry.length > 0) {
return this._arry.shift();
}
return null;
};
NTMO.Queue.dequeueType = function () {
if (this._type.length > 0) {
return this._type.shift();
}
return null;
};
NTMO.Queue.size = function () {
return this._arry.length;
};
NTMO.Queue.toString = function () {
return "[" + this._arry.join(",") + "]";
};
NTMO.Queue.canUseQueue = function (o) {
return $gameSwitches.value(param.visibleSwitch);
};
NTMO.Queue.startQueue = function (o) {
$gameSwitches.setValue(param.visibleSwitch, true);
};
NTMO.Queue.stopQueue = function (o) {
$gameSwitches.setValue(param.visibleSwitch, false);
};
//=============================================================================
// Scene_Map
// Expand Scene_Map class for displaying Window_AllIsMine.
//=============================================================================
var _Scene_map_createDisplayObjects =
Scene_Map.prototype.createDisplayObjects;
Scene_Map.prototype.createDisplayObjects = function () {
_Scene_map_createDisplayObjects.call(this);
this.createWindowAllIsMine();
};
Scene_Map.prototype.createWindowAllIsMine = function () {
this._window_allMine = new Window_AllIsMine(
-100,
-2000,
Graphics.width,
100
);
this.addWindow(this._window_allMine);
};
//=============================================================================
// Window_AllIsMine
// A item window class for map.
// This window used Popup window plugin by Triacontane as reference.Thanks !
//=============================================================================
function Window_AllIsMine() {
this.initialize.apply(this, arguments);
NTMO.Queue.initialize();
}
Window_AllIsMine.prototype = Object.create(Window_Base.prototype);
Window_AllIsMine.prototype.constructor = Window_AllIsMine;
Window_AllIsMine.prototype.initialize = function (x, y, width, height) {
Window_Base.prototype.initialize.apply(this, arguments);
this.pause = true;
this._count_queue = 0;
this._baloon_text = null;
this.BORDER_Y = 100;
};
Window_AllIsMine.prototype.update = function () {
Window_Base.prototype.update.call(this);
this.shouldShowWindow();
this.updatePauseSign();
this.moveToPlayer();
this.updateBaloonWindow();
//This count is for displaying the baloon window.
this._count_queue++;
};
Window_AllIsMine.prototype.reset = function (text) {
this.contents.clear();
text = this.cutEscapeString(text);
var width = this.contents.measureTextWidth(text) + param.windowMargin;
var height = 100;
this.width = width;
this.height = height;
};
Window_AllIsMine.prototype.moveToPlayer = function () {
var pos_x;
var pos_y;
pos_x = $gamePlayer.screenX() + param.offsetX - this._width / 2;
if (this.isPlayerUpper()) {
pos_y = $gamePlayer.screenY() + param.offsetY;
} else {
pos_y = $gamePlayer.screenY() + param.offsetY - this._height * 1.5;
}
this.x = pos_x;
this.y = pos_y;
};
Window_AllIsMine.prototype.updatePauseSign = function () {
if (this.isPlayerUpper()) {
this._windowPauseSignSprite.move(this._width / 2, -12);
this._windowPauseSignSprite.rotation = (180 * Math.PI) / 180;
} else {
this._windowPauseSignSprite.move(this._width / 2, this._height + 12);
this._windowPauseSignSprite.rotation = 0;
}
};
Window_AllIsMine.prototype.updateBaloonWindow = function () {
if (this.canNextQueue()) {
//Get a next text.
this._baloon_text = NTMO.Queue.dequeue();
var nextSe = NTMO.Queue.dequeueType();
if (this._baloon_text === null) {
return;
}
this.reset(this._baloon_text);
this.drawTextEx(this._baloon_text, 10, 10);
console.log(this._baloon_text);
this.playSe(nextSe);
}
};
Window_AllIsMine.prototype.canNextQueue = function () {
if (this._count_queue > param.waitTime) {
this._count_queue = 0;
return true;
}
return false;
};
Window_AllIsMine.prototype.shouldShowWindow = function () {
if (this._baloon_text === null && this.visible) {
this.hide();
} else if (this._baloon_text !== null && !this.visible) {
this.show();
}
};
Window_AllIsMine.prototype.loadWindowskin = function () {
this.windowskin = ImageManager.loadSystem(param.imgWindowName);
};
Window_AllIsMine.prototype.cutEscapeString = function (str) {
str = str.replace(/\[.*?\]/g, "");
str = str.replace(/\C/g, "");
return str;
};
Window_AllIsMine.prototype.isPlayerUpper = function () {
if ($gamePlayer.screenY() < this.BORDER_Y) {
return true;
}
return false;
};
Window_AllIsMine.prototype.playSe = function (type) {
switch (type) {
case NTMO.SE_TYPE.Gold:
if (param.goldSeName) {
var audio = {
name: param.goldSeName,
volume: param.goldSeVolume,
pitch: param.goldSePitch,
};
AudioManager.playSe(audio);
}
break;
case NTMO.SE_TYPE.Weapon:
if (param.weaponSeName) {
var audio = {
name: param.weaponSeName,
volume: param.weaponSeVolume,
pitch: param.weaponSePitch,
};
AudioManager.playSe(audio);
}
break;
case NTMO.SE_TYPE.Armor:
if (param.armorSeName) {
var audio = {
name: param.armorSeName,
volume: param.armorSeVolume,
pitch: param.armorSePitch,
};
AudioManager.playSe(audio);
}
break;
case NTMO.SE_TYPE.Item:
if (param.itemSeName) {
var audio = {
name: param.itemSeName,
volume: param.itemSeVolume,
pitch: param.itemSePitch,
};
AudioManager.playSe(audio);
}
break;
}
};
//=============================================================================
// Game_Interpreter
// Override Game_Interpreter for displaying a getting item.
//=============================================================================
// Change Gold
Game_Interpreter.prototype.command125 = function () {
var value = this.operateValue(
this._params[0],
this._params[1],
this._params[2]
);
$gameParty.gainGold(value);
//If player lost gold, dosen't display anything.
if (value > 0 && SceneManager._scene instanceof Scene_Map) {
SceneManager._scene._window_allMine._count_queue = param.waitTime;
NTMO.Queue.enqueue(
"\\I[" +
param.goldIconNum +
"]\\C[" +
param.itemNameColor +
"]" +
String(value) +
"G\\C[0] " +
param.pickUpGold,
NTMO.SE_TYPE.Gold
);
}
return true;
};
// Change Items
Game_Interpreter.prototype.command126 = function () {
var value = this.operateValue(
this._params[1],
this._params[2],
this._params[3]
);
$gameParty.gainItem($dataItems[this._params[0]], value);
if (value > 0 && SceneManager._scene instanceof Scene_Map) {
SceneManager._scene._window_allMine._count_queue = param.waitTime;
if (param.englishMode === "true") {
if (value === 1) {
NTMO.Queue.enqueue(
"\\I[" +
$dataItems[this._params[0]].iconIndex +
"]" +
param.gettingItemStr +
" a\\C[" +
param.itemNameColor +
"] " +
$dataItems[this._params[0]].name +
"\\C[0] !",
NTMO.SE_TYPE.Item
);
} else {
NTMO.Queue.enqueue(
"\\I[" +
$dataItems[this._params[0]].iconIndex +
"]" +
param.gettingItemStr +
" " +
String(value) +
" \\C[" +
param.itemNameColor +
"] " +
$dataItems[this._params[0]].name +
"s \\C[0]!",
NTMO.SE_TYPE.Item
);
}
} else {
NTMO.Queue.enqueue(
"\\I[" +
$dataItems[this._params[0]].iconIndex +
"]\\C[" +
param.itemNameColor +
"]" +
$dataItems[this._params[0]].name +
"\\C[0]を\\C[" +
param.itemNameColor +
"]" +
String(value) +
"\\C[0]" +
param.gettingItemStr,
NTMO.SE_TYPE.Item
);
}
}
return true;
};
// Change Weapons
Game_Interpreter.prototype.command127 = function () {
var value = this.operateValue(
this._params[1],
this._params[2],
this._params[3]
);
$gameParty.gainItem($dataWeapons[this._params[0]], value, this._params[4]);
if (value > 0 && SceneManager._scene instanceof Scene_Map) {
SceneManager._scene._window_allMine._count_queue = param.waitTime;
if (param.englishMode === "true") {
if (value === 1) {
NTMO.Queue.enqueue(
"\\I[" +
$dataWeapons[this._params[0]].iconIndex +
"]" +
param.gettingItemStr +
" a\\C[" +
param.itemNameColor +
"] " +
$dataWeapons[this._params[0]].name +
"\\C[0] !",
NTMO.SE_TYPE.Weapon
);
} else {
NTMO.Queue.enqueue(
"\\I[" +
$dataWeapons[this._params[0]].iconIndex +
"]" +
param.gettingItemStr +
" " +
String(value) +
" \\C[" +
param.itemNameColor +
"] " +
$dataWeapons[this._params[0]].name +
"s \\C[0]!",
NTMO.SE_TYPE.Weapon
);
}
} else {
NTMO.Queue.enqueue(
"\\I[" +
$dataWeapons[this._params[0]].iconIndex +
"]\\C[" +
param.itemNameColor +
"]" +
$dataWeapons[this._params[0]].name +
"\\C[0]を\\C[" +
param.itemNameColor +
"]" +
String(value) +
"\\C[0]" +
param.gettingItemStr,
NTMO.SE_TYPE.Weapon
);
}
}
return true;
};
// Change Armors
Game_Interpreter.prototype.command128 = function () {
var value = this.operateValue(
this._params[1],
this._params[2],
this._params[3]
);
$gameParty.gainItem($dataArmors[this._params[0]], value, this._params[4]);
if (value > 0 && SceneManager._scene instanceof Scene_Map) {
SceneManager._scene._window_allMine._count_queue = param.waitTime;
if (param.englishMode === "true") {
if (value === 1) {
NTMO.Queue.enqueue(
"\\I[" +
$dataArmors[this._params[0]].iconIndex +
"]" +
param.gettingItemStr +
" a\\C[" +
param.itemNameColor +
"] " +
$dataArmors[this._params[0]].name +
"\\C[0] !",
NTMO.SE_TYPE.Armor
);
} else {
NTMO.Queue.enqueue(
"\\I[" +
$dataArmors[this._params[0]].iconIndex +
"]" +
param.gettingItemStr +
" " +
String(value) +
" \\C[" +
param.itemNameColor +
"] " +
$dataItems[this._params[0]].name +
"s \\C[0]!",
NTMO.SE_TYPE.Armor
);
}
} else {
NTMO.Queue.enqueue(
"\\I[" +
$dataArmors[this._params[0]].iconIndex +
"]\\C[" +
param.itemNameColor +
"]" +
$dataArmors[this._params[0]].name +
"\\C[0]を\\C[" +
param.itemNameColor +
"]" +
String(value) +
"\\C[0]" +
param.gettingItemStr,
NTMO.SE_TYPE.Armor
);
}
}
return true;
};
})();

View file

@ -0,0 +1,90 @@
//=============================================================================
// AltMenuScreen.js
//=============================================================================
/*:
* @plugindesc Alternative menu screen layout.
* @author Yoji Ojima
*
* @help This plugin does not provide plugin commands.
*/
/*:ja
* @plugindesc メニュー画面のレイアウトを変更します
* @author Yoji Ojima
*
* @help このプラグインにはプラグインコマンドはありません
*/
(function () {
var _Scene_Menu_create = Scene_Menu.prototype.create;
Scene_Menu.prototype.create = function () {
_Scene_Menu_create.call(this);
this._statusWindow.x = 0;
this._statusWindow.y = this._commandWindow.height;
this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width;
};
Window_MenuCommand.prototype.windowWidth = function () {
return Graphics.boxWidth;
};
Window_MenuCommand.prototype.maxCols = function () {
return 4;
};
Window_MenuCommand.prototype.numVisibleRows = function () {
return 2;
};
Window_MenuStatus.prototype.windowWidth = function () {
return Graphics.boxWidth;
};
Window_MenuStatus.prototype.windowHeight = function () {
var h1 = this.fittingHeight(1);
var h2 = this.fittingHeight(2);
return Graphics.boxHeight - h1 - h2;
};
Window_MenuStatus.prototype.maxCols = function () {
return 4;
};
Window_MenuStatus.prototype.numVisibleRows = function () {
return 1;
};
Window_MenuStatus.prototype.drawItemImage = function (index) {
var actor = $gameParty.members()[index];
var rect = this.itemRectForText(index);
var w = Math.min(rect.width, 144);
var h = Math.min(rect.height, 144);
var lineHeight = this.lineHeight();
this.changePaintOpacity(actor.isBattleMember());
this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h);
this.changePaintOpacity(true);
};
Window_MenuStatus.prototype.drawItemStatus = function (index) {
var actor = $gameParty.members()[index];
var rect = this.itemRectForText(index);
var x = rect.x;
var y = rect.y;
var width = rect.width;
var bottom = y + rect.height;
var lineHeight = this.lineHeight();
this.drawActorName(actor, x, y + lineHeight * 0, width);
this.drawActorLevel(actor, x, y + lineHeight * 1, width);
this.drawActorClass(actor, x, bottom - lineHeight * 4, width);
this.drawActorHp(actor, x, bottom - lineHeight * 3, width);
this.drawActorMp(actor, x, bottom - lineHeight * 2, width);
this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);
};
var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize;
Window_MenuActor.prototype.initialize = function () {
_Window_MenuActor_initialize.call(this);
this.y = this.fittingHeight(2);
};
})();

View file

@ -0,0 +1,132 @@
//=============================================================================
// AltSaveScreen.js
//=============================================================================
/*:
* @plugindesc Alternative save/load screen layout.
* @author Yoji Ojima
*
* @help This plugin does not provide plugin commands.
*/
/*:ja
* @plugindesc セーブロード画面のレイアウトを変更します
* @author Yoji Ojima
*
* @help このプラグインにはプラグインコマンドはありません
*/
(function () {
var _Scene_File_create = Scene_File.prototype.create;
Scene_File.prototype.create = function () {
_Scene_File_create.call(this);
this._listWindow.height = this._listWindow.fittingHeight(8);
var x = 0;
var y = this._listWindow.y + this._listWindow.height;
var width = Graphics.boxWidth;
var height = Graphics.boxHeight - y;
this._statusWindow = new Window_SavefileStatus(x, y, width, height);
this._statusWindow.setMode(this.mode());
this._listWindow.statusWindow = this._statusWindow;
this._listWindow.callUpdateHelp();
this.addWindow(this._statusWindow);
};
var _Scene_File_start = Scene_File.prototype.start;
Scene_File.prototype.start = function () {
_Scene_File_start.call(this);
this._listWindow.ensureCursorVisible();
this._listWindow.callUpdateHelp();
};
Window_SavefileList.prototype.windowWidth = function () {
return Graphics.boxWidth;
};
Window_SavefileList.prototype.maxCols = function () {
return 4;
};
Window_SavefileList.prototype.numVisibleRows = function () {
return 5;
};
Window_SavefileList.prototype.spacing = function () {
return 8;
};
Window_SavefileList.prototype.itemHeight = function () {
return this.lineHeight() * 2;
};
var _Window_SavefileList_callUpdateHelp =
Window_SavefileList.prototype.callUpdateHelp;
Window_SavefileList.prototype.callUpdateHelp = function () {
_Window_SavefileList_callUpdateHelp.call(this);
if (this.active && this.statusWindow) {
this.statusWindow.setId(this.index() + 1);
}
};
function Window_SavefileStatus() {
this.initialize.apply(this, arguments);
}
Window_SavefileStatus.prototype = Object.create(Window_Base.prototype);
Window_SavefileStatus.prototype.constructor = Window_SavefileStatus;
Window_SavefileStatus.prototype.initialize = function (x, y, width, height) {
Window_Base.prototype.initialize.call(this, x, y, width, height);
this._id = 1;
};
Window_SavefileStatus.prototype.setMode = function (mode) {
this._mode = mode;
};
Window_SavefileStatus.prototype.setId = function (id) {
this._id = id;
this.refresh();
};
Window_SavefileStatus.prototype.refresh = function () {
this.contents.clear();
var id = this._id;
var valid = DataManager.isThisGameFile(id);
var info = DataManager.loadSavefileInfo(id);
var rect = this.contents.rect;
this.resetTextColor();
if (this._mode === "load") {
this.changePaintOpacity(valid);
}
this.drawFileId(id, rect.x, rect.y);
if (info) {
this.changePaintOpacity(valid);
this.drawContents(info, rect, valid);
this.changePaintOpacity(true);
}
};
Window_SavefileStatus.prototype.drawFileId = function (id, x, y) {
this.drawText(TextManager.file + " " + id, x, y, 180);
};
Window_SavefileStatus.prototype.drawContents = function (info, rect, valid) {
var bottom = rect.y + rect.height;
var playtimeY = bottom - this.lineHeight();
this.drawText(info.title, rect.x + 192, rect.y, rect.width - 192);
if (valid) {
this.drawPartyfaces(info, rect.x, bottom - 144);
}
this.drawText(info.playtime, rect.x, playtimeY, rect.width, "right");
};
Window_SavefileStatus.prototype.drawPartyfaces = function (info, x, y) {
if (info && info.faces) {
for (var i = 0; i < info.faces.length; i++) {
var data = info.faces[i];
this.drawFace(data[0], data[1], x + i * 150, y);
}
}
};
})();

782
www/js/plugins/AnTares.js Normal file
View file

@ -0,0 +1,782 @@
//=============================================================================
// AnTares.js
//=============================================================================
/*:ja
* @plugindesc ver1.07 パラムフッリワーケシステム
* @author まっつUP
*
* @param useval
* @desc このIDの変数に配列を入れて
* ポイントを実現します
* @type variable
* @default 10
*
* @param argvalue
* @desc このIDの変数はプラグインコマンドの引数に使われます
* @type variable
* @default 11
*
* @param plusup
* @desc 基本能力値ID順に能力上昇値を決めます
* @default 10 10 1 1 1 1 1 1
*
* @param pluscost
* @desc 基本能力値ID順に能力上昇に必要なコストを決めます
* @default 50 50 10 10 10 10 10 10
*
* @param plusmax
* @desc 基本能力値ID順に上昇能力限界値を決めます
* @default 100 100 10 10 10 10 10 10
*
* @param rateS
* @desc そのアクターのこのIDのステート有効度で
* ポイント加算率を指定できます
* @type state
* @default 5
*
* @param helptext
* @desc アクター選択時ヘルプウインドウに表示する内容です
* このパラメータのIDのスキルの説明文を用います
* @type skill
* @default 1
*
* @param smiletext
* @desc ポイント残高の文字列です
* @default P
*
* @param maxtext
* @desc 加算値が上限以上の時の文字列です
* @default 上限です
*
* @param resettext
* @desc ポイントリセット用の文字列です
* @default ポイントリセット
*
* @param comtext
* @desc 表示するメニューコマンド名
* @default egao
*
* @param display
* @desc このIDのスイッチがオンの時メニューコマンドにバインドします
* @type switch
* @default 10
*
* @param completion
* @desc ONの時このプラグインやアイテムの使用効果によって
* mhpまたはmmpが元より大きくなったときその差分回復します
* @type boolean
* @default false
*
* @param selectEnable
* @desc アクターを選択した時振り分けウインドウの
* インデックスは有効なものが選択される
* @type boolean
* @default true
*
* @param okname
* @desc 決定音のファイル名
* @type file
* @require 1
* @dir audio/se
* @default Decision2
*
* @param okvolume
* @desc 決定音のvolume
* @default 90
*
* @param okpitch
* @desc 決定音のpitch
* @default 100
*
* @param okpan
* @desc 決定音のpan
* @default 0
*
* @help
*
* RPGで笑顔を
*
* このヘルプとパラメータの説明をよくお読みになってからお使いください
*
* プラグインコマンド
* command:ATGrowing
* args:
*
* パラムフッリワーケシステムのためのシーンを呼び出します
* このシーンはこのプラグインで追加されるメニューコマンドからも呼び出せます
* 引数はありませんのでcommandのみをプラグインコマンドに記入してください
*
* プラグインコマンド
* command:ATinit
* args:
*
* こちらも引数のないプラグインコマンドです
* これはusevalのIDの変数にシーン用に初期化された配列を生成します
*
* プラグインコマンド
* command:ATdevide
* args:0 idゲーム変数ID
* 1 id2以下の説明を参照
* 2 true or false
*
* システムで使うためのコストの操作をします
* ゲーム変数idの値をid2の基準に従って振り分けます
* このとき2番目の引数にtrueを指定すると
* 基準によりますが対象者の数で割って振り分けます
* falseの場合は全て垂れ流しです
* そのアクターのrateSのステート有効度で影響度を上げたり下げたりできます
* またゲーム変数idの値は変化しません
*
* id2に使うことのできる文字列
* A:全てのアクター
* B:バトルメンバー
* C:argvalueのIDの変数の値と一致するクラスIDを持ったパーティメンバーのアクター
*  これには振り分け効果は無効です
* L:パーティメンバーの内最後尾のアクター
* P:パーティメンバー
* S:パーティメンバーの内argvalueのIDの変数の値のIDのステートが付加されたアクター
* これには振り分け効果は無効です
* V:IDがargvalueのIDの変数の値と一致するアクター
*
* ATdevide 50 B true
* ID50の変数の値をコストポイントとしてバトルメンバーに振り分けします
*
* この操作によって要素に値が設定される場合値は0~9999999の間に収まります
* シーンを開くときも同様の値の制御がなされます
*
* パラムフッリワーケシステムについて
* 実際にシーンで扱うことができるのはパーティメンバーです
* パーティメンバーを選択すると能力値用のウインドウが開きます
*
* 以下の条件を満足する能力値のみ選択可能です
* 能力値の装備を除いた加算値が当プラグイン設定の上限未満
* 上昇に必要なポイントコストがそのアクターの所有ポイント以下
*
* 能力値を選択次第そのアクターの所有ポイントよりポイントコストが支払われ
* そのアクターの能力値が大きくなります
*
* ポイントリセットについて
* アクターの現在の能力値毎に加算値を0にして
* その差が0以上なら加算コストとの比率計算を行います
* その合計値をアクターの所有ポイントに加算します
* なおパラメータresettextに記述がない場合は機能は使えません
*
* このプラグインを利用する場合は
* readmeなどにまっつUPの名を入れてください
* また素材のみの販売はダメです
* 上記以外の規約等はございません
* もちろんツクールMVで使用する前提です
* 何か不具合ありましたら気軽にどうぞ
*
* ver1.01 選択の可否で能力値の項目の不透明度が変わるようにしました
* ver1.02 レイアウトの微調整
* ver1.03 加算値部分のレイアウトの変更能力値加算処理の微調整
* ver1.04 ポイントリセットの実装
* ver1.05 所持ポイントと消費ポイントが同じの場合項目が有効にならない不具合を修正
* ver1.06 キャラクターグラフィックのロードがうまくいっていない不具合を修正
* パラメータのリセット時パラメータがおかしくなる可能性を排除
* その他パラメータ設定の追加改善コードの整理等
* ver1.07 0除算されるのを修正パラメータの追加
*
* 免責事項
* このプラグインを利用したことによるいかなる損害も制作者は一切の責任を負いません
*
*/
(function () {
var parameters = PluginManager.parameters("AnTares");
var ATuseval = Number(parameters["useval"] || 10);
var ATargvalue = Number(parameters["argvalue"] || 11);
var calconly = 0; //ループ計算用変数の先定義
var ATplusup = String(parameters["plusup"]);
ATplusup = ATplusup.split(" ");
for (var i = 0; i < ATplusup.length; ++i) {
calconly = Number(ATplusup[i] || 1);
ATplusup[i] = Math.abs(calconly);
}
var ATpluscost = String(parameters["pluscost"]);
ATpluscost = ATpluscost.split(" ");
for (var i = 0; i < ATpluscost.length; ++i) {
calconly = Number(ATpluscost[i] || 1);
ATpluscost[i] = Math.abs(calconly);
}
var ATplusmax = String(parameters["plusmax"]);
ATplusmax = ATplusmax.split(" ");
for (var i = 0; i < ATplusmax.length; ++i) {
calconly = Number(ATplusmax[i] || 0);
ATplusmax[i] = Math.abs(calconly);
}
var ATrateS = Number(parameters["rateS"] || 5);
var AThelptext = Number(parameters["helptext"] || 1);
var ATsmiletext = String(parameters["smiletext"] || "P");
var ATmaxtext = String(parameters["maxtext"] || "上限です");
var ATresettext = String(parameters["resettext"]);
var ATcomtext = String(parameters["comtext"] || "egao");
var ATdisplay = Number(parameters["display"] || 10);
var ATcompletion = parameters["completion"] === "true";
var ATselectEnable = parameters["selectEnable"] === "true";
var ATokname = String(parameters["okname"] || "Decision2");
var ATokvolume = Number(parameters["okvolume"] || 90);
var ATokpitch = Number(parameters["okpitch"] || 100);
var ATokpan = Number(parameters["okpan"] || 0);
var ATplayok = {
name: ATokname,
pan: ATokpan,
pitch: ATokpitch,
volume: ATokvolume,
};
//Game
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
switch (command) {
case "ATGrowing":
SceneManager.push(Scene_ATGrowing);
break;
case "ATdevide":
$gameVariables.ATdevide(args[0], args[1], args[2]);
break;
case "ATinit":
$gameVariables.ATinit();
break;
}
};
Game_Variables.prototype.ATdevide = function (id, id2, devide) {
if (!this._data[ATuseval]) this.ATinit();
var val1 = this.value(id);
var val2 = 0;
var party = 1;
var calc = true;
var actid = 0;
devide = eval(devide);
switch (id2) {
case "A":
party = $dataActors.length - 1;
val2 = 1;
break;
case "B":
party = $gameParty.battleMembers().length;
break;
case "C":
party = $gameParty.size();
calc = "this.value(ATargvalue) == $gameActors._data[actid]._classId";
devide = false;
break;
case "L":
var backactor = $gameParty.size() - 1;
actid = $gameParty.members()[backactor].actorId();
val2 = 2;
break;
case "P":
party = $gameParty.size();
break;
case "S":
party = $gameParty.size();
calc =
"$gameActors.actor(actid).isStateAffected(this.value(ATargvalue))";
devide = false;
break;
case "V":
actid = this.value(ATargvalue);
val2 = 2;
break;
default:
console.log("引数id2が間違っています。");
return;
}
if (devide) val1 = Math.floor(val1 / party);
for (var i = 0; i < party; i++) {
if (val2 == 0) {
actid = $gameParty.members()[i].actorId();
} else if (val2 == 1) {
actid = i + 1;
}
if (eval(calc)) {
this._data[ATuseval][actid] +=
val1 * $gameActors.actor(actid).stateRate(ATrateS);
}
}
this.ATallclamp();
};
Game_Variables.prototype.ATinit = function () {
this._data[ATuseval] = [];
for (var i = 0; i < $dataActors.length; i++) {
this._data[ATuseval][i] = 0;
}
};
Game_Variables.prototype.ATallclamp = function () {
if (!this._data[ATuseval]) this.ATinit();
var value;
var value2;
for (var i = 0; i < this._data[ATuseval].length; i++) {
value = this._data[ATuseval][i];
value2 = Math.round(value.clamp(0, 9999999));
this._data[ATuseval][i] = value2;
}
};
if (ATcompletion) {
var _Game_BattlerBase_addParam = Game_BattlerBase.prototype.addParam;
Game_BattlerBase.prototype.addParam = function (paramId, value) {
if (value > 0) {
if (paramId === 0) {
this._hp = this._hp + value;
} else if (paramId === 1) {
this._mp = this._mp + value;
}
}
_Game_BattlerBase_addParam.call(this, paramId, value);
};
}
//装備を除いた加算値の計算
Game_Actor.prototype.ATparamPlus = function (paramId) {
var value = Game_Battler.prototype.paramPlus.call(this, paramId);
return value;
};
//Scene
function Scene_ATGrowing() {
this.initialize.call(this);
}
Scene_ATGrowing.prototype = Object.create(Scene_MenuBase.prototype);
Scene_ATGrowing.prototype.constructor = Scene_ATGrowing;
Scene_ATGrowing.prototype.initialize = function () {
Scene_MenuBase.prototype.initialize.apply(this, arguments);
$gameVariables.ATallclamp();
};
Scene_ATGrowing.prototype.create = function () {
Scene_MenuBase.prototype.create.call(this);
this.createHelpWindow();
this.createATSelActWindow();
this.createViewActWindow();
this.createWakeWindow();
};
Scene_ATGrowing.prototype.start = function () {
Scene_MenuBase.prototype.start.call(this);
};
Scene_ATGrowing.prototype.createHelpWindow = function () {
this._helpWindow = new Window_Help();
this.addWindow(this._helpWindow);
};
Scene_ATGrowing.prototype.createATSelActWindow = function () {
this._actorWindow = new Window_ATSelAct(0, 0, 0, 0); //Selectable
this._actorWindow.setHelpWindow(this._helpWindow);
var load = this._actorWindow;
var i = 0;
var waiter = setInterval(function () {
load.refresh();
i++;
if (i > 2) clearInterval(waiter);
}, 120);
this._actorWindow.y = this._helpWindow.height;
this._actorWindow.width = Graphics.boxWidth;
this._actorWindow.height = Graphics.boxHeight - this._helpWindow.height;
this._actorWindow.setHandler("ok", this.onselOk.bind(this));
this._actorWindow.setHandler("cancel", this.popScene.bind(this));
this.addWindow(this._actorWindow);
this._actorWindow.refresh();
this._actorWindow.select(0);
};
Scene_ATGrowing.prototype.createViewActWindow = function () {
this._viewWindow = new Window_ViewAct(0, 0); //Base
this.addWindow(this._viewWindow);
};
Scene_ATGrowing.prototype.createWakeWindow = function () {
this._wakeWindow = new Window_Wake(0, 0, 0, 0); //Selectable
this._wakeWindow.y = this._viewWindow.height;
this._wakeWindow.width = Graphics.boxWidth;
this._wakeWindow.setHandler("ok", this.onwakeOk.bind(this));
this._wakeWindow.setHandler("cancel", this.wakecancel.bind(this));
this.addWindow(this._wakeWindow);
};
Scene_ATGrowing.prototype.onselOk = function () {
var actor = $gameParty.members()[this._actorWindow._index];
this._helpWindow.hide();
this._actorWindow.hide();
this._viewWindow.setActor(actor);
this._wakeWindow.setActor(actor);
this._wakeWindow.activate();
this._viewWindow.show();
this._wakeWindow.show();
};
Scene_ATGrowing.prototype.wakecancel = function () {
this._viewWindow.hide();
this._wakeWindow.hide();
this._actorWindow.activate();
this._actorWindow.refresh();
this._actorWindow.select(0);
this._helpWindow.show();
this._actorWindow.show();
};
Scene_ATGrowing.prototype.onwakeOk = function () {
var index = this._wakeWindow._index;
var actor = this._wakeWindow._actor;
var point = $gameVariables._data[ATuseval][actor.actorId()];
if (ATresettext && index == this._wakeWindow.maxItems() - 1) {
var sum = 0;
for (var i = 0; i < index; i++) {
var value = actor.ATparamPlus(i);
var up = this._wakeWindow.Upper(i);
var cost = this._wakeWindow.CostOut(i);
if (value <= 0 || up == 0) continue;
value /= up;
value *= cost;
sum += value;
}
sum = Math.round(sum);
$gameVariables._data[ATuseval][actor.actorId()] = point + sum;
actor.clearParamPlus();
actor.refresh();
} else {
var cost = this._wakeWindow.CostOut(index);
var up = this._wakeWindow.Upper(index);
up = Math.min(
up,
this._wakeWindow.Plusmax(index) - actor.ATparamPlus(index)
);
$gameVariables._data[ATuseval][actor.actorId()] = point - cost;
actor.addParam(index, up);
}
this._viewWindow.refresh();
this._wakeWindow.activate();
this._wakeWindow.refresh();
};
var _Scene_Menu_createCommandWindow =
Scene_Menu.prototype.createCommandWindow;
Scene_Menu.prototype.createCommandWindow = function () {
_Scene_Menu_createCommandWindow.call(this);
this._commandWindow.setHandler("atgrow", this.commandGrow.bind(this));
};
Scene_Menu.prototype.commandGrow = function () {
SceneManager.push(Scene_ATGrowing);
};
//Window
Window_Base.prototype.ATdrawActorPoint = function (actor, x, y, width) {
width = width || 160;
this.changeTextColor(this.tpCostColor());
this.drawText(ATsmiletext, x, y, width);
this.resetTextColor();
this.drawText(
$gameVariables._data[ATuseval][actor.actorId()],
x + 50,
y,
width
);
};
Window_Base.prototype.ATdrawCurrent = function (current, max, x, y, width) {
this.resetTextColor();
var valueWidth = this.textWidth("0000");
var slashWidth = this.textWidth("/");
var x1 = x + width - valueWidth;
var x2 = x1 - slashWidth;
var x3 = x2 - valueWidth;
this.drawText(current, x3, y, valueWidth, "right");
this.drawText("/", x2, y, slashWidth, "right");
this.drawText(max, x1, y, valueWidth, "right");
};
var _Window_MenuCommand_addOriginalCommands =
Window_MenuCommand.prototype.addOriginalCommands;
Window_MenuCommand.prototype.addOriginalCommands = function () {
_Window_MenuCommand_addOriginalCommands.call(this);
if (this.isATGrowDisplay()) {
var enabled = this.isATGrowEnabled();
this.addCommand(ATcomtext, "atgrow", enabled);
}
};
Window_MenuCommand.prototype.isATGrowDisplay = function () {
return $gameSwitches.value(ATdisplay) > 0; //つまりスイッチの真偽を返す。
};
Window_MenuCommand.prototype.isATGrowEnabled = function () {
return $gameParty.size() > 0;
};
function Window_ATSelAct() {
this.initialize.apply(this, arguments);
}
Window_ATSelAct.prototype = Object.create(Window_Selectable.prototype);
Window_ATSelAct.prototype.constructor = Window_ATSelAct;
Window_ATSelAct.prototype.initialize = function (x, y, width, height) {
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
this.activate();
};
Window_ATSelAct.prototype.maxItems = function () {
return $gameParty.size();
};
Window_ATSelAct.prototype.itemHeight = function () {
return 48;
};
Window_ATSelAct.prototype.isCurrentItemEnabled = function () {
return this.isEnabled(this._list[this._index]); //indexのactorを取得
};
Window_ATSelAct.prototype.isEnabled = function (actor) {
return actor.isAlive();
};
Window_ATSelAct.prototype.drawItem = function (index) {
var rect = this.itemRect(index);
var actor = this._list[index];
this.changePaintOpacity(this.isEnabled(actor));
this.drawActorCharacter(actor, rect.x + 48, rect.y + 48);
this.drawActorName(actor, rect.x + 120, rect.y);
this.drawActorLevel(actor, rect.x + 320, rect.y);
this.ATdrawActorPoint(actor, rect.x + 520, rect.y);
this.changePaintOpacity(1);
};
Window_ATSelAct.prototype.updateHelp = function () {
this.setHelpWindowItem($dataSkills[AThelptext]);
};
Window_ATSelAct.prototype.refresh = function () {
var i, actor;
this._list = [];
for (i = 0; i < $gameParty.size(); i++) {
actor = $gameParty.members()[i];
this._list.push(actor);
}
this.createContents();
this.drawAllItems();
};
function Window_ViewAct() {
this.initialize.apply(this, arguments);
}
Window_ViewAct.prototype = Object.create(Window_Base.prototype);
Window_ViewAct.prototype.constructor = Window_ViewAct;
Window_ViewAct.prototype.initialize = function (x, y) {
var width = this.windowWidth();
var height = this.windowHeight();
Window_Base.prototype.initialize.call(this, x, y, width, height);
this._actor = null;
this.hide();
};
Window_ViewAct.prototype.setActor = function (actor) {
if (this._actor !== actor) {
this._actor = actor;
this.refresh();
}
};
Window_ViewAct.prototype.windowWidth = function () {
return Graphics.boxWidth;
};
Window_ViewAct.prototype.windowHeight = function () {
return this.fittingHeight(2);
};
Window_ViewAct.prototype.refresh = function () {
var x = this.textPadding();
var actor = this._actor;
this.contents.clear();
this.drawActorCharacter(actor, x + 48, 56);
this.drawActorName(actor, x + 120, 16);
this.drawActorLevel(actor, x + 320, 16);
this.ATdrawActorPoint(actor, x + 520, 16);
};
function Window_Wake() {
this.initialize.apply(this, arguments);
}
Window_Wake.prototype = Object.create(Window_Selectable.prototype);
Window_Wake.prototype.constructor = Window_Wake;
Window_Wake.prototype.initialize = function (x, y, width, height) {
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
this._actor = null;
this.hide();
};
Window_Wake.prototype.setActor = function (actor) {
if (this._actor !== actor) {
this._actor = actor;
this.selectEnable(actor);
this.height = this.fittingHeight(this.maxRows());
this.refresh();
}
};
//必要な時に更新される。
Window_Wake.prototype.maxItems = function () {
if (!this._actor) return 1;
var a = ATresettext ? 1 : 0;
return Math.min(ATplusup.length, 8) + a;
};
Window_Wake.prototype.selectEnable = function (actor) {
if (!ATselectEnable) {
this.select(0);
return;
}
var a = 0;
for (var i = 0; i < ATplusup.length; i++) {
if (this.isEnabled(actor, i)) {
a = i;
break;
}
}
this.select(a);
};
Window_Wake.prototype.maxCols = function () {
return 1;
};
Window_Wake.prototype.maxRows = function () {
return this.maxItems();
};
Window_Wake.prototype.isCurrentItemEnabled = function () {
var index = this._index;
return this.isEnabled(this._actor, index);
};
Window_Wake.prototype.isEnabled = function (actor, index) {
if (ATresettext && index == this.maxItems() - 1) return true;
var point = $gameVariables._data[ATuseval][actor.actorId()];
return this.CostOut(index) <= point && this.ATnomax(index, actor);
};
Window_Wake.prototype.Upper = function (index) {
return ATplusup[index];
};
Window_Wake.prototype.CostOut = function (index) {
return ATpluscost[index];
};
Window_Wake.prototype.Plusmax = function (index) {
return ATplusmax[index];
};
Window_Wake.prototype.ATnomax = function (index, actor) {
return this.Plusmax(index) > actor.ATparamPlus(index);
};
Window_Wake.prototype.drawItem = function (index) {
var rect = this.itemRect(index);
var actor = this._actor;
if (ATresettext && index == this.maxItems() - 1) {
this.changeTextColor(this.mpGaugeColor2());
this.drawText(ATresettext, rect.x, rect.y, this.width);
this.resetTextColor();
} else {
this.paramWrite(rect, actor, index);
this.paramCost(rect, actor, index);
}
};
Window_Wake.prototype.paramWrite = function (rect, actor, index) {
var x = rect.x;
var y = rect.y;
var ww = 140;
var value = actor.param(index);
var newvalue = this.Upper(index);
newvalue = Math.min(
newvalue,
this.Plusmax(index) - actor.ATparamPlus(index)
);
this.changePaintOpacity(this.isEnabled(actor, index));
this.changeTextColor(this.systemColor());
this.drawText(TextManager.param(index), x, y, ww);
this.resetTextColor();
this.drawText(value, x + ww, y, 48, "right");
this.drawText("+", x + ww + 80, y, 32, "center");
if (this.ATnomax(index, actor)) {
this.drawText(newvalue, x + ww + 128, y, 48, "right");
} else {
this.drawText(0, x + ww + 128, y, 48, "right");
}
this.changePaintOpacity(1);
};
Window_Wake.prototype.paramCost = function (rect, actor, index) {
var x = rect.x + 380;
var y = rect.y;
var ww = 128;
var current = actor.ATparamPlus(index);
var max = this.Plusmax(index);
if (max > 0) {
var rate = current / max;
} else {
var rate = 0;
}
rate = rate.clamp(0, 1);
this.changeTextColor(this.mpGaugeColor2());
if (this.ATnomax(index, actor)) {
this.drawText(ATsmiletext + " " + this.CostOut(index), x, y, ww);
} else {
this.drawText(ATmaxtext, x, y, ww);
}
this.drawGauge(
x + ww,
y,
ww,
rate,
this.tpGaugeColor1(),
this.tpGaugeColor1()
);
this.ATdrawCurrent(current, max, x + ww, y, ww);
};
Window_Wake.prototype.refresh = function () {
this._list = [];
this.createContents();
this.drawAllItems();
};
Window_Wake.prototype.playOkSound = function () {
AudioManager.playStaticSe(ATplayok);
};
})();

View file

@ -0,0 +1,148 @@
//=============================================================================
// AnimationExtend.js
// ----------------------------------------------------------------------------
// Copyright (c) 2015-2017 Triacontane
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.1.0 2017/08/23 アニメーションの拡大率を動的に設定できる機能を追加
// 1.0.0 2017/04/28 初版
// ----------------------------------------------------------------------------
// [Blog] : https://triacontane.blogspot.jp/
// [Twitter]: https://twitter.com/triacontane/
// [GitHub] : https://github.com/triacontane/
//=============================================================================
/*:
* @plugindesc AnimationExtendPlugin
* @author triacontane
*
* @param RotationVariableId
* @desc 回転角(0-360)を取得するための変数番号
* @default 0
* @type variable
*
* @param FrameVariableId
* @desc アニメーションのフレーム数(1-)を取得するための変数番号
* @default 0
* @type variable
*
* @param ScaleVariableId
* @desc 拡大率(100%)を取得するための変数番号
* @default 0
* @type variable
*
* @help AnimationExtend.js
*
* アニメーションを表示する際の角度やフレーム数を動的に変更できます
* パラメータで指定した番号の変数の値がそれぞれ適用されます
*
* このプラグインにはプラグインコマンドはありません
*
* This plugin is released under the MIT License.
*/
/*:ja
* @plugindesc アニメーション設定拡張プラグイン
* @author トリアコンタン
*
* @param 回転角変数番号
* @desc 回転角(0-360)を取得するための変数番号
* @default 0
* @type variable
*
* @param フレーム数変数番号
* @desc アニメーションのフレーム数(1-)を取得するための変数番号
* デフォルトのフレーム数は4です1フレーム=1/60
* @default 0
* @type variable
*
* @param 拡大率変数番号
* @desc 拡大率(100%)を取得するための変数番号
* @default 0
* @type variable
*
* @help AnimationExtend.js
*
* アニメーションを表示する際の角度やフレーム数を動的に変更できます
* パラメータで指定した番号の変数の値がそれぞれ適用されます
*
* このプラグインにはプラグインコマンドはありません
*
* 利用規約
* 作者に無断で改変再配布が可能で利用形態商用18禁利用等
* についても制限はありません
* このプラグインはもうあなたのものです
*/
(function () {
"use strict";
var pluginName = "AnimationExtend";
//=============================================================================
// ローカル関数
// プラグインパラメータやプラグインコマンドパラメータの整形やチェックをします
//=============================================================================
var getParamString = function (paramNames) {
if (!Array.isArray(paramNames)) paramNames = [paramNames];
for (var i = 0; i < paramNames.length; i++) {
var name = PluginManager.parameters(pluginName)[paramNames[i]];
if (name) return name;
}
return "";
};
var getParamNumber = function (paramNames, min, max) {
var value = getParamString(paramNames);
if (arguments.length < 2) min = -Infinity;
if (arguments.length < 3) max = Infinity;
return (parseInt(value) || 0).clamp(min, max);
};
//=============================================================================
// パラメータの取得と整形
//=============================================================================
var param = {};
param.rotationVariableId = getParamNumber([
"RotationVariableId",
"回転角変数番号",
]);
param.frameVariableId = getParamNumber([
"FrameVariableId",
"フレーム数変数番号",
]);
param.scaleVariableId = getParamNumber(["ScaleVariableId", "拡大率変数番号"]);
//=============================================================================
// Sprite_Animation
// アニメーションの角度を適用します。
//=============================================================================
var _Sprite_Animation_setup = Sprite_Animation.prototype.setup;
Sprite_Animation.prototype.setup = function (
target,
animation,
mirror,
delay
) {
_Sprite_Animation_setup.apply(this, arguments);
var customRotation = $gameVariables.value(param.rotationVariableId);
if (customRotation > 0) {
this.rotation = customRotation / (180 / Math.PI);
}
var customScale = $gameVariables.value(param.scaleVariableId);
if (customScale !== 0) {
this.scale.x = customScale / 100;
this.scale.y = customScale / 100;
}
};
var _Sprite_Animation_setupRate = Sprite_Animation.prototype.setupRate;
Sprite_Animation.prototype.setupRate = function () {
var customRate = $gameVariables.value(param.frameVariableId);
if (customRate > 0) {
this._rate = customRate;
} else {
_Sprite_Animation_setupRate.apply(this, arguments);
}
};
})();

View file

@ -0,0 +1,108 @@
//=============================================================================
// AnimationFrameRate.js
// by Tsukimi
// Last Updated: 2018.02.11
//=============================================================================
/*:en
* @plugindesc AnimationFrameRate
* @author Tsukimi
*
* @param framerate:1
* @desc animation plays 60 animation frame per sec with name start with this symbol
* @default !
*
* @param framerate:2
* @desc animation plays 30 animation frame per sec with name start with this symbol
* @default &
*
* @param framerate:3
* @desc animation plays 20 animation frame per sec with name start with this symbol
* @default $
*
* @param framerate:5
* @desc animation plays 12 animation frame per sec with name start with this symbol
* @default #
*
* @param framerate:6
* @desc animation plays 10 animation frame per sec with name start with this symbol
* @default %
*
* @help
* RPG Maker MV plays animation as
* 4 frame(time)/ 1 animation frame.
* With this plugin, you can adjust the frame rate of each animation.
*
* -----------------
*
*/
/*:ja
* @plugindesc アニメフレームレート
* @author ツキミ
*
* @param framerate:1
* @desc 一秒あたり60フレーム再生したいアニメーションの接頭語
* @default !
*
* @param framerate:2
* @desc 一秒あたり30フレーム再生したいアニメーションの接頭語
* @default &
*
* @param framerate:3
* @desc 一秒あたり20フレーム再生したいアニメーションの接頭語
* @default $
*
* @param framerate:5
* @desc 一秒あたり12フレーム再生したいアニメーションの接頭語
* @default #
*
* @param framerate:6
* @desc 一秒あたり10フレーム再生したいアニメーションの接頭語
* @default %
*
*
* @help
* ツクールMVではデフォルトで
* 1アニメーションフレームに 4フレーム時間かかりますが
* このプラグインを使えばアニメーション毎のフレームレートが設定できます
*
* (デフォ一秒あたり15フレーム再生される)
*
* -----------------
*
*/
(function () {
"use strict";
var pluginName = "AnimationFrameRate";
var getParam = function (paramNames) {
if (!Array.isArray(paramNames)) paramNames = [paramNames];
for (var i = 0; i < paramNames.length; i++) {
var name = PluginManager.parameters(pluginName)[paramNames[i]];
if (name) return name;
}
return "";
};
var FR1 = getParam("framerate:1").substr(0, 1);
var FR2 = getParam("framerate:2").substr(0, 1);
var FR3 = getParam("framerate:3").substr(0, 1);
var FR5 = getParam("framerate:5").substr(0, 1);
var FR6 = getParam("framerate:6").substr(0, 1);
var _Sprite_Animation_setupRate = Sprite_Animation.prototype.setupRate;
Sprite_Animation.prototype.setupRate = function () {
if (!this._animation) {
_Sprite_Animation_setupRate.apply(this, arguments);
return;
}
var initial = this._animation.name.substr(0, 1);
if (initial === FR1) this._rate = 1;
else if (initial === FR2) this._rate = 2;
else if (initial === FR3) this._rate = 3;
else if (initial === FR5) this._rate = 5;
else if (initial === FR6) this._rate = 6;
else _Sprite_Animation_setupRate.apply(this, arguments);
};
})();

View file

@ -0,0 +1,37 @@
//=============================================================================
// BB_StatusMinus999.jp
// Copyright (c) 2016 BB ENTERTAINMENT
//=============================================================================
/*:
* @plugindesc HPとMP以外のステータスの下限を-999にします
* @author ビービー
*
* @help プラグインの説明
* HPとMP以外のステータスの下限を-999にします
* HPの下限は1MPの下限は0です
*
* 利用規約
* このプラグインはMITライセンスのもとで公開されています
* Copyright (c) 2016 BB ENTERTAINMENT
* Released under the MIT License.
* http://opensource.org/licenses/mit-license.php
*
* コンタクト
* BB ENTERTAINMENT Twitter: https://twitter.com/BB_ENTER/
* BB ENTERTAINMENT BLOG : http://bb-entertainment-blog.blogspot.jp/
*/
(function () {
var _Game_BattlerBase_prototype_paramMin =
Game_BattlerBase.prototype.paramMin;
Game_BattlerBase.prototype.paramMin = function (paramId) {
if (paramId === 0) {
return 1; // MHP
} else if (paramId === 1) {
return 0; // MMP
} else {
return -999;
}
};
})();

112
www/js/plugins/BMSP.js Normal file
View file

@ -0,0 +1,112 @@
//=============================================================================
// BMSP.js (BMSPベースプラグイン)
//=============================================================================
/*:
* @plugindesc BMSPベースプラグインです
* @author gentlawk
* @website http://blueredzone.com
* @url https://github.com/gentlawk/BMSP_MV
* @license
* Copyright(c) 2015 BlueRedZone, gentlawk
* Released under the MIT license
* https://github.com/gentlawk/BMSP_MV/blob/master/LICENSE
*
* @version 1.11
*
* @help
* 使用方法:
* BMSPプラグインシリーズのベースとなるプラグインです
*
* 追加位置
* 全てのBMSPプラグインシリーズより上に配置してください
*/
function BMSP() {
throw new Error("This is a static class");
}
/*
* プラグインの導入チェック
*/
PluginManager._versions = {};
PluginManager.version = function (name) {
if (!(name.toLowerCase() in this._versions)) return 0;
return this._versions[name.toLowerCase()];
};
PluginManager.setVersion = function (name, version) {
this._versions[name.toLowerCase()] = version;
};
BMSP.checkPluginName = function (name) {
return PluginManager._scripts.indexOf(name) >= 0;
};
BMSP.checkPluginVersion = function (name, version) {
var now = PluginManager.version(name);
return now >= version;
};
BMSP.includedPlugin = function (name, version) {
if (!this.checkPluginName(name)) return false;
if (version === undefined) return true;
return this.checkPluginVersion(name, version);
};
BMSP.requirePlugin = function (name, version) {
if (!this.checkPluginName(name)) {
throw new Error("no such plugin: " + name);
}
if (version === undefined) return;
if (!this.checkPluginVersion(name, version)) {
var now = PluginManager.version(name);
throw new Error(
"need version " + version + " and over: " + name + " version " + now
);
}
};
/*
* プラグインバージョン
*/
PluginManager.setVersion("BMSP", 1.11);
/*
* オブジェクトのユニークID管理
*/
BMSP.getUniqueId = function () {
return new Date().getTime() + Math.floor(Math.random() * 1000);
};
BMSP.getObjectId = function (object) {
if (!object) {
return 0;
}
if (!("_bmsp_object_id" in object)) {
object._bmsp_object_id = BMSP.getUniqueId();
}
return object._bmsp_object_id;
};
/*
* Ruby(他Perl等)ライクな剰余演算
*/
BMSP.rubyLikeMod = function (a, b) {
return ((a % b) + b) % b;
};
/*
* シャローコピー
*/
BMSP.shallowCopy = function (object) {
if (object instanceof Array) {
return [].concat(object);
}
var copy = {};
for (var prop in object) {
copy[prop] = object[prop];
}
return copy;
};

View file

@ -0,0 +1,280 @@
//=============================================================================
// BMSP_MapFog.js (マップフォグ)
//=============================================================================
/*:
* @plugindesc マップにフォグを表示します
* @author gentlawk
* @website http://blueredzone.com
* @url https://github.com/gentlawk/BMSP_MV
* @license
* Copyright(c) 2015 BlueRedZone, gentlawk
* Released under the MIT license
* https://github.com/gentlawk/BMSP_MV/blob/master/LICENSE
*
* @version 1.03
*
* @param Label
* @desc マップフォグメモのラベルです
* @default フォグ
*
* @help
* マップのメモ:
* <フォグ%n%:%name%, %sx%, %sy%, %opacity%, %z%, %blend%, %switchies%> # マップにフォグを追加します
* - %n% : フォグの番号です1以上の整数を指定してください
* - %name% : 使用するファイル名です(初期値: '')
* - %sx% : X方向のスピードです(初期値: 0)
* - %sy% : Y方向のスピードです(初期値: 0)
* - %opacity% : 不透明度です(初期値: 255)
* - %z% : Z座標です0が遠景直上1がピクチャ直下2がピクチャ直上です(初期値: 1)
* - %blend% : 合成方法です0が通常1が加算です(初期値: 1)
* - %switchies% : 表示条件スイッチIDリストです条件にしたいスイッチのIDを:区切りで指定します(初期値: 指定無し常に表示)
* メモのラベルはパラメータで変更可能です
* フォグ番号はマップごとに1から順番に存在しなければなりません
* %n%以外の各パラメータは省略可能です省略した場合初期値が使用されます
*  また省略したパラメータ以降のパラメータも全て省略しなければなりません
*
* プラグインコマンド:
* MapFog %n% name %value% # フォグ番号%n%に使用するファイルを%value%に変更します
* MapFog %n% sx %value% # フォグ番号%n%のX方向速度を%value%に変更します
* MapFog %n% sy %value% # フォグ番号%n%のY方向速度を%value%に変更します
* MapFog %n% opacity %value% # フォグ番号%n%の不透明度を%value%に変更します
* MapFog %n% blend %value% # フォグ番号%n%の合成方法を%value%に変更します
* MapFog %n% visible %value% # フォグ番号%n%%value%が1で表示0で非表示にします
*
* 使用方法:
* マップのメモにフォグ設定を記述するとマップにフォグを表示できます
* 1つのマップに表示するフォグの数は任意ですがフォグ番号は1から順番にふる必要があります
* フォグの表示条件はマップ移動時のみ判定されます
* 同一マップ上でフォグの表示を切り替える場合はプラグインコマンドを使用して下さい
* マップフォグ画像は以下のディレクトリに配置してください(fogsディレクトリは新規作成してください)
* img/fogs
*
* 使用例
* フォグを表示
* <フォグ1:fogfile>
*
* フォグを2つ表示
* <フォグ1:fogfile1,1,0,255>
* <フォグ2:fogfile2,0,0,255,0,0>
*
* スイッチ10がONの時フォグを表示
* <フォグ1:fogfile,0,0,255,1,1,10>
*
* スイッチ10がONの時フォグ1をスイッチ10と20がONの時フォグ2を表示
* <フォグ1:fogfile1,0,0,255,1,1,10>
* <フォグ2:fogfile2,0,0,255,1,1,10:20>
*/
(function () {
/*
* プラグインバージョン
*/
PluginManager.setVersion("BMSP_MapFog", 1.03);
/*
* 必須プラグインチェック
*/
var _Scene_Boot_start = Scene_Boot.prototype.start;
Scene_Boot.prototype.start = function () {
BMSP.requirePlugin("BMSP", 1.0);
_Scene_Boot_start.call(this);
};
/*
* プラグインコマンド
*/
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (command === "MapFog") {
$gameMap.setFogParameter(args[1], Number(args[0]), args[2]);
}
};
/*
* MapFog
*/
BMSP.MapFog = function () {
throw new Error("This is a static class");
};
var parameters = PluginManager.parameters("BMSP_MapFog");
BMSP.MapFog._label = parameters["Label"];
BMSP.MapFog._cache_settings = {};
BMSP.MapFog.getSettings = function (map) {
var objectId = BMSP.getObjectId(map);
if (objectId in this._cache_settings) {
return this._cache_settings[objectId];
}
var index = 1;
var settings = {};
while (this._label + index in map.meta) {
settings[index] = map.meta[this._label + index].split(",");
index++;
}
this._cache_settings[objectId] = settings;
return settings;
};
BMSP.MapFog.getSprite = function (index) {
if (!SceneManager._scene || SceneManager._scene.constructor !== Scene_Map) {
return null;
}
var fogData = SceneManager._scene._spriteset._fogData;
for (var i in fogData) {
var data = fogData[i];
if (data.index == index) return data.sprite;
}
return null;
};
/*
* ImageManager
*/
ImageManager.loadFog = function (filename, hue) {
return this.loadBitmap("img/fogs/", filename, hue, true);
};
var _Game_Map_setup = Game_Map.prototype.setup;
Game_Map.prototype.setup = function (mapId) {
_Game_Map_setup.call(this, mapId);
this.setupFogs();
};
Game_Map.prototype.setupFogs = function () {
this._fogs = {};
var settings = BMSP.MapFog.getSettings($dataMap);
for (var index in settings) {
var setting = settings[index];
var cond = (setting[6] || "").split(":");
var visible = true;
if (cond[0] !== "") {
visible = cond.every(function (id) {
return $gameSwitches.value(id);
});
}
this._fogs[index] = {
name: setting[0] || "",
sx: Number(setting[1] || 0),
sy: Number(setting[2] || 0),
opacity: Number(setting[3] || 255),
z: Number(setting[4] || 1),
blend: Number(setting[5] || 1),
visible: visible,
x: 0,
y: 0,
};
}
};
Game_Map.prototype.fogs = function () {
return this._fogs;
};
var _Game_Map_update = Game_Map.prototype.update;
Game_Map.prototype.update = function (sceneActive) {
_Game_Map_update.call(this, sceneActive);
this.updateFogs();
};
Game_Map.prototype.updateFogs = function () {
for (var index in this._fogs) {
this._fogs[index].x += this._fogs[index].sx;
this._fogs[index].y += this._fogs[index].sy;
}
};
Game_Map.prototype.setFogParameter = function (name, index, value) {
if (!(index in this._fogs)) return;
if (value === undefined) return;
var fog = this._fogs[index];
switch (name) {
case "name":
fog[name] = value;
break;
case "sx":
case "sy":
case "opacity":
case "blend":
fog[name] = Number(value);
break;
case "visible":
fog[name] = Boolean(Number(value));
break;
}
};
/*
* Spriteset_Map
*/
var _Spriteset_Map_initialize = Spriteset_Map.prototype.initialize;
Spriteset_Map.prototype.initialize = function () {
this._fogContainer = [];
this._fogData = [];
_Spriteset_Map_initialize.call(this);
};
var _Spriteset_Map_createParallax = Spriteset_Map.prototype.createParallax;
Spriteset_Map.prototype.createParallax = function () {
_Spriteset_Map_createParallax.call(this);
this.createFogs(0);
};
var _Spriteset_Map_createPictures = Spriteset_Map.prototype.createPictures;
Spriteset_Map.prototype.createPictures = function () {
this.createFogs(1);
_Spriteset_Map_createPictures.call(this);
this.createFogs(2);
};
var _Spriteset_Map_update = Spriteset_Map.prototype.update;
Spriteset_Map.prototype.update = function () {
_Spriteset_Map_update.call(this);
this.updateFogs();
};
Spriteset_Map.prototype.createFogs = function (z) {
this._fogContainer[z] = new Sprite();
var fogs = $gameMap.fogs();
for (var index in fogs) {
if (fogs[index].z !== z) continue;
var fogSprite = new TilingSprite();
fogSprite.move(0, 0, Graphics.width, Graphics.height);
this._fogContainer[z].addChild(fogSprite);
this._fogData.push({
index: index,
sprite: fogSprite,
name: null,
});
}
if (z === 2) {
this.addChild(this._fogContainer[z]);
} else {
this._baseSprite.addChild(this._fogContainer[z]);
}
};
Spriteset_Map.prototype.updateFogs = function () {
var fogs = $gameMap.fogs();
this._fogData.forEach(function (data) {
var fog = fogs[data.index];
var sprite = data.sprite;
if (data.name !== fog.name) {
data.name = fog.name;
sprite.bitmap = ImageManager.loadFog(data.name);
}
if (sprite.bitmap) {
sprite.origin.x = fog.x;
sprite.origin.y = fog.y;
sprite.opacity = fog.opacity;
sprite.visible = fog.visible;
sprite.blendMode = fog.blend;
}
}, this);
};
})();

View file

@ -0,0 +1,201 @@
//=============================================================================
// BootOpeningDemo.js
//=============================================================================
/*:
* @plugindesc You can start the opening demo before your title scene
* @author Shirogane / smallomega.com
*
* @param firstMapId
* @desc Opening demo map ID
* @default 1
* @param startX
* @desc First X coordinate on demo map
* @default 0
* @param startY
* @desc First Y coordinate on demo map
* @default 0
*
* @help
*
* プラグインコマンド:
* BootOpeningDemo end # End the opening demo and change the title scene
* BootOpeningDemo skipOK # You can skip to the title scene by the decide key or touch
* BootOpeningDemo skipNG # You can not skip to the title scene by the decide key or touch
*/
/*:ja
* @plugindesc タイトル画面を出す前にオープニングデモから開始します
* @author Shirogane / smallomega.com
*
* @param firstMapId
* @desc オープニングデモに使用するマップID
* @default 1
* @param startX
* @desc マップ上の開始座標X
* @default 0
* @param startY
* @desc マップ上の開始座標Y
* @default 0
*
*
* @help
*
* プラグインコマンド:
* BootOpeningDemo end # デモを終了してタイトル画面へ遷移します
* BootOpeningDemo skipOK # 決定キータッチ操作でタイトル画面に遷移できるようになります
* BootOpeningDemo skipNG # 決定キータッチ操作でタイトル画面に遷移できなくなります
*/
(function () {
var parameters = PluginManager.parameters("BootOpeningDemo");
var firstMapId = Number(parameters["firstMapId"] || 0);
var firstStartX = Number(parameters["firstStartX"] || 0);
var firstStartY = Number(parameters["firstStartY"] || 0);
var openingDemoEnd = false;
var openingDemoSkipOk = false;
// プラグインコマンド
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (!openingDemoEnd) {
if (command === "BootOpeningDemo") {
switch (args[0]) {
case "end":
changeTitle();
break;
case "skipOK":
openingDemoSkipOk = true;
break;
case "skipNG":
openingDemoSkipOk = false;
break;
default:
throw Error("(BootOpeningDemo) invalid argument : " + args[0]);
break;
}
}
}
};
// 最初のシーンに遷移している部分を書き換え
var _Scene_Boot_start = Scene_Boot.prototype.start;
Scene_Boot.prototype.start = function () {
if (DataManager.isBattleTest() || DataManager.isEventTest()) {
// デバッグ機能だけは通常の動作
_Scene_Boot_start.call(this);
} else {
// 開始フラグリセット
openingDemoEnd = false;
// 開始初期化処理
Scene_Base.prototype.start.call(this);
this.updateDocumentTitle();
SoundManager.preloadImportantSounds();
DataManager.createGameObjects();
DataManager.selectSavefileForNewGame();
Graphics.frameCount = 0;
// エラーチェック
if (firstMapId == 0) {
throw new Error("(BootOpeningDemo) parameter firstMapId is invalid");
}
this.checkPlayerLocation();
// マップ呼び出し
$gamePlayer.reserveTransfer(firstMapId, firstStartX, firstStartY);
SceneManager.goto(Scene_Map);
}
};
// デモ中は方向キー移動操作不可
var _Game_Player_moveByInput = Game_Player.prototype.moveByInput;
Game_Player.prototype.moveByInput = function () {
if (openingDemoEnd) {
return _Game_Player_moveByInput.call(this);
}
};
// デモ中はマップのタッチ操作不可
var _Scene_Map_isMapTouchOk = Scene_Map.prototype.isMapTouchOk;
Scene_Map.prototype.isMapTouchOk = function () {
// オープニングデモが終了していなければ実行しない
if (openingDemoEnd) {
return _Scene_Map_isMapTouchOk.call(this);
}
};
// デモ中はメニュー操作不可
var _Scene_Map_isMenuCalled = Scene_Map.prototype.isMenuCalled;
Scene_Map.prototype.isMenuCalled = function () {
// オープニングデモが終了していなければ常にfalse
if (openingDemoEnd) {
return _Scene_Map_isMenuCalled.call(this);
} else {
return false;
}
};
// 決定キーで遷移、タッチ操作で遷移
var _Scene_Map_update = Scene_Map.prototype.update;
Scene_Map.prototype.update = function () {
_Scene_Map_update.call(this);
// デモ中だけの処理でスキップ許可が出ていてシーン遷移中でない
if (
!openingDemoEnd &&
openingDemoSkipOk &&
!SceneManager.isSceneChanging()
) {
// 決定キーで遷移、タッチ操作で遷移
if (TouchInput.isTriggered() || Input.isTriggered("ok")) {
// タイトルへ遷移
changeTitle();
}
}
};
// オープニングデモ中は禁止のイベントコマンドが使われていたらErrorにする
var _Game_Interpreter_executeCommand =
Game_Interpreter.prototype.executeCommand;
Game_Interpreter.prototype.executeCommand = function () {
if (!openingDemoEnd) {
var command = this.currentCommand();
if (command) {
// 禁止コマンドチェック
switch (command.code) {
// 下記のコマンドをOPデモ中に実行したらErrorになります
// 入力が必要なもの、シーンが遷移するもの、などが禁止になっています
// なお、変数の操作やシステムの設定変更は可能ですが、タイトルに遷移した時点でリセットされます
case 103: // 数値入力の処理
case 104: // アイテム選択の処理
case 301: // 戦闘の処理
case 302: // ショップの処理
case 303: // 名前入力の処理
case 351: // メニュー画面を開く
case 352: // セーブ画面を開く
case 353: // ゲームオーバー
case 354: // タイトル画面に戻す
throw Error(
"(BootOpeningDemo) invalid command : code " + command.code
);
break;
default:
break;
}
}
}
return _Game_Interpreter_executeCommand.call(this);
};
var changeTitle = function () {
openingDemoEnd = true;
// Videoが動いていたら停止
if (Graphics._video.duration > 0) {
Graphics._video.currentTime = Graphics._video.duration;
// Graphice._onTouchEndedで再度playさせないように
Graphics._videoUnlocked = true;
}
// タイトル画面へ遷移、通常のScene_Bootを開始する
SceneManager.goto(Scene_Title);
Window_TitleCommand.initCommandPosition();
};
})();

View file

@ -0,0 +1,116 @@
//=============================================================================
// BordSkin_edit.js
//=============================================================================
/*:ja
* @plugindesc ver1.00 能力値にステートに設定した定数を加算します
* @author まっつUP, merusaia(著作表示はまっつUPさん)
*
* @help
*
* RPGで笑顔を
*
* このヘルプとパラメータの説明をよくお読みになってからお使いください
*
* パラメータとプラグインコマンドともにありません
* 定数は基本能力値の倍率やバフの倍率によって変わることはありません
*
* ステートのノートタグ
*
* <BSparamId:value>
*
* atkを100上昇させる
* <BS2:100>
*
* このプラグインを利用する場合は
* readmeなどにまっつUPの名を入れてください
* また素材のみの販売はダメです
* 上記以外の規約等はございません
* もちろんツクールMVで使用する前提です
* 何か不具合ありましたら気軽にどうぞ
*
* 免責事項
* このプラグインを利用したことによるいかなる損害も制作者は一切の責任を負いません
*
*  ここまでまっつUPさん
*  以下merusaiaが追記
*
* まっつさんのプラグインをmerusaiaが改変しています
* Game_BattlerBase.prototype.param上書きを追加定義に変更
* 機能説明やデバッグ方法のコメント
*
* 概要
* このプラグインは攻撃力などのパラメータを絶対値で増減させるプラグインです
* ステートによる変化では1の倍率でしか変化をさせられませんが
* このプラグインをステートのメモ欄にかくことで
* 装備のように攻撃力を100するステートなどがつくれます
*
* 使い方
* メモ欄に以下のようにタグを書いてください//」以降はコメントです)
*
* 例0 最大HPを+100するステートを作りたい場合
* <BS0:100> // BordSkin_edit.jsがON時、最大(ID=0)を絶対値増減。最小値は1。
*
* 例1 最大MPを-100するステートを作りたい場合
* <BS1:-100> // BordSkin_edit.jsがON時、最大(ID=1)を絶対値増減。最小値は0。
*
* 例2 攻撃力を+100するステートを作りたい場合
* <BS2:100> // BordSkin_edit.jsがON時、攻撃力(ID=2)を絶対値増減。最小値は1。
*
* 例3 防御力を-100するステートを作りたい場合
* <BS3:-100> // BordSkin_edit.jsがON時、防御力(ID=3)を絶対値増減。最小値は1。
*
* 例4 魔法力を100するステートを作りたい場合
* <BS4:100> // BordSkin_edit.jsがON時、魔法力(ID=4)を絶対値増減。最小値は1。
*
* 例5 魔法防御力を-100するステートを作りたい場合
* <BS5:-100> // BordSkin_edit.jsがON時、魔法防御力(ID=5)を絶対値増減。最小値は1。
*
* 例6 敏捷性を100するステートを作りたい場合
* <BS6:100> // BordSkin_edit.jsがON時、敏捷性(ID=6)を絶対値増減。最小値は1。
*
* 例7 運を+999するステートを作りたい場合
* <BS7:999> // BordSkin_edit.jsがON時、運(ID=7)を絶対値増減。最小値は1。
*
*ステート重ね掛けプラグインとの併用について
* 剣崎宗二さんが作成されたMultiStackState.jsプラグインと併用すると
* 同じステートの効果を指定した回数だけ重ね掛け可能なステートがつくれます
* つまり一つのステートで攻撃力+100を5回重ね掛けするなどというツクール1や2の頃にあった重ね掛けパワーアップスキルがつくれます
* 剣崎宗二 ステートを重複可能にでネット検索すると出てきますぜひお試しください
*/
(function () {
//var parameters = PluginManager.parameters('BordSkin_edit');
Game_BattlerBase.prototype.paramPlus2 = function (paramId) {
//新規
var str1 = "BS" + paramId;
var amount = 0;
this._states.forEach(function (stateId) {
var val1 = Number($dataStates[stateId].meta[str1] || 0);
if (val1) amount += val1;
}, this);
return amount;
};
var _Game_BattlerBase_param = Game_BattlerBase.prototype.param; // 追加定義に変更
Game_BattlerBase.prototype.param = function (paramId) {
var baseValue = _Game_BattlerBase_param.apply(this, arguments); // まず、元メソッドの内容を呼び出し、返り値にその内容を格納
// 以下、追加定義部分
// 次に、絶対値を足したものを計算して、それに置き換える
var value = this.paramBase(paramId) + this.paramPlus(paramId);
value += this.paramPlus2(paramId); // 絶対値増加。
value *= this.paramRate(paramId) * this.paramBuffRate(paramId);
var maxValue = this.paramMax(paramId);
var minValue = this.paramMin(paramId);
var value_addedPlus2 = Math.round(value.clamp(minValue, maxValue));
// デバッグ用。元メソッドの内容と、その値が違えば、念のため、警告を出しておく。
//if(baseValue !== value_addedPlus2){
// console.log('メモ<BS【パラID番号】,'+Math.floor(this.paramPlus2(paramId))
// +'>により、能力に絶対値が足されました。: 加算前'+Math.floor(baseValue)+' → 加算後:'+Math.floor(value_addedPlus2));
//}
return value_addedPlus2;
};
})();

View file

@ -0,0 +1,82 @@
//=============================================================================
// BugFixLoadErrorChoiceSetup.js
// ----------------------------------------------------------------------------
// Copyright (c) 2015 Triacontane
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.0.0 2016/03/17 初版
// ----------------------------------------------------------------------------
// [Blog] : http://triacontane.blogspot.jp/
// [Twitter]: https://twitter.com/triacontane/
// [GitHub] : https://github.com/triacontane/
//=============================================================================
/*:
* @plugindesc BugFixLoadErrorChoiceSetup
* @author triacontane
*
* @help BugFixLoadErrorChoiceSetup
*
* This plugin is released under the MIT License.
*/
/*:ja
* @plugindesc 選択肢表示中のロードエラー修正プラグイン
* @author トリアコンタン
*
* @help 選択肢が表示されている最中にセーブしたデータが
* ロードできない不具合を修正
*
* このプラグインにはプラグインコマンドはありません
*
* 利用規約
* 作者に無断で改変再配布が可能で利用形態商用18禁利用等
* についても制限はありません
* このプラグインはもうあなたのものです
*/
(function () {
"use strict";
//=============================================================================
// Window_ChoiceList
// 選択肢の表示中に並列処理で画面遷移して戻ってきた場合に発生するエラーを解消
//=============================================================================
var _Window_ChoiceList_maxChoiceWidth =
Window_ChoiceList.prototype.maxChoiceWidth;
Window_ChoiceList.prototype.maxChoiceWidth = function () {
return this._windowContentsSprite
? _Window_ChoiceList_maxChoiceWidth.apply(this, arguments)
: 96;
};
//=============================================================================
// DataManager
// $gameMessageをセーブデータに含めるよう変更します。
//=============================================================================
var _DataManager_makeSaveContents = DataManager.makeSaveContents;
DataManager.makeSaveContents = function () {
var contents = _DataManager_makeSaveContents.apply(this, arguments);
contents.message = $gameMessage;
return contents;
};
var _DataManager_extractSaveContents = DataManager.extractSaveContents;
DataManager.extractSaveContents = function (contents) {
_DataManager_extractSaveContents.apply(this, arguments);
if (contents.message) $gameMessage = contents.message;
};
var _Game_Interpreter_update = Game_Interpreter.prototype.update;
Game_Interpreter.prototype.update = function () {
_Game_Interpreter_update.apply(this, arguments);
if ($gameMessage.isChoice() && !$gameMessage._choiceCallback) {
$gameMessage.setChoiceCallback(
function (n) {
this._branch[this._indent] = n;
}.bind(this)
);
}
};
})();

View file

@ -0,0 +1,161 @@
//=============================================================================
// CRTA_ScreenPicture.js
//=============================================================================
/*:
* @plugindesc v1.1.0 ピクチャを使用したスクリーンコマンドプラグイン
* @author tokineco@cretia studio
*
* @param Screen Picture ID
* @desc スクリーンに使用するピクチャIDこのピクチャ番号は他で使用しないでください
* Default: 90
* @default 90
*
* @param Fade Picture ID
* @desc フェードに使用するピクチャIDこのピクチャ番号は他で使用しないでください
* Default: 91
* @default 91
*
* @help
* 概要:
* ピクチャを使用したスクリーン制御コマンド(主にフェード用)を追加します
* モバイル向けのスクリーンの色調変更に問題があるためこちらを使用します
* 色指定により内部でスクリーンピクチャを生成することもできますし用意した独自ピクチャを使用することもできます
*
* このプラグインのスクリーン(screen)とは夜だったりセピア調といった色調変更演出のためのスクリーンのことで
* フェード(fade)とは画面切り替え時などで黒や白で画面を隠すための演出用スクリーンのことを示します
* 両方同時に使用できるように分けています
*
* エディタのイベントコマンドのみでもできますが簡潔かつスクリーン画像やフェード時間のパラメータ化のためにプラグインにしています
*
* 詳細な使用方法は下記をご覧ください
* http://studio.cretia.net/blog/634
*
* プラグインコマンド:
* CRTA_ScreenPicture set fade 0 0 0 0 # 指定色でフェードスクリーンを作成する(引数1:screen or fade, 引数2:[0255], 引数3:[0255] 引数4:[0255] 引数5:透明度[0255])
* CRTA_ScreenPicture set fade ScreenPoisonMist 168 # 指定ピクチャでフェードスクリーンを作成する(引数1:screen or fade, 引数2:ピクチャファイル名, 引数3:透明度[0255])
* CRTA_ScreenPicture fade fade 255 60 # フェードスクリーンを指定フレーム数かけて指定透明度までフェードする(引数1:screen or fade, 引数2:透明度[0255, 引数3:フレーム数[変数指定可能$gameVariables.value(1)])
* CRTA_ScreenPicture erase fade # フェードスクリーンを消去する(引数1:screen or fade)
*
* ライセンス:
* このプラグインは以下のライセンスのもと使用することができます
* Copyright (c) 2015 tokineco
* Released under the MIT license
* https://github.com/tokineco/RMMV_CRTAPlugins/blob/master/LICENSE
*/
(function () {
var parameters = PluginManager.parameters("CRTA_ScreenPicture");
var screenPicId = Number(parameters["Screen Picture ID"] || 90);
var fadePicId = Number(parameters["Fade Picture ID"] || 91);
var KEY_NAME = "CRTA_ScreenPicture_";
// プラグインコマンド
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (command === "CRTA_ScreenPicture") {
var picId = fadePicId;
if (String(args[1]) === "screen") {
picId = screenPicId;
}
switch (String(args[0])) {
case "set":
if (args.length <= 4) {
// ピクチャ指定の場合
$gameScreen.showPicture(
picId,
String(args[2]),
0,
0,
0,
100,
100,
Number(args[3]),
0
);
} else if (args.length >= 6) {
// カラー指定の場合
$gameScreen.showPicture(
picId,
KEY_NAME + String(args[1]),
0,
0,
0,
100,
100,
Number(args[5]),
0
);
$gameScreen.picture(picId)._CRTAScreenPictureType = String(args[1]);
$gameScreen.picture(picId)._CRTAScreenPictureColor = [
Number(args[2]),
Number(args[3]),
Number(args[4]),
];
}
break;
case "fade":
$gameScreen.movePicture(
picId,
0,
0,
0,
100,
100,
Number(args[2]),
0,
eval(args[3])
);
break;
case "erase":
$gameScreen.erasePicture(picId);
break;
}
}
};
// override
var _Game_Picture_initBasic = Game_Picture.prototype.initBasic;
Game_Picture.prototype.initBasic = function () {
_Game_Picture_initBasic.call(this);
// 変数拡張
this._CRTAScreenPictureType = "";
this._CRTAScreenPictureColor = null;
};
// override
var _Sprite_Picture_loadBitmap = Sprite_Picture.prototype.loadBitmap;
Sprite_Picture.prototype.loadBitmap = function () {
// 拡張変数がセットされていればピクチャを生成する
var type = this.picture()._CRTAScreenPictureType;
if (type != undefined && type != null && type != "") {
this.bitmap = ImageManager.createScreenPicture(
this._pictureName,
this.picture()._CRTAScreenPictureColor
);
} else {
this.bitmap = ImageManager.loadPicture(this._pictureName);
}
};
// ImageManager拡張
ImageManager.createScreenPicture = function (path, hue) {
var key = path + ":" + hue;
if (!this._cache[key]) {
// スクリーンを作成する
var bitmap = new Bitmap(Graphics.width, Graphics.height);
bitmap.fillAll("black");
bitmap.adjustTone(hue[0], hue[1], hue[2]);
bitmap.addLoadListener(function () {
bitmap.rotateHue(hue);
});
this._cache[key] = bitmap;
}
return this._cache[key];
};
})();

View file

@ -0,0 +1,792 @@
//=============================================================================
// CharacterPopupDamage.js
// ----------------------------------------------------------------------------
// (C) 2016 Triacontane
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.6.0 2018/11/11 プラグインの型指定機能に対応
// ポップアップ効果音を消音できるスイッチを追加
// 1.5.1 2017/11/10 コピペミスによる誤記を修正
// 1.5.0 2017/04/23 ポップアップ時にキャラクターをフラッシュさせる機能を追加
// 1.4.0 2017/03/03 ピクチャより前面にポップアップできる設定を追加
// 回転がない場合でも拡大率を自由に変更できるよう修正
// 1.3.0 2017/01/23 スリップダメージのポップアップに対応
// 対応するフォロワーのポップアップを表示する機能を追加
// 1.2.0 2016/12/31 ポップアップの色調設定機能を追加
// ポップアップの表示方法を詳細指定できる機能を追加
// 1.1.1 2016/09/15 最新の修正で自動ポップアップの設定が手動に影響していた問題を修正
// 1.1.0 2016/09/14 MPダメージ用に専用効果音を指定できる機能を追加
// HP、MP、TP、増加、減少の条件で個別に出力可否を設定できる機能を追加
// 1.0.3 2016/09/10 VE_BasicModule.jsとの競合を解消
// 1.0.2 2016/04/17 ポップアップ無効化のプラグインコマンドが機能していなかった問題を修正
// 1.0.1 2016/04/10 HPの増減との連動で増やすと減らすが逆に解釈されていたのを修正
// 1.0.0 2016/04/09 初版
// ----------------------------------------------------------------------------
// [Blog] : https://triacontane.blogspot.jp/
// [Twitter]: https://twitter.com/triacontane/
// [GitHub] : https://github.com/triacontane/
//=============================================================================
/*:
* @plugindesc キャラクターのダメージポッププラグイン
* @author トリアコンタン
*
* @param 効果音演奏
* @desc 状況に応じたシステム効果音を自動演奏します(ON/OFF)
* @default true
* @type boolean
*
* @param 消音スイッチID
* @desc 指定したIDのスイッチがONになっているときシステム効果音が自動演奏されなくなります
* @default 0
* @type switch
*
* @param X座標補正
* @desc ポップアップ位置のX座標を補正します
* @default 0
*
* @param Y座標補正
* @desc ポップアップ位置のY座標を補正します
* @default 0
*
* @param HP自動ポップアップ
* @desc HPの増減を自動ポップアップの対象にします(ON/OFF)
* @default true
* @type boolean
*
* @param MP自動ポップアップ
* @desc MPの増減を自動ポップアップの対象にします(ON/OFF)
* @default true
* @type boolean
*
* @param TP自動ポップアップ
* @desc TPの増減を自動ポップアップの対象にします(ON/OFF)
* @default true
* @type boolean
*
* @param 増加自動ポップアップ
* @desc パラメータの増加を自動ポップアップの対象にします(ON/OFF)
* @default true
* @type boolean
*
* @param 減少自動ポップアップ
* @desc パラメータの減少を自動ポップアップの対象にします(ON/OFF)
* @default true
* @type boolean
*
* @param MPダメージ音
* @desc MPダメージ時の効果音ファイル名を別途指定(audio/se)します何も指定しないとHPと同じになります
* @default
*
* @param 回転
* @desc 数字の回転運動を有効にします
* @default true
* @type boolean
*
* @param X方向半径
* @desc 数字を回転させる場合のX方向の半径です
* @default 40
*
* @param Y方向半径
* @desc 数字を回転させる場合のY方向の半径です
* @default 40
*
* @param 回転速度
* @desc 数字を回転させる場合の速度です
* @default 60
*
* @param 拡大率
* @desc 初期状態の拡大率です
* @default 100
*
* @param 拡大率変化値
* @desc 1フレームごとの拡大率の変化値です
* @default -10
*
* @param 最前面表示
* @desc ポップアップをピクチャより前面に表示します
* @default false
* @type boolean
*
* @help マップ画面でイベントやプレイヤーに数字をポップアップさせる機能を提供します
* マップ上でのダメージや回復の演出に利用できます演出は戦闘時のものと同一です
* 指定する値をマイナスにすると回復扱いとなり色が変わります
* またクリティカルにすると数字の色が一瞬赤くなります
*
* またHPの増減等のイベント実行時に自動で変化量をポップアップする機能や
* ダメージ床を通過した際に自動でポップアップする機能も用意されています
* パラメータによりHPのみや増加のみといった条件指定もできます
*
* プラグインコマンド詳細
* イベントコマンドプラグインコマンドから実行
* パラメータの間は半角スペースで区切る
*
* CPD_DAMAGE or ポップアップダメージ [キャラクターID] [ダメージ値] [反転]
* キャラクターを指定してダメージをポップアップします
* キャラクターの指定は以下の通りです
* -1 : プレイヤー
* 0 : 実行中のイベント
* 1.. : 指定したIDのイベント
*
* 反転を有効にするとポップアップの回転方向が逆になります
* パラメータの回転を有効にしている場合
*
* CPD_DAMAGE 5 -300 ON
* ポップアップダメージ 0 \v[1] OFF
*
* CPD_CRITICAL or ポップアップクリティカル
* キャラクターを指定してダメージをクリティカル扱いでポップアップします
*
* CPD_CRITICAL -1 100 ON
* ポップアップクリティカル 3 \v[1] OFF
*
* CPD_MP_DAMAGE or ポップアップMPダメージ
* キャラクターを指定してMPダメージをポップアップします
*
* CPD_MP_DAMAGE 5 -300 ON
* ポップアップMPダメージ 0 \v[1] OFF
*
* CPD_MP_CRITICAL or ポップアップMPクリティカル
* キャラクターを指定してMPダメージをクリティカル扱いでポップアップします
*
* CPD_MP_CRITICAL -1 100 ON
* ポップアップMPクリティカル 3 \v[1] OFF
*
* CPD_MISS or ポップアップミス
* キャラクターを指定してmissをポップアップします
*
* CPD_MISS -1 ON
* ポップアップミス 3 OFF
*
* CPD_INVALID or ポップアップ無効化
* 自動ポップアップを無効にします
* 有効になっているとイベントコマンドHPの増減MPの増減TPの増減
* およびダメージ床によるダメージが自動でポップアップします
* 初期状態では有効です
*
* CPD_VALID or ポップアップ有効化
* 自動ポップアップを再度有効にします
*
* CPD_SETTING_TONE or ポップアップ設定_色調 [] [] [] [グレー]
* ポップアップ画像の色調を変更できます色調の設定値を順番に指定してください
*
* CPD_SETTING_TONE 255 0 0 255
* ポップアップ設定_色調 -255 -255 -255 0
*
* CPD_SETTING_FLASH or ポップアップ設定_フラッシュ [] [] [] [強さ]
* ポップアップ時にキャラクターをフラッシュします
* フラッシュするのはダメージを受けた場合のみです
*
* CPD_SETTING_FLASH 255 0 0 255
* ポップアップ設定_フラッシュ 255 0 0 255
*
* 利用規約
* 作者に無断で改変再配布が可能で利用形態商用18禁利用等
* についても制限はありません
* このプラグインはもうあなたのものです
*/
(function () {
"use strict";
var pluginName = "CharacterPopupDamage";
var settings = {
/* MPダメージ専用効果音(ファイル名はパラメータで指定) */
mpDamageSe: {
volume: 90,
pitch: 100,
pan: 0,
},
};
var getCommandName = function (command) {
return (command || "").toUpperCase();
};
var getParamBoolean = function (paramNames) {
var value = getParamOther(paramNames);
return (
(value || "").toUpperCase() === "ON" ||
(value || "").toUpperCase() === "TRUE"
);
};
var getParamNumber = function (paramNames, min, max) {
var value = getParamOther(paramNames);
if (arguments.length < 2) min = -Infinity;
if (arguments.length < 3) max = Infinity;
return (parseInt(value, 10) || 0).clamp(min, max);
};
var getParamString = function (paramNames) {
var value = getParamOther(paramNames);
return value === null ? "" : value;
};
var getParamOther = function (paramNames) {
if (!Array.isArray(paramNames)) paramNames = [paramNames];
for (var i = 0; i < paramNames.length; i++) {
var name = PluginManager.parameters(pluginName)[paramNames[i]];
if (name) return name;
}
return null;
};
var getArgNumber = function (arg, min, max) {
if (arguments.length < 2) min = -Infinity;
if (arguments.length < 3) max = Infinity;
return (parseInt(convertEscapeCharactersAndEval(arg, true), 10) || 0).clamp(
min,
max
);
};
var getArgBoolean = function (arg) {
return (arg || "").toUpperCase() === "ON";
};
var convertEscapeCharactersAndEval = function (text, evalFlg) {
if (text === null || text === undefined) text = "";
var window = SceneManager._scene._windowLayer.children[0];
if (window) {
var result = window.convertEscapeCharacters(text);
return evalFlg ? eval(result) : result;
} else {
return text;
}
};
//=============================================================================
// パラメータの取得と整形
//=============================================================================
var paramPlaySe = getParamBoolean(["PlaySe", "効果音演奏"]);
var paramSuppressSwitchId = getParamNumber(
["SuppressSwitchId", "消音スイッチID"],
0
);
var paramOffsetX = getParamNumber(["OffsetX", "X座標補正"]);
var paramOffsetY = getParamNumber(["OffsetY", "Y座標補正"]);
var paramTpAutoPop = getParamBoolean(["TPAutoPop", "TP自動ポップアップ"]);
var paramMpAutoPop = getParamBoolean(["MPAutoPop", "MP自動ポップアップ"]);
var paramHpAutoPop = getParamBoolean(["HPAutoPop", "HP自動ポップアップ"]);
var paramIncreaseAutoPop = getParamBoolean([
"IncreaseAutoPop",
"増加自動ポップアップ",
]);
var paramDecreaseAutoPop = getParamBoolean([
"DecreaseAutoPop",
"減少自動ポップアップ",
]);
var paramMpDamageSe = getParamString(["MPDamageSe", "MPダメージ音"]);
var paramRotation = getParamBoolean(["Rotation", "回転"]);
var paramRadiusX = getParamNumber(["RadiusX", "X方向半径"]);
var paramRadiusY = getParamNumber(["RadiusY", "Y方向半径"]);
var paramRotateSpeed = getParamNumber(["RotateSpeed", "回転速度"]);
var paramScale = getParamNumber(["Scale", "拡大率"]);
var paramScaleDelta = getParamNumber(["ScaleDelta", "拡大率変化値"]);
var paramOnTop = getParamBoolean(["OnTop", "最前面表示"]);
//=============================================================================
// Game_Interpreter
// プラグインコマンドを追加定義します。
//=============================================================================
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
_Game_Interpreter_pluginCommand.apply(this, arguments);
this.pluginCommandCharacterPopupDamage(command, args);
};
Game_Interpreter.prototype.pluginCommandCharacterPopupDamage = function (
command,
args
) {
var popupArgs = [];
switch (getCommandName(command)) {
case "CPD_DAMAGE":
case "ポップアップダメージ":
popupArgs = [getArgNumber(args[1]), false, getArgBoolean(args[2])];
this.callCharacterPopup(args, "popupDamage", popupArgs);
break;
case "CPD_CRITICAL":
case "ポップアップクリティカル":
popupArgs = [getArgNumber(args[1]), true, getArgBoolean(args[2])];
this.callCharacterPopup(args, "popupDamage", popupArgs);
break;
case "CPD_MP_DAMAGE":
case "ポップアップMPダメージ":
popupArgs = [getArgNumber(args[1]), false, getArgBoolean(args[2])];
this.callCharacterPopup(args, "popupMpDamage", popupArgs);
break;
case "CPD_MP_CRITICAL":
case "ポップアップMPクリティカル":
popupArgs = [getArgNumber(args[1]), true, getArgBoolean(args[2])];
this.callCharacterPopup(args, "popupMpDamage", popupArgs);
break;
case "CPD_MISS":
case "ポップアップミス":
popupArgs = [getArgBoolean(args[1])];
this.callCharacterPopup(args, "popupMiss", popupArgs);
break;
case "CPD_VALID":
case "ポップアップ有効化":
$gameSystem.setSuppressAutoPopup(false);
break;
case "CPD_INVALID":
case "ポップアップ無効化":
$gameSystem.setSuppressAutoPopup(true);
break;
case "CPD_SETTING_TONE":
case "ポップアップ設定_色調":
var red = getArgNumber(args[0]);
var green = getArgNumber(args[1]);
var blue = getArgNumber(args[2]);
var gray = getArgNumber(args[3]);
$gameSystem.setPopupDamageTone([red, green, blue, gray]);
break;
case "CPD_SETTING_FLASH":
case "ポップアップ設定_フラッシュ":
var flashRed = getArgNumber(args[0], 0);
var flashGreen = getArgNumber(args[1], 0);
var flashBlue = getArgNumber(args[2], 0);
var alpha = getArgNumber(args[3], 0) || 255;
$gameSystem.setPopupDamageFlash([
flashRed,
flashGreen,
flashBlue,
alpha,
]);
break;
}
};
var _Game_Interpreter_command311 = Game_Interpreter.prototype.command311;
Game_Interpreter.prototype.command311 = function () {
var value = -this.operateValue(
this._params[2],
this._params[3],
this._params[4]
);
this.iterateActorEx(
this._params[0],
this._params[1],
function (actor) {
actor.popupDamage(value);
}.bind(this)
);
return _Game_Interpreter_command311.apply(this, arguments);
};
var _Game_Interpreter_command312 = Game_Interpreter.prototype.command312;
Game_Interpreter.prototype.command312 = function () {
var value = -this.operateValue(
this._params[2],
this._params[3],
this._params[4]
);
this.iterateActorEx(
this._params[0],
this._params[1],
function (actor) {
actor.popupMpDamage(value);
}.bind(this)
);
return _Game_Interpreter_command312.apply(this, arguments);
};
var _Game_Interpreter_command326 = Game_Interpreter.prototype.command326;
Game_Interpreter.prototype.command326 = function () {
var value = -this.operateValue(
this._params[2],
this._params[3],
this._params[4]
);
this.iterateActorEx(
this._params[0],
this._params[1],
function (actor) {
actor.popupTpDamage(value);
}.bind(this)
);
return _Game_Interpreter_command326.apply(this, arguments);
};
Game_Interpreter.prototype.callCharacterPopup = function (
args,
methodName,
extend
) {
var character = this.character(getArgNumber(args[0], -1));
if (character) character[methodName].apply(character, extend);
};
//=============================================================================
// Game_Actor
// ダメージ床によるポップアップを処理します。
//=============================================================================
var _Game_Actor_executeFloorDamage = Game_Actor.prototype.executeFloorDamage;
Game_Actor.prototype.executeFloorDamage = function () {
this.popupMapDamage(_Game_Actor_executeFloorDamage);
};
var _Game_Actor_turnEndOnMap = Game_Actor.prototype.turnEndOnMap;
Game_Actor.prototype.turnEndOnMap = function () {
this.popupMapDamage(_Game_Actor_turnEndOnMap);
};
Game_Actor.prototype.popupMapDamage = function (callBackFunc) {
var prevHp = this.hp;
var prevMp = this.mp;
var prevTp = this.tp;
callBackFunc.apply(this);
var character = this.getCharacterObject();
if (!character) return;
var hpDamage = prevHp - this.hp;
if (hpDamage !== 0 && $gameSystem.isNeedAutoHpPopup(hpDamage))
character.popupDamage(hpDamage, false);
var mpDamage = prevMp - this.mp;
if (mpDamage !== 0 && $gameSystem.isNeedAutoMpPopup(mpDamage))
character.popupMpDamage(mpDamage, false);
var tpDamage = prevTp - this.tp;
if (tpDamage !== 0 && $gameSystem.isNeedAutoTpPopup(tpDamage))
character.popupDamage(tpDamage, false);
};
Game_Actor.prototype.popupDamage = function (value) {
var character = this.getCharacterObject();
if (!character) return;
if (value !== 0 && $gameSystem.isNeedAutoHpPopup(value)) {
character.popupDamage(value, false);
}
};
Game_Actor.prototype.popupMpDamage = function (value) {
var character = this.getCharacterObject();
if (!character) return;
if (value !== 0 && $gameSystem.isNeedAutoMpPopup(value)) {
character.popupMpDamage(value, false);
}
};
Game_Actor.prototype.popupTpDamage = function (value) {
var character = this.getCharacterObject();
if (!character) return;
if (value !== 0 && $gameSystem.isNeedAutoTpPopup(value)) {
character.popupDamage(value, false);
}
};
Game_Actor.prototype.getCharacterObject = function () {
var index = $gameParty.battleMembers().indexOf(this);
var result;
switch (index) {
case -1:
result = null;
break;
case 0:
result = $gamePlayer;
break;
default:
var followers = $gamePlayer.followers();
result = followers.isVisible() ? followers.follower(index - 1) : null;
}
return result;
};
//=============================================================================
// Game_System
// オートポップアップの有効フラグを追加定義します。
//=============================================================================
var _Game_System_initialize = Game_System.prototype.initialize;
Game_System.prototype.initialize = function () {
_Game_System_initialize.apply(this, arguments);
this._suppressAutoPopup = false;
this._popupDamageTone = null;
this._popupDamageFlash = null;
};
Game_System.prototype.setSuppressAutoPopup = function (value) {
this._suppressAutoPopup = !!value;
};
Game_System.prototype.isSuppressAutoPopup = function () {
return this._suppressAutoPopup;
};
Game_System.prototype.isNeedAutoHpPopup = function (value) {
return paramHpAutoPop && this.isNeedAutoPopup(value);
};
Game_System.prototype.isNeedAutoMpPopup = function (value) {
return paramMpAutoPop && this.isNeedAutoPopup(value);
};
Game_System.prototype.isNeedAutoTpPopup = function (value) {
return paramTpAutoPop && this.isNeedAutoPopup(value);
};
Game_System.prototype.isNeedAutoPopup = function (value) {
return (
!$gameSystem.isSuppressAutoPopup() &&
((paramIncreaseAutoPop && value < 0) ||
(paramDecreaseAutoPop && value > 0))
);
};
Game_System.prototype.getPopupDamageTone = function () {
return this._popupDamageTone;
};
Game_System.prototype.setPopupDamageTone = function (value) {
this._popupDamageTone = value;
};
Game_System.prototype.getPopupDamageFlash = function () {
return this._popupDamageFlash;
};
Game_System.prototype.setPopupDamageFlash = function (value) {
this._popupDamageFlash = value;
};
//=============================================================================
// Game_CharacterBase
// ダメージ情報を保持します。
//=============================================================================
Game_CharacterBase.prototype.popupDamage = function (
value,
critical,
mirror
) {
this.startDamagePopup(value, critical, false, mirror);
};
Game_CharacterBase.prototype.popupMpDamage = function (
value,
critical,
mirror
) {
this.startDamagePopup(value, critical, true, mirror);
};
Game_CharacterBase.prototype.popupMiss = function (mirror) {
this.startDamagePopup(null, false, mirror);
};
Game_CharacterBase.prototype.isDamagePopupRequested = function () {
return this._damagePopup;
};
Game_CharacterBase.prototype.clearDamagePopup = function () {
if (!this._damageInfo || this._damageInfo.length === 0) {
this._damagePopup = false;
}
};
Game_CharacterBase.prototype.startDamagePopup = function (
value,
critical,
mpFlg,
mirror
) {
this._damagePopup = true;
if (!this._damageInfo) this._damageInfo = [];
var damageInfo = {
value: value,
critical: critical,
mpFlg: mpFlg,
mirror: mirror,
};
if (this.isPlayPopupSe()) {
this.playPopupSe(damageInfo);
}
this._damageInfo.push(damageInfo);
};
Game_CharacterBase.prototype.playPopupSe = function (damageInfo) {
if (damageInfo.value === null) {
SoundManager.playMiss();
} else if (damageInfo.value < 0) {
SoundManager.playRecovery();
} else if (damageInfo.mpFlg && paramMpDamageSe) {
settings.mpDamageSe.name = paramMpDamageSe;
AudioManager.playStaticSe(settings.mpDamageSe);
} else if (this === $gamePlayer) {
SoundManager.playActorDamage();
} else {
SoundManager.playEnemyDamage();
}
};
Game_CharacterBase.prototype.shiftDamageInfo = function () {
return this._damageInfo ? this._damageInfo.shift() : null;
};
Game_CharacterBase.prototype.isPlayPopupSe = function () {
return paramPlaySe && !$gameSwitches.value(paramSuppressSwitchId);
};
//=============================================================================
// Sprite_Character
// ダメージをポップアップします。
//=============================================================================
var _Sprite_Character_update = Sprite_Character.prototype.update;
Sprite_Character.prototype.update = function () {
_Sprite_Character_update.apply(this, arguments);
this.updateDamagePopup();
};
Sprite_Character.prototype.updateDamagePopup = function () {
this.setupDamagePopup();
if (this._damages && this._damages.length > 0) {
for (var i = 0; i < this._damages.length; i++) {
this._damages[i].update();
}
if (!this._damages[0].isPlaying()) {
this.getPopupParent().removeChild(this._damages[0]);
this._damages.shift();
}
}
if (this._popupFlash) {
this.updateDamagePopupFlash();
}
};
Sprite_Character.prototype.updateDamagePopupFlash = function () {
this.setBlendColor(this._popupFlash);
this._popupFlash[3] -= this._popupFlashSpeed;
if (this._popupFlash[3] <= 0) {
this._popupFlash = null;
this._popupFlashSpeed = 0;
}
};
Sprite_Character.prototype.setupDamagePopup = function () {
if (!this._character.isDamagePopupRequested()) return;
var sprite = new Sprite_CharacterDamage();
sprite.x = this.x + this.damageOffsetX();
sprite.y = this.y + this.damageOffsetY();
if (!sprite.z) sprite.z = 9;
sprite.setupCharacter(this._character);
if (!this._damages) this._damages = [];
this._damages.push(sprite);
this.getPopupParent().addChild(sprite);
this._character.clearDamagePopup();
if (!sprite.isMiss() && !sprite.isRecover()) {
this.setupDamagePopupFlash();
}
};
Sprite_Character.prototype.setupDamagePopupFlash = function () {
var flashColor = $gameSystem.getPopupDamageFlash();
if (!flashColor) return;
this._popupFlash = flashColor.clone();
this._popupFlashSpeed = Math.floor(this._popupFlash[3] / 30);
this.updateDamagePopupFlash();
};
Sprite_Character.prototype.damageOffsetX = function () {
return paramOffsetX;
};
Sprite_Character.prototype.damageOffsetY = function () {
return paramOffsetY;
};
Sprite_Character.prototype.getPopupParent = function () {
return paramOnTop ? this.parent.parent.parent : this.parent;
};
//=============================================================================
// Sprite_CharacterDamage
// ダメージ情報を受け取ってセットアップします。
//=============================================================================
function Sprite_CharacterDamage() {
this.initialize.apply(this, arguments);
}
Sprite_CharacterDamage.prototype = Object.create(Sprite_Damage.prototype);
Sprite_CharacterDamage.prototype.constructor = Sprite_CharacterDamage;
Sprite_CharacterDamage.prototype.setupCharacter = function (character) {
var damageInfo = character.shiftDamageInfo();
this._toneColor = $gameSystem.getPopupDamageTone();
this._mirror = damageInfo.mirror;
this._damageInfo = damageInfo;
this._digit = 0;
if (this.isMiss()) {
this.createMissForCharacter();
} else {
this.createDigits(damageInfo.mpFlg ? 2 : 0, damageInfo.value);
}
if (damageInfo.critical) {
this.setupCriticalEffect();
}
};
Sprite_CharacterDamage.prototype.isMiss = function () {
return this._damageInfo.value === null || this._damageInfo.value === 0;
};
Sprite_CharacterDamage.prototype.isRecover = function () {
return this._damageInfo.value < 0;
};
Sprite_CharacterDamage.prototype.createMissForCharacter = function () {
var w = this.digitWidth();
var h = this.digitHeight();
var sprite = this.createChildSprite();
sprite.setFrame(0, 4 * h, 4 * w, h);
sprite.dy = 0;
sprite.x = w / 2;
sprite.digit++;
this._digit++;
};
Sprite_CharacterDamage.prototype.createChildSprite = function () {
var sprite = Sprite_Damage.prototype.createChildSprite.apply(
this,
arguments
);
sprite.frame = 0;
sprite.digit = this._digit++;
if (this._toneColor) sprite.setColorTone(this._toneColor);
return sprite;
};
Sprite_CharacterDamage.prototype.updateChild = function (sprite) {
if (paramRotation) {
this.updateChildRotation(sprite);
sprite.setBlendColor(this._flashColor);
} else {
Sprite_Damage.prototype.updateChild.apply(this, arguments);
sprite.x = 0;
}
if (paramScale) {
this.updateChildScale(sprite);
}
sprite.frame++;
};
Sprite_CharacterDamage.prototype.updateChildRotation = function (sprite) {
var frame = sprite.frame;
var speed = (frame / 3600) * paramRotateSpeed;
sprite.rx = paramRadiusX * (Math.cos(speed) - 1);
sprite.ry = -paramRadiusY * Math.sin(speed);
if (this._mirror) {
sprite.rx *= -1;
}
sprite.x = Math.round(sprite.rx);
sprite.y = Math.round(sprite.ry);
};
Sprite_CharacterDamage.prototype.updateChildScale = function (sprite) {
var frame = sprite.frame;
var scale = (paramScale + (frame * paramScaleDelta) / 10) / 100;
sprite.scale.x = scale;
sprite.scale.y = scale;
sprite.x +=
(sprite.digit - (this._digit - 1) / 2) * (this.digitWidth() * scale);
};
})();

View file

@ -0,0 +1,398 @@
/******************************************************************************/
//
// Wataridori_CharacterVoice.js
//
/******************************************************************************/
//プラグインの説明
//「キャラクターボイス実装プラグイン」
//
//更新履歴(ver1.0)
//
//2019_12_08 ver1.0リリース
//2021_3_26 プラグインコマンドから音量、ピッチ、位相の値を正常に入力出来るように修正しました。
//
/******************************************************************************/
//This software is released under the MIT License.
//http://opensource.org/licenses/mit-license.php
//
//Copyright(c) 渡り鳥の楽園
/******************************************************************************/
/*:
* @plugindesc キャラクターボイス実装プラグイン
* @author 渡り鳥の楽園飯尾隼人
*
* @param CommandText_WindowOptions
* @desc ウィンドウオプションにおける表示コマンド名を設定します
* @default CV 音量
*
* @param CV_StoreFolderName
* @desc CVキャラクターボイスのデータがあるフォルダ名を変更できます
* @default cv
*
* @param UseToVolume
* @desc ONの場合は以下で設定する値を各音量BGM, BGS, ME, SEの音量としてそのまま設定しますOFFの場合は百分率として乗算
* @default true
* @type boolean
*
* @param BgmVolume_DuringPlayCV
* @desc CVキャラクターボイス再生中のBGMの音量倍率を設定できます0に設定した場合は停止します
* @default 50
* @type Number
*
* @param BgsVolume_DuringPlayCV
* @desc CVキャラクターボイス再生中のBGSの音量倍率を設定できます0に設定した場合は停止します
* @default 50
* @type Number
*
* @param MeVolume_DuringPlayCV
* @desc CVキャラクターボイス再生中のMEの音量倍率を設定できます0に設定した場合は停止します
* @default 50
* @type Number
*
* @param SeVolume_DuringPlayCV
* @desc CVキャラクターボイス再生中のSEの音量倍率を設定できます0に設定した場合は停止します
* @default 50
* @type Number
*
* @help
* 説明
* 本プラグインはBGM, BGS, ME, SEとは別にCVキャラクターボイスを実装可能です
* オプション画面にてBGM, BGS, ME, SEと同様に音量設定が可能です
* audio以下に名称がcvのフォルダを作成し再生したい音声ファイルを格納できます
* フォルダ名はプラグインパラメータにて変更可能です
* 音声の再生停止フェードアウトは全てプラグインコマンドからのみ実行可能です
* CV再生中に聞き取りやすいようにBGM, BGS, ME, SEの音量を一時的に低くすることも可能です
* 詳細はCi-en記事をご覧ください
* https://ci-en.dlsite.com/creator/2449/article/145251
*
* プラグインコマンドPlayCV FileName Volume Pitch Pan
* プラグインコマンドPlayCV FileName
* CVを再生しますBGS, BGS, ME, SEとは独立して再生可能で音量も独立しています
* FileNameは必ず指定してください指定がない場合は再生しません
* Volume, Pitch, Panは省略可能です省略した場合Volumeは90, Pitchは100, Panは0となります
* FileName再生するファイル名拡張子なしを文字列で設定してださい
* Volume 音量を数字で設定してください
* Pitch 音程を数字で設定してください
* Pan 位相を数字で設定してください
*
* プラグインコマンドStopCV
* CVの再生を停止します
*
* プラグインコマンドFadeOutCV Number
* CVの再生をフェードアウトしますフェードアウトする秒数は省略可能です
* 省略した場合Numberは1となります
* Numberフェードアウトする秒数を数字で設定してください
*
* プラグインコマンドDcreaseVolume
* BGM, BGS, ME, SEの音量をプラグインパラメータで設定した音量に低下させます
*
* 注意事項
* 本プラグインの使用によって生じたいかなる損失損害トラブルについても
* 一切責任を負いかねます
*
* 利用規約
* 無断で改変再配布が可能で商用18禁利用等を問わずにご利用が可能です
* 改良して頂いた場合報告して頂けると喜びます
*
* 渡り鳥の楽園飯尾隼人
* Twitter: https://twitter.com/wataridori_raku
* Ci-en : https://ci-en.dlsite.com/creator/2449
*/
(function () {
/******************************************************************************/
//
// Plugin_Parameters
//
/******************************************************************************/
var p_parameters = PluginManager.parameters("Wataridori_CharacterVoice");
var p_commandText_WindowOptions =
p_parameters.CommandText_WindowOptions || "全体絶頂ボイス音量";
var p_cv_StoreFolderName = p_parameters.CV_StoreFolderName || "cv";
var p_useToVolume = p_parameters.UseToVolume == "true";
var p_bgmVolume_DuringPlayCV = Number(
p_parameters.BgmVolume_DuringPlayCV
).clamp(0, 100);
var p_bgsVolume_DuringPlayCV = Number(
p_parameters.BgsVolume_DuringPlayCV
).clamp(0, 100);
var p_meVolume_DuringPlayCV = Number(
p_parameters.MeVolume_DuringPlayCV
).clamp(0, 100);
var p_seVolume_DuringPlayCV = Number(
p_parameters.SeVolume_DuringPlayCV
).clamp(0, 100);
/******************************************************************************/
//
// PluginCommand
//
/******************************************************************************/
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if (command == "PlayCV") {
if (args.length == 0) {
console.error(
"プラグインコマンド「PlayCV」を実行できません。再生するファイル名を設定してください。"
);
return;
}
var cv = {};
cv.name = args[0];
cv.volume = isNaN(Number(args[1])) ? 90 : Number(args[1]).clamp(0, 100);
cv.pitch = isNaN(Number(args[2])) ? 100 : Number(args[2]).clamp(50, 150);
cv.pan = isNaN(Number(args[3])) ? 0 : Number(args[3]).clamp(-100, 100);
AudioManager.playCv(cv);
}
if (command == "FadeOutCV") {
var time = Number(args[0]);
if (isNaN(time)) {
time = 1;
}
AudioManager.fadeOutCv(time);
}
if (command == "StopCV") {
AudioManager.stopCv();
}
if (command == "DcreaseVolume") {
AudioManager.decreaseVolume();
}
};
/******************************************************************************/
//
// Window_Options
//
/******************************************************************************/
var _Window_Options_prototype_addVolumeOptions =
Window_Options.prototype.addVolumeOptions;
Window_Options.prototype.addVolumeOptions = function () {
_Window_Options_prototype_addVolumeOptions.call(this);
this.addCommand(p_commandText_WindowOptions, "cvVolume");
};
/******************************************************************************/
//
// Scene_Base
//
/******************************************************************************/
var _Scene_Base_prototype_fadeOutAll = Scene_Base.prototype.fadeOutAll;
Scene_Base.prototype.fadeOutAll = function () {
var time = this.slowFadeSpeed() / 60;
AudioManager.fadeOutCv(time);
_Scene_Base_prototype_fadeOutAll.call(this);
};
/******************************************************************************/
//
// Scene_Title
//
/******************************************************************************/
var _Scene_Title_prototype_playTitleMusic =
Scene_Title.prototype.playTitleMusic;
Scene_Title.prototype.playTitleMusic = function () {
_Scene_Title_prototype_playTitleMusic.call(this);
AudioManager.stopCv();
};
/******************************************************************************/
//
// Scene_Map
//
/******************************************************************************/
var _Scene_Map_prototype_stopAudioOnBattleStart =
Scene_Map.prototype.stopAudioOnBattleStart;
Scene_Map.prototype.stopAudioOnBattleStart = function () {
_Scene_Map_prototype_stopAudioOnBattleStart.call(this);
AudioManager.stopCv();
};
/******************************************************************************/
//
// Scene_Battle
//
/******************************************************************************/
var _Scene_Battle_prototype_terminate = Scene_Battle.prototype.terminate;
Scene_Battle.prototype.terminate = function () {
_Scene_Battle_prototype_terminate.call(this);
AudioManager.stopCv();
};
/******************************************************************************/
//
// ConfigManager
//
/******************************************************************************/
Object.defineProperty(ConfigManager, "cvVolume", {
get: function () {
return AudioManager.cvVolume;
},
set: function (value) {
AudioManager.cvVolume = value;
},
configurable: true,
});
var ConfigManager_makeData = ConfigManager.makeData;
ConfigManager.makeData = function () {
var config = ConfigManager_makeData.call(this);
config.cvVolume = this.cvVolume;
return config;
};
var ConfigManager_applyData = ConfigManager.applyData;
ConfigManager.applyData = function (config) {
ConfigManager_applyData.call(this, config);
this.cvVolume = this.readVolume(config, "cvVolume");
};
/******************************************************************************/
//
// AudioManager
//
/******************************************************************************/
AudioManager._cvVolume = 100;
AudioManager._cvBuffer = null;
Object.defineProperty(AudioManager, "cvVolume", {
get: function () {
return this._cvVolume;
},
set: function (value) {
this._cvVolume = value;
},
configurable: true,
});
AudioManager.decreaseVolume = function () {
if (this._currentBgm && this._bgmBuffer && this._bgmBuffer.isPlaying()) {
if (p_bgmVolume_DuringPlayCV == 0) {
this._currentBgm.pos = this._bgmBuffer.seek();
this._bgmBuffer.stop();
} else {
this.updateBufferParametersDuringPlayCV.call(
this,
this._bgmBuffer,
p_bgmVolume_DuringPlayCV,
this._bgmVolume
);
}
}
if (this._currentBgs && this._bgsBuffer && this._bgsBuffer.isPlaying()) {
if (p_bgsVolume_DuringPlayCV == 0) {
this._currentBgs.pos = this._bgsBuffer.seek();
this._bgsBuffer.stop();
} else {
this.updateBufferParametersDuringPlayCV.call(
this,
this._bgsBuffer,
p_bgsVolume_DuringPlayCV,
this._bgsVolume
);
}
}
if (this._meBuffer && this._meBuffer.isPlaying()) {
if (p_meVolume_DuringPlayCV == 0) {
this._meBuffer.stop();
this._meBuffer = null;
} else {
this.updateBufferParametersDuringPlayCV.call(
this,
this._meBuffer,
p_meVolume_DuringPlayCV,
this._meVolume
);
}
}
if (
this._seBuffers &&
this._seBuffers.filter(function (audio) {
return audio.isPlaying();
})
) {
if (p_seVolume_DuringPlayCV == 0) {
this.stopSe();
} else {
this.updateBufferParametersDuringPlayCV.call(
this,
this._seBuffers,
p_seVolume_DuringPlayCV,
this._seVolume
);
}
}
};
AudioManager.playCv = function (cv) {
if (cv.name) {
this.stopCv();
this._cvBuffer = this.createBuffer(p_cv_StoreFolderName, cv.name);
this.updateCvParameters(cv);
this._cvBuffer.play(false);
this._cvBuffer.addStopListener(this.stopCv.bind(this));
}
};
AudioManager.updateCvParameters = function (cv) {
this.updateBufferParameters(this._cvBuffer, this._cvVolume, cv);
};
AudioManager.fadeOutCv = function (duration) {
if (this._cvBuffer) {
this._cvBuffer.fadeOut(duration);
}
};
AudioManager.stopCv = function () {
if (this._cvBuffer) {
this._cvBuffer.stop();
this._cvBuffer = null;
}
};
AudioManager.updateBufferParametersDuringPlayCV = function (
buffers,
value,
configVolume
) {
if (!Array.isArray(buffers)) {
buffers = new Array(buffers);
}
for (var i = 0; i < buffers.length; i++) {
if (p_useToVolume) {
buffers[i].volume = (value * (buffers[i].volume || 0)) / 100;
} else {
buffers[i].volume =
(Math.floor((configVolume * value) / 100) *
(buffers[i].volume || 0)) /
100;
}
}
};
var _AudioManager_stopAll = AudioManager.stopAll;
AudioManager.stopAll = function () {
_AudioManager_stopAll.call(this);
this.stopCv();
};
var _AudioManager_checkErrors = AudioManager.checkErrors;
AudioManager.checkErrors = function () {
_AudioManager_checkErrors.call(this);
this.checkWebAudioError(this._cvBuffer);
};
})();

View file

@ -0,0 +1,135 @@
/*:
* @plugindesc Plugin used to set basic parameters.
* @author RM CoreScript team
*
* @help This plugin does not provide plugin commands.
*
* @param cacheLimit
* @desc For setting the upper limit of image memory cache. (MPix)
* @default 10
*
* @param screenWidth
* @desc For setting the screen width.
* @default 816
*
* @param screenHeight
* @desc For setting the screen height.
* @default 624
*
* @param changeWindowWidthTo
* @desc If set, change window width to this value
*
* @param changeWindowHeightTo
* @desc If set, change window height to this value
*
* @param renderingMode
* @desc Rendering mode (canvas/webgl/auto)
* @default auto
*
* @param alwaysDash
* @desc To set initial value as to whether the player always dashes. (on/off)
* @default off
*/
/*:ja
* @plugindesc 基本的なパラメーターを設定するプラグインです
* @author RM CoreScript team
*
* @help このプラグインにはプラグインコマンドはありません
*
* @param cacheLimit
* @desc 画像のメモリへのキャッシュの上限値 (MPix)
* @default 10
*
* @param screenWidth
* @desc 画面サイズの幅
* @default 816
*
* @param screenHeight
* @desc 画面サイズの高さ
* @default 624
*
* @param changeWindowWidthTo
* @desc 値が設定された場合ウインドウの幅を指定した値に変更
*
* @param changeWindowHeightTo
* @desc 値が設定された場合ウインドウの高さを指定した値に変更
*
* @param renderingMode
* @desc レンダリングモード (canvas/webgl/auto)
* @default auto
*
* @param alwaysDash
* @desc プレイヤーが常時ダッシュするかどうかの初期値 (on/off)
* @default off
*/
(function () {
function toNumber(str, def) {
return isNaN(str) ? def : +(str || def);
}
var parameters = PluginManager.parameters("Community_Basic");
var cacheLimit = toNumber(parameters["cacheLimit"], 10);
var screenWidth = toNumber(parameters["screenWidth"], 816);
var screenHeight = toNumber(parameters["screenHeight"], 624);
var renderingMode = parameters["renderingMode"].toLowerCase();
var alwaysDash = parameters["alwaysDash"].toLowerCase() === "on";
var windowWidthTo = toNumber(parameters["changeWindowWidthTo"], 0);
var windowHeightTo = toNumber(parameters["changeWindowHeightTo"], 0);
var windowWidth;
var windowHeight;
if (windowWidthTo) {
windowWidth = windowWidthTo;
} else if (screenWidth !== SceneManager._screenWidth) {
windowWidth = screenWidth;
}
if (windowHeightTo) {
windowHeight = windowHeightTo;
} else if (screenHeight !== SceneManager._screenHeight) {
windowHeight = screenHeight;
}
ImageCache.limit = cacheLimit * 1000 * 1000;
SceneManager._screenWidth = screenWidth;
SceneManager._screenHeight = screenHeight;
SceneManager._boxWidth = screenWidth;
SceneManager._boxHeight = screenHeight;
SceneManager.preferableRendererType = function () {
if (Utils.isOptionValid("canvas")) {
return "canvas";
} else if (Utils.isOptionValid("webgl")) {
return "webgl";
} else if (renderingMode === "canvas") {
return "canvas";
} else if (renderingMode === "webgl") {
return "webgl";
} else {
return "auto";
}
};
var _ConfigManager_applyData = ConfigManager.applyData;
ConfigManager.applyData = function (config) {
_ConfigManager_applyData.apply(this, arguments);
if (config["alwaysDash"] === undefined) {
this.alwaysDash = alwaysDash;
}
};
var _SceneManager_initNwjs = SceneManager.initNwjs;
SceneManager.initNwjs = function () {
_SceneManager_initNwjs.apply(this, arguments);
if (Utils.isNwjs() && windowWidth && windowHeight) {
var dw = windowWidth - window.innerWidth;
var dh = windowHeight - window.innerHeight;
window.moveBy(-dw / 2, -dh / 2);
window.resizeBy(dw, dh);
}
};
})();

View file

@ -0,0 +1,783 @@
//=============================================================================
// CustomizeConfigItem.js
// ----------------------------------------------------------------------------
// Copyright (c) 2015 Triacontane
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 2.1.0 2017/12/15 追加項目のデフォルト項目を含めた並び順を自由に設定できる機能を追加
// 項目名称を日本語化
// 2.0.1 2017/10/15 2.0.0の修正によりスイッチ項目を有効にしたときにゲーム開始するとエラーになる問題を修正
// 2.0.0 2017/09/10 ツクールの型指定機能に対応し、各オプション項目を任意の数だけ追加できる機能を追加
// 1.2.3 2017/06/08 1.2.2の修正により起動できなくなっていた問題を修正
// 1.2.2 2017/05/27 競合の可能性のある記述Objectクラスへのプロパティ追加をリファクタリング
// 1.2.1 2016/12/08 1.2.0の機能追加以降、デフォルト項目で決定ボタンを押すとエラーになっていた現象を修正
// 1.2.0 2016/12/02 各項目で決定ボタンを押したときに実行されるスクリプトを設定できる機能を追加
// 1.1.1 2016/08/14 スイッチ項目、音量項目の初期値が無効になっていた問題を修正
// 1.1.0 2016/04/29 項目をクリックしたときに項目値が循環するよう修正
// 1.0.0 2016/01/17 初版
// ----------------------------------------------------------------------------
// [Blog] : http://triacontane.blogspot.jp/
// [Twitter]: https://twitter.com/triacontane/
// [GitHub] : https://github.com/triacontane/
//=============================================================================
/*:
* @plugindesc オプション任意項目作成プラグイン
* @author トリアコンタン
*
* @param 数値項目
* @desc 追加する数値項目のオプション項目情報です
* @default
* @type struct<NumberData>[]
*
* @param 文字項目
* @desc 追加する文字項目のオプション項目情報です
* @default
* @type struct<StringData>[]
*
* @param スイッチ項目
* @desc 追加するスイッチ項目のオプション項目情報です
* @default
* @type struct<BooleanData>[]
*
* @param 音量項目
* @desc 追加する音量項目のオプション項目情報です
* @default
* @type struct<VolumeData>[]
*
* @help オプション画面に任意の項目を追加します
* 項目の種類は以下の四種類があります
* 不要な項目は値を空に設定してください
*
* スイッチ項目
* ON/OFFを選択する項目です指定した番号のスイッチと値が同期されます
* オプションから値を設定すればそれがスイッチに反映され
* スイッチを変更すればオプションの値に反映されます
* さらに値はセーブデータ間で共有されます
* 隠しフラグを設定するとオプション画面に表示されなくなります
* ゲームを進めないと出現しない項目などに利用できます
* 隠しフラグはプラグインコマンドから解除できます
*
* スクリプトは上級者向け項目です対象にカーソルを合わせて決定ボタンを
* 押下すると指定したJavaScriptを実行できます
* 主に専用の設定画面などの遷移に使用します
*
* 数値項目
* 数値を選択する項目です指定した番号の変数と値が同期されます
* スイッチ項目で指定した内容に加えて
* 最小値と最大値および一回の入力で変化する値を指定します
*
* 音量項目
* 音量を選択する項目ですBGMボリュームなどと同じ仕様で
* キャラクターごとのボイス音量等に使ってください
*
* 文字項目
* 文字を選択する項目です指定した文字の配列から項目を選択します
* 選択した文字のインデックス(開始位置は0)が変数に設定されます
* 初期値に設定する値もインデックスです
*
* プラグインコマンド詳細
* イベントコマンドプラグインコマンドから実行
* パラメータの間は半角スペースで区切る
*
* CC_UNLOCK or
* オプション任意項目の隠し解除 [項目名]
*  指定した項目の隠しフラグを解除します
* 使用例CC_UNLOCK 数値項目1
*
* 利用規約
* 作者に無断で改変再配布が可能で利用形態商用18禁利用等
* についても制限はありません
* このプラグインはもうあなたのものです
*/
/*~struct~NumberData:
* @param Name
* @text 項目名称
* @desc 項目の名称です
* @default 数値項目1
*
* @param DefaultValue
* @text 初期値
* @desc 項目の初期値です
* @default 0
* @type number
*
* @param VariableID
* @text 変数番号
* @desc 項目の設定内容が格納される変数番号です
* @default 0
* @type variable
*
* @param HiddenFlag
* @text 隠しフラグ
* @desc 項目がデフォルトで隠されるようになりますプラグインコマンドの実行で表示されます
* @default false
* @type boolean
*
* @param Script
* @text スクリプト
* @desc 項目を決定したときに実行されるスクリプトです
* @default
*
* @param NumberMin
* @text 最小値
* @desc 項目の最小値です
* @default 0
* @type number
*
* @param NumberMax
* @text 最大値
* @desc 項目の最大値です
* @default 100
* @type number
*
* @param NumberStep
* @text 変化値
* @desc 項目を操作したときの数値の変化量です
* @default 20
* @type number
*
* @param AddPosition
* @text 追加位置
* @desc 項目を追加する位置です指定した項目の上に追加されます
* @default
* @type select
* @option 末尾に追加
* @value
* @option 常時ダッシュ
* @value alwaysDash
* @option コマンド記憶
* @value commandRemember
* @option BGM 音量
* @value bgmVolume
* @option BGS 音量
* @value bgsVolume
* @option ME 音量
* @value meVolume
* @option SE 音量
* @value seVolume
*/
/*~struct~BooleanData:
* @param Name
* @text 項目名称
* @desc 項目の名称です
* @default スイッチ項目1
*
* @param DefaultValue
* @text 初期値
* @desc 項目の初期値です
* @default false
* @type boolean
*
* @param SwitchID
* @text スイッチ番号
* @desc 項目の設定内容が格納されるスイッチ番号です
* @default 0
* @type switch
*
* @param HiddenFlag
* @text 隠しフラグ
* @desc 項目がデフォルトで隠されるようになりますプラグインコマンドの実行で表示されます
* @default false
* @type boolean
*
* @param Script
* @text スクリプト
* @desc 項目を決定したときに実行されるスクリプトです
* @default
*
* @param AddPosition
* @text 追加位置
* @desc 項目を追加する位置です指定した項目の上に追加されます
* @default
* @type select
* @option 末尾に追加
* @value
* @option 常時ダッシュ
* @value alwaysDash
* @option コマンド記憶
* @value commandRemember
* @option BGM 音量
* @value bgmVolume
* @option BGS 音量
* @value bgsVolume
* @option ME 音量
* @value meVolume
* @option SE 音量
* @value seVolume
*/
/*~struct~StringData:
* @param Name
* @text 項目名称
* @desc 項目の名称です
* @default 文字列項目1
*
* @param DefaultValue
* @text 初期値
* @desc 項目の初期値ですインデックスの数値を指定します
* @default 0
* @type number
*
* @param VariableID
* @text 変数番号
* @desc 項目の設定内容が格納される変数番号です
* @default 0
* @type variable
*
* @param HiddenFlag
* @text 隠しフラグ
* @desc 項目がデフォルトで隠されるようになりますプラグインコマンドの実行で表示されます
* @default false
* @type boolean
*
* @param Script
* @text スクリプト
* @desc 項目を決定したときに実行されるスクリプトです
* @default
*
* @param StringItems
* @text 内容の配列
* @desc 項目の設定内容の配列です
* @default
* @type string[]
*
* @param AddPosition
* @text 追加位置
* @desc 項目を追加する位置です指定した項目の上に追加されます
* @default
* @type select
* @option 末尾に追加
* @value
* @option 常時ダッシュ
* @value alwaysDash
* @option コマンド記憶
* @value commandRemember
* @option BGM 音量
* @value bgmVolume
* @option BGS 音量
* @value bgsVolume
* @option ME 音量
* @value meVolume
* @option SE 音量
* @value seVolume
*/
/*~struct~VolumeData:
* @param Name
* @text 項目名称
* @desc 項目の名称です
* @default 音量項目1
*
* @param DefaultValue
* @text 初期値
* @desc 項目の初期値です
* @default 0
* @type number
*
* @param VariableID
* @text 変数番号
* @desc 項目の設定内容が格納される変数番号です
* @default 0
* @type variable
*
* @param HiddenFlag
* @text 隠しフラグ
* @desc 項目がデフォルトで隠されるようになりますプラグインコマンドの実行で表示されます
* @default false
* @type boolean
*
* @param Script
* @text スクリプト
* @desc 項目を決定したときに実行されるスクリプトです
* @default
*
* @param AddPosition
* @text 追加位置
* @desc 項目を追加する位置です指定した項目の上に追加されます
* @default
* @type select
* @option 末尾に追加
* @value
* @option 常時ダッシュ
* @value alwaysDash
* @option コマンド記憶
* @value commandRemember
* @option BGM 音量
* @value bgmVolume
* @option BGS 音量
* @value bgsVolume
* @option ME 音量
* @value meVolume
* @option SE 音量
* @value seVolume
*/
(function () {
"use strict";
var pluginName = "CustomizeConfigItem";
var getParamString = function (paramNames) {
var value = getParamOther(paramNames);
return value == null ? "" : value;
};
var getParamOther = function (paramNames) {
if (!Array.isArray(paramNames)) paramNames = [paramNames];
for (var i = 0; i < paramNames.length; i++) {
var name = PluginManager.parameters(pluginName)[paramNames[i]];
if (name) return name;
}
return null;
};
var getParamArrayJson = function (paramNames, defaultValue) {
var value = getParamString(paramNames) || null;
try {
value = JSON.parse(value);
if (value === null) {
value = defaultValue;
} else {
value = value.map(function (valueData) {
return JSON.parse(valueData);
});
}
} catch (e) {
alert(
`!!!Plugin param is wrong.!!!\nPlugin:${pluginName}.js\nName:[${paramNames}]\nValue:${value}`
);
value = defaultValue;
}
return value;
};
var getCommandName = function (command) {
return (command || "").toUpperCase();
};
var getArgNumber = function (arg, min, max) {
if (arguments.length < 2) min = -Infinity;
if (arguments.length < 3) max = Infinity;
return (parseInt(arg) || 0).clamp(min, max);
};
var getArgBoolean = function (arg) {
return (arg || "").toUpperCase() === "TRUE";
};
var getArgJson = function (arg, defaultValue) {
try {
arg = JSON.parse(arg || null);
if (arg === null) {
arg = defaultValue;
}
} catch (e) {
alert(
`!!!Plugin param is wrong.!!!\nPlugin:${pluginName}.js\nValue:${arg}`
);
arg = defaultValue;
}
return arg;
};
var iterate = function (that, handler) {
Object.keys(that).forEach(function (key, index) {
handler.call(that, key, that[key], index);
});
};
//=============================================================================
// パラメータの取得と整形
//=============================================================================
var param = {};
param.numberOptions = getParamArrayJson(["NumberOptions", "数値項目"], []);
param.stringOptions = getParamArrayJson(["StringOptions", "文字項目"], []);
param.switchOptions = getParamArrayJson(
["SwitchOptions", "スイッチ項目"],
[]
);
param.volumeOptions = getParamArrayJson(["VolumeOptions", "音量項目"], []);
var localOptionWindowIndex = 0;
//=============================================================================
// Game_Interpreter
// プラグインコマンドを追加定義します。
//=============================================================================
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
this.pluginCommandCustomizeConfigItem(command, args);
};
Game_Interpreter.prototype.pluginCommandCustomizeConfigItem = function (
command,
args
) {
switch (getCommandName(command)) {
case "CC_UNLOCK":
case "オプション任意項目の隠し解除":
ConfigManager.customParamUnlock(args[0]);
break;
}
};
//=============================================================================
// ConfigManager
// 追加項目の設定値や初期値を管理します。
//=============================================================================
ConfigManager.customParams = null;
ConfigManager.hiddenInfo = {};
ConfigManager._symbolNumber = "Number";
ConfigManager._symbolBoolean = "Boolean";
ConfigManager._symbolString = "String";
ConfigManager._symbolVolume = "Volume";
ConfigManager.getCustomParams = function () {
if (this.customParams) {
return this.customParams;
}
this.customParams = {};
param.numberOptions.forEach(function (optionItem, index) {
this.makeNumberOption(optionItem, index);
}, this);
param.stringOptions.forEach(function (optionItem, index) {
this.makeStringOption(optionItem, index);
}, this);
param.switchOptions.forEach(function (optionItem, index) {
this.makeSwitchOption(optionItem, index);
}, this);
param.volumeOptions.forEach(function (optionItem, index) {
this.makeVolumeOption(optionItem, index);
}, this);
return this.customParams;
};
ConfigManager.makeNumberOption = function (optionItem, index) {
var data = this.makeCommonOption(optionItem, index, this._symbolNumber);
data.min = getArgNumber(optionItem.NumberMin);
data.max = getArgNumber(optionItem.NumberMax);
data.offset = getArgNumber(optionItem.NumberStep);
this.pushOptionData(data);
};
ConfigManager.makeStringOption = function (optionItem, index) {
var data = this.makeCommonOption(optionItem, index, this._symbolString);
data.values = getArgJson(optionItem.StringItems, ["no item"]);
data.min = 0;
data.max = data.values.length - 1;
this.pushOptionData(data);
};
ConfigManager.makeSwitchOption = function (optionItem, index) {
var data = this.makeCommonOption(optionItem, index, this._symbolBoolean);
data.initValue = getArgBoolean(optionItem.DefaultValue);
data.variable = getArgNumber(optionItem.SwitchID);
this.pushOptionData(data);
};
ConfigManager.makeVolumeOption = function (optionItem, index) {
var data = this.makeCommonOption(optionItem, index, this._symbolVolume);
this.pushOptionData(data);
};
ConfigManager.makeCommonOption = function (optionItem, index, type) {
var data = {};
data.symbol = `${type}${index + 1}`;
data.name = optionItem.Name;
data.hidden = getArgBoolean(optionItem.HiddenFlag);
data.script = optionItem.Script;
data.initValue = getArgNumber(optionItem.DefaultValue);
data.variable = getArgNumber(optionItem.VariableID, 0);
data.addPotion = optionItem.AddPosition;
return data;
};
ConfigManager.pushOptionData = function (data) {
this.customParams[data.symbol] = data;
};
var _ConfigManager_makeData = ConfigManager.makeData;
ConfigManager.makeData = function () {
var config = _ConfigManager_makeData.apply(this, arguments);
config.hiddenInfo = {};
iterate(
this.getCustomParams(),
function (symbol) {
config[symbol] = this[symbol];
config.hiddenInfo[symbol] = this.hiddenInfo[symbol];
}.bind(this)
);
return config;
};
var _ConfigManager_applyData = ConfigManager.applyData;
ConfigManager.applyData = function (config) {
_ConfigManager_applyData.apply(this, arguments);
iterate(
this.getCustomParams(),
function (symbol, item) {
if (symbol.contains(this._symbolBoolean)) {
this[symbol] = this.readFlagCustom(config, symbol, item);
} else if (symbol.contains(this._symbolVolume)) {
this[symbol] = this.readVolumeCustom(config, symbol, item);
} else {
this[symbol] = this.readOther(config, symbol, item);
}
this.hiddenInfo[symbol] = config.hiddenInfo
? config.hiddenInfo[symbol]
: item.hidden;
}.bind(this)
);
};
ConfigManager.customParamUnlock = function (name) {
iterate(
this.getCustomParams(),
function (symbol, item) {
if (item.name === name) this.hiddenInfo[symbol] = false;
}.bind(this)
);
this.save();
};
ConfigManager.readOther = function (config, name, item) {
var value = config[name];
if (value !== undefined) {
return Number(value).clamp(item.min, item.max);
} else {
return item.initValue;
}
};
ConfigManager.readFlagCustom = function (config, name, item) {
if (config[name] !== undefined) {
return this.readFlag(config, name);
} else {
return item.initValue;
}
};
ConfigManager.readVolumeCustom = function (config, name, item) {
if (config[name] !== undefined) {
return this.readVolume(config, name);
} else {
return item.initValue;
}
};
ConfigManager.exportCustomParams = function () {
if (!$gameVariables || !$gameSwitches) return;
iterate(
this.getCustomParams(),
function (symbol, item) {
if (item.variable > 0) {
if (symbol.contains(this._symbolBoolean)) {
$gameSwitches.setValue(item.variable, !!this[symbol]);
} else {
$gameVariables.setValue(item.variable, this[symbol]);
}
}
}.bind(this)
);
};
ConfigManager.importCustomParams = function () {
if (!$gameVariables || !$gameSwitches) return;
iterate(
this.getCustomParams(),
function (symbol, item) {
if (item.variable > 0) {
if (symbol.contains(this._symbolBoolean)) {
this[symbol] = $gameSwitches.value(item.variable);
} else if (symbol.contains(this._symbolVolume)) {
this[symbol] = $gameVariables.value(item.variable).clamp(0, 100);
} else {
this[symbol] = $gameVariables
.value(item.variable)
.clamp(item.min, item.max);
}
}
}.bind(this)
);
};
var _ConfigManager_save = ConfigManager.save;
ConfigManager.save = function () {
_ConfigManager_save.apply(this, arguments);
this.exportCustomParams();
};
//=============================================================================
// Game_Map
// リフレッシュ時にオプション値を同期します。
//=============================================================================
var _Game_Map_refresh = Game_Map.prototype.refresh;
Game_Map.prototype.refresh = function () {
_Game_Map_refresh.apply(this, arguments);
ConfigManager.importCustomParams();
};
//=============================================================================
// DataManager
// セーブ時とロード時にオプション値を同期します。
//=============================================================================
var _DataManager_setupNewGame = DataManager.setupNewGame;
DataManager.setupNewGame = function () {
_DataManager_setupNewGame.apply(this, arguments);
ConfigManager.exportCustomParams();
};
var _DataManager_loadGameWithoutRescue = DataManager.loadGameWithoutRescue;
DataManager.loadGameWithoutRescue = function (savefileId) {
var result = _DataManager_loadGameWithoutRescue.apply(this, arguments);
ConfigManager.exportCustomParams();
return result;
};
//=============================================================================
// Window_Options
// 追加項目を描画します。
//=============================================================================
var _Window_Options_initialize = Window_Options.prototype.initialize;
Window_Options.prototype.initialize = function () {
this._customParams = ConfigManager.getCustomParams();
_Window_Options_initialize.apply(this, arguments);
this.select(localOptionWindowIndex);
localOptionWindowIndex = 0;
};
var _Window_Options_makeCommandList =
Window_Options.prototype.makeCommandList;
Window_Options.prototype.makeCommandList = function () {
_Window_Options_makeCommandList.apply(this, arguments);
this.addCustomOptions();
};
Window_Options.prototype.addCustomOptions = function () {
iterate(
this._customParams,
function (key, item) {
if (!ConfigManager.hiddenInfo[key]) {
this.addCommand(item.name, key);
if (item.addPotion) {
this.shiftCustomOptions(item.addPotion);
}
}
}.bind(this)
);
};
Window_Options.prototype.shiftCustomOptions = function (addPotion) {
var targetCommand = this._list.filter(function (command) {
return command.symbol === addPotion;
})[0];
if (!targetCommand) {
return;
}
var targetIndex = this._list.indexOf(targetCommand);
var newCommand = this._list.pop();
this._list.splice(targetIndex, 0, newCommand);
};
var _Window_Options_statusText = Window_Options.prototype.statusText;
Window_Options.prototype.statusText = function (index) {
var result = _Window_Options_statusText.apply(this, arguments);
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
if (this.isNumberSymbol(symbol)) {
result = this.numberStatusText(value);
} else if (this.isStringSymbol(symbol)) {
result = this.stringStatusText(value, symbol);
}
return result;
};
Window_Options.prototype.isNumberSymbol = function (symbol) {
return symbol.contains(ConfigManager._symbolNumber);
};
Window_Options.prototype.isStringSymbol = function (symbol) {
return symbol.contains(ConfigManager._symbolString);
};
Window_Options.prototype.isCustomSymbol = function (symbol) {
return !!this._customParams[symbol];
};
Window_Options.prototype.numberStatusText = function (value) {
return value;
};
Window_Options.prototype.stringStatusText = function (value, symbol) {
return this._customParams[symbol].values[value];
};
var _Window_Options_processOk = Window_Options.prototype.processOk;
Window_Options.prototype.processOk = function () {
if (!this._shiftValue(1, true))
_Window_Options_processOk.apply(this, arguments);
this.execScript();
};
var _Window_Options_cursorRight = Window_Options.prototype.cursorRight;
Window_Options.prototype.cursorRight = function (wrap) {
if (!this._shiftValue(1, false))
_Window_Options_cursorRight.apply(this, arguments);
};
var _Window_Options_cursorLeft = Window_Options.prototype.cursorLeft;
Window_Options.prototype.cursorLeft = function (wrap) {
if (!this._shiftValue(-1, false))
_Window_Options_cursorLeft.apply(this, arguments);
};
Window_Options.prototype._shiftValue = function (sign, loopFlg) {
var symbol = this.commandSymbol(this.index());
var value = this.getConfigValue(symbol);
if (this.isNumberSymbol(symbol)) {
value += this.numberOffset(symbol) * sign;
this.changeValue(symbol, this._clampValue(value, symbol, loopFlg));
return true;
}
if (this.isStringSymbol(symbol)) {
value += sign;
this.changeValue(symbol, this._clampValue(value, symbol, loopFlg));
return true;
}
return false;
};
Window_Options.prototype.execScript = function () {
var symbol = this.commandSymbol(this.index());
if (!this.isCustomSymbol(symbol)) return;
var script = this._customParams[symbol].script;
if (script) eval(script);
localOptionWindowIndex = this.index();
};
Window_Options.prototype._clampValue = function (value, symbol, loopFlg) {
var maxValue = this._customParams[symbol].max;
var minValue = this._customParams[symbol].min;
if (loopFlg) {
if (value > maxValue) value = minValue;
if (value < minValue) value = maxValue;
}
return value.clamp(
this._customParams[symbol].min,
this._customParams[symbol].max
);
};
Window_Options.prototype.numberOffset = function (symbol) {
var value = this._customParams[symbol].offset;
if (Input.isPressed("shift")) value *= 10;
return value;
};
Window_Options.prototype.windowHeight = function () {
return this.fittingHeight(Math.min(this.numVisibleRows(), 14));
};
})();

View file

@ -0,0 +1,107 @@
//=============================================================================
// CustomizeMaxSaveFile.js
// ----------------------------------------------------------------------------
// Copyright (c) 2015 Triacontane
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// Version
// 1.1.1 2017/02/25 セーブファイル数により大きな値を設定できるよう上限を開放
// 1.1.0 2016/11/03 オートセーブなど最大数以上のIDに対してセーブするプラグインとの競合に対応
// 1.0.0 2016/03/19 初版
// ----------------------------------------------------------------------------
// [Blog] : http://triacontane.blogspot.jp/
// [Twitter]: https://twitter.com/triacontane/
// [GitHub] : https://github.com/triacontane/
//=============================================================================
/*:
* @plugindesc Customize max save file number
* @author triacontane
*
* @param SaveFileNumber
* @desc max save file number(1...100)
* @default 20
*
* @help Customize max save file number
*
* No plugin command
*
* This plugin is released under the MIT License.
*/
/*:ja
* @plugindesc 最大セーブファイル数変更プラグイン
* @author トリアコンタン
*
* @param セーブファイル数
* @desc 最大セーブファイル数です
* @default 20
*
* @help 最大セーブファイル数をパラメータで指定した値に変更します
*
* このプラグインにはプラグインコマンドはありません
*
* 利用規約
* 作者に無断で改変再配布が可能で利用形態商用18禁利用等
* についても制限はありません
* このプラグインはもうあなたのものです
*/
(function () {
"use strict";
var pluginName = "CustomizeMaxSaveFile";
var getParamNumber = function (paramNames, min, max) {
var value = getParamOther(paramNames);
if (arguments.length < 2) min = -Infinity;
if (arguments.length < 3) max = Infinity;
return (parseInt(value, 10) || 0).clamp(min, max);
};
var getParamOther = function (paramNames) {
if (!Array.isArray(paramNames)) paramNames = [paramNames];
for (var i = 0; i < paramNames.length; i++) {
var name = PluginManager.parameters(pluginName)[paramNames[i]];
if (name) return name;
}
return null;
};
var paramSaveFileNumber = getParamNumber(
["SaveFileNumber", "セーブファイル数"],
0
);
//=============================================================================
// DataManager
// セーブファイルの数をカスタマイズします。
//=============================================================================
var _DataManager_loadGlobalInfo = DataManager.loadGlobalInfo;
DataManager.loadGlobalInfo = function () {
if (!this._globalInfo) {
this._globalInfo = _DataManager_loadGlobalInfo.apply(this, arguments);
}
return this._globalInfo;
};
var _DataManager_saveGlobalInfo = DataManager.saveGlobalInfo;
DataManager.saveGlobalInfo = function (info) {
_DataManager_saveGlobalInfo.apply(this, arguments);
this._globalInfo = null;
};
var _DataManager_maxSavefiles = DataManager.maxSavefiles;
DataManager.maxSavefiles = function () {
return paramSaveFileNumber
? paramSaveFileNumber
: _DataManager_maxSavefiles.apply(this, arguments);
};
var _DataManager_isThisGameFile = DataManager.isThisGameFile;
DataManager.isThisGameFile = function (savefileId) {
if (savefileId > this.maxSavefiles()) {
return false;
} else {
return _DataManager_isThisGameFile.apply(this, arguments);
}
};
})();

Some files were not shown because too many files have changed in this diff Show more