diff --git a/Assets/Resources/Prefabs/Game Resource Viewer.prefab b/Assets/Resources/Prefabs/Game Resource Viewer.prefab index d58707cb8..d362ed5b6 100644 --- a/Assets/Resources/Prefabs/Game Resource Viewer.prefab +++ b/Assets/Resources/Prefabs/Game Resource Viewer.prefab @@ -1839,7 +1839,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Extract All .cpk files + m_text: Extract all .cpk files m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2} m_sharedMaterial: {fileID: 2847917559404452115, guid: 9e1d886e63529bb4ca3c95ece3e3189c, type: 2} diff --git a/Assets/Scripts/Core/DataReader/Txt/TaskDefinitionFile.cs b/Assets/Scripts/Core/DataReader/Txt/TaskDefinitionFile.cs index d22d0ded7..c4ca7a0e7 100644 --- a/Assets/Scripts/Core/DataReader/Txt/TaskDefinitionFile.cs +++ b/Assets/Scripts/Core/DataReader/Txt/TaskDefinitionFile.cs @@ -9,13 +9,13 @@ namespace Core.DataReader.Txt public struct Task { - public string TaskId; - public string TaskTitle; - public string TaskInfo; - public string TaskType; + public string Id; + public string Title; + public string Description; + public string Type; public string IsLastOne; - public bool IsMainTask => string.Equals(TaskType, "0", StringComparison.Ordinal); + public bool IsMainTask => string.Equals(Type, "0", StringComparison.Ordinal); } public sealed class TaskDefinitionFile diff --git a/Assets/Scripts/Core/DataReader/Txt/TaskDefinitionFileReader.cs b/Assets/Scripts/Core/DataReader/Txt/TaskDefinitionFileReader.cs index 5a51caeed..dc5a430c6 100644 --- a/Assets/Scripts/Core/DataReader/Txt/TaskDefinitionFileReader.cs +++ b/Assets/Scripts/Core/DataReader/Txt/TaskDefinitionFileReader.cs @@ -41,16 +41,16 @@ public TaskDefinitionFile Read(byte[] data) switch (tag) { case "tname": - currentTask.TaskId = value; + currentTask.Id = value; break; case "title": - currentTask.TaskTitle = value; + currentTask.Title = value; break; case "info": - currentTask.TaskInfo = value; + currentTask.Description = value; break; case "type": - currentTask.TaskType = value; + currentTask.Type = value; break; case "last": currentTask.IsLastOne = value; diff --git a/Assets/Scripts/Pal3/GameSystem/TaskManager.cs b/Assets/Scripts/Pal3/GameSystem/TaskManager.cs index d5c9deed8..db548aba8 100644 --- a/Assets/Scripts/Pal3/GameSystem/TaskManager.cs +++ b/Assets/Scripts/Pal3/GameSystem/TaskManager.cs @@ -46,7 +46,7 @@ public TaskManager(GameResourceProvider resourceProvider, TextMeshProUGUI taskIn foreach (Task task in taskDefinitionFile.Tasks) { - _tasks[task.TaskId] = task; + _tasks[task.Id] = task; } CommandExecutorRegistry.Instance.Register(this); @@ -79,7 +79,7 @@ public void Execute(TaskOpenCommand command) if (_tasks.TryGetValue(command.TaskId, out Task task) && task.IsMainTask) { - _taskInfoText.text = task.TaskInfo; + _taskInfoText.text = task.Description; } } diff --git a/Assets/Scripts/Pal3/State/SaveManager.cs b/Assets/Scripts/Pal3/State/SaveManager.cs index 53dd02b44..42d74b1a8 100644 --- a/Assets/Scripts/Pal3/State/SaveManager.cs +++ b/Assets/Scripts/Pal3/State/SaveManager.cs @@ -356,9 +356,9 @@ public List ConvertCurrentGameStateToCommands(SaveLevel saveLevel) #elif PAL3A // Save Task state commands.AddRange(_taskManager.GetOpenedTasks(). - Select(openedTask => new TaskOpenCommand(openedTask.TaskId))); + Select(openedTask => new TaskOpenCommand(openedTask.Id))); commands.AddRange(_taskManager.GetCompletedTasks(). - Select(completedTask => new TaskCompleteCommand(completedTask.TaskId))); + Select(completedTask => new TaskCompleteCommand(completedTask.Id))); #endif // Good to have diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index c187819f9..f0950d9d8 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -133,7 +133,7 @@ PlayerSettings: vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 loadStoreDebugModeEnabled: 0 - bundleVersion: 0.67 + bundleVersion: 0.70 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 diff --git a/README.en-US.md b/README.en-US.md index 2fee72201..619c3159c 100644 --- a/README.en-US.md +++ b/README.en-US.md @@ -52,7 +52,7 @@ Open the current project folder using Unity 2022 LTS version. For the specific U ``` ffmpeg -i input.mp4 -c:v libvpx -b:v 3M -c:a libvorbis output.webm // vp8 + vorbis ``` - Note: You need to first decompress the OG game data to get the .bik videos. You can do this by running "ExtractAllCpkArchives" command under "Scenes\ResourceViewer" scene, which decompress all the CPK archives in the OG game data folder to a destination folder you choose. All .bik videos will be extracted to the output location once complete. + Note: You need to first decompress the OG game data to get the .bik videos. You can do this by clicking the "Extract all .cpk files" button under "Scenes\ResourceViewer" scene, which decompress all the CPK archives in the OG game data folder to a destination folder you choose. All .bik videos will be extracted to the output location once completed. ## How to run the game - In runtime, when the game is launched for the first time, it will search the [Application.persistentDataPath](https://docs.unity3d.com/2022.3/Documentation/ScriptReference/Application-persistentDataPath.html) directory or the [StreamingAssets](https://docs.unity3d.com/2022.3/Documentation/Manual/StreamingAssets.html) directory to detect whether the game data exists. If the original game data files cannot be detected on desktop clients, the game will pop up a folder selection window for you to select the root directory of the original game installation files on the current device. diff --git a/README.md b/README.md index 37f25fcd2..23c85a6e1 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ - 第一次打开Unity项目之后,先双击选择Scenes\Game作为当前场景,然后点播放键即可。如果选择Scenes\ResourceViewer,则会打开游戏资源查看器。 - 第一次打开的时候会自动弹出文件夹选择窗口,请选择当前电脑上仙剑奇侠传三(或者外传)的安装文件夹即可。 - 因为原始游戏的过场动画为Bink格式,Unity并不原生支持,所以请自行转码视频为Unity所支持的格式放在游戏根目录下的movie文件夹即可(大部分设备和系统支持.mp4等主流格式视频,Linux下仅支持.webm格式视频)。 - - Linux用户可以使用FFmpeg转码视频为.webm格式封装,首先您需要选择Scenes\ResourceViewer场景,然后输入"ExtractAllCpkArchives"指令来解压所有原始游戏中的.cpk压缩包(包含movie.cpk,所有的Bink动画文件均在这个压缩包中) + - Linux用户可以使用FFmpeg转码视频为.webm格式封装,首先您需要选择Scenes\ResourceViewer场景,然后点击"Extract all .cpk files"按钮来解压所有原始游戏中的.cpk压缩包(包含movie.cpk,所有的Bink动画文件均在这个压缩包中) ``` ffmpeg -i input.mp4 -c:v libvpx -b:v 3M -c:a libvorbis output.webm // vp8 + vorbis ```