scorpion1453 92 Posted December 2, 2019 Share Posted December 2, 2019 (edited) M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) This is the hidden content, please Sign In or Sign Up ( GitHub ) Hi everyone! There is a simple renewal make.sh for qc file: Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 49 2 1 1 1 1 1 11 2 30 Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10275 Posted December 2, 2019 Forum Moderator Share Posted December 2, 2019 (edited) I don't see the reason why you would do that, but it's fine, here's the python version if someone wants it. This is the hidden content, please Sign In or Sign Up Edited December 3, 2020 by VegaS™ 31 1 1 1 1 3 2 33 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Morpheus™ 47 Posted December 10, 2019 Share Posted December 10, 2019 Hey all! Could somebody write on quest_list? Thanks Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10275 Posted December 11, 2019 Forum Moderator Share Posted December 11, 2019 On 12/10/2019 at 11:58 PM, Morpheus™ said: Could somebody write on quest_list? Not tested, i'm not at home. What's new: You can use comment sections in locale_list, helps you to identify much faster the quests. Two methods of reading, if you enable QC_READ_FILE_FROM_LIST, all of the quests from locale_list will be compiled, if you enable QC_READ_ALL, all of the quests file from specific directory (folders/sub-folders) will be compiled. How-To-Use: python make.py This is the hidden content, please Sign In or Sign Up 17 1 2 3 16 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Mafuyu 51 Posted December 29, 2019 Share Posted December 29, 2019 (edited) Spoiler On 12/11/2019 at 12:19 PM, VegaS™ said: Not tested, i'm not at home. What's new: You can use comment sections in locale_list, helps you to identify much faster the quests. Two methods of reading, if you enable QC_READ_FILE_FROM_LIST, all of the quests from locale_list will be compiled, if you enable QC_READ_ALL, all of the quests file from specific directory (folders/sub-folders) will be compiled. How-To-Use: python make.py #! /usr/bin/env python # -*- coding: utf-8 -*- __author__ = "VegaS" __date__ = "2019-12-11" __version__ = "0.0.1" import os import subprocess os.chdir(os.path.dirname(os.path.realpath(__file__))) QC_READ_FILE_FROM_LIST = 0 QC_READ_ALL = 1 """ # QC_READ_FILE_FROM_LIST # Read the locale_list with all quest/lua files. """ # The file with all quest file names. QC_FILE_NAME = 'locale_list' """ # QC_READ_ALL # Find all of the quest/lua files from root directory """ # Directory path of searching quest file names QC_ROOT_PATH = '.' # File extensions to be search QC_EXTENSION_LIST = ('.lua', '.quest') """ # General configuration """ # Command of quest compiler QC_COMMAND_STRING = './qc {}' # Comment string QC_COMMENT_CHARACTER = '#' # Default state QC_READ_STATE = QC_READ_FILE_FROM_LIST def find_quest_files(type): """ Generate all of the file names by specific type. :param type: int :return: generator """ if type == QC_READ_FILE_FROM_LIST: with open(QC_FILE_NAME, 'r') as file: for fileName in file.readlines(): if fileName.strip(): yield fileName elif type == QC_READ_ALL: for root, dirs, files in os.walk(QC_ROOT_PATH): for fileName in files: if fileName.endswith(QC_EXTENSION_LIST): yield "{}/{}".format(root, fileName) def strip_quest_file_name(fileName): """ Strip file name, ignore the commented sections. :param fileName: string :return: string """ fileName = fileName.strip() if QC_COMMENT_CHARACTER in fileName: fileName = fileName.split(QC_COMMENT_CHARACTER)[0].strip() return fileName def main(): QC_LOG_DICT = {'ok': 0, 'error': 0} for fileName in find_quest_files(QC_READ_STATE): fileName = strip_quest_file_name(fileName) if fileName: hasCompiled = subprocess.call(QC_COMMAND_STRING.format(fileName), shell=True) == 0 QC_LOG_DICT['ok' if hasCompiled else 'error'] += 1 print ('All quests are compiled, succeeded: {}, failed: {}.'.format(*QC_LOG_DICT.values())) if __name__ == "__main__": main() it doesnt works when your quest have defines before the state start xxxxxx/Flammenrun.quest:1:must start with 'quest' and yours doesnt tells you where it failed, u have to scroll the whole console up to the error, because it doesnt stop there or even tell you where it fails. you have to find it in the console by yourself Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10275 Posted January 5, 2020 Forum Moderator Share Posted January 5, 2020 On 12/29/2019 at 10:52 PM, Mafuyu said: it doesnt works when your quest have defines before the state start xxxxxx/Flammenrun.quest:1:must start with 'quest' You've to use pre_qc.py or make some changes on your qc core for enable defines in quests. On 12/29/2019 at 10:52 PM, Mafuyu said: and yours doesnt tells you where it failed, u have to scroll the whole console up to the error, because it doesnt stop there or even tell you where it fails. you have to find it in the console by yourself Updated, check my previous reply again. 2 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Recommended Posts