Skip to content

Commit

Permalink
v0.70
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7c13 committed Aug 5, 2023
1 parent ebcc8d8 commit 417a6b2
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Assets/Resources/Prefabs/Game Resource Viewer.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
10 changes: 5 additions & 5 deletions Assets/Scripts/Core/DataReader/Txt/TaskDefinitionFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/Pal3/GameSystem/TaskManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ICommand>.Instance.Register(this);
Expand Down Expand Up @@ -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;
}
}

Expand Down
4 changes: 2 additions & 2 deletions Assets/Scripts/Pal3/State/SaveManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ public List<ICommand> 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
Expand Down
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ PlayerSettings:
vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0
bundleVersion: 0.67
bundleVersion: 0.70
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down
2 changes: 1 addition & 1 deletion README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down

0 comments on commit 417a6b2

Please sign in to comment.