Sorry for long codes,for some reason I cannot access pastebin.
Here's a simple file tree:
resource
├bgm //BGM
├img //Pictures
├player
│├CommonData
│└th12
│ ├pl00 //Player Script "Reimu"
│ │├pl00_MainShotTask.dnh
│ │├pl00_OptionTask.dnh
│ │├pl00_Player.dnh
│ │├pl00_SpellCard.dnh
│ │└pl00_SubShotTask.dnh
│ ├...
│ ├pl06
│ └CommonBomb.dnh
├script
│├lib
││└lib_value.dnh
│└stage
│ ├bg
│ ├enemy
│ ├scl
│ │└stage1_scl.dnh
│ ├st_system
│ │├lib_PauseScene.dnh
│ │└lib_PauseFps.dnh
│ ├lib_manual.dnh //Maunal Scene
│ ├lib_MusicRoom.dnh //MusicRoom Scene
│ └musiccmt.txt //MusicRoom Comments
└se //Sound Effect
All of start is that I encode lib_value.dnh as UTF-16 LE BOM because it contains a string to set the default font of the text drawing in the game,and the name of the font contains chinese words.
// lib_value.dnh, Originally Shift-JIS
let CurrentFont = "飴鞭ゴシック等幅-04";//ゲームの共通フォント(The default font in the game)
let CurrentFontP = "飴鞭ゴシック等幅-04";//スペルカード名の共通フォント(The default font for spellcards' name)
---------->>>
// Saved as UTF-16 LE BOM
let CurrentFont = "黑体";//ゲームの共通フォント(The default font in the game)
let CurrentFontP = "黑体";//スペルカード名の共通フォント(The default font for spellcards' name)
Then I go to MusicRoom and find everything ok,same as SpellPractice Selection scene.(Both contains direct text drawing)
but if I go to Replay Selection the error spread:
#Include file is not found[<Game>/resource/script/stage/lib_PauseFps.dnh].
<Game>/resource/script/stage/lib_Manual.dnh
lib_Manual.dnh line(行)=282
↓
#include "./lib_PauseFps.dnh"
lib_Manual.dnh has only 281 lines codes,in fact.
The script contains #include "./lib_PauseFps.dnh" is lib_PauseScene.dnh// lib_PauseScene.dnh
#include "resource/script/lib/lib_files.dnh"
#include "resource/script/lib/lib_v0.12m_Effect.dnh"
#include "resource/script/lib/lib_SpellIndex.dnh"
#include "resource/script/stage/lib_SpellResult.dnh"
#include "resource/script/stage/lib_Manual.dnh"
#include "./lib_PauseFps.dnh"
Yeah here cause a problem,it is ok before I encode lib_value.dnh as UTF-16 LE BOM,but crashed after I did it.That's strange.
Sure I can solve by replacing Dot with "resource\script\stage\st_system",turly it works.
However after doing this the game still crashed for another error:
#Include file is not found[<Game>/resource/player/CommonData/pl00_MainShotTask.dnh].
<Game>/resource/player/CommonData/GaugeEffectTask.dnh
GaugeEffectTask.dnh line(行)=1588
↓
#include "./pl00_MainShotTask.dnh"
#include "./pl00_OptionTask.dnh"
#include "resource/player/th12/CommonBomb.dnh"
#include "./pl00_SpellCard.dnh"
And the file pl00_Player.dnh
// pl00_Player.dnh
#TouhouDanmakufu[Player]
#ScriptVersion[3]
#ID["Reimu"]
#Title["Reimu"]
#ReplayName["Reimu"]
#include "resource/script/lib/lib_usershot_th128.dnh"
#include "resource/script/lib/lib_v0.12m_function.dnh"
#include "resource/script/lib/lib_files.dnh"
#include "resource/script/lib/lib_Event.dnh"
#include "resource/script/lib/lib_ItemConst.dnh"
#include "resource/player/CommonData/LocalData.dnh"
#include "resource/player/CommonData/Spell_back.dnh"
#include "resource/player/CommonData/StatusIrregular.dnh"
#include "resource/player/CommonData/SlowEffectTask.dnh"
#include "resource/player/CommonData/GaugeEffectTask.dnh"
#include "./pl00_MainShotTask.dnh"
#include "./pl00_OptionTask.dnh"
#include "resource/player/th12/CommonBomb.dnh"
#include "./pl00_SpellCard.dnh"
these are just two of the errors.After I solve one by replacing Dot,the another will show up by the same problem of relative path.
And it seems in gaming script(such as background drawing)will cause it,too.
#Include file is not found[<Game>/resource/script/bg/bg_st1.dnh].
<Game>/resource/script/stage/lib_StageInclude.dnh
lib_StageInclude.dnh line(行)=270
↓
#include "./../bg/bg_st1.dnh"
#include "./lib_Stage1.dnh"
#include "./../enemy/lib/sp_bg/background_st1.dnh"
// stage1_scl.dnh
#TouhouDanmakufu[Stage]
#ScriptVersion[3]
#System["./../st_system/system.dnh"]//ここのシステム呼び出しは必須
#include "./../lib_StageInclude.dnh"
#include "./../bg/bg_st1.dnh"
#include "./lib_Stage1.dnh"
#include "./../enemy/lib/sp_bg/background_st1.dnh"
Here comes interesting thing, lib_StageInclude.dnh is found but bg_st1.dnh cannot found,and just caused by a encoding?