ZQF-ReVN / RxValkyria

Valkyria's Engine Tools. | .sdt .dat .mg2
12 stars 2 forks source link

[SDT_TextEditor] Not Find Text Error #3

Closed lightning32x closed 6 months ago

lightning32x commented 6 months ago
PS F:\GalTools\Valkyria_Tools> .\SDT_TextEditor.exe -mode batch -way export -sdt  F:\GalGame\test\06_dat_editor\ -json  F:\GalGame\test\07\ -code 932
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0000.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0001.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0002.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0003.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0004.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0005.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0010.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0011.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0012.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0013.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0014.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0015.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0016.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0020.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0021.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0022.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen0023.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen1000.sdt"
Not Find Text: "F:\\GalGame\\test\\06_dat_editor\\seen1030.sdt"

我在试图处理以下文件中的sdt,但是仅能提取部分文本,报错如上所示。 链接:https://pan.quark.cn/s/7627e3ea91f2 提取码:Uftn 解压码:test 您要是方便能帮忙看一下吗

Dir-A commented 6 months ago

修了 https://github.com/Dir-A/Valkyria_Tools/releases/tag/1.0

lightning32x commented 6 months ago

感谢!工具可以正常工作了。 还有一点小问题,seen1030.sdt这个文件是有两行文本的,工具还是报Not Find Text错误。

Dir-A commented 6 months ago

修了 https://github.com/Dir-A/Valkyria_Tools/commit/85078560bd19b5e0a2d32f6dce335a9ecf8e44a6 https://github.com/Dir-A/Valkyria_Tools/releases/tag/1.0

HOKORISAMA commented 6 months ago

I am getting this error saying-- E:\py valdat>sdt_textEditor -mode batch -way export -sdt sdt/ -json sdt_json/ -code 932 Not Find Text: "sdt/seen0000.sdt" Not Find Text: "sdt/seen0001.sdt" Not Find Text: "sdt/seen0002.sdt" Not Find Text: "sdt/seen0003.sdt" Not Find Text: "sdt/seen0004.sdt" Not Find Text: "sdt/seen0005.sdt" Not Find Text: "sdt/seen0010.sdt" Not Find Text: "sdt/seen0011.sdt" Not Find Text: "sdt/seen0012.sdt" Not Find Text: "sdt/seen0013.sdt" SDT_Code_SelectText::Parse Error! Screenshot (57)

Dir-A commented 6 months ago

upload the game sdt files,Otherwise I'm can not debugging.

HOKORISAMA commented 6 months ago

data06.zip and also some json file are extracting the 2 names at the end of list of dialogue--hers is json- seen1500.json

Dir-A commented 6 months ago

https://github.com/Dir-A/Valkyria_Tools/commit/84a791293c854a230f83e08571d660adfc34aee0 https://github.com/Dir-A/Valkyria_Tools/releases/tag/1.0

Don't know what you mean.

and also some json file are extracting the 2 names at the end of list of dialogue

HOKORISAMA commented 6 months ago

84a7912 https://github.com/Dir-A/Valkyria_Tools/releases/tag/1.0

Don't know what you mean.

and also some json file are extracting the 2 names at the end of list of dialogue

I mean that just above when the numerical entries there is a list with two names of game characters but in both org and tra key and value are different like "org":"Miria","tra":"aries". And the json file I attached is fine I'll attach the problematic json in some time. Also I've written some tools that can help to translate the game in a more easier way . My tool extract the json script to a xlsx file and names in a separate json file to replace in xlsx and in xlsx you can just write the translation in other column while looking at original text.and it extracts text from xlsx to json back ,so can I add those tools to your repository or something like that

Here is the json file-- seen2200.json In the json file at line 56 the names are enclosed in a dictionary and both name are different for or and tra see and it's the same with many other files as well.

Dir-A commented 6 months ago

I mean that just above when the numerical entries there is a list with two names of game characters but in both org and tra key and value are different like "org":"Miria","tra":"aries".

Didn't get your points line 56 is the select text ,usually there are two options, or even more, which means that it is an array in json value. If you are writing a tool, you should check if the value of the key 'org'/'tra' is a string or an array.

so can I add those tools to your repository or something like that

just open a pull request, add to this folder https://github.com/Dir-A/Valkyria_Tools/tree/main/etc

HOKORISAMA commented 6 months ago

Is there any way to change the font size of the game because 260 letters are too less.

Dir-A commented 6 months ago

If you're asking if there's a method, then sure, but if it's complicated, do you want to hear about it? Or maybe the method isn't complicated, but the average person isn't able to implement it

In short, the engine uses a global array like this char sg_aMsgBuffer[260]; ,every time it displays text it will first read the data from the sdt script into this buffer, and then a function will read the data in the buffer and draw the text, which of course also checks the length of the string in the buffer.

What you need to do is simple, change all references to this global variable to your own buffer and remove the length check.

In fact for most cases 260 bytes is enough, depending on the encoding you use, the question I get asked the most is how to display Russian, since SJIS includes all the Russian words, it's easy to use the cp932 encoding to display Russian, but there may be a character indent problem, SJIS encodes all the Russian words into 2 bytes, whereas the cp1251 encoding is one byte for each word, which means that if you encode the Russian text using the direct encoding of SJIS you will halve the available space.

HOKORISAMA commented 6 months ago

You mean I have to change the buffer length in all the files that are in repository?

HOKORISAMA commented 6 months ago

There is a system.dat file which have font name and data name like dat02-00 and so on so is there way to write a tool for that as it's not in much human readable format.

HOKORISAMA commented 6 months ago

Also how you made this tool I mean how did you knew about how can you extract the file like on what bases you thought that the data buffer is 260 or the header entry should be like this I also want to write some tools for some engines. And I have very much experience in python.

Dir-A commented 6 months ago

You don't understand what I'm saying because you don't know the process of going from assembly language to high-level language.

Let's just forget about python, learn how to write a compiler in c, write an interpreter for your own language, get to know how c converts to assembly, get to know the relationship between c and c++,go to stl and learn about the memory structure of a map vector list.

Of course this is just the foundation of the foundation, you should also learn Windows native programming, PE structure, and understand how a program goes from source code to an exe file

If you learn all of this, it will probably take few years of serious study and mastery of the details, however don't get too excited, it's only the equivalent of elementary school level

Now it's time to write your own game engine, and if you don't know the usual structure of engines, how are you going to speculate about them?

Anyway, it's just a long process,

Open the note in the etc folder and you'll find the answer

system.dat is the state of the engine VM,the engine uses this data to initialize the VM.

If you're interested in any of this, check this https://github.com/Dir-A/Dir-A_Essays_MD

HOKORISAMA commented 6 months ago

I'll be sure to check out you link and it indeed seems a very much time consuming and dedication oriented work. Thanks to you for writing this beautiful piece of code.

HOKORISAMA commented 6 months ago

By writing tools for engine I meant text extraction or packing or repacking tools. Thanks

HOKORISAMA commented 6 months ago

HI bro can you add some more debugging statements to this code like which json file and line is giving the error because sometime i get errors like Rxhut or something like json merge mismatch so it will help a lot if you can, if you got time then please give it a thought. thanks

HOKORISAMA commented 6 months ago

I am unable to pack these files both are same json file when i swith one with other than it packs to sdt here are the files. seen3800.json--it's not working. seen3800.json--ir's working. seen3800.zip--sdt file. The error is - E:\py valdat\Valk Excel Integtaion\C# TOOLS\Xlsx_To_Json> sdtv1 -mode batch -way import -sdt sdt/ -json problem/ -new sdt_new/ -code 936 RxCvt::ToMBCS Error!

and the problem seems to be in the lines between 1150 to 1200 of json file.

Dir-A commented 6 months ago

RxCvt::ToMBCS Error! means that there are characters that cannot be converted to cp936

error line in

"tra": "Ah-- it's so hot!️" Ah-- it's so hot!?"

You added an extra character after the exclamation point.

If you are not translat to Chinese, don't use cp936, cp936 is actually gbk encoding, a kind of Chinese encoding, you should use cp932->sjis

HOKORISAMA commented 6 months ago

RxCvt::ToMBCS Error! means that there are characters that cannot be converted to cp936

Thanks for replying.

xibadeyu commented 3 months ago

您好大佬,我在解包的时候也遇到了同样的问题 image sdt文件如下 链接:https://pan.baidu.com/s/17p_6Go5fdZNlEbKelzQPCg?pwd=2666 提取码:2666 大佬您方便可以看一下吗