mirror of
https://gitlab.com/YuukiPS/GC-Resources.git
synced 2025-04-28 09:05:26 +00:00
Apply quest patches from CustomGCResources
This commit is contained in:
parent
63a32c0a67
commit
2de85fbd04
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
scene_grid.json
|
||||
/Tool/*.json
|
||||
.idea/
|
||||
|
||||
Tool/Patches/
|
||||
|
@ -650,5 +650,6 @@
|
||||
"prePerformCfg": "",
|
||||
"lockGameTime": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 3303136414174011
|
||||
}
|
@ -2280,5 +2280,6 @@
|
||||
"questId": 11026,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 6382832627668464
|
||||
}
|
@ -702,5 +702,6 @@
|
||||
"questId": 11029,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 8878640560529176
|
||||
}
|
@ -1570,5 +1570,6 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 7063052926021205
|
||||
}
|
@ -1086,5 +1086,6 @@
|
||||
"questId": 13022,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 3392155838449487
|
||||
}
|
@ -2029,5 +2029,6 @@
|
||||
"questId": 13027,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 7011940783148892
|
||||
}
|
@ -777,6 +777,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -816,6 +822,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1502,6 +1514,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1541,6 +1559,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -2140,6 +2164,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -2179,6 +2209,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -2852,6 +2888,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -775,5 +775,6 @@
|
||||
"questId": 3006,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 5515318060794455
|
||||
}
|
@ -773,5 +773,6 @@
|
||||
"prePerformCfg": "",
|
||||
"lowPriority": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 2690561074476991
|
||||
}
|
@ -1263,5 +1263,6 @@
|
||||
"questId": 3016,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 8823377679488754
|
||||
}
|
@ -397,5 +397,6 @@
|
||||
"prePerformCfg": "",
|
||||
"lowPriority": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 6971018813708261
|
||||
}
|
@ -1091,5 +1091,6 @@
|
||||
"questId": 3020,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 3668457735028873
|
||||
}
|
@ -701,5 +701,6 @@
|
||||
"questId": 3021,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 7828263898924570
|
||||
}
|
@ -1896,5 +1896,6 @@
|
||||
"questId": 3022,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 1731098136837715
|
||||
}
|
@ -1055,5 +1055,6 @@
|
||||
"prePerformCfg": "",
|
||||
"lockGameTime": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 6476534441942898
|
||||
}
|
@ -1152,5 +1152,6 @@
|
||||
"questId": 3031,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 9022022255533344
|
||||
}
|
@ -158,7 +158,13 @@
|
||||
"exclusiveNpcList": [
|
||||
1001
|
||||
],
|
||||
"exclusiveNpcPriority": 1000
|
||||
"exclusiveNpcPriority": 1000,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100164,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"talks": [
|
||||
|
@ -172,7 +172,13 @@
|
||||
1009,
|
||||
1006
|
||||
],
|
||||
"exclusiveNpcPriority": 1000
|
||||
"exclusiveNpcPriority": 1000,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 1021,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"subId": 37904,
|
||||
|
@ -185,7 +185,13 @@
|
||||
1009,
|
||||
1006
|
||||
],
|
||||
"exclusiveNpcPriority": 1000
|
||||
"exclusiveNpcPriority": 1000,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100163,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"subId": 38304,
|
||||
|
@ -313,7 +313,13 @@
|
||||
}
|
||||
],
|
||||
"failExec": [],
|
||||
"beginExec": []
|
||||
"beginExec": [],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100165,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"talks": [
|
||||
|
@ -2255,5 +2255,6 @@
|
||||
"prePerformCfg": "",
|
||||
"lockGameTime": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 2850973778349534
|
||||
}
|
@ -1420,5 +1420,6 @@
|
||||
"prePerformCfg": "",
|
||||
"lockGameTime": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 5623150388305012
|
||||
}
|
@ -1489,5 +1489,6 @@
|
||||
"prePerformCfg": "",
|
||||
"lockGameTime": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 3865005622692177
|
||||
}
|
@ -1650,5 +1650,6 @@
|
||||
"prePerformCfg": "",
|
||||
"lockGameTime": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 2376853844266094
|
||||
}
|
@ -1358,5 +1358,6 @@
|
||||
"prePerformCfg": "",
|
||||
"lockGameTime": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 2320676109514370
|
||||
}
|
@ -389,5 +389,6 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 3752791881230737
|
||||
}
|
@ -1993,5 +1993,6 @@
|
||||
"questId": 40090,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 4619433776189609
|
||||
}
|
@ -1503,5 +1503,6 @@
|
||||
"questId": 40091,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 1887105619472354
|
||||
}
|
@ -683,5 +683,6 @@
|
||||
"questId": 40093,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 1020957878910151
|
||||
}
|
@ -700,5 +700,6 @@
|
||||
"prePerformCfg": "",
|
||||
"lockGameTime": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 3317415676555482
|
||||
}
|
@ -505,5 +505,6 @@
|
||||
"questId": 40103,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 2291016110713471
|
||||
}
|
@ -312,7 +312,13 @@
|
||||
"exclusiveNpcList": [
|
||||
1011
|
||||
],
|
||||
"exclusiveNpcPriority": 1100
|
||||
"exclusiveNpcPriority": 1100,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100225,
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"subId": 45105,
|
||||
|
@ -150,6 +150,12 @@
|
||||
"exclusiveNpcList": [
|
||||
1213,
|
||||
1525
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100171,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -130,7 +130,13 @@
|
||||
1663,
|
||||
1433
|
||||
],
|
||||
"exclusiveNpcPriority": 1100
|
||||
"exclusiveNpcPriority": 1100,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100214,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"subId": 46522,
|
||||
|
@ -91,7 +91,13 @@
|
||||
"sharedNpcList": [
|
||||
1479
|
||||
],
|
||||
"exclusiveNpcPriority": 1100
|
||||
"exclusiveNpcPriority": 1100,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100064,
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"subId": 46703,
|
||||
|
@ -66,7 +66,13 @@
|
||||
"exclusiveNpcList": [
|
||||
1002
|
||||
],
|
||||
"exclusiveNpcPriority": 1080
|
||||
"exclusiveNpcPriority": 1080,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100224,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"subId": 48102,
|
||||
|
@ -781,6 +781,12 @@
|
||||
"exclusiveNpcPriority": 1080,
|
||||
"exclusivePlaceList": [
|
||||
305
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100236,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -916,5 +916,6 @@
|
||||
"questId": 8012,
|
||||
"prePerformCfg": ""
|
||||
}
|
||||
]
|
||||
],
|
||||
"videoKey": 5138399499418108
|
||||
}
|
@ -7497,7 +7497,13 @@
|
||||
"exclusiveNpcList": [
|
||||
1001
|
||||
],
|
||||
"exclusiveNpcPriority": 1000
|
||||
"exclusiveNpcPriority": 1000,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100164,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"json_file": "373.json",
|
||||
@ -9973,6 +9979,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -10015,6 +10027,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -10749,6 +10767,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -10791,6 +10815,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -11432,6 +11462,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -11474,6 +11510,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -12183,6 +12225,12 @@
|
||||
"beginExec": [],
|
||||
"trialAvatarList": [
|
||||
11
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100175,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -12352,7 +12400,13 @@
|
||||
1009,
|
||||
1006
|
||||
],
|
||||
"exclusiveNpcPriority": 1000
|
||||
"exclusiveNpcPriority": 1000,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 1021,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"json_file": "379.json",
|
||||
@ -13203,7 +13257,13 @@
|
||||
1009,
|
||||
1006
|
||||
],
|
||||
"exclusiveNpcPriority": 1000
|
||||
"exclusiveNpcPriority": 1000,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100163,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"json_file": "383.json",
|
||||
@ -13577,7 +13637,13 @@
|
||||
}
|
||||
],
|
||||
"failExec": [],
|
||||
"beginExec": []
|
||||
"beginExec": [],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100165,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"json_file": "397.json",
|
||||
@ -20523,7 +20589,13 @@
|
||||
"exclusiveNpcList": [
|
||||
1011
|
||||
],
|
||||
"exclusiveNpcPriority": 1100
|
||||
"exclusiveNpcPriority": 1100,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100225,
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"json_file": "451.json",
|
||||
@ -22905,6 +22977,12 @@
|
||||
"exclusiveNpcList": [
|
||||
1213,
|
||||
1525
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100171,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -24495,7 +24573,13 @@
|
||||
1663,
|
||||
1433
|
||||
],
|
||||
"exclusiveNpcPriority": 1100
|
||||
"exclusiveNpcPriority": 1100,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100214,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"json_file": "465.json",
|
||||
@ -27605,7 +27689,13 @@
|
||||
"sharedNpcList": [
|
||||
1479
|
||||
],
|
||||
"exclusiveNpcPriority": 1100
|
||||
"exclusiveNpcPriority": 1100,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100064,
|
||||
"count": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"json_file": "467.json",
|
||||
@ -28318,7 +28408,13 @@
|
||||
"exclusiveNpcList": [
|
||||
1002
|
||||
],
|
||||
"exclusiveNpcPriority": 1080
|
||||
"exclusiveNpcPriority": 1080,
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100224,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"json_file": "481.json",
|
||||
@ -32046,6 +32142,12 @@
|
||||
"exclusiveNpcPriority": 1080,
|
||||
"exclusivePlaceList": [
|
||||
305
|
||||
],
|
||||
"gainItems": [
|
||||
{
|
||||
"itemId": 100236,
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
repo:gitlab.com/YuukiPS/GC-Resources
|
||||
ver:3.6.0
|
||||
patches:Amber
|
||||
patches:Custom,Amber,Time
|
||||
scripts:official
|
||||
hasserverres:true
|
||||
hasscenescriptdata:true
|
||||
|
@ -8,6 +8,13 @@ if (!fs.existsSync(questData3_2)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const questPatchesDir = "Patches/Quest";
|
||||
if (!fs.existsSync(questPatchesDir)) {
|
||||
console.log("Place a copy of the patches directory from the custom resources repository in the same directory as this script.");
|
||||
console.log("Ensure the custom resources has a 'Quest' directory.")
|
||||
return;
|
||||
}
|
||||
|
||||
// Define constants.
|
||||
const unknownCondition = {
|
||||
type: "QUEST_COND_UNKNOWN",
|
||||
@ -42,6 +49,43 @@ const patches = {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* These are main quest patches which should be applied.
|
||||
* These are (basically) applied last.
|
||||
* Format is: { mainId: { (patches) } }
|
||||
*/
|
||||
const mainPatches = {
|
||||
|
||||
};
|
||||
|
||||
// Load quest patches from the patches directory.
|
||||
const questPatches = fs.readdirSync(questPatchesDir);
|
||||
for (const questPatch of questPatches) {
|
||||
const patchData = JSON.parse(fs.readFileSync(
|
||||
path.join(questPatchesDir, questPatch), "utf-8"));
|
||||
const mainQuestId = patchData.id;
|
||||
|
||||
// Check if the patch has sub-quests.
|
||||
if (patchData.subQuests) {
|
||||
for (const quest of patchData.subQuests) {
|
||||
const { subId } = quest;
|
||||
|
||||
// Clean the quest data.
|
||||
delete quest.subId;
|
||||
delete quest.mainId;
|
||||
|
||||
// Apply the patch.
|
||||
patches[subId] = quest;
|
||||
}
|
||||
}
|
||||
|
||||
delete patchData.id;
|
||||
delete patchData.subQuests;
|
||||
if (Object.keys(patchData).length > 0) {
|
||||
mainPatches[mainQuestId] = patchData;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a cleaned version of a condition/execution.
|
||||
*
|
||||
@ -325,6 +369,11 @@ for (const mainQuestData of mainQuest_data) {
|
||||
// Remove un-used fields.
|
||||
removeFields(quest);
|
||||
|
||||
// Check if the main quest has any patches.
|
||||
if (mainPatches[quest.id]) {
|
||||
Object.assign(quest, mainPatches[quest.id]);
|
||||
}
|
||||
|
||||
// Create the main quest file.
|
||||
fs.writeFileSync(
|
||||
`${binOutput}/${mainQuestId}.json`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user