变更初始事件、cgtext实现方式

This commit is contained in:
草莓 2025-03-23 09:34:39 +08:00
parent a132bb8d16
commit 31f6a76b4b
11 changed files with 2052 additions and 2821 deletions

View File

@ -905,6 +905,8 @@ action
| resumeBgm_s | resumeBgm_s
| loadBgm_s | loadBgm_s
| freeBgm_s | freeBgm_s
| drawbackground_s
| clearbackground_s
| playSound_s | playSound_s
| playSound_1_s | playSound_1_s
| stopSound_s | stopSound_s
@ -1137,7 +1139,7 @@ return code;
*/; */;
cgtext_s cgtext_s
: '背景' EvalString? '不使用背景' Bool? '回忆滤镜' Bool? '移除对话框' Bool? '剧情库序列' Int '头像' EvalString?'坐标PX' Number'打字间隔' Int? BGNL? Newline : '剧情cg文本 移除对话框' Bool? '剧情库序列' Int '头像' EvalString?'坐标PX' Number'打字间隔' Int? BGNL? Newline
'自动等待时长' Int BGNL? Newline '自动等待时长' Int BGNL? Newline
textcgDrawingList+? Newline textcgDrawingList+? Newline
@ -1145,12 +1147,11 @@ cgtext_s
/* cgtext_s /* cgtext_s
tooltip : cgtext显示一段包含cg的文字剧情 tooltip : cgtext显示一段包含cg的文字剧情
helpUrl : /_docs/#/instruction helpUrl : /_docs/#/instruction
allImages : ['EvalString_0','EvalString_1'] allImages : ['EvalString_0']
default : ["bg_5043.webp",false,false,false,0,"face_050445.webp",-300,0,2000,"","这句话显示在对话框内",[{ "name":"tati_050145a.webp" , "px": 100,"filter":false }]] default : [false,0,"face_050445.webp",-300,0,2000,"","这句话显示在对话框内",[{ "name":"tati_050145a.webp" , "px": 100,"filter":false }]]
var head ='{ "name": "'+EvalString_1+'", "px": '+Number_0+' }' var head ='{ "name": "'+EvalString_0+'", "px": '+Number_0+' }'
var list=',"bodyList": [\n'+textcgDrawingList_0.slice(0,-1)+'\n]' var list=',"bodyList": [\n'+textcgDrawingList_0.slice(0,-1)+'\n]'
Bool_0=Bool_0?',"nobg":'+Bool_0:'' var code = '{"type": "cgtext","WindowSkin":'+Bool_0+',"head":'+head+' ,"index":"'+Int_0+'","time":'+Int_1+',"wait":'+Int_2+list+' },\n';
var code = '{"type": "cgtext", "bg":"'+EvalString_0+'"'+Bool_0+',"memory":'+Bool_1+',"WindowSkin":'+Bool_2+',"head":'+head+' ,"index":"'+Int_0+'","time":'+Int_1+',"wait":'+Int_2+list+' },\n';
return code; return code;
*/; */;
textcgDrawingList textcgDrawingList
@ -1967,6 +1968,34 @@ var code = '{"type": "changebg", "img1": "'+EvalString_0+'","memory1":'+Bool_0+'
return code; return code;
*/; */;
drawbackground_s
: '绘制背景' EvalString? '回忆滤镜' Bool? Newline
/* drawbackground_s
tooltip : drawbackground 绘制剧情背景
helpUrl : /_docs/#/instruction
default : ["",false]
colour : this.soundColor
allImages : ['EvalString_0']
var code = '{"type": "drawbackground", "image": "'+EvalString_0+'","memory":'+Bool_0+'},\n';
return code;
*/;
clearbackground_s
: '清除cg背景' Newline
/* clearbackground_s
tooltip : clearbackground: 剧情背景清除
helpUrl : /_docs/#/instruction
default : []
colour : this.soundColor
var code = '{"type": "clearbackground"},\n';
return code;
*/;
drawWarning_s drawWarning_s
: '警告坐标x' PosString 'y' PosString '缩放倍率'EvalString '文字大小'Int '警告内容' EvalString? '副标题' EvalString? '不播放音效' Bool? Newline : '警告坐标x' PosString 'y' PosString '缩放倍率'EvalString '文字大小'Int '警告内容' EvalString? '副标题' EvalString? '不播放音效' Bool? Newline

View File

@ -566,9 +566,6 @@ MotaActionParser = function () {
return res; return res;
}; };
this.next = MotaActionBlocks["cgtext_s"].xmlText([ this.next = MotaActionBlocks["cgtext_s"].xmlText([
data.bg,
data.nobg??false,
data.memory,
data.WindowSkin, data.WindowSkin,
data.index, data.index,
data.head.name, data.head.name,
@ -1994,7 +1991,7 @@ MotaActionParser = function () {
this.next, this.next,
]); ]);
break; break;
case "changebg": // 等待多少毫秒 case "changebg": // 改变背景
this.next = MotaActionBlocks["changebg_s"].xmlText([ this.next = MotaActionBlocks["changebg_s"].xmlText([
data.img1 ?? "", data.img1 ?? "",
data.memory1 ?? false, data.memory1 ?? false,
@ -2005,6 +2002,18 @@ MotaActionParser = function () {
this.next, this.next,
]); ]);
break; break;
case "drawbackground": // 绘制背景
this.next = MotaActionBlocks["drawbackground_s"].xmlText([
data.image ?? "",
data.memory ?? false,
this.next,
]);
break;
case "clearbackground": // 清除背景
this.next = MotaActionBlocks["clearbackground_s"].xmlText([
this.next,
]);
break;
case "wait": // 等待用户操作 case "wait": // 等待用户操作
var case_waitList = null; var case_waitList = null;
if (data.data) { if (data.data) {

View File

@ -2,6 +2,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
{ {
"main": { "main": {
"floorIds": [ "floorIds": [
"chushi",
"Caimhome", "Caimhome",
"jiuguan", "jiuguan",
"KTV", "KTV",
@ -1523,7 +1524,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"title": "秽翼的尤斯蒂娅", "title": "秽翼的尤斯蒂娅",
"name": "Eustia_text", "name": "Eustia_text",
"version": "鸽子窝造塔小队", "version": "鸽子窝造塔小队",
"floorId": "jiaocheng01", "floorId": "chushi",
"hero": { "hero": {
"image": "hero.webp", "image": "hero.webp",
"animate": false, "animate": false,
@ -1548,7 +1549,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"loc": { "loc": {
"direction": "up", "direction": "up",
"x": 6, "x": 6,
"y": 12 "y": 6
}, },
"flags": { "flags": {
"itemDetail": true, "itemDetail": true,
@ -1949,21 +1950,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
{ {
"type": "insert", "type": "insert",
"name": "chapter0" "name": "chapter0"
},
{
"type": "confirm",
"text": "要进行教程内容吗",
"yes": [],
"no": [
{
"type": "changeFloor",
"floorId": "guangchang",
"loc": [
6,
10
]
}
]
} }
], ],
"shops": [ "shops": [

File diff suppressed because it is too large Load Diff

View File

@ -27,8 +27,6 @@ main.floors.KTV=
}, },
{ {
"type": "cgtext", "type": "cgtext",
"bg": "bg_3531.webp",
"memory": false,
"WindowSkin": false, "WindowSkin": false,
"head": { "head": {
"name": "", "name": "",
@ -47,8 +45,6 @@ main.floors.KTV=
}, },
{ {
"type": "cgtext", "type": "cgtext",
"bg": "bg_3531.webp",
"memory": false,
"WindowSkin": false, "WindowSkin": false,
"head": { "head": {
"name": "", "name": "",
@ -67,8 +63,6 @@ main.floors.KTV=
}, },
{ {
"type": "cgtext", "type": "cgtext",
"bg": "bg_3531.webp",
"memory": false,
"WindowSkin": false, "WindowSkin": false,
"head": { "head": {
"name": "", "name": "",
@ -87,8 +81,6 @@ main.floors.KTV=
}, },
{ {
"type": "cgtext", "type": "cgtext",
"bg": "bg_3531.webp",
"memory": false,
"WindowSkin": false, "WindowSkin": false,
"head": { "head": {
"name": "", "name": "",
@ -107,8 +99,6 @@ main.floors.KTV=
}, },
{ {
"type": "cgtext", "type": "cgtext",
"bg": "bg_3531.webp",
"memory": false,
"WindowSkin": false, "WindowSkin": false,
"head": { "head": {
"name": "", "name": "",
@ -127,8 +117,6 @@ main.floors.KTV=
}, },
{ {
"type": "cgtext", "type": "cgtext",
"bg": "bg_3531.webp",
"memory": false,
"WindowSkin": false, "WindowSkin": false,
"head": { "head": {
"name": "", "name": "",
@ -147,8 +135,6 @@ main.floors.KTV=
}, },
{ {
"type": "cgtext", "type": "cgtext",
"bg": "bg_3531.webp",
"memory": false,
"WindowSkin": false, "WindowSkin": false,
"head": { "head": {
"name": "", "name": "",
@ -167,8 +153,6 @@ main.floors.KTV=
}, },
{ {
"type": "cgtext", "type": "cgtext",
"bg": "bg_3531.webp",
"memory": false,
"WindowSkin": false, "WindowSkin": false,
"head": { "head": {
"name": "", "name": "",
@ -185,6 +169,15 @@ main.floors.KTV=
} }
] ]
}, },
{
"type": "changebg",
"img1": "bg_3531.webp",
"memory1": false,
"img2": "",
"memory2": false,
"time": 30,
"style": "引出"
},
{ {
"type": "setHeroOpacity", "type": "setHeroOpacity",
"opacity": 1 "opacity": 1

79
project/floors/chushi.js Normal file
View File

@ -0,0 +1,79 @@
main.floors.chushi=
{
"floorId": "chushi",
"title": "抉择",
"name": "1",
"width": 13,
"height": 13,
"canFlyTo": true,
"canFlyFrom": true,
"canUseQuickShop": true,
"images": [],
"ratio": 1,
"defaultGround": "T400",
"firstArrive": [
{
"type": "confirm",
"text": "要进行教程内容吗",
"yes": [
{
"type": "changeFloor",
"floorId": "jiaocheng01",
"loc": [
6,
12
]
}
],
"no": [
{
"type": "changeFloor",
"floorId": "guangchang",
"loc": [
6,
10
]
}
]
}
],
"eachArrive": [],
"parallelDo": "",
"events": {},
"changeFloor": {},
"beforeBattle": {},
"afterBattle": {},
"afterGetItem": {},
"afterOpenDoor": {},
"autoEvent": {},
"cannotMove": {},
"cannotMoveIn": {},
"map": [
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
],
"areas": "抉择",
"bgmap": [
],
"fgmap": [
],
"bg2map": [
],
"fg2map": [
]
}

View File

@ -1724,6 +1724,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
} }
}, },
"updateStatusBar": function () { "updateStatusBar": function () {
if (!core.control.noAutoEvents) core.checkAutoEvents()
// 更新状态栏 // 更新状态栏
core.ui.statusBar.update(); core.ui.statusBar.update();
// 更新阻激夹域的伤害值 // 更新阻激夹域的伤害值

View File

@ -120,7 +120,8 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
"T364": 88, "T364": 88,
"T365": 89, "T365": 89,
"T397": 90, "T397": 90,
"T399": 91 "T399": 91,
"T400": 92
}, },
"animates": { "animates": {
"star": 0, "star": 0,

View File

@ -298,6 +298,7 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"397": {"cls":"items","id":"postman"}, "397": {"cls":"items","id":"postman"},
"398": {"cls":"terrains","id":"T397"}, "398": {"cls":"terrains","id":"T397"},
"399": {"cls":"terrains","id":"T399"}, "399": {"cls":"terrains","id":"T399"},
"400": {"cls":"terrains","id":"T400"},
"20034": {"cls":"tileset","id":"X20034","canPass":true}, "20034": {"cls":"tileset","id":"X20034","canPass":true},
"20154": {"cls":"tileset","id":"X20154","canPass":true}, "20154": {"cls":"tileset","id":"X20154","canPass":true},
"20216": {"cls":"tileset","id":"X20216","canPass":true}, "20216": {"cls":"tileset","id":"X20216","canPass":true},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

File diff suppressed because it is too large Load Diff