621 | function StoreManager:loadItem(rawXMLFilename, baseDir, customEnvironment, isMod, isBundleItem, dlcTitle, extraContentId, ignoreAdd) |
622 | local xmlFilename = Utils.getFilename(rawXMLFilename, baseDir) |
623 | local xmlFile = loadXMLFile("storeItemXML", xmlFilename) |
624 | if xmlFile == 0 then |
625 | return nil |
626 | end |
627 | |
628 | local baseXMLName = getXMLRootName(xmlFile) |
629 | local storeDataXMLKey = baseXMLName..".storeData" |
630 | |
631 | -- just load the species the old way to categorize the file |
632 | local species = getXMLString(xmlFile, storeDataXMLKey..".species") or "vehicle" |
633 | local xmlSchema |
634 | if species == "vehicle" then |
635 | xmlSchema = Vehicle.xmlSchema |
636 | elseif species == "handTool" then |
637 | xmlSchema = HandTool.xmlSchema |
638 | elseif species == "placeable" then |
639 | xmlSchema = Placeable.xmlSchema |
640 | end |
641 | |
642 | if xmlSchema ~= nil then |
643 | delete(xmlFile) |
644 | xmlFile = XMLFile.load("storeManagerLoadItemXml", xmlFilename, xmlSchema) |
645 | else |
646 | Logging.xmlError(xmlFile, "Unable to get xml schema for species '%s' in '%s'", species, xmlFilename) |
647 | return nil |
648 | end |
649 | |
650 | -- check if file name matches naming convention |
651 | local xmlName = Utils.getFilenameInfo(xmlFilename, true) |
652 | if xmlName:sub(1, 1) ~= xmlName:sub(1, 1):lower() then |
653 | Logging.xmlDevWarning(xmlFile, "Filename is starting with upper case character. Please follow the lower camel case naming convention.") |
654 | end |
655 | if tonumber(xmlName:sub(1, 1)) ~= nil then |
656 | Logging.xmlDevWarning(xmlFile, "Filename is starting with a number. Please start always with a character.") |
657 | end |
658 | local xmlPathPaths = xmlFilename:split("/") |
659 | local numParts = #xmlPathPaths |
660 | if numParts >= 4 then |
661 | if xmlPathPaths[numParts-3] == "vehicles" then |
662 | if string.startsWith(xmlPathPaths[numParts]:lower(), xmlPathPaths[numParts-2]:lower()) then |
663 | Logging.xmlDevWarning(xmlFile, "Vehicle filename '%s' starts with brand name '%s'.", xmlName, xmlPathPaths[numParts-2]) |
664 | end |
665 | end |
666 | end |
667 | |
668 | if not xmlFile:hasProperty(storeDataXMLKey) then |
669 | Logging.xmlError(xmlFile, "No storeData found. StoreItem will be ignored!") |
670 | xmlFile:delete() |
671 | return nil |
672 | end |
673 | |
674 | local isValid = true |
675 | local name = xmlFile:getValue(storeDataXMLKey..".name", nil, customEnvironment, true) |
676 | if name == nil then |
677 | Logging.xmlWarning(xmlFile, "Name missing for storeitem. Ignoring store item!") |
678 | isValid = false |
679 | end |
680 | |
681 | if name ~= nil then |
682 | local params = xmlFile:getValue(storeDataXMLKey..".name#params") |
683 | if params ~= nil then |
684 | params = params:split("|") |
685 | |
686 | for i=1, #params do |
687 | params[i] = g_i18n:convertText(params[i], customEnvironment) |
688 | end |
689 | |
690 | name = string.format(name, unpack(params)) |
691 | end |
692 | end |
693 | |
694 | local imageFilename = xmlFile:getValue(storeDataXMLKey..".image", "") |
695 | if imageFilename == "" then |
696 | imageFilename = nil |
697 | end |
698 | if imageFilename == nil and xmlFile:getValue(storeDataXMLKey..".showInStore", true) then |
699 | Logging.xmlWarning(xmlFile, "Image icon is missing for storeitem. Ignoring store item!") |
700 | isValid = false |
701 | end |
702 | |
703 | if not isValid then |
704 | xmlFile:delete() |
705 | return nil |
706 | end |
707 | |
708 | local storeItem = {} |
709 | storeItem.name = name |
710 | storeItem.extraContentId = extraContentId |
711 | storeItem.rawXMLFilename = rawXMLFilename |
712 | storeItem.baseDir = baseDir |
713 | storeItem.xmlSchema = xmlSchema |
714 | storeItem.xmlFilename = xmlFilename |
715 | storeItem.xmlFilenameLower = xmlFilename:lower() |
716 | storeItem.imageFilename = imageFilename and Utils.getFilename(imageFilename, baseDir) |
717 | storeItem.species = species |
718 | storeItem.functions = StoreItemUtil.getFunctionsFromXML(xmlFile, storeDataXMLKey, customEnvironment) |
719 | storeItem.specs = nil |
720 | storeItem.brandIndex = StoreItemUtil.getBrandIndexFromXML(xmlFile, storeDataXMLKey) |
721 | storeItem.brandNameRaw = xmlFile:getValue(storeDataXMLKey..".brand", "") |
722 | storeItem.customBrandIcon = xmlFile:getValue(storeDataXMLKey..".brand#customIcon") |
723 | storeItem.customBrandIconOffset = xmlFile:getValue(storeDataXMLKey..".brand#imageOffset") |
724 | if storeItem.customBrandIcon ~= nil then |
725 | storeItem.customBrandIcon = Utils.getFilename(storeItem.customBrandIcon, baseDir) |
726 | end |
727 | storeItem.canBeSold = xmlFile:getValue(storeDataXMLKey..".canBeSold", true) |
728 | storeItem.showInStore = xmlFile:getValue(storeDataXMLKey..".showInStore", not isBundleItem) |
729 | storeItem.isBundleItem = isBundleItem |
730 | storeItem.allowLeasing = xmlFile:getValue(storeDataXMLKey..".allowLeasing", true) |
731 | storeItem.maxItemCount = xmlFile:getValue(storeDataXMLKey..".maxItemCount") |
732 | storeItem.rotation = xmlFile:getValue(storeDataXMLKey..".rotation", 0) |
733 | storeItem.shopDynamicTitle = xmlFile:getValue(storeDataXMLKey..".shopDynamicTitle", false) |
734 | storeItem.shopTranslationOffset = xmlFile:getValue(storeDataXMLKey..".shopTranslationOffset", nil, true) |
735 | storeItem.shopRotationOffset = xmlFile:getValue(storeDataXMLKey..".shopRotationOffset", nil, true) |
736 | storeItem.shopIgnoreLastComponentPositions = xmlFile:getValue(storeDataXMLKey..".shopIgnoreLastComponentPositions", false) |
737 | storeItem.shopInitialLoadingDelay = xmlFile:getValue(storeDataXMLKey..".shopLoadingDelay#initial") |
738 | storeItem.shopConfigLoadingDelay = xmlFile:getValue(storeDataXMLKey..".shopLoadingDelay#config") |
739 | storeItem.shopHeight = xmlFile:getValue(storeDataXMLKey..".shopHeight", 0) |
740 | storeItem.financeCategory = xmlFile:getValue(storeDataXMLKey..".financeCategory") |
741 | storeItem.shopFoldingState = xmlFile:getValue(storeDataXMLKey..".shopFoldingState", 0) |
742 | storeItem.shopFoldingTime = xmlFile:getValue(storeDataXMLKey..".shopFoldingTime") |
743 | |
744 | local sharedVramUsage, perInstanceVramUsage, ignoreVramUsage = StoreItemUtil.getVRamUsageFromXML(xmlFile, storeDataXMLKey) |
745 | for _, func in ipairs(self.vramUsageFunctions) do |
746 | local customSharedVramUsage, customPerInstanceVramUsage = func(xmlFile) |
747 | |
748 | sharedVramUsage = sharedVramUsage + customSharedVramUsage |
749 | perInstanceVramUsage = perInstanceVramUsage + customPerInstanceVramUsage |
750 | end |
751 | |
752 | storeItem.sharedVramUsage, storeItem.perInstanceVramUsage, storeItem.ignoreVramUsage = sharedVramUsage, perInstanceVramUsage, ignoreVramUsage |
753 | |
754 | storeItem.dlcTitle = dlcTitle |
755 | storeItem.isMod = isMod |
756 | storeItem.customEnvironment = customEnvironment |
757 | |
758 | local categoryName = xmlFile:getValue(storeDataXMLKey..".category") |
759 | local category = self:getCategoryByName(categoryName) |
760 | if category == nil then |
761 | Logging.xmlWarning(xmlFile, "Invalid category '%s' in store data! Using 'misc' instead!", tostring(categoryName)) |
762 | category = self:getCategoryByName("misc") |
763 | end |
764 | storeItem.categoryName = category.name |
765 | |
766 | if species == "vehicle" then |
767 | storeItem.configurations, storeItem.defaultConfigurationIds = StoreItemUtil.getConfigurationsFromXML(xmlFile, baseXMLName, baseDir, customEnvironment, isMod, storeItem) |
768 | storeItem.subConfigurations = StoreItemUtil.getSubConfigurationsFromXML(storeItem.configurations) |
769 | storeItem.configurationSets = StoreItemUtil.getConfigurationSetsFromXML(storeItem, xmlFile, baseXMLName, baseDir, customEnvironment, isMod) |
770 | |
771 | storeItem.hasLicensePlates = xmlFile:hasProperty("vehicle.licensePlates.licensePlate(0)") |
772 | end |
773 | storeItem.price = xmlFile:getValue(storeDataXMLKey..".price", 0) |
774 | if storeItem.price < 0 then |
775 | Logging.xmlWarning(xmlFile, "Price has to be greater than 0. Using default 10.000 instead!") |
776 | storeItem.price = 10000 |
777 | end |
778 | storeItem.dailyUpkeep = xmlFile:getValue(storeDataXMLKey..".dailyUpkeep", 0) |
779 | storeItem.runningLeasingFactor = xmlFile:getValue(storeDataXMLKey..".runningLeasingFactor", EconomyManager.DEFAULT_RUNNING_LEASING_FACTOR) |
780 | storeItem.lifetime = xmlFile:getValue(storeDataXMLKey..".lifetime", 600) |
781 | |
782 | xmlFile:iterate("handTool.storeData.storePacks.storePack", function(_, key) |
783 | local packName = xmlFile:getValue(key) |
784 | self:addPackItem(packName, xmlFilename) |
785 | end) |
786 | |
787 | xmlFile:iterate("vehicle.storeData.storePacks.storePack", function(_, key) |
788 | local packName = xmlFile:getValue(key) |
789 | self:addPackItem(packName, xmlFilename) |
790 | end) |
791 | |
792 | local bundleItemsToAdd = {} |
793 | if xmlFile:hasProperty(storeDataXMLKey..".bundleElements") then |
794 | local bundleInfo = {bundleItems={}, attacherInfo={}} |
795 | local price = 0 |
796 | local lifetime = math.huge |
797 | local dailyUpkeep = 0 |
798 | local runningLeasingFactor = 0 |
799 | local i = 0 |
800 | while true do |
801 | local bundleKey = string.format(storeDataXMLKey..".bundleElements.bundleElement(%d)", i) |
802 | if not xmlFile:hasProperty(bundleKey) then |
803 | break |
804 | end |
805 | local bundleXmlFile = xmlFile:getValue(bundleKey..".xmlFilename") |
806 | local offset = xmlFile:getValue(bundleKey..".offset", "0 0 0", true) |
807 | local rotationOffset = xmlFile:getValue(bundleKey..".rotationOffset", "0 0 0", true) |
808 | local rotation = xmlFile:getValue(bundleKey..".yRotation", 0) |
809 | rotationOffset[2] = rotationOffset[2] + rotation |
810 | if bundleXmlFile ~= nil then |
811 | local completePath = Utils.getFilename(bundleXmlFile, baseDir) |
812 | local item = self:getItemByXMLFilename(completePath) |
813 | if item == nil then |
814 | item = self:loadItem(bundleXmlFile, baseDir, customEnvironment, isMod, true, dlcTitle, nil, true) |
815 | table.insert(bundleItemsToAdd, item) |
816 | end |
817 | if item ~= nil then |
818 | price = price + item.price |
819 | dailyUpkeep = dailyUpkeep + item.dailyUpkeep |
820 | runningLeasingFactor = runningLeasingFactor + item.runningLeasingFactor |
821 | lifetime = math.min(lifetime, item.lifetime) |
822 | |
823 | if item.configurations ~= nil then |
824 | storeItem.configurations = storeItem.configurations or {} |
825 | |
826 | for configName, configOptions in pairs(item.configurations) do |
827 | if storeItem.configurations[configName] ~= nil then |
828 | -- sum the prices of the configurations on multiple items |
829 | local itemConfigOptions = storeItem.configurations[configName] |
830 | for j=1, #configOptions do |
831 | if itemConfigOptions[j] == nil then |
832 | itemConfigOptions[j] = configOptions[j] |
833 | else |
834 | itemConfigOptions[j].price = itemConfigOptions[j].price + configOptions[j].price |
835 | end |
836 | end |
837 | else |
838 | storeItem.configurations[configName] = table.copy(configOptions, math.huge) |
839 | end |
840 | end |
841 | end |
842 | |
843 | if item.defaultConfigurationIds ~= nil then |
844 | storeItem.defaultConfigurationIds = storeItem.defaultConfigurationIds or {} |
845 | end |
846 | |
847 | if item.subConfigurations ~= nil then |
848 | storeItem.subConfigurations = storeItem.subConfigurations or {} |
849 | for configName, configOptions in pairs(item.subConfigurations) do |
850 | storeItem.subConfigurations[configName] = configOptions |
851 | end |
852 | end |
853 | |
854 | if item.configurationSets ~= nil then |
855 | storeItem.configurationSets = storeItem.configurationSets or {} |
856 | for configName, configOptions in pairs(item.configurationSets) do |
857 | storeItem.configurationSets[configName] = configOptions |
858 | end |
859 | end |
860 | |
861 | local preSelectedConfigurations = {} |
862 | xmlFile:iterate(bundleKey .. ".configurations.configuration", function(_, configKey) |
863 | local configName = xmlFile:getValue(configKey.."#name") |
864 | local configValue = xmlFile:getValue(configKey.."#value") |
865 | if configName ~= nil and configValue ~= nil then |
866 | local allowChange = xmlFile:getValue(configKey.."#allowChange", false) |
867 | local hideOption = xmlFile:getValue(configKey.."#hideOption", false) |
868 | local disableOption = xmlFile:getValue(configKey.."#disableOption", false) |
869 | if not disableOption then |
870 | preSelectedConfigurations[configName] = {configValue=configValue, allowChange=allowChange, hideOption=hideOption} |
871 | else |
872 | local configElements = storeItem.configurations[configName] |
873 | if configElements ~= nil then |
874 | for j=1, #configElements do |
875 | if j == configValue then |
876 | configElements[j].isSelectable = not configElements[j].isSelectable |
877 | end |
878 | end |
879 | end |
880 | end |
881 | end |
882 | end) |
883 | |
884 | storeItem.hasLicensePlates = storeItem.hasLicensePlates or item.hasLicensePlates |
885 | |
886 | table.insert(bundleInfo.bundleItems, {item=item, xmlFilename=item.xmlFilename, offset=offset, rotationOffset=rotationOffset, rotation=0, price=item.price, preSelectedConfigurations=preSelectedConfigurations}) |
887 | end |
888 | end |
889 | i = i + 1 |
890 | end |
891 | |
892 | i = 0 |
893 | while true do |
894 | local attachKey = string.format(storeDataXMLKey..".attacherInfo.attach(%d)", i) |
895 | if not xmlFile:hasProperty(attachKey) then |
896 | break |
897 | end |
898 | local bundleElement0 = xmlFile:getValue(attachKey.."#bundleElement0") |
899 | local bundleElement1 = xmlFile:getValue(attachKey.."#bundleElement1") |
900 | local attacherJointIndex = xmlFile:getValue(attachKey.."#attacherJointIndex") |
901 | local inputAttacherJointIndex = xmlFile:getValue(attachKey.."#inputAttacherJointIndex") |
902 | if bundleElement0 ~= nil and bundleElement1 ~= nil and attacherJointIndex ~= nil and inputAttacherJointIndex ~= nil then |
903 | table.insert(bundleInfo.attacherInfo, {bundleElement0=bundleElement0, bundleElement1=bundleElement1, attacherJointIndex=attacherJointIndex, inputAttacherJointIndex=inputAttacherJointIndex}) |
904 | end |
905 | i = i + 1 |
906 | end |
907 | |
908 | storeItem.price = price |
909 | storeItem.dailyUpkeep = dailyUpkeep |
910 | storeItem.runningLeasingFactor = runningLeasingFactor |
911 | storeItem.lifetime = lifetime |
912 | storeItem.bundleInfo = bundleInfo |
913 | end |
914 | |
915 | -- Construction brush |
916 | if xmlFile:hasProperty(storeDataXMLKey..".brush") and storeItem.showInStore then |
917 | local brushType = xmlFile:getValue(storeDataXMLKey..".brush.type") |
918 | |
919 | if brushType ~= nil and brushType ~= "none" then |
920 | local parameters = {} |
921 | xmlFile:iterate(storeDataXMLKey..".brush.parameters.parameter", function(index, key) |
922 | local value = xmlFile:getValue(key) |
923 | if xmlFile:getValue(key .. "#isFilename", false) then |
924 | value = Utils.getFilename(value, baseDir) |
925 | end |
926 | |
927 | parameters[index] = value |
928 | end) |
929 | |
930 | local brushCategory = self:getConstructionCategoryByName(xmlFile:getValue(storeDataXMLKey..".brush.category")) |
931 | if brushCategory ~= nil then |
932 | local tab = self:getConstructionTabByName(xmlFile:getValue(storeDataXMLKey..".brush.tab"), brushCategory.name) |
933 | if tab ~= nil then |
934 | storeItem.brush = { |
935 | type = brushType, |
936 | parameters = parameters, |
937 | category = brushCategory, |
938 | tab = tab, |
939 | } |
940 | else |
941 | Logging.xmlWarning(xmlFile, "Missing brush tab") |
942 | end |
943 | else |
944 | Logging.xmlWarning(xmlFile, "Missing brush category") |
945 | end |
946 | end |
947 | |
948 | -- Placeables without brush just get the default placeable brush |
949 | elseif storeItem.species == "placeable" and storeItem.showInStore then |
950 | storeItem.brush = { |
951 | type = "placeable", |
952 | parameters = {}, |
953 | category = self.constructionCategories[1], |
954 | tab = self.constructionCategories[1].tabs[1], |
955 | } |
956 | end |
957 | |
958 | if not ignoreAdd then |
959 | self:addItem(storeItem) |
960 | |
961 | for i=1, #bundleItemsToAdd do |
962 | self:addItem(bundleItemsToAdd[i]) |
963 | end |
964 | end |
965 | |
966 | xmlFile:delete() |
967 | |
968 | return storeItem |
969 | end |
55 | function StoreManager:loadMapData(xmlFile, missionInfo, baseDirectory) |
56 | StoreManager:superClass().loadMapData(self) |
57 | |
58 | -- local all store categories |
59 | local categoryXMLFile = XMLFile.load("storeCategoriesXML", "dataS/storeCategories.xml") |
60 | categoryXMLFile:iterate("categories.category", function(_, key) |
61 | self:loadCategoryFromXML(categoryXMLFile, key, "") |
62 | end) |
63 | categoryXMLFile:delete() |
64 | |
65 | -- load store pack definitions |
66 | local packsXMLFile = XMLFile.load("storePacksXML", "dataS/storePacks.xml") |
67 | packsXMLFile:iterate("storePacks.storePack", function(_, key) |
68 | local name = packsXMLFile:getString(key .. "#name") |
69 | local title = packsXMLFile:getString(key .. "#title") |
70 | local imageFilename = packsXMLFile:getString(key .. "#image") |
71 | |
72 | if title ~= nil and title:sub(1, 6) == "$l10n_" then |
73 | title = g_i18n:getText(title:sub(7)) |
74 | end |
75 | |
76 | self:addPack(name, title, imageFilename, "") |
77 | end) |
78 | packsXMLFile:delete() |
79 | |
80 | -- also for mods |
81 | for _, item in ipairs(self.modStorePacks) do |
82 | self:addPack(item.name, item.title, item.imageFilename, item.baseDir) |
83 | end |
84 | |
85 | -- Load categories for the construction system |
86 | local constructionXMLFile = XMLFile.load("constructionXML", "dataS/constructionCategories.xml") |
87 | if constructionXMLFile ~= nil then |
88 | local defaultIconFilename = constructionXMLFile:getString("constructionCategories#defaultIconFilename") |
89 | local defaultRefSize = constructionXMLFile:getVector("constructionCategories#refSize", {1024, 1024}, 2) |
90 | |
91 | constructionXMLFile:iterate("constructionCategories.category", function(_, key) |
92 | local categoryName = constructionXMLFile:getString(key .. "#name") |
93 | local title = g_i18n:convertText(constructionXMLFile:getString(key .. "#title")) |
94 | local iconFilename = constructionXMLFile:getString(key .. "#iconFilename") or defaultIconFilename |
95 | local refSize = constructionXMLFile:getVector(key .. "#refSize", defaultRefSize, 2) |
96 | local iconUVs = GuiUtils.getUVs(constructionXMLFile:getString(key .. "#iconUVs", "0 0 1 1"), refSize) |
97 | |
98 | self:addConstructionCategory(categoryName, title, iconFilename, iconUVs, "") |
99 | |
100 | constructionXMLFile:iterate(key .. ".tab", function(_, tKey) |
101 | local tabName = constructionXMLFile:getString(tKey .. "#name") |
102 | local tabTitle = g_i18n:convertText(constructionXMLFile:getString(tKey .. "#title")) |
103 | local tabIconFilename = constructionXMLFile:getString(tKey .. "#iconFilename") or defaultIconFilename |
104 | local tabRefSize = constructionXMLFile:getVector(tKey .. "#refSize", defaultRefSize, 2) |
105 | local tabIconUVs = GuiUtils.getUVs(constructionXMLFile:getString(tKey .. "#iconUVs", "0 0 1 1"), tabRefSize) |
106 | |
107 | self:addConstructionTab(categoryName, tabName, tabTitle, tabIconFilename, tabIconUVs, "") |
108 | end) |
109 | end) |
110 | constructionXMLFile:delete() |
111 | end |
112 | |
113 | -- now load all storeitems |
114 | |
115 | local storeItemsFilename = self:getDefaultStoreItemsFilename() |
116 | self:loadItemsFromXML(storeItemsFilename, "", nil) |
117 | |
118 | if xmlFile ~= nil then |
119 | local mapStoreItemsFilename = getXMLString(xmlFile, "map.storeItems#filename") |
120 | if mapStoreItemsFilename ~= nil then |
121 | mapStoreItemsFilename = Utils.getFilename(mapStoreItemsFilename, baseDirectory) |
122 | self:loadItemsFromXML(mapStoreItemsFilename, baseDirectory, missionInfo.customEnvironment) |
123 | end |
124 | end |
125 | |
126 | for _, item in ipairs(self.modStoreItems) do |
127 | g_asyncTaskManager:addSubtask(function() |
128 | self:loadItem(item.xmlFilename, item.baseDir, item.customEnvironment, item.isMod, item.isBundleItem, item.dlcTitle, item.extraContentId) |
129 | end) |
130 | end |
131 | |
132 | addConsoleCommand("gsStoreItemsReload", "Reloads storeItem data", "consoleCommandReloadStoreItems", self) |
133 | |
134 | return true |
135 | end |
1089 | function StoreManager.registerStoreDataXMLPaths(schema, basePath) |
1090 | schema:register(XMLValueType.L10N_STRING, basePath .. ".storeData.name", "Name of store item", nil, true) |
1091 | schema:register(XMLValueType.STRING, basePath .. ".storeData.name#params", "Parameters to add to name") |
1092 | schema:register(XMLValueType.STRING, basePath .. ".storeData.species", "Store species", "vehicle") |
1093 | schema:register(XMLValueType.STRING, basePath .. ".storeData.image", "Path to store icon", nil, true) |
1094 | schema:register(XMLValueType.STRING, basePath .. ".storeData.brand", "Brand identifier", "LIZARD") |
1095 | schema:register(XMLValueType.STRING, basePath .. ".storeData.brand#customIcon", "Custom brand icon to display in the shop config screen") |
1096 | schema:register(XMLValueType.STRING, basePath .. ".storeData.brand#imageOffset", "Offset of custom brand icon") |
1097 | |
1098 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.canBeSold", "Defines of the vehicle can be sold", true) |
1099 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.showInStore", "Defines of the vehicle is shown in shop", true) |
1100 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.allowLeasing", "Defines of the vehicle can be leased", true) |
1101 | schema:register(XMLValueType.INT, basePath .. ".storeData.maxItemCount", "Defines the max. amount vehicle of this type") |
1102 | schema:register(XMLValueType.ANGLE, basePath .. ".storeData.rotation", "Y rotation of the vehicle", 0) |
1103 | |
1104 | schema:register(XMLValueType.STRING, basePath .. ".storeData.category", "Store category", "misc") |
1105 | schema:register(XMLValueType.STRING, basePath .. ".storeData.storePacks.storePack(?)", "Store pack") |
1106 | schema:register(XMLValueType.FLOAT, basePath .. ".storeData.price", "Store price", 10000) |
1107 | schema:register(XMLValueType.FLOAT, basePath .. ".storeData.dailyUpkeep", "Daily up keep", 0) |
1108 | schema:register(XMLValueType.FLOAT, basePath .. ".storeData.runningLeasingFactor", "Running leasing factor", EconomyManager.DEFAULT_RUNNING_LEASING_FACTOR) |
1109 | schema:register(XMLValueType.FLOAT, basePath .. ".storeData.lifetime", "Lifetime of vehicle used to calculate price drop, in months", 600) |
1110 | |
1111 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.shopDynamicTitle", "Vehicle brand icon and vehicle name is dynamically updated based on the selected configuration in the shop", false) |
1112 | schema:register(XMLValueType.VECTOR_TRANS, basePath .. ".storeData.shopTranslationOffset", "Translation offset for shop spawning and store icon", 0) |
1113 | schema:register(XMLValueType.VECTOR_ROT, basePath .. ".storeData.shopRotationOffset", "Rotation offset for shop spawning and store icon", 0) |
1114 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.shopIgnoreLastComponentPositions", "If set to true the component positions from last spawning are now reused", false) |
1115 | schema:register(XMLValueType.TIME, basePath .. ".storeData.shopLoadingDelay#initial", "Delay of initial shop loading until the vehicle is displayed. (Used e.g. to hide vehicle while components still moving)") |
1116 | schema:register(XMLValueType.TIME, basePath .. ".storeData.shopLoadingDelay#config", "Delay of shop loading after config change until the vehicle is displayed. (Used e.g. to hide vehicle while components still moving)") |
1117 | |
1118 | schema:register(XMLValueType.FLOAT, basePath .. ".storeData.shopHeight", "Height of vehicle for shop placement", 0) |
1119 | schema:register(XMLValueType.STRING, basePath .. ".storeData.financeCategory", "Finance category name") |
1120 | schema:register(XMLValueType.INT, basePath .. ".storeData.shopFoldingState", "Inverts the shop folding state if set to '1'", 0) |
1121 | schema:register(XMLValueType.FLOAT, basePath .. ".storeData.shopFoldingTime", "Defines a custom folding time for the shop") |
1122 | |
1123 | schema:register(XMLValueType.INT, basePath .. ".storeData.vertexBufferMemoryUsage", "Vertex buffer memory usage", 0) |
1124 | schema:register(XMLValueType.INT, basePath .. ".storeData.indexBufferMemoryUsage", "Index buffer memory usage", 0) |
1125 | schema:register(XMLValueType.INT, basePath .. ".storeData.textureMemoryUsage", "Texture memory usage", 0) |
1126 | schema:register(XMLValueType.INT, basePath .. ".storeData.instanceVertexBufferMemoryUsage", "Instance vertex buffer memory usage", 0) |
1127 | schema:register(XMLValueType.INT, basePath .. ".storeData.instanceIndexBufferMemoryUsage", "Instance index buffer memory usage", 0) |
1128 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.ignoreVramUsage", "Ignore VRAM usage", false) |
1129 | schema:register(XMLValueType.INT, basePath .. ".storeData.audioMemoryUsage", "Audio memory usage", 0) |
1130 | |
1131 | schema:register(XMLValueType.STRING, basePath .. ".storeData.bundleElements.bundleElement(?).xmlFilename", "XML filename") |
1132 | schema:register(XMLValueType.VECTOR_TRANS, basePath .. ".storeData.bundleElements.bundleElement(?).offset", "Translation offset of vehicle") |
1133 | schema:register(XMLValueType.VECTOR_ROT, basePath .. ".storeData.bundleElements.bundleElement(?).rotationOffset", "Rotation offset of vehicle") |
1134 | schema:register(XMLValueType.ANGLE, basePath .. ".storeData.bundleElements.bundleElement(?).yRotation", "Y rotation of vehicle") |
1135 | |
1136 | schema:register(XMLValueType.STRING, basePath .. ".storeData.bundleElements.bundleElement(?).configurations.configuration(?)#name", "Name of configuration") |
1137 | schema:register(XMLValueType.INT, basePath .. ".storeData.bundleElements.bundleElement(?).configurations.configuration(?)#value", "Configuration index that is forced for this config") |
1138 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.bundleElements.bundleElement(?).configurations.configuration(?)#allowChange", "Allow change of option", false) |
1139 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.bundleElements.bundleElement(?).configurations.configuration(?)#hideOption", "Hide the option completely", false) |
1140 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.bundleElements.bundleElement(?).configurations.configuration(?)#disableOption", "Disabled this particular config option", false) |
1141 | |
1142 | schema:register(XMLValueType.INT, basePath .. ".storeData.attacherInfo.attach(?)#bundleElement0", "First bundle element") |
1143 | schema:register(XMLValueType.INT, basePath .. ".storeData.attacherInfo.attach(?)#bundleElement1", "Second bundle element") |
1144 | schema:register(XMLValueType.INT, basePath .. ".storeData.attacherInfo.attach(?)#attacherJointIndex", "Attacher joint index") |
1145 | schema:register(XMLValueType.INT, basePath .. ".storeData.attacherInfo.attach(?)#inputAttacherJointIndex", "Input attacher joint index") |
1146 | |
1147 | schema:register(XMLValueType.L10N_STRING, basePath .. ".storeData.functions.function(?)", "Function description text") |
1148 | |
1149 | schema:register(XMLValueType.STRING, basePath .. ".storeData.brush.type", "Brush type") |
1150 | schema:register(XMLValueType.STRING, basePath .. ".storeData.brush.category", "Brush category") |
1151 | schema:register(XMLValueType.STRING, basePath .. ".storeData.brush.tab", "Brush tab") |
1152 | schema:register(XMLValueType.STRING, basePath .. ".storeData.brush.parameters.parameter(?)", "Brush parameter value") |
1153 | schema:register(XMLValueType.STRING, basePath .. ".storeData.brush.parameters.parameter(?)#isFilename", "Whether the parameter is a filename") |
1154 | |
1155 | -- Store Icon Generator - Not used in the game |
1156 | schema:register(XMLValueType.ANGLE, basePath .. ".storeData.storeIconRendering.settings#cameraYRot", "Y Rot of camera", "Setting from Icon Generator") |
1157 | schema:register(XMLValueType.ANGLE, basePath .. ".storeData.storeIconRendering.settings#cameraXRot", "X Rot of camera", "Setting from Icon Generator") |
1158 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.storeIconRendering.settings#advancedBoundingBox", "Advanced BB is used for icon placement", "Setting from Icon Generator") |
1159 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.storeIconRendering.settings#centerIcon", "Center item on icon", "Setting from Icon Generator") |
1160 | schema:register(XMLValueType.FLOAT, basePath .. ".storeData.storeIconRendering.settings#lightIntensity", "Intensity of light sources", "Setting from Icon Generator") |
1161 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.storeIconRendering.settings#showTriggerMarkers", "Show trigger markers on icon (for placeables)", false) |
1162 | |
1163 | schema:register(XMLValueType.BOOL, basePath .. ".storeData.storeIconRendering.objectBundle#useClipPlane", "Clip plane is used") |
1164 | schema:register(XMLValueType.STRING, basePath .. ".storeData.storeIconRendering.objectBundle.object(?)#filename", "Path to i3d file") |
1165 | schema:register(XMLValueType.NODE_INDEX, basePath .. ".storeData.storeIconRendering.objectBundle.object(?).node(?)#node", "Index Path of node to load") |
1166 | schema:register(XMLValueType.VECTOR_TRANS, basePath .. ".storeData.storeIconRendering.objectBundle.object(?).node(?)#translation", "Translation", "0 0 0") |
1167 | schema:register(XMLValueType.VECTOR_ROT, basePath .. ".storeData.storeIconRendering.objectBundle.object(?).node(?)#rotation", "Rotation", "0 0 0") |
1168 | schema:register(XMLValueType.VECTOR_SCALE, basePath .. ".storeData.storeIconRendering.objectBundle.object(?).node(?)#scale", "Scale", "1 1 1") |
1169 | |
1170 | schema:register(XMLValueType.STRING, basePath .. ".storeData.storeIconRendering.shaderParameter(?)#name", "Name if shader parameter") |
1171 | schema:register(XMLValueType.STRING, basePath .. ".storeData.storeIconRendering.shaderParameter(?)#values", "Values of shader parameter") |
1172 | |
1173 | end |