Erannorth Chronicles

Erannorth Chronicles

评价数不足
ECParse Script
   
奖励
收藏
已收藏
取消收藏
标签: Utility, Debug
文件大小
发表于
更新日期
69.582 KB
2021 年 12 月 11 日 下午 12:35
2023 年 7 月 17 日 上午 3:09
29 项改动说明 ( 查看 )

订阅以下载
ECParse Script

描述
This is not a proper mod for the game!

ECParse.py is a python script that reads the perks and action card definitions in Erranorth Chronicles, and reports on a number of simple syntax errors that may cause them to fail in game.

You will need to find the location that steam downloaded the files to. It will be something like this :
D:\Program Files (x86)\Steam\steamapps\workshop\content\1580800\2679758660

Before running ECParse.py you will need to edit the paths in ECParse_EditAndRenameMe.ini , and then save it out as ECParse.ini.

In particular you will need to set the 'RootPath' to be the location in which you installed the game.

You may have to set the output text files to be some location outside of the 'Program Files' directory to prevent issues with admin rights. (Though from testing , it appears to be fine for me as is)

If testing your own mod you will need to add the mod path as one of the additional paths.
Eg. :
AdditionalInputPath1 = D:\Program Files (x86)\Steam\steamapps\workshop\content\1580800\2664735315

You will likely also need to whitelist some extra terms that you are using in your files, to prevent the script from reporting them as errors.

If you have some custom properties on your cards you may need to add them to the Property and Status sections to whitelist them.

The script will read archetype and expertise names from various places in the mod , but you may need to add extra archetype names manually if it fails to find them in the places it checks.

When you run the script it should produce an Errors.txt file , that will contain the errors that were found, and also a DebugOutput.txt file that contains various other bits and peaces.

The main purpose of the DebugOutput.txt is to show information about various tokens that aren't being checked in full , so as to make it easier to spot if there are any that look odd/mispelt.

If nothing happens when you double click on ECParse.py, you may need to run it from a command prompt to see if python is spitting out any error messages of its own.

I have been testing this with Python 3.10 , but I imagine it will likely work on some earlier versions as well.

A bit about what files are actually checked... :

The script reads ModLoaderUser.conf and uses it for finding out the following.
1)The names of Cards .tdb files (which are assumed to live in the Actions directory)
2)The names of Perks .tdb files (which are assumed to live in the Perks subdirectory)
3)The names of classes and races , which are used to populate the known archetype list
4)The names of skills/expertises , which are used to populate the known expertise list.

The script also checks for all .json file in the Archetypes subdirectories, and assumes that the names of any files here are also valid Archetypes. It doesn't actually read the contents of these files at the moment , it just cares about the filenames.

Finally it parses the Cards and Perks files that were discovered from the ModLoaderUser.conf files , and gives errors for any unrecognised entries.
5 条留言
Ecirar  [作者] 2022 年 8 月 11 日 下午 10:50 
If things are not working correctly , then python may spit out an exception that might look something like this :

Traceback (most recent call last):
File "D:\Program Files (x86)\Steam\steamapps\workshop\content\1580800\2679758660\ECParse.py", line 2237, in <module>
MainFunction()
File "D:\Program Files (x86)\Steam\steamapps\workshop\content\1580800\2679758660\ECParse.py", line 2210, in MainFunction
ParseSetupFile()
File "D:\Program Files (x86)\Steam\steamapps\workshop\content\1580800\2679758660\ECParse.py", line 2145, in ParseSetupFile
file = open(szThisDir + '/ECParse.ini')
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Program Files (x86)\\Steam\\steamapps\\workshop\\content\\1580800\\2679758660/ECParse.ini'
[\i]

Hopefully whatever it says will give some clue as to what is going wrong.
Ecirar  [作者] 2022 年 8 月 11 日 下午 10:50 
If you aren't getting any output being written to the ECParseOutput directory , then your best bet will be to try running it from a command prompt so you can see if any error is being produced.

So do something like this :
1) Open a command prompt (WindowsKey+R and then type cmd)
2) Type the following in the command prompt window (including quotes):
"D:/Program Files (x86)/Steam/steamapps/workshop/content/1580800/2679758660/ECParse.py"
(If you are using a different drive for steam , then you will need to adjust this path accordingly).

When things are working correctly you should just get a message saying something like 'Errors = 1' , which indicates the number of errors found , and some text files will be written to the ECParseOutput subdirectory.

(Continued in next comment... 1000 character limit apparently)
Vanfreyr 2022 年 8 月 11 日 下午 8:19 
after running the file on notepad++ with the run function, it doesnt do anything, i made sure the ini had the proper directories in it and the name changed to ECParse.ini
Ecirar  [作者] 2021 年 12 月 15 日 上午 12:26 
Ah good , I'm glad someone has found it vaguely intelligible enough to be useful :)
Risewild 2021 年 12 月 14 日 下午 7:30 
This is a very useful tool.
Since I'm not a programmer or coder, I have no idea what I'm doing most of the time.

Small oversights and mistakes are common for me and those are very hard to detect. This tool is helping me to find all of those mistakes and oversights.

Thanks a lot for this, it definilty makes modding easier. :steamthumbsup::steamhappy: