import os

# Util Imports
from Utils.Utils import FileIO

class AppData(object):
    def __init__(self):
        
        self.APP_PATH = os.getcwd()
        self.DEBUG: bool = True
        
        self.VERSION: list[str] = ["0.1.6", "3.7.0"]
        
        self.QUESTS: dict = {}
        self.ITEMS: dict = {}
        self.LOCALES: dict = {}
        self.REVERSED_LOCALES: dict = {}
        
        self.__initDataStores()
    
    def __initDataStores(self):
        print(f"{self.APP_PATH}/Data/Items.json")
        self.ITEMS = FileIO.loadJsonFile(f"{self.APP_PATH}\\Data\\Items.json")
        print(f"Loaded {len(self.ITEMS)} items.")
        
        self.LOCALES = FileIO.loadJsonFile(f"{self.APP_PATH}\\Data\\locale.json")
        print(f"Loaded {len(self.LOCALES)} locales.")
        
        self.QUESTS = FileIO.loadJsonFile(f"{self.APP_PATH}\\Data\\quests.json")
        print(f"Loaded {len(self.QUESTS)} Quests.")
        
        self.REVERSED_LOCALES = {value: key for key, value in self.LOCALES.items()}
        print(f"Loaded Reverse locale lookup")
    
    def setKey(self, key, value):
        pass
    
    def getKey(self, key):
        pass
TarkovTools/App/AppData.py
TarkovTools/Application
class Options(object):
    def __init__(self):
        pass
    
    def setOption(self, option, value):
        pass
    
    def getOption(self, option) -> None:
        pass

TarkovTools/App/Options.py
TarkovTools/Application
import string, random

# UI Imports
from Ui.Layouts.TarkovTools_ui import Ui_MainWindow

# Util Imports
from Utils.Constants import Constants

class Quest(object): 
    def __init__(self, mainWindow: Ui_MainWindow):
        self.mainWindow = mainWindow
        self.AFFIndex: int = 0
        self.AFSIndex: int = 0
        self.StartedIndex: int = 0
        self.SuccessIndex: int = 0
        self.FailIndex: int = 0
        
        # QuestFile
        self.QuestFile: dict = {}
        self.LocaleFile: dict = {}
            
        # Start
        self.AFS_Statuses: list = []
        self.AFS_Loyalty: list = []
            
        # Finish
        self.AFF_Loyalty: list = []
        self.AFF_Skills: list = []
        self.AFF_Items: list = []
        self.AFF_Handover: list = []
        self.AFF_Visits: list = []
        self.AFF_Kills: list = []
            
        # Fail
        self.FAIL_Exits: list = []
        self.FAIL_Quests: list = []
        self.FAIL_Standing: list = []
        
        # Reward List
        self.REWARD_Standings: list = []
        self.REWARD_Assorts: list = []
        self.REWARD_Items: list = []
        self.REWARD_Productions: list = []
        self.REWARD_Skills: list = []
        self.REWARD_TraderUnlocks: list = []
        
        self.STARTED_Items: list = []
        self.STARTED_Assorts: list = []
        self.STARTED_Productions: list = [] # TODO

    def generateRandomId(self):
        characters = string.digits + "abcdef"
        random_seed = ''.join(random.choice(characters) for _ in range(24))
        return random_seed


    #JSON GENERATION
    
    
    def __generateLoyalty(self, standing, index, parent, objective = 0):
        loyalty = {
            "_parent": f"{parent}",
            "_props": {
                "id": f"{self.mainWindow._Id.text()}_TraderLoyalty_{objective}",
                "index": self.AFFIndex,
                "parentId": "", 
                "dynamicLocale": standing.dynamicLocale,
                "target": standing.traderId,
                "value": standing.value,
                "compareMethod": standing.compare,
                "visibilityConditions": []
            },
            "dynamicLocale": standing.dynamicLocale
        }
        
        if hasattr(standing, "text"): 
            self.LocaleFile[f"{self.mainWindow._Id.text()}_TraderLoyalty_{objective}"] = standing.text
        index += 1
        return loyalty
     
    def __generateQuestRequirements(self, condition, index):
        questData = {
            "_parent": "Quest",
            "_props": {
                "id": self.generateRandomId(),
                "index": index,
                "parentId": "", #TODO Investiage this
                "dynamicLocale": condition.dynamicLocale,
                "target": condition.questId,
                "status": [
                    condition.statusType
                ],
                "availableAfter": 0,
                "dispersion": 0,
                "visibilityConditions": []
            },
            "dynamicLocale": condition.dynamicLocale
        }
        index += 1
        return questData
    
    
    #Available For Start
    
    
    def __generateAvailableForStartLevel(self):
        level = {
            "_parent": "Level",
            "_props": {
                "id": self.generateRandomId(),
                "index": self.AFSIndex,
                "parentId": "", #TODO Investigate this
                "dynamicLocale": self.mainWindow.AvailableForStartDynamicLocaleLevel.isChecked(),
                "value": int(self.mainWindow.AvailableForStartLevelRequirement.text()),
                "compareMethod": self.mainWindow.AvailableForStartLevelRequirementCompare.currentText(),
                "visibilityConditions": [] #TODO Investigate this
            },
            "dynamicLocale": self.mainWindow.AvailableForStartDynamicLocaleLevel.isChecked()
        }
        self.AFSIndex += 1
        return level

    def __generateAvailableForStart(self):
        availableForStart = []      
        if self.mainWindow.AvailableForStartLevelRequirement.text() is not None:
            availableForStart.append(self.__generateAvailableForStartLevel())

        for quest in self.AFS_Statuses:
            availableForStart.append(self.__generateQuestRequirements(quest, self.StartedIndex))

        for loyalty in self.AFS_Loyalty:
            availableForStart.append(self.__generateLoyalty(loyalty, self.AFSIndex, "TraderLoyalty"))

        return availableForStart


    #Available For Finish
    
    
    def __generateFinishSkills(self):
        AFF_Skills = []
        objective = 0
        for item in self.AFF_Skills:
            skill = {
                "_parent": "Skill",
                "_props": {
                    "id":f"{self.mainWindow._Id.text()} Skill_{objective}",
                    "index": self.AFFIndex,
                    "parentId": "",
                    "dynamicLocale": item.dynamicLocale,
                    "target": item.skill,
                    "value": int(item.value),
                    "compareMethod": item.compare,
                    "visibilityConditions": []
                },
                "dynamicLocale": item.dynamicLocale
            }
            
            if hasattr(item, "text"): 
                self.LocaleFile[f"{self.mainWindow._Id.text()} Skill_{objective}"] = item.text
                
            objective += 1
            AFF_Skills.append(skill)
            self.AFFIndex += 1
        return AFF_Skills
    
    def __generateFinishItems(self):
        AFF_Items = []
        objective = 0
        for token in self.AFF_Items:
            item = {
                "_parent": "FindItem",
                "_props": {
                    "dogtagLevel": int(token.dogtagLevel),
                    "id": f"{self.mainWindow._Id.text()} FindItem_{objective}",
                    "index": self.AFFIndex,
                    "maxDurability": int(token.maxDurability),
                    "minDurability": int(token.minDurability),
                    "parentId": "",
                    "isEncoded": token.encoded,
                    "onlyFoundInRaid": token.fir,
                    "dynamicLocale": token.dynamicLocale,
                    "target": [
                        token.id
                    ],
                    "countInRaid": False, #TODO
                    "value": token.value,
                    "visibilityConditions": []
                },
                "dynamicLocale": token.dynamicLocale
            }
            
            if hasattr(token, "find"): 
                self.LocaleFile[f"{self.mainWindow._Id.text()} FindItem_{objective}"] = token.find
            
            objective += 1
            AFF_Items.append(item)
            self.AFFIndex += 1
        return AFF_Items
    
    def __generateFinishHandover(self):
        finishHandOver = []
        objective = 0
        for token in self.AFF_Handover:
            handover = {
                "_parent": "HandoverItem",
                "_props": {
                    "dogtagLevel": int(token.dogtagLevel),
                    "id": f"{self.mainWindow._Id.text()} HandoverItem_{objective}",
                    "index": self.AFFIndex,
                    "maxDurability": int(token.maxDurability),
                    "minDurability": int(token.minDurability),
                    "parentId": "",
                    "isEncoded": token.encoded,
                    "onlyFoundInRaid": token.fir,
                    "dynamicLocale": token.dynamicLocale,
                    "target": [
                        token.id
                    ],
                    "value": token.value,
                    "visibilityConditions": []
                },
                "dynamicLocale": token.dynamicLocale
            }
            
            if hasattr(token, "handover"): 
                self.LocaleFile[f"{self.mainWindow._Id.text()} HandoverItem_{objective}"] = token.handover
            
            objective += 1
            finishHandOver.append(handover)
            self.AFFIndex += 1
        return finishHandOver
    
    def __generateFinishVisit(self):
        Visits = []
        index = 0
        for token in self.AFF_Visits:
            visit = {
                "_parent": "CounterCreator",
                "_props": {
                    "counter": {
                        "id": self.generateRandomId(),
                        "conditions": [ {
                                "_parent": "VisitPlace",
                                "_props": {
                                    "target": token.zone,
                                    "value": "1",
                                    "id": self.generateRandomId()
                                }
                            }               
                        ]
                    },
                    "id": f"{self.mainWindow._Id.text()} VisitPlace_{index}",
                    "index": index,
                    "parentId": "", #TODO
                    "oneSessionOnly": token.oneSession,
                    "dynamicLocale": False,
                    "type": "Exploration",
                    "doNotResetIfCounterCompleted": token.doNotReset,
                    "value": "1",
                    "visibilityConditions": [] #TODO
                },
                "dynamicLocale": False   
            }
            
            if hasattr(token, "text"): 
                self.LocaleFile[f"{self.mainWindow._Id.text()} VisitPlace_{index}"] = token.text
            
            Visits.append(visit)
            index += 1
        return Visits
    
    def __generateFinishKills(self):
        Kills = []
        index = 0
        for token in self.AFF_Kills:
            kill = {
                "_parent": "CounterCreator",
                "_props": {
                    "counter": {
                        "conditions": [
                            {
                            "_parent": "Kills",
                            "_props": {
                              "compareMethod": token.compare,
                              "id": self.generateRandomId(),
                              "target": token.target,
                              "value": "1"
                            }
                        }
                    ],
                    "id": self.generateRandomId()
                    },
                    "doNotResetIfCounterCompleted": token.doNotReset,
                    "dynamicLocale": token.dynamicLocale,
                    "id": f"{self.mainWindow._Id.text()} Kills_{index}",
                    "index": index,
                    "oneSessionOnly": token.oneSessionOnly,
                    "parentId": "",
                    "type": "Elimination",
                    "value": token.value,
                    "visibilityConditions": []
                },
                "dynamicLocale": token.dynamicLocale
            }
            
            # Kill targets
            if hasattr(token, "roleList"):
                kill["_props"]["counter"]["conditions"][0]["_props"]["savageRole"] = token.roleList
                # Value field not used when role list is present
                del kill["_props"]["counter"]["conditions"][0]["_props"]["value"]
            
            # Location targets
            if hasattr(token, "locations"):
                location = {
                    "_parent": "Location",
                    "_props": {
                        "id": self.generateRandomId(),
                        "target": token.locations
                    }
                }
                kill["_props"]["counter"]["conditions"].append(location)
            
            # Distance
            if hasattr(token, "distance"): 
                kill["_props"]["counter"]["conditions"][0]["_props"]["distance"] = {
                        "compareMethod": token.distanceCompare,
                        "value": int(token.distance)
                    }
            
            # Time
            if hasattr(token, "timeFrom") and hasattr(token, "timeTo"): 
                kill["_props"]["counter"]["conditions"][0]["_props"]["daytime"] = {
                    "from": token.timeFrom,
                    "to": token.timeTo
                }
            
            # Body Part
            if hasattr(token, "bodyParts"):                                        #This is a list
                kill["_props"]["counter"]["conditions"][0]["_props"]["bodyPart"] = token.bodyParts 
            
            if hasattr(token, "enemyHealthEffects"):
                kill["_props"]["counter"]["conditions"][0]["_props"]["enemyHealthEffects"] = []
                for combo in token.enemyHealthEffects:
                    dict = {
                        "bodyParts": combo.bodyParts,
                        "effects": combo.effects
                    }
                    kill["_props"]["counter"]["conditions"][0]["_props"]["enemyHealthEffects"].append(dict)
              
            # Localization
            if hasattr(token, "text"): 
                self.LocaleFile[f"{self.mainWindow._Id.text()} Kills_{index}"] = token.text
            
            Kills.append(kill)
            index += 1
        return Kills
    
    def __generateAvailableForFinish(self):
        Finish = []
        objective = 0
        for loyalty in self.AFF_Loyalty:
            Finish.append(self.__generateLoyalty(loyalty, self.AFFIndex, "TraderLoyalty", objective))
            objective += 1
            
        for skill in self.__generateFinishSkills():
            Finish.append(skill)
            
        for findItem in self.__generateFinishItems():
            Finish.append(findItem)
            
        for handoverItem in self.__generateFinishHandover():
            Finish.append(handoverItem)
        
        for visitPlace in self.__generateFinishVisit():
            Finish.append(visitPlace)
            
        for kills in self.__generateFinishKills():
            Finish.append(kills)
            
        return Finish


    #Fail  
    
    
    def __generatExitStatus(self, condition, index):
        counterCreator = {
            "_parent": "CounterCreator",
            "_props": {
                "counter": {
                    "id": self.generateRandomId(),
                    "conditions": [
                        {
                            "_parent": "ExitStatus",
                            "_props": {
                                "status":
                                    condition.status,
                            "id": self.generateRandomId()
                            }                   
                        }           
                    ]
                },
                "id": self.generateRandomId(),
                "index": index,
                "parentId": "",
                "oneSessionOnly": condition.oneSessionOnly,
                "dynamicLocale": condition.dynamicLocale,
                "type": "Exploration",
                "doNotResetIfCounterCompleted": condition.doNotReset,
                "value": 1, #TODO Investigate
                "visibilityConditions": []
            },
            "dynamicLocale": condition.dynamicLocale
        }
        
        if hasattr(condition, "location"):
            location = {
                "_parent": "Location",
                "_props": {
                    "id": self.generateRandomId(),
                    "target": condition.location
                }
            }
            counterCreator["_props"]["counter"]["conditions"].append(location)
        
        index += 1   
        return counterCreator
    
    def __generateFail(self):
        Fail = []
        for quest in self.FAIL_Quests:
            Fail.append(self.__generateQuestRequirements(quest, self.FailIndex))
        
        for standing in self.FAIL_Standing:
            Fail.append(self.__generateLoyalty(standing, self.FailIndex, "TraderStanding"))
        
        for exitStatus in self.FAIL_Exits:
            Fail.append(self.__generatExitStatus(exitStatus, self.FailIndex))
        
        
        return Fail
    
    
    #Rewards
    
    
    def __generateExperienceReward(self):
        experience = {
            "value": int(self.mainWindow.ExperienceAmount.text()),
            "id": "5c95107186f7743285178ade",
            "type": "Experience",
            "index": self.SuccessIndex
        }
        self.SuccessIndex += 1
        return experience

    def __generateReward(self, rewardList, indexList):
        newRewardList = []
        for entry in rewardList:
            indexList = indexList + 1
            target = self.generateRandomId()
            reward = {
                "value": entry.value,
                "id": self.generateRandomId(), #TODO
                "type": "Item",
                "index": indexList,
                "target": target,
                "findInRaid": True,
                "items": [
                    {
                        "_id": target,
                        "_tpl": entry.id,
                        "upd": {
                            "StackObjectsCount": int(entry.value)
                        }
                    }
                ]
            }
            
            if hasattr(entry, "unknown"):
                reward["unknown"] = entry.unknown
            
            newRewardList.append(reward)
        return newRewardList
    
    def __generateTraderStandingReward(self):
        REWARD_Standings = []
        for standing in self.REWARD_Standings:
            self.SuccessIndex += 1
            reward = {
                "value": standing.value,
                "id": self.generateRandomId(),
                "type": "TraderStanding",
                "index": self.SuccessIndex,
                "target": standing.trader
            }
            
            if hasattr(standing, "unknown"):
                reward["unknown"] = standing.unknown
            
            REWARD_Standings.append(reward)
        return REWARD_Standings

    def __generateStartedReward(self):
        Started = []
        for item in self.__generateReward(self.STARTED_Items, self.StartedIndex):
            Started.append(item)

        for assort in self.__generateAssortUnlock(self.STARTED_Assorts):
            Started.append(assort)
        
        return Started

    def __generateAssortUnlock(self, assorts):
        assortRewardList = []     
        for assort in assorts:
            self.SuccessIndex += 1
            target = self.generateRandomId()
            reward = {
                "id": self.generateRandomId(),
                "type": "AssortmentUnlock",
                "index": self.SuccessIndex,
                "target": target,
                "items": [
                    {
                    "_id": target,
                    "_tpl": assort.item
                    }
                ],
                "loyaltyLevel": assort.level,
                "traderId": assort.trader
            }
            
            if hasattr(assort, "unknown"):
                reward["unknown"] = assort.unknown
            
            assortRewardList.append(reward)
        return assortRewardList

    def __generateProductionSchemes(self):
        productionSchemeRewardList = []
        for scheme in self.REWARD_Productions:
            self.SuccessIndex += 1
            target = self.generateRandomId()
            reward = {
                "id": self.generateRandomId(),
                "type": "ProductionScheme",
                "index": self.SuccessIndex,
                "target": target,
                "items": [
                    {
                    "_id": target,
                    "_tpl": scheme.item,
                    "udp": {
                        "StackObjectsCount": 1, #TODO We hard code these for now
                        "SpawnedInSession": True
                        }
                    }
                ],
                "loyaltyLevel": scheme.loyaltyLevel,
                "traderId": scheme.stationId
            }
            
            if hasattr(scheme, "unknown"):
                reward["unknown"] = scheme.unknown
            
            productionSchemeRewardList.append(reward)
        return productionSchemeRewardList
    
    def __generateSkillReward(self):
        REWARD_Skills = []
        for skill in self.REWARD_Skills:
            self.SuccessIndex += 1
            newSkill = {
                "value": skill.value,
                "id": self.generateRandomId(),
                "type": "Skill",
                "index": self.SuccessIndex,
                "target": skill.target,
            }
            
            if hasattr(skill, "unknown"):
                newSkill["unknown"] = skill.unknown
            
            REWARD_Skills.append(newSkill)
        return REWARD_Skills
    
    def __generateTraderUnlockReward(self):
        REWARD_TraderUnlocks = []
        for trader in self.REWARD_TraderUnlocks:
            self.SuccessIndex += 1
            newTrader = {
                "id": self.generateRandomId(),
                "type": "TraderUnlock",
                "index": self.SuccessIndex,
                "target": trader.target,
            }
            
            if hasattr(trader, "unknown"):
                newTrader["unknown"] = trader.unknown
            
            REWARD_TraderUnlocks.append(newTrader)
        return REWARD_TraderUnlocks
    
    def __generateSuccessReward(self):
        Success = []
        if self.mainWindow.ExperienceAmount.text() != "":
            Success.append(self.__generateExperienceReward())
        
        for reward in self.__generateReward(self.REWARD_Items, self.SuccessIndex):
            Success.append(reward)
        
        for standing in self.__generateTraderStandingReward():
            Success.append(standing)
            
        for assort in self.__generateAssortUnlock(self.REWARD_Assorts):
            Success.append(assort)
        
        for scheme in self.__generateProductionSchemes():
            Success.append(scheme)
        
        for skill in self.__generateSkillReward():
            Success.append(skill)
        
        for trader in self.__generateTraderUnlockReward():
            Success.append(trader)
        
        return Success


    #Root Methods
    
    
    def __getTraderId(self):   
        if len(self.mainWindow.TraderIdTextField.text()) > 0:
            return self.mainWindow.TraderIdTextField.text()
        
        selectedTrader = self.mainWindow.TradercomboBox.currentText()
        if selectedTrader in Constants.TraderMap:
            return Constants.TraderMap[selectedTrader]
    
    def __getLocationId(self):
        if len(self.mainWindow.LocationIdTextField.text()) > 0:
            return self.mainWindow.LocationIdTextField.text()
        
        selectedLocation = self.mainWindow.LocationComboBox.currentText()
        if selectedLocation in Constants.LocationIdMap:
            return Constants.LocationIdMap[selectedLocation]
        
        
    #Setup Quest
    
    
    def setUpQuest(self):
        self.AFSIndex = 0
        self.AFFIndex = 0
        self.StartedIndex = 0
        self.SuccessIndex = 0
        quest = {
            "_id": f"{self.mainWindow._Id.text()}",
            "QuestName": f"{self.mainWindow.QuestName.text()}",
            "canShowNotificationsInGame": self.mainWindow.CanShowNotifications.isChecked(),
            "acceptPlayerMessage": f"{self.mainWindow._Id.text()} description",
            "changeQuestMessageText": f"{self.mainWindow._Id.text()} changeQuestMessageText",
            "completePlayerMessage": f"{self.mainWindow._Id.text()} successMessageText",
        
            "conditions": {
                "AvailableForFinish":
                    self.__generateAvailableForFinish(),
                "AvailableForStart":
                    self.__generateAvailableForStart(),
                "Fail":
                    self.__generateFail(),
            },

            "description": f"{self.mainWindow._Id.text()} description",
            "failMessageText": f"{self.mainWindow._Id.text()} failMessageText",
            "name": f"{self.mainWindow._Id.text()} name",
            "note": f"{self.mainWindow._Id.text()} note",

            "questStatus": {
                #TODO
            }, 

            "traderId": f"{self.__getTraderId()}",
            "location": f"{self.__getLocationId()}",
            "image": f"/files/quest/icon/{self.mainWindow.ImagePath.text()}",
            "type": self.mainWindow.Type.currentText(),
            "isKey": self.mainWindow.RequiresKey.isChecked(),
            "restartable": self.mainWindow.Restartable.isChecked(),
            "instantComplete": self.mainWindow.InstantComplete.isChecked(),
            "secretQuest": self.mainWindow.SecretQuest.isChecked(),
            "startedMessageText": f"{self.mainWindow._Id.text()} description",
            "successMessageText": f"{self.mainWindow._Id.text()} successMessageText",
            "templateId": self.mainWindow._Id.text(),
        
            "rewards": {
                "Started":
                    self.__generateStartedReward(),
                "Success":
                    self.__generateSuccessReward(),
                "Fail": [
                    #TODO
                ]
            },
            "side": self.mainWindow.Side.currentText()
        }
        return quest
    
    def setUpQuestLocale(self):
        localeDict = {}
        localeDict[f"{self.mainWindow._Id.text()} name"] = self.mainWindow.QuestName.text()
        localeDict[f"{self.mainWindow._Id.text()} description"] = self.mainWindow.Description.toPlainText()
        localeDict[f"{self.mainWindow._Id.text()} note"] = self.mainWindow.Note.toPlainText()
        localeDict[f"{self.mainWindow._Id.text()} successMessageText"] = self.mainWindow.SuccessMessage.toPlainText()
        localeDict[f"{self.mainWindow._Id.text()} failMessageText"] = self.mainWindow.FailMessage.toPlainText()
        localeDict[f"{self.mainWindow._Id.text()} changeQuestMessageText"] = self.mainWindow.ChangeMessage.toPlainText()
        localeDict[f"{self.mainWindow._Id.text()} location"] = self.__getLocationId()
        
        return localeDict
        
    
TarkovTools/Models/Quest.py
TarkovTools/Application
import os

# App Imports
from App.AppData import AppData
from App.Options import Options

# Util Imports
from Utils.Constants import Constants, Object

# UI Imports
from Ui.Layouts.TarkovTools_ui import Ui_MainWindow

# Model Imports
from Models.Quest import Quest

class QuestLoad(Quest):
    def __init__(self, QuestPanel, MainWindow: Ui_MainWindow, AppData: AppData):  
        super().__init__(MainWindow)           
        
        self.MainWindow = MainWindow
        self.QuestPanel = QuestPanel
        self.AppData = AppData
           
    def generateQuestValues(self):
        self.QuestPanel.clearAllWidgets()
        self.__generateRootValues()
        self.__generateLocales()
        self.__generateAvailableForStart()
        self.__generateAvailableForFinish()
        self.__generateFail()
        self.__generateStartedReward()
        self.__generateSuccessReward()
    
    
    # ROOT
    def __generateRootValues(self):
        quest = self.QuestPanel.QuestFile[self.QuestPanel.selectedQuestId]
        self.MainWindow.QuestName.setText(quest["QuestName"])
        self.MainWindow._Id.setText(quest["_id"])
        self.MainWindow.ImagePath.setText(quest["image"])
        self.MainWindow.CanShowNotifications.setChecked(quest["canShowNotificationsInGame"])
        self.MainWindow.RequiresKey.setChecked(quest["isKey"])
        self.MainWindow.Restartable.setChecked(quest["restartable"])
        self.MainWindow.InstantComplete.setChecked(quest["instantComplete"])
        self.MainWindow.SecretQuest.setChecked(quest["secretQuest"])
        self.MainWindow.ImagePath.setText(os.path.basename(quest["image"]))
        
        self.__generateLocation(quest)
        self.__generateTrader(quest)
        self.__generateType(quest)
             
        if quest["side"] == "Bear":
            self.MainWindow.Side.setCurrentIndex(0)
        elif quest["side"] == "Pmc":
            self.MainWindow.Side.setCurrentIndex(1)
        elif quest["side"] == "Savage":
            self.MainWindow.Side.setCurrentIndex(2)
        elif quest["side"] == "Usec":
            self.MainWindow.Side.setCurrentIndex(3)
    
    def __generateLocales(self):  
        descriptionKey = f"{self.QuestPanel.selectedQuestId} description"
        if descriptionKey in self.QuestPanel.LocaleFile:
            description = self.QuestPanel.LocaleFile[descriptionKey]
            self.MainWindow.Description.setText(description)
        
        successKey = f"{self.QuestPanel.selectedQuestId} successMessageText"
        if successKey in self.QuestPanel.LocaleFile:
            success = self.QuestPanel.LocaleFile[successKey]
            self.MainWindow.SuccessMessage.setText(success)
        
        failKey = f"{self.QuestPanel.selectedQuestId} failMessageText"
        if failKey in self.QuestPanel.LocaleFile:
            fail = self.QuestPanel.LocaleFile[failKey]
            self.MainWindow.FailMessage.setText(fail)
        
        changeKey = f"{self.QuestPanel.selectedQuestId} changeQuestMessageText"
        if changeKey in self.QuestPanel.LocaleFile:
            change = self.QuestPanel.LocaleFile[changeKey]
            self.MainWindow.ChangeMessage.setText(change)
        
        noteKey = f"{self.QuestPanel.selectedQuestId} note"
        if noteKey in self.QuestPanel.LocaleFile:
            note = self.QuestPanel.LocaleFile[noteKey]
            self.MainWindow.Note.setText(note)
    
    def __generateLocation(self, quest):
        if quest["location"] not in Constants.LocationListMap.keys():
            self.MainWindow.LocationIdTextField.setText(quest["location"])
            print("Location override.")
            return
            
        locSearch = Constants.LocationListMap[quest["location"]]
        locIndex = sorted(Constants.LocationList).index(locSearch)
        self.MainWindow.LocationComboBox.setCurrentIndex(locIndex)
    
    def __generateTrader(self, quest):
        if quest["traderId"] not in Constants.TraderLookup.keys():
            self.MainWindow.TraderIdTextField.setText(quest["traderId"])
            print("Trader override.")
            return
        
        locSearch = Constants.TraderLookup[quest["traderId"]]
        locIndex = sorted(Constants.TraderList).index(locSearch)
        self.MainWindow.TradercomboBox.setCurrentIndex(locIndex)
        
    def __generateType(self, quest):
        if quest["type"] not in Constants.TypeList:
            print("Type not found")
            return
        
        locIndex = sorted(Constants.TypeList).index(quest["type"])
        self.MainWindow.Type.setCurrentIndex(locIndex)
                                 
     
    # Available for start
    
    
    def __generateAvailableForStart(self):
        quest = self.QuestPanel.QuestFile[self.QuestPanel.selectedQuestId]
        if "AvailableForStart" not in quest["conditions"]:
            return
        
        start = quest["conditions"]["AvailableForStart"]
        for condition in start:
            # Level
            if condition["_parent"] == "Level":
                self.__generateAFSLevel(condition)
                        
            # Quest
            elif condition["_parent"] == "Quest":
                self.__generateAFSQuest(condition)
                
            # Loyalty
            elif condition["_parent"] == "TraderLoyalty":
                self.__generateAFSLoyalty(condition)
                
            else:
                self.QuestPanel.log(f"Unhandled: {quest['_id']} AOS {condition['_parent']} \n Report to the developer.")
    
    def __generateAFSLevel(self, condition):
        self.MainWindow.AvailableForStartLevelRequirement.setText(
            f"{condition['_props']['value']}")
        
        self.MainWindow.AvailableForStartDynamicLocaleLevel.setChecked(
            condition["_props"]["dynamicLocale"])
        
        if condition['_props']['compareMethod'] == "<=":
            self.MainWindow.AvailableForStartLevelRequirementCompare.setCurrentIndex(0)
       
        elif condition['_props']['compareMethod'] == ">=":
            self.MainWindow.AvailableForStartLevelRequirementCompare.setCurrentIndex(1)
        
    def __generateAFSQuest(self, condition):
        quest = Object()       
        quest.questId = condition["_props"]["target"]
        quest.dynamicLocale = condition["_props"]["dynamicLocale"]
        quest.statusType = condition["_props"]["status"][0] #TODO Does this ever have more than one element?
        
        if condition["_props"]["status"][0] in Constants.StatusLookup:
            status = Constants.StatusLookup[condition["_props"]["status"][0]]
        
        object = f"Status: {status} questId: {quest.questId} DynamicLocale: {quest.dynamicLocale}"
        
        self.QuestPanel.AFS_Statuses.append(quest)
        self.MainWindow.StartQuestWidget.addItem(object)
     
    def __generateAFSLoyalty(self, condition):
        loyalty = Object()
        loyalty.value = condition["_props"]["value"]
        loyalty.dynamicLocale = condition["_props"]["dynamicLocale"]
        loyalty.compare = condition["_props"]["compareMethod"]
        loyalty.traderId = condition["_props"]["target"]
        
        object = f"Loyalty requirement: {loyalty.traderId} Loyalty: {loyalty.value} Compare: {loyalty.compare} DynamicLocale: {loyalty.dynamicLocale}"
        
        self.QuestPanel.AFS_Loyalty.append(loyalty)
        self.MainWindow.StartLoyaltyWidget.addItem(object)
           
    
    # Available for finish
    
    
    def __generateAvailableForFinish(self):
        quest = self.QuestPanel.QuestFile[self.QuestPanel.selectedQuestId]
        if "AvailableForFinish" not in quest["conditions"]:
            return
        
        finish = quest["conditions"]["AvailableForFinish"]
        for condition in finish:
            # Loyalty
            if condition["_parent"] == "TraderLoyalty":
               self.__generateAFFLoyalty(condition) 
            
            # Skill
            elif condition["_parent"] == "Skill":
                self.__generateAFFSkill(condition)
            
            # Find Items
            elif condition["_parent"] == "FindItem":
                self.__generateAFFFindItem(condition)
            
            #Handover Items
            elif condition["_parent"] == "HandoverItem":
                self.__generateAFFHandover(condition)
            
            #Weapon Assembly
            elif condition["_parent"] == "WeaponAssembly":
                self.QuestPanel.log(f"Unhandled: {quest['_id']} AFF WeaponAssembly \n Report to the developer.") #TODO
            
            #Place Beacon
            elif condition["_parent"] == "PlaceBeacon":
                self.QuestPanel.log(f"Unhandled: {quest['_id']} AFF PlaceBeacon \n Report to the developer.") #TODO
            
            #LeaveItemAtLocation
            elif condition["_parent"] == "LeaveItemAtLocation":
                self.QuestPanel.log(f"Unhandled: {quest['_id']} AFF LeaveItemAtLocation \n Report to the developer.") #TODO
            
            #Vist Place
            elif condition["_props"]["counter"]["conditions"][0]["_parent"] == "VisitPlace":
                self.__generateAFFVisitPlace(condition)
            
            # Kills
            elif condition["_props"]["counter"]["conditions"][0]["_parent"] == "Kills":
                self.__generateAFFKills(quest, condition)
                
            #Exit Status  
            elif condition["_props"]["counter"]["conditions"][0]["_parent"] == "ExitStatus":
                self.QuestPanel.log(f"Unhandled: {quest['_id']} AFF ExitStatus \n Report to the developer.") #TODO
            
            else:
                self.QuestPanel.log(f"Unhandled: {quest['_id']} AFF {condition['_parent']} \n Report to the developer.")
    
    def __generateAFFLoyalty(self, condition):
        loyalty = Object()       
        loyalty.dynamicLocale = condition["_props"]["dynamicLocale"]
        loyalty.value = condition["_props"]["value"]
        loyalty.compare = condition["_props"]["compareMethod"]
        loyalty.traderId = condition["_props"]["target"]
        loyalty.text = self.QuestPanel.LocaleFile[condition["_props"]["id"]]
        
        object = f"Trader: {loyalty.traderId} Loyalty Requirement: {loyalty.value} DynamicLocale: {loyalty.dynamicLocale}\nMessage: {loyalty.text}"
        self.QuestPanel.AFS_Loyalty.append(loyalty)
        self.MainWindow.FinishLoyaltyWidget.addItem(object)
    
    def __generateAFFSkill(self, condition):
        skill = Object()
        skill.skill = condition["_props"]["target"]
        skill.dynamicLocale = condition["_props"]["dynamicLocale"]
        skill.value = condition["_props"]["value"]
        skill.compare = condition["_props"]["compareMethod"]
        skill.text = self.QuestPanel.LocaleFile[condition["_props"]["id"]]
        
        object = f"Skill required: {skill.skill} level requirement: {skill.value} compareMethod: {skill.compare} DynamicLocale: {skill.dynamicLocale} \nMessage: {skill.text}"
        self.QuestPanel.AFF_Skills.append(skill)
        self.MainWindow.FinishSkillWidget.addItem(object) 
    
    def __generateAFFFindItem(self, condition):
        item = Object()       
        item.id = condition["_props"]["target"][0] #TODO Does this ever contain more than one element?
        item.dynamicLocale = condition["_props"]["dynamicLocale"]
        item.value = condition["_props"]["value"]
        item.fir = condition["_props"]["onlyFoundInRaid"]
        item.encoded = condition["_props"]["isEncoded"]
        item.dogtagLevel = condition["_props"]["dogtagLevel"]
        item.minDurability = condition["_props"]["minDurability"]
        item.maxDurability = condition["_props"]["maxDurability"]
        item.find = self.QuestPanel.LocaleFile[condition["_props"]["id"]]
        
        object = f"Item Id: {item.id} Amount: {item.value} DynamicLocale: {item.dynamicLocale} FIR requirement: {item.fir} Encoded Requirement: {item.encoded}\nMessage: {item.find}"
        self.QuestPanel.AFF_Items.append(item)
        self.MainWindow.FinishItemWidget.addItem(object)
    
    def __generateAFFHandover(self, condition):
        item = Object()       
        item.id = condition["_props"]["target"][0] #TODO Does this ever contain more than one element?
        item.dynamicLocale = condition["_props"]["dynamicLocale"]
        item.value = condition["_props"]["value"]
        item.fir = condition["_props"]["onlyFoundInRaid"]
        item.encoded = condition["_props"]["isEncoded"]
        item.dogtagLevel = condition["_props"]["dogtagLevel"]
        item.minDurability = condition["_props"]["minDurability"]
        item.maxDurability = condition["_props"]["maxDurability"]
        item.handover = self.QuestPanel.LocaleFile[condition["_props"]["id"]]
    
        object = f"Item Id: {item.id} Amount: {item.value} DynamicLocale: {item.dynamicLocale} FIR requirement: {item.fir} Encoded Requirement: {item.encoded}\nMessage: {item.handover}"
        self.QuestPanel.AFF_Handover.append(item)
        self.MainWindow.FinishHandoverWidget.addItem(object)
    
    def __generateAFFVisitPlace(self, condition):
        visit = Object()       
        visit.zone = condition["_props"]["counter"]["conditions"][0]["_props"]["target"]
        visit.doNotReset = condition["_props"]["doNotResetIfCounterCompleted"]
        visit.oneSession = condition["_props"]["oneSessionOnly"]
        visit.text = self.QuestPanel.LocaleFile[condition["_props"]["id"]]
        
        object = f"Visit Zone: {visit.zone} Do Not reset: {visit.doNotReset} One Session: {visit.oneSession}\nMessage: {visit.text}"
        self.QuestPanel.AFF_Visits.append(visit)
        self.MainWindow.ZoneVisitWidget.addItem(object)
    
    def __generateAFFKills(self, quest, condition):
        kills = Object()
        
        props = condition["_props"]
        counterProps = condition["_props"]["counter"]["conditions"][0]["_props"]
        
        kills.compare = counterProps["compareMethod"]
        kills.target = counterProps["target"]
        kills.value = props["value"]
        kills.dynamicLocale = props["dynamicLocale"]
        kills.oneSessionOnly = props["oneSessionOnly"]
        kills.doNotReset = props["oneSessionOnly"]
        kills.text = self.QuestPanel.LocaleFile[condition["_props"]["id"]]
        
        if "savageRole" in counterProps:
            kills.roleList = counterProps["savageRole"]
        
        if "distance" in counterProps:
            kills.distance = counterProps["distance"]["value"]
            kills.distanceCompare = counterProps["distance"]["compareMethod"]
        
        if "daytime" in counterProps:
            kills.timeFrom = counterProps["daytime"]["from"]
            kills.timeTo = counterProps["daytime"]["to"]
        
        if "enemyHealthEffects" in counterProps:
            kills.enemyHealthEffects: list = []
            for effect in counterProps["enemyHealthEffects"]:
                enemyhealthEffects = Object()
                enemyhealthEffects.effects = effect["effects"]
                enemyhealthEffects.bodyParts = effect["bodyParts"]
                kills.enemyHealthEffects.append(enemyhealthEffects)
        
        for subCondition in props["counter"]["conditions"]:
            if subCondition["_parent"] == "Kills":
                pass
            elif subCondition["_parent"] == "Location": 
                kills.locations = subCondition["_props"]["target"]
            else:
                self.QuestPanel.log(f"Unhandled: {quest['_id']} AFF Kills {subCondition['_parent']} \n Report to the developer.") #TODO
        
        self.QuestPanel.AFF_Kills.append(kills)
        
        object = f"Target: {kills.target}, Compare: {kills.compare}, Value: {kills.value},\nDynamic Locale: {kills.dynamicLocale}, One Session: {kills.oneSessionOnly}, Do Not Reset: {kills.doNotReset}"
        self.MainWindow.AFFKillsWidget.addItem(object)
        self.QuestPanel.WindowKillsEditor.KillsEditorWidget.addItem(object)
       
    
    # FAIL
    
    
    def __generateFail(self):
        quest = self.QuestPanel.QuestFile[self.QuestPanel.selectedQuestId]
        if "Fail" not in quest["conditions"]:
            return
        
        fail = quest["conditions"]["Fail"]
        for condition in fail:
            # Counter Conditions
            if condition["_parent"] == "CounterCreator":
                self.__generateFailCounterCreator(quest,  condition)             
            
            # Quest
            elif condition["_parent"] == "Quest":
                self.__generateFailQuest(condition)
                
            # Trader Standing
            elif condition["_parent"] == "TraderStanding":
                self.__generateFailStanding(condition)
            
            else:
                self.log(f"Unhandled: {quest['_id']} FAIL {condition['_parent']} \n Report to the developer.")
    
    def __generateFailCounterCreator(self, quest, condition):
        for subCondition in condition["_props"]["counter"]["conditions"]:
            if subCondition.get("_parent") is None:
                return
            
            # Exit Status
            if subCondition["_parent"] == "ExitStatus":
                exit = Object()
                rootProps = condition["_props"]
                exit.status = subCondition["_props"]["status"]
                exit.oneSessionOnly = rootProps["oneSessionOnly"]
                exit.dynamicLocale = rootProps["dynamicLocale"]
                exit.doNotReset = rootProps["doNotResetIfCounterCompleted"]
                exit.value = rootProps["value"]
                
                # TODO: Make this dynamic somehow
                if rootProps["counter"]["conditions"][1]["_parent"] == "Location":
                   exit.location = rootProps["counter"]["conditions"][1]["_props"]["target"]
                self.QuestPanel.FAIL_Exits.append(exit)
                
                exitStatus = " ".join(exit.status)
                exitLocations = " ".join(exit.location)
                object = f" Exit Status: {exitStatus} \n Exit List: {exitLocations} \n One Session: {exit.oneSessionOnly} Dynamic Locale: {exit.dynamicLocale} \n Do not reset: {exit.doNotReset} Value: {exit.value}"
                self.MainWindow.FailExitWidget.addItem(object)
            
            # Kills
            elif "Kills" in subCondition["_parent"]:
                self.QuestPanel.log(f"Unhandled: {quest['_id']} FAIL Kills \n Report to the developer.")
            
            # Use Item
            elif "UseItem" in subCondition["_parent"]:
                self.QuestPanel.log(f"Unhandled: {quest['_id']} FAIL UseItem \n Report to the developer.")
    
    def __generateFailQuest(self, condition):
        quest = Object()
        quest.questId = condition["_props"]["target"]
        quest.dynamicLocale = condition["_props"]["dynamicLocale"]
        quest.statusType = condition["_props"]["status"][0] #TODO Does this ever contain more than one element?  
         
        object = f"QuestId: {quest.questId} Status: {quest.statusType} dynamicLocale: {quest.dynamicLocale}"
        self.QuestPanel.FAIL_Quests.append(quest)
        self.MainWindow.FailQuestWidget.addItem(object)
    
    def __generateFailStanding(self, condition):
        standing = Object()
        standing.value = condition["_props"]["value"]
        standing.dynamicLocale = condition["_props"]["dynamicLocale"]
        standing.compare = condition["_props"]["compareMethod"]
        standing.traderId = condition["_props"]["target"]
        
        object = f"TraderId: {standing.traderId} Value: {standing.value} Compare: {standing.compare} dynamicLocale: {standing.dynamicLocale}"
        self.QuestPanel.FAIL_Standing.append(standing)
        self.MainWindow.FailStandingWidget.addItem(object)
    
    
    # Started Rewards
    
    
    def __generateStartedReward(self):
        quest = self.QuestPanel.QuestFile[self.QuestPanel.selectedQuestId]
        if "Started" not in quest["rewards"]:           
            return
        
        started = quest["rewards"]["Started"]
        for condition in started:
            # Assort Unlock 
            if condition["type"] == "AssortmentUnlock":
                self.__generateSRAssort(condition)
            
            # Item
            elif condition["type"] == "Item":
                self.__generateSRItem(condition)
            
            # Production Scheme
            elif condition["type"] == "ProductionScheme":
                self.__generateSRProduction(condition)
            
            else:
                self.QuestPanel.log(f"Unhandled: {quest['_id']} SR {condition['_parent']} \n Report to the developer.")
    
    def __generateSRAssort(self, condition):
        assort = Object()
        assort.item = condition["items"][0]["_tpl"]
        assort.level = condition["loyaltyLevel"]
        assort.trader = condition["traderId"]            
        self.QuestPanel.STARTED_Assorts.append(assort)
        
        object = f"TraderId: {assort.trader} Assort unlock: {assort.item} at level: {assort.level}"
        self.MainWindow.StartedAssortTraderWidget.addItem(object)
    
    def __generateSRItem(self, condition):
        item = Object()
        item.id = condition["target"]
        item.value = condition["value"]
        self.QuestPanel.STARTED_Items.append(item)
        
        object = f"Item reward: {item.id} Amount: {item.value}"
        self.MainWindow.StartedItemWidget.addItem(object)
    
    def __generateSRProduction(self, condition):
        #TODO: Add GUI
        
        scheme = Object()
        scheme.item = condition["target"]
        scheme.level = condition["target"]
        scheme.trader = condition["target"]

        self.QuestPanel.STARTED_Productions.append(scheme)
                    
      
    # Success Rewards
    
    
    def __generateSuccessReward(self):
        quest = self.QuestPanel.QuestFile[self.QuestPanel.selectedQuestId]
        if "Success" not in quest["rewards"]:            
            return
        
        success = quest["rewards"]["Success"]
        for condition in success:
            # Assort Unlock 
            if condition["type"] == "AssortmentUnlock":
                self.__generateSSRAssort(condition)
            
            # Experience
            elif condition["type"] == "Experience":
                 self.MainWindow.ExperienceAmount.setText(f"{condition['value']}")
            
            # Trader Standing
            elif condition["type"] == "TraderStanding":
                self.__generateSSRStanding(condition)
            
            # Item
            elif condition["type"] == "Item":
                self.__generateSSRItem(condition)
            
            # Production Scheme
            elif condition["type"] == "ProductionScheme":
                self.__generateSSRScheme(condition)
            
            # Skills
            elif condition["type"] == "Skill":
                self.__generateSSRSkill(condition)
            
            # Trader Unlock
            elif condition["type"] == "TraderUnlock":
                self.__generateSSRTrader(condition)
            
            else:
                self.QuestPanel.log(f"Unhandled: {quest['_id']} SRS {condition['_parent']} \n Report to the developer.")
    
    def __generateSSRAssort(self, condition):
            assort = Object()
            assort.item = condition["items"][0]["_tpl"]
            assort.level = condition["loyaltyLevel"]
            assort.trader = condition["traderId"]
            
            if "unknown" in condition:
                assort.unknown = condition["unknown"]
            else:
                assort.unknown = False
            
            self.QuestPanel.REWARD_Assorts.append(assort)
            
            object = f"TraderId: {assort.trader} Assort unlock: {assort.item} at level: {assort.level} Hidden: {assort.unknown}"
            self.MainWindow.AssortTraderAssortUnlockWidget.addItem(object)
    
    def __generateSSRStanding(self, condition):
        standing = Object()
        standing.value = condition["value"]
        standing.trader = condition["target"]
        standing.dynamicLocale = condition["target"]
        
        if "unknown" in condition:
            standing.unknown = condition["unknown"]
        else:
            standing.unknown = False
        
        self.QuestPanel.REWARD_Standings.append(standing)
                    
        object = f"TraderId: {standing.trader} Standing reward: {standing.value} Hidden: {standing.unknown}"   
        self.MainWindow.SuccessStandingWidget.addItem(object)
     
    def __generateSSRItem(self, condition):
        item = Object()
        item.id = condition["items"][0]["_tpl"]
        item.value = condition["value"]
        
        if "unknown" in condition:
            item.unknown = condition["unknown"]
        else:
            item.unknown = False
        
        self.QuestPanel.REWARD_Items.append(item)
        
        if item.id in Constants.CurrencyLookup:
            object = f"{Constants.CurrencyLookup[item.id]} reward Id: {item.id} Amount: {item.value} Hidden: {item.unknown}"
            self.MainWindow.SuccessCurrencyWidget.addItem(object)
        else:
            object = f"Item reward Id: {item.id} Amount: {item.value} Hidden: {item.unknown}"
            self.MainWindow.SuccessItemWidget.addItem(object)
       
    def __generateSSRScheme(self, condition):
        scheme = Object()
        scheme.item = condition["items"][0]["_tpl"]
        scheme.loyaltyLevel = condition["loyaltyLevel"]
        scheme.stationId = condition["traderId"]
        
        if "unknown" in condition:
            scheme.unknown = condition["unknown"]
        else:
            scheme.unknown = False
        
        if scheme.stationId in Constants.HideoutLookup:
            stationSelected = Constants.HideoutLookup[scheme.stationId]
        
        self.QuestPanel.REWARD_Productions.append(scheme)
        object = f"Item {scheme.item} production will be added to {stationSelected} at level: {scheme.loyaltyLevel} \n Hidden: {scheme.unknown}"
        self.MainWindow.SuccessSchemeWidget.addItem(object)
            
    def __generateSSRSkill(self, condition):     
        skill = Object()
        skill.target = condition["target"]
        skill.value = condition["value"]
        
        if "unknown" in condition:
            skill.unknown = condition["unknown"]
        else:
            skill.unknown = False
            
        self.QuestPanel.REWARD_Skills.append(skill)
        object = f"Skill {skill.target} Value: {skill.value} Hidden: {skill.unknown}"
        self.MainWindow.SuccessSkillWidget.addItem(object)
    
    def __generateSSRTrader(self, condition):
        trader = Object()
        trader.target = condition["target"]
        
        if "unknown" in condition:
            trader.unknown = condition["unknown"]
        else:
            trader.unknown = False
        
        self.QuestPanel.REWARD_TraderUnlocks.append(trader)
        object = f"Trader {condition['target']} Hidden: {trader.unknown}"
        self.MainWindow.TraderUnlockWidget.addItem(object)

TarkovTools/Models/QuestLoad.py
TarkovTools/Application
import sys

# Pyside Imports
from PySide6.QtGui import *
from PySide6.QtWidgets import *

# App Imports
from App.AppData import AppData
from App.Options import Options

# UI Imports
from Ui.Layouts.TarkovTools_ui import Ui_MainWindow
from Ui.Widgets.DataView import DataView

class TarkovTools(QMainWindow, Ui_MainWindow):
    def __init__(self, Application: QApplication):
        super().__init__()
        self.setupUi(self)
        
        if 'QuestPanel' or 'ToolBarController' not in sys.modules:
            from Ui.Widgets.QuestPanel import QuestPanel
            from Ui.ToolBarController import ToolBarController
               
        self.Application = Application
        self.AppData = AppData()
        self.Options = Options()
        
        self.ToolBar = ToolBarController(self, self.AppData)
        self.QuestPanel = QuestPanel(self, self.AppData)
        self.DataView = DataView(self, self.AppData)
                  
        self.__setWindowTitle() 
        self.__setStyleSheet()
        
        if not self.AppData.DEBUG:
            self.__setDefaultTabs() 
          
        # Dont show window until the application is loaded.
        self.show()
    
    def __setWindowTitle(self):
        if self.AppData.DEBUG:
            title = f"Tarkov Tools {self.AppData.VERSION[0]} - SPT-AKI {self.AppData.VERSION[1]} Debug"
        else:
            title = f"Tarkov Tools {self.AppData.VERSION[0]} - SPT-AKI {self.AppData.VERSION[1]}"
        self.setWindowTitle(title)
        
    def __setDefaultTabs(self):
        self.ConditionsTabWidget.setCurrentIndex(0)
        self.AFFTabWidget.setCurrentIndex(0)
        self.AFFTabWidget.setCurrentIndex(0)
        self.FailTabWidget.setCurrentIndex(0)
        
    def __setStyleSheet(self):
        with open(f"{self.AppData.APP_PATH}\\Combinear.qss", "r") as f:
            _style = f.read()
        self.Application.setStyleSheet(_style)


# ENTRY POINT


if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = TarkovTools(app)
    sys.exit(app.exec())
TarkovTools/TarkovTools.py
TarkovTools/Application
# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file 'AFFKillsEditor.ui'
##
## Created by: Qt User Interface Compiler version 6.4.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
    QMetaObject, QObject, QPoint, QRect,
    QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
    QFont, QFontDatabase, QGradient, QIcon,
    QImage, QKeySequence, QLinearGradient, QPainter,
    QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QFrame,
    QGridLayout, QGroupBox, QLabel, QLineEdit,
    QListWidget, QListWidgetItem, QMainWindow, QPushButton,
    QSizePolicy, QSpinBox, QTabWidget, QTextEdit,
    QWidget)

class Ui_KillsEditor(object):
    def setupUi(self, KillsEditor):
        if not KillsEditor.objectName():
            KillsEditor.setObjectName(u"KillsEditor")
        KillsEditor.resize(1005, 846)
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(KillsEditor.sizePolicy().hasHeightForWidth())
        KillsEditor.setSizePolicy(sizePolicy)
        KillsEditor.setMinimumSize(QSize(1005, 846))
        KillsEditor.setMaximumSize(QSize(1005, 846))
        self.centralwidget = QWidget(KillsEditor)
        self.centralwidget.setObjectName(u"centralwidget")
        self.gridLayout = QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName(u"gridLayout")
        self.groupBox = QGroupBox(self.centralwidget)
        self.groupBox.setObjectName(u"groupBox")
        self.groupBox.setMinimumSize(QSize(561, 181))
        self.gridLayout_4 = QGridLayout(self.groupBox)
        self.gridLayout_4.setObjectName(u"gridLayout_4")
        self.RootOneSessionOnly = QCheckBox(self.groupBox)
        self.RootOneSessionOnly.setObjectName(u"RootOneSessionOnly")

        self.gridLayout_4.addWidget(self.RootOneSessionOnly, 0, 0, 1, 1)

        self.RootLocale = QCheckBox(self.groupBox)
        self.RootLocale.setObjectName(u"RootLocale")

        self.gridLayout_4.addWidget(self.RootLocale, 0, 1, 1, 1)

        self.RootDoNotReset = QCheckBox(self.groupBox)
        self.RootDoNotReset.setObjectName(u"RootDoNotReset")

        self.gridLayout_4.addWidget(self.RootDoNotReset, 0, 2, 1, 1)

        self.Target = QComboBox(self.groupBox)
        self.Target.setObjectName(u"Target")

        self.gridLayout_4.addWidget(self.Target, 1, 0, 1, 1)

        self.RootAmount = QLineEdit(self.groupBox)
        self.RootAmount.setObjectName(u"RootAmount")
        self.RootAmount.setClearButtonEnabled(True)

        self.gridLayout_4.addWidget(self.RootAmount, 1, 1, 1, 1)

        self.RootCompare = QComboBox(self.groupBox)
        self.RootCompare.setObjectName(u"RootCompare")

        self.gridLayout_4.addWidget(self.RootCompare, 1, 2, 1, 1)

        self.ObjectiveMessage = QTextEdit(self.groupBox)
        self.ObjectiveMessage.setObjectName(u"ObjectiveMessage")
        self.ObjectiveMessage.setMinimumSize(QSize(541, 81))
        self.ObjectiveMessage.setMaximumSize(QSize(16777215, 81))

        self.gridLayout_4.addWidget(self.ObjectiveMessage, 2, 0, 1, 3)


        self.gridLayout.addWidget(self.groupBox, 0, 0, 2, 1)

        self.line = QFrame(self.centralwidget)
        self.line.setObjectName(u"line")
        self.line.setFrameShape(QFrame.VLine)
        self.line.setFrameShadow(QFrame.Sunken)

        self.gridLayout.addWidget(self.line, 0, 1, 3, 1)

        self.KillsEditorAddToList = QPushButton(self.centralwidget)
        self.KillsEditorAddToList.setObjectName(u"KillsEditorAddToList")

        self.gridLayout.addWidget(self.KillsEditorAddToList, 0, 2, 1, 1)

        self.KillsEditorRemoveFromList = QPushButton(self.centralwidget)
        self.KillsEditorRemoveFromList.setObjectName(u"KillsEditorRemoveFromList")

        self.gridLayout.addWidget(self.KillsEditorRemoveFromList, 0, 3, 1, 1)

        self.KillsEditorWidget = QListWidget(self.centralwidget)
        self.KillsEditorWidget.setObjectName(u"KillsEditorWidget")
        self.KillsEditorWidget.setMinimumSize(QSize(411, 791))

        self.gridLayout.addWidget(self.KillsEditorWidget, 1, 2, 2, 2)

        self.tabWidget = QTabWidget(self.centralwidget)
        self.tabWidget.setObjectName(u"tabWidget")
        self.tab = QWidget()
        self.tab.setObjectName(u"tab")
        self.gridLayout_2 = QGridLayout(self.tab)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.groupBox_9 = QGroupBox(self.tab)
        self.groupBox_9.setObjectName(u"groupBox_9")
        self.SavageRoleRemove = QPushButton(self.groupBox_9)
        self.SavageRoleRemove.setObjectName(u"SavageRoleRemove")
        self.SavageRoleRemove.setGeometry(QRect(10, 120, 121, 24))
        self.SavageRole = QComboBox(self.groupBox_9)
        self.SavageRole.setObjectName(u"SavageRole")
        self.SavageRole.setGeometry(QRect(10, 60, 121, 22))
        self.SavageRoleAdd = QPushButton(self.groupBox_9)
        self.SavageRoleAdd.setObjectName(u"SavageRoleAdd")
        self.SavageRoleAdd.setGeometry(QRect(10, 90, 121, 24))
        self.SavageRoleWidget = QListWidget(self.groupBox_9)
        self.SavageRoleWidget.setObjectName(u"SavageRoleWidget")
        self.SavageRoleWidget.setGeometry(QRect(140, 30, 111, 151))
        self.label = QLabel(self.groupBox_9)
        self.label.setObjectName(u"label")
        self.label.setGeometry(QRect(10, 30, 131, 16))

        self.gridLayout_2.addWidget(self.groupBox_9, 0, 0, 1, 1)

        self.groupBox_3 = QGroupBox(self.tab)
        self.groupBox_3.setObjectName(u"groupBox_3")
        self.DistanceCompare = QComboBox(self.groupBox_3)
        self.DistanceCompare.setObjectName(u"DistanceCompare")
        self.DistanceCompare.setGeometry(QRect(10, 50, 121, 22))
        self.Distance = QLineEdit(self.groupBox_3)
        self.Distance.setObjectName(u"Distance")
        self.Distance.setGeometry(QRect(10, 80, 121, 21))
        self.Distance.setClearButtonEnabled(True)
        self.DistanceEnable = QCheckBox(self.groupBox_3)
        self.DistanceEnable.setObjectName(u"DistanceEnable")
        self.DistanceEnable.setGeometry(QRect(10, 20, 111, 20))
        self.TimeEnable = QCheckBox(self.groupBox_3)
        self.TimeEnable.setObjectName(u"TimeEnable")
        self.TimeEnable.setGeometry(QRect(150, 20, 91, 20))
        self.TimeFrom = QSpinBox(self.groupBox_3)
        self.TimeFrom.setObjectName(u"TimeFrom")
        self.TimeFrom.setGeometry(QRect(150, 70, 41, 31))
        self.label_10 = QLabel(self.groupBox_3)
        self.label_10.setObjectName(u"label_10")
        self.label_10.setGeometry(QRect(210, 50, 49, 16))
        self.TimeTo = QSpinBox(self.groupBox_3)
        self.TimeTo.setObjectName(u"TimeTo")
        self.TimeTo.setGeometry(QRect(200, 70, 41, 31))
        self.label_9 = QLabel(self.groupBox_3)
        self.label_9.setObjectName(u"label_9")
        self.label_9.setGeometry(QRect(150, 50, 49, 16))

        self.gridLayout_2.addWidget(self.groupBox_3, 0, 1, 1, 1)

        self.groupBox_8 = QGroupBox(self.tab)
        self.groupBox_8.setObjectName(u"groupBox_8")
        self.EnemyHealthBodyPart = QComboBox(self.groupBox_8)
        self.EnemyHealthBodyPart.setObjectName(u"EnemyHealthBodyPart")
        self.EnemyHealthBodyPart.setGeometry(QRect(10, 30, 121, 22))
        self.EnemyHealthBodyWidget = QListWidget(self.groupBox_8)
        self.EnemyHealthBodyWidget.setObjectName(u"EnemyHealthBodyWidget")
        self.EnemyHealthBodyWidget.setGeometry(QRect(140, 30, 111, 81))
        self.EnemyHealthBodyPartAdd = QPushButton(self.groupBox_8)
        self.EnemyHealthBodyPartAdd.setObjectName(u"EnemyHealthBodyPartAdd")
        self.EnemyHealthBodyPartAdd.setGeometry(QRect(10, 60, 121, 24))
        self.EnemyHealthBodyPartRemove = QPushButton(self.groupBox_8)
        self.EnemyHealthBodyPartRemove.setObjectName(u"EnemyHealthBodyPartRemove")
        self.EnemyHealthBodyPartRemove.setGeometry(QRect(10, 90, 121, 24))
        self.EnemyHealthEffectWidget = QListWidget(self.groupBox_8)
        self.EnemyHealthEffectWidget.setObjectName(u"EnemyHealthEffectWidget")
        self.EnemyHealthEffectWidget.setGeometry(QRect(410, 30, 111, 81))
        self.EnemyHealthEffect = QComboBox(self.groupBox_8)
        self.EnemyHealthEffect.setObjectName(u"EnemyHealthEffect")
        self.EnemyHealthEffect.setGeometry(QRect(280, 30, 121, 22))
        self.EnemyHealthEffectRemove = QPushButton(self.groupBox_8)
        self.EnemyHealthEffectRemove.setObjectName(u"EnemyHealthEffectRemove")
        self.EnemyHealthEffectRemove.setGeometry(QRect(280, 90, 121, 24))
        self.EnemyHealthEffectAdd = QPushButton(self.groupBox_8)
        self.EnemyHealthEffectAdd.setObjectName(u"EnemyHealthEffectAdd")
        self.EnemyHealthEffectAdd.setGeometry(QRect(280, 60, 121, 24))
        self.EnemyHealthWidget = QListWidget(self.groupBox_8)
        self.EnemyHealthWidget.setObjectName(u"EnemyHealthWidget")
        self.EnemyHealthWidget.setGeometry(QRect(150, 120, 251, 61))
        self.EnemyHealthRemoveFromList = QPushButton(self.groupBox_8)
        self.EnemyHealthRemoveFromList.setObjectName(u"EnemyHealthRemoveFromList")
        self.EnemyHealthRemoveFromList.setGeometry(QRect(10, 150, 131, 24))
        self.EnemyHealthAddToList = QPushButton(self.groupBox_8)
        self.EnemyHealthAddToList.setObjectName(u"EnemyHealthAddToList")
        self.EnemyHealthAddToList.setGeometry(QRect(10, 120, 131, 24))

        self.gridLayout_2.addWidget(self.groupBox_8, 1, 0, 1, 2)

        self.groupBox_4 = QGroupBox(self.tab)
        self.groupBox_4.setObjectName(u"groupBox_4")
        self.BodyPartRemove = QPushButton(self.groupBox_4)
        self.BodyPartRemove.setObjectName(u"BodyPartRemove")
        self.BodyPartRemove.setGeometry(QRect(10, 90, 121, 24))
        self.BodyPartsWidget = QListWidget(self.groupBox_4)
        self.BodyPartsWidget.setObjectName(u"BodyPartsWidget")
        self.BodyPartsWidget.setGeometry(QRect(140, 30, 111, 161))
        self.BodyPartAdd = QPushButton(self.groupBox_4)
        self.BodyPartAdd.setObjectName(u"BodyPartAdd")
        self.BodyPartAdd.setGeometry(QRect(10, 60, 121, 24))
        self.BodyParts = QComboBox(self.groupBox_4)
        self.BodyParts.setObjectName(u"BodyParts")
        self.BodyParts.setGeometry(QRect(10, 30, 121, 22))

        self.gridLayout_2.addWidget(self.groupBox_4, 2, 0, 1, 1)

        self.groupBox_2 = QGroupBox(self.tab)
        self.groupBox_2.setObjectName(u"groupBox_2")
        self.LocationWidget = QListWidget(self.groupBox_2)
        self.LocationWidget.setObjectName(u"LocationWidget")
        self.LocationWidget.setGeometry(QRect(140, 30, 111, 151))
        self.Location = QComboBox(self.groupBox_2)
        self.Location.setObjectName(u"Location")
        self.Location.setGeometry(QRect(10, 30, 121, 22))
        self.LocationAdd = QPushButton(self.groupBox_2)
        self.LocationAdd.setObjectName(u"LocationAdd")
        self.LocationAdd.setGeometry(QRect(10, 60, 121, 24))
        self.LocationRemove = QPushButton(self.groupBox_2)
        self.LocationRemove.setObjectName(u"LocationRemove")
        self.LocationRemove.setGeometry(QRect(10, 90, 121, 24))

        self.gridLayout_2.addWidget(self.groupBox_2, 2, 1, 1, 1)

        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QWidget()
        self.tab_2.setObjectName(u"tab_2")
        self.gridLayout_3 = QGridLayout(self.tab_2)
        self.gridLayout_3.setObjectName(u"gridLayout_3")
        self.groupBox_7 = QGroupBox(self.tab_2)
        self.groupBox_7.setObjectName(u"groupBox_7")
        self.groupBox_7.setMaximumSize(QSize(266, 16777215))

        self.gridLayout_3.addWidget(self.groupBox_7, 1, 0, 1, 1)

        self.groupBox_10 = QGroupBox(self.tab_2)
        self.groupBox_10.setObjectName(u"groupBox_10")

        self.gridLayout_3.addWidget(self.groupBox_10, 0, 1, 1, 1)

        self.groupBox_5 = QGroupBox(self.tab_2)
        self.groupBox_5.setObjectName(u"groupBox_5")
        self.groupBox_5.setMaximumSize(QSize(266, 16777215))
        self.ZoneId = QLineEdit(self.groupBox_5)
        self.ZoneId.setObjectName(u"ZoneId")
        self.ZoneId.setGeometry(QRect(10, 60, 121, 21))
        self.ZoneId.setClearButtonEnabled(True)
        self.ZoneRemove = QPushButton(self.groupBox_5)
        self.ZoneRemove.setObjectName(u"ZoneRemove")
        self.ZoneRemove.setGeometry(QRect(10, 120, 121, 24))
        self.ZoneAdd = QPushButton(self.groupBox_5)
        self.ZoneAdd.setObjectName(u"ZoneAdd")
        self.ZoneAdd.setGeometry(QRect(10, 90, 121, 24))
        self.ZoneWidget = QListWidget(self.groupBox_5)
        self.ZoneWidget.setObjectName(u"ZoneWidget")
        self.ZoneWidget.setGeometry(QRect(140, 30, 111, 151))
        self.PlayerHealthBuff_2 = QComboBox(self.groupBox_5)
        self.PlayerHealthBuff_2.setObjectName(u"PlayerHealthBuff_2")
        self.PlayerHealthBuff_2.setGeometry(QRect(10, 30, 121, 22))
        self.label_2 = QLabel(self.groupBox_5)
        self.label_2.setObjectName(u"label_2")
        self.label_2.setGeometry(QRect(40, 160, 61, 16))
        self.label_2.setAlignment(Qt.AlignCenter)

        self.gridLayout_3.addWidget(self.groupBox_5, 0, 0, 1, 1)

        self.groupBox_11 = QGroupBox(self.tab_2)
        self.groupBox_11.setObjectName(u"groupBox_11")
        self.groupBox_11.setMinimumSize(QSize(265, 0))
        self.groupBox_11.setMaximumSize(QSize(255, 16777215))

        self.gridLayout_3.addWidget(self.groupBox_11, 1, 1, 1, 1)

        self.groupBox_6 = QGroupBox(self.tab_2)
        self.groupBox_6.setObjectName(u"groupBox_6")
        self.groupBox_6.setMaximumSize(QSize(266, 16777215))

        self.gridLayout_3.addWidget(self.groupBox_6, 2, 0, 1, 1)

        self.groupBox_12 = QGroupBox(self.tab_2)
        self.groupBox_12.setObjectName(u"groupBox_12")

        self.gridLayout_3.addWidget(self.groupBox_12, 2, 1, 1, 1)

        self.tabWidget.addTab(self.tab_2, "")

        self.gridLayout.addWidget(self.tabWidget, 2, 0, 1, 1)

        KillsEditor.setCentralWidget(self.centralwidget)

        self.retranslateUi(KillsEditor)

        self.tabWidget.setCurrentIndex(0)


        QMetaObject.connectSlotsByName(KillsEditor)
    # setupUi

    def retranslateUi(self, KillsEditor):
        KillsEditor.setWindowTitle(QCoreApplication.translate("KillsEditor", u"Kills Editor", None))
        self.groupBox.setTitle(QCoreApplication.translate("KillsEditor", u"Root", None))
        self.RootOneSessionOnly.setText(QCoreApplication.translate("KillsEditor", u"One Session Only", None))
        self.RootLocale.setText(QCoreApplication.translate("KillsEditor", u"Dynamic Locale", None))
        self.RootDoNotReset.setText(QCoreApplication.translate("KillsEditor", u"Do Not reset if counter completed", None))
        self.Target.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Target", None))
        self.RootAmount.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Amount", None))
        self.RootCompare.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Compare", None))
        self.ObjectiveMessage.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Objective Message", None))
        self.KillsEditorAddToList.setText(QCoreApplication.translate("KillsEditor", u"Add Condition", None))
        self.KillsEditorRemoveFromList.setText(QCoreApplication.translate("KillsEditor", u"Remove", None))
        self.groupBox_9.setTitle(QCoreApplication.translate("KillsEditor", u"Savage Role", None))
        self.SavageRoleRemove.setText(QCoreApplication.translate("KillsEditor", u"Remove", None))
        self.SavageRole.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Savage Role", None))
        self.SavageRoleAdd.setText(QCoreApplication.translate("KillsEditor", u"Add", None))
        self.label.setText(QCoreApplication.translate("KillsEditor", u"Target must be Savage", None))
        self.groupBox_3.setTitle(QCoreApplication.translate("KillsEditor", u"Distance and Time", None))
        self.DistanceCompare.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Compare Method", None))
        self.Distance.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Distance", None))
        self.DistanceEnable.setText(QCoreApplication.translate("KillsEditor", u"Distance Enable", None))
        self.TimeEnable.setText(QCoreApplication.translate("KillsEditor", u"Time Enable", None))
        self.label_10.setText(QCoreApplication.translate("KillsEditor", u"To", None))
        self.label_9.setText(QCoreApplication.translate("KillsEditor", u"From", None))
        self.groupBox_8.setTitle(QCoreApplication.translate("KillsEditor", u"Enemy Health Conditions", None))
        self.EnemyHealthBodyPart.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Body Part", None))
        self.EnemyHealthBodyPartAdd.setText(QCoreApplication.translate("KillsEditor", u"Add", None))
        self.EnemyHealthBodyPartRemove.setText(QCoreApplication.translate("KillsEditor", u"Remove", None))
        self.EnemyHealthEffect.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Effect", None))
        self.EnemyHealthEffectRemove.setText(QCoreApplication.translate("KillsEditor", u"Remove", None))
        self.EnemyHealthEffectAdd.setText(QCoreApplication.translate("KillsEditor", u"Add", None))
        self.EnemyHealthRemoveFromList.setText(QCoreApplication.translate("KillsEditor", u"Remove combination", None))
        self.EnemyHealthAddToList.setText(QCoreApplication.translate("KillsEditor", u"Add combination", None))
        self.groupBox_4.setTitle(QCoreApplication.translate("KillsEditor", u"Target Body Parts", None))
        self.BodyPartRemove.setText(QCoreApplication.translate("KillsEditor", u"Remove", None))
        self.BodyPartAdd.setText(QCoreApplication.translate("KillsEditor", u"Add", None))
        self.BodyParts.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Body Part", None))
        self.groupBox_2.setTitle(QCoreApplication.translate("KillsEditor", u"Location", None))
        self.Location.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Location", None))
        self.LocationAdd.setText(QCoreApplication.translate("KillsEditor", u"Add", None))
        self.LocationRemove.setText(QCoreApplication.translate("KillsEditor", u"Remove", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QCoreApplication.translate("KillsEditor", u"Conditions 1", None))
        self.groupBox_7.setTitle(QCoreApplication.translate("KillsEditor", u"???", None))
        self.groupBox_10.setTitle(QCoreApplication.translate("KillsEditor", u"???", None))
        self.groupBox_5.setTitle(QCoreApplication.translate("KillsEditor", u"Zones", None))
        self.ZoneId.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"ZoneId", None))
        self.ZoneRemove.setText(QCoreApplication.translate("KillsEditor", u"Remove", None))
        self.ZoneAdd.setText(QCoreApplication.translate("KillsEditor", u"Add", None))
        self.PlayerHealthBuff_2.setPlaceholderText(QCoreApplication.translate("KillsEditor", u"Zone Type", None))
        self.label_2.setText(QCoreApplication.translate("KillsEditor", u"Disabled", None))
        self.groupBox_11.setTitle(QCoreApplication.translate("KillsEditor", u"???", None))
        self.groupBox_6.setTitle(QCoreApplication.translate("KillsEditor", u"???", None))
        self.groupBox_12.setTitle(QCoreApplication.translate("KillsEditor", u"???", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QCoreApplication.translate("KillsEditor", u"Conditions 2", None))
    # retranslateUi


TarkovTools/Ui/Layouts/AFFKillsEditor_ui.py
TarkovTools/Application
# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file 'OptionsWidget.ui'
##
## Created by: Qt User Interface Compiler version 6.4.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
    QMetaObject, QObject, QPoint, QRect,
    QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
    QFont, QFontDatabase, QGradient, QIcon,
    QImage, QKeySequence, QLinearGradient, QPainter,
    QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QSizePolicy, QWidget)

class Ui_OptionsWidget(object):
    def setupUi(self, OptionsWidget):
        if not OptionsWidget.objectName():
            OptionsWidget.setObjectName(u"OptionsWidget")
        OptionsWidget.resize(640, 480)

        self.retranslateUi(OptionsWidget)

        QMetaObject.connectSlotsByName(OptionsWidget)
    # setupUi

    def retranslateUi(self, OptionsWidget):
        OptionsWidget.setWindowTitle(QCoreApplication.translate("OptionsWidget", u"Form", None))
    # retranslateUi


TarkovTools/Ui/Layouts/OptionsWidget_ui.py
TarkovTools/Application
# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file 'PowerSearch.ui'
##
## Created by: Qt User Interface Compiler version 6.4.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
    QMetaObject, QObject, QPoint, QRect,
    QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
    QFont, QFontDatabase, QGradient, QIcon,
    QImage, QKeySequence, QLinearGradient, QPainter,
    QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QCheckBox, QGridLayout, QLabel,
    QLineEdit, QListWidget, QListWidgetItem, QMainWindow,
    QSizePolicy, QTabWidget, QWidget)

class Ui_PowerSearch(object):
    def setupUi(self, PowerSearch):
        if not PowerSearch.objectName():
            PowerSearch.setObjectName(u"PowerSearch")
        PowerSearch.resize(364, 480)
        sizePolicy = QSizePolicy(QSizePolicy.Ignored, QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(PowerSearch.sizePolicy().hasHeightForWidth())
        PowerSearch.setSizePolicy(sizePolicy)
        PowerSearch.setMinimumSize(QSize(364, 480))
        PowerSearch.setMaximumSize(QSize(3840, 2160))
        PowerSearch.setTabShape(QTabWidget.Rounded)
        self.centralwidget = QWidget(PowerSearch)
        self.centralwidget.setObjectName(u"centralwidget")
        self.gridLayout = QGridLayout(self.centralwidget)
        self.gridLayout.setObjectName(u"gridLayout")
        self.tabWidget = QTabWidget(self.centralwidget)
        self.tabWidget.setObjectName(u"tabWidget")
        self.tab = QWidget()
        self.tab.setObjectName(u"tab")
        self.gridLayout_2 = QGridLayout(self.tab)
        self.gridLayout_2.setObjectName(u"gridLayout_2")
        self.ResultsWidget = QListWidget(self.tab)
        self.ResultsWidget.setObjectName(u"ResultsWidget")
        sizePolicy.setHeightForWidth(self.ResultsWidget.sizePolicy().hasHeightForWidth())
        self.ResultsWidget.setSizePolicy(sizePolicy)
        self.ResultsWidget.setMinimumSize(QSize(0, 0))
        self.ResultsWidget.setMaximumSize(QSize(3840, 2160))

        self.gridLayout_2.addWidget(self.ResultsWidget, 0, 0, 1, 1)

        self.tabWidget.addTab(self.tab, "")
        self.tab_2 = QWidget()
        self.tab_2.setObjectName(u"tab_2")
        self.CheckBoxQuestsWithConditions = QCheckBox(self.tab_2)
        self.CheckBoxQuestsWithConditions.setObjectName(u"CheckBoxQuestsWithConditions")
        self.CheckBoxQuestsWithConditions.setGeometry(QRect(9, 10, 166, 20))
        self.label = QLabel(self.tab_2)
        self.label.setObjectName(u"label")
        self.label.setGeometry(QRect(20, 370, 301, 16))
        self.tabWidget.addTab(self.tab_2, "")

        self.gridLayout.addWidget(self.tabWidget, 1, 0, 1, 1)

        self.LineEditSearch = QLineEdit(self.centralwidget)
        self.LineEditSearch.setObjectName(u"LineEditSearch")
        self.LineEditSearch.setClearButtonEnabled(True)

        self.gridLayout.addWidget(self.LineEditSearch, 0, 0, 1, 1)

        PowerSearch.setCentralWidget(self.centralwidget)

        self.retranslateUi(PowerSearch)

        self.tabWidget.setCurrentIndex(0)


        QMetaObject.connectSlotsByName(PowerSearch)
    # setupUi

    def retranslateUi(self, PowerSearch):
        PowerSearch.setWindowTitle(QCoreApplication.translate("PowerSearch", u"Power Search", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QCoreApplication.translate("PowerSearch", u"Results", None))
        self.CheckBoxQuestsWithConditions.setText(QCoreApplication.translate("PowerSearch", u"Get Quests With Conditions", None))
        self.label.setText("")
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QCoreApplication.translate("PowerSearch", u"Dev Search Options", None))
        self.LineEditSearch.setText("")
        self.LineEditSearch.setPlaceholderText(QCoreApplication.translate("PowerSearch", u"Search by Id, name, or localized name", None))
    # retranslateUi


TarkovTools/Ui/Layouts/PowerSearch_ui.py
TarkovTools/Application
# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file 'TarkovTools.ui'
##
## Created by: Qt User Interface Compiler version 6.4.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
    QMetaObject, QObject, QPoint, QRect,
    QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient,
    QCursor, QFont, QFontDatabase, QGradient,
    QIcon, QImage, QKeySequence, QLinearGradient,
    QPainter, QPalette, QPixmap, QRadialGradient,
    QTransform)
from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QFrame,
    QGridLayout, QHBoxLayout, QLabel, QLayout,
    QLineEdit, QListWidget, QListWidgetItem, QMainWindow,
    QPlainTextEdit, QPushButton, QSizePolicy, QSpinBox,
    QTabWidget, QTextEdit, QWidget)

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.setEnabled(True)
        MainWindow.resize(1297, 866)
        sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
        MainWindow.setSizePolicy(sizePolicy)
        MainWindow.setMinimumSize(QSize(0, 0))
        MainWindow.setMaximumSize(QSize(1297, 866))
        MainWindow.setMouseTracking(False)
        MainWindow.setAcceptDrops(False)
        icon = QIcon()
        icon.addFile(u"C:/Users/dirtb/.designer/backup/resources/thumbnail.png", QSize(), QIcon.Normal, QIcon.Off)
        MainWindow.setWindowIcon(icon)
        MainWindow.setAutoFillBackground(False)
        MainWindow.setStyleSheet(u"")
        MainWindow.setTabShape(QTabWidget.Rounded)
        self.actionOpen = QAction(MainWindow)
        self.actionOpen.setObjectName(u"actionOpen")
        self.actionSave = QAction(MainWindow)
        self.actionSave.setObjectName(u"actionSave")
        self.actionSave_As = QAction(MainWindow)
        self.actionSave_As.setObjectName(u"actionSave_As")
        self.actionSettings = QAction(MainWindow)
        self.actionSettings.setObjectName(u"actionSettings")
        self.actionThese_Do_Nothing = QAction(MainWindow)
        self.actionThese_Do_Nothing.setObjectName(u"actionThese_Do_Nothing")
        self.actionPower_Search = QAction(MainWindow)
        self.actionPower_Search.setObjectName(u"actionPower_Search")
        self.centralwidget = QWidget(MainWindow)
        self.centralwidget.setObjectName(u"centralwidget")
        self.horizontalLayout = QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.horizontalLayout_2 = QHBoxLayout()
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.horizontalLayout_2.setSizeConstraint(QLayout.SetMinAndMaxSize)
        self.tabWidget = QTabWidget(self.centralwidget)
        self.tabWidget.setObjectName(u"tabWidget")
        sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
        self.tabWidget.setSizePolicy(sizePolicy)
        self.tabWidget.setCursor(QCursor(Qt.ArrowCursor))
        self.tabWidget.setLayoutDirection(Qt.LeftToRight)
        self.tabWidget.setTabShape(QTabWidget.Rounded)
        self.tabWidget.setDocumentMode(False)
        self.tabWidget.setTabsClosable(False)
        self.tabWidget.setTabBarAutoHide(False)
        self.QuestCreator = QWidget()
        self.QuestCreator.setObjectName(u"QuestCreator")
        sizePolicy.setHeightForWidth(self.QuestCreator.sizePolicy().hasHeightForWidth())
        self.QuestCreator.setSizePolicy(sizePolicy)
        self.gridLayoutWidget = QWidget(self.QuestCreator)
        self.gridLayoutWidget.setObjectName(u"gridLayoutWidget")
        self.gridLayoutWidget.setGeometry(QRect(0, 0, 351, 751))
        self.FileManagerLayout = QGridLayout(self.gridLayoutWidget)
        self.FileManagerLayout.setObjectName(u"FileManagerLayout")
        self.FileManagerLayout.setContentsMargins(0, 0, 0, 0)
        self.line_2 = QFrame(self.gridLayoutWidget)
        self.line_2.setObjectName(u"line_2")
        self.line_2.setFrameShape(QFrame.HLine)
        self.line_2.setFrameShadow(QFrame.Sunken)

        self.FileManagerLayout.addWidget(self.line_2, 8, 1, 1, 3)

        self.NewQuest = QPushButton(self.gridLayoutWidget)
        self.NewQuest.setObjectName(u"NewQuest")

        self.FileManagerLayout.addWidget(self.NewQuest, 11, 1, 1, 1)

        self.LoadQuestFile = QPushButton(self.gridLayoutWidget)
        self.LoadQuestFile.setObjectName(u"LoadQuestFile")

        self.FileManagerLayout.addWidget(self.LoadQuestFile, 1, 2, 1, 1)

        self.NewQuestFile = QPushButton(self.gridLayoutWidget)
        self.NewQuestFile.setObjectName(u"NewQuestFile")

        self.FileManagerLayout.addWidget(self.NewQuestFile, 1, 1, 1, 1)

        self.DuplicateQuest = QPushButton(self.gridLayoutWidget)
        self.DuplicateQuest.setObjectName(u"DuplicateQuest")

        self.FileManagerLayout.addWidget(self.DuplicateQuest, 13, 2, 1, 1)

        self.EditQuest = QPushButton(self.gridLayoutWidget)
        self.EditQuest.setObjectName(u"EditQuest")

        self.FileManagerLayout.addWidget(self.EditQuest, 13, 1, 1, 1)

        self.CurrentQuestText = QLineEdit(self.gridLayoutWidget)
        self.CurrentQuestText.setObjectName(u"CurrentQuestText")
        self.CurrentQuestText.setReadOnly(True)
        self.CurrentQuestText.setClearButtonEnabled(False)

        self.FileManagerLayout.addWidget(self.CurrentQuestText, 14, 1, 1, 3)

        self.SaveQuestFile = QPushButton(self.gridLayoutWidget)
        self.SaveQuestFile.setObjectName(u"SaveQuestFile")

        self.FileManagerLayout.addWidget(self.SaveQuestFile, 1, 3, 1, 1)

        self.QuestFileWidget = QListWidget(self.gridLayoutWidget)
        self.QuestFileWidget.setObjectName(u"QuestFileWidget")

        self.FileManagerLayout.addWidget(self.QuestFileWidget, 15, 1, 2, 3)

        self.SaveQuest = QPushButton(self.gridLayoutWidget)
        self.SaveQuest.setObjectName(u"SaveQuest")

        self.FileManagerLayout.addWidget(self.SaveQuest, 11, 3, 1, 1)

        self.RemoveFromQuestFile = QPushButton(self.gridLayoutWidget)
        self.RemoveFromQuestFile.setObjectName(u"RemoveFromQuestFile")

        self.FileManagerLayout.addWidget(self.RemoveFromQuestFile, 13, 3, 1, 1)

        self.LoadFilePath = QLineEdit(self.gridLayoutWidget)
        self.LoadFilePath.setObjectName(u"LoadFilePath")
        self.LoadFilePath.setReadOnly(True)
        self.LoadFilePath.setClearButtonEnabled(False)

        self.FileManagerLayout.addWidget(self.LoadFilePath, 6, 1, 1, 3)

        self.line_3 = QFrame(self.gridLayoutWidget)
        self.line_3.setObjectName(u"line_3")
        self.line_3.setFrameShape(QFrame.HLine)
        self.line_3.setFrameShadow(QFrame.Sunken)

        self.FileManagerLayout.addWidget(self.line_3, 17, 1, 1, 3)

        self.LoadedLocalePath = QLineEdit(self.gridLayoutWidget)
        self.LoadedLocalePath.setObjectName(u"LoadedLocalePath")
        self.LoadedLocalePath.setReadOnly(True)
        self.LoadedLocalePath.setClearButtonEnabled(False)

        self.FileManagerLayout.addWidget(self.LoadedLocalePath, 7, 1, 1, 3)

        self.ClearConsole = QPushButton(self.gridLayoutWidget)
        self.ClearConsole.setObjectName(u"ClearConsole")
        sizePolicy1 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(113)
        sizePolicy1.setHeightForWidth(self.ClearConsole.sizePolicy().hasHeightForWidth())
        self.ClearConsole.setSizePolicy(sizePolicy1)

        self.FileManagerLayout.addWidget(self.ClearConsole, 18, 2, 1, 1)

        self.Console = QListWidget(self.gridLayoutWidget)
        self.Console.setObjectName(u"Console")

        self.FileManagerLayout.addWidget(self.Console, 19, 1, 1, 3)

        self.label_30 = QLabel(self.gridLayoutWidget)
        self.label_30.setObjectName(u"label_30")
        self.label_30.setAlignment(Qt.AlignCenter)

        self.FileManagerLayout.addWidget(self.label_30, 11, 2, 1, 1)

        self.gridLayoutWidget_2 = QWidget(self.QuestCreator)
        self.gridLayoutWidget_2.setObjectName(u"gridLayoutWidget_2")
        self.gridLayoutWidget_2.setGeometry(QRect(360, 0, 901, 101))
        self.RootEditorLayout = QGridLayout(self.gridLayoutWidget_2)
        self.RootEditorLayout.setObjectName(u"RootEditorLayout")
        self.RootEditorLayout.setContentsMargins(0, 0, 0, 0)
        self._Id = QLineEdit(self.gridLayoutWidget_2)
        self._Id.setObjectName(u"_Id")
        self._Id.setMaxLength(255)
        self._Id.setClearButtonEnabled(True)

        self.RootEditorLayout.addWidget(self._Id, 0, 0, 1, 1)

        self.DynamicLocale = QCheckBox(self.gridLayoutWidget_2)
        self.DynamicLocale.setObjectName(u"DynamicLocale")
        self.DynamicLocale.setChecked(False)

        self.RootEditorLayout.addWidget(self.DynamicLocale, 1, 1, 1, 1)

        self.ImagePath = QLineEdit(self.gridLayoutWidget_2)
        self.ImagePath.setObjectName(u"ImagePath")
        self.ImagePath.setMaxLength(512)
        self.ImagePath.setClearButtonEnabled(True)

        self.RootEditorLayout.addWidget(self.ImagePath, 2, 0, 1, 1)

        self.InstantComplete = QCheckBox(self.gridLayoutWidget_2)
        self.InstantComplete.setObjectName(u"InstantComplete")
        self.InstantComplete.setChecked(False)

        self.RootEditorLayout.addWidget(self.InstantComplete, 2, 2, 1, 1)

        self.SecretQuest = QCheckBox(self.gridLayoutWidget_2)
        self.SecretQuest.setObjectName(u"SecretQuest")
        self.SecretQuest.setChecked(False)

        self.RootEditorLayout.addWidget(self.SecretQuest, 1, 2, 1, 1)

        self.TradercomboBox = QComboBox(self.gridLayoutWidget_2)
        self.TradercomboBox.setObjectName(u"TradercomboBox")

        self.RootEditorLayout.addWidget(self.TradercomboBox, 0, 3, 1, 1)

        self.RequiresKey = QCheckBox(self.gridLayoutWidget_2)
        self.RequiresKey.setObjectName(u"RequiresKey")

        self.RootEditorLayout.addWidget(self.RequiresKey, 0, 2, 1, 1)

        self.Restartable = QCheckBox(self.gridLayoutWidget_2)
        self.Restartable.setObjectName(u"Restartable")
        self.Restartable.setChecked(False)

        self.RootEditorLayout.addWidget(self.Restartable, 2, 1, 1, 1)

        self.CanShowNotifications = QCheckBox(self.gridLayoutWidget_2)
        self.CanShowNotifications.setObjectName(u"CanShowNotifications")
        self.CanShowNotifications.setChecked(True)

        self.RootEditorLayout.addWidget(self.CanShowNotifications, 0, 1, 1, 1)

        self.Side = QComboBox(self.gridLayoutWidget_2)
        self.Side.setObjectName(u"Side")
        self.Side.setEditable(False)
        self.Side.setModelColumn(0)

        self.RootEditorLayout.addWidget(self.Side, 2, 3, 1, 1)

        self.LocationComboBox = QComboBox(self.gridLayoutWidget_2)
        self.LocationComboBox.setObjectName(u"LocationComboBox")

        self.RootEditorLayout.addWidget(self.LocationComboBox, 1, 3, 1, 1)

        self.QuestName = QLineEdit(self.gridLayoutWidget_2)
        self.QuestName.setObjectName(u"QuestName")
        self.QuestName.setClearButtonEnabled(True)

        self.RootEditorLayout.addWidget(self.QuestName, 1, 0, 1, 1)

        self.Type = QComboBox(self.gridLayoutWidget_2)
        self.Type.setObjectName(u"Type")

        self.RootEditorLayout.addWidget(self.Type, 2, 4, 1, 1)

        self.LocationIdTextField = QLineEdit(self.gridLayoutWidget_2)
        self.LocationIdTextField.setObjectName(u"LocationIdTextField")
        self.LocationIdTextField.setMaxLength(24)
        self.LocationIdTextField.setClearButtonEnabled(True)

        self.RootEditorLayout.addWidget(self.LocationIdTextField, 1, 4, 1, 1)

        self.TraderIdTextField = QLineEdit(self.gridLayoutWidget_2)
        self.TraderIdTextField.setObjectName(u"TraderIdTextField")
        self.TraderIdTextField.setMaxLength(24)
        self.TraderIdTextField.setClearButtonEnabled(True)

        self.RootEditorLayout.addWidget(self.TraderIdTextField, 0, 4, 1, 1)

        self.GithubPathLabel = QLineEdit(self.QuestCreator)
        self.GithubPathLabel.setObjectName(u"GithubPathLabel")
        self.GithubPathLabel.setGeometry(QRect(10, 770, 261, 21))
        self.GithubPathLabel.setMaxLength(512)
        self.GithubPathLabel.setReadOnly(True)
        self.GithubPathLabel.setClearButtonEnabled(False)
        self.ALPHAVERSION = QLabel(self.QuestCreator)
        self.ALPHAVERSION.setObjectName(u"ALPHAVERSION")
        self.ALPHAVERSION.setGeometry(QRect(280, 760, 441, 41))
        self.ALPHAVERSION.setWordWrap(False)
        self.line = QFrame(self.QuestCreator)
        self.line.setObjectName(u"line")
        self.line.setGeometry(QRect(7, 750, 1261, 20))
        self.line.setFrameShape(QFrame.HLine)
        self.line.setFrameShadow(QFrame.Sunken)
        self.ConditionsTabWidget = QTabWidget(self.QuestCreator)
        self.ConditionsTabWidget.setObjectName(u"ConditionsTabWidget")
        self.ConditionsTabWidget.setGeometry(QRect(360, 110, 901, 641))
        self.ConditionsTabWidget.setTabBarAutoHide(False)
        self.tab_9 = QWidget()
        self.tab_9.setObjectName(u"tab_9")
        self.ChangeMessage = QTextEdit(self.tab_9)
        self.ChangeMessage.setObjectName(u"ChangeMessage")
        self.ChangeMessage.setGeometry(QRect(460, 210, 421, 191))
        self.SuccessMessage = QTextEdit(self.tab_9)
        self.SuccessMessage.setObjectName(u"SuccessMessage")
        self.SuccessMessage.setGeometry(QRect(460, 10, 421, 181))
        self.Description = QTextEdit(self.tab_9)
        self.Description.setObjectName(u"Description")
        self.Description.setGeometry(QRect(20, 10, 421, 181))
        self.FailMessage = QTextEdit(self.tab_9)
        self.FailMessage.setObjectName(u"FailMessage")
        self.FailMessage.setGeometry(QRect(20, 210, 421, 191))
        self.Note = QTextEdit(self.tab_9)
        self.Note.setObjectName(u"Note")
        self.Note.setGeometry(QRect(20, 420, 421, 181))
        self.ConditionsTabWidget.addTab(self.tab_9, "")
        self.tab_4 = QWidget()
        self.tab_4.setObjectName(u"tab_4")
        self.AvailableForStartLevelRequirement = QLineEdit(self.tab_4)
        self.AvailableForStartLevelRequirement.setObjectName(u"AvailableForStartLevelRequirement")
        self.AvailableForStartLevelRequirement.setGeometry(QRect(460, 40, 111, 21))
        self.AvailableForStartLevelRequirement.setClearButtonEnabled(True)
        self.AvailableForStartLevelRequirementCompare = QComboBox(self.tab_4)
        self.AvailableForStartLevelRequirementCompare.setObjectName(u"AvailableForStartLevelRequirementCompare")
        self.AvailableForStartLevelRequirementCompare.setGeometry(QRect(760, 40, 111, 22))
        self.AvailableForStartQuestId = QLineEdit(self.tab_4)
        self.AvailableForStartQuestId.setObjectName(u"AvailableForStartQuestId")
        self.AvailableForStartQuestId.setGeometry(QRect(20, 40, 111, 21))
        self.AvailableForStartQuestId.setClearButtonEnabled(True)
        self.AvailableForStartAddToList = QPushButton(self.tab_4)
        self.AvailableForStartAddToList.setObjectName(u"AvailableForStartAddToList")
        self.AvailableForStartAddToList.setGeometry(QRect(320, 40, 111, 24))
        self.AvailableForStartDynamicLocaleLevel = QCheckBox(self.tab_4)
        self.AvailableForStartDynamicLocaleLevel.setObjectName(u"AvailableForStartDynamicLocaleLevel")
        self.AvailableForStartDynamicLocaleLevel.setGeometry(QRect(620, 40, 111, 20))
        self.AvailableForStartDynamicLocaleLevel.setChecked(False)
        self.AvailableForStartDynamicLocaleQuest = QCheckBox(self.tab_4)
        self.AvailableForStartDynamicLocaleQuest.setObjectName(u"AvailableForStartDynamicLocaleQuest")
        self.AvailableForStartDynamicLocaleQuest.setGeometry(QRect(180, 40, 111, 20))
        self.AvailableForStartDynamicLocaleQuest.setChecked(False)
        self.AvailableForStartStatus = QComboBox(self.tab_4)
        self.AvailableForStartStatus.setObjectName(u"AvailableForStartStatus")
        self.AvailableForStartStatus.setGeometry(QRect(20, 70, 111, 22))
        self.label_4 = QLabel(self.tab_4)
        self.label_4.setObjectName(u"label_4")
        self.label_4.setGeometry(QRect(20, 20, 111, 16))
        self.StartQuestWidget = QListWidget(self.tab_4)
        self.StartQuestWidget.setObjectName(u"StartQuestWidget")
        self.StartQuestWidget.setGeometry(QRect(20, 130, 411, 171))
        self.AvailableForStartRemoveFromList = QPushButton(self.tab_4)
        self.AvailableForStartRemoveFromList.setObjectName(u"AvailableForStartRemoveFromList")
        self.AvailableForStartRemoveFromList.setGeometry(QRect(320, 70, 111, 24))
        self.StartLoyaltyWidget = QListWidget(self.tab_4)
        self.StartLoyaltyWidget.setObjectName(u"StartLoyaltyWidget")
        self.StartLoyaltyWidget.setGeometry(QRect(20, 430, 411, 171))
        self.AvailableForStartLoyaltyRemoveFromList = QPushButton(self.tab_4)
        self.AvailableForStartLoyaltyRemoveFromList.setObjectName(u"AvailableForStartLoyaltyRemoveFromList")
        self.AvailableForStartLoyaltyRemoveFromList.setGeometry(QRect(320, 370, 111, 24))
        self.AvailableForStartLoyaltyAddToList = QPushButton(self.tab_4)
        self.AvailableForStartLoyaltyAddToList.setObjectName(u"AvailableForStartLoyaltyAddToList")
        self.AvailableForStartLoyaltyAddToList.setGeometry(QRect(320, 340, 111, 24))
        self.AvailableForStartTraderComboBox = QComboBox(self.tab_4)
        self.AvailableForStartTraderComboBox.setObjectName(u"AvailableForStartTraderComboBox")
        self.AvailableForStartTraderComboBox.setGeometry(QRect(20, 340, 111, 22))
        self.AvailableForStartLoyaltyDynamicLocaleQuest = QCheckBox(self.tab_4)
        self.AvailableForStartLoyaltyDynamicLocaleQuest.setObjectName(u"AvailableForStartLoyaltyDynamicLocaleQuest")
        self.AvailableForStartLoyaltyDynamicLocaleQuest.setGeometry(QRect(180, 340, 111, 20))
        self.AvailableForStartLoyaltyDynamicLocaleQuest.setChecked(False)
        self.label_10 = QLabel(self.tab_4)
        self.label_10.setObjectName(u"label_10")
        self.label_10.setGeometry(QRect(20, 320, 151, 16))
        self.AvailableCompareLoyaltyComboBox = QComboBox(self.tab_4)
        self.AvailableCompareLoyaltyComboBox.setObjectName(u"AvailableCompareLoyaltyComboBox")
        self.AvailableCompareLoyaltyComboBox.setGeometry(QRect(20, 370, 111, 21))
        self.AvailableCompareLoyaltyComboBox.setEditable(False)
        self.AvailableCompareLoyaltyComboBox.setModelColumn(0)
        self.line_25 = QFrame(self.tab_4)
        self.line_25.setObjectName(u"line_25")
        self.line_25.setGeometry(QRect(440, 20, 20, 591))
        self.line_25.setFrameShape(QFrame.VLine)
        self.line_25.setFrameShadow(QFrame.Sunken)
        self.line_28 = QFrame(self.tab_4)
        self.line_28.setObjectName(u"line_28")
        self.line_28.setGeometry(QRect(0, 300, 891, 20))
        self.line_28.setFrameShape(QFrame.HLine)
        self.line_28.setFrameShadow(QFrame.Sunken)
        self.label_35 = QLabel(self.tab_4)
        self.label_35.setObjectName(u"label_35")
        self.label_35.setGeometry(QRect(460, 20, 111, 16))
        self.line_4 = QFrame(self.tab_4)
        self.line_4.setObjectName(u"line_4")
        self.line_4.setGeometry(QRect(450, 120, 441, 20))
        self.line_4.setFrameShape(QFrame.HLine)
        self.line_4.setFrameShadow(QFrame.Sunken)
        self.AvailableForStartLoyaltyValue = QSpinBox(self.tab_4)
        self.AvailableForStartLoyaltyValue.setObjectName(u"AvailableForStartLoyaltyValue")
        self.AvailableForStartLoyaltyValue.setGeometry(QRect(180, 370, 42, 22))
        self.ConditionsTabWidget.addTab(self.tab_4, "")
        self.tab_3 = QWidget()
        self.tab_3.setObjectName(u"tab_3")
        self.lineEdit_14 = QLineEdit(self.tab_3)
        self.lineEdit_14.setObjectName(u"lineEdit_14")
        self.lineEdit_14.setGeometry(QRect(9, 906, 132, 21))
        self.lineEdit_14.setClearButtonEnabled(True)
        self.checkBox_10 = QCheckBox(self.tab_3)
        self.checkBox_10.setObjectName(u"checkBox_10")
        self.checkBox_10.setGeometry(QRect(9, 933, 212, 20))
        self.checkBox_10.setChecked(False)
        self.AFFTabWidget = QTabWidget(self.tab_3)
        self.AFFTabWidget.setObjectName(u"AFFTabWidget")
        self.AFFTabWidget.setGeometry(QRect(0, 10, 901, 601))
        self.AFFTabWidget.setTabBarAutoHide(False)
        self.tab_11 = QWidget()
        self.tab_11.setObjectName(u"tab_11")
        self.label = QLabel(self.tab_11)
        self.label.setObjectName(u"label")
        self.label.setGeometry(QRect(20, 0, 49, 16))
        self.FinishLoyaltyDynamicLocale = QCheckBox(self.tab_11)
        self.FinishLoyaltyDynamicLocale.setObjectName(u"FinishLoyaltyDynamicLocale")
        self.FinishLoyaltyDynamicLocale.setGeometry(QRect(150, 50, 111, 20))
        self.FinishLoyaltyCompare = QComboBox(self.tab_11)
        self.FinishLoyaltyCompare.setObjectName(u"FinishLoyaltyCompare")
        self.FinishLoyaltyCompare.setGeometry(QRect(20, 50, 111, 22))
        self.FinishLoyaltyRemoveFromList = QPushButton(self.tab_11)
        self.FinishLoyaltyRemoveFromList.setObjectName(u"FinishLoyaltyRemoveFromList")
        self.FinishLoyaltyRemoveFromList.setGeometry(QRect(320, 50, 111, 24))
        self.FinishLoyaltyWidget = QListWidget(self.tab_11)
        self.FinishLoyaltyWidget.setObjectName(u"FinishLoyaltyWidget")
        self.FinishLoyaltyWidget.setGeometry(QRect(20, 300, 411, 261))
        self.FinishLoyaltyAddToList = QPushButton(self.tab_11)
        self.FinishLoyaltyAddToList.setObjectName(u"FinishLoyaltyAddToList")
        self.FinishLoyaltyAddToList.setGeometry(QRect(320, 20, 111, 24))
        self.TraderFinishcomboBox = QComboBox(self.tab_11)
        self.TraderFinishcomboBox.setObjectName(u"TraderFinishcomboBox")
        self.TraderFinishcomboBox.setGeometry(QRect(20, 20, 111, 22))
        self.FinishLoyaltyObjective = QTextEdit(self.tab_11)
        self.FinishLoyaltyObjective.setObjectName(u"FinishLoyaltyObjective")
        self.FinishLoyaltyObjective.setGeometry(QRect(20, 80, 411, 201))
        self.FinishDynamicLocaleSkill = QCheckBox(self.tab_11)
        self.FinishDynamicLocaleSkill.setObjectName(u"FinishDynamicLocaleSkill")
        self.FinishDynamicLocaleSkill.setGeometry(QRect(600, 50, 111, 20))
        self.label_2 = QLabel(self.tab_11)
        self.label_2.setObjectName(u"label_2")
        self.label_2.setGeometry(QRect(460, 0, 49, 16))
        self.FinishSkillAddToList = QPushButton(self.tab_11)
        self.FinishSkillAddToList.setObjectName(u"FinishSkillAddToList")
        self.FinishSkillAddToList.setGeometry(QRect(770, 20, 111, 24))
        self.FinishSkillWidget = QListWidget(self.tab_11)
        self.FinishSkillWidget.setObjectName(u"FinishSkillWidget")
        self.FinishSkillWidget.setGeometry(QRect(470, 300, 411, 261))
        self.FinishSkillComboBox = QComboBox(self.tab_11)
        self.FinishSkillComboBox.setObjectName(u"FinishSkillComboBox")
        self.FinishSkillComboBox.setGeometry(QRect(470, 20, 111, 22))
        self.FinishSkillObjective = QTextEdit(self.tab_11)
        self.FinishSkillObjective.setObjectName(u"FinishSkillObjective")
        self.FinishSkillObjective.setGeometry(QRect(470, 80, 411, 201))
        self.FinishSkillCompare = QComboBox(self.tab_11)
        self.FinishSkillCompare.setObjectName(u"FinishSkillCompare")
        self.FinishSkillCompare.setGeometry(QRect(470, 50, 111, 22))
        self.FinishSkillRemoveFromList = QPushButton(self.tab_11)
        self.FinishSkillRemoveFromList.setObjectName(u"FinishSkillRemoveFromList")
        self.FinishSkillRemoveFromList.setGeometry(QRect(770, 50, 111, 24))
        self.line_20 = QFrame(self.tab_11)
        self.line_20.setObjectName(u"line_20")
        self.line_20.setGeometry(QRect(440, 0, 20, 581))
        self.line_20.setFrameShape(QFrame.VLine)
        self.line_20.setFrameShadow(QFrame.Sunken)
        self.FinishLoyaltyValue = QSpinBox(self.tab_11)
        self.FinishLoyaltyValue.setObjectName(u"FinishLoyaltyValue")
        self.FinishLoyaltyValue.setGeometry(QRect(150, 20, 42, 22))
        self.FinishSkillValue = QSpinBox(self.tab_11)
        self.FinishSkillValue.setObjectName(u"FinishSkillValue")
        self.FinishSkillValue.setGeometry(QRect(600, 20, 42, 22))
        self.label_3 = QLabel(self.tab_11)
        self.label_3.setObjectName(u"label_3")
        self.label_3.setGeometry(QRect(200, 20, 49, 20))
        self.label_5 = QLabel(self.tab_11)
        self.label_5.setObjectName(u"label_5")
        self.label_5.setGeometry(QRect(650, 20, 49, 20))
        self.AFFTabWidget.addTab(self.tab_11, "")
        self.tab_18 = QWidget()
        self.tab_18.setObjectName(u"tab_18")
        self.FinishItemAmount = QLineEdit(self.tab_18)
        self.FinishItemAmount.setObjectName(u"FinishItemAmount")
        self.FinishItemAmount.setGeometry(QRect(180, 20, 91, 21))
        self.FinishItemAmount.setClearButtonEnabled(True)
        self.FinishItemEncoded = QCheckBox(self.tab_18)
        self.FinishItemEncoded.setObjectName(u"FinishItemEncoded")
        self.FinishItemEncoded.setGeometry(QRect(280, 50, 111, 21))
        self.FinishItemRemoveFromList = QPushButton(self.tab_18)
        self.FinishItemRemoveFromList.setObjectName(u"FinishItemRemoveFromList")
        self.FinishItemRemoveFromList.setGeometry(QRect(310, 270, 121, 24))
        self.FinishItemMaxDura = QLineEdit(self.tab_18)
        self.FinishItemMaxDura.setObjectName(u"FinishItemMaxDura")
        self.FinishItemMaxDura.setGeometry(QRect(460, 50, 71, 21))
        self.FinishItemMaxDura.setClearButtonEnabled(True)
        self.FinishItemDynamicLocale = QCheckBox(self.tab_18)
        self.FinishItemDynamicLocale.setObjectName(u"FinishItemDynamicLocale")
        self.FinishItemDynamicLocale.setGeometry(QRect(20, 50, 111, 20))
        self.label_23 = QLabel(self.tab_18)
        self.label_23.setObjectName(u"label_23")
        self.label_23.setGeometry(QRect(370, 10, 81, 21))
        self.label_24 = QLabel(self.tab_18)
        self.label_24.setObjectName(u"label_24")
        self.label_24.setGeometry(QRect(370, 30, 81, 21))
        self.label_13 = QLabel(self.tab_18)
        self.label_13.setObjectName(u"label_13")
        self.label_13.setGeometry(QRect(20, 0, 101, 16))
        self.label_25 = QLabel(self.tab_18)
        self.label_25.setObjectName(u"label_25")
        self.label_25.setGeometry(QRect(370, 50, 81, 21))
        self.FinishItemMinDura = QLineEdit(self.tab_18)
        self.FinishItemMinDura.setObjectName(u"FinishItemMinDura")
        self.FinishItemMinDura.setGeometry(QRect(460, 30, 71, 21))
        self.FinishItemMinDura.setClearButtonEnabled(True)
        self.FinishItemAddToList = QPushButton(self.tab_18)
        self.FinishItemAddToList.setObjectName(u"FinishItemAddToList")
        self.FinishItemAddToList.setGeometry(QRect(20, 270, 121, 24))
        self.FinishItemWidget = QListWidget(self.tab_18)
        self.FinishItemWidget.setObjectName(u"FinishItemWidget")
        self.FinishItemWidget.setGeometry(QRect(20, 300, 411, 261))
        self.FinishItemId = QLineEdit(self.tab_18)
        self.FinishItemId.setObjectName(u"FinishItemId")
        self.FinishItemId.setGeometry(QRect(20, 20, 161, 21))
        self.FinishItemId.setClearButtonEnabled(True)
        self.FinishItemDogTag = QLineEdit(self.tab_18)
        self.FinishItemDogTag.setObjectName(u"FinishItemDogTag")
        self.FinishItemDogTag.setGeometry(QRect(460, 10, 71, 21))
        self.FinishItemDogTag.setClearButtonEnabled(True)
        self.FinishItemFIR = QCheckBox(self.tab_18)
        self.FinishItemFIR.setObjectName(u"FinishItemFIR")
        self.FinishItemFIR.setGeometry(QRect(180, 50, 111, 21))
        self.FinishFindObjective = QTextEdit(self.tab_18)
        self.FinishFindObjective.setObjectName(u"FinishFindObjective")
        self.FinishFindObjective.setGeometry(QRect(20, 90, 411, 171))
        self.FinishHandoverObjective = QTextEdit(self.tab_18)
        self.FinishHandoverObjective.setObjectName(u"FinishHandoverObjective")
        self.FinishHandoverObjective.setGeometry(QRect(470, 90, 411, 171))
        self.FinishHandoverWidget = QListWidget(self.tab_18)
        self.FinishHandoverWidget.setObjectName(u"FinishHandoverWidget")
        self.FinishHandoverWidget.setGeometry(QRect(470, 300, 411, 261))
        self.FinishHandoverRemoveList = QPushButton(self.tab_18)
        self.FinishHandoverRemoveList.setObjectName(u"FinishHandoverRemoveList")
        self.FinishHandoverRemoveList.setGeometry(QRect(760, 270, 121, 24))
        self.HandoverItemAddToList = QPushButton(self.tab_18)
        self.HandoverItemAddToList.setObjectName(u"HandoverItemAddToList")
        self.HandoverItemAddToList.setGeometry(QRect(470, 270, 121, 24))
        self.line_19 = QFrame(self.tab_18)
        self.line_19.setObjectName(u"line_19")
        self.line_19.setGeometry(QRect(-3, 70, 891, 20))
        self.line_19.setFrameShape(QFrame.HLine)
        self.line_19.setFrameShadow(QFrame.Sunken)
        self.line_22 = QFrame(self.tab_18)
        self.line_22.setObjectName(u"line_22")
        self.line_22.setGeometry(QRect(440, 80, 20, 491))
        self.line_22.setFrameShape(QFrame.VLine)
        self.line_22.setFrameShadow(QFrame.Sunken)
        self.AFFTabWidget.addTab(self.tab_18, "")
        self.tab_19 = QWidget()
        self.tab_19.setObjectName(u"tab_19")
        self.label_31 = QLabel(self.tab_19)
        self.label_31.setObjectName(u"label_31")
        self.label_31.setGeometry(QRect(20, 10, 101, 16))
        self.ZoneOneSessionOnly = QCheckBox(self.tab_19)
        self.ZoneOneSessionOnly.setObjectName(u"ZoneOneSessionOnly")
        self.ZoneOneSessionOnly.setGeometry(QRect(90, 10, 121, 20))
        self.ZoneDoNotReset = QCheckBox(self.tab_19)
        self.ZoneDoNotReset.setObjectName(u"ZoneDoNotReset")
        self.ZoneDoNotReset.setGeometry(QRect(230, 10, 201, 20))
        self.ZoneRemoveFromList = QPushButton(self.tab_19)
        self.ZoneRemoveFromList.setObjectName(u"ZoneRemoveFromList")
        self.ZoneRemoveFromList.setGeometry(QRect(320, 160, 111, 24))
        self.ZoneVisitWidget = QListWidget(self.tab_19)
        self.ZoneVisitWidget.setObjectName(u"ZoneVisitWidget")
        self.ZoneVisitWidget.setGeometry(QRect(20, 190, 411, 371))
        self.ZoneAddToList = QPushButton(self.tab_19)
        self.ZoneAddToList.setObjectName(u"ZoneAddToList")
        self.ZoneAddToList.setGeometry(QRect(20, 160, 111, 24))
        self.FinishZoneName = QLineEdit(self.tab_19)
        self.FinishZoneName.setObjectName(u"FinishZoneName")
        self.FinishZoneName.setGeometry(QRect(20, 40, 171, 21))
        self.label_32 = QLabel(self.tab_19)
        self.label_32.setObjectName(u"label_32")
        self.label_32.setGeometry(QRect(190, 160, 91, 16))
        self.FinishVisitObjective = QTextEdit(self.tab_19)
        self.FinishVisitObjective.setObjectName(u"FinishVisitObjective")
        self.FinishVisitObjective.setGeometry(QRect(20, 70, 411, 81))
        self.AFFKillsWidget = QListWidget(self.tab_19)
        self.AFFKillsWidget.setObjectName(u"AFFKillsWidget")
        self.AFFKillsWidget.setGeometry(QRect(470, 70, 411, 491))
        self.AFFKillsOpenEditor = QPushButton(self.tab_19)
        self.AFFKillsOpenEditor.setObjectName(u"AFFKillsOpenEditor")
        self.AFFKillsOpenEditor.setGeometry(QRect(470, 10, 121, 24))
        self.line_23 = QFrame(self.tab_19)
        self.line_23.setObjectName(u"line_23")
        self.line_23.setGeometry(QRect(440, 0, 20, 571))
        self.line_23.setFrameShape(QFrame.VLine)
        self.line_23.setFrameShadow(QFrame.Sunken)
        self.AFFTabWidget.addTab(self.tab_19, "")
        self.ConditionsTabWidget.addTab(self.tab_3, "")
        self.tab_5 = QWidget()
        self.tab_5.setObjectName(u"tab_5")
        self.FailTabWidget = QTabWidget(self.tab_5)
        self.FailTabWidget.setObjectName(u"FailTabWidget")
        self.FailTabWidget.setGeometry(QRect(0, 0, 901, 611))
        self.tab_14 = QWidget()
        self.tab_14.setObjectName(u"tab_14")
        self.FailQuestId = QLineEdit(self.tab_14)
        self.FailQuestId.setObjectName(u"FailQuestId")
        self.FailQuestId.setGeometry(QRect(20, 20, 121, 21))
        self.FailQuestId.setMaxLength(24)
        self.FailQuestId.setClearButtonEnabled(True)
        self.Label232 = QLabel(self.tab_14)
        self.Label232.setObjectName(u"Label232")
        self.Label232.setGeometry(QRect(20, 0, 49, 16))
        self.FailQuestStatus = QComboBox(self.tab_14)
        self.FailQuestStatus.setObjectName(u"FailQuestStatus")
        self.FailQuestStatus.setGeometry(QRect(20, 50, 121, 21))
        self.FailQuestStatus.setEditable(False)
        self.FailQuestStatus.setModelColumn(0)
        self.FailQuestDynamicLocale = QCheckBox(self.tab_14)
        self.FailQuestDynamicLocale.setObjectName(u"FailQuestDynamicLocale")
        self.FailQuestDynamicLocale.setGeometry(QRect(180, 20, 111, 20))
        self.FailQuestDynamicLocale.setChecked(False)
        self.FailQuestAddToList = QPushButton(self.tab_14)
        self.FailQuestAddToList.setObjectName(u"FailQuestAddToList")
        self.FailQuestAddToList.setGeometry(QRect(320, 20, 111, 24))
        self.FailQuestRemoveFromList = QPushButton(self.tab_14)
        self.FailQuestRemoveFromList.setObjectName(u"FailQuestRemoveFromList")
        self.FailQuestRemoveFromList.setGeometry(QRect(320, 50, 111, 24))
        self.line_24 = QFrame(self.tab_14)
        self.line_24.setObjectName(u"line_24")
        self.line_24.setGeometry(QRect(-10, 290, 901, 20))
        self.line_24.setFrameShape(QFrame.HLine)
        self.line_24.setFrameShadow(QFrame.Sunken)
        self.FailQuestWidget = QListWidget(self.tab_14)
        self.FailQuestWidget.setObjectName(u"FailQuestWidget")
        self.FailQuestWidget.setGeometry(QRect(20, 90, 411, 201))
        self.FailStandingCompare = QComboBox(self.tab_14)
        self.FailStandingCompare.setObjectName(u"FailStandingCompare")
        self.FailStandingCompare.setGeometry(QRect(460, 50, 121, 21))
        self.FailStandingCompare.setEditable(False)
        self.FailStandingCompare.setModelColumn(0)
        self.Label232_2 = QLabel(self.tab_14)
        self.Label232_2.setObjectName(u"Label232_2")
        self.Label232_2.setGeometry(QRect(460, 0, 49, 16))
        self.FailStandingWidget = QListWidget(self.tab_14)
        self.FailStandingWidget.setObjectName(u"FailStandingWidget")
        self.FailStandingWidget.setGeometry(QRect(460, 90, 421, 201))
        self.FailStandingRemoveFromList = QPushButton(self.tab_14)
        self.FailStandingRemoveFromList.setObjectName(u"FailStandingRemoveFromList")
        self.FailStandingRemoveFromList.setGeometry(QRect(770, 50, 111, 24))
        self.FailStandingAddToList = QPushButton(self.tab_14)
        self.FailStandingAddToList.setObjectName(u"FailStandingAddToList")
        self.FailStandingAddToList.setGeometry(QRect(770, 20, 111, 24))
        self.FailStandingDynamicLocale = QCheckBox(self.tab_14)
        self.FailStandingDynamicLocale.setObjectName(u"FailStandingDynamicLocale")
        self.FailStandingDynamicLocale.setGeometry(QRect(620, 50, 111, 20))
        self.FailStandingDynamicLocale.setChecked(False)
        self.FailStandingTrader = QComboBox(self.tab_14)
        self.FailStandingTrader.setObjectName(u"FailStandingTrader")
        self.FailStandingTrader.setGeometry(QRect(460, 20, 121, 21))
        self.FailStandingTrader.setEditable(False)
        self.FailStandingTrader.setModelColumn(0)
        self.line_14 = QFrame(self.tab_14)
        self.line_14.setObjectName(u"line_14")
        self.line_14.setGeometry(QRect(440, 0, 20, 571))
        self.line_14.setFrameShape(QFrame.VLine)
        self.line_14.setFrameShadow(QFrame.Sunken)
        self.FailStandingValue = QSpinBox(self.tab_14)
        self.FailStandingValue.setObjectName(u"FailStandingValue")
        self.FailStandingValue.setGeometry(QRect(620, 20, 42, 22))
        self.FailTabWidget.addTab(self.tab_14, "")
        self.tab_15 = QWidget()
        self.tab_15.setObjectName(u"tab_15")
        self.FailExitStatusStatus = QComboBox(self.tab_15)
        self.FailExitStatusStatus.setObjectName(u"FailExitStatusStatus")
        self.FailExitStatusStatus.setGeometry(QRect(20, 20, 191, 21))
        self.FailExitStatusWidget = QListWidget(self.tab_15)
        self.FailExitStatusWidget.setObjectName(u"FailExitStatusWidget")
        self.FailExitStatusWidget.setGeometry(QRect(20, 80, 191, 151))
        self.FailExitStatusAdd = QPushButton(self.tab_15)
        self.FailExitStatusAdd.setObjectName(u"FailExitStatusAdd")
        self.FailExitStatusAdd.setGeometry(QRect(20, 50, 81, 24))
        self.FailExitStatusRemove = QPushButton(self.tab_15)
        self.FailExitStatusRemove.setObjectName(u"FailExitStatusRemove")
        self.FailExitStatusRemove.setGeometry(QRect(120, 50, 81, 24))
        self.FailExitDynamicLocale = QCheckBox(self.tab_15)
        self.FailExitDynamicLocale.setObjectName(u"FailExitDynamicLocale")
        self.FailExitDynamicLocale.setGeometry(QRect(170, 240, 111, 20))
        self.FailExitDynamicLocale.setChecked(False)
        self.FailExitOneSession = QCheckBox(self.tab_15)
        self.FailExitOneSession.setObjectName(u"FailExitOneSession")
        self.FailExitOneSession.setGeometry(QRect(330, 240, 111, 20))
        self.FailExitOneSession.setChecked(False)
        self.FailExitDoNotReset = QCheckBox(self.tab_15)
        self.FailExitDoNotReset.setObjectName(u"FailExitDoNotReset")
        self.FailExitDoNotReset.setGeometry(QRect(20, 240, 191, 20))
        self.FailExitDoNotReset.setChecked(False)
        self.label_16 = QLabel(self.tab_15)
        self.label_16.setObjectName(u"label_16")
        self.label_16.setGeometry(QRect(20, 0, 61, 16))
        self.FailExitWidget = QListWidget(self.tab_15)
        self.FailExitWidget.setObjectName(u"FailExitWidget")
        self.FailExitWidget.setGeometry(QRect(20, 300, 411, 271))
        self.FailExitAddToList = QPushButton(self.tab_15)
        self.FailExitAddToList.setObjectName(u"FailExitAddToList")
        self.FailExitAddToList.setGeometry(QRect(20, 270, 111, 24))
        self.FailExitRemoveFromList = QPushButton(self.tab_15)
        self.FailExitRemoveFromList.setObjectName(u"FailExitRemoveFromList")
        self.FailExitRemoveFromList.setGeometry(QRect(320, 270, 111, 24))
        self.FailLocationAdd = QPushButton(self.tab_15)
        self.FailLocationAdd.setObjectName(u"FailLocationAdd")
        self.FailLocationAdd.setGeometry(QRect(240, 50, 81, 24))
        self.FailExitLocationWidget = QListWidget(self.tab_15)
        self.FailExitLocationWidget.setObjectName(u"FailExitLocationWidget")
        self.FailExitLocationWidget.setGeometry(QRect(240, 80, 191, 151))
        self.FailLocationRemove = QPushButton(self.tab_15)
        self.FailLocationRemove.setObjectName(u"FailLocationRemove")
        self.FailLocationRemove.setGeometry(QRect(340, 50, 81, 24))
        self.FailExitStatusLocation = QComboBox(self.tab_15)
        self.FailExitStatusLocation.setObjectName(u"FailExitStatusLocation")
        self.FailExitStatusLocation.setGeometry(QRect(240, 20, 191, 21))
        self.FailTabWidget.addTab(self.tab_15, "")
        self.tab_16 = QWidget()
        self.tab_16.setObjectName(u"tab_16")
        self.FailTabWidget.addTab(self.tab_16, "")
        self.ConditionsTabWidget.addTab(self.tab_5, "")
        self.tab_6 = QWidget()
        self.tab_6.setObjectName(u"tab_6")
        self.RewardsTabWidget = QTabWidget(self.tab_6)
        self.RewardsTabWidget.setObjectName(u"RewardsTabWidget")
        self.RewardsTabWidget.setGeometry(QRect(0, 0, 901, 621))
        self.RewardsTabWidget.setTabShape(QTabWidget.Rounded)
        self.tab_7 = QWidget()
        self.tab_7.setObjectName(u"tab_7")
        self.label_9 = QLabel(self.tab_7)
        self.label_9.setObjectName(u"label_9")
        self.label_9.setGeometry(QRect(20, 0, 57, 16))
        self.StartedAddItemToList = QPushButton(self.tab_7)
        self.StartedAddItemToList.setObjectName(u"StartedAddItemToList")
        self.StartedAddItemToList.setGeometry(QRect(320, 20, 111, 24))
        self.StartedItemId = QLineEdit(self.tab_7)
        self.StartedItemId.setObjectName(u"StartedItemId")
        self.StartedItemId.setGeometry(QRect(20, 20, 132, 21))
        self.StartedItemId.setMaxLength(24)
        self.StartedItemId.setClearButtonEnabled(True)
        self.StartedItemAmount = QLineEdit(self.tab_7)
        self.StartedItemAmount.setObjectName(u"StartedItemAmount")
        self.StartedItemAmount.setGeometry(QRect(20, 50, 132, 21))
        self.StartedItemAmount.setMaxLength(24)
        self.StartedItemAmount.setClearButtonEnabled(True)
        self.StartedItemWidget = QListWidget(self.tab_7)
        self.StartedItemWidget.setObjectName(u"StartedItemWidget")
        self.StartedItemWidget.setGeometry(QRect(20, 90, 411, 201))
        self.StartedRemoveItemFromList = QPushButton(self.tab_7)
        self.StartedRemoveItemFromList.setObjectName(u"StartedRemoveItemFromList")
        self.StartedRemoveItemFromList.setGeometry(QRect(320, 50, 111, 24))
        self.line_9 = QFrame(self.tab_7)
        self.line_9.setObjectName(u"line_9")
        self.line_9.setGeometry(QRect(0, 290, 891, 20))
        self.line_9.setFrameShape(QFrame.HLine)
        self.line_9.setFrameShadow(QFrame.Sunken)
        self.StartedAssortTraderUnlockRemoveFromList = QPushButton(self.tab_7)
        self.StartedAssortTraderUnlockRemoveFromList.setObjectName(u"StartedAssortTraderUnlockRemoveFromList")
        self.StartedAssortTraderUnlockRemoveFromList.setGeometry(QRect(770, 50, 111, 24))
        self.StartedAssortTraderComboBox = QComboBox(self.tab_7)
        self.StartedAssortTraderComboBox.setObjectName(u"StartedAssortTraderComboBox")
        self.StartedAssortTraderComboBox.setGeometry(QRect(460, 20, 131, 21))
        self.StartedAssortTraderComboBox.setEditable(False)
        self.StartedAssortTraderComboBox.setModelColumn(0)
        self.StartedAssortTraderItemId = QLineEdit(self.tab_7)
        self.StartedAssortTraderItemId.setObjectName(u"StartedAssortTraderItemId")
        self.StartedAssortTraderItemId.setGeometry(QRect(620, 20, 132, 21))
        self.StartedAssortTraderItemId.setMaxLength(24)
        self.StartedAssortTraderItemId.setClearButtonEnabled(True)
        self.StartedAssortTraderUnlockAddToList = QPushButton(self.tab_7)
        self.StartedAssortTraderUnlockAddToList.setObjectName(u"StartedAssortTraderUnlockAddToList")
        self.StartedAssortTraderUnlockAddToList.setGeometry(QRect(770, 20, 111, 24))
        self.label_21 = QLabel(self.tab_7)
        self.label_21.setObjectName(u"label_21")
        self.label_21.setGeometry(QRect(460, 0, 84, 16))
        self.StartedAssortLoyaltyLevelComboBox = QComboBox(self.tab_7)
        self.StartedAssortLoyaltyLevelComboBox.setObjectName(u"StartedAssortLoyaltyLevelComboBox")
        self.StartedAssortLoyaltyLevelComboBox.setGeometry(QRect(460, 50, 131, 21))
        self.StartedAssortLoyaltyLevelComboBox.setEditable(False)
        self.StartedAssortLoyaltyLevelComboBox.setModelColumn(0)
        self.StartedAssortTraderWidget = QListWidget(self.tab_7)
        self.StartedAssortTraderWidget.setObjectName(u"StartedAssortTraderWidget")
        self.StartedAssortTraderWidget.setGeometry(QRect(460, 90, 421, 201))
        self.line_11 = QFrame(self.tab_7)
        self.line_11.setObjectName(u"line_11")
        self.line_11.setGeometry(QRect(440, 0, 20, 591))
        self.line_11.setFrameShape(QFrame.VLine)
        self.line_11.setFrameShadow(QFrame.Sunken)
        self.RewardsTabWidget.addTab(self.tab_7, "")
        self.tab_8 = QWidget()
        self.tab_8.setObjectName(u"tab_8")
        self.ExperienceAmount = QLineEdit(self.tab_8)
        self.ExperienceAmount.setObjectName(u"ExperienceAmount")
        self.ExperienceAmount.setGeometry(QRect(20, 9, 132, 21))
        self.ExperienceAmount.setMaxLength(24)
        self.ExperienceAmount.setClearButtonEnabled(True)
        self.CurrencyAmount = QLineEdit(self.tab_8)
        self.CurrencyAmount.setObjectName(u"CurrencyAmount")
        self.CurrencyAmount.setGeometry(QRect(170, 70, 132, 21))
        self.CurrencyAmount.setMaxLength(24)
        self.CurrencyAmount.setClearButtonEnabled(True)
        self.CurrencyType = QComboBox(self.tab_8)
        self.CurrencyType.setObjectName(u"CurrencyType")
        self.CurrencyType.setGeometry(QRect(20, 70, 131, 21))
        self.CurrencyType.setEditable(False)
        self.CurrencyType.setModelColumn(0)
        self.line_5 = QFrame(self.tab_8)
        self.line_5.setObjectName(u"line_5")
        self.line_5.setGeometry(QRect(9, 300, 881, 16))
        self.line_5.setFrameShape(QFrame.HLine)
        self.line_5.setFrameShadow(QFrame.Sunken)
        self.label_6 = QLabel(self.tab_8)
        self.label_6.setObjectName(u"label_6")
        self.label_6.setGeometry(QRect(20, 320, 84, 16))
        self.label_8 = QLabel(self.tab_8)
        self.label_8.setObjectName(u"label_8")
        self.label_8.setGeometry(QRect(459, 50, 72, 16))
        self.StandingAmount = QLineEdit(self.tab_8)
        self.StandingAmount.setObjectName(u"StandingAmount")
        self.StandingAmount.setGeometry(QRect(170, 340, 132, 21))
        self.StandingAmount.setMaxLength(24)
        self.StandingAmount.setClearButtonEnabled(True)
        self.SuccessAddStandingToList = QPushButton(self.tab_8)
        self.SuccessAddStandingToList.setObjectName(u"SuccessAddStandingToList")
        self.SuccessAddStandingToList.setGeometry(QRect(320, 340, 111, 24))
        self.SuccessRewardId = QLineEdit(self.tab_8)
        self.SuccessRewardId.setObjectName(u"SuccessRewardId")
        self.SuccessRewardId.setGeometry(QRect(460, 70, 132, 21))
        self.SuccessRewardId.setMaxLength(24)
        self.SuccessRewardId.setClearButtonEnabled(True)
        self.SuccessRewardAmount = QLineEdit(self.tab_8)
        self.SuccessRewardAmount.setObjectName(u"SuccessRewardAmount")
        self.SuccessRewardAmount.setGeometry(QRect(610, 70, 132, 21))
        self.SuccessRewardAmount.setMaxLength(24)
        self.SuccessRewardAmount.setClearButtonEnabled(True)
        self.SuccessAddItemToList = QPushButton(self.tab_8)
        self.SuccessAddItemToList.setObjectName(u"SuccessAddItemToList")
        self.SuccessAddItemToList.setGeometry(QRect(770, 70, 111, 24))
        self.SuccessAddCurrencyToList = QPushButton(self.tab_8)
        self.SuccessAddCurrencyToList.setObjectName(u"SuccessAddCurrencyToList")
        self.SuccessAddCurrencyToList.setGeometry(QRect(320, 70, 111, 24))
        self.line_12 = QFrame(self.tab_8)
        self.line_12.setObjectName(u"line_12")
        self.line_12.setGeometry(QRect(10, 30, 881, 16))
        self.line_12.setFrameShape(QFrame.HLine)
        self.line_12.setFrameShadow(QFrame.Sunken)
        self.label_11 = QLabel(self.tab_8)
        self.label_11.setObjectName(u"label_11")
        self.label_11.setGeometry(QRect(20, 50, 84, 16))
        self.SuccessCurrencyWidget = QListWidget(self.tab_8)
        self.SuccessCurrencyWidget.setObjectName(u"SuccessCurrencyWidget")
        self.SuccessCurrencyWidget.setGeometry(QRect(20, 130, 411, 171))
        self.SuccessCurrencyRemoveFromList = QPushButton(self.tab_8)
        self.SuccessCurrencyRemoveFromList.setObjectName(u"SuccessCurrencyRemoveFromList")
        self.SuccessCurrencyRemoveFromList.setGeometry(QRect(320, 100, 111, 24))
        self.SuccessRemoveStandingFromList = QPushButton(self.tab_8)
        self.SuccessRemoveStandingFromList.setObjectName(u"SuccessRemoveStandingFromList")
        self.SuccessRemoveStandingFromList.setGeometry(QRect(320, 370, 111, 24))
        self.SuccessRemoveItemFromList = QPushButton(self.tab_8)
        self.SuccessRemoveItemFromList.setObjectName(u"SuccessRemoveItemFromList")
        self.SuccessRemoveItemFromList.setGeometry(QRect(770, 100, 111, 24))
        self.SuccessStandingWidget = QListWidget(self.tab_8)
        self.SuccessStandingWidget.setObjectName(u"SuccessStandingWidget")
        self.SuccessStandingWidget.setGeometry(QRect(20, 400, 411, 171))
        self.SuccessItemWidget = QListWidget(self.tab_8)
        self.SuccessItemWidget.setObjectName(u"SuccessItemWidget")
        self.SuccessItemWidget.setGeometry(QRect(460, 130, 421, 171))
        self.line_15 = QFrame(self.tab_8)
        self.line_15.setObjectName(u"line_15")
        self.line_15.setGeometry(QRect(10, 750, 437, 16))
        self.line_15.setFrameShape(QFrame.HLine)
        self.line_15.setFrameShadow(QFrame.Sunken)
        self.SuccessTrader = QComboBox(self.tab_8)
        self.SuccessTrader.setObjectName(u"SuccessTrader")
        self.SuccessTrader.setGeometry(QRect(20, 340, 131, 21))
        self.SuccessTrader.setEditable(False)
        self.SuccessTrader.setModelColumn(0)
        self.CurrencyRewardHidden = QCheckBox(self.tab_8)
        self.CurrencyRewardHidden.setObjectName(u"CurrencyRewardHidden")
        self.CurrencyRewardHidden.setGeometry(QRect(20, 100, 101, 20))
        self.TraderStandingRewardHidden = QCheckBox(self.tab_8)
        self.TraderStandingRewardHidden.setObjectName(u"TraderStandingRewardHidden")
        self.TraderStandingRewardHidden.setGeometry(QRect(20, 370, 101, 20))
        self.ItemRewardHidden = QCheckBox(self.tab_8)
        self.ItemRewardHidden.setObjectName(u"ItemRewardHidden")
        self.ItemRewardHidden.setGeometry(QRect(460, 100, 101, 20))
        self.line_7 = QFrame(self.tab_8)
        self.line_7.setObjectName(u"line_7")
        self.line_7.setGeometry(QRect(440, 0, 20, 621))
        self.line_7.setFrameShape(QFrame.VLine)
        self.line_7.setFrameShadow(QFrame.Sunken)
        self.label_19 = QLabel(self.tab_8)
        self.label_19.setObjectName(u"label_19")
        self.label_19.setGeometry(QRect(459, 320, 111, 16))
        self.SuccessSkillRewardHidden = QCheckBox(self.tab_8)
        self.SuccessSkillRewardHidden.setObjectName(u"SuccessSkillRewardHidden")
        self.SuccessSkillRewardHidden.setGeometry(QRect(460, 370, 101, 20))
        self.SuccessAddSkillToList = QPushButton(self.tab_8)
        self.SuccessAddSkillToList.setObjectName(u"SuccessAddSkillToList")
        self.SuccessAddSkillToList.setGeometry(QRect(770, 340, 111, 24))
        self.RewardSkillValue = QLineEdit(self.tab_8)
        self.RewardSkillValue.setObjectName(u"RewardSkillValue")
        self.RewardSkillValue.setGeometry(QRect(620, 340, 71, 21))
        self.RewardSkillValue.setClearButtonEnabled(True)
        self.SuccessSkillWidget = QListWidget(self.tab_8)
        self.SuccessSkillWidget.setObjectName(u"SuccessSkillWidget")
        self.SuccessSkillWidget.setGeometry(QRect(460, 400, 421, 171))
        self.RewardSkillComboBox = QComboBox(self.tab_8)
        self.RewardSkillComboBox.setObjectName(u"RewardSkillComboBox")
        self.RewardSkillComboBox.setGeometry(QRect(460, 340, 131, 22))
        self.SuccessRemoveSkillFromList = QPushButton(self.tab_8)
        self.SuccessRemoveSkillFromList.setObjectName(u"SuccessRemoveSkillFromList")
        self.SuccessRemoveSkillFromList.setGeometry(QRect(770, 370, 111, 24))
        self.RewardsTabWidget.addTab(self.tab_8, "")
        self.tab_13 = QWidget()
        self.tab_13.setObjectName(u"tab_13")
        self.AssortTraderItemId = QLineEdit(self.tab_13)
        self.AssortTraderItemId.setObjectName(u"AssortTraderItemId")
        self.AssortTraderItemId.setGeometry(QRect(170, 20, 132, 21))
        self.AssortTraderItemId.setMaxLength(24)
        self.AssortTraderItemId.setClearButtonEnabled(True)
        self.AssortTraderUnlockRemoveFromList = QPushButton(self.tab_13)
        self.AssortTraderUnlockRemoveFromList.setObjectName(u"AssortTraderUnlockRemoveFromList")
        self.AssortTraderUnlockRemoveFromList.setGeometry(QRect(320, 50, 111, 24))
        self.AssortTraderComboBox = QComboBox(self.tab_13)
        self.AssortTraderComboBox.setObjectName(u"AssortTraderComboBox")
        self.AssortTraderComboBox.setGeometry(QRect(20, 20, 131, 21))
        self.AssortTraderComboBox.setEditable(False)
        self.AssortTraderComboBox.setModelColumn(0)
        self.AssortTraderUnlockAddToList = QPushButton(self.tab_13)
        self.AssortTraderUnlockAddToList.setObjectName(u"AssortTraderUnlockAddToList")
        self.AssortTraderUnlockAddToList.setGeometry(QRect(320, 20, 111, 24))
        self.AssortTraderAssortUnlockWidget = QListWidget(self.tab_13)
        self.AssortTraderAssortUnlockWidget.setObjectName(u"AssortTraderAssortUnlockWidget")
        self.AssortTraderAssortUnlockWidget.setGeometry(QRect(20, 90, 411, 201))
        self.label_15 = QLabel(self.tab_13)
        self.label_15.setObjectName(u"label_15")
        self.label_15.setGeometry(QRect(20, 0, 84, 16))
        self.line_18 = QFrame(self.tab_13)
        self.line_18.setObjectName(u"line_18")
        self.line_18.setGeometry(QRect(0, 290, 891, 16))
        self.line_18.setFrameShape(QFrame.HLine)
        self.line_18.setFrameShadow(QFrame.Sunken)
        self.AssortLoyaltyLevelComboBox = QComboBox(self.tab_13)
        self.AssortLoyaltyLevelComboBox.setObjectName(u"AssortLoyaltyLevelComboBox")
        self.AssortLoyaltyLevelComboBox.setGeometry(QRect(20, 50, 131, 21))
        self.AssortLoyaltyLevelComboBox.setEditable(False)
        self.AssortLoyaltyLevelComboBox.setModelColumn(0)
        self.AssortHiddenReward = QCheckBox(self.tab_13)
        self.AssortHiddenReward.setObjectName(u"AssortHiddenReward")
        self.AssortHiddenReward.setGeometry(QRect(170, 50, 101, 20))
        self.SuccessAddSchemeToList = QPushButton(self.tab_13)
        self.SuccessAddSchemeToList.setObjectName(u"SuccessAddSchemeToList")
        self.SuccessAddSchemeToList.setGeometry(QRect(320, 320, 111, 24))
        self.SuccessSchemeWidget = QListWidget(self.tab_13)
        self.SuccessSchemeWidget.setObjectName(u"SuccessSchemeWidget")
        self.SuccessSchemeWidget.setGeometry(QRect(20, 380, 411, 191))
        self.SuccessSchemeRewardHidden = QCheckBox(self.tab_13)
        self.SuccessSchemeRewardHidden.setObjectName(u"SuccessSchemeRewardHidden")
        self.SuccessSchemeRewardHidden.setGeometry(QRect(20, 350, 101, 20))
        self.SuccessSchemeItemId = QLineEdit(self.tab_13)
        self.SuccessSchemeItemId.setObjectName(u"SuccessSchemeItemId")
        self.SuccessSchemeItemId.setGeometry(QRect(20, 320, 132, 21))
        self.SuccessSchemeItemId.setMaxLength(24)
        self.SuccessSchemeItemId.setClearButtonEnabled(True)
        self.SuccessRemoveSchemeFromList = QPushButton(self.tab_13)
        self.SuccessRemoveSchemeFromList.setObjectName(u"SuccessRemoveSchemeFromList")
        self.SuccessRemoveSchemeFromList.setGeometry(QRect(320, 350, 111, 24))
        self.label_18 = QLabel(self.tab_13)
        self.label_18.setObjectName(u"label_18")
        self.label_18.setGeometry(QRect(20, 300, 111, 16))
        self.SuccessSchemeStationId = QComboBox(self.tab_13)
        self.SuccessSchemeStationId.setObjectName(u"SuccessSchemeStationId")
        self.SuccessSchemeStationId.setGeometry(QRect(170, 320, 101, 22))
        self.SuccessSchemeLevel = QComboBox(self.tab_13)
        self.SuccessSchemeLevel.setObjectName(u"SuccessSchemeLevel")
        self.SuccessSchemeLevel.setGeometry(QRect(170, 350, 101, 22))
        self.line_16 = QFrame(self.tab_13)
        self.line_16.setObjectName(u"line_16")
        self.line_16.setGeometry(QRect(0, 680, 437, 16))
        self.line_16.setFrameShape(QFrame.HLine)
        self.line_16.setFrameShadow(QFrame.Sunken)
        self.TraderUnlockWidget = QListWidget(self.tab_13)
        self.TraderUnlockWidget.setObjectName(u"TraderUnlockWidget")
        self.TraderUnlockWidget.setGeometry(QRect(460, 90, 421, 201))
        self.TraderUnlockHiddenReward = QCheckBox(self.tab_13)
        self.TraderUnlockHiddenReward.setObjectName(u"TraderUnlockHiddenReward")
        self.TraderUnlockHiddenReward.setGeometry(QRect(620, 20, 101, 20))
        self.TraderIdUnlock = QLineEdit(self.tab_13)
        self.TraderIdUnlock.setObjectName(u"TraderIdUnlock")
        self.TraderIdUnlock.setGeometry(QRect(460, 20, 151, 21))
        self.TraderIdUnlock.setMaxLength(24)
        self.TraderIdUnlock.setClearButtonEnabled(True)
        self.TraderUnlockRemoveFromList = QPushButton(self.tab_13)
        self.TraderUnlockRemoveFromList.setObjectName(u"TraderUnlockRemoveFromList")
        self.TraderUnlockRemoveFromList.setGeometry(QRect(770, 50, 111, 24))
        self.label_27 = QLabel(self.tab_13)
        self.label_27.setObjectName(u"label_27")
        self.label_27.setGeometry(QRect(460, 0, 84, 16))
        self.TraderUnlockAddToList = QPushButton(self.tab_13)
        self.TraderUnlockAddToList.setObjectName(u"TraderUnlockAddToList")
        self.TraderUnlockAddToList.setGeometry(QRect(770, 20, 111, 24))
        self.line_8 = QFrame(self.tab_13)
        self.line_8.setObjectName(u"line_8")
        self.line_8.setGeometry(QRect(440, 0, 20, 621))
        self.line_8.setFrameShape(QFrame.VLine)
        self.line_8.setFrameShadow(QFrame.Sunken)
        self.RewardsTabWidget.addTab(self.tab_13, "")
        self.ConditionsTabWidget.addTab(self.tab_6, "")
        self.tabWidget.addTab(self.QuestCreator, "")
        self.tab = QWidget()
        self.tab.setObjectName(u"tab")
        self.DataCommandView = QPlainTextEdit(self.tab)
        self.DataCommandView.setObjectName(u"DataCommandView")
        self.DataCommandView.setGeometry(QRect(10, 100, 1251, 701))
        self.DataCommandLine = QLineEdit(self.tab)
        self.DataCommandLine.setObjectName(u"DataCommandLine")
        self.DataCommandLine.setGeometry(QRect(10, 70, 1251, 21))
        self.label_7 = QLabel(self.tab)
        self.label_7.setObjectName(u"label_7")
        self.label_7.setGeometry(QRect(10, 10, 461, 16))
        self.tabWidget.addTab(self.tab, "")

        self.horizontalLayout_2.addWidget(self.tabWidget)


        self.horizontalLayout.addLayout(self.horizontalLayout_2)

        MainWindow.setCentralWidget(self.centralwidget)
        QWidget.setTabOrder(self.NewQuestFile, self.LoadQuestFile)
        QWidget.setTabOrder(self.LoadQuestFile, self.SaveQuestFile)
        QWidget.setTabOrder(self.SaveQuestFile, self.LoadedLocalePath)
        QWidget.setTabOrder(self.LoadedLocalePath, self.QuestFileWidget)
        QWidget.setTabOrder(self.QuestFileWidget, self.Console)
        QWidget.setTabOrder(self.Console, self._Id)
        QWidget.setTabOrder(self._Id, self.QuestName)
        QWidget.setTabOrder(self.QuestName, self.ImagePath)
        QWidget.setTabOrder(self.ImagePath, self.CanShowNotifications)
        QWidget.setTabOrder(self.CanShowNotifications, self.DynamicLocale)
        QWidget.setTabOrder(self.DynamicLocale, self.Restartable)
        QWidget.setTabOrder(self.Restartable, self.RequiresKey)
        QWidget.setTabOrder(self.RequiresKey, self.SecretQuest)
        QWidget.setTabOrder(self.SecretQuest, self.InstantComplete)
        QWidget.setTabOrder(self.InstantComplete, self.TradercomboBox)
        QWidget.setTabOrder(self.TradercomboBox, self.LocationComboBox)
        QWidget.setTabOrder(self.LocationComboBox, self.Side)
        QWidget.setTabOrder(self.Side, self.TraderIdTextField)
        QWidget.setTabOrder(self.TraderIdTextField, self.LocationIdTextField)
        QWidget.setTabOrder(self.LocationIdTextField, self.Type)
        QWidget.setTabOrder(self.Type, self.tabWidget)
        QWidget.setTabOrder(self.tabWidget, self.AvailableForStartLevelRequirement)
        QWidget.setTabOrder(self.AvailableForStartLevelRequirement, self.AvailableForStartDynamicLocaleLevel)
        QWidget.setTabOrder(self.AvailableForStartDynamicLocaleLevel, self.AvailableForStartLevelRequirementCompare)
        QWidget.setTabOrder(self.AvailableForStartLevelRequirementCompare, self.AvailableForStartQuestId)
        QWidget.setTabOrder(self.AvailableForStartQuestId, self.AvailableForStartDynamicLocaleQuest)
        QWidget.setTabOrder(self.AvailableForStartDynamicLocaleQuest, self.AvailableForStartAddToList)
        QWidget.setTabOrder(self.AvailableForStartAddToList, self.AvailableForStartStatus)
        QWidget.setTabOrder(self.AvailableForStartStatus, self.AvailableForStartRemoveFromList)
        QWidget.setTabOrder(self.AvailableForStartRemoveFromList, self.StartQuestWidget)
        QWidget.setTabOrder(self.StartQuestWidget, self.AvailableForStartTraderComboBox)
        QWidget.setTabOrder(self.AvailableForStartTraderComboBox, self.AvailableForStartLoyaltyDynamicLocaleQuest)
        QWidget.setTabOrder(self.AvailableForStartLoyaltyDynamicLocaleQuest, self.AvailableForStartLoyaltyAddToList)
        QWidget.setTabOrder(self.AvailableForStartLoyaltyAddToList, self.AvailableCompareLoyaltyComboBox)
        QWidget.setTabOrder(self.AvailableCompareLoyaltyComboBox, self.AvailableForStartLoyaltyRemoveFromList)
        QWidget.setTabOrder(self.AvailableForStartLoyaltyRemoveFromList, self.StartLoyaltyWidget)
        QWidget.setTabOrder(self.StartLoyaltyWidget, self.AFFTabWidget)
        QWidget.setTabOrder(self.AFFTabWidget, self.TraderFinishcomboBox)
        QWidget.setTabOrder(self.TraderFinishcomboBox, self.FinishLoyaltyDynamicLocale)
        QWidget.setTabOrder(self.FinishLoyaltyDynamicLocale, self.FinishLoyaltyCompare)
        QWidget.setTabOrder(self.FinishLoyaltyCompare, self.FinishLoyaltyObjective)
        QWidget.setTabOrder(self.FinishLoyaltyObjective, self.FinishLoyaltyAddToList)
        QWidget.setTabOrder(self.FinishLoyaltyAddToList, self.FinishLoyaltyRemoveFromList)
        QWidget.setTabOrder(self.FinishLoyaltyRemoveFromList, self.FinishLoyaltyWidget)
        QWidget.setTabOrder(self.FinishLoyaltyWidget, self.FinishItemId)
        QWidget.setTabOrder(self.FinishItemId, self.FinishItemAmount)
        QWidget.setTabOrder(self.FinishItemAmount, self.FinishItemDynamicLocale)
        QWidget.setTabOrder(self.FinishItemDynamicLocale, self.FinishItemFIR)
        QWidget.setTabOrder(self.FinishItemFIR, self.FinishItemDogTag)
        QWidget.setTabOrder(self.FinishItemDogTag, self.FinishItemMinDura)
        QWidget.setTabOrder(self.FinishItemMinDura, self.FinishItemMaxDura)
        QWidget.setTabOrder(self.FinishItemMaxDura, self.FinishItemEncoded)
        QWidget.setTabOrder(self.FinishItemEncoded, self.FinishFindObjective)
        QWidget.setTabOrder(self.FinishFindObjective, self.FinishItemAddToList)
        QWidget.setTabOrder(self.FinishItemAddToList, self.FinishItemRemoveFromList)
        QWidget.setTabOrder(self.FinishItemRemoveFromList, self.FinishItemWidget)
        QWidget.setTabOrder(self.FinishItemWidget, self.FinishHandoverObjective)
        QWidget.setTabOrder(self.FinishHandoverObjective, self.HandoverItemAddToList)
        QWidget.setTabOrder(self.HandoverItemAddToList, self.FinishHandoverRemoveList)
        QWidget.setTabOrder(self.FinishHandoverRemoveList, self.FinishHandoverWidget)
        QWidget.setTabOrder(self.FinishHandoverWidget, self.ZoneOneSessionOnly)
        QWidget.setTabOrder(self.ZoneOneSessionOnly, self.ZoneDoNotReset)
        QWidget.setTabOrder(self.ZoneDoNotReset, self.FinishZoneName)
        QWidget.setTabOrder(self.FinishZoneName, self.FinishVisitObjective)
        QWidget.setTabOrder(self.FinishVisitObjective, self.ZoneAddToList)
        QWidget.setTabOrder(self.ZoneAddToList, self.ZoneRemoveFromList)
        QWidget.setTabOrder(self.ZoneRemoveFromList, self.ZoneVisitWidget)
        QWidget.setTabOrder(self.ZoneVisitWidget, self.FailTabWidget)
        QWidget.setTabOrder(self.FailTabWidget, self.FailQuestId)
        QWidget.setTabOrder(self.FailQuestId, self.FailQuestStatus)
        QWidget.setTabOrder(self.FailQuestStatus, self.FailQuestDynamicLocale)
        QWidget.setTabOrder(self.FailQuestDynamicLocale, self.FailQuestAddToList)
        QWidget.setTabOrder(self.FailQuestAddToList, self.FailQuestRemoveFromList)
        QWidget.setTabOrder(self.FailQuestRemoveFromList, self.FailQuestWidget)
        QWidget.setTabOrder(self.FailQuestWidget, self.FailStandingTrader)
        QWidget.setTabOrder(self.FailStandingTrader, self.FailStandingCompare)
        QWidget.setTabOrder(self.FailStandingCompare, self.FailStandingAddToList)
        QWidget.setTabOrder(self.FailStandingAddToList, self.FailStandingRemoveFromList)
        QWidget.setTabOrder(self.FailStandingRemoveFromList, self.FailStandingDynamicLocale)
        QWidget.setTabOrder(self.FailStandingDynamicLocale, self.FailStandingWidget)
        QWidget.setTabOrder(self.FailStandingWidget, self.FailExitStatusStatus)
        QWidget.setTabOrder(self.FailExitStatusStatus, self.FailExitStatusLocation)
        QWidget.setTabOrder(self.FailExitStatusLocation, self.FailExitStatusAdd)
        QWidget.setTabOrder(self.FailExitStatusAdd, self.FailExitStatusRemove)
        QWidget.setTabOrder(self.FailExitStatusRemove, self.FailLocationAdd)
        QWidget.setTabOrder(self.FailLocationAdd, self.FailLocationRemove)
        QWidget.setTabOrder(self.FailLocationRemove, self.FailExitStatusWidget)
        QWidget.setTabOrder(self.FailExitStatusWidget, self.FailExitLocationWidget)
        QWidget.setTabOrder(self.FailExitLocationWidget, self.FailExitDoNotReset)
        QWidget.setTabOrder(self.FailExitDoNotReset, self.FailExitDynamicLocale)
        QWidget.setTabOrder(self.FailExitDynamicLocale, self.FailExitOneSession)
        QWidget.setTabOrder(self.FailExitOneSession, self.FailExitAddToList)
        QWidget.setTabOrder(self.FailExitAddToList, self.FailExitRemoveFromList)
        QWidget.setTabOrder(self.FailExitRemoveFromList, self.FailExitWidget)
        QWidget.setTabOrder(self.FailExitWidget, self.RewardsTabWidget)
        QWidget.setTabOrder(self.RewardsTabWidget, self.StartedItemId)
        QWidget.setTabOrder(self.StartedItemId, self.StartedItemAmount)
        QWidget.setTabOrder(self.StartedItemAmount, self.StartedAddItemToList)
        QWidget.setTabOrder(self.StartedAddItemToList, self.StartedRemoveItemFromList)
        QWidget.setTabOrder(self.StartedRemoveItemFromList, self.StartedItemWidget)
        QWidget.setTabOrder(self.StartedItemWidget, self.StartedAssortTraderComboBox)
        QWidget.setTabOrder(self.StartedAssortTraderComboBox, self.StartedAssortTraderItemId)
        QWidget.setTabOrder(self.StartedAssortTraderItemId, self.StartedAssortLoyaltyLevelComboBox)
        QWidget.setTabOrder(self.StartedAssortLoyaltyLevelComboBox, self.StartedAssortTraderUnlockAddToList)
        QWidget.setTabOrder(self.StartedAssortTraderUnlockAddToList, self.StartedAssortTraderUnlockRemoveFromList)
        QWidget.setTabOrder(self.StartedAssortTraderUnlockRemoveFromList, self.StartedAssortTraderWidget)
        QWidget.setTabOrder(self.StartedAssortTraderWidget, self.ExperienceAmount)
        QWidget.setTabOrder(self.ExperienceAmount, self.CurrencyType)
        QWidget.setTabOrder(self.CurrencyType, self.CurrencyAmount)
        QWidget.setTabOrder(self.CurrencyAmount, self.SuccessAddCurrencyToList)
        QWidget.setTabOrder(self.SuccessAddCurrencyToList, self.CurrencyRewardHidden)
        QWidget.setTabOrder(self.CurrencyRewardHidden, self.SuccessCurrencyRemoveFromList)
        QWidget.setTabOrder(self.SuccessCurrencyRemoveFromList, self.SuccessCurrencyWidget)
        QWidget.setTabOrder(self.SuccessCurrencyWidget, self.SuccessTrader)
        QWidget.setTabOrder(self.SuccessTrader, self.StandingAmount)
        QWidget.setTabOrder(self.StandingAmount, self.SuccessAddStandingToList)
        QWidget.setTabOrder(self.SuccessAddStandingToList, self.TraderStandingRewardHidden)
        QWidget.setTabOrder(self.TraderStandingRewardHidden, self.SuccessRemoveStandingFromList)
        QWidget.setTabOrder(self.SuccessRemoveStandingFromList, self.SuccessStandingWidget)
        QWidget.setTabOrder(self.SuccessStandingWidget, self.SuccessRewardId)
        QWidget.setTabOrder(self.SuccessRewardId, self.SuccessRewardAmount)
        QWidget.setTabOrder(self.SuccessRewardAmount, self.ItemRewardHidden)
        QWidget.setTabOrder(self.ItemRewardHidden, self.SuccessAddItemToList)
        QWidget.setTabOrder(self.SuccessAddItemToList, self.SuccessRemoveItemFromList)
        QWidget.setTabOrder(self.SuccessRemoveItemFromList, self.SuccessItemWidget)
        QWidget.setTabOrder(self.SuccessItemWidget, self.AssortTraderComboBox)
        QWidget.setTabOrder(self.AssortTraderComboBox, self.AssortTraderItemId)
        QWidget.setTabOrder(self.AssortTraderItemId, self.AssortTraderUnlockAddToList)
        QWidget.setTabOrder(self.AssortTraderUnlockAddToList, self.AssortLoyaltyLevelComboBox)
        QWidget.setTabOrder(self.AssortLoyaltyLevelComboBox, self.AssortHiddenReward)
        QWidget.setTabOrder(self.AssortHiddenReward, self.AssortTraderUnlockRemoveFromList)
        QWidget.setTabOrder(self.AssortTraderUnlockRemoveFromList, self.AssortTraderAssortUnlockWidget)
        QWidget.setTabOrder(self.AssortTraderAssortUnlockWidget, self.SuccessSchemeItemId)
        QWidget.setTabOrder(self.SuccessSchemeItemId, self.SuccessSchemeStationId)
        QWidget.setTabOrder(self.SuccessSchemeStationId, self.SuccessSchemeRewardHidden)
        QWidget.setTabOrder(self.SuccessSchemeRewardHidden, self.SuccessSchemeLevel)
        QWidget.setTabOrder(self.SuccessSchemeLevel, self.SuccessAddSchemeToList)
        QWidget.setTabOrder(self.SuccessAddSchemeToList, self.SuccessRemoveSchemeFromList)
        QWidget.setTabOrder(self.SuccessRemoveSchemeFromList, self.SuccessSchemeWidget)
        QWidget.setTabOrder(self.SuccessSchemeWidget, self.GithubPathLabel)
        QWidget.setTabOrder(self.GithubPathLabel, self.checkBox_10)
        QWidget.setTabOrder(self.checkBox_10, self.lineEdit_14)

        self.retranslateUi(MainWindow)

        self.tabWidget.setCurrentIndex(1)
        self.ConditionsTabWidget.setCurrentIndex(2)
        self.AFFTabWidget.setCurrentIndex(2)
        self.FailTabWidget.setCurrentIndex(0)
        self.RewardsTabWidget.setCurrentIndex(0)


        QMetaObject.connectSlotsByName(MainWindow)
    # setupUi

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"Tarkov Tools", None))
        self.actionOpen.setText(QCoreApplication.translate("MainWindow", u"Open(TODO)", None))
        self.actionSave.setText(QCoreApplication.translate("MainWindow", u"Save(TODO)", None))
        self.actionSave_As.setText(QCoreApplication.translate("MainWindow", u"Save As(TODO)", None))
        self.actionSettings.setText(QCoreApplication.translate("MainWindow", u"Settings", None))
        self.actionThese_Do_Nothing.setText(QCoreApplication.translate("MainWindow", u"These Do Nothing fool!", None))
        self.actionPower_Search.setText(QCoreApplication.translate("MainWindow", u"Power Search", None))
        self.NewQuest.setText(QCoreApplication.translate("MainWindow", u"New Quest", None))
        self.LoadQuestFile.setText(QCoreApplication.translate("MainWindow", u"Load Quest File", None))
        self.NewQuestFile.setText(QCoreApplication.translate("MainWindow", u"New Quest File", None))
        self.DuplicateQuest.setText(QCoreApplication.translate("MainWindow", u"Duplicate Quest", None))
        self.EditQuest.setText(QCoreApplication.translate("MainWindow", u"Edit Quest", None))
        self.CurrentQuestText.setText("")
        self.CurrentQuestText.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Current Quest", None))
        self.SaveQuestFile.setText(QCoreApplication.translate("MainWindow", u"Save Quest File", None))
        self.SaveQuest.setText(QCoreApplication.translate("MainWindow", u"Save Quest", None))
        self.RemoveFromQuestFile.setText(QCoreApplication.translate("MainWindow", u"Remove Quest", None))
        self.LoadFilePath.setText("")
        self.LoadFilePath.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Loaded File Path", None))
        self.LoadedLocalePath.setText("")
        self.LoadedLocalePath.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Loaded Locale Path", None))
        self.ClearConsole.setText(QCoreApplication.translate("MainWindow", u"Clear Console", None))
        self.label_30.setText(QCoreApplication.translate("MainWindow", u"Quest List", None))
        self._Id.setText("")
        self._Id.setPlaceholderText(QCoreApplication.translate("MainWindow", u"_id", None))
        self.DynamicLocale.setText(QCoreApplication.translate("MainWindow", u"Dynamic Locale", None))
        self.ImagePath.setText(QCoreApplication.translate("MainWindow", u"Placeholder.png", None))
        self.ImagePath.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Image Path", None))
        self.InstantComplete.setText(QCoreApplication.translate("MainWindow", u"Instant Complete", None))
        self.SecretQuest.setText(QCoreApplication.translate("MainWindow", u"Secret Quest", None))
        self.TradercomboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Trader", None))
        self.RequiresKey.setText(QCoreApplication.translate("MainWindow", u"Requires a Key", None))
        self.Restartable.setText(QCoreApplication.translate("MainWindow", u"Restartable", None))
        self.CanShowNotifications.setText(QCoreApplication.translate("MainWindow", u"Can Show Notifications", None))
        self.Side.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Side", None))
        self.LocationComboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Location", None))
        self.QuestName.setText("")
        self.QuestName.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Quest Name", None))
        self.Type.setCurrentText("")
        self.Type.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Type", None))
        self.LocationIdTextField.setText("")
        self.LocationIdTextField.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Location Id override", None))
        self.TraderIdTextField.setText("")
        self.TraderIdTextField.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Trader Id override", None))
        self.GithubPathLabel.setText(QCoreApplication.translate("MainWindow", u"https://github.com/dirtbikercj/TarkovTools", None))
        self.GithubPathLabel.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Github Path", None))
        self.ALPHAVERSION.setText(QCoreApplication.translate("MainWindow", u"BETA VERSION REPORT ALL BUGS. DO NOT ATTEMPT TO EDIT BSG QUESTS", None))
        self.ChangeMessage.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Change Message", None))
        self.SuccessMessage.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Success Message (Same as Complete message)", None))
        self.Description.setMarkdown("")
        self.Description.setHtml(QCoreApplication.translate("MainWindow", u"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><meta charset=\"utf-8\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"hr { height: 1px; border-width: 0; }\n"
"li.unchecked::marker { content: \"\\2610\"; }\n"
"li.checked::marker { content: \"\\2612\"; }\n"
"</style></head><body style=\" font-family:'Segoe UI'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>", None))
        self.Description.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Description (Same as Start and Accept messages)", None))
        self.FailMessage.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Fail Message", None))
        self.Note.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Note", None))
        self.ConditionsTabWidget.setTabText(self.ConditionsTabWidget.indexOf(self.tab_9), QCoreApplication.translate("MainWindow", u"Locales", None))
        self.AvailableForStartLevelRequirement.setInputMask("")
        self.AvailableForStartLevelRequirement.setText(QCoreApplication.translate("MainWindow", u"0", None))
        self.AvailableForStartLevelRequirement.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Level requirement", None))
        self.AvailableForStartLevelRequirementCompare.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Compare", None))
        self.AvailableForStartQuestId.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Quest Id", None))
        self.AvailableForStartAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.AvailableForStartDynamicLocaleLevel.setText(QCoreApplication.translate("MainWindow", u"Dynamic Locale", None))
        self.AvailableForStartDynamicLocaleQuest.setText(QCoreApplication.translate("MainWindow", u"Dynamic Locale", None))
        self.AvailableForStartStatus.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Status", None))
        self.label_4.setText(QCoreApplication.translate("MainWindow", u"Quest Requirement", None))
        self.AvailableForStartRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.AvailableForStartLoyaltyRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.AvailableForStartLoyaltyAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.AvailableForStartTraderComboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Trader", None))
        self.AvailableForStartLoyaltyDynamicLocaleQuest.setText(QCoreApplication.translate("MainWindow", u"Dynamic Locale", None))
        self.label_10.setText(QCoreApplication.translate("MainWindow", u"Trader Loyalty Requirements", None))
        self.AvailableCompareLoyaltyComboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Compare", None))
        self.label_35.setText(QCoreApplication.translate("MainWindow", u"Level Requirement", None))
        self.ConditionsTabWidget.setTabText(self.ConditionsTabWidget.indexOf(self.tab_4), QCoreApplication.translate("MainWindow", u"Available For Start", None))
        self.lineEdit_14.setText("")
        self.lineEdit_14.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Index", None))
        self.checkBox_10.setText(QCoreApplication.translate("MainWindow", u"Do Not Reset If Counter Completed", None))
        self.label.setText(QCoreApplication.translate("MainWindow", u"Loyalty", None))
        self.FinishLoyaltyDynamicLocale.setText(QCoreApplication.translate("MainWindow", u"Dynamic Locale", None))
        self.FinishLoyaltyCompare.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Compare", None))
        self.FinishLoyaltyRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.FinishLoyaltyAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.TraderFinishcomboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Trader", None))
        self.FinishLoyaltyObjective.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Loyalty Objective Message", None))
        self.FinishDynamicLocaleSkill.setText(QCoreApplication.translate("MainWindow", u"Dynamic Locale", None))
        self.label_2.setText(QCoreApplication.translate("MainWindow", u"Skill", None))
        self.FinishSkillAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.FinishSkillComboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Skill", None))
        self.FinishSkillObjective.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Skill Objective Message", None))
        self.FinishSkillCompare.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Compare", None))
        self.FinishSkillRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.label_3.setText(QCoreApplication.translate("MainWindow", u"Level", None))
        self.label_5.setText(QCoreApplication.translate("MainWindow", u"Level", None))
        self.AFFTabWidget.setTabText(self.AFFTabWidget.indexOf(self.tab_11), QCoreApplication.translate("MainWindow", u"Loyalty and Skill", None))
        self.FinishItemAmount.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Amount", None))
        self.FinishItemEncoded.setText(QCoreApplication.translate("MainWindow", u"IsEncoded", None))
        self.FinishItemRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.FinishItemMaxDura.setText(QCoreApplication.translate("MainWindow", u"100", None))
        self.FinishItemMaxDura.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Max Dura", None))
        self.FinishItemDynamicLocale.setText(QCoreApplication.translate("MainWindow", u"Dynamic Locale", None))
        self.label_23.setText(QCoreApplication.translate("MainWindow", u"Dog Tag Level", None))
        self.label_24.setText(QCoreApplication.translate("MainWindow", u"Min Durability", None))
        self.label_13.setText(QCoreApplication.translate("MainWindow", u"<html><head/><body><p>Find Items</p></body></html>", None))
        self.label_25.setText(QCoreApplication.translate("MainWindow", u"Max Durability", None))
        self.FinishItemMinDura.setText(QCoreApplication.translate("MainWindow", u"0", None))
        self.FinishItemMinDura.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Min Dura", None))
        self.FinishItemAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.FinishItemId.setPlaceholderText(QCoreApplication.translate("MainWindow", u"ItemId", None))
        self.FinishItemDogTag.setText(QCoreApplication.translate("MainWindow", u"0", None))
        self.FinishItemDogTag.setPlaceholderText(QCoreApplication.translate("MainWindow", u"DogTag Lvl", None))
        self.FinishItemFIR.setText(QCoreApplication.translate("MainWindow", u"Found in raid", None))
        self.FinishFindObjective.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Find Objective Message", None))
        self.FinishHandoverObjective.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Handover Objective Message", None))
        self.FinishHandoverRemoveList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.HandoverItemAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.AFFTabWidget.setTabText(self.AFFTabWidget.indexOf(self.tab_18), QCoreApplication.translate("MainWindow", u"Items", None))
        self.label_31.setText(QCoreApplication.translate("MainWindow", u"<html><head/><body><p>Visit Place</p></body></html>", None))
        self.ZoneOneSessionOnly.setText(QCoreApplication.translate("MainWindow", u"One Session Only", None))
        self.ZoneDoNotReset.setText(QCoreApplication.translate("MainWindow", u"Do Not reset if counter completed", None))
        self.ZoneRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.ZoneAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.FinishZoneName.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Zone Name", None))
        self.label_32.setText(QCoreApplication.translate("MainWindow", u"<html><head/><body><p>This is very WIP.</p></body></html>", None))
        self.FinishVisitObjective.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Visit Objective Message", None))
        self.AFFKillsOpenEditor.setText(QCoreApplication.translate("MainWindow", u"Open Kills Editor", None))
        self.AFFTabWidget.setTabText(self.AFFTabWidget.indexOf(self.tab_19), QCoreApplication.translate("MainWindow", u"Visit and Kills", None))
        self.ConditionsTabWidget.setTabText(self.ConditionsTabWidget.indexOf(self.tab_3), QCoreApplication.translate("MainWindow", u"Available For Finish", None))
        self.FailQuestId.setText("")
        self.FailQuestId.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Quest Id", None))
        self.Label232.setText(QCoreApplication.translate("MainWindow", u"Quest", None))
        self.FailQuestStatus.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Status", None))
        self.FailQuestDynamicLocale.setText(QCoreApplication.translate("MainWindow", u"Dynamic Locale", None))
        self.FailQuestAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.FailQuestRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.FailStandingCompare.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Compare Method", None))
        self.Label232_2.setText(QCoreApplication.translate("MainWindow", u"Loyalty", None))
        self.FailStandingRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.FailStandingAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.FailStandingDynamicLocale.setText(QCoreApplication.translate("MainWindow", u"Dynamic Locale", None))
        self.FailStandingTrader.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Trader", None))
        self.FailTabWidget.setTabText(self.FailTabWidget.indexOf(self.tab_14), QCoreApplication.translate("MainWindow", u"Quest and Standing", None))
        self.FailExitStatusStatus.setCurrentText("")
        self.FailExitStatusStatus.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Status", None))
        self.FailExitStatusAdd.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.FailExitStatusRemove.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.FailExitDynamicLocale.setText(QCoreApplication.translate("MainWindow", u"Dynamic Locale", None))
        self.FailExitOneSession.setText(QCoreApplication.translate("MainWindow", u"One Session", None))
        self.FailExitDoNotReset.setText(QCoreApplication.translate("MainWindow", u"Do Not Reset", None))
        self.label_16.setText(QCoreApplication.translate("MainWindow", u"Exit Status", None))
        self.FailExitAddToList.setText(QCoreApplication.translate("MainWindow", u"Add Condition", None))
        self.FailExitRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove Condition", None))
        self.FailLocationAdd.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.FailLocationRemove.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.FailExitStatusLocation.setCurrentText("")
        self.FailExitStatusLocation.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Location", None))
        self.FailTabWidget.setTabText(self.FailTabWidget.indexOf(self.tab_15), QCoreApplication.translate("MainWindow", u"Exit Status", None))
        self.FailTabWidget.setTabText(self.FailTabWidget.indexOf(self.tab_16), QCoreApplication.translate("MainWindow", u"Kills", None))
        self.ConditionsTabWidget.setTabText(self.ConditionsTabWidget.indexOf(self.tab_5), QCoreApplication.translate("MainWindow", u"Fail", None))
        self.label_9.setText(QCoreApplication.translate("MainWindow", u"Start Items", None))
        self.StartedAddItemToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.StartedItemId.setText("")
        self.StartedItemId.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Item Id", None))
        self.StartedItemAmount.setText("")
        self.StartedItemAmount.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Amount", None))
        self.StartedRemoveItemFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.StartedAssortTraderUnlockRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.StartedAssortTraderComboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Trader", None))
        self.StartedAssortTraderItemId.setText("")
        self.StartedAssortTraderItemId.setPlaceholderText(QCoreApplication.translate("MainWindow", u"ItemId", None))
        self.StartedAssortTraderUnlockAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.label_21.setText(QCoreApplication.translate("MainWindow", u"Assort Unlock", None))
        self.StartedAssortLoyaltyLevelComboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Loyalty level", None))
        self.RewardsTabWidget.setTabText(self.RewardsTabWidget.indexOf(self.tab_7), QCoreApplication.translate("MainWindow", u"Started", None))
        self.ExperienceAmount.setText("")
        self.ExperienceAmount.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Experience Amount", None))
        self.CurrencyAmount.setText("")
        self.CurrencyAmount.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Currency Amount", None))
        self.CurrencyType.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Currency Type", None))
        self.label_6.setText(QCoreApplication.translate("MainWindow", u"Trader Standing", None))
        self.label_8.setText(QCoreApplication.translate("MainWindow", u"Item Rewards", None))
        self.StandingAmount.setText("")
        self.StandingAmount.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Standing Amount", None))
        self.SuccessAddStandingToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.SuccessRewardId.setText("")
        self.SuccessRewardId.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Item Id", None))
        self.SuccessRewardAmount.setText("")
        self.SuccessRewardAmount.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Amount", None))
        self.SuccessAddItemToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.SuccessAddCurrencyToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.label_11.setText(QCoreApplication.translate("MainWindow", u"Currency", None))
        self.SuccessCurrencyRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.SuccessRemoveStandingFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.SuccessRemoveItemFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.SuccessTrader.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Trader", None))
        self.CurrencyRewardHidden.setText(QCoreApplication.translate("MainWindow", u"Hidden Reward", None))
        self.TraderStandingRewardHidden.setText(QCoreApplication.translate("MainWindow", u"Hidden Reward", None))
        self.ItemRewardHidden.setText(QCoreApplication.translate("MainWindow", u"Hidden Reward", None))
        self.label_19.setText(QCoreApplication.translate("MainWindow", u"Skill Reward", None))
        self.SuccessSkillRewardHidden.setText(QCoreApplication.translate("MainWindow", u"Hidden Reward", None))
        self.SuccessAddSkillToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.RewardSkillValue.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Value", None))
        self.RewardSkillComboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Skill", None))
        self.SuccessRemoveSkillFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.RewardsTabWidget.setTabText(self.RewardsTabWidget.indexOf(self.tab_8), QCoreApplication.translate("MainWindow", u"Success 1", None))
        self.AssortTraderItemId.setText("")
        self.AssortTraderItemId.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Item Id", None))
        self.AssortTraderUnlockRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.AssortTraderComboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Trader", None))
        self.AssortTraderUnlockAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.label_15.setText(QCoreApplication.translate("MainWindow", u"Assort Unlock", None))
        self.AssortLoyaltyLevelComboBox.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Loyalty level", None))
        self.AssortHiddenReward.setText(QCoreApplication.translate("MainWindow", u"Hidden Reward", None))
        self.SuccessAddSchemeToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.SuccessSchemeRewardHidden.setText(QCoreApplication.translate("MainWindow", u"Hidden Reward", None))
        self.SuccessSchemeItemId.setText("")
        self.SuccessSchemeItemId.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Item Id", None))
        self.SuccessRemoveSchemeFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.label_18.setText(QCoreApplication.translate("MainWindow", u"Production Scheme", None))
        self.SuccessSchemeStationId.setCurrentText("")
        self.SuccessSchemeStationId.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Station", None))
        self.SuccessSchemeLevel.setCurrentText("")
        self.SuccessSchemeLevel.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Level", None))
        self.TraderUnlockHiddenReward.setText(QCoreApplication.translate("MainWindow", u"Hidden Reward", None))
        self.TraderIdUnlock.setText("")
        self.TraderIdUnlock.setPlaceholderText(QCoreApplication.translate("MainWindow", u"Trader Id", None))
        self.TraderUnlockRemoveFromList.setText(QCoreApplication.translate("MainWindow", u"Remove", None))
        self.label_27.setText(QCoreApplication.translate("MainWindow", u"Trader Unlock", None))
        self.TraderUnlockAddToList.setText(QCoreApplication.translate("MainWindow", u"Add", None))
        self.RewardsTabWidget.setTabText(self.RewardsTabWidget.indexOf(self.tab_13), QCoreApplication.translate("MainWindow", u"Success 2", None))
        self.ConditionsTabWidget.setTabText(self.ConditionsTabWidget.indexOf(self.tab_6), QCoreApplication.translate("MainWindow", u"Rewards", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.QuestCreator), QCoreApplication.translate("MainWindow", u"Quest Creator", None))
        self.label_7.setText(QCoreApplication.translate("MainWindow", u"This tool is very work in progress. But its basically a database with SQL type commands", None))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QCoreApplication.translate("MainWindow", u"Data View", None))
    # retranslateUi


TarkovTools/Ui/Layouts/TarkovTools_ui.py
TarkovTools/Application
import subprocess

# App Imports
from TarkovTools import AppData

# Pyside Imports
from PySide6.QtGui import *
from PySide6.QtWidgets import *

# UI Imports
from Ui.Widgets.WindowPowerSearch import WindowPowerSearch
from Ui.Widgets.WindowOptions import WindowOptions
from Ui.Layouts.TarkovTools_ui import Ui_MainWindow

class ToolBarController(QMainWindow, Ui_MainWindow):
    def __init__(self, mainWindow: Ui_MainWindow, AppData: AppData):
        super().__init__()
        self.mainWindow = mainWindow
        
        # Constants do not mutate at runtime
        self.AppData = AppData
        
        self.ServerProcess = None
        
        self.WindowPowerSearch = WindowPowerSearch(self.AppData) 
        self.WindowOptions = WindowOptions(self.AppData)
        
        self.setupToolBars()
        
    def setupToolBars(self):
        #Power Search
        self.mainWindow.openPowerSearchAction = QAction("Power Search", self)
        self.mainWindow.menuBar().addAction(self.mainWindow.openPowerSearchAction)
        self.mainWindow.openPowerSearchAction.triggered.connect(self.__openPowerSearch)
        
        # Start Server
        self.mainWindow.StartServerAction = QAction("Start Server", self)
        self.mainWindow.menuBar().addAction(self.mainWindow.StartServerAction)
        self.mainWindow.StartServerAction.triggered.connect(self.__startServer)
        
        # Stop Server
        self.mainWindow.StopServerAction = QAction("Stop Server", self)
        self.mainWindow.menuBar().addAction(self.mainWindow.StopServerAction)
        self.mainWindow.StopServerAction.triggered.connect(self.__stopServer)
        
        # Options
        self.mainWindow.openOptionsAction = QAction("Options", self)
        self.mainWindow.menuBar().addAction(self.mainWindow.openOptionsAction)
        self.mainWindow.openOptionsAction.triggered.connect(self.__openOptions)
    
    
    # ToolBar Logic
    
    
    def __openPowerSearch(self):
        self.WindowPowerSearch.show()
        
    def __startServer(self):
        try:
            path = f"{self.AppData.APP_PATH}/../../../Aki.Server.exe"
            cwd = "../../../"
            
            if self.AppData.DEBUG:
                path = "G:\\3.7.0 - Dev\\Aki.Server.exe"
                cwd = "G:\\3.7.0 - Dev\\"
                      
            self.ServerProcess = subprocess.Popen(path, cwd = cwd)
            print("Server started.")
        except FileNotFoundError:
            print("Server not found.")
    
    def __stopServer(self):
        if self.ServerProcess is not None:
            self.ServerProcess.kill()
            self.ServerProcess.wait()
            self.ServerProcess = None
            print("Server stopped.")
    
    def __openOptions(self):
        #self.OptionsWidget.show()
        pass
TarkovTools/Ui/ToolBarController.py
TarkovTools/Application
import pandas as pd

# Pyside Imports
from PySide6.QtCore import *
from PySide6.QtWidgets import *
from PySide6.QtGui import *

# App Imports
from App.AppData import AppData
from App.Options import Options

# Util Imports
from Utils.Utils import Dialog, FileIO

# UI imports
from Ui.Layouts.TarkovTools_ui import Ui_MainWindow

KeyWords = [
    "SELECT", "FROM", "WHERE"
]

TypeMap = {
    "QuestName": "string",
    "_id": "string",
    "acceptPlayerMessage": "string",
    "canShowNotificationsInGame": "bool",
    "changeQuestMessageText": "string",
    "completePlayerMessage": "string",
    "conditions": "object",
    "description": "string",
    "failMessageText": "string",
    "image": "string",
    "instantComplete": "bool",
    "iskey": "bool",
    "location": "string",
    "name": "string",
    "note": "string",
    "questStatus": "object",
    "restartable": "bool",
    "rewards": "object",
    "secretQuest": "bool",
    "side": "string",
    "startedMessageText": "string",
    "successMessageText": "string",
    "templateId": "string",
    "traderId": "string",
    "type": "string"
}

class DataView:
    def __init__(self, mainWindow: Ui_MainWindow, AppData: AppData):
        self.mainWindow = mainWindow
        self.appData = AppData
        
        self.DATAFRAME: pd.DataFrame = None
        
        self.__setupSignals()
        self.__setupQuestDf()
    
    def __setupSignals(self) -> None:
        self.mainWindow.DataCommandView.setReadOnly(True)
        self.mainWindow.DataCommandLine.returnPressed.connect(self.__processCommand)
    
    def __setupQuestDf(self) -> None:
        self.DATAFRAME = pd.DataFrame(self.appData.QUESTS)
        for index, row in self.DATAFRAME.iterrows():
            print(index, row)
        
    
  
    # COMMANDS
    
    
    def __processCommand(self) -> None:
        self.mainWindow.DataCommandView.clear()
        # Split the command into a list of tokens
        commandTokens: list = self.mainWindow.DataCommandLine.text().split(" ")
        
        if len(commandTokens) == 0:
            error = f"Not Enough Arguements: got {len(commandTokens)} expected: 2 or more"
            self.mainWindow.DataCommandView.setPlainText(error)
            self.mainWindow.DataCommandView.setReadOnly(True)
            return
        
        if commandTokens[0] == "SELECT":
            self.__handleSelect(commandTokens)
            return
      
    def __handleSelect(self, commandTokens: list) -> None:
        self.mainWindow.DataCommandView.setPlainText(str(self.DATAFRAME.query(commandTokens[1])))
        print(self.DATAFRAME.query(commandTokens[1]))
    
TarkovTools/Ui/Widgets/DataView.py
TarkovTools/Application
import re, os

# Pyside Imports
from PySide6.QtCore import *
from PySide6.QtWidgets import *
from PySide6.QtGui import *

# App Imports
from App.AppData import AppData
from App.Options import Options

# Util Imports
from Utils.Utils import Dialog, FileIO
from Utils.Constants import Constants, Object

# UI imports
from Ui.Layouts.TarkovTools_ui import Ui_MainWindow
from Ui.Widgets.WindowKillsEditor import WindowKillsEditor


from Models.QuestLoad import QuestLoad

class QuestPanel(QuestLoad):
    def __init__(self, mainWindow: Ui_MainWindow, AppData: AppData):
        super().__init__(self, mainWindow, AppData)
        
        self.mainWindow = mainWindow
        self.AppData = AppData
              
        # Object instantiations
        self.WindowKillsEditor = WindowKillsEditor(self, self.AppData)
              
        # Temp Lists
        self.failExitStatusList: list = []
        self.failExitLocationList: list = []           
        
        #Quest relatetd data
        self.localizedLookup = []
        self.selectedQuestIndex: int = 0
        self.selectedQuestId: str = ""
        self.loadedQuestId: str = ""
        self.isNewQuestEntry: bool = True  
        self.openFileName: str = ""
        self.openLocaleFileName: str = ""
        
        if self.AppData.DEBUG:
            self.openFileName = f"G:\\3.7.0 - Dev\\user\\mods\\TarkovTools\\database\\Quests\\TarkovTools\\QuestTemplate.json"
            self.openLocaleFileName = f"G:\\3.7.0 - Dev\\user\\mods\\TarkovTools\\database\\Quests\\TarkovTools\\locales\\locale.json"
            self.QuestFile = FileIO.loadJsonFile(self.openFileName)
            self.LocaleFile = FileIO.loadJsonFile(self.openLocaleFileName)
            self.mainWindow.LoadFilePath.setText(self.openFileName)
            self.mainWindow.LoadedLocalePath.setText(self.openLocaleFileName)
            self.refreshQuestList() 
            print("Loaded test file in debug mode.")
        
        self.addItemsToDropBoxes()
        self.setUpSignals()
        self.setUpControls()
    
    
    # Controls Actions
    
      
    def addItemsToDropBoxes(self):
        # Start Status
        self.mainWindow.AvailableForStartStatus.addItems(sorted(Constants.StartStatusList))
        self.mainWindow.FailQuestStatus.addItems(sorted(Constants.StartStatusList))
        
        # Leave Status
        self.mainWindow.FailExitStatusStatus.addItems(sorted(Constants.LeaveStatus))
        
        # Side List
        self.mainWindow.Side.addItems(sorted(Constants.SideList))

        # Currency List
        self.mainWindow.CurrencyType.addItems(sorted(Constants.CurrencyList))
        
        # Compare List
        self.mainWindow.AvailableForStartLevelRequirementCompare.addItems(sorted(Constants.CompareList))
        self.mainWindow.FinishLoyaltyCompare.addItems(sorted(Constants.CompareList))
        self.mainWindow.FinishSkillCompare.addItems(sorted(Constants.CompareList))
        self.mainWindow.AvailableCompareLoyaltyComboBox.addItems(sorted(Constants.CompareList))
        self.mainWindow.FailStandingCompare.addItems(sorted(Constants.CompareList))
        
        # Type List
        self.mainWindow.Type.addItems(sorted(Constants.TypeList))
        
         # Skill List     
        self.mainWindow.FinishSkillComboBox.addItems(sorted(Constants.SkillList))
        self.mainWindow.RewardSkillComboBox.addItems(sorted(Constants.SkillList))
        
        # Location List
        self.mainWindow.LocationComboBox.addItems(sorted(Constants.LocationList))
        self.mainWindow.FailExitStatusLocation.addItems(sorted(Constants.LocationList))
        
        # Trader List
        self.mainWindow.StartedAssortTraderComboBox.addItems(sorted(Constants.TraderList))
        self.mainWindow.TradercomboBox.addItems(sorted(Constants.TraderList))
        self.mainWindow.TraderFinishcomboBox.addItems(sorted(Constants.TraderList))
        self.mainWindow.SuccessTrader.addItems(sorted(Constants.TraderList))
        self.mainWindow.AssortTraderComboBox.addItems(sorted(Constants.TraderList))
        self.mainWindow.AvailableForStartTraderComboBox.addItems(sorted(Constants.TraderList))
        self.mainWindow.FailStandingTrader.addItems(sorted(Constants.TraderList))
        
        # Loyalty Levels
        self.mainWindow.AssortLoyaltyLevelComboBox.addItems(sorted(Constants.LoyaltyLevels))
        self.mainWindow.StartedAssortLoyaltyLevelComboBox.addItems(sorted(Constants.LoyaltyLevels))
        
        #Production Schemes
        self.mainWindow.SuccessSchemeStationId.addItems(sorted(Constants.HideoutAreaList))
        self.mainWindow.SuccessSchemeLevel.addItems(sorted(Constants.HideoutLevels))
        
    def setUpSignals(self):
        self.mainWindow.LoadQuestFile.clicked.connect(self.loadQuestFileDialog)
        self.mainWindow.SaveQuestFile.clicked.connect(self.saveQuestFile)
        self.mainWindow.EditQuest.clicked.connect(self.editSelectedQuestBox)
        self.mainWindow.RemoveFromQuestFile.clicked.connect(self.deleteQuest)
        self.mainWindow.SaveQuest.clicked.connect(self.saveQuest)
        self.mainWindow.NewQuestFile.clicked.connect(self.newQuestFileDialog)
        self.mainWindow.NewQuest.clicked.connect(self.newQuestDialog)
        #self.mainWindow.DuplicateQuest.clicked.connect(self.duplicateQuest)
        self.mainWindow.ClearConsole.clicked.connect(self.clearConsole)
        self.mainWindow.QuestFileWidget.clicked.connect(self.updateSelectedQuest)
        self.mainWindow.AFFKillsOpenEditor.clicked.connect(self.openKillsEditor)
        
        self.mainWindow._Id.textChanged.connect(self.updatedLoadedQuestId)
        
        self.setupAddSignals()
        self.setupRemoveSignals()
        
    def setupAddSignals(self):
        self.mainWindow.SuccessAddCurrencyToList.clicked.connect(self.addSuccessCurrency)
        self.mainWindow.SuccessAddStandingToList.clicked.connect(self.addSuccessStanding)
        self.mainWindow.SuccessAddItemToList.clicked.connect(self.addSuccessItem)
        self.mainWindow.AssortTraderUnlockAddToList.clicked.connect(self.addSuccessAssortUnlock)
        self.mainWindow.SuccessAddSchemeToList.clicked.connect(self.addSuccessScheme)
        self.mainWindow.SuccessAddSkillToList.clicked.connect(self.addSuccessSkill)
        self.mainWindow.TraderUnlockAddToList.clicked.connect(self.addSuccessTrader)
        self.mainWindow.StartedAddItemToList.clicked.connect(self.addStartedItem)
        self.mainWindow.StartedAssortTraderUnlockAddToList.clicked.connect(self.addStartedAssortUnlock)
        self.mainWindow.AvailableForStartAddToList.clicked.connect(self.addAvailableQuest)
        self.mainWindow.AvailableForStartLoyaltyAddToList.clicked.connect(self.addAvailableLoyalty)
        self.mainWindow.FinishLoyaltyAddToList.clicked.connect(self.addFinishLoyalty)
        self.mainWindow.FinishSkillAddToList.clicked.connect(self.addFinishSkill)
        self.mainWindow.FinishItemAddToList.clicked.connect(self.addFinishItem)
        self.mainWindow.HandoverItemAddToList.clicked.connect(self.addFinishHandover)
        self.mainWindow.ZoneAddToList.clicked.connect(self.addFinishVisit)
        self.mainWindow.FailExitStatusAdd.clicked.connect(self.addFailExitStatus)
        self.mainWindow.FailLocationAdd.clicked.connect(self.addFailExitLocation)
        self.mainWindow.FailExitAddToList.clicked.connect(self.addFailExit)
        self.mainWindow.FailQuestAddToList.clicked.connect(self.addFailQuest)
        self.mainWindow.FailStandingAddToList.clicked.connect(self.addFailStanding)
          
    def setupRemoveSignals(self):
        self.mainWindow.SuccessCurrencyRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.SuccessCurrencyWidget], self.REWARD_Items))
        
        self.mainWindow.SuccessRemoveStandingFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.SuccessStandingWidget], self.REWARD_Standings))
        
        self.mainWindow.SuccessRemoveItemFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.SuccessItemWidget], self.REWARD_Items))
        
        self.mainWindow.SuccessRemoveSchemeFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.SuccessSchemeWidget], self.REWARD_Productions))
        
        self.mainWindow.SuccessRemoveSkillFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.SuccessSkillWidget], self.REWARD_Skills))
        
        self.mainWindow.SuccessRemoveSkillFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.TraderUnlockWidget], self.REWARD_TraderUnlocks))
        
        self.mainWindow.AssortTraderUnlockRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.AssortTraderAssortUnlockWidget], self.REWARD_Standings))
        
        self.mainWindow.StartedRemoveItemFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.StartedItemWidget], self.STARTED_Items))
        
        self.mainWindow.StartedAssortTraderUnlockRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.StartedAssortTraderWidget], self.STARTED_Assorts))
        
        self.mainWindow.AvailableForStartRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.StartQuestWidget], self.AFS_Statuses))
        
        self.mainWindow.AvailableForStartLoyaltyRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.StartLoyaltyWidget], self.AFS_Loyalty))
        
        self.mainWindow.FinishLoyaltyRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.FinishLoyaltyWidget], self.AFF_Loyalty,
            "AvailableForFinish", "TraderLoyalty"))
        
        self.mainWindow.FinishSkillRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.FinishSkillWidget], self.AFF_Skills,
            "AvailableForFinish", "Skill"))
        
        self.mainWindow.FinishItemRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.FinishItemWidget], self.AFF_Items,
            "AvailableForFinish", "FindItem"))
        
        self.mainWindow.FinishHandoverRemoveList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.FinishHandoverWidget], self.AFF_Handover,
            "AvailableForFinish", "HandoverItem"))
        
        self.mainWindow.ZoneRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.ZoneVisitWidget], self.AFF_Visits,
            "AvailableForFinish", "VisitPlace", True))
                   
        self.mainWindow.FailExitStatusRemove.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.FailExitStatusWidget], self.failExitStatusList))
        
        self.mainWindow.FailLocationRemove.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.FailExitLocationWidget], self.failExitLocationList))
        
        self.mainWindow.FailExitRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.FailExitWidget], self.FAIL_Exits))
        
        self.mainWindow.FailQuestRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.FailQuestWidget], self.FAIL_Quests))
        
        self.mainWindow.FailStandingRemoveFromList.clicked.connect(lambda: self.removeFromWidget(
            [self.mainWindow.FailStandingWidget], self.FAIL_Standing))
    
    def setUpControls(self):
        self.mainWindow.AvailableForStartLevelRequirement.setValidator(QIntValidator(1, 999))
        
        #SpinBoxes
        self.mainWindow.FinishLoyaltyValue.setMinimum(0)
        self.mainWindow.FinishLoyaltyValue.setMaximum(4)
        self.mainWindow.FinishSkillValue.setMinimum(0)
        self.mainWindow.FinishSkillValue.setMaximum(50)
        self.mainWindow.AvailableForStartLoyaltyValue.setMinimum(0)
        self.mainWindow.AvailableForStartLoyaltyValue.setMaximum(4)
        self.mainWindow.FailStandingValue.setMinimum(0)
        self.mainWindow.FailStandingValue.setMaximum(4)
    
        
    # Widget Actions
    
        
    def log(self, message):
        console = self.mainWindow.Console
        console.insertItem(0, f"{message}")
     
    def removeFromWidget(self, widget, list, condition = None, key = None, counterCreator = False):
        # Remove from a specific or a list of widgets providing the associated list
        # Can also provide a condition to delete a locale entry for
        
        selectedIndex = -1
        
        if len(widget) > 0:      
            for control in widget:
                if selectedIndex == -1:
                    selectedIndex = control.currentRow()
                    control.takeItem(selectedIndex)
                else:
                    control.takeItem(selectedIndex)
        
        if widget is QListWidget:
            selectedIndex = widget.currentRow() 
            widget.takeItem(selectedIndex)
         
        if len(list) > 0:
            list.pop(selectedIndex)
        if condition:
            self.clearLocale(condition, key, counterCreator)
     
    def clearAllWidgets(self):
        # Clear Json lists
        self.AFF_Loyalty.clear()
        self.AFF_Skills.clear()
        self.AFF_Handover.clear()
        self.AFF_Items.clear()
        self.AFF_Visits.clear()
        self.AFF_Kills.clear()
        self.AFS_Statuses.clear()
        self.AFS_Loyalty.clear()
        self.FAIL_Exits.clear()
        self.FAIL_Quests.clear()
        self.FAIL_Standing.clear()
        self.REWARD_Standings.clear()
        self.REWARD_Assorts.clear()
        self.REWARD_Items.clear()
        self.REWARD_Productions.clear()
        self.REWARD_Skills.clear()
        self.REWARD_TraderUnlocks.clear()  
        self.STARTED_Items.clear()
        self.STARTED_Assorts.clear()
        self.STARTED_Productions.clear()

        self.WindowKillsEditor.clearAllWidgets()
        
        # Combo Boxes
        comboBoxes = Dialog.getWidgetsOfType(self.mainWindow, QComboBox)
        for box in comboBoxes:
            box.clear()
        self.addItemsToDropBoxes()
        
        # List Widgets
        listWidgets = Dialog.getWidgetsOfType(self.mainWindow, QListWidget)
        for listWidget in listWidgets:
            exclude = ["QuestFileWidget", "Console"]    
            if listWidget.objectName() not in exclude:
                listWidget.clear()
               
        # Line Widgets
        lineWidgets = Dialog.getWidgetsOfType(self.mainWindow, QLineEdit)
        for lineWidget in lineWidgets:
            exclude = ["CurrentQuestText", "LoadedLocalePath", "LoadFilePath", "GithubPathLabel"]
            if lineWidget.objectName() not in exclude:
                lineWidget.clear()    
            
        self.mainWindow.ImagePath.setText("Placeholder.png")
        self.mainWindow.FinishItemDogTag.setText("0")
        self.mainWindow.FinishItemMinDura.setText("0")
        self.mainWindow.FinishItemMaxDura.setText("100")
        self.mainWindow.AvailableForStartLevelRequirement.setText("0")
        
        # Text Edits
        textEdits = Dialog.getWidgetsOfType(self.mainWindow, QTextEdit)
        for textWidget in textEdits:
            textWidget.clear()
        
        # Check Boxes
        checkBoxes = Dialog.getWidgetsOfType(self.mainWindow, QCheckBox)
        for checkBox in checkBoxes:
            checkBox.setChecked(False)
        self.mainWindow.CanShowNotifications.setChecked(True)
              
    def clearConsole(self):
        self.mainWindow.Console.clear()
    
    def updateSelectedQuest(self):
        self.selectedQuestIndex = self.mainWindow.QuestFileWidget.currentRow()   
        pattern = r'QuestId: (\w+)'
        match = re.search(pattern, self.mainWindow.QuestFileWidget.currentItem().text())
        if match:
            self.selectedQuestId = match.group(1)
               
    def updatedLoadedQuestId(self):
        # Everytime the _Id field changes, update the loaded quest id.
        self.loadedQuestId = self.mainWindow._Id.text() 
    
    def editSelectedQuestBox(self): 
        result = Dialog.CreateContextBox(
            f"Save Changes?",
            f"Do you want to apply your changes to the current quest?\nQuest File not changed until you save the quest file",
            QMessageBox.Yes | QMessageBox.No | QMessageBox.Cancel,
        )
        
        if result == QMessageBox.Yes:
            self.saveQuest()
            self.clearAllWidgets()
            
            self.isNewQuestEntry = False
            self.loadedQuestId = self.selectedQuestId
            
            self.mainWindow.CurrentQuestText.clear()
            self.editSelectedQuest()

        elif result == QMessageBox.No:

            self.isNewQuestEntry = False
            self.loadedQuestId = self.selectedQuestId
                    
            self.editSelectedQuest()  
        
        elif result == QMessageBox.Cancel:
            pass 
     
    def editSelectedQuest(self):
        # We are no longer editing a new quest, lock the _Id field
        self.mainWindow._Id.setReadOnly(True)
        
        self.generateQuestValues()
        lookup = self.QuestFile[self.loadedQuestId]["_id"] + " name"
        if lookup in self.LocaleFile:
            self.mainWindow.CurrentQuestText.setText(self.LocaleFile[lookup])
        else:
            self.mainWindow.CurrentQuestText.setText(self.QuestFile[self.selectedQuestId]["QuestName"])
                  
    def refreshQuestList(self):
        listWidget = self.mainWindow.QuestFileWidget
        listWidget.clear()
        
        for quest in self.QuestFile:
            lookup = quest + " name"
            
            if lookup in self.LocaleFile:
                object = f"QuestId: {quest}\nQuestName: {self.LocaleFile[lookup]}"
            else:
                object = f"QuestId: {quest}"
            
            listWidget.addItem(object)
     
    def openKillsEditor(self):
        self.WindowKillsEditor.show()
     
     
    # Dialog Boxes
     
     
    def newQuestFileDialog(self):
        # If the quest file is empty
        # or the id field is empty
        # then no need for a dialog box 
        if len(self.QuestFile.keys()) == 0 or self.mainWindow._Id.text() == "":
            self.newQuestFile()
            return
            
        result = Dialog.CreateContextBox(
            f"New File",
            f"Do you wish to save?",
            QMessageBox.Yes | QMessageBox.No
        )
        
        if result == QMessageBox.Yes:    
            self.saveQuestFile()
            self.QuestFile.clear()
            self.newQuestFile()
               
        elif result == QMessageBox.No:
            self.newQuestFile()
    
    def loadQuestFileDialog(self):
        # If the quest file is empty
        # or the id field is empty
        # then no need for a dialog box 
        if len(self.QuestFile.keys()) == 0 or self.mainWindow._Id.text() == "":
            self.loadQuestFile()
            return
               
        result = Dialog.CreateContextBox(
            f"Load File",
            f"Do you wish to save? \n DO NOT ATTEMPT TO EDIT BSG QUESTS THEY WILL 100% BREAK",
            QMessageBox.Yes | QMessageBox.No
        )
              
        if result == QMessageBox.Yes:
            self.saveQuestFile()
            self.loadQuestFile()

        elif result == QMessageBox.No:
            self.loadQuestFile()
       
    def loadLocaleDialog(self):
        options = QFileDialog.Options()
        options |= QFileDialog.ReadOnly
        fileDialog = QFileDialog()
        fileDialog.setOptions(options)
        fileDialog.setNameFilter("Json files (*.json)")
        self.openLocaleFileName, _ = fileDialog.getOpenFileName(self.mainWindow.centralwidget, "Load Locale.json", "./json", "Json Files (*.json)")
        
        # Check if the locale file exists, if not continue.
        if self.openLocaleFileName:
            self.LocaleFile.clear()
            
            self.openLocaleFileName = os.path.normpath(self.openLocaleFileName)
            self.mainWindow.LoadedLocalePath.setText(self.openLocaleFileName) 
            
            self.LocaleFile = FileIO.loadJsonFile(self.openLocaleFileName)  
            print(f"Loaded Locales: {len(self.LocaleFile)}")
            self.refreshQuestList()
        else:
            self.LocaleFile.clear()
            
            self.openLocaleFileName = os.path.join(os.path.dirname(self.openFileName), "Locale.json")
            self.openLocaleFileName = os.path.normpath(self.openLocaleFileName)
            
            self.mainWindow.LoadedLocalePath.setText(self.openLocaleFileName) 
            FileIO.saveJsonFile(self.openLocaleFileName, self.LocaleFile)
            
            print(f"Locale not selected. Created a locale file for you: {self.openLocaleFileName}")
            self.refreshQuestList()
            
    def newQuestDialog(self):
        
        if self.loadedQuestId == "" or self.mainWindow._Id.text() == "":
            self.newQuest()
            return
        
        result = Dialog.CreateContextBox(
            f"New Quest", 
            f"Do you want to apply your changes to the current quest?\nQuest File not changed until you save the quest file", 
            QMessageBox.Yes | QMessageBox.No)
        
        if result == QMessageBox.Yes:
            self.saveQuest(bypass = True)
            self.newQuest()
            
        elif result == QMessageBox.No:
            self.newQuest()

             
    # File Actions
    
    
    def newQuestFile(self):
        options = QFileDialog.Options()
        options |= QFileDialog.ReadOnly
        fileDialog = QFileDialog()
        fileDialog.setOptions(options)
        fileDialog.setNameFilter("Json files (*.json)")
        
        oldOpenFile = ""
        if self.openFileName != "." and self.openFileName != "":
            oldOpenFile = self.openFileName
        
        self.openFileName, _ = fileDialog.getSaveFileName(self.mainWindow.centralwidget, "New Quest.json", "./json", "Json Files (*.json)")
        self.openFileName = os.path.normpath(self.openFileName)
        
        # Dont change state if a file is not selected or created
        if self.openFileName == ".":
            self.openFileName = oldOpenFile 
            return
        
        self.clearAllWidgets()
        self.mainWindow.CurrentQuestText.clear()
        
        # Clear the files in memory
        self.QuestFile.clear()
        self.LocaleFile.clear()
        
        self.mainWindow.LoadFilePath.setText(self.openFileName)
        FileIO.saveJsonFile(self.openFileName, self.QuestFile)
        self.newLocaleFile()
     
    def loadQuestFile(self):
        options = QFileDialog.Options()
        options |= QFileDialog.ReadOnly
        
        fileDialog = QFileDialog()
        fileDialog.setOptions(options)
        fileDialog.setNameFilter("Json files (*.json)")
        
        oldOpenFile = ""
        if self.openFileName != "." and self.openFileName != "":
            oldOpenFile = self.openFileName
        
        # Clear all current quest data before loading new quest data
        self.QuestFile.clear()
        self.clearAllWidgets()
        self.mainWindow.QuestFileWidget.clear()
        self.mainWindow.CurrentQuestText.clear()
        
        self.openFileName, _ = fileDialog.getOpenFileName(self.mainWindow.centralwidget, "Load Quest.json", "./json", "Json Files (*.json)")
        self.openFileName = os.path.normpath(self.openFileName)
        
        # Dont change state if a file is not selected
        if self.openFileName == ".":
            self.openFileName = oldOpenFile 
            return
        
        self.mainWindow.LoadFilePath.setText(self.openFileName)
        self.QuestFile = FileIO.loadJsonFile(self.openFileName)
        
        print(f"Loaded Quests: {len(self.QuestFile)}")
        self.loadLocaleDialog()
       
    def newQuest(self):
        self.clearAllWidgets()
        self.mainWindow.CurrentQuestText.clear()
        self.loadedQuestIds = ""
        self.isNewQuestEntry = True
        self.mainWindow._Id.setReadOnly(False)
     
    def duplicateQuest(self):
        result = Dialog.CreateContextBox(
            f"Duplicate Quest", 
            f"Are you sure you want to duplicate:\n{self.QuestFile[self.selectedQuestId]['QuestName']}", 
            QMessageBox.Yes | QMessageBox.Cancel)
        
        if result == QMessageBox.Yes:
            # Make a clone of the quest
            questToClone = self.QuestFile[self.selectedQuestId]
            questCopy = dict(questToClone)
            
            generatedId = self.generateDuplicateId(questToClone)     
            
            # Id generation failed
            if generatedId == -1:
                return
            
            # Copy locales before creating new quest
            keysToCopy = []
            for key in self.LocaleFile.keys():
                if self.selectedQuestId in key:
                    keysToCopy.append(key)
            
            for key in keysToCopy:
                # Split the locale identifier apart @ " "
                # append the generated id to the old id
                # rebuild the string
                splitKey = key.split()
                print(splitKey)
                splitKey[0] += generatedId
                newLocaleId = ' '.join(splitKey)
                print(f"cloning locale: {key}")
                self.LocaleFile[newLocaleId] = self.LocaleFile[key]
            
            questCopy["_id"] = generatedId
            self.QuestFile[generatedId] = questCopy
                           
            self.refreshQuestList()
            
        elif result == QMessageBox.Cancel:
          pass  
        
    def generateDuplicateId(self, questClone = None, locale = False):
        num = 0
        idToClone = questClone["_id"]
        cloneId = f"_Clone_{num}"
        
        # If somebody clones something more than 256 times...
        # Then it isnt our problem...
        # Turns TestId1 into TestId1_Clone{num}
        for i in range(255):
            newId = idToClone + cloneId
            if newId in self.QuestFile.keys():
                print("Id exists, trying again...")
                num += 1
                if i == 255:
                    print("Max Attempts reached...")
                    return -1
            return newId
           
    def saveQuestFile(self):    
        # Save the quest before the file
        
        if self.loadedQuestId != "" or self.mainWindow._Id.text() != "":
            self.saveQuest()
        
        FileIO.saveJsonFile(self.openFileName, self.QuestFile)
        FileIO.saveJsonFile(self.openLocaleFileName, self.LocaleFile)
        self.QuestFile = FileIO.loadJsonFile(self.openFileName)
        self.LocaleFile = FileIO.loadJsonFile(self.openLocaleFileName)
        self.refreshQuestList()
        
        # Alert the user that the file was saved successfully.   
        result = Dialog.CreateContextBox(f"Confirmation", f"File saved successfully.", QMessageBox.Ok) 
        if result == QMessageBox.Ok:
            pass
        
        print("File saved successfully")
     
    def saveQuest(self, bypass=False):
        # If validation fails, display error message and return
        if not self.validate(bypass):
            object = f"Quest Error: Validation Failed."
            print(object)
            self.mainWindow.Console.addItem(object)
            return
           
        quest = self.setUpQuest()
        
        if self.isNewQuestEntry:
            self.QuestFile[self.mainWindow._Id.text()] = quest
        else:    
            self.QuestFile[self.loadedQuestId] = quest
        
        self.mainWindow.CurrentQuestText.setText(quest['QuestName'])
        self.mainWindow._Id.setReadOnly(True)
        self.isNewQuestEntry = False
        
        locales = self.setUpQuestLocale()
        for locale, value in locales.items():
            self.LocaleFile[locale] = value
        self.refreshQuestList()   
     
    def newLocaleFile(self):
        options = QFileDialog.Options()
        options |= QFileDialog.ReadOnly
        
        fileDialog = QFileDialog()
        fileDialog.setOptions(options)
        fileDialog.setNameFilter("Json files (*.json)")    
        
        self.openLocaleFileName, _ = fileDialog.getSaveFileName(self.mainWindow.centralwidget, "New Locale.json", "./json", "Json Files (*.json)")
        self.openLocaleFileName = os.path.normpath(self.openLocaleFileName)
        
        self.mainWindow.LoadedLocalePath.setText(self.openLocaleFileName) 
        
        if self.openLocaleFileName:
            self.LocaleFile.clear()
            FileIO.saveJsonFile(self.openLocaleFileName, self.LocaleFile)
            self.refreshQuestList()
     
    def deleteQuest(self):
        if self.selectedQuestId not in self.QuestFile:
           return
        
        result = Dialog.CreateContextBox(
            f"Remove Quest",
            f"Are you sure you want to remove\n{self.QuestFile[self.selectedQuestId]['QuestName']}",
            QMessageBox.Yes | QMessageBox.Cancel
        )
        
        if result == QMessageBox.Yes:
            self.mainWindow.FailStandingWidget.takeItem(self.selectedQuestIndex)
            keysTodelete = []
            
            for locale in self.LocaleFile:
                if self.selectedQuestId in locale:
                    keysTodelete.append(locale)
            for key in keysTodelete:
                print(f"Deleting locale with Id: {self.selectedQuestId}")
                del self.LocaleFile[key]
                
            print(f"Deleting quest with Id: {self.selectedQuestId}")
            del self.QuestFile[self.selectedQuestId]
            self.clearAllWidgets()
            self.mainWindow.CurrentQuestText.clear()
            self.refreshQuestList()
            self.isNewQuestEntry = True
            
            # Alert the user that the quest was removed successfully.
            result = Dialog.CreateContextBox(
                "Confirmation",
                "quest removed successfully.\nFile not changed until saved.",
                QMessageBox.Ok
            )
            
            if result == QMessageBox.Ok:
                pass
    
    def clearLocale(self, condition, key, CounterCreator = False):
        if not hasattr(self.QuestFile, self.selectedQuestId):
            return
          
        for item in self.QuestFile[self.selectedQuestId]["conditions"][condition]:
            if item["_parent"] == key and CounterCreator:
                keytoDelete = item["_props"]["counter"]["conditions"][0]["_parent"]
                if f"_{key}_" in keytoDelete:
                    print(f"Deleting key: {self.LocaleFile[keytoDelete]} from locale file")
                    del self.LocaleFile[keytoDelete]    
            else:
                keytoDelete = item["_props"]["id"]
                if f"_{key}_" in keytoDelete:
                    print(f"Deleting key: {self.LocaleFile[keytoDelete]} from locale file")
                    del self.LocaleFile[keytoDelete]
    
    def validate(self, bypass = False):
        if self.mainWindow._Id.text() in self.QuestFile and self.isNewQuestEntry:
            self.log(f"Save Error: Duplicate QuestId it must be unique.\n IsNewEntry: {self.isNewQuestEntry}")
            self.mainWindow._Id.setText(self.selectedQuestId)
            return False
        
        if self.loadedQuestId not in self.mainWindow._Id.text() and not self.isNewQuestEntry and not bypass:
            self.log(f"Save Error: Cannot change an existing quest Id.")
            self.mainWindow._Id.setText(self.selectedQuestId)
            return False       

        if not self.openFileName and not bypass:
            self.log(f"Save Error: No file is Open.")
            return False
        elif not self.openLocaleFileName and not bypass:
            self.log(f"Save Error: No locale file is Open.")
            return False     
        elif not self.mainWindow.QuestName.text() and not bypass:
            self.log(f"Save Error: Quest name cannot be empty")
            return False
        elif not self.mainWindow.TradercomboBox.currentText() and not bypass:
            self.log(f"Save Error: Trader cannot be empty.")
            return False
        elif not self.mainWindow.LocationComboBox.currentText() and not bypass:
            self.log(f"Save Error: Location cannot be empty.")
            return False
        elif not self.mainWindow.Side.currentText() and not bypass:
            self.log(f"Save Error: Side cannot be empty.")
            return False
        elif not self.mainWindow.Type.currentText() and not bypass:
            self.log(f"Save Error: Type cannot be empty.")
            return False
        return True
    
    
    # Scroll Widget Population
    
    
    def addFinishLoyalty(self):
        loyalty = Object()       
        loyalty.dynamicLocale = self.mainWindow.FinishLoyaltyDynamicLocale.isChecked()
        loyalty.value = self.mainWindow.FinishLoyaltyValue.value()
        loyalty.compare = self.mainWindow.FinishLoyaltyCompare.currentText()
        loyalty.text = self.mainWindow.FinishLoyaltyObjective.toPlainText()

        traderTypeSelected = self.mainWindow.TraderFinishcomboBox.currentText()
        if traderTypeSelected in Constants.TraderMap:
            loyalty.traderId = Constants.TraderMap[traderTypeSelected]

        self.AFF_Loyalty.append(loyalty)

        object = f"Trader: {loyalty.traderId} Loyalty Requirement: {loyalty.value} DynamicLocale: {loyalty.dynamicLocale} \nObjective text: {loyalty.text}"
        self.mainWindow.FinishLoyaltyWidget.addItem(object)
     
    def addFinishSkill(self):
        skill = Object()       
        skill.skill = self.mainWindow.FinishSkillComboBox.currentText()
        skill.dynamicLocale = self.mainWindow.FinishDynamicLocaleSkill.isChecked()
        skill.value = self.mainWindow.FinishSkillValue.value()
        skill.compare = self.mainWindow.FinishSkillCompare.currentText()
        skill.text = self.mainWindow.FinishSkillObjective.toPlainText()

        self.AFF_Skills.append(skill)

        object = f"Skill required: {skill.skill} level requirement: {skill.value} compareMethod: {skill.compare} DynamicLocale: {skill.dynamicLocale} \nObjective text: {skill.text}"
        self.mainWindow.FinishSkillWidget.addItem(object)
    
    def addFinishItem(self):
        item = Object()       
        item.id = self.mainWindow.FinishItemId.text()
        item.dynamicLocale = self.mainWindow.FinishItemDynamicLocale.isChecked()
        item.value = self.mainWindow.FinishItemAmount.text()
        item.fir = self.mainWindow.FinishItemFIR.isChecked()
        item.encoded = self.mainWindow.FinishItemEncoded.isChecked()
        item.dogtagLevel = int(self.mainWindow.FinishItemDogTag.text())
        item.minDurability = int(self.mainWindow.FinishItemMinDura.text())
        item.maxDurability = int(self.mainWindow.FinishItemMaxDura.text())
        item.find = self.mainWindow.FinishFindObjective.toPlainText()

        self.AFF_Items.append(item)

        object = f"Item Id: {item.id} Amount: {item.value} DynamicLocale: {item.dynamicLocale} FIR requirement: {item.fir} Encoded Requirement: {item.encoded} \nFind Text: {item.find}"
        self.mainWindow.FinishItemWidget.addItem(object)
        
    def addFinishHandover(self):
        item = Object()       
        item.id = self.mainWindow.FinishItemId.text()
        item.dynamicLocale = self.mainWindow.FinishItemDynamicLocale.isChecked()
        item.value = self.mainWindow.FinishItemAmount.text()
        item.fir = self.mainWindow.FinishItemFIR.isChecked()
        item.encoded = self.mainWindow.FinishItemEncoded.isChecked()
        item.dogtagLevel = int(self.mainWindow.FinishItemDogTag.text())
        item.minDurability = int(self.mainWindow.FinishItemMinDura.text())
        item.maxDurability = int(self.mainWindow.FinishItemMaxDura.text())
        item.handover = self.mainWindow.FinishHandoverObjective.toPlainText()

        self.AFF_Handover.append(item)

        object = f"Item Id: {item.id} Amount: {item.value} DynamicLocale: {item.dynamicLocale} FIR requirement: {item.fir} Encoded Requirement: {item.encoded}\nHandover Text: {item.handover}"
        self.mainWindow.FinishHandoverWidget.addItem(object)
      
    def addFinishVisit(self):
        visit = Object()       
        visit.zone = self.mainWindow.FinishZoneName.text()
        visit.doNotReset = self.mainWindow.ZoneDoNotReset.isChecked()
        visit.oneSession = self.mainWindow.ZoneOneSessionOnly.isChecked()
        visit.text = self.mainWindow.FinishVisitObjective.toPlainText()
        
        object = f"Visit Zone: {visit.zone} Do Not reset: {visit.doNotReset} One Session: {visit.oneSession} \nMessage: {visit.text}"
        self.AFF_Visits.append(visit)
        self.mainWindow.ZoneVisitWidget.addItem(object)
        
    def addAvailableQuest(self):
        quest = Object()       
        quest.questId = self.mainWindow.AvailableForStartQuestId.text()
        quest.dynamicLocale = self.mainWindow.AvailableForStartDynamicLocaleQuest.isChecked()

        statusSelected = self.mainWindow.AvailableForStartStatus.currentText()
        if statusSelected in Constants.StatusMap:
            quest.statusType = Constants.StatusMap[statusSelected]

        self.AFS_Statuses.append(quest)

        object = f"Status: {statusSelected} questId: {quest.questId} DynamicLocale: {quest.dynamicLocale}"
        self.mainWindow.StartQuestWidget.addItem(object)
        
    def addAvailableLoyalty(self):
        loyalty = Object()       
        loyalty.value = self.mainWindow.AvailableForStartLoyaltyValue.value()
        loyalty.dynamicLocale = self.mainWindow.AvailableForStartLoyaltyDynamicLocaleQuest.isChecked()
        loyalty.compare = self.mainWindow.AvailableCompareLoyaltyComboBox.currentText()

        traderSelected = self.mainWindow.AvailableForStartTraderComboBox.currentText()
        if traderSelected in Constants.TraderMap:
            loyalty.traderId = Constants.TraderMap[traderSelected]
     
        self.AFS_Loyalty.append(loyalty)

        object = f"Loyalty requirement: {traderSelected} Loyalty: {loyalty.value} Compare: {loyalty.compare} DynamicLocale: {loyalty.dynamicLocale}"
        self.mainWindow.StartLoyaltyWidget.addItem(object)

    def addStartedItem(self):
        item = Object()
        item.id = self.mainWindow.StartedItemId.text()
        item.value = self.mainWindow.StartedItemAmount.text()
       
        self.STARTED_Items.append(item)
        
        object = f"Item reward: {item.id} Amount: {item.value}"
        self.mainWindow.StartedItemWidget.addItem(object)

    def addStartedAssortUnlock(self):
        assort = Object()
        assort.item = self.mainWindow.StartedAssortTraderItemId.text()
        assort.level = int(self.mainWindow.StartedAssortLoyaltyLevelComboBox.currentText())
        
        traderSelected = self.mainWindow.StartedAssortTraderComboBox.currentText()
        if traderSelected in Constants.TraderMap:
            assort.trader = Constants.TraderMap[traderSelected]
                
        self.STARTED_Assorts.append(assort)
        
        object = f"TraderId: {assort.trader} Assort unlock: {assort.item} at level: {assort.level}"
        self.mainWindow.StartedAssortTraderWidget.addItem(object)

    def addSuccessCurrency(self):
        currency = Object()
        currency.value = self.mainWindow.CurrencyAmount.text()
        currency.unknown = self.mainWindow.CurrencyRewardHidden.isChecked()

        currencyTypeSelected = self.mainWindow.CurrencyType.currentText()
        if currencyTypeSelected in Constants.CurrencyMap:
            currency.id = Constants.CurrencyMap[currencyTypeSelected]

        self.REWARD_Items.append(currency)
        
        object = f"{currencyTypeSelected} ID: {currency.id} Amount: {currency.value} Hidden: {currency.unknown}"
        self.mainWindow.SuccessCurrencyWidget.addItem(object)

    def addSuccessStanding(self):
        standing = Object()
        standing.value = self.mainWindow.StandingAmount.text()
        standing.unknown = self.mainWindow.TraderStandingRewardHidden.isChecked()
          
        traderTypeSelected = self.mainWindow.SuccessTrader.currentText()
        if traderTypeSelected in Constants.TraderMap:
            standing.trader = Constants.TraderMap[traderTypeSelected]
        
        self.REWARD_Standings.append(standing)
        
        object = f"TraderId: {standing.trader} Standing reward: {standing.value} Hidden: {standing.unknown}"
        self.mainWindow.SuccessStandingWidget.addItem(object)

    def addSuccessItem(self):
        item = Object()
        item.id = self.mainWindow.SuccessRewardId.text()
        item.value = self.mainWindow.SuccessRewardAmount.text()
        item.unknown = self.mainWindow.ItemRewardHidden.isChecked()
        self.REWARD_Items.append(item)
        
        object = f"TraderId: Item reward: {item.id} Amount: {item.value} Hidden: {item.unknown}"
        self.mainWindow.SuccessItemWidget.addItem(object)

    def addSuccessAssortUnlock(self):
        assort = Object()
        assort.item = self.mainWindow.AssortTraderItemId.text()
        assort.level = int(self.mainWindow.AssortLoyaltyLevelComboBox.currentText())
        assort.unknown = self.mainWindow.AssortHiddenReward.isChecked()
        
        traderSelected = self.mainWindow.AssortTraderComboBox.currentText()
        if traderSelected in Constants.TraderMap:
            assort.trader = Constants.TraderMap[traderSelected]
                
        self.REWARD_Standings.append(assort)
        
        object = f"TraderId: {assort.trader} Assort unlock: {assort.item} at level: {assort.level} Hidden: {assort.unknown}"
        listWidget = self.mainWindow.AssortTraderAssortUnlockWidget.addItem(object)

    def addSuccessScheme(self):
        scheme = Object()
        scheme.unknown = self.mainWindow.SuccessSchemeRewardHidden.isChecked()
        scheme.item = self.mainWindow.SuccessSchemeItemId.text()
        scheme.loyaltyLevel = self.mainWindow.SuccessSchemeLevel.currentText()
        
        stationSelected = self.mainWindow.SuccessSchemeStationId.currentText()
        if stationSelected in Constants.HideoutAreaMap:
            scheme.stationId = Constants.HideoutAreaMap[stationSelected]
        
        self.REWARD_Productions.append(scheme)
        
        object = f"Item {scheme.item} production will be added to {stationSelected} at level: {scheme.loyaltyLevel} \n Hidden: {scheme.unknown}"
        self.mainWindow.SuccessSchemeWidget.addItem(object)

    def addSuccessSkill(self):
        skill = Object()
        skill.unknown = self.mainWindow.SuccessSkillRewardHidden.isChecked()
        skill.target = self.mainWindow.RewardSkillComboBox.currentText()
        skill.value = self.mainWindow.RewardSkillValue.text()
        
        self.REWARD_Skills.append(skill)
        
        object = f"Skill {skill.target} Value: {skill.value} Hidden: {skill.unknown}"
        self.mainWindow.SuccessSkillWidget.addItem(object)

    def addSuccessTrader(self):
        trader = Object()
        trader.unknown = self.mainWindow.TraderUnlockHiddenReward.isChecked()
        trader.target = self.mainWindow.TraderIdUnlock.text()
            
        self.REWARD_TraderUnlocks.append(trader)
            
        object = f"Trader {trader.target} Hidden: {trader.unknown}"
        self.mainWindow.TraderUnlockWidget.addItem(object)

    def addFailExitStatus(self):
        value = self.mainWindow.FailExitStatusStatus.currentText()     
        self.failExitStatusList.append(value)
        
        object = f"Status: {value}"
        self.mainWindow.FailExitStatusWidget.addItem(object)
    
    def addFailExitLocation(self):
        locationSelected = self.mainWindow.FailExitStatusLocation.currentText()
        
        if locationSelected in Constants.locationMapTarget:
            value = Constants.locationMapTarget[locationSelected]    
            
        self.failExitLocationList.append(value)
        object = f"Location: {value}"
        self.mainWindow.FailExitLocationWidget.addItem(object)
    
    def addFailExit(self):
        exit = Object()
        exit.status = self.failExitStatusList
        exit.location = self.failExitLocationList
        exit.oneSessionOnly = self.mainWindow.FailExitOneSession.isChecked()
        exit.dynamicLocale = self.mainWindow.FailExitDynamicLocale.isChecked()
        exit.doNotReset = self.mainWindow.FailExitDoNotReset.isChecked()
            
        self.FAIL_Exits.append(exit)
        
        self.failExitStatusList = []
        self.failExitLocationList = []
        self.mainWindow.FailExitStatusWidget.clear()
        self.mainWindow.FailExitLocationWidget.clear()
        
        exitStatus = " ".join(exit.status)
        exitLocations = " ".join(exit.location)
        
        object = f" Exit Status: {exitStatus} \n Exit List: {exitLocations}"
        self.mainWindow.FailExitWidget.addItem(object)
    
    def addFailQuest(self):
        quest = Object()
        quest.questId = self.mainWindow.FailQuestId.text()
        quest.dynamicLocale = self.mainWindow.FailQuestDynamicLocale.isChecked()
        
        statusSelected = self.mainWindow.FailQuestStatus.currentText()
        if statusSelected in Constants.StatusMap:
            quest.statusType = Constants.StatusMap[statusSelected]
                
        self.FAIL_Quests.append(quest)
        
        object = f"QuestId: {quest.questId} Status: {quest.statusType} dynamicLocale: {quest.dynamicLocale}"
        self.mainWindow.FailQuestWidget.addItem(object)
    
    def addFailStanding(self):
        standing = Object()
        standing.value = self.mainWindow.FailStandingValue.value()
        standing.dynamicLocale = self.mainWindow.FailStandingDynamicLocale.isChecked()
        standing.compare = self.mainWindow.FailStandingCompare.currentText()
        
        traderSelected = self.mainWindow.FailStandingTrader.currentText()
        if traderSelected in Constants.TraderMap:
            standing.traderId = Constants.TraderMap[traderSelected]
                          
        self.FAIL_Standing.append(standing)
        
        object = f"TraderId: {standing.traderId} Value: {standing.value} Compare: {standing.compare} dynamicLocale: {standing.dynamicLocale}"
        self.mainWindow.FailStandingWidget.addItem(object)
     
TarkovTools/Ui/Widgets/QuestPanel.py
TarkovTools/Application

# Pyside Imports
from PySide6.QtGui import *
from PySide6.QtWidgets import *

# App Imports
from App.AppData import AppData
from App.Options import Options

# Util Imports
from Utils.Constants import Constants, Object
from Utils.Utils import Dialog

# UI Imports
from Ui.Layouts.AFFKillsEditor_ui import Ui_KillsEditor


class WindowKillsEditor(QMainWindow, Ui_KillsEditor):
    def __init__(self, QuestPanel, AppData: AppData):
        super().__init__()
        self.setupUi(self)
        
        self.QuestPanel = QuestPanel
        self.AppData = AppData
        
        self.IsRoleAvailable: bool = False  
        self.Roles: list = []
        self.Locations: list = []
        self.TargetBodyParts: list = []
        self.EnemyHealthBodyParts: list = []
        self.EnemyHealthEffects: list = []
        self.EnemyHealthComboList: list = []
        self.PlayerHealthBuffs: list = []
        self.Zones: list = []
        
        self.setupSignals()
        self.addItemsToDropBoxes()
        self.setupControls()
        
    def setupSignals(self):
        #BUTTONS
        self.KillsEditorAddToList.clicked.connect(self.addKillsToList)
        self.SavageRoleAdd.clicked.connect(self.addRoleList)
        self.LocationAdd.clicked.connect(self.addLocationList)
        self.BodyPartAdd.clicked.connect(self.addBodyPartList)
        self.EnemyHealthBodyPartAdd.clicked.connect(self.addHealthConditionBody)
        self.EnemyHealthEffectAdd.clicked.connect(self.addHealthConditionEffect)
        self.EnemyHealthAddToList.clicked.connect(self.addEnemyHealthToList)
        #self.ZoneAdd.clicked.connect(self.addZone)
        
        self.SavageRoleRemove.clicked.connect(lambda: self.QuestPanel.removeFromWidget(
            [self.SavageRoleWidget], self.Roles))
        
        self.LocationRemove.clicked.connect(lambda: self.QuestPanel.removeFromWidget(
            [self.LocationWidget], self.Locations))
        
        self.BodyPartRemove.clicked.connect(lambda: self.QuestPanel.removeFromWidget(
            [self.BodyPartsWidget], self.TargetBodyParts))
        
        self.EnemyHealthBodyPartRemove.clicked.connect(lambda: self.QuestPanel.removeFromWidget(
            [self.EnemyHealthBodyWidget], self.EnemyHealthBodyParts))
        
        self.EnemyHealthEffectRemove.clicked.connect(lambda: self.QuestPanel.removeFromWidget(
            [self.EnemyHealthEffectWidget], self.EnemyHealthEffects))
        
        self.EnemyHealthRemoveFromList.clicked.connect(lambda: self.QuestPanel.removeFromWidget(
            [self.EnemyHealthWidget], self.EnemyHealthComboList))
        
        self.ZoneRemove.clicked.connect(lambda: self.QuestPanel.removeFromWidget(
            [self.ZoneWidget], self.Zones))
        
        self.KillsEditorRemoveFromList.clicked.connect(lambda: self.QuestPanel.removeFromWidget(
            [self.KillsEditorWidget, self.QuestPanel.mainWindow.AFFKillsWidget], 
            self.QuestPanel.AFF_Kills,
            "AvailableForFinish", "Kills", True))
        
        # OTHER
        self.Target.currentIndexChanged.connect(self.updateRoleAvailability)
    
    def setupControls(self):
        # Setup Time controls
        self.TimeFrom.setMinimum(0)
        self.TimeFrom.setMaximum(23)     
        self.TimeTo.setMinimum(0)
        self.TimeTo.setMaximum(24)
     
    def addItemsToDropBoxes(self):
        # Compare
        self.RootCompare.addItems(sorted(Constants.CompareList))
        self.DistanceCompare.addItems(sorted(Constants.CompareList))
        
        # Target
        self.Target.addItems(sorted(Constants.KillTargetList))
        
        # Location
        self.Location.addItems(sorted(Constants.locationMapTarget.keys()))
        
        # Body Parts
        self.BodyParts.addItems(sorted(Constants.BodyPartList))
        self.EnemyHealthBodyPart.addItems(sorted(Constants.BodyPartList))
        
        # Effect
        self.EnemyHealthEffect.addItems(sorted(Constants.EffectList))
     
    def updateRoleAvailability(self):
        # Update the availability of the role box based on the selected target
        if self.Target.currentText() == "Savage":
            self.SavageRole.addItems(sorted(Constants.SavageRoleNames.keys()))
            self.IsRoleAvailable = True
        else:
            self.SavageRole.clear()
            self.IsRoleAvailable = False
    
    def clearAllWidgets(self):
        self.Roles.clear()
        self.Locations.clear()
        self.TargetBodyParts.clear()
        self.EnemyHealthBodyParts.clear()
        self.EnemyHealthEffects.clear()
        self.EnemyHealthComboList.clear()
        self.PlayerHealthBuffs.clear()
        self.Zones.clear()
        
        # Combo Boxes
        comboBoxes = Dialog.getWidgetsOfType(self, QComboBox)
        for box in comboBoxes:
            box.clear()
        self.addItemsToDropBoxes()
        
        # List Widgets
        listWidgets = Dialog.getWidgetsOfType(self, QListWidget)
        for listWidget in listWidgets:
            exclude = ["KillsEditorWidget"]    
            if listWidget.objectName() not in exclude:
                listWidget.clear()
               
        # Line Widgets
        lineWidgets = Dialog.getWidgetsOfType(self, QLineEdit)
        for lineWidget in lineWidgets:
            exclude = []
            if lineWidget.objectName() not in exclude:
                lineWidget.clear()
                
        # Check Boxes
        checkBoxes = Dialog.getWidgetsOfType(self, QCheckBox)
        for checkBox in checkBoxes:
            checkBox.setChecked(False)   
            
        # Spin Boxes
        checkBoxes = Dialog.getWidgetsOfType(self, QSpinBox)
        for checkBox in checkBoxes:
            checkBox.setValue(0)
    
    # Json
     
           
    def addKillsToList(self):
        condition = Object()
        condition.compare = self.RootCompare.currentText()
        condition.target = self.Target.currentText()
        condition.value = self.RootAmount.text()
        condition.dynamicLocale = self.RootLocale.isChecked()
        condition.oneSessionOnly = self.RootOneSessionOnly.isChecked()
        condition.doNotReset = self.RootDoNotReset.isChecked()
        condition.text = self.ObjectiveMessage.toPlainText()
        
        # Role List
        if len(self.Roles) > 0:
            condition.Roles = self.Roles
        
        # Location List
        if len(self.Locations) > 0:
            condition.Locations = self.Locations
        
        # Distance
        if self.Distance.text() != "" and self.DistanceEnable.isChecked():
            condition.distance = self.Distance.text()
            condition.distanceCompare = self.DistanceCompare.currentText()
        
        # body Parts
        if len(self.TargetBodyParts) > 0:
            condition.bodyParts = self.TargetBodyParts
        
        # Time
        # They cannot be the same value
        if self.TimeFrom.value() != self.TimeTo.value() and self.TimeEnable.isChecked():
            condition.timeFrom = self.TimeFrom.value()
            condition.timeTo = self.TimeTo.value()   
        
        if len(self.EnemyHealthComboList) > 0:
            condition.enemyHealthEffects = self.EnemyHealthComboList
        
        self.QuestPanel.AFF_Kills.append(condition)
    
        object = f"Target: {condition.target}, Compare: {condition.compare}, Value: {condition.value},\nDynamic Locale: {condition.dynamicLocale}, One Session: {condition.oneSessionOnly}, Do Not Reset: {condition.doNotReset}"
        self.KillsEditorWidget.addItem(object)
        self.QuestPanel.mainWindow.AFFKillsWidget.addItem(object)
   
    def addRoleList(self):
        if self.IsRoleAvailable:
            selection = self.SavageRole.currentText()    
            if selection not in self.Roles:
                self.SavageRoleWidget.addItem(selection)
                self.Roles.append(selection)
                
    def addLocationList(self):
        selection = self.Location.currentText()
        if Constants.locationMapTarget[selection] not in self.Locations:
            self.LocationWidget.addItem(selection)
            self.Locations.append(Constants.locationMapTarget[selection])
            
    def addBodyPartList(self):
        selection = self.BodyParts.currentText()
        if selection in self.TargetBodyParts:
            return
        
        self.TargetBodyParts.append(selection)
        self.BodyPartsWidget.addItem(selection)
        
    def addHealthConditionBody(self):
        selection = self.EnemyHealthBodyPart.currentText()
        if selection in self.EnemyHealthBodyParts:
            return
   
        self.EnemyHealthBodyParts.append(selection)
        self.EnemyHealthBodyWidget.addItem(selection)
   
    def addHealthConditionEffect(self):
        selection = self.EnemyHealthEffect.currentText()
        if selection in self.EnemyHealthEffects:
            return
   
        self.EnemyHealthEffects.append(selection)
        self.EnemyHealthEffectWidget.addItem(selection)
    
    def addEnemyHealthToList(self):
        if len(self.EnemyHealthBodyParts) and len(self.EnemyHealthEffects) > 0:
            enemyhealthEffects = Object()
            enemyhealthEffects.bodyParts = self.EnemyHealthBodyParts
            enemyhealthEffects.effects = self.EnemyHealthEffects
            
            self.EnemyHealthComboList.append(enemyhealthEffects)
            object = f"BodyParts: {enemyhealthEffects.bodyParts}\nEffects: {enemyhealthEffects.effects}"
            self.EnemyHealthWidget.addItem(object)
        
    def addZone(self):
        if self.ZoneId.text() in self.Zones:
            return
        
        self.Zones.append(self.ZoneId.text())
        self.ZoneWidget.addItem(self.ZoneId.text())
TarkovTools/Ui/Widgets/WindowKillsEditor.py
TarkovTools/Application

# App Imports
from TarkovTools import AppData

# Pyside Imports
from PySide6.QtCore import *
from PySide6.QtWidgets import *
from PySide6.QtGui import *

# UI Imports
from Ui.Layouts.OptionsWidget_ui import Ui_OptionsWidget

class WindowOptions(QWidget, Ui_OptionsWidget):
    def __init__(self, AppData: AppData):
        super().__init__()
        self.setupUi(self)
        
        self.AppData = AppData
        
TarkovTools/Ui/Widgets/WindowOptions.py
TarkovTools/Application
import re, pyperclip

# App Imports
from TarkovTools import AppData
from App.Options import Options

# Pyside Imports
from PySide6.QtCore import *
from PySide6.QtWidgets import *
from PySide6.QtGui import *

# UI Imports
from Ui.Layouts.PowerSearch_ui import Ui_PowerSearch

# Util Imports
from Utils.Utils import SearchUtils

class WindowPowerSearch(QMainWindow, Ui_PowerSearch):
    def __init__(self, AppData: AppData):
        super().__init__()
        self.setupUi(self)
        
        self.AppData = AppData
        
        self.SearchString: str = ""
        self.Results: list = []
        self.parents: list = []
        self.selectedResultIndex: int = 0     
        
        self.setupSignals()
        self.setupCopyAction() 
    
    
    # Form Controls
    
         
    def setupSignals(self):
        self.LineEditSearch.editingFinished.connect(self.setSearchString)
        self.CheckBoxQuestsWithConditions.stateChanged.connect(self.setInputHint)
          
    def setSearchString(self):
        self.SearchString = self.LineEditSearch.text()
        self.setupSearch()
        
    def setInputHint(self):
        if self.CheckBoxQuestsWithConditions.isChecked():
            self.LineEditSearch.setPlaceholderText("Ex: AvailableForFinish FindItem")
            
        else:
            self.LineEditSearch.setPlaceholderText("Search by Id, name, or localized name")
        
    def addItemToView(self):
        for result in self.Results:
            Id = result["_id"]
            type = ""
            name = ""
            if "QuestName" in result:
                searchString = result["_id"] + " Name"
                if searchString in self.AppData.LOCALES:
                    name = self.AppData.LOCALES[searchString]
                    type = "Quest"
                else:
                    print("Error: Search String not found in locales.")
            elif "_name" in result:
                searchString = result["_id"] + " Name"
                if searchString in self.AppData.LOCALES:
                    name = self.AppData.LOCALES[searchString]
                    type = "Item"
                else:
                    print("Error: Search String not found in locales.")
            
            object = f"Type: {type}\nName: {name}\nId: {Id}"
            self.ResultsWidget.addItem(object)
    
    # Actions
    
      
    def setupCopyAction(self):
        self.centralwidget.setContextMenuPolicy(Qt.ActionsContextMenu)
        copyAction = QAction("Copy", self.centralwidget)   
        clearAction = QAction("Clear", self.centralwidget)   
        self.centralwidget.addAction(copyAction)
        self.centralwidget.addAction(clearAction)
        copyAction.triggered.connect(self.copyActionLogic)
        clearAction.triggered.connect(self.clearActionLogic)
    
    def copyActionLogic(self):
        self.selectedResultIndex = self.ResultsWidget.currentRow()
        pattern = r'Id: (\w+)'
        match = re.search(pattern, self.ResultsWidget.currentItem().text())
        if match:
            pyperclip.copy(match.group(1))
    
    def clearActionLogic(self):
        self.Results.clear()  
    
    
    # Search
    
    
    def setupSearch(self):
        self.Results.clear()
        self.ResultsWidget.clear()
        
        if self.CheckBoxQuestsWithConditions.isChecked():
            self.GetQuestsWithConditions()
            return
        
        self.getSearch()   
        self.addItemToView()
                
    def getSearch(self):      
        if self.SearchString == "":
            return
        
        if self.SearchString in self.AppData.REVERSED_LOCALES:
            id = self.AppData.REVERSED_LOCALES[self.SearchString].split()
            if (len(id) == 2):
                id = id[0]
                for item in self.items.values():
                    if id in item["_id"].lower():
                        self.Results.append(item)
                        return
                
        for item in self.AppData.ITEMS.values():        
            if self.SearchString.lower() in item["_id"].lower():      
                self.Results.append(item)
            elif self.SearchString.lower() in item["_name"].lower():
                self.Results.append(item)
                           
        for quest in self.AppData.QUESTS.values():
            if self.SearchString.lower() in quest["_id"].lower():
                self.Results.append(quest)
            elif self.SearchString.lower() in quest["QuestName"].lower():
                self.Results.append(quest)
    
    def GetQuestsWithConditions(self):
        # Gets all quests with a specific condition
        conditions = self.SearchString.split(" ")
        
        if len(conditions) > 3 or len(conditions) < 1:
            object = f"Invalid condition amount. Expected 1 - 3 conditions, got {len(conditions)}"
            self.Results.addItem(object)
            return
        
        results = SearchUtils.GetQuestsWithCondition(self.AppData.QUESTS, conditions)
        
        if results is None:
            object = f"No Quests found with: {conditions}"
            self.ResultsWidget.addItem(object)
            return
        
        for result in results:
            object = f"QuestId: {result['_id']} contains: {conditions}"
            self.ResultsWidget.addItem(object) 

TarkovTools/Ui/Widgets/WindowPowerSearch.py
TarkovTools/Application
import json

class Object:
    def toJson(self):
         return json.dumps(self, default=lambda o: o.__dict__, 
            sort_keys=True, indent=4)

class Constants:
    TypeList = [
        'WeaponAssembly', 'Merchant', 'Completion', 
        'Exploration', 'PickUp', 'Discover',
        'Skill', 'Standing', 'Loyalty'
    ]

    CurrencyMap = {
        'Roubles': "5449016a4bdc2d6f028b456f",
        'Dollars': "5696686a4bdc2da3298b456a",
        'Euros': "569668774bdc2da2298b4568"
    }

    CurrencyLookup = {
        "5449016a4bdc2d6f028b456f": 'Roubles',
        "5696686a4bdc2da3298b456a": 'Dollars',
        "569668774bdc2da2298b4568": 'Euros'
    }

    CurrencyList = [
        "Roubles", "Dollars", "Euros"
    ]
    
    CompareList = [
        ">=", "<="
    ]

    StatusMap = {
        'Locked': 0,
        'AvailableForStart': 1,
        'Accepted': 2,
        'ReadyForTurnIn': 3,
        'Completed': 4,
        'Failed': 5
    }

    StatusLookup = {
        0: 'Locked',
        1: 'AvailableForStart',
        2: 'Accepted',
        3: 'ReadyForTurnIn',
        4: 'Completed',
        5: 'Failed'
    }

    LeaveStatus = [
        'Killed', 'Left', 'MissingInAction', 'Survived', "Runner"
    ]

    LocationIdMap = {
        "FactoryDay": "55f2d3fd4bdc2d5f408b4567",
        "Customs": "56f40101d2720b2a4d8b45d6",
        "Woods": "5704e3c2d2720bac5b8b4567",
        "Lighthouse": "5704e4dad2720bb55b8b4567",
        "Shoreline": "5704e554d2720bac5b8b456e",
        "Reserve": "5704e5fad2720bc05b8b4567",
        "Interchange": "5714dbc024597771384a510d",
        "FactoryNight": "59fc81d786f774390775787e",
        "Labs": "5b0fc42d86f7744a585f9105",
        "Streets": "5714dc692459777137212e12",
        "any": "any"
    }

    LocationListMap = {
        "55f2d3fd4bdc2d5f408b4567": "FactoryDay",
        "56f40101d2720b2a4d8b45d6": "Customs",
        "5704e3c2d2720bac5b8b4567": "Woods",
        "5704e4dad2720bb55b8b4567": "Lighthouse",
        "5704e554d2720bac5b8b456e": "Shoreline",
        "5704e5fad2720bc05b8b4567": "Reserve",
        "5714dbc024597771384a510d": "Interchange",
        "59fc81d786f774390775787e": "FactoryNight",
        "5b0fc42d86f7744a585f9105": "Labs",
        "5714dc692459777137212e12": "Streets",
        "any": "any"
    }

    LocationList = {
        "any", "FactoryDay", "Customs", "Woods", "Lighthouse",
        "Shoreline", "Reserve", "Interchange", "FactoryNight",
        "Labs", "Streets"
    }

    locationMapTarget = {
        "FactoryDay": "factory4_day",
        "Customs": "bigmap",
        "Woods": "Woods",
        "Lighthouse": "Lighthouse",
        "Shoreline": "Shoreline",
        "Reserve": "RezervBase",
        "Interchange": "Interchange",
        "FactoryNight": "factory4_night",
        "Labs": "laboratory",
        "Streets": "TarkovStreets"
    }

    ZoneTypes = [
        
    ]

    SideList = [
        "Pmc", "Bear", "Usec", "Savage"
    ]

    KillTargetList = [
        "Any", "AnyPmc", "Savage", "Usec", "Bear"
    ]

    BodyPartList = [
        "Head",
        "Chest",
        "Stomach",
        "LeftArm",
        "RightArm",
        "LeftLeg",
        "RightLeg"
    ]

    HealthBuffs = [
        "BuffsSJ1TGLabs",
        "BuffsSJ6TGLabs",
        "BuffsPropital",
        "BuffsZagustin",
        "BuffseTGchange",
        "BuffsAdrenaline",
        "BuffsGoldenStarBalm",
        "Buffs_drink_aquamari",
        "Buffs_drink_maxenergy",
        "Buffs_drink_milk",
        "Buffs_drink_tarcola",
        "Buffs_drink_hotrod",
        "Buffs_drink_juice_army",
        "Buffs_drink_water",
        "Buffs_food_borodinskiye",
        "Buffs_food_condensed_milk",
        "Buffs_food_emelya",
        "Buffs_food_mayonez",
        "Buffs_food_mre",
        "Buffs_food_sugar",
        "Buffs_drink_vodka",
        "Buffs_drink_jack",
        "Buffs_drink_moonshine",
        "Buffs_drink_purewater",
        "Buffs_3bTG",
        "Buffs_AHF1M",
        "Buffs_L1",
        "Buffs_MULE",
        "Buffs_Meldonin",
        "Buffs_Obdolbos",
        "Buffs_P22",
        "Buffs_KultistsToxin",
        "Buffs_BodyTemperature",
        "Buffs_Antidote",
        "Buffs_melee_bleed",
        "Buffs_melee_blunt",
        "Buffs_hultafors",
        "Buffs_drink_vodka_BAD",
        "Buffs_food_alyonka",
        "Buffs_food_slippers",
        "Buffs_knife"
    ]

    EffectList = [
        "BrokenBone",
        "Contusion",
        "Dehydration",
        "Exhaustion",
        "Pain",
        "Stunned",
        "LightBleeding",
        "HeavyBleeding",
        "Wound",
        "Tremor",
        "tunnelvision",
        "Painkiller",
        "OVERWEIGHT_EFFECT_OVERWEIGHT",
        "OVERWEIGHT_EFFECT_HUGE_OVERWEIGHT",
        "Stimulator"
    ]

    SavageRoleNames = {
        "Killa": "bossKilla",
        "Tagilla": "bossTagilla",
        "Reshala": "bossBully",
        "Reshala's Bodyguards": "followerBully",
        "Schturman ": "bossKojaniy",
        "Gluhar": "bossGluhar",
        "Gluhar Guard Assault": "followerGluharAssault",
        "Gluhar Guard Scout": "followerGluharScout",
        "Gluhar Guard Security ": "followerGluharSecurity",
        "Gluhar Guard Sniper": "followerGluharSnipe",
        "Raider": "pmcBot",
        "Sanitar": "bossSanitar",
        "Knight": "bossKnight",
        "BigPipe": "followerBigPipe",
        "BirdEye": "followerBirdEye",
        "Rogue": "exUsec",
        "Sniper Scavs": "marksman",
        "Cultist Priest": "sectantPriest",
        "Cultist Warrior": "sectantWarrior",
        "Bloodhound": "arenaFighterEvent"
    }

    StartStatusList = [
        'Locked', 'AvailableForStart', 'Accepted',
        'ReadyForTurnIn', 'Completed', 'Failed'
    ]

    TraderMap = {
        "Prapor": "54cb50c76803fa8b248b4571",
        "Therapist": "54cb57776803fa99248b456e",
        "Fence": "579dc571d53a0658a154fbec",
        "Skier": "58330581ace78e27b8b10cee",
        "Peacekeeper": "5935c25fb3acc3127c3d8cd9",
        "Mechanic": "5a7c2eca46aef81a7ca2145d",
        "Ragman": "5ac3b934156ae10c4430e83c",
        "Jaeger": "5c0647fdd443bc2504c2d371",
        "TarkovTools": "TarkovTools"
    }

    TraderLookup = {
        "54cb50c76803fa8b248b4571": "Prapor",
        "54cb57776803fa99248b456e": "Therapist",
        "579dc571d53a0658a154fbec": "Fence",
        "58330581ace78e27b8b10cee": "Skier",
        "5935c25fb3acc3127c3d8cd9": "Peacekeeper",
        "5a7c2eca46aef81a7ca2145d": "Mechanic",
        "5ac3b934156ae10c4430e83c": "Ragman",
        "5c0647fdd443bc2504c2d371": "Jaeger",
        "TarkovTools": "TarkovTools"
    }

    TraderList = [
        "Prapor", "Therapist", "Fence", "Skier", "TarkovTools",
        "Peacekeeper", "Mechanic", "Ragman", "Jaeger"
    ]

    LoyaltyLevels = [ '1' , '2', '3', '4']

    SkillList = [
        "Endurance", "Health", "Immunity",
        "Metabolism", "Strength", "Vitality",
        "StressResistance", "Attention", "Charisma",
        "Intellect", "Memory", "Perception", "AimDrills",
        "ToubleShooting", "Assault", "Throwables", 
        "Revolver", "Pistol", "SMG",
        "HMG", "Shotgun", "Sniper",
        "DMR", "Crafting", "LMG",
        "Melee", "RecoilControl", "WeaponModding",
        "Sniping", "CovertMovement", "ProneMovement", 
        "Troubleshooting", "FirstAid", "LightVests", 
        "HeavyVests", "AdvancedModding", "Barter", 
        "Surgery", "HideoutManagement", "MagDrills"
    ]

    HideoutLevels = [ '1', '2', '3']

    HideoutAreaList = [
        "Bitcoin Farm", "Booze Generator", "Intelligence Center",
        "Lavatory", "Medstation", "Nutrition Unit",
        "Water Collector", "Workbench"
    ]

    HideoutAreaMap = {
        "Bitcoin Farm": "20",
        "Booze Generator": "19",
        "Intelligence Center": "11",
        "Lavatory": "2",
        "Medstation": "7",
        "Nutrition Unit": "8",
        "Water Collector": "6",
        "Workbench": "10"
    }

    HideoutLookup = {
        "20": "Bitcoin Farm",
        "19": "Booze Generator",
        "11": "Intelligence Center",
        "2": "Lavatory",
        "7": "Medstation",
        "8": "Nutrition Unit",
        "6": "Water Collector",
        "10": "Workbench"
    }
TarkovTools/Utils/Constants.py
TarkovTools/Application
import os, json

#
from Ui.Layouts.TarkovTools_ui import Ui_MainWindow 

from PySide6.QtCore import *
from PySide6.QtWidgets import *
from PySide6.QtGui import *

class Dialog:
    # Returns all widgets of a given type
    @staticmethod
    def getWidgetsOfType(mainWindow: Ui_MainWindow, type):
        widgets = []            
        for widget in mainWindow.centralwidget.findChildren(type):
            widgets.append(widget)
        return widgets
     
    # Creates a context box
    @staticmethod
    def CreateContextBox(title, text, buttonFlags) -> int:
        dialog = QMessageBox()
        
        dialog.setWindowTitle(title)
        dialog.setText(text)
        dialog.setStandardButtons(buttonFlags)
        
        result = dialog.exec_()
        return result
        
class SearchUtils(object):
    @staticmethod
    def RecursiveSearch(key, data) -> dict | list | None:
        # Deep searches a dictionary for a given key
        # Handles lists recursively
        if isinstance(data, dict):
            if key in data:
                return data[key]
            for k, v in data.items():
                result = SearchUtils.RecursiveSearch(key, v)
                if result is not None:
                    return result
        elif isinstance(data, list):
            for item in data:
                result = SearchUtils.RecursiveSearch(key, item)
                if result is not None:
                    return result
        return None
    
    @staticmethod
    def GetQuestsWithCondition(QuestList: dict, Conditions: list[str]) -> list | None:
        # Takes a list of quests and a list of conditions
        # Conditions[0] is the parent condition
        # Conditions[1] is the child condition
        # returns a list of quests with that condition
        
        results: list = []
        
        for quest in QuestList.values():
            if Conditions[0] not in quest["conditions"]:
                continue
            
            if Conditions[1] == "CounterCreator":
                _parentCondition = quest["conditions"][Conditions[0]]
                for child in _parentCondition:
                    if Conditions[1] not in child["_parent"]:
                        continue
                    
                    for subCondition in child["_props"]["counter"]["conditions"]:
                        if subCondition["_parent"] == Conditions[2]:
                            results.append(quest)
                            break
            
            # Find non CounterCreator conditions
            else:
                _parentCondition = quest["conditions"][Conditions[0]]
                for child in _parentCondition:
                    if Conditions[1] in child["_parent"]:
                        results.append(quest)
                        break
        
        if len(results) > 0:
            return results
        
        return None
    
class FileIO:
    @staticmethod
    def loadJsonFile(path: str, isBinary: bool = False):
        if os.path.exists(path):
            with open(path, "r", encoding="utf8") as path:
                if isBinary:
                    return json.load(path.decode('utf8'))
                
                return json.load(path)
                
    @staticmethod
    def saveJsonFile(path: str, file: list, isBinary: bool = False):
        if file is not None:
            with open(path, 'w') as path:
                for quest, value in file.items():
                    file[f"{quest}"] = value
                    
                if isBinary:
                    return json.dump(file, path, sort_keys=True, indent=2).encode('utf-8')
                
                return json.dump(file, path, sort_keys=True, indent=2)
TarkovTools/Utils/Utils.py
TarkovTools/Application